@databricks/design-system 1.12.12 → 1.12.14

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 (174) hide show
  1. package/dist/{DropdownMenu-06a1051f.js → Stepper-839336b1.js} +951 -873
  2. package/dist/Stepper-839336b1.js.map +1 -0
  3. package/dist/design-system/AutoComplete/AutoComplete.d.ts +3 -0
  4. package/dist/design-system/AutoComplete/AutoComplete.d.ts.map +1 -1
  5. package/dist/design-system/Button/Button.d.ts +13 -1
  6. package/dist/design-system/Button/Button.d.ts.map +1 -1
  7. package/dist/design-system/Checkbox/Checkbox.d.ts.map +1 -1
  8. package/dist/design-system/ContextMenu/ContextMenu.d.ts.map +1 -0
  9. package/dist/design-system/ContextMenu/index.d.ts +2 -0
  10. package/dist/design-system/ContextMenu/index.d.ts.map +1 -0
  11. package/dist/design-system/DatePicker/DatePicker.d.ts.map +1 -1
  12. package/dist/design-system/DesignSystemEventProvider/DesignSystemEventProvider.d.ts +45 -0
  13. package/dist/design-system/DesignSystemEventProvider/DesignSystemEventProvider.d.ts.map +1 -0
  14. package/dist/design-system/DesignSystemEventProvider/index.d.ts +2 -0
  15. package/dist/design-system/DesignSystemEventProvider/index.d.ts.map +1 -0
  16. package/dist/design-system/DialogCombobox/DialogComboboxAddButton.d.ts +1 -1
  17. package/dist/design-system/DialogCombobox/DialogComboboxAddButton.d.ts.map +1 -1
  18. package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts.map +1 -1
  19. package/dist/design-system/DialogCombobox/DialogComboboxHintRow.d.ts.map +1 -1
  20. package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts.map +1 -1
  21. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts +9 -5
  22. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts.map +1 -1
  23. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts +9 -0
  24. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts.map +1 -1
  25. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts +7 -0
  26. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts.map +1 -1
  27. package/dist/design-system/Drawer/Drawer.d.ts.map +1 -1
  28. package/dist/design-system/DropdownMenu/DropdownMenu.d.ts +1 -2
  29. package/dist/design-system/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  30. package/dist/design-system/FormV2/RHFAdapters.d.ts +7 -1
  31. package/dist/design-system/FormV2/RHFAdapters.d.ts.map +1 -1
  32. package/dist/design-system/Header/Header.d.ts.map +1 -1
  33. package/dist/design-system/Icon/Icon.d.ts +1 -1
  34. package/dist/design-system/Icon/Icon.d.ts.map +1 -1
  35. package/dist/design-system/Icon/__generated/icons/BarStackedPercentageIcon.d.ts +5 -0
  36. package/dist/design-system/Icon/__generated/icons/BarStackedPercentageIcon.d.ts.map +1 -0
  37. package/dist/design-system/Icon/__generated/icons/ErdIcon.d.ts +5 -0
  38. package/dist/design-system/Icon/__generated/icons/ErdIcon.d.ts.map +1 -0
  39. package/dist/design-system/Icon/__generated/icons/ListClearIcon.d.ts +5 -0
  40. package/dist/design-system/Icon/__generated/icons/ListClearIcon.d.ts.map +1 -0
  41. package/dist/design-system/Icon/__generated/icons/PauseIcon.d.ts +5 -0
  42. package/dist/design-system/Icon/__generated/icons/PauseIcon.d.ts.map +1 -0
  43. package/dist/design-system/Icon/__generated/icons/SparkleIcon.d.ts +5 -0
  44. package/dist/design-system/Icon/__generated/icons/SparkleIcon.d.ts.map +1 -0
  45. package/dist/design-system/Icon/__generated/icons/StepIntoIcon.d.ts +5 -0
  46. package/dist/design-system/Icon/__generated/icons/StepIntoIcon.d.ts.map +1 -0
  47. package/dist/design-system/Icon/__generated/icons/StepOutIcon.d.ts +5 -0
  48. package/dist/design-system/Icon/__generated/icons/StepOutIcon.d.ts.map +1 -0
  49. package/dist/design-system/Icon/__generated/icons/StepOverIcon.d.ts +5 -0
  50. package/dist/design-system/Icon/__generated/icons/StepOverIcon.d.ts.map +1 -0
  51. package/dist/design-system/Icon/__generated/icons/TableOnlineViewIcon.d.ts +5 -0
  52. package/dist/design-system/Icon/__generated/icons/TableOnlineViewIcon.d.ts.map +1 -0
  53. package/dist/design-system/Icon/__generated/icons/index.d.ts +9 -0
  54. package/dist/design-system/Icon/__generated/icons/index.d.ts.map +1 -1
  55. package/dist/design-system/Input/Input.d.ts +9 -1
  56. package/dist/design-system/Input/Input.d.ts.map +1 -1
  57. package/dist/design-system/Input/index.d.ts +2 -1
  58. package/dist/design-system/Input/index.d.ts.map +1 -1
  59. package/dist/design-system/Label/Label.d.ts +1 -0
  60. package/dist/design-system/Label/Label.d.ts.map +1 -1
  61. package/dist/design-system/Modal/Modal.d.ts +2 -2
  62. package/dist/design-system/Modal/Modal.d.ts.map +1 -1
  63. package/dist/design-system/Notification/Notification.d.ts.map +1 -1
  64. package/dist/design-system/Pagination/index.d.ts +9 -1
  65. package/dist/design-system/Pagination/index.d.ts.map +1 -1
  66. package/dist/design-system/Popover/InfoPopover.d.ts +2 -1
  67. package/dist/design-system/Popover/InfoPopover.d.ts.map +1 -1
  68. package/dist/design-system/SegmentedControl/SegmentedControl.d.ts +1 -0
  69. package/dist/design-system/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  70. package/dist/design-system/Select/Select.d.ts.map +1 -1
  71. package/dist/design-system/Sidebar/Sidebar.d.ts.map +1 -1
  72. package/dist/design-system/SplitButton/Dropdown/DropdownButton.d.ts.map +1 -1
  73. package/dist/design-system/SplitButton/SplitButton.d.ts.map +1 -1
  74. package/dist/design-system/Steps/Steps.d.ts +1 -2
  75. package/dist/design-system/Steps/Steps.d.ts.map +1 -1
  76. package/dist/design-system/Switch/Switch.d.ts.map +1 -1
  77. package/dist/design-system/TableUI/Table.d.ts.map +1 -1
  78. package/dist/design-system/TableUI/TableFilterInput.d.ts +2 -1
  79. package/dist/design-system/TableUI/TableFilterInput.d.ts.map +1 -1
  80. package/dist/design-system/TableUI/TableFilterLayout.d.ts.map +1 -1
  81. package/dist/design-system/TableUI/TableRow.d.ts.map +1 -1
  82. package/dist/design-system/Tag/index.d.ts +2 -2
  83. package/dist/design-system/Tag/index.d.ts.map +1 -1
  84. package/dist/design-system/Tooltip/Tooltip.d.ts +6 -0
  85. package/dist/design-system/Tooltip/Tooltip.d.ts.map +1 -1
  86. package/dist/design-system/Tree/Tree.d.ts +24 -0
  87. package/dist/design-system/Tree/Tree.d.ts.map +1 -1
  88. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxAddButton.d.ts +3 -0
  89. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxAddButton.d.ts.map +1 -0
  90. package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts +3 -1
  91. package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts.map +1 -1
  92. package/dist/design-system/TypeaheadCombobox/index.d.ts +1 -0
  93. package/dist/design-system/TypeaheadCombobox/index.d.ts.map +1 -1
  94. package/dist/design-system/Wizard/Wizard.d.ts +74 -0
  95. package/dist/design-system/Wizard/Wizard.d.ts.map +1 -0
  96. package/dist/design-system/Wizard/WizardFooter.d.ts +15 -0
  97. package/dist/design-system/Wizard/WizardFooter.d.ts.map +1 -0
  98. package/dist/design-system/Wizard/WizardModal.d.ts +7 -0
  99. package/dist/design-system/Wizard/WizardModal.d.ts.map +1 -0
  100. package/dist/design-system/Wizard/WizardStep.d.ts +71 -0
  101. package/dist/design-system/Wizard/WizardStep.d.ts.map +1 -0
  102. package/dist/design-system/Wizard/WizardStepsContent.d.ts +10 -0
  103. package/dist/design-system/Wizard/WizardStepsContent.d.ts.map +1 -0
  104. package/dist/design-system/Wizard/index.d.ts +5 -0
  105. package/dist/design-system/Wizard/index.d.ts.map +1 -0
  106. package/dist/design-system/Wizard/useWizardCurrentStep.d.ts +20 -0
  107. package/dist/design-system/Wizard/useWizardCurrentStep.d.ts.map +1 -0
  108. package/dist/design-system/_shared_/Combobox/styles.d.ts +12 -0
  109. package/dist/design-system/_shared_/Combobox/styles.d.ts.map +1 -1
  110. package/dist/design-system/constants.d.ts +2 -2
  111. package/dist/design-system/constants.d.ts.map +1 -1
  112. package/dist/design-system/index.d.ts +3 -0
  113. package/dist/design-system/index.d.ts.map +1 -1
  114. package/dist/design-system/utils/safex.d.ts +3 -2
  115. package/dist/design-system/utils/safex.d.ts.map +1 -1
  116. package/dist/design-system/utils/useNotifyOnFirstView.d.ts +15 -0
  117. package/dist/design-system/utils/useNotifyOnFirstView.d.ts.map +1 -0
  118. package/dist/development/Banner/Banner.d.ts +16 -6
  119. package/dist/development/Banner/Banner.d.ts.map +1 -1
  120. package/dist/development/ChatUI/ChatInput.d.ts.map +1 -1
  121. package/dist/development/ChatUI/Feedback.d.ts.map +1 -1
  122. package/dist/development/Stepper/Stepper.d.ts +62 -0
  123. package/dist/development/Stepper/Stepper.d.ts.map +1 -0
  124. package/dist/development/Stepper/index.d.ts +2 -0
  125. package/dist/development/Stepper/index.d.ts.map +1 -0
  126. package/dist/development/Toolbar/Toolbar.d.ts +15 -0
  127. package/dist/development/Toolbar/Toolbar.d.ts.map +1 -0
  128. package/dist/development/Toolbar/index.d.ts +2 -0
  129. package/dist/development/Toolbar/index.d.ts.map +1 -0
  130. package/dist/development/index.d.ts +3 -2
  131. package/dist/development/index.d.ts.map +1 -1
  132. package/dist/development.js +340 -327
  133. package/dist/development.js.map +1 -1
  134. package/dist/dubois-colors.less +203 -142
  135. package/dist/flags.d.ts +1 -2
  136. package/dist/flags.d.ts.map +1 -1
  137. package/dist/index-dark.css +289 -289
  138. package/dist/index.css +196 -196
  139. package/dist/index.js +2588 -937
  140. package/dist/index.js.map +1 -1
  141. package/dist/rollup/less.d.ts.map +1 -1
  142. package/dist/test-utils/enzyme/selectEvent.d.ts +5 -0
  143. package/dist/test-utils/enzyme/selectEvent.d.ts.map +1 -1
  144. package/dist/test-utils/enzyme/table.d.ts.map +1 -1
  145. package/dist/test-utils/enzyme/utils.d.ts +6 -0
  146. package/dist/test-utils/enzyme/utils.d.ts.map +1 -1
  147. package/dist/test-utils/enzyme.js +34 -15
  148. package/dist/test-utils/enzyme.js.map +1 -1
  149. package/dist/test-utils/rtl/selectEvent.d.ts +5 -0
  150. package/dist/test-utils/rtl/selectEvent.d.ts.map +1 -1
  151. package/dist/test-utils/rtl.js +16 -1
  152. package/dist/test-utils/rtl.js.map +1 -1
  153. package/dist/theme/_generated/PrimitiveColors.d.ts +3 -0
  154. package/dist/theme/_generated/PrimitiveColors.d.ts.map +1 -0
  155. package/dist/theme/_generated/SemanticColors-Dark.d.ts +3 -0
  156. package/dist/theme/_generated/SemanticColors-Dark.d.ts.map +1 -0
  157. package/dist/theme/_generated/SemanticColors-Light.d.ts +3 -0
  158. package/dist/theme/_generated/SemanticColors-Light.d.ts.map +1 -0
  159. package/dist/theme/_generated/ValidPrimitiveColors.d.ts +56 -0
  160. package/dist/theme/_generated/ValidPrimitiveColors.d.ts.map +1 -0
  161. package/dist/theme/_generated/ValidSemanticColors.d.ts +98 -0
  162. package/dist/theme/_generated/ValidSemanticColors.d.ts.map +1 -0
  163. package/dist/theme/colors.d.ts +62 -141
  164. package/dist/theme/colors.d.ts.map +1 -1
  165. package/dist/theme/spacing.d.ts +1 -0
  166. package/dist/theme/spacing.d.ts.map +1 -1
  167. package/package.json +13 -15
  168. package/dist/DropdownMenu-06a1051f.js.map +0 -1
  169. package/dist/development/ContextMenu/ContextMenu.d.ts.map +0 -1
  170. package/dist/development/ContextMenu/index.d.ts +0 -2
  171. package/dist/development/ContextMenu/index.d.ts.map +0 -1
  172. package/dist/theme/colorList.d.ts +0 -130
  173. package/dist/theme/colorList.d.ts.map +0 -1
  174. /package/dist/{development → design-system}/ContextMenu/ContextMenu.d.ts +0 -0
@@ -1,9 +1,8 @@
1
- import React__default, { createContext, useContext, useMemo, useEffect, forwardRef, useRef, useLayoutEffect, useImperativeHandle, useState, Children } from 'react';
1
+ import React__default, { createContext, useContext, useMemo, useEffect, useState, forwardRef, useRef, useLayoutEffect, useImperativeHandle } from 'react';
2
2
  import { jsx, Fragment, jsxs } from '@emotion/react/jsx-runtime';
3
3
  import { useTheme, ThemeProvider, css, keyframes } from '@emotion/react';
4
- import { notification, ConfigProvider, Button as Button$1, Typography as Typography$1, Tooltip as Tooltip$1, Input as Input$2 } from 'antd';
5
- import * as DropdownMenu$1 from '@radix-ui/react-dropdown-menu';
6
- import chroma from 'chroma-js';
4
+ import { notification, ConfigProvider, Button as Button$1, Typography as Typography$1, Input as Input$2 } from 'antd';
5
+ import AntDIcon from '@ant-design/icons';
7
6
  import _isNil from 'lodash/isNil';
8
7
  import _endsWith from 'lodash/endsWith';
9
8
  import _isBoolean from 'lodash/isBoolean';
@@ -12,7 +11,6 @@ import _isString from 'lodash/isString';
12
11
  import _mapValues from 'lodash/mapValues';
13
12
  import _memoize from 'lodash/memoize';
14
13
  import unitless from '@emotion/unitless';
15
- import AntDIcon from '@ant-design/icons';
16
14
 
17
15
  /**
18
16
  * Used to hide text visually, but still be readable by screen-readers
@@ -124,13 +122,114 @@ const getShadowVariables = isDarkMode => {
124
122
  }
125
123
  };
126
124
 
125
+ // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
126
+
127
+ let ValidSemanticColors = /*#__PURE__*/function (ValidSemanticColors) {
128
+ ValidSemanticColors["ActionDangerDefaultBackgroundDefault"] = "actionDangerDefaultBackgroundDefault";
129
+ ValidSemanticColors["ActionDangerDefaultBackgroundHover"] = "actionDangerDefaultBackgroundHover";
130
+ ValidSemanticColors["ActionDangerDefaultBackgroundPress"] = "actionDangerDefaultBackgroundPress";
131
+ ValidSemanticColors["ActionDangerDefaultBorderDefault"] = "actionDangerDefaultBorderDefault";
132
+ ValidSemanticColors["ActionDangerDefaultBorderHover"] = "actionDangerDefaultBorderHover";
133
+ ValidSemanticColors["ActionDangerDefaultBorderPress"] = "actionDangerDefaultBorderPress";
134
+ ValidSemanticColors["ActionDangerDefaultTextDefault"] = "actionDangerDefaultTextDefault";
135
+ ValidSemanticColors["ActionDangerDefaultTextHover"] = "actionDangerDefaultTextHover";
136
+ ValidSemanticColors["ActionDangerDefaultTextPress"] = "actionDangerDefaultTextPress";
137
+ ValidSemanticColors["ActionDangerPrimaryBackgroundDefault"] = "actionDangerPrimaryBackgroundDefault";
138
+ ValidSemanticColors["ActionDangerPrimaryBackgroundHover"] = "actionDangerPrimaryBackgroundHover";
139
+ ValidSemanticColors["ActionDangerPrimaryBackgroundPress"] = "actionDangerPrimaryBackgroundPress";
140
+ ValidSemanticColors["ActionDangerPrimaryText"] = "actionDangerPrimaryText";
141
+ ValidSemanticColors["ActionDefaultBackgroundDefault"] = "actionDefaultBackgroundDefault";
142
+ ValidSemanticColors["ActionDefaultBackgroundHover"] = "actionDefaultBackgroundHover";
143
+ ValidSemanticColors["ActionDefaultBackgroundPress"] = "actionDefaultBackgroundPress";
144
+ ValidSemanticColors["ActionDefaultBorderDefault"] = "actionDefaultBorderDefault";
145
+ ValidSemanticColors["ActionDefaultBorderFocus"] = "actionDefaultBorderFocus";
146
+ ValidSemanticColors["ActionDefaultBorderHover"] = "actionDefaultBorderHover";
147
+ ValidSemanticColors["ActionDefaultBorderPress"] = "actionDefaultBorderPress";
148
+ ValidSemanticColors["ActionDefaultIconDefault"] = "actionDefaultIconDefault";
149
+ ValidSemanticColors["ActionDefaultIconHover"] = "actionDefaultIconHover";
150
+ ValidSemanticColors["ActionDefaultIconPress"] = "actionDefaultIconPress";
151
+ ValidSemanticColors["ActionDefaultTextDefault"] = "actionDefaultTextDefault";
152
+ ValidSemanticColors["ActionDefaultTextHover"] = "actionDefaultTextHover";
153
+ ValidSemanticColors["ActionDefaultTextPress"] = "actionDefaultTextPress";
154
+ ValidSemanticColors["ActionDisabledBackground"] = "actionDisabledBackground";
155
+ ValidSemanticColors["ActionDisabledBorder"] = "actionDisabledBorder";
156
+ ValidSemanticColors["ActionDisabledText"] = "actionDisabledText";
157
+ ValidSemanticColors["ActionIconBackgroundDefault"] = "actionIconBackgroundDefault";
158
+ ValidSemanticColors["ActionIconBackgroundHover"] = "actionIconBackgroundHover";
159
+ ValidSemanticColors["ActionIconBackgroundPress"] = "actionIconBackgroundPress";
160
+ ValidSemanticColors["ActionIconIconDefault"] = "actionIconIconDefault";
161
+ ValidSemanticColors["ActionIconIconHover"] = "actionIconIconHover";
162
+ ValidSemanticColors["ActionIconIconPress"] = "actionIconIconPress";
163
+ ValidSemanticColors["ActionLinkDefault"] = "actionLinkDefault";
164
+ ValidSemanticColors["ActionLinkHover"] = "actionLinkHover";
165
+ ValidSemanticColors["ActionLinkPress"] = "actionLinkPress";
166
+ ValidSemanticColors["ActionPrimaryBackgroundDefault"] = "actionPrimaryBackgroundDefault";
167
+ ValidSemanticColors["ActionPrimaryBackgroundHover"] = "actionPrimaryBackgroundHover";
168
+ ValidSemanticColors["ActionPrimaryBackgroundPress"] = "actionPrimaryBackgroundPress";
169
+ ValidSemanticColors["ActionPrimaryIcon"] = "actionPrimaryIcon";
170
+ ValidSemanticColors["ActionPrimaryTextDefault"] = "actionPrimaryTextDefault";
171
+ ValidSemanticColors["ActionPrimaryTextHover"] = "actionPrimaryTextHover";
172
+ ValidSemanticColors["ActionPrimaryTextPress"] = "actionPrimaryTextPress";
173
+ ValidSemanticColors["ActionTertiaryBackgroundDefault"] = "actionTertiaryBackgroundDefault";
174
+ ValidSemanticColors["ActionTertiaryBackgroundHover"] = "actionTertiaryBackgroundHover";
175
+ ValidSemanticColors["ActionTertiaryBackgroundPress"] = "actionTertiaryBackgroundPress";
176
+ ValidSemanticColors["ActionTertiaryIconDefault"] = "actionTertiaryIconDefault";
177
+ ValidSemanticColors["ActionTertiaryIconHover"] = "actionTertiaryIconHover";
178
+ ValidSemanticColors["ActionTertiaryIconPress"] = "actionTertiaryIconPress";
179
+ ValidSemanticColors["ActionTertiaryTextDefault"] = "actionTertiaryTextDefault";
180
+ ValidSemanticColors["ActionTertiaryTextHover"] = "actionTertiaryTextHover";
181
+ ValidSemanticColors["ActionTertiaryTextPress"] = "actionTertiaryTextPress";
182
+ ValidSemanticColors["BackgroundDanger"] = "backgroundDanger";
183
+ ValidSemanticColors["BackgroundPrimary"] = "backgroundPrimary";
184
+ ValidSemanticColors["BackgroundSecondary"] = "backgroundSecondary";
185
+ ValidSemanticColors["BackgroundSuccess"] = "backgroundSuccess";
186
+ ValidSemanticColors["BackgroundWarning"] = "backgroundWarning";
187
+ ValidSemanticColors["Border"] = "border";
188
+ ValidSemanticColors["BorderAccessible"] = "borderAccessible";
189
+ ValidSemanticColors["BorderDanger"] = "borderDanger";
190
+ ValidSemanticColors["BorderWarning"] = "borderWarning";
191
+ ValidSemanticColors["CodeBackground"] = "codeBackground";
192
+ ValidSemanticColors["OverlayOverlay"] = "overlayOverlay";
193
+ ValidSemanticColors["Skeleton"] = "skeleton";
194
+ ValidSemanticColors["TableBackgroundSelectedDefault"] = "tableBackgroundSelectedDefault";
195
+ ValidSemanticColors["TableBackgroundSelectedHover"] = "tableBackgroundSelectedHover";
196
+ ValidSemanticColors["TableBackgroundUnselectedDefault"] = "tableBackgroundUnselectedDefault";
197
+ ValidSemanticColors["TableBackgroundUnselectedHover"] = "tableBackgroundUnselectedHover";
198
+ ValidSemanticColors["TagBrown"] = "tagBrown";
199
+ ValidSemanticColors["TagCharcoal"] = "tagCharcoal";
200
+ ValidSemanticColors["TagCoral"] = "tagCoral";
201
+ ValidSemanticColors["TagDefault"] = "tagDefault";
202
+ ValidSemanticColors["TagHover"] = "tagHover";
203
+ ValidSemanticColors["TagIconDefault"] = "tagIconDefault";
204
+ ValidSemanticColors["TagIconHover"] = "tagIconHover";
205
+ ValidSemanticColors["TagIconPress"] = "tagIconPress";
206
+ ValidSemanticColors["TagIndigo"] = "tagIndigo";
207
+ ValidSemanticColors["TagInverse"] = "tagInverse";
208
+ ValidSemanticColors["TagLemon"] = "tagLemon";
209
+ ValidSemanticColors["TagLime"] = "tagLime";
210
+ ValidSemanticColors["TagPink"] = "tagPink";
211
+ ValidSemanticColors["TagPress"] = "tagPress";
212
+ ValidSemanticColors["TagPurple"] = "tagPurple";
213
+ ValidSemanticColors["TagTeal"] = "tagTeal";
214
+ ValidSemanticColors["TagText"] = "tagText";
215
+ ValidSemanticColors["TagTurquoise"] = "tagTurquoise";
216
+ ValidSemanticColors["TextPlaceholder"] = "textPlaceholder";
217
+ ValidSemanticColors["TextPrimary"] = "textPrimary";
218
+ ValidSemanticColors["TextSecondary"] = "textSecondary";
219
+ ValidSemanticColors["TextValidationDanger"] = "textValidationDanger";
220
+ ValidSemanticColors["TextValidationSuccess"] = "textValidationSuccess";
221
+ ValidSemanticColors["TextValidationWarning"] = "textValidationWarning";
222
+ ValidSemanticColors["TooltipBackgroundTooltip"] = "tooltipBackgroundTooltip";
223
+ return ValidSemanticColors;
224
+ }({});
225
+
127
226
  const ColorVars = {
128
- primary: 'textPrimary',
129
- secondary: 'textSecondary',
130
- info: 'textValidationInfo',
131
- error: 'textValidationDanger',
132
- success: 'textValidationSuccess',
133
- warning: 'textValidationWarning'
227
+ primary: ValidSemanticColors.TextPrimary,
228
+ secondary: ValidSemanticColors.TextSecondary,
229
+ info: ValidSemanticColors.TextSecondary,
230
+ error: ValidSemanticColors.TextValidationDanger,
231
+ success: ValidSemanticColors.TextValidationSuccess,
232
+ warning: ValidSemanticColors.TextValidationWarning
134
233
  };
135
234
 
136
235
  /**
@@ -368,17 +467,19 @@ const responsive = {
368
467
  };
369
468
  var responsive$1 = responsive;
370
469
 
371
- // Exported from go/designsystem/colorsheet
372
- const colorPalettePrimary = {
373
- primary: '#2272B4',
470
+ // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
471
+
472
+ const primitiveColors = {
374
473
  blue100: '#F0F8FF',
375
474
  blue200: '#D7EDFE',
376
475
  blue300: '#BAE1FC',
377
- blue400: '#8FCDFF',
476
+ blue400: '#8ACAFF',
378
477
  blue500: '#4299E0',
379
478
  blue600: '#2272B4',
380
479
  blue700: '#0E538B',
381
480
  blue800: '#04355D',
481
+ brown: '#A6630C',
482
+ coral: '#C83243',
382
483
  green100: '#F3FCF6',
383
484
  green200: '#D4F7DF',
384
485
  green300: '#B1ECC5',
@@ -387,15 +488,22 @@ const colorPalettePrimary = {
387
488
  green600: '#277C43',
388
489
  green700: '#115026',
389
490
  green800: '#093919',
390
- white: '#FFFFFF',
391
- grey100: '#F2F5F7',
392
- grey200: '#E4ECF1',
393
- grey300: '#CDDAE5',
394
- grey400: '#BDCDDB',
395
- grey500: '#8196A7',
396
- grey600: '#5D7283',
397
- grey700: '#44535F',
398
- grey800: '#1F272D',
491
+ grey050: '#F6F7F9',
492
+ grey100: '#E8ECF0',
493
+ grey200: '#D1D9E1',
494
+ grey300: '#C0CDD8',
495
+ grey350: '#92A4B3',
496
+ grey400: '#8396A5',
497
+ grey500: '#5F7281',
498
+ grey600: '#445461',
499
+ grey650: '#37444F',
500
+ grey700: '#1F272D',
501
+ grey800: '#11171C',
502
+ indigo: '#434A93',
503
+ lemon: '#FACB66',
504
+ lime: '#308613',
505
+ pink: '#B45091',
506
+ purple: '#8A63BF',
399
507
  red100: '#FFF5F7',
400
508
  red200: '#FDE2E8',
401
509
  red300: '#FBD0D8',
@@ -404,6 +512,9 @@ const colorPalettePrimary = {
404
512
  red600: '#C82D4C',
405
513
  red700: '#9E102C',
406
514
  red800: '#630316',
515
+ teal: '#04867D',
516
+ turquoise: '#137DAE',
517
+ white: '#FFFFFF',
407
518
  yellow100: '#FFF9EB',
408
519
  yellow200: '#FCEACA',
409
520
  yellow300: '#F8D4A5',
@@ -413,283 +524,292 @@ const colorPalettePrimary = {
413
524
  yellow700: '#93320B',
414
525
  yellow800: '#5F1B02'
415
526
  };
416
- const newGreys = {
417
- grey100: '#F8F8F8',
418
- grey200: '#E8E8E8',
419
- grey300: '#D0D0D0',
420
- grey400: '#AFAFAF',
421
- grey500: '#969696',
422
- grey600: '#727272',
423
- grey700: '#403F3F',
424
- grey800: '#181818'
425
- };
426
- const colorPaletteSecondary = {
427
- brown: '#A6630C',
428
- coral: '#C83243',
429
- charcoal: colorPalettePrimary.grey600,
430
- indigo: '#434A93',
431
- lemon: '#FACB66',
432
- lime: '#308613',
433
- pink: '#B45091',
434
- purple: '#8A63BF',
435
- teal: '#04867D',
436
- turquoise: '#157CBC'
437
- };
438
- const lightColorList = {
439
- backgroundPrimary: colorPalettePrimary.white,
440
- actionDangerPrimaryBackgroundDefault: colorPalettePrimary.red600,
441
- actionDangerPrimaryBackgroundHover: colorPalettePrimary.red700,
442
- actionDangerPrimaryBackgroundPress: colorPalettePrimary.red800,
443
- actionDangerDefaultBackgroundDefault: chroma(colorPalettePrimary.red600).alpha(0).hex(),
444
- actionDangerDefaultBackgroundHover: chroma(colorPalettePrimary.red600).alpha(0.08).hex(),
445
- actionDangerDefaultBackgroundPress: chroma(colorPalettePrimary.red600).alpha(0.16).hex(),
446
- actionDangerDefaultBorderDefault: colorPalettePrimary.red600,
447
- actionDangerDefaultBorderHover: colorPalettePrimary.red700,
448
- actionDangerDefaultBorderPress: colorPalettePrimary.red800,
449
- actionDangerDefaultTextDefault: colorPalettePrimary.red600,
450
- actionDangerDefaultTextHover: colorPalettePrimary.red700,
451
- actionDangerDefaultTextPress: colorPalettePrimary.red800,
452
- actionDefaultBackgroundDefault: chroma(colorPalettePrimary.blue800).alpha(0).hex(),
453
- actionDefaultBackgroundHover: chroma(colorPalettePrimary.blue600).alpha(0.08).hex(),
454
- actionDefaultBackgroundPress: chroma(colorPalettePrimary.blue600).alpha(0.16).hex(),
455
- actionDefaultBorderDefault: colorPalettePrimary.grey300,
456
- actionDefaultBorderFocus: colorPalettePrimary.blue600,
457
- actionDefaultBorderHover: colorPalettePrimary.blue700,
458
- actionDefaultBorderPress: colorPalettePrimary.blue800,
459
- actionDefaultTextDefault: colorPalettePrimary.grey800,
460
- actionDefaultTextHover: colorPalettePrimary.blue700,
461
- actionDefaultTextPress: colorPalettePrimary.blue800,
462
- actionDisabledBackground: colorPalettePrimary.grey200,
463
- actionDisabledText: colorPalettePrimary.grey400,
464
- actionPrimaryBackgroundDefault: colorPalettePrimary.blue600,
465
- actionPrimaryBackgroundHover: colorPalettePrimary.blue700,
466
- actionPrimaryBackgroundPress: colorPalettePrimary.blue800,
467
- actionPrimaryTextDefault: colorPalettePrimary.white,
468
- actionPrimaryTextHover: colorPalettePrimary.white,
469
- actionPrimaryTextPress: colorPalettePrimary.white,
470
- actionTertiaryBackgroundDefault: chroma(colorPalettePrimary.blue600).alpha(0).hex(),
471
- actionTertiaryBackgroundHover: chroma(colorPalettePrimary.blue600).alpha(0.08).hex(),
472
- actionTertiaryBackgroundPress: chroma(colorPalettePrimary.blue600).alpha(0.16).hex(),
473
- actionTertiaryTextDefault: colorPalettePrimary.blue600,
474
- actionTertiaryTextHover: colorPalettePrimary.blue700,
475
- actionTertiaryTextPress: colorPalettePrimary.blue800,
476
- backgroundDanger: chroma(colorPalettePrimary.red100).alpha(0.08).hex(),
477
- backgroundSecondary: colorPalettePrimary.grey100,
478
- backgroundWarning: chroma(colorPalettePrimary.yellow100).alpha(0.08).hex(),
479
- backgroundValidationDanger: colorPalettePrimary.red100,
480
- backgroundValidationSuccess: colorPalettePrimary.blue100,
481
- backgroundValidationWarning: colorPalettePrimary.yellow100,
482
- border: colorPalettePrimary.grey300,
483
- borderDecorative: colorPalettePrimary.grey200,
484
- borderValidationDanger: colorPalettePrimary.red300,
485
- borderValidationWarning: colorPalettePrimary.yellow300,
486
- textPrimary: colorPalettePrimary.grey800,
487
- textSecondary: colorPalettePrimary.grey600,
488
- textPlaceholder: colorPalettePrimary.grey400,
489
- textValidationDanger: colorPalettePrimary.red600,
490
- textValidationSuccess: colorPalettePrimary.green600,
491
- textValidationWarning: colorPalettePrimary.yellow600,
492
- textValidationInfo: colorPalettePrimary.grey600,
493
- overlayOverlay: chroma(colorPalettePrimary.grey100).alpha(0.72).hex(),
494
- // Tags
495
- tagDefault: chroma(colorPalettePrimary.grey600).alpha(0.08).hex(),
496
- tagBrown: colorPaletteSecondary.brown,
497
- tagCoral: colorPaletteSecondary.coral,
498
- tagCharcoal: colorPaletteSecondary.charcoal,
499
- tagIndigo: colorPaletteSecondary.indigo,
500
- tagLemon: colorPaletteSecondary.lemon,
501
- tagLime: colorPaletteSecondary.lime,
502
- tagPink: colorPaletteSecondary.pink,
503
- tagPurple: colorPaletteSecondary.purple,
504
- tagTeal: colorPaletteSecondary.teal,
505
- tagTurquoise: colorPaletteSecondary.turquoise,
506
- tagText: colorPalettePrimary.white,
507
- tagHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
508
- tagPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
509
- tagIconHover: chroma(colorPalettePrimary.white).alpha(0.8).hex(),
510
- tagIconPress: chroma(colorPalettePrimary.white).alpha(0.76).hex(),
511
- // Typography
512
- typographyCodeBg: chroma(colorPalettePrimary.grey600).alpha(0.08).hex(),
513
- // Table
514
- tableRowHover: chroma(colorPalettePrimary.grey600).alpha(0.04).hex(),
515
- tooltipBackgroundTooltip: colorPalettePrimary.grey800
516
- };
527
+
528
+ // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
529
+
517
530
  const darkColorList = {
518
- actionDangerPrimaryBackgroundDefault: chroma(colorPalettePrimary.red400).alpha(0.84).hex(),
519
- actionDangerPrimaryBackgroundHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
520
- actionDangerPrimaryBackgroundPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
521
- actionDangerDefaultBackgroundDefault: chroma(colorPalettePrimary.red400).alpha(0).hex(),
522
- actionDangerDefaultBackgroundHover: chroma(colorPalettePrimary.red400).alpha(0.08).hex(),
523
- actionDangerDefaultBackgroundPress: chroma(colorPalettePrimary.red400).alpha(0.16).hex(),
524
- actionDangerDefaultBorderDefault: colorPalettePrimary.red400,
525
- actionDangerDefaultBorderHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
526
- actionDangerDefaultBorderPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
527
- actionDangerDefaultTextDefault: colorPalettePrimary.red400,
528
- actionDangerDefaultTextHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
529
- actionDangerDefaultTextPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
530
- actionDefaultBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0).hex(),
531
- actionDefaultBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
532
- actionDefaultBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
533
- actionDefaultBorderDefault: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
534
- actionDefaultBorderFocus: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
535
- actionDefaultBorderHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
536
- actionDefaultBorderPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
537
- actionDefaultTextDefault: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
538
- actionDefaultTextHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
539
- actionDefaultTextPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
540
- actionDisabledBackground: chroma(colorPalettePrimary.white).alpha(0.24).hex(),
541
- actionDisabledText: chroma(colorPalettePrimary.white).alpha(0.4).hex(),
542
- actionPrimaryBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
543
- actionPrimaryBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
544
- actionPrimaryBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
545
- actionPrimaryTextDefault: colorPalettePrimary.grey800,
546
- actionPrimaryTextHover: colorPalettePrimary.grey800,
547
- actionPrimaryTextPress: colorPalettePrimary.grey800,
548
- actionTertiaryBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0).hex(),
549
- actionTertiaryBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
550
- actionTertiaryBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
551
- actionTertiaryTextDefault: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
552
- actionTertiaryTextHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
553
- actionTertiaryTextPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
554
- backgroundPrimary: colorPalettePrimary.grey800,
555
- backgroundSecondary: '#283035',
556
- backgroundValidationDanger: 'transparent',
557
- backgroundValidationSuccess: 'transparent',
558
- backgroundValidationWarning: 'transparent',
559
- border: chroma(colorPalettePrimary.white).alpha(0.48).hex(),
560
- borderDecorative: chroma(colorPalettePrimary.white).alpha(0.24).hex(),
561
- borderValidationDanger: colorPalettePrimary.red300,
562
- borderValidationWarning: colorPalettePrimary.yellow300,
563
- textPrimary: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
564
- textSecondary: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
565
- textPlaceholder: chroma(colorPalettePrimary.grey400).alpha(0.84).hex(),
566
- textValidationDanger: chroma(colorPalettePrimary.red400).alpha(0.84).hex(),
567
- textValidationSuccess: chroma(colorPalettePrimary.green400).alpha(0.84).hex(),
568
- textValidationWarning: chroma(colorPalettePrimary.yellow400).alpha(0.84).hex(),
569
- textValidationInfo: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
570
- overlayOverlay: chroma(colorPalettePrimary.grey800).alpha(0.72).hex(),
571
- // Tags
572
- tagDefault: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
573
- tagBrown: chroma(colorPaletteSecondary.brown).alpha(0.84).hex(),
574
- tagCoral: chroma(colorPaletteSecondary.coral).alpha(0.84).hex(),
575
- tagCharcoal: chroma(colorPaletteSecondary.charcoal).alpha(0.84).hex(),
576
- tagIndigo: chroma(colorPaletteSecondary.indigo).alpha(0.84).hex(),
577
- tagLemon: chroma(colorPaletteSecondary.lemon).alpha(0.84).hex(),
578
- tagLime: chroma(colorPaletteSecondary.lime).alpha(0.84).hex(),
579
- tagPink: chroma(colorPaletteSecondary.pink).alpha(0.84).hex(),
580
- tagPurple: chroma(colorPaletteSecondary.purple).alpha(0.84).hex(),
581
- tagTeal: chroma(colorPaletteSecondary.teal).alpha(0.84).hex(),
582
- tagTurquoise: chroma(colorPaletteSecondary.turquoise).alpha(0.84).hex(),
583
- tagText: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
584
- tagHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
585
- tagPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
586
- tagIconHover: chroma(colorPalettePrimary.white).alpha(0.8).hex(),
587
- tagIconPress: chroma(colorPalettePrimary.white).alpha(0.76).hex(),
588
- // Typography
589
- typographyCodeBg: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
590
- // Table
591
- tableRowHover: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
592
- tooltipBackgroundTooltip: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
593
- // Missing in list
594
- backgroundDanger: 'rgba(200,45,76,0.08)',
595
- backgroundWarning: 'rgba(222,121,33,0.08)'
596
- };
597
- const secondaryColorsUsingNewGreys = {
598
- charcoal: newGreys.grey600
599
- };
600
- const lightColorsUsingNewGreys = {
601
- actionDefaultBorderDefault: newGreys.grey300,
602
- actionDefaultTextDefault: newGreys.grey800,
603
- actionDisabledBackground: newGreys.grey200,
604
- actionDisabledText: newGreys.grey400,
605
- backgroundSecondary: newGreys.grey100,
606
- border: newGreys.grey300,
607
- borderDecorative: newGreys.grey200,
608
- textPrimary: newGreys.grey800,
609
- textSecondary: newGreys.grey600,
610
- textPlaceholder: newGreys.grey400,
611
- textValidationInfo: newGreys.grey600,
612
- overlayOverlay: chroma(newGreys.grey100).alpha(0.72).hex(),
613
- tagDefault: chroma(newGreys.grey600).alpha(0.08).hex(),
614
- tagCharcoal: newGreys.grey600,
615
- typographyCodeBg: chroma(newGreys.grey600).alpha(0.08).hex(),
616
- tableRowHover: chroma(newGreys.grey600).alpha(0.04).hex(),
617
- tooltipBackgroundTooltip: newGreys.grey800
618
- };
619
- const darkColorsUsingNewGreys = {
620
- actionPrimaryTextDefault: newGreys.grey800,
621
- actionPrimaryTextHover: newGreys.grey800,
622
- actionPrimaryTextPress: newGreys.grey800,
623
- backgroundPrimary: newGreys.grey800,
624
- backgroundSecondary: newGreys.grey700,
625
- textPlaceholder: chroma(newGreys.grey400).alpha(0.84).hex(),
626
- overlayOverlay: chroma(newGreys.grey800).alpha(0.72).hex(),
627
- tagCharcoal: chroma(newGreys.grey600).alpha(0.84).hex()
531
+ actionDangerDefaultBackgroundDefault: 'rgba(247, 146, 166, 0.0000)',
532
+ actionDangerDefaultBackgroundHover: 'rgba(247, 146, 166, 0.0800)',
533
+ actionDangerDefaultBackgroundPress: 'rgba(247, 146, 166, 0.1600)',
534
+ actionDangerDefaultBorderDefault: primitiveColors.red500,
535
+ actionDangerDefaultBorderHover: primitiveColors.red400,
536
+ actionDangerDefaultBorderPress: primitiveColors.red300,
537
+ actionDangerDefaultTextDefault: primitiveColors.red500,
538
+ actionDangerDefaultTextHover: primitiveColors.red400,
539
+ actionDangerDefaultTextPress: primitiveColors.red300,
540
+ actionDangerPrimaryBackgroundDefault: primitiveColors.red500,
541
+ actionDangerPrimaryBackgroundHover: primitiveColors.red400,
542
+ actionDangerPrimaryBackgroundPress: primitiveColors.red300,
543
+ actionDangerPrimaryText: primitiveColors.grey800,
544
+ actionDefaultBackgroundDefault: 'rgba(138, 202, 255, 0.0000)',
545
+ actionDefaultBackgroundHover: 'rgba(138, 202, 255, 0.0800)',
546
+ actionDefaultBackgroundPress: 'rgba(138, 202, 255, 0.1600)',
547
+ actionDefaultBorderDefault: primitiveColors.grey650,
548
+ actionDefaultBorderFocus: primitiveColors.blue400,
549
+ actionDefaultBorderHover: primitiveColors.blue400,
550
+ actionDefaultBorderPress: primitiveColors.blue300,
551
+ actionDefaultIconDefault: primitiveColors.grey350,
552
+ actionDefaultIconHover: primitiveColors.blue400,
553
+ actionDefaultIconPress: primitiveColors.blue300,
554
+ actionDefaultTextDefault: primitiveColors.grey100,
555
+ actionDefaultTextHover: primitiveColors.blue400,
556
+ actionDefaultTextPress: primitiveColors.blue300,
557
+ actionDisabledBackground: primitiveColors.grey650,
558
+ actionDisabledBorder: primitiveColors.grey600,
559
+ actionDisabledText: primitiveColors.grey500,
560
+ actionIconBackgroundDefault: 'rgba(255, 255, 255, 0.0000)',
561
+ actionIconBackgroundHover: 'rgba(255, 255, 255, 0.0800)',
562
+ actionIconBackgroundPress: 'rgba(255, 255, 255, 0.1600)',
563
+ actionIconIconDefault: primitiveColors.grey350,
564
+ actionIconIconHover: primitiveColors.grey300,
565
+ actionIconIconPress: primitiveColors.grey200,
566
+ actionLinkDefault: primitiveColors.blue500,
567
+ actionLinkHover: primitiveColors.blue400,
568
+ actionLinkPress: primitiveColors.blue300,
569
+ actionPrimaryBackgroundDefault: primitiveColors.blue500,
570
+ actionPrimaryBackgroundHover: primitiveColors.blue400,
571
+ actionPrimaryBackgroundPress: primitiveColors.blue300,
572
+ actionPrimaryIcon: primitiveColors.grey800,
573
+ actionPrimaryTextDefault: primitiveColors.grey800,
574
+ actionPrimaryTextHover: primitiveColors.grey800,
575
+ actionPrimaryTextPress: primitiveColors.grey800,
576
+ actionTertiaryBackgroundDefault: 'rgba(143, 205, 255, 0.0000)',
577
+ actionTertiaryBackgroundHover: 'rgba(143, 205, 255, 0.0800)',
578
+ actionTertiaryBackgroundPress: 'rgba(143, 205, 255, 0.1600)',
579
+ actionTertiaryIconDefault: primitiveColors.blue500,
580
+ actionTertiaryIconHover: primitiveColors.blue400,
581
+ actionTertiaryIconPress: primitiveColors.blue300,
582
+ actionTertiaryTextDefault: primitiveColors.blue500,
583
+ actionTertiaryTextHover: primitiveColors.blue400,
584
+ actionTertiaryTextPress: primitiveColors.blue300,
585
+ backgroundDanger: 'rgba(200, 45, 76, 0.1600)',
586
+ backgroundPrimary: primitiveColors.grey800,
587
+ backgroundSecondary: primitiveColors.grey700,
588
+ backgroundSuccess: 'rgba(39, 124, 67, 0.1600)',
589
+ backgroundWarning: 'rgba(190, 80, 30, 0.1600)',
590
+ border: primitiveColors.grey650,
591
+ borderAccessible: primitiveColors.grey300,
592
+ borderDanger: primitiveColors.red500,
593
+ borderWarning: primitiveColors.yellow500,
594
+ codeBackground: primitiveColors.grey650,
595
+ overlayOverlay: 'rgba(31, 38, 45, 0.7200)',
596
+ skeleton: 'rgba(144, 164, 181, 0.1600)',
597
+ tableBackgroundSelectedDefault: 'rgba(189, 205, 219, 0.0800)',
598
+ tableBackgroundSelectedHover: 'rgba(189, 205, 219, 0.1200)',
599
+ tableBackgroundUnselectedDefault: primitiveColors.grey800,
600
+ tableBackgroundUnselectedHover: 'rgba(189, 205, 219, 0.0400)',
601
+ tagBrown: 'rgba(166, 99, 12, 0.8600)',
602
+ tagCharcoal: 'rgba(68, 83, 95, 0.8600)',
603
+ tagCoral: 'rgba(200, 50, 67, 0.8600)',
604
+ tagDefault: primitiveColors.grey650,
605
+ tagHover: 'rgba(138, 202, 255, 0.0800)',
606
+ tagIconDefault: primitiveColors.grey350,
607
+ tagIconHover: primitiveColors.grey350,
608
+ tagIconPress: primitiveColors.grey350,
609
+ tagIndigo: 'rgba(67, 74, 147, 0.8600)',
610
+ tagInverse: primitiveColors.grey100,
611
+ tagLemon: 'rgba(250, 203, 102, 0.8600)',
612
+ tagLime: 'rgba(48, 134, 19, 0.8600)',
613
+ tagPink: 'rgba(180, 80, 145, 0.8600)',
614
+ tagPress: 'rgba(138, 202, 255, 0.1600)',
615
+ tagPurple: 'rgba(138, 99, 191, 0.8600)',
616
+ tagTeal: 'rgba(4, 134, 125, 0.8600)',
617
+ tagText: primitiveColors.grey100,
618
+ tagTurquoise: 'rgba(19, 125, 174, 0.8600)',
619
+ textPlaceholder: primitiveColors.grey400,
620
+ textPrimary: primitiveColors.grey100,
621
+ textSecondary: primitiveColors.grey350,
622
+ textValidationDanger: primitiveColors.red500,
623
+ textValidationSuccess: primitiveColors.green500,
624
+ textValidationWarning: primitiveColors.yellow500,
625
+ tooltipBackgroundTooltip: primitiveColors.grey300
628
626
  };
629
627
 
630
- /**
631
- * Provides access to http://go/safex flags from the frontend. Note that this is a temporary
632
- * workaround until direct `safex` imports are available.
633
- * @param flag The name of the flag to check
634
- * @param defaultValue The default value to return if the flag is not set
635
- * @returns
636
- */
637
- const safex = (flag, defaultValue) => {
638
- // Catching errors here, because we don't have type-safety to ensure
639
- // that `__debug__safex`'s API hasn't changed.
640
- try {
641
- const globalSafex = window.__debug__safex;
642
- return globalSafex ? globalSafex(flag, defaultValue) : defaultValue;
643
- } catch (e) {
644
- return defaultValue;
645
- }
628
+ // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
629
+
630
+ const lightColorList = {
631
+ actionDangerDefaultBackgroundDefault: 'rgba(200, 45, 76, 0.0000)',
632
+ actionDangerDefaultBackgroundHover: 'rgba(200, 45, 76, 0.0800)',
633
+ actionDangerDefaultBackgroundPress: 'rgba(200, 45, 76, 0.1600)',
634
+ actionDangerDefaultBorderDefault: primitiveColors.red600,
635
+ actionDangerDefaultBorderHover: primitiveColors.red700,
636
+ actionDangerDefaultBorderPress: primitiveColors.red800,
637
+ actionDangerDefaultTextDefault: primitiveColors.red600,
638
+ actionDangerDefaultTextHover: primitiveColors.red700,
639
+ actionDangerDefaultTextPress: primitiveColors.red800,
640
+ actionDangerPrimaryBackgroundDefault: primitiveColors.red600,
641
+ actionDangerPrimaryBackgroundHover: primitiveColors.red700,
642
+ actionDangerPrimaryBackgroundPress: primitiveColors.red800,
643
+ actionDangerPrimaryText: primitiveColors.white,
644
+ actionDefaultBackgroundDefault: 'rgba(34, 114, 180, 0.0000)',
645
+ actionDefaultBackgroundHover: 'rgba(34, 114, 180, 0.0800)',
646
+ actionDefaultBackgroundPress: 'rgba(34, 114, 180, 0.1600)',
647
+ actionDefaultBorderDefault: primitiveColors.grey300,
648
+ actionDefaultBorderFocus: primitiveColors.blue700,
649
+ actionDefaultBorderHover: primitiveColors.blue600,
650
+ actionDefaultBorderPress: primitiveColors.blue800,
651
+ actionDefaultIconDefault: primitiveColors.grey600,
652
+ actionDefaultIconHover: primitiveColors.blue700,
653
+ actionDefaultIconPress: primitiveColors.blue800,
654
+ actionDefaultTextDefault: primitiveColors.grey800,
655
+ actionDefaultTextHover: primitiveColors.blue700,
656
+ actionDefaultTextPress: primitiveColors.blue800,
657
+ actionDisabledBackground: primitiveColors.grey100,
658
+ actionDisabledBorder: primitiveColors.grey200,
659
+ actionDisabledText: primitiveColors.grey350,
660
+ actionIconBackgroundDefault: 'rgba(34, 114, 180, 0.0000)',
661
+ actionIconBackgroundHover: 'rgba(34, 114, 180, 0.0800)',
662
+ actionIconBackgroundPress: 'rgba(34, 114, 180, 0.1600)',
663
+ actionIconIconDefault: primitiveColors.grey600,
664
+ actionIconIconHover: primitiveColors.blue700,
665
+ actionIconIconPress: primitiveColors.blue800,
666
+ actionLinkDefault: primitiveColors.blue600,
667
+ actionLinkHover: primitiveColors.blue700,
668
+ actionLinkPress: primitiveColors.blue800,
669
+ actionPrimaryBackgroundDefault: primitiveColors.blue600,
670
+ actionPrimaryBackgroundHover: primitiveColors.blue700,
671
+ actionPrimaryBackgroundPress: primitiveColors.blue800,
672
+ actionPrimaryIcon: primitiveColors.white,
673
+ actionPrimaryTextDefault: primitiveColors.white,
674
+ actionPrimaryTextHover: primitiveColors.white,
675
+ actionPrimaryTextPress: primitiveColors.white,
676
+ actionTertiaryBackgroundDefault: 'rgba(34, 114, 180, 0.0000)',
677
+ actionTertiaryBackgroundHover: 'rgba(34, 114, 180, 0.0800)',
678
+ actionTertiaryBackgroundPress: 'rgba(34, 114, 180, 0.1600)',
679
+ actionTertiaryIconDefault: primitiveColors.blue600,
680
+ actionTertiaryIconHover: primitiveColors.blue700,
681
+ actionTertiaryIconPress: primitiveColors.blue800,
682
+ actionTertiaryTextDefault: primitiveColors.blue600,
683
+ actionTertiaryTextHover: primitiveColors.blue700,
684
+ actionTertiaryTextPress: primitiveColors.blue800,
685
+ backgroundDanger: primitiveColors.red100,
686
+ backgroundPrimary: primitiveColors.white,
687
+ backgroundSecondary: primitiveColors.grey050,
688
+ backgroundSuccess: primitiveColors.green100,
689
+ backgroundWarning: primitiveColors.yellow100,
690
+ border: primitiveColors.grey200,
691
+ borderAccessible: primitiveColors.grey500,
692
+ borderDanger: primitiveColors.red300,
693
+ borderWarning: primitiveColors.yellow300,
694
+ codeBackground: 'rgba(68, 83, 95, 0.0800)',
695
+ overlayOverlay: 'rgba(64, 63, 63, 0.7200)',
696
+ skeleton: 'rgba(144, 164, 181, 0.1600)',
697
+ tableBackgroundSelectedDefault: 'rgba(68, 83, 95, 0.0800)',
698
+ tableBackgroundSelectedHover: 'rgba(68, 83, 95, 0.1200)',
699
+ tableBackgroundUnselectedDefault: primitiveColors.white,
700
+ tableBackgroundUnselectedHover: 'rgba(68, 83, 95, 0.0400)',
701
+ tagBrown: primitiveColors.brown,
702
+ tagCharcoal: primitiveColors.grey600,
703
+ tagCoral: primitiveColors.coral,
704
+ tagDefault: primitiveColors.grey100,
705
+ tagHover: 'rgba(34, 114, 180, 0.0800)',
706
+ tagIconDefault: primitiveColors.grey600,
707
+ tagIconHover: primitiveColors.grey600,
708
+ tagIconPress: primitiveColors.grey600,
709
+ tagIndigo: primitiveColors.indigo,
710
+ tagInverse: primitiveColors.grey800,
711
+ tagLemon: primitiveColors.lemon,
712
+ tagLime: primitiveColors.lime,
713
+ tagPink: primitiveColors.pink,
714
+ tagPress: 'rgba(34, 114, 180, 0.1600)',
715
+ tagPurple: primitiveColors.purple,
716
+ tagTeal: primitiveColors.teal,
717
+ tagText: primitiveColors.white,
718
+ tagTurquoise: primitiveColors.turquoise,
719
+ textPlaceholder: primitiveColors.grey400,
720
+ textPrimary: primitiveColors.grey800,
721
+ textSecondary: primitiveColors.grey600,
722
+ textValidationDanger: primitiveColors.red600,
723
+ textValidationSuccess: primitiveColors.green600,
724
+ textValidationWarning: primitiveColors.yellow600,
725
+ tooltipBackgroundTooltip: primitiveColors.grey800
646
726
  };
647
727
 
728
+ // Currently these are the same for both light and dark mode, but we may want to change this in the future.
729
+ const branded = {
730
+ /** For AI components, the top-oriented start color of gradient treatments. */
731
+ aiGradientStart: '#677FFD',
732
+ /** For AI components, the bottom-oriented end color of gradient treatments. */
733
+ aiGradientEnd: '#79BFF1'
734
+ };
648
735
  const darkColors = {
649
736
  ...darkColorList,
650
- ...colorPalettePrimary,
651
- ...colorPaletteSecondary
737
+ ...primitiveColors,
738
+ branded
652
739
  };
653
740
  const lightColors = {
654
741
  ...lightColorList,
655
- ...colorPalettePrimary,
656
- ...colorPaletteSecondary
742
+ ...primitiveColors,
743
+ branded
657
744
  };
658
745
  function getSemanticColors(isDarkMode) {
659
- const enableNewGreys = safex('databricks.fe.designsystem.enableNewGreys', false);
660
- const colorList = isDarkMode ? darkColors : lightColors;
661
- if (enableNewGreys) {
662
- return {
663
- ...colorList,
664
- ...newGreys,
665
- ...secondaryColorsUsingNewGreys,
666
- ...(isDarkMode ? darkColorsUsingNewGreys : lightColorsUsingNewGreys)
667
- };
668
- } else {
669
- return colorList;
670
- }
746
+ return isDarkMode ? darkColors : lightColors;
671
747
  }
672
748
 
673
- // TODO (FEINF-1674): Remove when removing USE_NEW_RADIO_STYLES
674
- /*
675
- Colors that need to be replaced by semantic colors.
676
- */
677
- const deprecatedColors = {
678
- // Radio Colors
679
- radioInteractiveAvailable: colorPalettePrimary.primary,
749
+ // When deprecating a color, add it to this object with a comment explaining why it's deprecated and a link to a JIRA ticket.
750
+ // Example: `@deprecated This color supports XXXX will be removed in an upcoming release (FEINF-1234).`
751
+ const deprecatedPrimitiveColors = {
752
+ /** @deprecated This was an alias to `primitiveColors.blue600`, please use that instead.
753
+ * If possible, please use an appropriate semantic color, such as `actionPrimaryBackgroundDefault`. */
754
+ primary: primitiveColors.blue600,
755
+ /** @deprecated This was an alias to `primitiveColors.grey600`, please use that instead.
756
+ * If possible, please use an appropriate semantic color, such as `actionPrimaryBackgroundHover`. */
757
+ charcoal: primitiveColors.grey600,
758
+ /** @deprecated This color supports legacy radio styles and will be removed in an upcoming release (FEINF-1674). */
759
+ radioInteractiveAvailable: primitiveColors.blue600,
760
+ /** @deprecated This color supports legacy radio styles and will be removed in an upcoming release (FEINF-1674). */
680
761
  radioInteractiveHover: '#186099',
762
+ /** @deprecated This color supports legacy radio styles and will be removed in an upcoming release (FEINF-1674). */
681
763
  radioInteractivePress: '#0D4F85',
764
+ /** @deprecated This color supports legacy radio styles and will be removed in an upcoming release (FEINF-1674). */
682
765
  radioDisabled: '#A2AEB8',
766
+ /** @deprecated This color supports legacy radio styles and will be removed in an upcoming release (FEINF-1674). */
683
767
  radioDefaultBorder: '#64727D',
768
+ /** @deprecated This color supports legacy radio styles and will be removed in an upcoming release (FEINF-1674). */
684
769
  radioDefaultBackground: '#FFFFFF',
770
+ /** @deprecated This color supports legacy radio styles and will be removed in an upcoming release (FEINF-1674). */
685
771
  radioInteractiveHoverSecondary: 'rgba(34, 115, 181, 0.08)',
686
- // Fade of Interactive Available
687
- radioInteractivePressSecondary: 'rgba(34, 115, 181, 0.16)' // Fade of Interactive Available
772
+ /** @deprecated This color supports legacy radio styles and will be removed in an upcoming release (FEINF-1674). */
773
+ radioInteractivePressSecondary: 'rgba(34, 115, 181, 0.16)'
774
+ };
775
+ const deprecatedSemanticColorsLight = {
776
+ /** @deprecated Use `backgroundDanger` (FEINF-xxxx) */
777
+ backgroundValidationDanger: lightColorList.backgroundDanger,
778
+ /** @deprecated Use `backgroundSuccess` (FEINF-xxxx) */
779
+ backgroundValidationSuccess: lightColorList.backgroundSuccess,
780
+ /** @deprecated Use `backgroundWarning` (FEINF-xxxx) */
781
+ backgroundValidationWarning: lightColorList.backgroundWarning,
782
+ /** @deprecated Use `border` (FEINF-xxxx) */
783
+ borderDecorative: lightColorList.border,
784
+ /** @deprecated Use `borderDanger` (FEINF-xxxx) */
785
+ borderValidationDanger: lightColorList.borderDanger,
786
+ /** @deprecated Use `borderWarning` (FEINF-xxxx) */
787
+ borderValidationWarning: lightColorList.borderWarning,
788
+ /** @deprecated Use `tableBackgroundUnselectedHover` (FEINF-xxxx) */
789
+ tableRowHover: lightColorList.tableBackgroundUnselectedHover,
790
+ /** @deprecated Use `textSecondary` (FEINF-xxxx) */
791
+ textValidationInfo: lightColorList.textSecondary,
792
+ /** @deprecated Use `codeBackground` (FEINF-xxxx) */
793
+ typographyCodeBg: lightColorList.codeBackground
794
+ };
795
+ const deprecatedSemanticColorsDark = {
796
+ backgroundValidationDanger: darkColorList.backgroundDanger,
797
+ backgroundValidationSuccess: darkColorList.backgroundSuccess,
798
+ backgroundValidationWarning: darkColorList.backgroundWarning,
799
+ borderDecorative: darkColorList.border,
800
+ borderValidationDanger: darkColorList.borderDanger,
801
+ borderValidationWarning: darkColorList.borderWarning,
802
+ tableRowHover: darkColorList.tableBackgroundUnselectedHover,
803
+ textValidationInfo: darkColorList.textSecondary,
804
+ typographyCodeBg: darkColorList.codeBackground
688
805
  };
689
806
 
807
+ // A static list of secondary colors; these are used as a limited palette of color options in component props, i.e. `color="lime"`.
808
+ // TODO: We should split primitive colors into primary and secondary colors, and automatically generate this list.
690
809
  function getColors(isDarkMode) {
691
810
  return {
692
- ...deprecatedColors,
811
+ ...deprecatedPrimitiveColors,
812
+ ...(isDarkMode ? deprecatedSemanticColorsDark : deprecatedSemanticColorsLight),
693
813
  ...getSemanticColors(isDarkMode)
694
814
  };
695
815
  }
@@ -971,21 +1091,36 @@ function useDesignSystemFlags() {
971
1091
  return context.flags;
972
1092
  }
973
1093
 
974
- const getIconEmotionStyles = theme => {
975
- return /*#__PURE__*/css({
976
- fontSize: theme.general.iconFontSize
977
- }, process.env.NODE_ENV === "production" ? "" : ";label:getIconEmotionStyles;");
978
- };
979
- const getIconValidationColor = (theme, color) => {
1094
+ const uniqueId = () => new Date().getTime() + Array(16).fill('').map(() => parseInt((Math.random() * 10).toString())).join('');
1095
+ function useUniqueId() {
1096
+ let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1097
+ return useState(() => `${prefix}-${uniqueId()}`)[0];
1098
+ }
1099
+
1100
+ const getIconVariantStyles = (theme, linearGradientId, color) => {
980
1101
  switch (color) {
981
1102
  case 'success':
982
- return theme.colors.textValidationSuccess;
1103
+ return {
1104
+ color: theme.colors.textValidationSuccess
1105
+ };
983
1106
  case 'warning':
984
- return theme.colors.textValidationWarning;
1107
+ return {
1108
+ color: theme.colors.textValidationWarning
1109
+ };
985
1110
  case 'danger':
986
- return theme.colors.textValidationDanger;
1111
+ return {
1112
+ color: theme.colors.textValidationDanger
1113
+ };
1114
+ case 'ai':
1115
+ return {
1116
+ 'svg *': {
1117
+ fill: `url(#${linearGradientId})`
1118
+ }
1119
+ };
987
1120
  default:
988
- return color;
1121
+ return {
1122
+ color: color
1123
+ };
989
1124
  }
990
1125
  };
991
1126
  const Icon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
@@ -999,6 +1134,7 @@ const Icon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
999
1134
  const {
1000
1135
  theme
1001
1136
  } = useDesignSystemTheme();
1137
+ const linearGradientId = useUniqueId('ai-linear-gradient');
1002
1138
  const MemoizedComponent = useMemo(() => Component ? _ref => {
1003
1139
  let {
1004
1140
  fill,
@@ -1007,20 +1143,43 @@ const Icon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
1007
1143
  return (
1008
1144
  // We don't rely on top-level fills for our colors. Fills are specified
1009
1145
  // with "currentColor" on children of the top-most svg.
1010
- jsx(Component, {
1011
- fill: "none",
1012
- ...iconProps
1146
+ jsxs(Fragment, {
1147
+ children: [jsx(Component, {
1148
+ fill: "none",
1149
+ ...iconProps
1150
+ }), color === 'ai' && jsx("svg", {
1151
+ width: "0",
1152
+ height: "0",
1153
+ viewBox: "0 0 0 0",
1154
+ css: visuallyHidden,
1155
+ children: jsx("defs", {
1156
+ children: jsxs("linearGradient", {
1157
+ id: linearGradientId,
1158
+ x2: "100%",
1159
+ y2: "100%",
1160
+ children: [jsx("stop", {
1161
+ offset: "0%",
1162
+ stopColor: theme.colors.branded.aiGradientStart
1163
+ }), jsx("stop", {
1164
+ offset: "100%",
1165
+ stopColor: theme.colors.branded.aiGradientEnd
1166
+ })]
1167
+ })
1168
+ })
1169
+ })]
1013
1170
  })
1014
1171
  );
1015
- } : undefined, [Component]);
1172
+ } : undefined, [Component, color, linearGradientId, theme]);
1016
1173
  return jsx(DesignSystemAntDConfigProvider, {
1017
1174
  children: jsx(AntDIcon, {
1018
1175
  ref: forwardedRef,
1019
1176
  "aria-hidden": "true",
1020
- css: getIconEmotionStyles(theme),
1177
+ css: /*#__PURE__*/css({
1178
+ fontSize: theme.general.iconFontSize,
1179
+ ...getIconVariantStyles(theme, linearGradientId, color)
1180
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Icon;"),
1021
1181
  component: MemoizedComponent,
1022
1182
  style: {
1023
- color: getIconValidationColor(theme, color),
1024
1183
  ...style
1025
1184
  },
1026
1185
  ...otherProps,
@@ -1320,35 +1479,6 @@ const FaceSmileIcon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
1320
1479
  FaceSmileIcon.displayName = 'FaceSmileIcon';
1321
1480
  var FaceSmileIcon$1 = FaceSmileIcon;
1322
1481
 
1323
- function SvgInfoIcon(props) {
1324
- return jsxs("svg", {
1325
- xmlns: "http://www.w3.org/2000/svg",
1326
- width: "1em",
1327
- height: "1em",
1328
- fill: "none",
1329
- viewBox: "0 0 16 16",
1330
- ...props,
1331
- children: [jsx("path", {
1332
- fill: "currentColor",
1333
- d: "M7.25 11V7h1.5v4h-1.5ZM8 4.5A.75.75 0 1 1 8 6a.75.75 0 0 1 0-1.5Z"
1334
- }), jsx("path", {
1335
- fill: "currentColor",
1336
- fillRule: "evenodd",
1337
- d: "M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z",
1338
- clipRule: "evenodd"
1339
- })]
1340
- });
1341
- }
1342
- const InfoIcon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
1343
- return jsx(Icon, {
1344
- ref: forwardedRef,
1345
- ...props,
1346
- component: SvgInfoIcon
1347
- });
1348
- });
1349
- InfoIcon.displayName = 'InfoIcon';
1350
- var InfoIcon$1 = InfoIcon;
1351
-
1352
1482
  function SvgLoadingIcon(props) {
1353
1483
  return jsx("svg", {
1354
1484
  xmlns: "http://www.w3.org/2000/svg",
@@ -1428,6 +1558,35 @@ const NewWindowIcon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
1428
1558
  NewWindowIcon.displayName = 'NewWindowIcon';
1429
1559
  var NewWindowIcon$1 = NewWindowIcon;
1430
1560
 
1561
+ function SvgWarningIcon(props) {
1562
+ return jsxs("svg", {
1563
+ xmlns: "http://www.w3.org/2000/svg",
1564
+ width: "1em",
1565
+ height: "1em",
1566
+ fill: "none",
1567
+ viewBox: "0 0 16 16",
1568
+ ...props,
1569
+ children: [jsx("path", {
1570
+ fill: "currentColor",
1571
+ d: "M7.25 10V6.5h1.5V10h-1.5ZM8 12.5A.75.75 0 1 0 8 11a.75.75 0 0 0 0 1.5Z"
1572
+ }), jsx("path", {
1573
+ fill: "currentColor",
1574
+ fillRule: "evenodd",
1575
+ d: "M8 1a.75.75 0 0 1 .649.374l7.25 12.5A.75.75 0 0 1 15.25 15H.75a.75.75 0 0 1-.649-1.126l7.25-12.5A.75.75 0 0 1 8 1Zm0 2.245L2.052 13.5h11.896L8 3.245Z",
1576
+ clipRule: "evenodd"
1577
+ })]
1578
+ });
1579
+ }
1580
+ const WarningIcon = /*#__PURE__*/forwardRef((props, forwardedRef) => {
1581
+ return jsx(Icon, {
1582
+ ref: forwardedRef,
1583
+ ...props,
1584
+ component: SvgWarningIcon
1585
+ });
1586
+ });
1587
+ WarningIcon.displayName = 'WarningIcon';
1588
+ var WarningIcon$1 = WarningIcon;
1589
+
1431
1590
  function getDefaultStyles(theme) {
1432
1591
  let loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1433
1592
  const defaultStyles = {
@@ -1583,6 +1742,108 @@ function getDisabledTertiaryStyles(theme) {
1583
1742
  };
1584
1743
  }
1585
1744
 
1745
+ let DesignSystemEventProviderComponentTypes = /*#__PURE__*/function (DesignSystemEventProviderComponentTypes) {
1746
+ DesignSystemEventProviderComponentTypes["Banner"] = "banner";
1747
+ DesignSystemEventProviderComponentTypes["Button"] = "button";
1748
+ DesignSystemEventProviderComponentTypes["Input"] = "input";
1749
+ return DesignSystemEventProviderComponentTypes;
1750
+ }({});
1751
+ let DesignSystemEventProviderAnalyticsEventTypes = /*#__PURE__*/function (DesignSystemEventProviderAnalyticsEventTypes) {
1752
+ DesignSystemEventProviderAnalyticsEventTypes["OnClick"] = "onClick";
1753
+ DesignSystemEventProviderAnalyticsEventTypes["OnView"] = "onView";
1754
+ DesignSystemEventProviderAnalyticsEventTypes["OnValueChange"] = "onValueChange";
1755
+ return DesignSystemEventProviderAnalyticsEventTypes;
1756
+ }({});
1757
+ const shouldTriggerCallback = (eventType, analyticsEvents) => {
1758
+ return analyticsEvents.includes(eventType);
1759
+ };
1760
+ const DefaultEmptyCallbacks = {
1761
+ callback: () => {}
1762
+ };
1763
+ const DesignSystemEventProviderContext = /*#__PURE__*/React__default.createContext(DefaultEmptyCallbacks);
1764
+
1765
+ /**
1766
+ * This gets the event provider, which is used to pass callbacks to the design system for events such as onClick, onView, and onValueChange.
1767
+ * If the value is undefined, then the expected behavior is to not emit any events.
1768
+ *
1769
+ * @returns DesignSystemEventProviderContextType
1770
+ */
1771
+ const useDesignSystemEventProviderContext = () => {
1772
+ return useContext(DesignSystemEventProviderContext);
1773
+ };
1774
+
1775
+ /**
1776
+ * NOTE: This is not suggested for direct usage from engineers, and should emit your own events.
1777
+ * See https://databricks.atlassian.net/wiki/spaces/UN/pages/2533556277/Usage+Logging+in+UI#Send-usage-logging-from-UI for more details.
1778
+ *
1779
+ * This gets the event provider component event type callbacks.
1780
+ * If context & componentId are not undefined, then it will check if the event is in analyticsEvents or the default analyticsEvents for that component.
1781
+ * If the context or componentId are undefined, then the expected behavior is to not emit any events.
1782
+ *
1783
+ * @returns Object of event callbacks
1784
+ */
1785
+ const useDesignSystemEventComponentCallbacks = _ref => {
1786
+ let {
1787
+ componentType,
1788
+ componentId,
1789
+ analyticsEvents
1790
+ } = _ref;
1791
+ const context = useDesignSystemEventProviderContext();
1792
+ const callbacks = useMemo(() => {
1793
+ if (context === DefaultEmptyCallbacks || componentId === undefined) {
1794
+ return {
1795
+ onClick: () => {},
1796
+ onValueChange: () => {},
1797
+ onView: () => {}
1798
+ };
1799
+ }
1800
+ return {
1801
+ onClick: () => {
1802
+ if (shouldTriggerCallback(DesignSystemEventProviderAnalyticsEventTypes.OnClick, analyticsEvents)) {
1803
+ context.callback(DesignSystemEventProviderAnalyticsEventTypes.OnClick, componentType, componentId);
1804
+ }
1805
+ },
1806
+ onValueChange: () => {
1807
+ if (shouldTriggerCallback(DesignSystemEventProviderAnalyticsEventTypes.OnValueChange, analyticsEvents)) {
1808
+ context.callback(DesignSystemEventProviderAnalyticsEventTypes.OnValueChange, componentType, componentId);
1809
+ }
1810
+ },
1811
+ onView: () => {
1812
+ if (shouldTriggerCallback(DesignSystemEventProviderAnalyticsEventTypes.OnView, analyticsEvents)) {
1813
+ context.callback(DesignSystemEventProviderAnalyticsEventTypes.OnView, componentType, componentId);
1814
+ }
1815
+ }
1816
+ };
1817
+ }, [context, componentType, componentId, analyticsEvents]);
1818
+ return callbacks;
1819
+ };
1820
+
1821
+ /**
1822
+ * NOTE: This is not suggested for direct usage from engineers, and should use RecordEventContext instead.
1823
+ * See https://databricks.atlassian.net/wiki/spaces/UN/pages/2533556277/Usage+Logging+in+UI#Send-usage-logging-from-UI for more details.
1824
+ *
1825
+ * This is the Design System Event Context Provider, and is only used to pass callbacks to the design system for events such as onClick, onView, and onValueChange.
1826
+ *
1827
+ * @param children Children react elements
1828
+ * @param callback The event callback function
1829
+ * @returns Design System Event Context Provider with the children inside
1830
+ */
1831
+ function DesignSystemEventProvider(_ref2) {
1832
+ let {
1833
+ children,
1834
+ callback
1835
+ } = _ref2;
1836
+ const contextValue = useMemo(() => {
1837
+ return {
1838
+ callback
1839
+ };
1840
+ }, [callback]);
1841
+ return jsx(DesignSystemEventProviderContext.Provider, {
1842
+ value: contextValue,
1843
+ children: children
1844
+ });
1845
+ }
1846
+
1586
1847
  // Use Symbol to correctly handled null/undefined as stable values
1587
1848
  const NOT_INITIALIZED = Symbol('NOT_INITIALIZED');
1588
1849
 
@@ -1716,6 +1977,24 @@ const Spinner = _ref => {
1716
1977
  );
1717
1978
  };
1718
1979
 
1980
+ /**
1981
+ * Provides access to http://go/safex flags from the frontend. Note that this is a temporary
1982
+ * workaround until direct `safex` imports are available.
1983
+ * @param flag The name of the flag to check
1984
+ * @param defaultValue The default value to return if the flag is not set
1985
+ * @returns
1986
+ */
1987
+ const safex = (flag, defaultValue) => {
1988
+ // Catching errors here, because we don't have type-safety to ensure
1989
+ // that `__debug__safex`'s API hasn't changed.
1990
+ try {
1991
+ const globalSafex = window.__debug__safex;
1992
+ return globalSafex ? globalSafex(flag, defaultValue) : defaultValue;
1993
+ } catch (e) {
1994
+ return defaultValue;
1995
+ }
1996
+ };
1997
+
1719
1998
  function getEndIconClsName(theme) {
1720
1999
  return `${theme.general.iconfontCssPrefix}-btn-end-icon`;
1721
2000
  }
@@ -1732,7 +2011,8 @@ const getButtonEmotionStyles = _ref => {
1732
2011
  type,
1733
2012
  isFlex,
1734
2013
  useFocusPseudoClass,
1735
- forceIconStyles
2014
+ forceIconStyles,
2015
+ danger
1736
2016
  } = _ref;
1737
2017
  const clsIcon = `.${theme.general.iconfontCssPrefix}`;
1738
2018
  const clsEndIcon = `.${getEndIconClsName(theme)}`;
@@ -1909,10 +2189,10 @@ const getButtonEmotionStyles = _ref => {
1909
2189
  ...iconCss,
1910
2190
  marginLeft: theme.spacing.sm
1911
2191
  },
1912
- ...(!type && {
2192
+ ...(!type && !danger && {
1913
2193
  [`&:enabled:not(:hover):not(:active) > ${clsIcon}`]: inactiveIconCss
1914
2194
  }),
1915
- ...(!type && {
2195
+ ...(!type && !danger && {
1916
2196
  [`&:enabled:not(:hover):not(:active) > ${endIconCssSelector}`]: inactiveIconCss
1917
2197
  }),
1918
2198
  // Disable animations
@@ -1925,10 +2205,16 @@ const getButtonEmotionStyles = _ref => {
1925
2205
  ...tertiaryColors,
1926
2206
  color: theme.colors.textSecondary,
1927
2207
  '&:hover > .anticon': {
1928
- color: tertiaryColors['&:hover'].color
2208
+ color: tertiaryColors['&:hover'].color,
2209
+ ...(danger && {
2210
+ color: theme.colors.actionDangerDefaultTextHover
2211
+ })
1929
2212
  },
1930
2213
  '&:active > .anticon': {
1931
- color: tertiaryColors['&:active'].color
2214
+ color: tertiaryColors['&:active'].color,
2215
+ ...(danger && {
2216
+ color: theme.colors.actionDangerDefaultTextPress
2217
+ })
1932
2218
  },
1933
2219
  ...(loading && {
1934
2220
  '&&, &:hover, &:active': {
@@ -1937,7 +2223,10 @@ const getButtonEmotionStyles = _ref => {
1937
2223
  })
1938
2224
  },
1939
2225
  [`&:enabled:not(${classLink}) > .anticon`]: {
1940
- color: theme.colors.textSecondary
2226
+ color: theme.colors.textSecondary,
2227
+ ...(danger && {
2228
+ color: theme.colors.actionDangerDefaultTextDefault
2229
+ })
1941
2230
  },
1942
2231
  ...(isAnchor && {
1943
2232
  lineHeight: `${theme.general.heightSm}px`,
@@ -2026,6 +2315,8 @@ const Button = /* #__PURE__ */(() => {
2026
2315
  dangerouslySetForceIconStyles,
2027
2316
  dangerouslyUseFocusPseudoClass,
2028
2317
  dangerouslyAppendWrapperCss,
2318
+ componentId,
2319
+ analyticsEvents,
2029
2320
  ...props
2030
2321
  } = _ref2;
2031
2322
  const {
@@ -2035,6 +2326,11 @@ const Button = /* #__PURE__ */(() => {
2035
2326
  const {
2036
2327
  USE_FLEX_BUTTON: flexOverride
2037
2328
  } = useDesignSystemFlags();
2329
+ const eventContext = useDesignSystemEventComponentCallbacks({
2330
+ componentType: DesignSystemEventProviderComponentTypes.Button,
2331
+ componentId,
2332
+ analyticsEvents: analyticsEvents !== null && analyticsEvents !== void 0 ? analyticsEvents : [DesignSystemEventProviderAnalyticsEventTypes.OnClick]
2333
+ });
2038
2334
  const flexSafex = safex('databricks.fe.designsystem.useFlexButtonStyles', false);
2039
2335
  const isFlex = flexOverride || flexSafex;
2040
2336
  const clsEndIcon = getEndIconClsName(theme);
@@ -2059,6 +2355,7 @@ const Button = /* #__PURE__ */(() => {
2059
2355
  if (loading) {
2060
2356
  return;
2061
2357
  }
2358
+ eventContext.onClick();
2062
2359
  onClick === null || onClick === void 0 || onClick(event);
2063
2360
  };
2064
2361
  const loadingSpinner = jsx(Spinner, {
@@ -2534,90 +2831,6 @@ const Typography = /* #__PURE__ */(() => {
2534
2831
  return Typography;
2535
2832
  })();
2536
2833
 
2537
- const uniqueId = () => new Date().getTime() + Array(16).fill('').map(() => parseInt((Math.random() * 10).toString())).join('');
2538
- function useUniqueId() {
2539
- let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
2540
- return useState(() => `${prefix}-${uniqueId()}`)[0];
2541
- }
2542
-
2543
- const Tooltip = _ref => {
2544
- let {
2545
- children,
2546
- title,
2547
- placement = 'top',
2548
- dataTestId,
2549
- dangerouslySetAntdProps,
2550
- silenceScreenReader = false,
2551
- useAsLabel = false,
2552
- ...props
2553
- } = _ref;
2554
- const {
2555
- theme
2556
- } = useDesignSystemTheme();
2557
- const id = useUniqueId('dubois-tooltip-component-');
2558
- if (!title) {
2559
- return jsx(React__default.Fragment, {
2560
- children: children
2561
- });
2562
- }
2563
- const titleProps = silenceScreenReader ? {} : {
2564
- 'aria-live': 'polite',
2565
- 'aria-relevant': 'additions'
2566
- };
2567
- if (dataTestId) {
2568
- // TODO FEINF-1337 - this should turn into data-testid
2569
- titleProps['data-test-id'] = dataTestId;
2570
- }
2571
- const liveTitle = title && /*#__PURE__*/React__default.isValidElement(title) ? /*#__PURE__*/React__default.cloneElement(title, titleProps) : jsx("span", {
2572
- ...titleProps,
2573
- children: title
2574
- });
2575
- const ariaProps = {
2576
- [useAsLabel ? 'aria-labelledby' : 'aria-describedby']: id,
2577
- 'aria-hidden': false
2578
- };
2579
- const childWithProps = /*#__PURE__*/React__default.isValidElement(children) ? /*#__PURE__*/React__default.cloneElement(children, {
2580
- ...ariaProps,
2581
- ...children.props
2582
- }) : _isNil(children) ? children : jsx("span", {
2583
- ...ariaProps,
2584
- children: children
2585
- });
2586
- const {
2587
- overlayInnerStyle,
2588
- overlayStyle,
2589
- ...delegatedDangerouslySetAntdProps
2590
- } = dangerouslySetAntdProps || {};
2591
- return jsx(DesignSystemAntDConfigProvider, {
2592
- children: jsx(Tooltip$1, {
2593
- id: id,
2594
- title: liveTitle,
2595
- placement: placement
2596
- // Always trigger on hover and focus
2597
- ,
2598
- trigger: ['hover', 'focus'],
2599
- overlayInnerStyle: {
2600
- backgroundColor: '#2F3941',
2601
- lineHeight: '22px',
2602
- padding: '4px 8px',
2603
- boxShadow: theme.general.shadowLow,
2604
- ...overlayInnerStyle,
2605
- ...getDarkModePortalStyles(theme)
2606
- },
2607
- overlayStyle: {
2608
- zIndex: theme.options.zIndexBase + 70,
2609
- ...overlayStyle
2610
- },
2611
- css: /*#__PURE__*/css({
2612
- ...getAnimationCss(theme.options.enableAnimation)
2613
- }, process.env.NODE_ENV === "production" ? "" : ";label:Tooltip;"),
2614
- ...delegatedDangerouslySetAntdProps,
2615
- ...props,
2616
- children: childWithProps
2617
- })
2618
- });
2619
- };
2620
-
2621
2834
  const getInputGroupStyling = (clsPrefix, theme) => {
2622
2835
  const inputClass = `.${clsPrefix}-input`;
2623
2836
  const buttonClass = `.${clsPrefix}-btn`;
@@ -2641,7 +2854,7 @@ const getInputGroupStyling = (clsPrefix, theme) => {
2641
2854
  }
2642
2855
  }, process.env.NODE_ENV === "production" ? "" : ";label:getInputGroupStyling;");
2643
2856
  };
2644
- const Group$1 = _ref => {
2857
+ const Group = _ref => {
2645
2858
  let {
2646
2859
  dangerouslySetAntdProps,
2647
2860
  dangerouslyAppendEmotionCSS,
@@ -2662,10 +2875,14 @@ const Group$1 = _ref => {
2662
2875
  });
2663
2876
  };
2664
2877
 
2665
- const getInputEmotionStyles = (clsPrefix, theme, _ref, useTransparent) => {
2878
+ const getInputStyles = (clsPrefix, theme, _ref, _ref2) => {
2666
2879
  let {
2667
2880
  validationState
2668
2881
  } = _ref;
2882
+ let {
2883
+ useTransparent = false,
2884
+ useFocusWithin = false
2885
+ } = _ref2;
2669
2886
  const inputClass = `.${clsPrefix}-input`;
2670
2887
  const affixClass = `.${clsPrefix}-input-affix-wrapper`;
2671
2888
  const affixClassFocused = `.${clsPrefix}-input-affix-wrapper-focused`;
@@ -2673,6 +2890,7 @@ const getInputEmotionStyles = (clsPrefix, theme, _ref, useTransparent) => {
2673
2890
  const prefixIcon = `.${clsPrefix}-input-prefix`;
2674
2891
  const suffixIcon = `.${clsPrefix}-input-suffix`;
2675
2892
  const validationColor = getValidationStateColor(theme, validationState);
2893
+ const focusSpecifier = useFocusWithin ? 'focus-within' : 'focus';
2676
2894
  const styles = {
2677
2895
  '&&': {
2678
2896
  lineHeight: theme.typography.lineHeightBase,
@@ -2683,7 +2901,7 @@ const getInputEmotionStyles = (clsPrefix, theme, _ref, useTransparent) => {
2683
2901
  '&:hover': {
2684
2902
  borderColor: validationState ? validationColor : theme.colors.actionPrimaryBackgroundHover
2685
2903
  },
2686
- '&:focus': {
2904
+ [`&:${focusSpecifier}`]: {
2687
2905
  outlineColor: validationState ? validationColor : theme.colors.actionPrimaryBackgroundDefault,
2688
2906
  outlineWidth: 2,
2689
2907
  outlineOffset: -2,
@@ -2724,7 +2942,7 @@ const getInputEmotionStyles = (clsPrefix, theme, _ref, useTransparent) => {
2724
2942
  },
2725
2943
  [`&${affixClassFocused}`]: {
2726
2944
  boxShadow: 'none',
2727
- '&&, &:focus': {
2945
+ [`&&, &:${focusSpecifier}`]: {
2728
2946
  outlineColor: theme.colors.actionPrimaryBackgroundDefault,
2729
2947
  outlineWidth: 2,
2730
2948
  outlineOffset: -2,
@@ -2746,9 +2964,20 @@ const getInputEmotionStyles = (clsPrefix, theme, _ref, useTransparent) => {
2746
2964
  },
2747
2965
  ...getAnimationCss(theme.options.enableAnimation)
2748
2966
  };
2967
+ return styles;
2968
+ };
2969
+ const getInputEmotionStyles = (clsPrefix, theme, _ref3, useTransparent) => {
2970
+ let {
2971
+ validationState
2972
+ } = _ref3;
2973
+ const styles = getInputStyles(clsPrefix, theme, {
2974
+ validationState
2975
+ }, {
2976
+ useTransparent
2977
+ });
2749
2978
  return /*#__PURE__*/css(importantify(styles), process.env.NODE_ENV === "production" ? "" : ";label:getInputEmotionStyles;");
2750
2979
  };
2751
- const Input$1 = /*#__PURE__*/forwardRef(function Input(_ref2, ref) {
2980
+ const Input$1 = /*#__PURE__*/forwardRef(function Input(_ref4, ref) {
2752
2981
  let {
2753
2982
  validationState,
2754
2983
  autoComplete = 'off',
@@ -2757,7 +2986,7 @@ const Input$1 = /*#__PURE__*/forwardRef(function Input(_ref2, ref) {
2757
2986
  onChange,
2758
2987
  onClear,
2759
2988
  ...props
2760
- } = _ref2;
2989
+ } = _ref4;
2761
2990
  const {
2762
2991
  classNamePrefix,
2763
2992
  theme
@@ -2844,483 +3073,332 @@ const TextArea = /*#__PURE__*/forwardRef(function TextArea(_ref, ref) {
2844
3073
  const InputNamespace = /* #__PURE__ */Object.assign(Input$1, {
2845
3074
  TextArea,
2846
3075
  Password,
2847
- Group: Group$1
3076
+ Group
2848
3077
  });
2849
3078
  const Input = InputNamespace;
2850
3079
 
2851
- const Root = DropdownMenu$1.Root; // Behavioral component only
2852
-
2853
- const Content = /*#__PURE__*/forwardRef(function Content(_ref, ref) {
3080
+ function Stepper(_ref) {
2854
3081
  let {
2855
- children,
2856
- minWidth = 220,
2857
- isInsideModal,
2858
- onEscapeKeyDown,
2859
- onKeyDown,
2860
- ...props
3082
+ direction: requestedDirection,
3083
+ currentStepIndex: currentStep,
3084
+ steps,
3085
+ localizeStepNumber,
3086
+ responsive = true
2861
3087
  } = _ref;
2862
3088
  const {
2863
- getPopupContainer
2864
- } = useDesignSystemContext();
2865
- return jsx(DropdownMenu$1.Portal, {
2866
- container: getPopupContainer && getPopupContainer(),
2867
- children: jsx(DropdownMenu$1.Content, {
2868
- ref: ref,
2869
- loop: true,
2870
- css: [contentStyles, {
2871
- minWidth
2872
- }, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
2873
- sideOffset: 4,
2874
- align: "start",
2875
- onKeyDown: e => {
2876
- // This is a workaround for Radix's DropdownMenu.Content not receiving Escape key events
2877
- // when nested inside a modal. We need to stop propagation of the event so that the modal
2878
- // doesn't close when the DropdownMenu should.
2879
- if (e.key === 'Escape') {
2880
- if (isInsideModal) {
2881
- e.stopPropagation();
2882
- }
2883
- onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(e.nativeEvent);
2884
- }
2885
- onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
2886
- },
2887
- ...props,
2888
- children: children
2889
- })
2890
- });
2891
- });
2892
- const SubContent = /*#__PURE__*/forwardRef(function Content(_ref2, ref) {
2893
- let {
2894
- children,
2895
- minWidth = 220,
2896
- ...props
2897
- } = _ref2;
3089
+ theme
3090
+ } = useDesignSystemTheme();
3091
+ const ref = useRef(null);
2898
3092
  const {
2899
- getPopupContainer
2900
- } = useDesignSystemContext();
2901
- return jsx(DropdownMenu$1.Portal, {
2902
- container: getPopupContainer && getPopupContainer(),
2903
- children: jsx(DropdownMenu$1.SubContent, {
2904
- ref: ref,
2905
- loop: true,
2906
- css: [contentStyles, {
2907
- minWidth
2908
- }, process.env.NODE_ENV === "production" ? "" : ";label:SubContent;"],
2909
- sideOffset: -2,
2910
- alignOffset: -5,
2911
- ...props,
2912
- children: children
2913
- })
2914
- });
2915
- });
2916
- const Trigger = /*#__PURE__*/forwardRef(function Trigger(_ref3, ref) {
2917
- let {
2918
- children,
2919
- ...props
2920
- } = _ref3;
2921
- return jsx(DropdownMenu$1.Trigger, {
2922
- ref: ref,
2923
- ...props,
2924
- children: children
2925
- });
2926
- });
2927
- const Item = /*#__PURE__*/forwardRef(function Item(_ref4, ref) {
2928
- let {
2929
- children,
2930
- disabledReason,
2931
- danger,
2932
- onClick,
2933
- ...props
2934
- } = _ref4;
2935
- const itemRef = useRef(null);
2936
- useImperativeHandle(ref, () => itemRef.current);
2937
- return jsx(DropdownMenu$1.Item, {
2938
- css: theme => [dropdownItemStyles, danger && dangerItemStyles(theme)],
2939
- ref: itemRef,
2940
- onClick: e => {
2941
- if (props.disabled) {
2942
- e.preventDefault();
2943
- } else {
2944
- onClick === null || onClick === void 0 || onClick(e);
2945
- }
2946
- },
2947
- ...props,
2948
- children: getNewChildren(children, props, disabledReason, itemRef)
2949
- });
2950
- });
2951
- const Label = /*#__PURE__*/forwardRef(function Label(_ref5, ref) {
2952
- let {
2953
- children,
2954
- ...props
2955
- } = _ref5;
2956
- return jsx(DropdownMenu$1.Label, {
2957
- ref: ref,
2958
- css: [dropdownItemStyles, theme => ({
2959
- color: theme.colors.textSecondary,
2960
- '&:hover': {
2961
- cursor: 'default'
2962
- }
2963
- }), process.env.NODE_ENV === "production" ? "" : ";label:Label;"],
2964
- ...props,
2965
- children: children
2966
- });
2967
- });
2968
- const Separator = /*#__PURE__*/forwardRef(function Separator(_ref6, ref) {
2969
- let {
2970
- children,
2971
- ...props
2972
- } = _ref6;
2973
- return jsx(DropdownMenu$1.Separator, {
3093
+ direction
3094
+ } = useResponsiveDirection({
3095
+ ref,
3096
+ requestedDirection,
3097
+ responsive,
3098
+ enabled: steps.length > 0
3099
+ });
3100
+ if (steps.length === 0) {
3101
+ return null;
3102
+ }
3103
+ const isHorizontal = direction === 'horizontal';
3104
+ const currentStepIndex = currentStep ? Math.min(steps.length - 1, Math.max(0, currentStep)) : 0;
3105
+ return jsx("ol", {
3106
+ css: /*#__PURE__*/css(getStepsStyle(theme, isHorizontal), process.env.NODE_ENV === "production" ? "" : ";label:Stepper;"),
2974
3107
  ref: ref,
2975
- css: dropdownSeparatorStyles,
2976
- ...props,
2977
- children: children
2978
- });
2979
- });
2980
- const SubTrigger = /*#__PURE__*/forwardRef(function TriggerItem(_ref7, ref) {
2981
- let {
2982
- children,
2983
- disabledReason,
2984
- ...props
2985
- } = _ref7;
2986
- const subTriggerRef = useRef(null);
2987
- useImperativeHandle(ref, () => subTriggerRef.current);
2988
- return jsxs(DropdownMenu$1.SubTrigger, {
2989
- ref: subTriggerRef,
2990
- css: [dropdownItemStyles, theme => ({
2991
- '&[data-state="open"]': {
2992
- backgroundColor: theme.colors.actionTertiaryBackgroundHover
2993
- }
2994
- }), process.env.NODE_ENV === "production" ? "" : ";label:SubTrigger;"],
2995
- ...props,
2996
- children: [getNewChildren(children, props, disabledReason, subTriggerRef), jsx(HintColumn, {
2997
- css: theme => ({
2998
- margin: CONSTANTS.subMenuIconMargin(theme),
2999
- display: 'flex',
3000
- alignSelf: 'stretch',
3001
- alignItems: 'center'
3002
- }),
3003
- children: jsx(ChevronRightIcon$1, {
3004
- css: theme => ({
3005
- fontSize: CONSTANTS.subMenuIconSize(theme)
3108
+ children: steps.map((step, index) => {
3109
+ const isCurrentStep = index === currentStepIndex;
3110
+ const isLastStep = index === steps.length - 1;
3111
+ const displayEndingDivider = !isLastStep;
3112
+ const contentTitleLevel = isCurrentStep ? 3 : 4;
3113
+ const StepIcon = step.icon;
3114
+ const {
3115
+ icon,
3116
+ iconBackgroundColor,
3117
+ iconTextColor,
3118
+ titleTextColor,
3119
+ descriptionTextColor,
3120
+ hasStepItemIconBorder
3121
+ } = getStepContentStyleFields(theme, isCurrentStep, step.status, StepIcon);
3122
+ return jsx("li", {
3123
+ "aria-current": isCurrentStep,
3124
+ css: /*#__PURE__*/css(getStepItemStyle(theme, isHorizontal, isLastStep)),
3125
+ children: jsxs(StepContentGrid, {
3126
+ isHorizontal: isHorizontal,
3127
+ isCurrentStep: isCurrentStep,
3128
+ children: [jsx("div", {
3129
+ css: /*#__PURE__*/css(getStepItemIconParentStyle(theme, isCurrentStep, iconBackgroundColor, hasStepItemIconBorder)),
3130
+ children: StepIcon ? jsx(StepIcon, {
3131
+ statusColor: iconTextColor,
3132
+ status: step.status
3133
+ }) : icon ? jsx("span", {
3134
+ css: /*#__PURE__*/css({
3135
+ color: iconTextColor
3136
+ }),
3137
+ children: icon
3138
+ }) : jsx(Typography.Title, {
3139
+ level: contentTitleLevel,
3140
+ css: /*#__PURE__*/css({
3141
+ color: `${iconTextColor} !important`
3142
+ }),
3143
+ withoutMargins: true,
3144
+ children: localizeStepNumber(index + 1)
3145
+ })
3146
+ }), jsx(Typography.Title, {
3147
+ level: contentTitleLevel,
3148
+ withoutMargins: true,
3149
+ css: /*#__PURE__*/css({
3150
+ flexShrink: 0,
3151
+ color: `${titleTextColor} !important`
3152
+ }),
3153
+ children: step.title
3154
+ }), displayEndingDivider && jsx("div", {
3155
+ css: /*#__PURE__*/css(getStepEndingDividerStyles(theme, isHorizontal, isCurrentStep))
3156
+ }), step.description && jsx(Typography.Text, {
3157
+ css: /*#__PURE__*/css(getStepDescriptionStyles(theme, isHorizontal, isLastStep, descriptionTextColor)),
3158
+ withoutMargins: true,
3159
+ size: "sm",
3160
+ children: step.description
3161
+ })]
3006
3162
  })
3007
- })
3008
- })]
3009
- });
3010
- });
3011
-
3012
- /**
3013
- * Deprecated. Use `SubTrigger` instead.
3014
- * @deprecated
3015
- */
3016
- const TriggerItem = SubTrigger;
3017
- const CheckboxItem = /*#__PURE__*/forwardRef(function CheckboxItem(_ref8, ref) {
3018
- let {
3019
- children,
3020
- disabledReason,
3021
- ...props
3022
- } = _ref8;
3023
- const checkboxItemRef = useRef(null);
3024
- useImperativeHandle(ref, () => checkboxItemRef.current);
3025
- return jsx(DropdownMenu$1.CheckboxItem, {
3026
- ref: checkboxItemRef,
3027
- css: theme => [dropdownItemStyles, checkboxItemStyles(theme)],
3028
- ...props,
3029
- children: getNewChildren(children, props, disabledReason, checkboxItemRef)
3030
- });
3031
- });
3032
- const ItemIndicator = /*#__PURE__*/forwardRef(function ItemIndicator(_ref9, ref) {
3033
- let {
3034
- children,
3035
- ...props
3036
- } = _ref9;
3037
- return jsx(DropdownMenu$1.ItemIndicator, {
3038
- ref: ref,
3039
- css: theme => ({
3040
- marginLeft: -(CONSTANTS.checkboxIconWidth(theme) + CONSTANTS.checkboxPaddingRight(theme)),
3041
- position: 'absolute',
3042
- fontSize: theme.general.iconFontSize
3043
- }),
3044
- ...props,
3045
- children: children !== null && children !== void 0 ? children : jsx(CheckIcon$1, {
3046
- css: theme => ({
3047
- color: theme.colors.textSecondary
3048
- })
3163
+ }, index);
3049
3164
  })
3050
3165
  });
3051
- });
3052
- const Arrow = /*#__PURE__*/forwardRef(function Arrow(_ref10, ref) {
3166
+ }
3167
+ function getStepsStyle(theme, isHorizontal) {
3168
+ return /*#__PURE__*/css({
3169
+ listStyle: 'none',
3170
+ display: 'flex',
3171
+ flexDirection: isHorizontal ? 'row' : 'column',
3172
+ flexWrap: 'wrap',
3173
+ alignItems: 'flex-start',
3174
+ gap: isHorizontal ? theme.spacing.md : theme.spacing.sm,
3175
+ width: '100%',
3176
+ margin: '0',
3177
+ padding: '0'
3178
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getStepsStyle;");
3179
+ }
3180
+ function getStepItemStyle(theme, isHorizontal, isLastStep) {
3181
+ return /*#__PURE__*/css({
3182
+ display: 'flex',
3183
+ flexDirection: 'column',
3184
+ alignItems: 'center',
3185
+ justifyContent: 'flex-start',
3186
+ flexGrow: isLastStep ? 0 : 1,
3187
+ marginRight: isLastStep ? theme.spacing.lg + theme.spacing.md : 0,
3188
+ width: isHorizontal ? undefined : '100%'
3189
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getStepItemStyle;");
3190
+ }
3191
+ function getStepContentStyleFields(theme, isCurrentStep, status, icon) {
3192
+ const fields = getStepContentStyleFieldsFromStatus(theme, isCurrentStep, status);
3193
+ if (icon) {
3194
+ return {
3195
+ ...fields,
3196
+ icon: undefined,
3197
+ iconBackgroundColor: undefined,
3198
+ iconTextColor: getCustomIconColor(theme, isCurrentStep, status),
3199
+ hasStepItemIconBorder: false
3200
+ };
3201
+ }
3202
+ return fields;
3203
+ }
3204
+ function getCustomIconColor(theme, isCurrentStep, status) {
3205
+ switch (status) {
3206
+ case 'completed':
3207
+ return theme.colors.actionDefaultBackgroundPress;
3208
+ case 'loading':
3209
+ return theme.colors.textPlaceholder;
3210
+ case 'error':
3211
+ return theme.colors.textValidationDanger;
3212
+ default:
3213
+ case 'upcoming':
3214
+ return isCurrentStep ? theme.colors.actionLinkDefault : theme.colors.textPlaceholder;
3215
+ }
3216
+ }
3217
+ function getStepContentStyleFieldsFromStatus(theme, isCurrentStep, status) {
3218
+ switch (status) {
3219
+ case 'completed':
3220
+ return {
3221
+ icon: jsx(CheckIcon$1, {}),
3222
+ iconBackgroundColor: theme.colors.actionDefaultBackgroundPress,
3223
+ iconTextColor: theme.colors.textPlaceholder,
3224
+ titleTextColor: theme.colors.textPrimary,
3225
+ descriptionTextColor: theme.colors.textSecondary,
3226
+ hasStepItemIconBorder: true
3227
+ };
3228
+ case 'loading':
3229
+ return {
3230
+ icon: jsx(LoadingIcon$1, {
3231
+ spin: true,
3232
+ css: /*#__PURE__*/css({
3233
+ fontSize: isCurrentStep ? theme.typography.fontSizeXl : theme.typography.fontSizeLg
3234
+ }, process.env.NODE_ENV === "production" ? "" : ";label:icon;")
3235
+ }),
3236
+ iconBackgroundColor: undefined,
3237
+ iconTextColor: theme.colors.textPlaceholder,
3238
+ titleTextColor: isCurrentStep ? theme.colors.textPrimary : theme.colors.textSecondary,
3239
+ descriptionTextColor: theme.colors.textSecondary,
3240
+ hasStepItemIconBorder: false
3241
+ };
3242
+ case 'error':
3243
+ return {
3244
+ icon: jsx(CloseIcon$1, {
3245
+ css: /*#__PURE__*/css({
3246
+ marginBottom: theme.spacing.sm /* center icon in icon circle */
3247
+ }, process.env.NODE_ENV === "production" ? "" : ";label:icon;")
3248
+ }),
3249
+ iconBackgroundColor: theme.colors.textValidationDanger,
3250
+ iconTextColor: 'white',
3251
+ titleTextColor: theme.colors.textValidationDanger,
3252
+ descriptionTextColor: theme.colors.textValidationDanger,
3253
+ hasStepItemIconBorder: false
3254
+ };
3255
+ default:
3256
+ case 'upcoming':
3257
+ if (isCurrentStep) {
3258
+ return {
3259
+ icon: undefined,
3260
+ iconBackgroundColor: theme.colors.actionLinkDefault,
3261
+ iconTextColor: 'white',
3262
+ titleTextColor: theme.colors.textPrimary,
3263
+ descriptionTextColor: theme.colors.textPrimary,
3264
+ hasStepItemIconBorder: false
3265
+ };
3266
+ }
3267
+ return {
3268
+ icon: undefined,
3269
+ iconBackgroundColor: undefined,
3270
+ iconTextColor: theme.colors.textPlaceholder,
3271
+ titleTextColor: theme.colors.textSecondary,
3272
+ descriptionTextColor: theme.colors.textSecondary,
3273
+ hasStepItemIconBorder: true
3274
+ };
3275
+ }
3276
+ }
3277
+ const MaxHorizontalStepDescriptionWidth = 140;
3278
+ const CurrentStepIconSize = DEFAULT_SPACING_UNIT * 4;
3279
+ const NonCurrentStepIconSize = DEFAULT_SPACING_UNIT * 3;
3280
+ function getStepItemIconParentStyle(theme, isCurrentStep, iconBackgroundColor, hasStepItemIconBorder) {
3281
+ return /*#__PURE__*/css({
3282
+ width: isCurrentStep ? CurrentStepIconSize : NonCurrentStepIconSize,
3283
+ height: isCurrentStep ? CurrentStepIconSize : NonCurrentStepIconSize,
3284
+ backgroundColor: iconBackgroundColor,
3285
+ borderRadius: '50%',
3286
+ display: 'flex',
3287
+ justifyContent: 'center',
3288
+ alignItems: 'center',
3289
+ fontSize: '20px',
3290
+ flexShrink: 0,
3291
+ border: hasStepItemIconBorder ? `1px solid ${theme.colors.textPlaceholder}` : undefined
3292
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getStepItemIconParentStyle;");
3293
+ }
3294
+ function getStepEndingDividerStyles(theme, isHorizontal, isCurrentStep) {
3295
+ const backgroundColor = isCurrentStep ? theme.colors.actionLinkDefault : theme.colors.border;
3296
+ if (isHorizontal) {
3297
+ return /*#__PURE__*/css({
3298
+ backgroundColor,
3299
+ height: '1px',
3300
+ width: '100%',
3301
+ minWidth: theme.spacing.md
3302
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getStepEndingDividerStyles;");
3303
+ }
3304
+ return /*#__PURE__*/css({
3305
+ backgroundColor,
3306
+ height: '100%',
3307
+ minHeight: theme.spacing.md,
3308
+ width: '1px',
3309
+ alignSelf: 'flex-start',
3310
+ marginLeft: theme.spacing.md
3311
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getStepEndingDividerStyles;");
3312
+ }
3313
+ function getStepDescriptionStyles(theme, isHorizontal, isLastStep, textColor) {
3314
+ return /*#__PURE__*/css({
3315
+ alignSelf: 'flex-start',
3316
+ width: '100%',
3317
+ gridColumn: isHorizontal || isLastStep ? '2 / span 2' : undefined,
3318
+ maxWidth: isHorizontal ? MaxHorizontalStepDescriptionWidth : undefined,
3319
+ paddingBottom: isHorizontal ? undefined : theme.spacing.sm,
3320
+ color: `${textColor} !important`
3321
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getStepDescriptionStyles;");
3322
+ }
3323
+ function StepContentGrid(_ref2) {
3053
3324
  let {
3054
3325
  children,
3055
- ...props
3056
- } = _ref10;
3326
+ isHorizontal,
3327
+ isCurrentStep
3328
+ } = _ref2;
3057
3329
  const {
3058
3330
  theme
3059
3331
  } = useDesignSystemTheme();
3060
- return jsx(DropdownMenu$1.Arrow, {
3332
+ if (isHorizontal) {
3333
+ return jsx("div", {
3334
+ css: /*#__PURE__*/css({
3335
+ display: 'grid',
3336
+ gridTemplateColumns: `${isCurrentStep ? CurrentStepIconSize : NonCurrentStepIconSize}px fit-content(100%) 1fr`,
3337
+ gridTemplateRows: `${CurrentStepIconSize}px auto`,
3338
+ alignItems: 'center',
3339
+ justifyItems: 'flex-start',
3340
+ gridColumnGap: theme.spacing.sm,
3341
+ gridRowGap: theme.spacing.sm,
3342
+ width: '100%'
3343
+ }, process.env.NODE_ENV === "production" ? "" : ";label:StepContentGrid;"),
3344
+ children: children
3345
+ });
3346
+ }
3347
+ return jsx("div", {
3061
3348
  css: /*#__PURE__*/css({
3062
- fill: theme.colors.backgroundPrimary,
3063
- stroke: theme.colors.borderDecorative,
3064
- strokeDashoffset: -CONSTANTS.arrowBottomLength(),
3065
- strokeDasharray: CONSTANTS.arrowBottomLength() + 2 * CONSTANTS.arrowSide(),
3066
- strokeWidth: CONSTANTS.arrowStrokeWidth(),
3067
- // TODO: This is a temporary fix for the alignment of the Arrow;
3068
- // Radix has changed the implementation for v1.0.0 (uses floating-ui)
3069
- // which has new behaviors for alignment that we don't want. Generally
3070
- // we need to fix the arrow to always be aligned to the left of the menu (with
3071
- // offset equal to border radius)
3072
- position: 'relative',
3073
- top: -1
3074
- }, process.env.NODE_ENV === "production" ? "" : ";label:Arrow;"),
3075
- ref: ref,
3076
- width: 12,
3077
- height: 6,
3078
- ...props,
3349
+ display: 'grid',
3350
+ gridTemplateColumns: `${CurrentStepIconSize}px auto`,
3351
+ alignItems: 'center',
3352
+ justifyItems: 'flex-start',
3353
+ gridColumnGap: theme.spacing.md,
3354
+ gridRowGap: theme.spacing.sm,
3355
+ width: '100%',
3356
+ '& > :first-child': {
3357
+ // horizontally center the first column (circle/icon)
3358
+ justifySelf: 'center'
3359
+ }
3360
+ }, process.env.NODE_ENV === "production" ? "" : ";label:StepContentGrid;"),
3079
3361
  children: children
3080
3362
  });
3081
- });
3082
- const RadioItem = /*#__PURE__*/forwardRef(function RadioItem(_ref11, ref) {
3083
- let {
3084
- children,
3085
- disabledReason,
3086
- ...props
3087
- } = _ref11;
3088
- const radioItemRef = useRef(null);
3089
- useImperativeHandle(ref, () => radioItemRef.current);
3090
- return jsx(DropdownMenu$1.RadioItem, {
3091
- ref: radioItemRef,
3092
- css: theme => [dropdownItemStyles, checkboxItemStyles(theme)],
3093
- ...props,
3094
- children: getNewChildren(children, props, disabledReason, radioItemRef)
3095
- });
3096
- });
3363
+ }
3097
3364
 
3098
- // UNWRAPPED RADIX-UI-COMPONENTS
3099
- const Group = DropdownMenu$1.Group;
3100
- const RadioGroup = DropdownMenu$1.RadioGroup;
3101
- const Sub = DropdownMenu$1.Sub;
3365
+ // Ant design uses the same value for their stepper and to works well for us as well.
3366
+ const MinimumHorizonalDirectionWidth = 532;
3102
3367
 
3103
- // EXTRA COMPONENTS
3104
- const HintColumn = /*#__PURE__*/forwardRef(function HintColumn(_ref12, ref) {
3105
- let {
3106
- children,
3107
- ...props
3108
- } = _ref12;
3109
- return jsx("div", {
3110
- ref: ref,
3111
- css: [metaTextStyles, "margin-left:auto;" + (process.env.NODE_ENV === "production" ? "" : ";label:HintColumn;")],
3112
- ...props,
3113
- children: children
3114
- });
3115
- });
3116
- const HintRow = /*#__PURE__*/forwardRef(function HintRow(_ref13, ref) {
3368
+ // exported for unit test
3369
+ function useResponsiveDirection(_ref3) {
3117
3370
  let {
3118
- children,
3119
- ...props
3120
- } = _ref13;
3121
- return jsx("div", {
3122
- ref: ref,
3123
- css: [metaTextStyles, "min-width:100%;" + (process.env.NODE_ENV === "production" ? "" : ";label:HintRow;")],
3124
- ...props,
3125
- children: children
3126
- });
3127
- });
3128
- const IconWrapper = /*#__PURE__*/forwardRef(function IconWrapper(_ref14, ref) {
3129
- let {
3130
- children,
3131
- ...props
3132
- } = _ref14;
3133
- return jsx("div", {
3134
- ref: ref,
3135
- css: theme => ({
3136
- fontSize: 16,
3137
- color: theme.colors.textSecondary,
3138
- paddingRight: theme.spacing.sm
3139
- }),
3140
- ...props,
3141
- children: children
3142
- });
3143
- });
3144
- const getNewChildren = (children, props, disabledReason, ref) => {
3145
- const childCount = Children.count(children);
3146
- const tooltip = jsx(Tooltip, {
3147
- title: disabledReason,
3148
- placement: "right",
3149
- dangerouslySetAntdProps: {
3150
- getPopupContainer: () => ref.current || document.body
3151
- },
3152
- children: jsx("span", {
3153
- css: theme => infoIconStyles(theme),
3154
- children: jsx(InfoIcon$1, {
3155
- role: "presentation",
3156
- alt: "Disabled state reason",
3157
- "aria-hidden": "false"
3158
- })
3159
- })
3160
- });
3161
- if (childCount === 1) {
3162
- return getChild(children, Boolean(props['disabled']), disabledReason, tooltip, 0, childCount);
3163
- }
3164
- return Children.map(children, (child, idx) => {
3165
- return getChild(child, Boolean(props['disabled']), disabledReason, tooltip, idx, childCount);
3166
- });
3167
- };
3168
- const getChild = (child, isDisabled, disabledReason, tooltip, index, siblingCount) => {
3169
- const HintColumnType = jsx(HintColumn, {}).type;
3170
- 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);
3171
- if (isDisabled && disabledReason && child && isHintColumnType) {
3172
- return jsxs(Fragment, {
3173
- children: [tooltip, child]
3174
- });
3175
- } else if (index === siblingCount - 1 && isDisabled && disabledReason) {
3176
- return jsxs(Fragment, {
3177
- children: [child, tooltip]
3371
+ requestedDirection = 'horizontal',
3372
+ responsive,
3373
+ enabled,
3374
+ ref
3375
+ } = _ref3;
3376
+ const [direction, setDirection] = useState(requestedDirection);
3377
+ useEffect(() => {
3378
+ if (requestedDirection === 'vertical' || !enabled || !responsive || !ref.current) {
3379
+ return;
3380
+ }
3381
+ let timeoutId;
3382
+ const resizeObserver = new ResizeObserver(entries => {
3383
+ timeoutId = requestAnimationFrame(() => {
3384
+ if (entries.length === 1) {
3385
+ const width = entries[0].target.clientWidth || 0;
3386
+ setDirection(width < MinimumHorizonalDirectionWidth ? 'vertical' : 'horizontal');
3387
+ }
3388
+ });
3178
3389
  });
3179
- }
3180
- return child;
3181
- };
3182
-
3183
- // CONSTANTS
3184
- const CONSTANTS = {
3185
- itemPaddingVertical(theme) {
3186
- // The number from the mocks is the midpoint between constants
3187
- return 0.5 * theme.spacing.xs + 0.5 * theme.spacing.sm;
3188
- },
3189
- itemPaddingHorizontal(theme) {
3190
- return theme.spacing.sm;
3191
- },
3192
- checkboxIconWidth(theme) {
3193
- return theme.general.iconFontSize;
3194
- },
3195
- checkboxPaddingLeft(theme) {
3196
- return theme.spacing.sm + theme.spacing.xs;
3197
- },
3198
- checkboxPaddingRight(theme) {
3199
- return theme.spacing.sm;
3200
- },
3201
- subMenuIconMargin(theme) {
3202
- // Negative margin so the icons can be larger without increasing the overall item height
3203
- const iconMarginVertical = this.itemPaddingVertical(theme) / 2;
3204
- const iconMarginRight = -this.itemPaddingVertical(theme) + theme.spacing.sm * 1.5;
3205
- return `${-iconMarginVertical}px ${-iconMarginRight}px ${-iconMarginVertical}px auto`;
3206
- },
3207
- subMenuIconSize(theme) {
3208
- return theme.spacing.lg;
3209
- },
3210
- arrowBottomLength() {
3211
- // The built in arrow is a polygon: 0,0 30,0 15,10
3212
- return 30;
3213
- },
3214
- arrowHeight() {
3215
- return 10;
3216
- },
3217
- arrowSide() {
3218
- return 2 * (this.arrowHeight() ** 2 * 2) ** 0.5;
3219
- },
3220
- arrowStrokeWidth() {
3221
- // This is eyeballed b/c relative to the svg viewbox coordinate system
3222
- return 2;
3223
- }
3224
- };
3225
- const dropdownContentStyles = theme => ({
3226
- backgroundColor: theme.colors.backgroundPrimary,
3227
- color: theme.colors.textPrimary,
3228
- lineHeight: theme.typography.lineHeightBase,
3229
- border: `1px solid ${theme.colors.borderDecorative}`,
3230
- borderRadius: theme.borders.borderRadiusMd,
3231
- padding: `${theme.spacing.xs}px 0`,
3232
- boxShadow: theme.general.shadowLow,
3233
- userSelect: 'none',
3234
- ...getDarkModePortalStyles(theme),
3235
- // Ant Design uses 1000s for their zIndex space; this ensures Radix works with that, but
3236
- // we'll likely need to be sure that all Radix components are using the same zIndex going forward.
3237
- //
3238
- // Additionally, there is an issue where macOS overlay scrollbars in Chrome and Safari (sometimes!)
3239
- // overlap other elements with higher zIndex, because the scrollbars themselves have zIndex 9999,
3240
- // so we have to use a higher value than that: https://github.com/databricks/universe/pull/232825
3241
- zIndex: 10000,
3242
- a: importantify({
3243
- color: theme.colors.textPrimary,
3244
- '&:hover, &:focus': {
3245
- color: theme.colors.textPrimary,
3246
- textDecoration: 'none'
3390
+ if (ref.current) {
3391
+ resizeObserver.observe(ref.current);
3247
3392
  }
3248
- })
3249
- });
3250
- const contentStyles = theme => ({
3251
- ...dropdownContentStyles(theme)
3252
- });
3253
- const dropdownItemStyles = theme => ({
3254
- padding: `${CONSTANTS.itemPaddingVertical(theme)}px ${CONSTANTS.itemPaddingHorizontal(theme)}px`,
3255
- display: 'flex',
3256
- flexWrap: 'wrap',
3257
- alignItems: 'center',
3258
- outline: 'unset',
3259
- '&:hover': {
3260
- cursor: 'pointer'
3261
- },
3262
- '&:focus': {
3263
- backgroundColor: theme.colors.actionTertiaryBackgroundHover
3264
- },
3265
- '&[data-disabled]': {
3266
- pointerEvents: 'none',
3267
- color: theme.colors.actionDisabledText
3268
- }
3269
- });
3270
- const dangerItemStyles = theme => ({
3271
- color: theme.colors.textValidationDanger,
3272
- '&:hover, &:focus': {
3273
- backgroundColor: theme.colors.actionDangerDefaultBackgroundHover
3274
- }
3275
- });
3276
- const infoIconStyles = theme => ({
3277
- display: 'inline-flex',
3278
- paddingLeft: theme.spacing.xs,
3279
- color: theme.colors.textSecondary,
3280
- pointerEvents: 'all'
3281
- });
3282
- const checkboxItemStyles = theme => ({
3283
- position: 'relative',
3284
- paddingLeft: CONSTANTS.checkboxIconWidth(theme) + CONSTANTS.checkboxPaddingLeft(theme) + CONSTANTS.checkboxPaddingRight(theme)
3285
- });
3286
- const metaTextStyles = theme => ({
3287
- color: theme.colors.textSecondary,
3288
- fontSize: theme.typography.fontSizeSm,
3289
- '[data-disabled] &': {
3290
- color: theme.colors.actionDisabledText
3291
- }
3292
- });
3293
- const dropdownSeparatorStyles = theme => ({
3294
- height: 1,
3295
- margin: `${theme.spacing.xs}px ${theme.spacing.sm}px`,
3296
- backgroundColor: theme.colors.borderDecorative
3297
- });
3298
-
3299
- var DropdownMenu = /*#__PURE__*/Object.freeze({
3300
- __proto__: null,
3301
- Arrow: Arrow,
3302
- CheckboxItem: CheckboxItem,
3303
- Content: Content,
3304
- Group: Group,
3305
- HintColumn: HintColumn,
3306
- HintRow: HintRow,
3307
- IconWrapper: IconWrapper,
3308
- Item: Item,
3309
- ItemIndicator: ItemIndicator,
3310
- Label: Label,
3311
- RadioGroup: RadioGroup,
3312
- RadioItem: RadioItem,
3313
- Root: Root,
3314
- Separator: Separator,
3315
- Sub: Sub,
3316
- SubContent: SubContent,
3317
- SubTrigger: SubTrigger,
3318
- Trigger: Trigger,
3319
- TriggerItem: TriggerItem,
3320
- dropdownContentStyles: dropdownContentStyles,
3321
- dropdownItemStyles: dropdownItemStyles,
3322
- dropdownSeparatorStyles: dropdownSeparatorStyles
3323
- });
3393
+ return () => {
3394
+ resizeObserver.disconnect();
3395
+ cancelAnimationFrame(timeoutId);
3396
+ };
3397
+ }, [requestedDirection, enabled, ref, responsive]);
3398
+ return {
3399
+ direction
3400
+ };
3401
+ }
3324
3402
 
3325
- export { LoadingStateContext as $, ApplyDesignSystemContextOverrides as A, Button as B, CloseIcon$1 as C, DesignSystemAntDConfigProvider as D, getDisabledStyles as E, useUniqueId as F, useDesignSystemFlags as G, getButtonEmotionStyles as H, Icon as I, DesignSystemThemeContext as J, DesignSystemContext as K, LoadingState as L, DesignSystemThemeProvider as M, DesignSystemProvider as N, ApplyDesignSystemFlags as O, useAntDConfigProviderContext as P, DropdownMenu as Q, RestoreAntDDefaultClsPrefix as R, Spinner as S, Typography as T, CursorIcon$1 as U, FaceFrownIcon$1 as V, WithDesignSystemThemeHoc as W, FaceNeutralIcon$1 as X, FaceSmileIcon$1 as Y, MegaphoneIcon$1 as Z, NewWindowIcon$1 as _, getDarkModePortalStyles as a, getTypographyColor as a0, getBottomOnlyShadowScrollStyles as a1, ColorVars as a2, dropdownItemStyles as a3, dropdownSeparatorStyles as a4, ChevronRightIcon$1 as b, useDesignSystemContext as c, Tooltip as d, InfoIcon$1 as e, Input as f, getAnimationCss as g, CheckIcon$1 as h, importantify as i, getValidationStateColor as j, getShadowScrollStyles as k, DangerIcon$1 as l, LoadingIcon$1 as m, dropdownContentStyles as n, Title as o, AccessibleContainer as p, ChevronLeftIcon$1 as q, DU_BOIS_ENABLE_ANIMATION_CLASSNAME as r, safex as s, lightColorList as t, useDesignSystemTheme as u, visuallyHidden as v, Root as w, Trigger as x, getDefaultStyles as y, getPrimaryStyles as z };
3326
- //# sourceMappingURL=DropdownMenu-06a1051f.js.map
3403
+ export { getInputStyles as $, ApplyDesignSystemContextOverrides as A, Button as B, CloseIcon$1 as C, DesignSystemAntDConfigProvider as D, DesignSystemEventProviderComponentTypes as E, DesignSystemEventProviderAnalyticsEventTypes as F, useDesignSystemEventComponentCallbacks as G, DesignSystemEventProvider as H, Icon as I, DesignSystemThemeContext as J, DesignSystemContext as K, LoadingState as L, DesignSystemThemeProvider as M, DesignSystemProvider as N, ApplyDesignSystemFlags as O, useAntDConfigProviderContext as P, WithDesignSystemThemeHoc as Q, RestoreAntDDefaultClsPrefix as R, Spinner as S, Typography as T, CursorIcon$1 as U, FaceFrownIcon$1 as V, WarningIcon$1 as W, FaceNeutralIcon$1 as X, FaceSmileIcon$1 as Y, MegaphoneIcon$1 as Z, NewWindowIcon$1 as _, getDarkModePortalStyles as a, LoadingStateContext as a0, getTypographyColor as a1, getBottomOnlyShadowScrollStyles as a2, ColorVars as a3, primitiveColors as a4, ChevronRightIcon$1 as b, useUniqueId as c, useDesignSystemContext as d, CheckIcon$1 as e, Input as f, getAnimationCss as g, getValidationStateColor as h, importantify as i, getShadowScrollStyles as j, DangerIcon$1 as k, LoadingIcon$1 as l, Title as m, AccessibleContainer as n, ChevronLeftIcon$1 as o, DU_BOIS_ENABLE_ANIMATION_CLASSNAME as p, lightColorList as q, getDefaultStyles as r, safex as s, getPrimaryStyles as t, useDesignSystemTheme as u, visuallyHidden as v, getDisabledStyles as w, useDesignSystemFlags as x, Stepper as y, getButtonEmotionStyles as z };
3404
+ //# sourceMappingURL=Stepper-839336b1.js.map