@databricks/design-system 1.12.9 → 1.12.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (519) hide show
  1. package/dist/{Typography-91d3d591.js → DropdownMenu-eb8788e5.js} +1201 -176
  2. package/dist/DropdownMenu-eb8788e5.js.map +1 -0
  3. package/dist/{common-1fb3eeb9.js → common-5b60d682.js} +3 -1
  4. package/dist/common-5b60d682.js.map +1 -0
  5. package/dist/design-system/AccessibleContainer/index.d.ts +7 -0
  6. package/dist/design-system/AccessibleContainer/index.d.ts.map +1 -0
  7. package/dist/design-system/Alert/Alert.d.ts.map +1 -1
  8. package/dist/design-system/ApplyGlobalStyles/ApplyGlobalStyles.d.ts +6 -0
  9. package/dist/design-system/ApplyGlobalStyles/ApplyGlobalStyles.d.ts.map +1 -0
  10. package/dist/design-system/ApplyGlobalStyles/index.d.ts +2 -0
  11. package/dist/design-system/ApplyGlobalStyles/index.d.ts.map +1 -0
  12. package/dist/design-system/Button/Button.d.ts +3 -1
  13. package/dist/design-system/Button/Button.d.ts.map +1 -1
  14. package/dist/design-system/Button/styles.d.ts +1 -1
  15. package/dist/design-system/Button/styles.d.ts.map +1 -1
  16. package/dist/design-system/Checkbox/Checkbox.d.ts.map +1 -1
  17. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts +4 -7
  18. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts.map +1 -1
  19. package/dist/design-system/DialogCombobox/DialogCombobox.d.ts +3 -1
  20. package/dist/design-system/DialogCombobox/DialogCombobox.d.ts.map +1 -1
  21. package/dist/design-system/DialogCombobox/DialogComboboxAddButton.d.ts +2 -0
  22. package/dist/design-system/DialogCombobox/DialogComboboxAddButton.d.ts.map +1 -0
  23. package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts +4 -1
  24. package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts.map +1 -1
  25. package/dist/design-system/DialogCombobox/DialogComboboxFooter.d.ts +2 -0
  26. package/dist/design-system/DialogCombobox/DialogComboboxFooter.d.ts.map +1 -0
  27. package/dist/design-system/DialogCombobox/DialogComboboxHintRow.d.ts +7 -0
  28. package/dist/design-system/DialogCombobox/DialogComboboxHintRow.d.ts.map +1 -0
  29. package/dist/design-system/DialogCombobox/DialogComboboxOptionControlledList.d.ts +4 -2
  30. package/dist/design-system/DialogCombobox/DialogComboboxOptionControlledList.d.ts.map +1 -1
  31. package/dist/design-system/DialogCombobox/DialogComboboxOptionList.d.ts +2 -1
  32. package/dist/design-system/DialogCombobox/DialogComboboxOptionList.d.ts.map +1 -1
  33. package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts +1 -0
  34. package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts.map +1 -1
  35. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts.map +1 -1
  36. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts +1 -0
  37. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts.map +1 -1
  38. package/dist/design-system/DialogCombobox/DialogComboboxSectionHeader.d.ts.map +1 -1
  39. package/dist/design-system/DialogCombobox/DialogComboboxSeparator.d.ts.map +1 -1
  40. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts +1 -0
  41. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts.map +1 -1
  42. package/dist/design-system/DialogCombobox/index.d.ts +4 -1
  43. package/dist/design-system/DialogCombobox/index.d.ts.map +1 -1
  44. package/dist/design-system/DialogCombobox/providers/DialogComboboxContext.d.ts +7 -0
  45. package/dist/design-system/DialogCombobox/providers/DialogComboboxContext.d.ts.map +1 -1
  46. package/dist/design-system/DialogCombobox/shared.d.ts +6 -3
  47. package/dist/design-system/DialogCombobox/shared.d.ts.map +1 -1
  48. package/dist/design-system/Drawer/Drawer.d.ts +7 -2
  49. package/dist/design-system/Drawer/Drawer.d.ts.map +1 -1
  50. package/dist/design-system/DropdownMenu/DropdownMenu.d.ts +7 -0
  51. package/dist/design-system/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  52. package/dist/design-system/Empty/Empty.d.ts.map +1 -1
  53. package/dist/design-system/FormV2/RHFAdapters.d.ts +10 -4
  54. package/dist/design-system/FormV2/RHFAdapters.d.ts.map +1 -1
  55. package/dist/design-system/FormV2/index.d.ts +6 -0
  56. package/dist/design-system/FormV2/index.d.ts.map +1 -1
  57. package/dist/design-system/Header/Header.d.ts +2 -2
  58. package/dist/design-system/Header/Header.d.ts.map +1 -1
  59. package/dist/design-system/Icon/Icon.d.ts +1 -1
  60. package/dist/design-system/Icon/Icon.d.ts.map +1 -1
  61. package/dist/design-system/Icon/__generated/icons/BarGroupedIcon.d.ts +4 -0
  62. package/dist/design-system/Icon/__generated/icons/BarGroupedIcon.d.ts.map +1 -0
  63. package/dist/design-system/Icon/__generated/icons/BarStackedIcon.d.ts +4 -0
  64. package/dist/design-system/Icon/__generated/icons/BarStackedIcon.d.ts.map +1 -0
  65. package/dist/design-system/Icon/__generated/icons/CalendarClockIcon.d.ts +4 -0
  66. package/dist/design-system/Icon/__generated/icons/CalendarClockIcon.d.ts.map +1 -0
  67. package/dist/design-system/Icon/__generated/icons/CatalogOffIcon.d.ts +4 -0
  68. package/dist/design-system/Icon/__generated/icons/CatalogOffIcon.d.ts.map +1 -0
  69. package/dist/design-system/Icon/__generated/icons/CheckboxIcon.d.ts +4 -0
  70. package/dist/design-system/Icon/__generated/icons/CheckboxIcon.d.ts.map +1 -0
  71. package/dist/design-system/Icon/__generated/icons/ClockKeyIcon.d.ts +4 -0
  72. package/dist/design-system/Icon/__generated/icons/ClockKeyIcon.d.ts.map +1 -0
  73. package/dist/design-system/Icon/__generated/icons/ColumnsIcon.d.ts +4 -0
  74. package/dist/design-system/Icon/__generated/icons/ColumnsIcon.d.ts.map +1 -0
  75. package/dist/design-system/Icon/__generated/icons/FaceNeutralIcon.d.ts.map +1 -1
  76. package/dist/design-system/Icon/__generated/icons/FloatIcon.d.ts +4 -0
  77. package/dist/design-system/Icon/__generated/icons/FloatIcon.d.ts.map +1 -0
  78. package/dist/design-system/Icon/__generated/icons/FolderCloudFilledIcon.d.ts +4 -0
  79. package/dist/design-system/Icon/__generated/icons/FolderCloudFilledIcon.d.ts.map +1 -0
  80. package/dist/design-system/Icon/__generated/icons/FolderCloudIcon.d.ts +4 -0
  81. package/dist/design-system/Icon/__generated/icons/FolderCloudIcon.d.ts.map +1 -0
  82. package/dist/design-system/Icon/__generated/icons/IngestionIcon.d.ts +4 -0
  83. package/dist/design-system/Icon/__generated/icons/IngestionIcon.d.ts.map +1 -0
  84. package/dist/design-system/Icon/__generated/icons/LibrariesIcon.d.ts +4 -0
  85. package/dist/design-system/Icon/__generated/icons/LibrariesIcon.d.ts.map +1 -0
  86. package/dist/design-system/Icon/__generated/icons/QuestionMarkSpeechBubbleIcon.d.ts +4 -0
  87. package/dist/design-system/Icon/__generated/icons/QuestionMarkSpeechBubbleIcon.d.ts.map +1 -0
  88. package/dist/design-system/Icon/__generated/icons/RobotIcon.d.ts +4 -0
  89. package/dist/design-system/Icon/__generated/icons/RobotIcon.d.ts.map +1 -0
  90. package/dist/design-system/Icon/__generated/icons/SortAlphabeticalAscendingIcon.d.ts +4 -0
  91. package/dist/design-system/Icon/__generated/icons/SortAlphabeticalAscendingIcon.d.ts.map +1 -0
  92. package/dist/design-system/Icon/__generated/icons/SortAlphabeticalDescendingIcon.d.ts +4 -0
  93. package/dist/design-system/Icon/__generated/icons/SortAlphabeticalDescendingIcon.d.ts.map +1 -0
  94. package/dist/design-system/Icon/__generated/icons/SortAlphabeticalLeftIcon.d.ts +4 -0
  95. package/dist/design-system/Icon/__generated/icons/SortAlphabeticalLeftIcon.d.ts.map +1 -0
  96. package/dist/design-system/Icon/__generated/icons/SortAlphabeticalRightIcon.d.ts +4 -0
  97. package/dist/design-system/Icon/__generated/icons/SortAlphabeticalRightIcon.d.ts.map +1 -0
  98. package/dist/design-system/Icon/__generated/icons/StopIcon.d.ts.map +1 -1
  99. package/dist/design-system/Icon/__generated/icons/WorkflowsIcon.d.ts +4 -0
  100. package/dist/design-system/Icon/__generated/icons/WorkflowsIcon.d.ts.map +1 -0
  101. package/dist/design-system/Icon/__generated/icons/index.d.ts +19 -0
  102. package/dist/design-system/Icon/__generated/icons/index.d.ts.map +1 -1
  103. package/dist/design-system/Input/Input.d.ts +1 -0
  104. package/dist/design-system/Input/Input.d.ts.map +1 -1
  105. package/dist/design-system/Layout/Layout.d.ts +3 -0
  106. package/dist/design-system/Layout/Layout.d.ts.map +1 -1
  107. package/dist/design-system/LegacyNotification/LegacyNotification.d.ts.map +1 -1
  108. package/dist/design-system/LegacySkeleton/LegacySkeleton.d.ts +17 -0
  109. package/dist/design-system/LegacySkeleton/LegacySkeleton.d.ts.map +1 -0
  110. package/dist/design-system/LegacySkeleton/index.d.ts +2 -0
  111. package/dist/design-system/LegacySkeleton/index.d.ts.map +1 -0
  112. package/dist/design-system/LoadingState/LoadingState.d.ts +45 -0
  113. package/dist/design-system/LoadingState/LoadingState.d.ts.map +1 -0
  114. package/dist/design-system/LoadingState/index.d.ts +2 -0
  115. package/dist/design-system/LoadingState/index.d.ts.map +1 -0
  116. package/dist/design-system/Modal/Modal.d.ts +3 -1
  117. package/dist/design-system/Modal/Modal.d.ts.map +1 -1
  118. package/dist/design-system/Radio/Radio.d.ts.map +1 -1
  119. package/dist/design-system/Select/Select.d.ts +4 -3
  120. package/dist/design-system/Select/Select.d.ts.map +1 -1
  121. package/dist/design-system/SelectV2/SelectContent.d.ts.map +1 -1
  122. package/dist/design-system/Sidebar/Sidebar.d.ts +2 -1
  123. package/dist/design-system/Sidebar/Sidebar.d.ts.map +1 -1
  124. package/dist/design-system/Skeleton/GenericSkeleton.d.ts +15 -0
  125. package/dist/design-system/Skeleton/GenericSkeleton.d.ts.map +1 -0
  126. package/dist/design-system/Skeleton/ParagraphSkeleton.d.ts +18 -0
  127. package/dist/design-system/Skeleton/ParagraphSkeleton.d.ts.map +1 -0
  128. package/dist/design-system/{TableUI → Skeleton}/TableSkeleton.d.ts +5 -2
  129. package/dist/design-system/Skeleton/TableSkeleton.d.ts.map +1 -0
  130. package/dist/design-system/Skeleton/TitleSkeleton.d.ts +15 -0
  131. package/dist/design-system/Skeleton/TitleSkeleton.d.ts.map +1 -0
  132. package/dist/design-system/Skeleton/index.d.ts +4 -1
  133. package/dist/design-system/Skeleton/index.d.ts.map +1 -1
  134. package/dist/design-system/Skeleton/utils.d.ts +7 -0
  135. package/dist/design-system/Skeleton/utils.d.ts.map +1 -0
  136. package/dist/design-system/Spinner/Spinner.d.ts +5 -1
  137. package/dist/design-system/Spinner/Spinner.d.ts.map +1 -1
  138. package/dist/design-system/TableUI/TableCell.d.ts +4 -2
  139. package/dist/design-system/TableUI/TableCell.d.ts.map +1 -1
  140. package/dist/design-system/TableUI/TableFilterInput.d.ts.map +1 -1
  141. package/dist/design-system/TableUI/TableFilterLayout.d.ts +1 -1
  142. package/dist/design-system/TableUI/TableFilterLayout.d.ts.map +1 -1
  143. package/dist/design-system/TableUI/TableHeader.d.ts +4 -2
  144. package/dist/design-system/TableUI/TableHeader.d.ts.map +1 -1
  145. package/dist/design-system/TableUI/TableRow.d.ts +1 -1
  146. package/dist/design-system/TableUI/TableRow.d.ts.map +1 -1
  147. package/dist/design-system/TableUI/TableRowAction.d.ts +1 -1
  148. package/dist/design-system/TableUI/TableRowAction.d.ts.map +1 -1
  149. package/dist/design-system/TableUI/TableRowSelectCell.d.ts +1 -1
  150. package/dist/design-system/TableUI/TableRowSelectCell.d.ts.map +1 -1
  151. package/dist/design-system/TableUI/index.d.ts +0 -1
  152. package/dist/design-system/TableUI/index.d.ts.map +1 -1
  153. package/dist/design-system/TableUI/tableStyles.d.ts +2 -1
  154. package/dist/design-system/TableUI/tableStyles.d.ts.map +1 -1
  155. package/dist/design-system/Tabs/index.d.ts +1 -0
  156. package/dist/design-system/Tabs/index.d.ts.map +1 -1
  157. package/dist/design-system/Tag/index.d.ts.map +1 -1
  158. package/dist/design-system/Tooltip/InfoTooltip.d.ts +9 -0
  159. package/dist/design-system/Tooltip/InfoTooltip.d.ts.map +1 -0
  160. package/dist/design-system/Tooltip/Tooltip.d.ts +8 -0
  161. package/dist/design-system/Tooltip/Tooltip.d.ts.map +1 -1
  162. package/dist/design-system/Tooltip/index.d.ts +1 -0
  163. package/dist/design-system/Tooltip/index.d.ts.map +1 -1
  164. package/dist/design-system/Tree/Tree.d.ts +2 -2
  165. package/dist/design-system/Tree/Tree.d.ts.map +1 -1
  166. package/dist/design-system/TypeaheadCombobox/CountBadge.d.ts +7 -0
  167. package/dist/design-system/TypeaheadCombobox/CountBadge.d.ts.map +1 -0
  168. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts +11 -0
  169. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts.map +1 -0
  170. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts +11 -0
  171. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts.map +1 -0
  172. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts +17 -0
  173. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts.map +1 -0
  174. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts +9 -0
  175. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts.map +1 -0
  176. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts +17 -0
  177. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts.map +1 -0
  178. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts +19 -0
  179. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts.map +1 -0
  180. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts +16 -0
  181. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts.map +1 -0
  182. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts +13 -0
  183. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts.map +1 -0
  184. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts +2 -0
  185. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts.map +1 -0
  186. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts +13 -0
  187. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts.map +1 -0
  188. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts +2 -0
  189. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts.map +1 -0
  190. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxToggleButton.d.ts +12 -0
  191. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxToggleButton.d.ts.map +1 -0
  192. package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts +24 -0
  193. package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts.map +1 -0
  194. package/dist/design-system/TypeaheadCombobox/hooks/index.d.ts +3 -0
  195. package/dist/design-system/TypeaheadCombobox/hooks/index.d.ts.map +1 -0
  196. package/dist/design-system/TypeaheadCombobox/hooks/useTypeaheadComboboxContext.d.ts +2 -0
  197. package/dist/design-system/TypeaheadCombobox/hooks/useTypeaheadComboboxContext.d.ts.map +1 -0
  198. package/dist/design-system/TypeaheadCombobox/index.d.ts +13 -0
  199. package/dist/design-system/TypeaheadCombobox/index.d.ts.map +1 -0
  200. package/dist/design-system/TypeaheadCombobox/providers/TypeaheadComboboxContext.d.ts +14 -0
  201. package/dist/design-system/TypeaheadCombobox/providers/TypeaheadComboboxContext.d.ts.map +1 -0
  202. package/dist/design-system/Typography/Hint.d.ts +14 -0
  203. package/dist/design-system/Typography/Hint.d.ts.map +1 -0
  204. package/dist/design-system/Typography/Link.d.ts.map +1 -1
  205. package/dist/design-system/Typography/Paragraph.d.ts.map +1 -1
  206. package/dist/design-system/Typography/Text.d.ts +3 -0
  207. package/dist/design-system/Typography/Text.d.ts.map +1 -1
  208. package/dist/design-system/Typography/Title.d.ts.map +1 -1
  209. package/dist/design-system/Typography/Typography.d.ts +2 -0
  210. package/dist/design-system/Typography/Typography.d.ts.map +1 -1
  211. package/dist/design-system/_shared_/Combobox/ClearSelectionButton.d.ts +5 -0
  212. package/dist/design-system/_shared_/Combobox/ClearSelectionButton.d.ts.map +1 -0
  213. package/dist/design-system/_shared_/Combobox/EmptyResults.d.ts +2 -0
  214. package/dist/design-system/_shared_/Combobox/EmptyResults.d.ts.map +1 -0
  215. package/dist/design-system/_shared_/Combobox/HintRow.d.ts +8 -0
  216. package/dist/design-system/_shared_/Combobox/HintRow.d.ts.map +1 -0
  217. package/dist/design-system/_shared_/Combobox/LoadingSpinner.d.ts +2 -0
  218. package/dist/design-system/_shared_/Combobox/LoadingSpinner.d.ts.map +1 -0
  219. package/dist/design-system/_shared_/Combobox/SectionHeader.d.ts +2 -0
  220. package/dist/design-system/_shared_/Combobox/SectionHeader.d.ts.map +1 -0
  221. package/dist/design-system/_shared_/Combobox/Separator.d.ts +2 -0
  222. package/dist/design-system/_shared_/Combobox/Separator.d.ts.map +1 -0
  223. package/dist/design-system/_shared_/Combobox/index.d.ts +8 -0
  224. package/dist/design-system/_shared_/Combobox/index.d.ts.map +1 -0
  225. package/dist/design-system/_shared_/Combobox/styles.d.ts +14 -0
  226. package/dist/design-system/_shared_/Combobox/styles.d.ts.map +1 -0
  227. package/dist/design-system/_shared_/index.d.ts +2 -0
  228. package/dist/design-system/_shared_/index.d.ts.map +1 -0
  229. package/dist/design-system/index.d.ts +5 -0
  230. package/dist/design-system/index.d.ts.map +1 -1
  231. package/dist/design-system/types.d.ts +3 -2
  232. package/dist/design-system/types.d.ts.map +1 -1
  233. package/dist/design-system/utils/index.d.ts +1 -0
  234. package/dist/design-system/utils/index.d.ts.map +1 -1
  235. package/dist/design-system/utils/useStableUid.d.ts +2 -0
  236. package/dist/design-system/utils/useStableUid.d.ts.map +1 -0
  237. package/dist/design-system/utils/useUniqueId.d.ts +2 -0
  238. package/dist/design-system/utils/useUniqueId.d.ts.map +1 -0
  239. package/dist/development/ChatUI/MessageHeader.d.ts.map +1 -1
  240. package/dist/development/ContextMenu/ContextMenu.d.ts +58 -0
  241. package/dist/development/ContextMenu/ContextMenu.d.ts.map +1 -0
  242. package/dist/development/ContextMenu/index.d.ts +2 -0
  243. package/dist/development/ContextMenu/index.d.ts.map +1 -0
  244. package/dist/development/index.d.ts +2 -1
  245. package/dist/development/index.d.ts.map +1 -1
  246. package/dist/development.js +323 -133
  247. package/dist/development.js.map +1 -1
  248. package/dist/flags.d.ts +0 -1
  249. package/dist/flags.d.ts.map +1 -1
  250. package/dist/index-dark.css +230 -3520
  251. package/dist/index.css +230 -3520
  252. package/dist/index.js +5866 -4112
  253. package/dist/index.js.map +1 -1
  254. package/dist/rollup/less.d.ts +2 -0
  255. package/dist/rollup/less.d.ts.map +1 -0
  256. package/dist/styles.js +1 -0
  257. package/dist/styles.js.map +1 -0
  258. package/dist/test-utils/common.d.ts +2 -0
  259. package/dist/test-utils/common.d.ts.map +1 -1
  260. package/dist/test-utils/enzyme/index.d.ts +1 -1
  261. package/dist/test-utils/enzyme/index.d.ts.map +1 -1
  262. package/dist/test-utils/enzyme/selectEvent.d.ts +13 -7
  263. package/dist/test-utils/enzyme/selectEvent.d.ts.map +1 -1
  264. package/dist/test-utils/enzyme/table.d.ts +3 -3
  265. package/dist/test-utils/enzyme/table.d.ts.map +1 -1
  266. package/dist/test-utils/enzyme/utils.d.ts +1 -1
  267. package/dist/test-utils/enzyme/utils.d.ts.map +1 -1
  268. package/dist/test-utils/enzyme.js +39 -15
  269. package/dist/test-utils/enzyme.js.map +1 -1
  270. package/dist/test-utils/rtl/selectEvent.d.ts +6 -0
  271. package/dist/test-utils/rtl/selectEvent.d.ts.map +1 -1
  272. package/dist/test-utils/rtl.js +66 -18
  273. package/dist/test-utils/rtl.js.map +1 -1
  274. package/dist/theme/colorList.d.ts +42 -0
  275. package/dist/theme/colorList.d.ts.map +1 -1
  276. package/dist/theme/colors.d.ts.map +1 -1
  277. package/package.json +30 -33
  278. package/dist/Spinner-140f57ac.js +0 -2525
  279. package/dist/Spinner-140f57ac.js.map +0 -1
  280. package/dist/Typography-1b037412.js +0 -2074
  281. package/dist/Typography-1b037412.js.map +0 -1
  282. package/dist/Typography-91d3d591.js.map +0 -1
  283. package/dist/Typography-e3d5ff23.js +0 -2083
  284. package/dist/Typography-e3d5ff23.js.map +0 -1
  285. package/dist/common-1fb3eeb9.js.map +0 -1
  286. package/dist/common-3ab0e300.js +0 -15
  287. package/dist/common-3ab0e300.js.map +0 -1
  288. package/dist/common-819b45d4.js +0 -15
  289. package/dist/common-819b45d4.js.map +0 -1
  290. package/dist/design-system/Button/Button.test.d.ts +0 -2
  291. package/dist/design-system/Button/Button.test.d.ts.map +0 -1
  292. package/dist/design-system/Checkbox/Checkbox.test.d.ts +0 -2
  293. package/dist/design-system/Checkbox/Checkbox.test.d.ts.map +0 -1
  294. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.test.d.ts +0 -2
  295. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.test.d.ts.map +0 -1
  296. package/dist/design-system/DesignSystemProvider/DesignSystemThemeProvider.test.d.ts +0 -2
  297. package/dist/design-system/DesignSystemProvider/DesignSystemThemeProvider.test.d.ts.map +0 -1
  298. package/dist/design-system/DialogCombobox/DialogComboboxEmpty.d.ts +0 -2
  299. package/dist/design-system/DialogCombobox/DialogComboboxEmpty.d.ts.map +0 -1
  300. package/dist/design-system/DialogCombobox/DialogComboboxLoadingSpinner.d.ts +0 -2
  301. package/dist/design-system/DialogCombobox/DialogComboboxLoadingSpinner.d.ts.map +0 -1
  302. package/dist/design-system/DialogCombobox/tests/DialogCombobox.test.d.ts +0 -2
  303. package/dist/design-system/DialogCombobox/tests/DialogCombobox.test.d.ts.map +0 -1
  304. package/dist/design-system/DialogCombobox/tests/DialogComboboxButtonContainer.test.d.ts +0 -2
  305. package/dist/design-system/DialogCombobox/tests/DialogComboboxButtonContainer.test.d.ts.map +0 -1
  306. package/dist/design-system/DialogCombobox/tests/DialogComboboxContent.test.d.ts +0 -2
  307. package/dist/design-system/DialogCombobox/tests/DialogComboboxContent.test.d.ts.map +0 -1
  308. package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionList.test.d.ts +0 -2
  309. package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionList.test.d.ts.map +0 -1
  310. package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionListCheckboxItem.test.d.ts +0 -2
  311. package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionListCheckboxItem.test.d.ts.map +0 -1
  312. package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionListSelectItem.test.d.ts +0 -2
  313. package/dist/design-system/DialogCombobox/tests/DialogComboboxOptionListSelectItem.test.d.ts.map +0 -1
  314. package/dist/design-system/DialogCombobox/tests/DialogComboboxTrigger.test.d.ts +0 -2
  315. package/dist/design-system/DialogCombobox/tests/DialogComboboxTrigger.test.d.ts.map +0 -1
  316. package/dist/design-system/DropdownMenu/DropdownMenu.test.d.ts +0 -2
  317. package/dist/design-system/DropdownMenu/DropdownMenu.test.d.ts.map +0 -1
  318. package/dist/design-system/Icon/__generated/icons/AppIcon.v2.d.ts +0 -4
  319. package/dist/design-system/Icon/__generated/icons/AppIcon.v2.d.ts.map +0 -1
  320. package/dist/design-system/Icon/__generated/icons/BinaryIcon.v2.d.ts +0 -4
  321. package/dist/design-system/Icon/__generated/icons/BinaryIcon.v2.d.ts.map +0 -1
  322. package/dist/design-system/Icon/__generated/icons/BoldIcon.v2.d.ts +0 -4
  323. package/dist/design-system/Icon/__generated/icons/BoldIcon.v2.d.ts.map +0 -1
  324. package/dist/design-system/Icon/__generated/icons/BracketsCurlyIcon.v2.d.ts +0 -4
  325. package/dist/design-system/Icon/__generated/icons/BracketsCurlyIcon.v2.d.ts.map +0 -1
  326. package/dist/design-system/Icon/__generated/icons/BracketsSquareIcon.v2.d.ts +0 -4
  327. package/dist/design-system/Icon/__generated/icons/BracketsSquareIcon.v2.d.ts.map +0 -1
  328. package/dist/design-system/Icon/__generated/icons/BracketsXIcon.v2.d.ts +0 -4
  329. package/dist/design-system/Icon/__generated/icons/BracketsXIcon.v2.d.ts.map +0 -1
  330. package/dist/design-system/Icon/__generated/icons/CatalogIcon.v2.d.ts +0 -4
  331. package/dist/design-system/Icon/__generated/icons/CatalogIcon.v2.d.ts.map +0 -1
  332. package/dist/design-system/Icon/__generated/icons/ChartLineIcon.v2.d.ts +0 -4
  333. package/dist/design-system/Icon/__generated/icons/ChartLineIcon.v2.d.ts.map +0 -1
  334. package/dist/design-system/Icon/__generated/icons/CheckCircleBadgeIcon.v2.d.ts +0 -4
  335. package/dist/design-system/Icon/__generated/icons/CheckCircleBadgeIcon.v2.d.ts.map +0 -1
  336. package/dist/design-system/Icon/__generated/icons/CloudKeyIcon.v2.d.ts +0 -4
  337. package/dist/design-system/Icon/__generated/icons/CloudKeyIcon.v2.d.ts.map +0 -1
  338. package/dist/design-system/Icon/__generated/icons/CloudModelIcon.v2.d.ts +0 -4
  339. package/dist/design-system/Icon/__generated/icons/CloudModelIcon.v2.d.ts.map +0 -1
  340. package/dist/design-system/Icon/__generated/icons/ColorFillIcon.v2.d.ts +0 -4
  341. package/dist/design-system/Icon/__generated/icons/ColorFillIcon.v2.d.ts.map +0 -1
  342. package/dist/design-system/Icon/__generated/icons/ConnectIcon.v2.d.ts +0 -4
  343. package/dist/design-system/Icon/__generated/icons/ConnectIcon.v2.d.ts.map +0 -1
  344. package/dist/design-system/Icon/__generated/icons/CursorIcon.v2.d.ts +0 -4
  345. package/dist/design-system/Icon/__generated/icons/CursorIcon.v2.d.ts.map +0 -1
  346. package/dist/design-system/Icon/__generated/icons/DagIcon.v2.d.ts +0 -4
  347. package/dist/design-system/Icon/__generated/icons/DagIcon.v2.d.ts.map +0 -1
  348. package/dist/design-system/Icon/__generated/icons/DecimalIcon.v2.d.ts +0 -4
  349. package/dist/design-system/Icon/__generated/icons/DecimalIcon.v2.d.ts.map +0 -1
  350. package/dist/design-system/Icon/__generated/icons/DotsCircleIcon.v2.d.ts +0 -4
  351. package/dist/design-system/Icon/__generated/icons/DotsCircleIcon.v2.d.ts.map +0 -1
  352. package/dist/design-system/Icon/__generated/icons/FontIcon.v2.d.ts +0 -4
  353. package/dist/design-system/Icon/__generated/icons/FontIcon.v2.d.ts.map +0 -1
  354. package/dist/design-system/Icon/__generated/icons/FunctionIcon.v2.d.ts +0 -4
  355. package/dist/design-system/Icon/__generated/icons/FunctionIcon.v2.d.ts.map +0 -1
  356. package/dist/design-system/Icon/__generated/icons/GiftIcon.v2.d.ts +0 -4
  357. package/dist/design-system/Icon/__generated/icons/GiftIcon.v2.d.ts.map +0 -1
  358. package/dist/design-system/Icon/__generated/icons/ItalicIcon.v2.d.ts +0 -4
  359. package/dist/design-system/Icon/__generated/icons/ItalicIcon.v2.d.ts.map +0 -1
  360. package/dist/design-system/Icon/__generated/icons/LettersIcon.v2.d.ts +0 -4
  361. package/dist/design-system/Icon/__generated/icons/LettersIcon.v2.d.ts.map +0 -1
  362. package/dist/design-system/Icon/__generated/icons/MenuIcon.v2.d.ts +0 -4
  363. package/dist/design-system/Icon/__generated/icons/MenuIcon.v2.d.ts.map +0 -1
  364. package/dist/design-system/Icon/__generated/icons/NotificationOffIcon.v2.d.ts +0 -4
  365. package/dist/design-system/Icon/__generated/icons/NotificationOffIcon.v2.d.ts.map +0 -1
  366. package/dist/design-system/Icon/__generated/icons/NumbersIcon.v2.d.ts +0 -4
  367. package/dist/design-system/Icon/__generated/icons/NumbersIcon.v2.d.ts.map +0 -1
  368. package/dist/design-system/Icon/__generated/icons/PipelineIcon.v2.d.ts +0 -4
  369. package/dist/design-system/Icon/__generated/icons/PipelineIcon.v2.d.ts.map +0 -1
  370. package/dist/design-system/Icon/__generated/icons/PlugIcon.v2.d.ts +0 -4
  371. package/dist/design-system/Icon/__generated/icons/PlugIcon.v2.d.ts.map +0 -1
  372. package/dist/design-system/Icon/__generated/icons/ReposIcon.d.ts +0 -4
  373. package/dist/design-system/Icon/__generated/icons/ReposIcon.d.ts.map +0 -1
  374. package/dist/design-system/Icon/__generated/icons/SaveIcon.v2.d.ts +0 -4
  375. package/dist/design-system/Icon/__generated/icons/SaveIcon.v2.d.ts.map +0 -1
  376. package/dist/design-system/Icon/__generated/icons/SlidersIcon.v2.d.ts +0 -4
  377. package/dist/design-system/Icon/__generated/icons/SlidersIcon.v2.d.ts.map +0 -1
  378. package/dist/design-system/Icon/__generated/icons/SortAscendingIcon.v2.d.ts +0 -4
  379. package/dist/design-system/Icon/__generated/icons/SortAscendingIcon.v2.d.ts.map +0 -1
  380. package/dist/design-system/Icon/__generated/icons/SortDescendingIcon.v2.d.ts +0 -4
  381. package/dist/design-system/Icon/__generated/icons/SortDescendingIcon.v2.d.ts.map +0 -1
  382. package/dist/design-system/Icon/__generated/icons/SortUnsortedIcon.v2.d.ts +0 -4
  383. package/dist/design-system/Icon/__generated/icons/SortUnsortedIcon.v2.d.ts.map +0 -1
  384. package/dist/design-system/Icon/__generated/icons/StorefrontIcon.v2.d.ts +0 -4
  385. package/dist/design-system/Icon/__generated/icons/StorefrontIcon.v2.d.ts.map +0 -1
  386. package/dist/design-system/Icon/__generated/icons/TextBoxIcon.v2.d.ts +0 -4
  387. package/dist/design-system/Icon/__generated/icons/TextBoxIcon.v2.d.ts.map +0 -1
  388. package/dist/design-system/Icon/__generated/icons/UnderlineIcon.v2.d.ts +0 -4
  389. package/dist/design-system/Icon/__generated/icons/UnderlineIcon.v2.d.ts.map +0 -1
  390. package/dist/design-system/Icon/__generated/icons/VariableIcon.d.ts +0 -4
  391. package/dist/design-system/Icon/__generated/icons/VariableIcon.d.ts.map +0 -1
  392. package/dist/design-system/Icon/__generated/icons/VariableIcon.v2.d.ts +0 -4
  393. package/dist/design-system/Icon/__generated/icons/VariableIcon.v2.d.ts.map +0 -1
  394. package/dist/design-system/Icon/__generated/icons/WorkspacesIcon.v2.d.ts +0 -4
  395. package/dist/design-system/Icon/__generated/icons/WorkspacesIcon.v2.d.ts.map +0 -1
  396. package/dist/design-system/Input/Input.test.d.ts +0 -2
  397. package/dist/design-system/Input/Input.test.d.ts.map +0 -1
  398. package/dist/design-system/LegacyNotification/LegacyNotification.test.d.ts +0 -2
  399. package/dist/design-system/LegacyNotification/LegacyNotification.test.d.ts.map +0 -1
  400. package/dist/design-system/Modal/Modal.test.d.ts +0 -2
  401. package/dist/design-system/Modal/Modal.test.d.ts.map +0 -1
  402. package/dist/design-system/Notification/Notification.test.d.ts +0 -2
  403. package/dist/design-system/Notification/Notification.test.d.ts.map +0 -1
  404. package/dist/design-system/NotificationV2/NotificationV2.d.ts +0 -24
  405. package/dist/design-system/NotificationV2/NotificationV2.d.ts.map +0 -1
  406. package/dist/design-system/NotificationV2/index.d.ts +0 -2
  407. package/dist/design-system/NotificationV2/index.d.ts.map +0 -1
  408. package/dist/design-system/Popover/Popover.test.d.ts +0 -2
  409. package/dist/design-system/Popover/Popover.test.d.ts.map +0 -1
  410. package/dist/design-system/PopoverV2/PopoverV2.d.ts +0 -11
  411. package/dist/design-system/PopoverV2/PopoverV2.d.ts.map +0 -1
  412. package/dist/design-system/PopoverV2/PopoverV2.test.d.ts +0 -2
  413. package/dist/design-system/PopoverV2/PopoverV2.test.d.ts.map +0 -1
  414. package/dist/design-system/PopoverV2/index.d.ts +0 -2
  415. package/dist/design-system/PopoverV2/index.d.ts.map +0 -1
  416. package/dist/design-system/Sidebar/Sidebar.test.d.ts +0 -2
  417. package/dist/design-system/Sidebar/Sidebar.test.d.ts.map +0 -1
  418. package/dist/design-system/Skeleton/Skeleton.d.ts +0 -15
  419. package/dist/design-system/Skeleton/Skeleton.d.ts.map +0 -1
  420. package/dist/design-system/Table/Table.d.ts +0 -17
  421. package/dist/design-system/Table/Table.d.ts.map +0 -1
  422. package/dist/design-system/Table/index.d.ts +0 -2
  423. package/dist/design-system/Table/index.d.ts.map +0 -1
  424. package/dist/design-system/TableUI/TableSkeleton.d.ts.map +0 -1
  425. package/dist/design-system/TableUI/TableUI.test.d.ts +0 -2
  426. package/dist/design-system/TableUI/TableUI.test.d.ts.map +0 -1
  427. package/dist/design-system/utils/accessibility.test.d.ts +0 -2
  428. package/dist/design-system/utils/accessibility.test.d.ts.map +0 -1
  429. package/dist/design-system/utils/safex.test.d.ts +0 -2
  430. package/dist/design-system/utils/safex.test.d.ts.map +0 -1
  431. package/dist/development/Filter/Filter.d.ts +0 -10
  432. package/dist/development/Filter/Filter.d.ts.map +0 -1
  433. package/dist/development/Filter/Filter.test.d.ts +0 -2
  434. package/dist/development/Filter/Filter.test.d.ts.map +0 -1
  435. package/dist/development/Filter/FilterButtonContainer.d.ts +0 -2
  436. package/dist/development/Filter/FilterButtonContainer.d.ts.map +0 -1
  437. package/dist/development/Filter/FilterContent.d.ts +0 -14
  438. package/dist/development/Filter/FilterContent.d.ts.map +0 -1
  439. package/dist/development/Filter/FilterCountBadge.d.ts +0 -2
  440. package/dist/development/Filter/FilterCountBadge.d.ts.map +0 -1
  441. package/dist/development/Filter/FilterLoadingSpinner.d.ts +0 -2
  442. package/dist/development/Filter/FilterLoadingSpinner.d.ts.map +0 -1
  443. package/dist/development/Filter/FilterOptionControlledList.d.ts +0 -9
  444. package/dist/development/Filter/FilterOptionControlledList.d.ts.map +0 -1
  445. package/dist/development/Filter/FilterOptionList.d.ts +0 -10
  446. package/dist/development/Filter/FilterOptionList.d.ts.map +0 -1
  447. package/dist/development/Filter/FilterOptionListCheckboxItem.d.ts +0 -11
  448. package/dist/development/Filter/FilterOptionListCheckboxItem.d.ts.map +0 -1
  449. package/dist/development/Filter/FilterOptionListSearch.d.ts +0 -7
  450. package/dist/development/Filter/FilterOptionListSearch.d.ts.map +0 -1
  451. package/dist/development/Filter/FilterOptionListSelectItem.d.ts +0 -10
  452. package/dist/development/Filter/FilterOptionListSelectItem.d.ts.map +0 -1
  453. package/dist/development/Filter/FilterSectionHeader.d.ts +0 -2
  454. package/dist/development/Filter/FilterSectionHeader.d.ts.map +0 -1
  455. package/dist/development/Filter/FilterSeparator.d.ts +0 -2
  456. package/dist/development/Filter/FilterSeparator.d.ts.map +0 -1
  457. package/dist/development/Filter/FilterTrigger.d.ts +0 -15
  458. package/dist/development/Filter/FilterTrigger.d.ts.map +0 -1
  459. package/dist/development/Filter/hooks/useFilterContext.d.ts +0 -2
  460. package/dist/development/Filter/hooks/useFilterContext.d.ts.map +0 -1
  461. package/dist/development/Filter/hooks/useFilterOptionListContext.d.ts +0 -2
  462. package/dist/development/Filter/hooks/useFilterOptionListContext.d.ts.map +0 -1
  463. package/dist/development/Filter/index.d.ts +0 -14
  464. package/dist/development/Filter/index.d.ts.map +0 -1
  465. package/dist/development/Filter/providers/FilterContext.d.ts +0 -15
  466. package/dist/development/Filter/providers/FilterContext.d.ts.map +0 -1
  467. package/dist/development/Filter/providers/FilterOptionListContext.d.ts +0 -10
  468. package/dist/development/Filter/providers/FilterOptionListContext.d.ts.map +0 -1
  469. package/dist/development/Filter/shared.d.ts +0 -3
  470. package/dist/development/Filter/shared.d.ts.map +0 -1
  471. package/dist/development/ListPagePattern/index.d.ts +0 -1
  472. package/dist/development/ListPagePattern/index.d.ts.map +0 -1
  473. package/dist/development/SelectV2/Select.d.ts +0 -7
  474. package/dist/development/SelectV2/Select.d.ts.map +0 -1
  475. package/dist/development/SelectV2/SelectContent.d.ts +0 -6
  476. package/dist/development/SelectV2/SelectContent.d.ts.map +0 -1
  477. package/dist/development/SelectV2/SelectOption.d.ts +0 -6
  478. package/dist/development/SelectV2/SelectOption.d.ts.map +0 -1
  479. package/dist/development/SelectV2/SelectOptionGroup.d.ts +0 -7
  480. package/dist/development/SelectV2/SelectOptionGroup.d.ts.map +0 -1
  481. package/dist/development/SelectV2/SelectTrigger.d.ts +0 -6
  482. package/dist/development/SelectV2/SelectTrigger.d.ts.map +0 -1
  483. package/dist/development/SelectV2/hooks/useSelectContext.d.ts +0 -2
  484. package/dist/development/SelectV2/hooks/useSelectContext.d.ts.map +0 -1
  485. package/dist/development/SelectV2/index.d.ts +0 -6
  486. package/dist/development/SelectV2/index.d.ts.map +0 -1
  487. package/dist/development/SelectV2/providers/SelectContext.d.ts +0 -11
  488. package/dist/development/SelectV2/providers/SelectContext.d.ts.map +0 -1
  489. package/dist/development/TableUI/TableUI.test.d.ts +0 -2
  490. package/dist/development/TableUI/TableUI.test.d.ts.map +0 -1
  491. package/dist/development/TableUI/index.d.ts +0 -75
  492. package/dist/development/TableUI/index.d.ts.map +0 -1
  493. package/dist/index-mfe-dark.css +0 -17525
  494. package/dist/index-mfe.css +0 -17184
  495. package/dist/rollup-less-tilde-importer.d.ts +0 -3
  496. package/dist/rollup-less-tilde-importer.d.ts.map +0 -1
  497. package/dist/test-utils/enzyme/selectEvent.test.d.ts +0 -2
  498. package/dist/test-utils/enzyme/selectEvent.test.d.ts.map +0 -1
  499. package/dist/test-utils/enzyme/table.test.d.ts +0 -2
  500. package/dist/test-utils/enzyme/table.test.d.ts.map +0 -1
  501. package/dist/test-utils/rtl/selectEvent.test.d.ts +0 -2
  502. package/dist/test-utils/rtl/selectEvent.test.d.ts.map +0 -1
  503. package/dist/test-utils/rtl/table.test.d.ts +0 -2
  504. package/dist/test-utils/rtl/table.test.d.ts.map +0 -1
  505. package/dist/tsconfig.build.tsbuildinfo +0 -1
  506. package/dist/useDesignSystemTheme-1e16bcf5.js +0 -441
  507. package/dist/useDesignSystemTheme-1e16bcf5.js.map +0 -1
  508. package/dist/useDesignSystemTheme-3d2c1acb.js +0 -440
  509. package/dist/useDesignSystemTheme-3d2c1acb.js.map +0 -1
  510. package/dist/useDesignSystemTheme-6e6f5867.js +0 -441
  511. package/dist/useDesignSystemTheme-6e6f5867.js.map +0 -1
  512. package/dist/useDesignSystemTheme-ac536b0f.js +0 -443
  513. package/dist/useDesignSystemTheme-ac536b0f.js.map +0 -1
  514. package/dist/useDesignSystemTheme-c859571c.js +0 -468
  515. package/dist/useDesignSystemTheme-c859571c.js.map +0 -1
  516. package/dist/useDesignSystemTheme-c867a35d.js +0 -470
  517. package/dist/useDesignSystemTheme-c867a35d.js.map +0 -1
  518. package/dist/useDesignSystemTheme-ef39204e.js +0 -468
  519. package/dist/useDesignSystemTheme-ef39204e.js.map +0 -1
@@ -1,2074 +0,0 @@
1
- import React__default, { createContext, useContext, useMemo, useEffect, forwardRef } from 'react';
2
- import { jsx, jsxs } from '@emotion/react/jsx-runtime';
3
- import { useTheme, ThemeProvider, css } from '@emotion/react';
4
- import { notification, ConfigProvider, Button as Button$1, Input as Input$1, Typography as Typography$1 } from 'antd';
5
- import chroma from 'chroma-js';
6
- import AntDIcon from '@ant-design/icons';
7
- import _isNil from 'lodash/isNil';
8
- import _endsWith from 'lodash/endsWith';
9
- import _isBoolean from 'lodash/isBoolean';
10
- import _isNumber from 'lodash/isNumber';
11
- import _isString from 'lodash/isString';
12
- import _mapValues from 'lodash/mapValues';
13
- import unitless from '@emotion/unitless';
14
-
15
- // Border variables
16
- const borders = {
17
- borderRadiusMd: 4
18
- };
19
-
20
- // eslint-disable-next-line import/no-anonymous-default-export
21
- var borders$1 = {
22
- ...borders
23
- };
24
-
25
- /**
26
- * These values are based on AntD's breakpoints which follow BootStrap 4 media query rules.
27
- * The numerical values represent the min-width of the given size.
28
- * AntD values: https://ant.design/components/grid#col
29
- * Bootstrap: https://getbootstrap.com/docs/4.0/layout/overview/#responsive-breakpoints
30
- */
31
-
32
- const breakpoints = {
33
- xs: 0,
34
- sm: 576,
35
- md: 768,
36
- lg: 992,
37
- xl: 1200,
38
- xxl: 1600
39
- };
40
- const mediaQueries = {
41
- xs: '@media (max-width: 575.98px)',
42
- sm: `@media (min-width: ${breakpoints.sm}px)`,
43
- md: `@media (min-width: ${breakpoints.md}px)`,
44
- lg: `@media (min-width: ${breakpoints.lg}px)`,
45
- xl: `@media (min-width: ${breakpoints.xl}px)`,
46
- xxl: `@media (min-width: ${breakpoints.xxl}px)`
47
- };
48
- const responsive = {
49
- breakpoints,
50
- mediaQueries
51
- };
52
- var responsive$1 = responsive;
53
-
54
- // Exported from go/designsystem/colorsheet
55
- const colorPalettePrimary = {
56
- primary: '#2272B4',
57
- blue100: '#F0F8FF',
58
- blue200: '#D7EDFE',
59
- blue300: '#BAE1FC',
60
- blue400: '#8FCDFF',
61
- blue500: '#4299E0',
62
- blue600: '#2272B4',
63
- blue700: '#0E538B',
64
- blue800: '#04355D',
65
- green100: '#F3FCF6',
66
- green200: '#D4F7DF',
67
- green300: '#B1ECC5',
68
- green400: '#8DDDA8',
69
- green500: '#3CAA60',
70
- green600: '#277C43',
71
- green700: '#115026',
72
- green800: '#093919',
73
- white: '#FFFFFF',
74
- grey100: '#F2F5F7',
75
- grey200: '#E4ECF1',
76
- grey300: '#CDDAE5',
77
- grey400: '#BDCDDB',
78
- grey500: '#8196A7',
79
- grey600: '#5D7283',
80
- grey700: '#44535F',
81
- grey800: '#1F272D',
82
- red100: '#FFF5F7',
83
- red200: '#FDE2E8',
84
- red300: '#FBD0D8',
85
- red400: '#F792A6',
86
- red500: '#E65B77',
87
- red600: '#C82D4C',
88
- red700: '#9E102C',
89
- red800: '#630316',
90
- yellow100: '#FFF9EB',
91
- yellow200: '#FCEACA',
92
- yellow300: '#F8D4A5',
93
- yellow400: '#F2BE88',
94
- yellow500: '#DE7921',
95
- yellow600: '#BE501E',
96
- yellow700: '#93320B',
97
- yellow800: '#5F1B02'
98
- };
99
- const colorPaletteSecondary = {
100
- brown: '#A6630C',
101
- coral: '#C83243',
102
- charcoal: '#5D7283',
103
- indigo: '#434A93',
104
- lemon: '#FACB66',
105
- lime: '#308613',
106
- pink: '#B45091',
107
- purple: '#8A63BF',
108
- teal: '#04867D',
109
- turquoise: '#157CBC'
110
- };
111
- const lightColorList = {
112
- backgroundPrimary: colorPalettePrimary.white,
113
- actionDangerPrimaryBackgroundDefault: colorPalettePrimary.red600,
114
- actionDangerPrimaryBackgroundHover: colorPalettePrimary.red700,
115
- actionDangerPrimaryBackgroundPress: colorPalettePrimary.red800,
116
- actionDangerDefaultBackgroundDefault: chroma(colorPalettePrimary.red600).alpha(0).hex(),
117
- actionDangerDefaultBackgroundHover: chroma(colorPalettePrimary.red600).alpha(0.08).hex(),
118
- actionDangerDefaultBackgroundPress: chroma(colorPalettePrimary.red600).alpha(0.16).hex(),
119
- actionDangerDefaultBorderDefault: colorPalettePrimary.red600,
120
- actionDangerDefaultBorderHover: colorPalettePrimary.red700,
121
- actionDangerDefaultBorderPress: colorPalettePrimary.red800,
122
- actionDangerDefaultTextDefault: colorPalettePrimary.red600,
123
- actionDangerDefaultTextHover: colorPalettePrimary.red700,
124
- actionDangerDefaultTextPress: colorPalettePrimary.red800,
125
- actionDefaultBackgroundDefault: chroma(colorPalettePrimary.blue800).alpha(0).hex(),
126
- actionDefaultBackgroundHover: chroma(colorPalettePrimary.blue600).alpha(0.08).hex(),
127
- actionDefaultBackgroundPress: chroma(colorPalettePrimary.blue600).alpha(0.16).hex(),
128
- actionDefaultBorderDefault: colorPalettePrimary.grey300,
129
- actionDefaultBorderFocus: colorPalettePrimary.blue600,
130
- actionDefaultBorderHover: colorPalettePrimary.blue700,
131
- actionDefaultBorderPress: colorPalettePrimary.blue800,
132
- actionDefaultTextDefault: colorPalettePrimary.grey800,
133
- actionDefaultTextHover: colorPalettePrimary.blue700,
134
- actionDefaultTextPress: colorPalettePrimary.blue800,
135
- actionDisabledBackground: colorPalettePrimary.grey200,
136
- actionDisabledText: colorPalettePrimary.grey400,
137
- actionPrimaryBackgroundDefault: colorPalettePrimary.blue600,
138
- actionPrimaryBackgroundHover: colorPalettePrimary.blue700,
139
- actionPrimaryBackgroundPress: colorPalettePrimary.blue800,
140
- actionPrimaryTextDefault: colorPalettePrimary.white,
141
- actionPrimaryTextHover: colorPalettePrimary.white,
142
- actionPrimaryTextPress: colorPalettePrimary.white,
143
- actionTertiaryBackgroundDefault: chroma(colorPalettePrimary.blue600).alpha(0).hex(),
144
- actionTertiaryBackgroundHover: chroma(colorPalettePrimary.blue600).alpha(0.08).hex(),
145
- actionTertiaryBackgroundPress: chroma(colorPalettePrimary.blue600).alpha(0.16).hex(),
146
- actionTertiaryTextDefault: colorPalettePrimary.blue600,
147
- actionTertiaryTextHover: colorPalettePrimary.blue700,
148
- actionTertiaryTextPress: colorPalettePrimary.blue800,
149
- backgroundDanger: chroma(colorPalettePrimary.red100).alpha(0.08).hex(),
150
- backgroundSecondary: colorPalettePrimary.grey100,
151
- backgroundWarning: chroma(colorPalettePrimary.yellow100).alpha(0.08).hex(),
152
- backgroundValidationDanger: colorPalettePrimary.red100,
153
- backgroundValidationSuccess: colorPalettePrimary.blue100,
154
- backgroundValidationWarning: colorPalettePrimary.yellow100,
155
- border: colorPalettePrimary.grey300,
156
- borderDecorative: colorPalettePrimary.grey200,
157
- borderValidationDanger: colorPalettePrimary.red300,
158
- borderValidationWarning: colorPalettePrimary.yellow300,
159
- textPrimary: colorPalettePrimary.grey800,
160
- textSecondary: colorPalettePrimary.grey600,
161
- textPlaceholder: colorPalettePrimary.grey400,
162
- textValidationDanger: colorPalettePrimary.red600,
163
- textValidationSuccess: colorPalettePrimary.green600,
164
- textValidationWarning: colorPalettePrimary.yellow600,
165
- textValidationInfo: colorPalettePrimary.grey600,
166
- overlayOverlay: chroma(colorPalettePrimary.grey100).alpha(0.72).hex(),
167
- // Tags
168
- tagDefault: chroma(colorPalettePrimary.grey600).alpha(0.08).hex(),
169
- tagBrown: colorPaletteSecondary.brown,
170
- tagCoral: colorPaletteSecondary.coral,
171
- tagCharcoal: colorPalettePrimary.grey600,
172
- tagIndigo: colorPaletteSecondary.indigo,
173
- tagLemon: colorPaletteSecondary.lemon,
174
- tagLime: colorPaletteSecondary.lime,
175
- tagPink: colorPaletteSecondary.pink,
176
- tagPurple: colorPaletteSecondary.purple,
177
- tagTeal: colorPaletteSecondary.teal,
178
- tagTurquoise: colorPaletteSecondary.turquoise,
179
- tagText: colorPalettePrimary.white,
180
- tagHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
181
- tagPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
182
- tagIconHover: chroma(colorPalettePrimary.white).alpha(0.8).hex(),
183
- tagIconPress: chroma(colorPalettePrimary.white).alpha(0.76).hex(),
184
- // Typography
185
- typographyCodeBg: chroma(colorPalettePrimary.grey600).alpha(0.08).hex(),
186
- // Table
187
- tableRowHover: chroma(colorPalettePrimary.grey600).alpha(0.04).hex(),
188
- tooltipBackgroundTooltip: colorPalettePrimary.grey800
189
- };
190
- const darkColorList = {
191
- actionDangerPrimaryBackgroundDefault: chroma(colorPalettePrimary.red400).alpha(0.84).hex(),
192
- actionDangerPrimaryBackgroundHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
193
- actionDangerPrimaryBackgroundPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
194
- actionDangerDefaultBackgroundDefault: chroma(colorPalettePrimary.red400).alpha(0).hex(),
195
- actionDangerDefaultBackgroundHover: chroma(colorPalettePrimary.red400).alpha(0.08).hex(),
196
- actionDangerDefaultBackgroundPress: chroma(colorPalettePrimary.red400).alpha(0.16).hex(),
197
- actionDangerDefaultBorderDefault: colorPalettePrimary.red400,
198
- actionDangerDefaultBorderHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
199
- actionDangerDefaultBorderPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
200
- actionDangerDefaultTextDefault: colorPalettePrimary.red400,
201
- actionDangerDefaultTextHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
202
- actionDangerDefaultTextPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
203
- actionDefaultBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0).hex(),
204
- actionDefaultBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
205
- actionDefaultBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
206
- actionDefaultBorderDefault: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
207
- actionDefaultBorderFocus: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
208
- actionDefaultBorderHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
209
- actionDefaultBorderPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
210
- actionDefaultTextDefault: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
211
- actionDefaultTextHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
212
- actionDefaultTextPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
213
- actionDisabledBackground: chroma(colorPalettePrimary.white).alpha(0.24).hex(),
214
- actionDisabledText: chroma(colorPalettePrimary.white).alpha(0.4).hex(),
215
- actionPrimaryBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
216
- actionPrimaryBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
217
- actionPrimaryBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
218
- actionPrimaryTextDefault: colorPalettePrimary.grey800,
219
- actionPrimaryTextHover: colorPalettePrimary.grey800,
220
- actionPrimaryTextPress: colorPalettePrimary.grey800,
221
- actionTertiaryBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0).hex(),
222
- actionTertiaryBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
223
- actionTertiaryBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
224
- actionTertiaryTextDefault: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
225
- actionTertiaryTextHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
226
- actionTertiaryTextPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
227
- backgroundPrimary: colorPalettePrimary.grey800,
228
- backgroundSecondary: '#283035',
229
- backgroundValidationDanger: 'transparent',
230
- backgroundValidationSuccess: 'transparent',
231
- backgroundValidationWarning: 'transparent',
232
- border: chroma(colorPalettePrimary.white).alpha(0.48).hex(),
233
- borderDecorative: chroma(colorPalettePrimary.white).alpha(0.24).hex(),
234
- borderValidationDanger: colorPalettePrimary.red300,
235
- borderValidationWarning: colorPalettePrimary.yellow300,
236
- textPrimary: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
237
- textSecondary: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
238
- textPlaceholder: chroma(colorPalettePrimary.grey400).alpha(0.84).hex(),
239
- textValidationDanger: chroma(colorPalettePrimary.red400).alpha(0.84).hex(),
240
- textValidationSuccess: chroma(colorPalettePrimary.green400).alpha(0.84).hex(),
241
- textValidationWarning: chroma(colorPalettePrimary.yellow400).alpha(0.84).hex(),
242
- textValidationInfo: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
243
- overlayOverlay: chroma(colorPalettePrimary.grey800).alpha(0.72).hex(),
244
- // Tags
245
- tagDefault: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
246
- tagBrown: chroma(colorPaletteSecondary.brown).alpha(0.84).hex(),
247
- tagCoral: chroma(colorPaletteSecondary.coral).alpha(0.84).hex(),
248
- tagCharcoal: chroma(colorPalettePrimary.grey600).alpha(0.84).hex(),
249
- tagIndigo: chroma(colorPaletteSecondary.indigo).alpha(0.84).hex(),
250
- tagLemon: chroma(colorPaletteSecondary.lemon).alpha(0.84).hex(),
251
- tagLime: chroma(colorPaletteSecondary.lime).alpha(0.84).hex(),
252
- tagPink: chroma(colorPaletteSecondary.pink).alpha(0.84).hex(),
253
- tagPurple: chroma(colorPaletteSecondary.purple).alpha(0.84).hex(),
254
- tagTeal: chroma(colorPaletteSecondary.teal).alpha(0.84).hex(),
255
- tagTurquoise: chroma(colorPaletteSecondary.turquoise).alpha(0.84).hex(),
256
- tagText: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
257
- tagHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
258
- tagPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
259
- tagIconHover: chroma(colorPalettePrimary.white).alpha(0.8).hex(),
260
- tagIconPress: chroma(colorPalettePrimary.white).alpha(0.76).hex(),
261
- // Typography
262
- typographyCodeBg: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
263
- // Table
264
- tableRowHover: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
265
- tooltipBackgroundTooltip: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
266
- // Missing in list
267
- backgroundDanger: 'rgba(200,45,76,0.08)',
268
- backgroundWarning: 'rgba(222,121,33,0.08)'
269
- };
270
-
271
- const darkColors = {
272
- ...darkColorList,
273
- ...colorPalettePrimary,
274
- ...colorPaletteSecondary
275
- };
276
- const lightColors = {
277
- ...lightColorList,
278
- ...colorPalettePrimary,
279
- ...colorPaletteSecondary
280
- };
281
- function getSemanticColors(isDarkMode) {
282
- return isDarkMode ? darkColors : lightColors;
283
- }
284
-
285
- // TODO (FEINF-1674): Remove when removing USE_NEW_RADIO_STYLES
286
- /*
287
- Colors that need to be replaced by semantic colors.
288
- */
289
- const deprecatedColors = {
290
- // Radio Colors
291
- radioInteractiveAvailable: colorPalettePrimary.primary,
292
- radioInteractiveHover: '#186099',
293
- radioInteractivePress: '#0D4F85',
294
- radioDisabled: '#A2AEB8',
295
- radioDefaultBorder: '#64727D',
296
- radioDefaultBackground: '#FFFFFF',
297
- radioInteractiveHoverSecondary: 'rgba(34, 115, 181, 0.08)',
298
- // Fade of Interactive Available
299
- radioInteractivePressSecondary: 'rgba(34, 115, 181, 0.16)' // Fade of Interactive Available
300
- };
301
-
302
- function getColors(isDarkMode) {
303
- return {
304
- ...deprecatedColors,
305
- ...getSemanticColors(isDarkMode)
306
- };
307
- }
308
-
309
- // eslint-disable-next-line import/no-anonymous-default-export
310
- var antdVars = {
311
- // IMPORTANT: Do not read this directly from components. Use `React.useContext`.
312
- 'ant-prefix': 'du-bois'
313
- };
314
-
315
- const DEFAULT_SPACING_UNIT = 8;
316
- const MODAL_PADDING = 40;
317
- const spacing = {
318
- xs: DEFAULT_SPACING_UNIT / 2,
319
- sm: DEFAULT_SPACING_UNIT,
320
- md: DEFAULT_SPACING_UNIT * 2,
321
- lg: DEFAULT_SPACING_UNIT * 3
322
- };
323
-
324
- // Less variables that are used by AntD
325
- ({
326
- defaultPaddingLg: spacing.lg,
327
- defaultPaddingMd: spacing.md,
328
- defaultPaddingSm: spacing.sm,
329
- defaultPaddingXs: spacing.sm,
330
- defaultPaddingXss: spacing.xs,
331
- paddingLg: spacing.md,
332
- // TODO: Check if there is a better alternative with team
333
- paddingMd: spacing.sm,
334
- paddingSm: spacing.sm,
335
- paddingXs: spacing.xs,
336
- paddingXss: 0,
337
- marginSm: 12,
338
- marginLg: spacing.lg,
339
- // Button
340
- btnPaddingHorizontalBase: DEFAULT_SPACING_UNIT * 2,
341
- btnPaddingHorizontalLg: DEFAULT_SPACING_UNIT * 2,
342
- btnPaddingHorizontalSm: DEFAULT_SPACING_UNIT * 2,
343
- // Input
344
- inputPaddingHorizontal: DEFAULT_SPACING_UNIT * 1.5,
345
- inputPaddingHorizontalBase: DEFAULT_SPACING_UNIT * 1.5,
346
- inputPaddingHorizontalSm: DEFAULT_SPACING_UNIT * 1.5,
347
- inputPaddingHorizontalLg: DEFAULT_SPACING_UNIT * 1.5,
348
- inputPaddingVertical: spacing.xs + 1,
349
- inputPaddingVerticalBase: spacing.xs + 1,
350
- inputPaddingVerticalSm: spacing.xs + 1,
351
- inputPaddingVerticalLg: spacing.xs + 1,
352
- // Modal
353
- modalPadding: MODAL_PADDING,
354
- modalLessPadding: MODAL_PADDING - 20,
355
- modalHeaderPadding: `${MODAL_PADDING}px ${MODAL_PADDING}px ${MODAL_PADDING - 20}px`,
356
- modalHeaderCloseSize: MODAL_PADDING * 2 + 22,
357
- modalHeaderBorderWidth: 0,
358
- modalBodyPadding: `0 ${MODAL_PADDING}px`,
359
- modalFooterPaddingVertical: 0,
360
- modalFooterPaddingHorizontal: 0,
361
- modalFooterBorderWidth: 0,
362
- // Switch
363
- switchPadding: 0,
364
- switchHeight: 16,
365
- switchMinWidth: 28,
366
- switchPinSize: 14
367
- });
368
- var spacing$1 = spacing;
369
-
370
- const heightBase = 40;
371
- const borderWidth = 1;
372
- const antdGeneralVariables = {
373
- classnamePrefix: antdVars['ant-prefix'],
374
- iconfontCssPrefix: 'anticon',
375
- borderRadiusBase: 4,
376
- borderWidth: borderWidth,
377
- heightSm: 32,
378
- heightBase: heightBase,
379
- iconSize: 24,
380
- iconFontSize: 16,
381
- buttonHeight: heightBase,
382
- // Height available within button (for label and icon). Same for middle and small buttons.
383
- buttonInnerHeight: heightBase - spacing$1.sm * 2 - borderWidth * 2
384
- };
385
- const getShadowVariables = isDarkMode => {
386
- if (isDarkMode) {
387
- return {
388
- shadowLow: '0px 4px 16px rgba(0, 0, 0, 0.12)',
389
- shadowHigh: '0px 8px 24px rgba(0, 0, 0, 0.2);'
390
- };
391
- } else {
392
- return {
393
- shadowLow: '0px 4px 16px rgba(31, 39, 45, 0.12)',
394
- shadowHigh: '0px 8px 24px rgba(31, 39, 45, 0.2)'
395
- };
396
- }
397
- };
398
- var generalVariables = antdGeneralVariables;
399
-
400
- const FONT_SIZE_BASE = 13;
401
-
402
- // Less variables that are used by AntD
403
- const antdTypography = {
404
- fontSizeSm: 12,
405
- fontSizeBase: FONT_SIZE_BASE,
406
- fontSizeMd: FONT_SIZE_BASE,
407
- fontSizeLg: 18,
408
- fontSizeXl: 22,
409
- fontSizeXxl: 32,
410
- lineHeightSm: '16px',
411
- lineHeightBase: '20px',
412
- lineHeightMd: '20px',
413
- lineHeightLg: '24px',
414
- lineHeightXl: '28px',
415
- lineHeightXxl: '40px',
416
- typographyBoldFontWeight: 600
417
- };
418
-
419
- // eslint-disable-next-line import/no-anonymous-default-export
420
- var typography = {
421
- ...antdTypography
422
- };
423
-
424
- const defaultOptions = {
425
- enableAnimation: false,
426
- zIndexBase: 1000
427
- };
428
-
429
- // Function to get variables for a certain theme.
430
- // End users should use useDesignSystemTheme instead.
431
- function getTheme(isDarkMode) {
432
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions;
433
- return {
434
- colors: getColors(isDarkMode),
435
- spacing: spacing$1,
436
- general: {
437
- ...generalVariables,
438
- ...getShadowVariables(isDarkMode)
439
- },
440
- typography,
441
- borders: borders$1,
442
- responsive: responsive$1,
443
- isDarkMode,
444
- options
445
- };
446
- }
447
-
448
- function getClassNamePrefix(theme) {
449
- const antdThemeName = theme.isDarkMode ? 'dark' : 'light';
450
- return `${theme.general.classnamePrefix}-${antdThemeName}`;
451
- }
452
- function getPrefixedClassNameFromTheme(theme, className) {
453
- return [getClassNamePrefix(theme), className].filter(Boolean).join('-');
454
- }
455
- function useDesignSystemTheme() {
456
- const emotionTheme = useTheme();
457
- // Graceful fallback to default theme in case a test or developer forgot context.
458
- const theme = emotionTheme && emotionTheme.general ? emotionTheme : getTheme(false);
459
- return {
460
- theme: theme,
461
- classNamePrefix: getClassNamePrefix(theme),
462
- getPrefixedClassName: className => getPrefixedClassNameFromTheme(theme, className)
463
- };
464
- }
465
- // This is a simple typed HOC wrapper around the useDesignSystemTheme hook, for use in older react components.
466
- function WithDesignSystemThemeHoc(Component) {
467
- return function WrappedWithDesignSystemTheme(props) {
468
- const themeValues = useDesignSystemTheme();
469
- return jsx(Component, {
470
- ...props,
471
- designSystemThemeApi: themeValues
472
- });
473
- };
474
- }
475
-
476
- const DuboisContextDefaults = {
477
- enableAnimation: false,
478
- // Prefer to use useDesignSystemTheme.getPrefixedClassName instead
479
- getPrefixCls: suffix => suffix ? `du-bois-${suffix}` : 'du-bois',
480
- flags: {}
481
- };
482
- const DesignSystemThemeContext = /*#__PURE__*/createContext({
483
- isDarkMode: false
484
- });
485
- const DesignSystemContext = /*#__PURE__*/createContext(DuboisContextDefaults);
486
- const DU_BOIS_ENABLE_ANIMATION_CLASSNAME = 'du-bois-enable-animation';
487
- function getAnimationCss(enableAnimation) {
488
- const disableAnimationCss = {
489
- animationDuration: '0s !important',
490
- transition: 'none !important'
491
- };
492
- return enableAnimation ? {} : {
493
- // Apply to the current element
494
- ...disableAnimationCss,
495
- '&::before': disableAnimationCss,
496
- '&::after': disableAnimationCss,
497
- // Also apply to all child elements with a class that starts with our prefix
498
- [`[class*=du-bois]:not(.${DU_BOIS_ENABLE_ANIMATION_CLASSNAME}, .${DU_BOIS_ENABLE_ANIMATION_CLASSNAME} *)`]: {
499
- ...disableAnimationCss,
500
- // Also target any pseudo-elements associated with those elements, since these can also be animated.
501
- '&::before': disableAnimationCss,
502
- '&::after': disableAnimationCss
503
- }
504
- };
505
- }
506
- const DesignSystemProviderPropsContext = /*#__PURE__*/React__default.createContext(null);
507
- const AntDConfigProviderPropsContext = /*#__PURE__*/React__default.createContext(null);
508
-
509
- /** Only to be accessed by SupportsDuBoisThemes, except for special exceptions like tests and storybook. Ask in #dubois first if you need to use it. */
510
- const DesignSystemThemeProvider = _ref => {
511
- let {
512
- isDarkMode = false,
513
- children
514
- } = _ref;
515
- return jsx(DesignSystemThemeContext.Provider, {
516
- value: {
517
- isDarkMode
518
- },
519
- children: children
520
- });
521
- };
522
- const DesignSystemProvider = _ref2 => {
523
- let {
524
- isDarkMode: deprecatedDarkModeProp,
525
- children,
526
- enableAnimation = false,
527
- zIndexBase = 1000,
528
- getPopupContainer,
529
- flags = {}
530
- } = _ref2;
531
- const {
532
- isDarkMode: contextDarkModeVal
533
- } = useContext(DesignSystemThemeContext);
534
- const isDarkMode = deprecatedDarkModeProp !== null && deprecatedDarkModeProp !== void 0 ? deprecatedDarkModeProp : contextDarkModeVal;
535
- const theme = useMemo(() => getTheme(isDarkMode, {
536
- enableAnimation,
537
- zIndexBase
538
- }),
539
- // TODO: revisit this
540
- // eslint-disable-next-line react-hooks/exhaustive-deps
541
- [isDarkMode, zIndexBase]);
542
- const providerPropsContext = useMemo(() => ({
543
- isDarkMode,
544
- enableAnimation,
545
- zIndexBase,
546
- getPopupContainer,
547
- flags
548
- }), [isDarkMode, enableAnimation, zIndexBase, getPopupContainer, flags]);
549
- const classNamePrefix = getClassNamePrefix(theme);
550
- const value = useMemo(() => {
551
- return {
552
- enableAnimation,
553
- isDarkMode,
554
- getPrefixCls: suffix => getPrefixedClassNameFromTheme(theme, suffix),
555
- getPopupContainer,
556
- flags
557
- };
558
- }, [enableAnimation, theme, isDarkMode, getPopupContainer, flags]);
559
- useEffect(() => {
560
- return () => {
561
- // when the design system context is unmounted, make sure the notification cache is also cleaned up
562
- notification.destroy();
563
- };
564
- }, []);
565
- return jsx(DesignSystemProviderPropsContext.Provider, {
566
- value: providerPropsContext,
567
- children: jsx(ThemeProvider, {
568
- theme: theme,
569
- children: jsx(AntDConfigProviderPropsContext.Provider, {
570
- value: {
571
- prefixCls: classNamePrefix,
572
- getPopupContainer
573
- },
574
- children: jsx(DesignSystemContext.Provider, {
575
- value: value,
576
- children: children
577
- })
578
- })
579
- })
580
- });
581
- };
582
- const ApplyDesignSystemContextOverrides = _ref3 => {
583
- let {
584
- enableAnimation,
585
- zIndexBase,
586
- getPopupContainer,
587
- flags,
588
- children
589
- } = _ref3;
590
- const parentDesignSystemProviderProps = useContext(DesignSystemProviderPropsContext);
591
- if (parentDesignSystemProviderProps === null) {
592
- throw new Error(`ApplyDesignSystemContextOverrides cannot be used standalone - DesignSystemProvider must exist in the React context`);
593
- }
594
- const newProps = useMemo(() => ({
595
- ...parentDesignSystemProviderProps,
596
- enableAnimation: enableAnimation !== null && enableAnimation !== void 0 ? enableAnimation : parentDesignSystemProviderProps.enableAnimation,
597
- zIndexBase: zIndexBase !== null && zIndexBase !== void 0 ? zIndexBase : parentDesignSystemProviderProps.zIndexBase,
598
- getPopupContainer: getPopupContainer !== null && getPopupContainer !== void 0 ? getPopupContainer : parentDesignSystemProviderProps.getPopupContainer,
599
- flags: {
600
- ...parentDesignSystemProviderProps.flags,
601
- ...flags
602
- }
603
- }), [parentDesignSystemProviderProps, enableAnimation, zIndexBase, getPopupContainer, flags]);
604
- return jsx(DesignSystemProvider, {
605
- ...newProps,
606
- children: children
607
- });
608
- };
609
-
610
- // This is a more-specific version of `ApplyDesignSystemContextOverrides` that only allows overriding the flags.
611
- const ApplyDesignSystemFlags = _ref4 => {
612
- let {
613
- flags,
614
- children
615
- } = _ref4;
616
- const parentDesignSystemProviderProps = useContext(DesignSystemProviderPropsContext);
617
- if (parentDesignSystemProviderProps === null) {
618
- throw new Error(`ApplyDesignSystemFlags cannot be used standalone - DesignSystemProvider must exist in the React context`);
619
- }
620
- const newProps = useMemo(() => ({
621
- ...parentDesignSystemProviderProps,
622
- flags: {
623
- ...parentDesignSystemProviderProps.flags,
624
- ...flags
625
- }
626
- }), [parentDesignSystemProviderProps, flags]);
627
- return jsx(DesignSystemProvider, {
628
- ...newProps,
629
- children: children
630
- });
631
- };
632
- const DesignSystemAntDConfigProvider = _ref5 => {
633
- let {
634
- children
635
- } = _ref5;
636
- const antdContext = useAntDConfigProviderContext();
637
- return jsx(ConfigProvider, {
638
- ...antdContext,
639
- children: children
640
- });
641
- };
642
- const useAntDConfigProviderContext = () => {
643
- var _useContext;
644
- return (_useContext = useContext(AntDConfigProviderPropsContext)) !== null && _useContext !== void 0 ? _useContext : {
645
- prefixCls: undefined
646
- };
647
- };
648
-
649
- /**
650
- * When using AntD components inside Design System wrapper components (e.g. Modal, Collapse etc),
651
- * we don't want Design System's prefix class to override them.
652
- *
653
- * Since all Design System's components have are wrapped with DesignSystemAntDConfigProvider,
654
- * this won't affect their own prefixCls, but just allow nested antd components to keep their ant prefix.
655
- */
656
- const RestoreAntDDefaultClsPrefix = _ref6 => {
657
- let {
658
- children
659
- } = _ref6;
660
- return jsx(ConfigProvider, {
661
- prefixCls: "ant",
662
- children: children
663
- });
664
- };
665
-
666
- function useDesignSystemContext() {
667
- return useContext(DesignSystemContext);
668
- }
669
-
670
- function useDesignSystemFlags() {
671
- const context = useDesignSystemContext();
672
- return context.flags;
673
- }
674
-
675
- const getIconEmotionStyles = theme => {
676
- return /*#__PURE__*/css({
677
- fontSize: theme.general.iconFontSize
678
- }, process.env.NODE_ENV === "production" ? "" : ";label:getIconEmotionStyles;");
679
- };
680
- const getIconValidationColor = (theme, color) => {
681
- switch (color) {
682
- case 'success':
683
- return theme.colors.textValidationSuccess;
684
- case 'warning':
685
- return theme.colors.textValidationWarning;
686
- case 'danger':
687
- return theme.colors.textValidationDanger;
688
- default:
689
- return color;
690
- }
691
- };
692
- const Icon = props => {
693
- const {
694
- component: Component,
695
- dangerouslySetAntdProps,
696
- color,
697
- style,
698
- ...otherProps
699
- } = props;
700
- const {
701
- theme
702
- } = useDesignSystemTheme();
703
- const MemoizedComponent = useMemo(() => Component ? _ref => {
704
- let {
705
- fill,
706
- ...iconProps
707
- } = _ref;
708
- return (
709
- // We don't rely on top-level fills for our colors. Fills are specified
710
- // with "currentColor" on children of the top-most svg.
711
- jsx(Component, {
712
- fill: "none",
713
- ...iconProps
714
- })
715
- );
716
- } : undefined, [Component]);
717
- return jsx(DesignSystemAntDConfigProvider, {
718
- children: jsx(AntDIcon, {
719
- css: getIconEmotionStyles(theme),
720
- component: MemoizedComponent,
721
- style: {
722
- color: getIconValidationColor(theme, color),
723
- ...style
724
- },
725
- ...otherProps,
726
- ...dangerouslySetAntdProps
727
- })
728
- });
729
- };
730
-
731
- function SvgChevronLeftIcon(props) {
732
- return jsx("svg", {
733
- width: "1em",
734
- height: "1em",
735
- viewBox: "0 0 16 16",
736
- fill: "none",
737
- xmlns: "http://www.w3.org/2000/svg",
738
- ...props,
739
- children: jsx("path", {
740
- fillRule: "evenodd",
741
- clipRule: "evenodd",
742
- d: "M7.083 8L10 10.947 8.958 12 5 8l3.958-4L10 5.053 7.083 8z",
743
- fill: "currentColor"
744
- })
745
- });
746
- }
747
- function ChevronLeftIcon(props) {
748
- return jsx(Icon, {
749
- ...props,
750
- component: SvgChevronLeftIcon
751
- });
752
- }
753
-
754
- function SvgChevronRightIcon(props) {
755
- return jsx("svg", {
756
- width: "1em",
757
- height: "1em",
758
- viewBox: "0 0 16 16",
759
- fill: "none",
760
- xmlns: "http://www.w3.org/2000/svg",
761
- ...props,
762
- children: jsx("path", {
763
- fillRule: "evenodd",
764
- clipRule: "evenodd",
765
- d: "M8.917 8L6 5.053 7.042 4 11 8l-3.958 4L6 10.947 8.917 8z",
766
- fill: "currentColor"
767
- })
768
- });
769
- }
770
- function ChevronRightIcon(props) {
771
- return jsx(Icon, {
772
- ...props,
773
- component: SvgChevronRightIcon
774
- });
775
- }
776
-
777
- function SvgCloseIcon(props) {
778
- return jsx("svg", {
779
- width: "1em",
780
- height: "1em",
781
- viewBox: "0 0 16 16",
782
- fill: "none",
783
- xmlns: "http://www.w3.org/2000/svg",
784
- ...props,
785
- children: jsx("path", {
786
- fillRule: "evenodd",
787
- clipRule: "evenodd",
788
- d: "M6.97 8.03L2 3.06 3.06 2l4.97 4.97L13 2l1.06 1.06-4.969 4.97 4.97 4.97L13 14.06 8.03 9.092l-4.97 4.97L2 13l4.97-4.97z",
789
- fill: "currentColor"
790
- })
791
- });
792
- }
793
- function CloseIcon(props) {
794
- return jsx(Icon, {
795
- ...props,
796
- component: SvgCloseIcon
797
- });
798
- }
799
-
800
- function SvgFaceFrownIcon(props) {
801
- return jsxs("svg", {
802
- width: "1em",
803
- height: "1em",
804
- viewBox: "0 0 16 16",
805
- fill: "none",
806
- xmlns: "http://www.w3.org/2000/svg",
807
- ...props,
808
- children: [jsxs("g", {
809
- clipPath: "url(#FaceFrownIcon_svg__clip0_16320_32311)",
810
- fill: "currentColor",
811
- children: [jsx("path", {
812
- d: "M6 5.25a.75.75 0 000 1.5h.007a.75.75 0 000-1.5H6zM9.25 6a.75.75 0 01.75-.75h.007a.75.75 0 010 1.5H10A.75.75 0 019.25 6zM10.07 11.12a.75.75 0 001.197-.903l-.001-.001v-.001l-.003-.003-.005-.006-.015-.02a2.95 2.95 0 00-.217-.246 4.717 4.717 0 00-.627-.546C9.86 9 9.04 8.584 8 8.584s-1.858.416-2.4.81a4.716 4.716 0 00-.795.733 2.87 2.87 0 00-.048.06l-.015.019-.005.006-.002.003-.031.044.03-.042a.75.75 0 101.22.875 3.219 3.219 0 01.529-.485c.375-.273.89-.523 1.517-.523.627 0 1.142.25 1.517.523a3.219 3.219 0 01.529.485l.021.025.002.003z"
813
- }), jsx("path", {
814
- fillRule: "evenodd",
815
- clipRule: "evenodd",
816
- d: "M8 .583a7.417 7.417 0 100 14.834A7.417 7.417 0 008 .583zM2.083 8a5.917 5.917 0 1111.834 0A5.917 5.917 0 012.083 8z"
817
- })]
818
- }), jsx("defs", {
819
- children: jsx("clipPath", {
820
- id: "FaceFrownIcon_svg__clip0_16320_32311",
821
- children: jsx("path", {
822
- fill: "#fff",
823
- d: "M0 0h16v16H0z"
824
- })
825
- })
826
- })]
827
- });
828
- }
829
- function FaceFrownIcon(props) {
830
- return jsx(Icon, {
831
- ...props,
832
- component: SvgFaceFrownIcon
833
- });
834
- }
835
-
836
- function SvgFaceNeutralIcon(props) {
837
- return jsxs("svg", {
838
- width: "1em",
839
- height: "1em",
840
- viewBox: "0 0 16 16",
841
- fill: "none",
842
- xmlns: "http://www.w3.org/2000/svg",
843
- ...props,
844
- children: [jsxs("g", {
845
- clipPath: "url(#FaceNeutralIcon_svg__clip0_16320_32309)",
846
- fillRule: "evenodd",
847
- clipRule: "evenodd",
848
- fill: "currentColor",
849
- children: [jsx("path", {
850
- d: "M8 2.083a5.917 5.917 0 100 11.834A5.917 5.917 0 008 2.084zM.583 8a7.417 7.417 0 1114.834 0A7.417 7.417 0 01.583 8z"
851
- }), jsx("path", {
852
- d: "M4.583 10a.75.75 0 01.75-.75h5.334a.75.75 0 110 1.5H5.333a.75.75 0 01-.75-.75zM5.25 6A.75.75 0 016 5.25h.007a.75.75 0 010 1.5H6A.75.75 0 015.25 6zM9.25 6a.75.75 0 01.75-.75h.007a.75.75 0 110 1.5H10A.75.75 0 019.25 6z"
853
- })]
854
- }), jsx("defs", {
855
- children: jsx("clipPath", {
856
- id: "FaceNeutralIcon_svg__clip0_16320_32309",
857
- children: jsx("path", {
858
- fill: "#fff",
859
- d: "M0 0h16v16H0z"
860
- })
861
- })
862
- })]
863
- });
864
- }
865
- function FaceNeutralIcon(props) {
866
- return jsx(Icon, {
867
- ...props,
868
- component: SvgFaceNeutralIcon
869
- });
870
- }
871
-
872
- function SvgFaceSmileIcon(props) {
873
- return jsxs("svg", {
874
- width: "1em",
875
- height: "1em",
876
- viewBox: "0 0 16 16",
877
- fill: "none",
878
- xmlns: "http://www.w3.org/2000/svg",
879
- ...props,
880
- children: [jsxs("g", {
881
- clipPath: "url(#FaceSmileIcon_svg__clip0_16320_32307)",
882
- fill: "currentColor",
883
- children: [jsx("path", {
884
- fillRule: "evenodd",
885
- clipRule: "evenodd",
886
- d: "M8 2.083a5.917 5.917 0 100 11.834A5.917 5.917 0 008 2.084zM.583 8a7.417 7.417 0 1114.834 0A7.417 7.417 0 01.583 8z"
887
- }), jsx("path", {
888
- d: "M4.883 8.733a.75.75 0 011.048.147l.002.003.021.026a3.216 3.216 0 00.529.485c.375.273.89.523 1.517.523.627 0 1.142-.25 1.517-.523a3.215 3.215 0 00.55-.511.75.75 0 011.2.9l.029-.042-.03.043-.001.002-.002.002-.005.007-.015.019a3.878 3.878 0 01-.217.247c-.144.15-.354.348-.627.546-.54.393-1.359.81-2.399.81s-1.858-.417-2.4-.81a4.716 4.716 0 01-.795-.734 2.643 2.643 0 01-.048-.059l-.015-.02-.005-.006-.002-.002v-.002h-.002a.75.75 0 01.15-1.05z"
889
- }), jsx("path", {
890
- fillRule: "evenodd",
891
- clipRule: "evenodd",
892
- d: "M5.25 6A.75.75 0 016 5.25h.007a.75.75 0 010 1.5H6A.75.75 0 015.25 6zM9.25 6a.75.75 0 01.75-.75h.007a.75.75 0 110 1.5H10A.75.75 0 019.25 6z"
893
- })]
894
- }), jsx("defs", {
895
- children: jsx("clipPath", {
896
- id: "FaceSmileIcon_svg__clip0_16320_32307",
897
- children: jsx("path", {
898
- fill: "#fff",
899
- d: "M0 0h16v16H0z"
900
- })
901
- })
902
- })]
903
- });
904
- }
905
- function FaceSmileIcon(props) {
906
- return jsx(Icon, {
907
- ...props,
908
- component: SvgFaceSmileIcon
909
- });
910
- }
911
-
912
- function SvgNewWindowIcon(props) {
913
- return jsxs("svg", {
914
- width: "1em",
915
- height: "1em",
916
- viewBox: "0 0 16 16",
917
- fill: "none",
918
- xmlns: "http://www.w3.org/2000/svg",
919
- ...props,
920
- children: [jsx("path", {
921
- d: "M10 1h5v5h-1.5V3.56L8.53 8.53 7.47 7.47l4.97-4.97H10V1z",
922
- fill: "currentColor"
923
- }), jsx("path", {
924
- d: "M1 2.75A.75.75 0 011.75 2H8v1.5H2.5v10h10V8H14v6.25a.75.75 0 01-.75.75H1.75a.75.75 0 01-.75-.75V2.75z",
925
- fill: "currentColor"
926
- })]
927
- });
928
- }
929
- function NewWindowIcon(props) {
930
- return jsx(Icon, {
931
- ...props,
932
- component: SvgNewWindowIcon
933
- });
934
- }
935
-
936
- const ColorVars = {
937
- primary: 'textPrimary',
938
- secondary: 'textSecondary',
939
- info: 'textValidationInfo',
940
- error: 'textValidationDanger',
941
- success: 'textValidationSuccess',
942
- warning: 'textValidationWarning'
943
- };
944
-
945
- /**
946
- * Recursively appends `!important` to all CSS properties in an Emotion `CSSObject`.
947
- * Used to ensure that we always override Ant styles, without worrying about selector precedence.
948
- */
949
- function importantify(obj) {
950
- return _mapValues(obj, (value, key) => {
951
- if (_isString(value) || _isNumber(value) || _isBoolean(value)) {
952
- // Make sure we don't double-append important
953
- if (_isString(value) && _endsWith(value, '!important')) {
954
- return value;
955
- }
956
- if (_isNumber(value)) {
957
- if (unitless[key]) {
958
- return `${value}!important`;
959
- }
960
- return `${value}px!important`;
961
- }
962
- return `${value}!important`;
963
- }
964
- if (_isNil(value)) {
965
- return value;
966
- }
967
- return importantify(value);
968
- });
969
- }
970
-
971
- /**
972
- * Returns a text color, in case of invalid/missing key and missing fallback color it will return textPrimary
973
- * @param theme
974
- * @param key - key of TypographyColor
975
- * @param fallbackColor - color to return as fallback -- used to remove tertiary check inline
976
- */
977
- function getTypographyColor(theme, key, fallbackColor) {
978
- if (theme && key && Object(theme.colors).hasOwnProperty(ColorVars[key])) {
979
- return theme.colors[ColorVars[key]];
980
- }
981
- return fallbackColor !== null && fallbackColor !== void 0 ? fallbackColor : theme.colors.textPrimary;
982
- }
983
-
984
- /**
985
- * Returns validation color based on state, has default validation colors if params are not provided
986
- * @param theme
987
- * @param validationState
988
- * @param errorColor
989
- * @param warningColor
990
- * @param successColor
991
- */
992
- function getValidationStateColor(theme, validationState) {
993
- let {
994
- errorColor,
995
- warningColor,
996
- successColor
997
- } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
998
- switch (validationState) {
999
- case 'error':
1000
- return errorColor || theme.colors.actionDangerPrimaryBackgroundDefault;
1001
- case 'warning':
1002
- return warningColor || theme.colors.textValidationWarning;
1003
- case 'success':
1004
- return successColor || theme.colors.textValidationSuccess;
1005
- default:
1006
- return undefined;
1007
- }
1008
- }
1009
-
1010
- function getDefaultStyles(theme) {
1011
- return {
1012
- backgroundColor: theme.colors.actionDefaultBackgroundDefault,
1013
- borderColor: theme.colors.actionDefaultBorderDefault,
1014
- color: theme.colors.actionDefaultTextDefault,
1015
- lineHeight: theme.typography.lineHeightBase,
1016
- textDecoration: 'none',
1017
- '&:hover': {
1018
- backgroundColor: theme.colors.actionDefaultBackgroundHover,
1019
- borderColor: theme.colors.actionDefaultBorderHover,
1020
- color: theme.colors.actionDefaultTextHover
1021
- },
1022
- '&:active': {
1023
- backgroundColor: theme.colors.actionDefaultBackgroundPress,
1024
- borderColor: theme.colors.actionDefaultBorderPress,
1025
- color: theme.colors.actionDefaultTextPress
1026
- }
1027
- };
1028
- }
1029
- function getPrimaryStyles(theme) {
1030
- return {
1031
- backgroundColor: theme.colors.actionPrimaryBackgroundDefault,
1032
- borderColor: 'transparent',
1033
- color: theme.colors.actionPrimaryTextDefault,
1034
- textShadow: 'none',
1035
- '&:hover': {
1036
- backgroundColor: theme.colors.actionPrimaryBackgroundHover,
1037
- borderColor: 'transparent',
1038
- color: theme.colors.actionPrimaryTextHover
1039
- },
1040
- '&:active': {
1041
- backgroundColor: theme.colors.actionPrimaryBackgroundPress,
1042
- borderColor: 'transparent',
1043
- color: theme.colors.actionPrimaryTextPress
1044
- }
1045
- };
1046
- }
1047
- function getLinkStyles$1(theme) {
1048
- return {
1049
- backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
1050
- borderColor: theme.colors.actionTertiaryBackgroundDefault,
1051
- color: theme.colors.actionTertiaryTextDefault,
1052
- '&:hover': {
1053
- backgroundColor: theme.colors.actionTertiaryBackgroundHover,
1054
- borderColor: 'transparent',
1055
- color: theme.colors.actionTertiaryTextHover
1056
- },
1057
- '&:active': {
1058
- backgroundColor: theme.colors.actionTertiaryBackgroundPress,
1059
- borderColor: 'transparent',
1060
- color: theme.colors.actionTertiaryTextPress
1061
- },
1062
- '&[disabled]:hover': {
1063
- background: 'none',
1064
- color: theme.colors.actionDisabledText
1065
- }
1066
- };
1067
- }
1068
- function getPrimaryDangerStyles(theme) {
1069
- return {
1070
- backgroundColor: theme.colors.actionDangerPrimaryBackgroundDefault,
1071
- borderColor: 'transparent',
1072
- color: theme.colors.white,
1073
- '&:hover': {
1074
- backgroundColor: theme.colors.actionDangerPrimaryBackgroundHover,
1075
- borderColor: 'transparent',
1076
- color: theme.colors.white
1077
- },
1078
- '&:active': {
1079
- backgroundColor: theme.colors.actionDangerPrimaryBackgroundPress,
1080
- borderColor: 'transparent',
1081
- color: theme.colors.white
1082
- },
1083
- '&:focus-visible': {
1084
- outlineColor: theme.colors.actionDangerPrimaryBackgroundDefault
1085
- }
1086
- };
1087
- }
1088
- function getSecondaryDangerStyles(theme) {
1089
- return {
1090
- backgroundColor: theme.colors.actionDangerDefaultBackgroundDefault,
1091
- borderColor: theme.colors.actionDangerDefaultBorderDefault,
1092
- color: theme.colors.actionDangerDefaultTextDefault,
1093
- '&:hover': {
1094
- backgroundColor: theme.colors.actionDangerDefaultBackgroundHover,
1095
- borderColor: theme.colors.actionDangerDefaultBorderHover,
1096
- color: theme.colors.actionDangerDefaultTextHover
1097
- },
1098
- '&:active': {
1099
- backgroundColor: theme.colors.actionDangerDefaultBackgroundPress,
1100
- borderColor: theme.colors.actionDangerDefaultBorderPress,
1101
- color: theme.colors.actionDangerDefaultTextPress
1102
- },
1103
- '&:focus-visible': {
1104
- outlineColor: theme.colors.actionDangerPrimaryBackgroundDefault
1105
- }
1106
- };
1107
- }
1108
- function getDisabledStyles(theme) {
1109
- return {
1110
- backgroundColor: theme.colors.actionDisabledBackground,
1111
- borderColor: 'transparent',
1112
- color: theme.colors.actionDisabledText,
1113
- '&:hover': {
1114
- backgroundColor: theme.colors.actionDisabledBackground,
1115
- borderColor: 'transparent',
1116
- color: theme.colors.actionDisabledText
1117
- },
1118
- '&:active': {
1119
- backgroundColor: theme.colors.actionDisabledBackground,
1120
- borderColor: 'transparent',
1121
- color: theme.colors.actionDisabledText
1122
- }
1123
- };
1124
- }
1125
- function getDisabledTertiaryStyles(theme) {
1126
- return {
1127
- backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
1128
- borderColor: 'transparent',
1129
- color: theme.colors.actionDisabledText,
1130
- '&:hover': {
1131
- backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
1132
- borderColor: 'transparent',
1133
- color: theme.colors.actionDisabledText
1134
- },
1135
- '&:active': {
1136
- backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
1137
- borderColor: 'transparent',
1138
- color: theme.colors.actionDisabledText
1139
- }
1140
- };
1141
- }
1142
-
1143
- function getEndIconClsName(theme) {
1144
- return `${theme.general.iconfontCssPrefix}-btn-end-icon`;
1145
- }
1146
- const getButtonEmotionStyles = _ref => {
1147
- let {
1148
- theme,
1149
- classNamePrefix,
1150
- loading,
1151
- withIcon,
1152
- onlyIcon,
1153
- isAnchor,
1154
- enableAnimation,
1155
- size,
1156
- type,
1157
- isFlex,
1158
- useFocusPseudoClass,
1159
- forceIconStyles
1160
- } = _ref;
1161
- const clsIcon = `.${theme.general.iconfontCssPrefix}`;
1162
- const clsEndIcon = `.${getEndIconClsName(theme)}`;
1163
- const clsLoadingIcon = `.${classNamePrefix}-btn-loading-icon`;
1164
- const clsIconOnly = `.${classNamePrefix}-btn-icon-only`;
1165
- const classPrimary = `.${classNamePrefix}-btn-primary`;
1166
- const classLink = `.${classNamePrefix}-btn-link`;
1167
- const classDangerous = `.${classNamePrefix}-btn-dangerous`;
1168
- const SMALL_BUTTON_HEIGHT = 24;
1169
- const tertiaryColors = {
1170
- background: theme.colors.actionTertiaryBackgroundDefault,
1171
- color: theme.colors.actionTertiaryTextDefault,
1172
- '&:hover': {
1173
- background: theme.colors.actionTertiaryBackgroundHover,
1174
- color: theme.colors.actionTertiaryTextHover
1175
- },
1176
- '&:active': {
1177
- background: theme.colors.actionTertiaryBackgroundPress,
1178
- color: theme.colors.actionTertiaryTextPress
1179
- }
1180
- };
1181
- const iconCss = {
1182
- fontSize: theme.general.iconFontSize,
1183
- ...(!isFlex && {
1184
- // verticalAlign used by AntD to move icon and label to center
1185
- // TODO(schs): Try to move buttons to flexbox to solve this. Main problem is that flex-inline and inline-block
1186
- // behave differently (vertically align of multiple buttons is off). See https://codepen.io/qfactor/pen/JXVzBe
1187
- verticalAlign: -4,
1188
- ...(onlyIcon && {
1189
- verticalAlign: -3
1190
- }),
1191
- // verticalAlign used by AntD to move icon and label to center
1192
- // TODO(schs): Try to move buttons to flexbox to solve this. Main problem is that flex-inline and inline-block
1193
- // behave differently (vertically align of multiple buttons is off). See https://codepen.io/qfactor/pen/JXVzBe
1194
- // Need to make sure not to apply this to regular buttons as it will offset the icons
1195
- ...(!onlyIcon && {
1196
- verticalAlign: -3
1197
- })
1198
- }),
1199
- lineHeight: 0,
1200
- ...(size === 'small' && {
1201
- lineHeight: theme.typography.lineHeightSm,
1202
- ...((onlyIcon || forceIconStyles) && {
1203
- fontSize: 16,
1204
- ...(isFlex && {
1205
- height: 16
1206
- })
1207
- })
1208
- })
1209
- };
1210
- const inactiveIconCss = {
1211
- color: theme.colors.grey600
1212
- };
1213
- const endIconCssSelector = `span > ${clsEndIcon} > ${clsIcon}`;
1214
- const styles = {
1215
- lineHeight: theme.typography.lineHeightBase,
1216
- boxShadow: 'none',
1217
- height: theme.general.heightSm,
1218
- ...(isFlex && {
1219
- display: 'inline-flex',
1220
- alignItems: 'center',
1221
- justifyContent: 'center',
1222
- verticalAlign: 'middle'
1223
- }),
1224
- ...(!onlyIcon && !forceIconStyles && {
1225
- '&&': {
1226
- padding: '4px 12px',
1227
- ...(size === 'small' && {
1228
- padding: '0 8px'
1229
- })
1230
- }
1231
- }),
1232
- ...((onlyIcon || forceIconStyles) && {
1233
- width: theme.general.heightSm
1234
- }),
1235
- ...(size === 'small' && {
1236
- height: SMALL_BUTTON_HEIGHT,
1237
- lineHeight: theme.typography.lineHeightBase,
1238
- ...((onlyIcon || forceIconStyles) && {
1239
- width: SMALL_BUTTON_HEIGHT,
1240
- paddingTop: 0,
1241
- paddingBottom: 0,
1242
- verticalAlign: 'middle'
1243
- })
1244
- }),
1245
- '&:focus-visible': {
1246
- outlineStyle: 'solid',
1247
- outlineWidth: '2px',
1248
- outlineOffset: '1px',
1249
- outlineColor: theme.isDarkMode ? theme.colors.actionDefaultBorderFocus : theme.colors.primary
1250
- },
1251
- ...getDefaultStyles(theme),
1252
- [`&${classPrimary}`]: {
1253
- ...getPrimaryStyles(theme)
1254
- },
1255
- [`&${classLink}`]: {
1256
- ...getLinkStyles$1(theme),
1257
- ...(type === 'link' && {
1258
- padding: 'unset',
1259
- height: 'auto',
1260
- border: 'none',
1261
- boxShadow: 'none',
1262
- '&[disabled],&:hover': {
1263
- background: 'none'
1264
- }
1265
- })
1266
- },
1267
- [`&${classDangerous}${classPrimary}`]: {
1268
- ...getPrimaryDangerStyles(theme)
1269
- },
1270
- [`&${classDangerous}`]: {
1271
- ...getSecondaryDangerStyles(theme)
1272
- },
1273
- [`&[disabled], &${classDangerous}:disabled`]: {
1274
- ...getDisabledStyles(theme),
1275
- ...((onlyIcon || forceIconStyles) && {
1276
- backgroundColor: 'transparent',
1277
- '&:hover': {
1278
- backgroundColor: 'transparent'
1279
- },
1280
- '&:active': {
1281
- backgroundColor: 'transparent'
1282
- }
1283
- })
1284
- },
1285
- // Loading styles
1286
- ...(loading && {
1287
- '::before': {
1288
- opacity: 0
1289
- },
1290
- [`${clsLoadingIcon}`]: {
1291
- ...(onlyIcon ? {
1292
- // In case of only icon, the icon is already centered but vertically not aligned, this fixes that
1293
- verticalAlign: 'middle'
1294
- } : {
1295
- // Position loading indicator in center
1296
- // This would break vertical centering of loading circle when onlyIcon is true
1297
- position: 'absolute'
1298
- }),
1299
- ...(!isFlex && !forceIconStyles && {
1300
- // Normally we'd do `transform: translateX(-50%)` but `antd` crushes that with injected inline `style`.
1301
- left: 'calc(50% - 7px)'
1302
- }),
1303
- // Re-enable animation for the loading spinner, since it can be disabled by the global animation CSS.
1304
- svg: {
1305
- animationDuration: '1s !important'
1306
- }
1307
- },
1308
- [`& > ${clsLoadingIcon} .anticon`]: {
1309
- paddingRight: 0 // to horizontally center icon
1310
- },
1311
-
1312
- [`> :not(${clsLoadingIcon})`]: {
1313
- // Hide all content except loading icon
1314
- opacity: 0,
1315
- visibility: 'hidden',
1316
- // Add horizontal space for icon
1317
- ...(withIcon && {
1318
- paddingLeft: theme.spacing.sm * 2 + 14
1319
- })
1320
- }
1321
- }),
1322
- // Icon styles
1323
- [`> ${clsIcon} + span, > span + ${clsIcon}`]: {
1324
- marginRight: 0,
1325
- marginLeft: theme.spacing.xs
1326
- },
1327
- [`> ${clsIcon}`]: iconCss,
1328
- [`> ${endIconCssSelector}`]: {
1329
- ...iconCss,
1330
- marginLeft: theme.spacing.sm
1331
- },
1332
- ...(!type && {
1333
- [`&:enabled:not(:hover):not(:active) > ${clsIcon}`]: inactiveIconCss
1334
- }),
1335
- ...(!type && {
1336
- [`&:enabled:not(:hover):not(:active) > ${endIconCssSelector}`]: inactiveIconCss
1337
- }),
1338
- // Disable animations
1339
- [`&[${classNamePrefix}-click-animating-without-extra-node='true']::after`]: {
1340
- display: 'none'
1341
- },
1342
- [`&${clsIconOnly}`]: {
1343
- border: 'none',
1344
- [`&:enabled:not(${classLink})`]: {
1345
- ...tertiaryColors,
1346
- color: theme.colors.textSecondary,
1347
- '&:hover > .anticon': {
1348
- color: tertiaryColors['&:hover'].color
1349
- },
1350
- '&:active > .anticon': {
1351
- color: tertiaryColors['&:active'].color
1352
- }
1353
- },
1354
- [`&:enabled:not(${classLink}) > .anticon`]: {
1355
- color: theme.colors.textSecondary
1356
- },
1357
- ...(isAnchor && {
1358
- lineHeight: `${theme.general.heightSm}px`,
1359
- ...getLinkStyles$1(theme),
1360
- '&:disabled': {
1361
- color: theme.colors.actionDisabledText
1362
- }
1363
- }),
1364
- '&[disabled]:hover': {
1365
- backgroundColor: 'transparent'
1366
- }
1367
- },
1368
- [`&:focus`]: {
1369
- ...(useFocusPseudoClass && {
1370
- outlineStyle: 'solid',
1371
- outlineWidth: '2px',
1372
- outlineOffset: '1px',
1373
- outlineColor: theme.isDarkMode ? theme.colors.actionDefaultBorderFocus : theme.colors.primary
1374
- }),
1375
- [`${clsLoadingIcon}`]: {
1376
- ...(onlyIcon && {
1377
- // Mitigate wrong left offset for loading state with onlyIcon
1378
- left: 0
1379
- })
1380
- }
1381
- },
1382
- ...(forceIconStyles && {
1383
- padding: '0 6px',
1384
- lineHeight: theme.typography.lineHeightSm,
1385
- color: theme.colors.textSecondary,
1386
- '& > span': {
1387
- verticalAlign: -1,
1388
- height: theme.general.heightSm / 2,
1389
- width: theme.general.heightSm / 2
1390
- },
1391
- [`& > ${clsLoadingIcon} .anticon`]: {
1392
- // left: `calc(50% - 6px)!important`,
1393
- height: theme.general.heightSm / 2,
1394
- width: theme.general.heightSm / 2,
1395
- padding: 0
1396
- }
1397
- }),
1398
- ...getAnimationCss(enableAnimation)
1399
- };
1400
-
1401
- // Moved outside main style object because state & selector matching in the already existing object keys can create bugs and unwanted overwrites
1402
- const typeStyles = {
1403
- ...(type === 'tertiary' && {
1404
- [`&:enabled:not(${clsIconOnly})`]: tertiaryColors,
1405
- [`&${classLink}[disabled]`]: {
1406
- ...getDisabledTertiaryStyles(theme)
1407
- }
1408
- })
1409
- };
1410
- const importantStyles = importantify(styles);
1411
- const importantTypeStyles = importantify(typeStyles);
1412
- return /*#__PURE__*/css(importantStyles, importantTypeStyles, process.env.NODE_ENV === "production" ? "" : ";label:getButtonEmotionStyles;");
1413
- };
1414
- const Button = /* #__PURE__ */(() => {
1415
- const Button = /*#__PURE__*/forwardRef(function Button( // Keep size out of props passed to AntD to make deprecation and eventual removal have 0 impact
1416
- _ref2, ref) {
1417
- let {
1418
- dangerouslySetAntdProps,
1419
- children,
1420
- size,
1421
- type,
1422
- endIcon,
1423
- dangerouslySetForceIconStyles,
1424
- dangerouslyUseFocusPseudoClass,
1425
- ...props
1426
- } = _ref2;
1427
- const {
1428
- theme,
1429
- classNamePrefix
1430
- } = useDesignSystemTheme();
1431
- const {
1432
- USE_FLEX_BUTTON: isFlex
1433
- } = useDesignSystemFlags();
1434
- const clsEndIcon = getEndIconClsName(theme);
1435
- return jsx(DesignSystemAntDConfigProvider, {
1436
- children: jsx(Button$1, {
1437
- ...props,
1438
- css: getButtonEmotionStyles({
1439
- theme,
1440
- classNamePrefix,
1441
- loading: Boolean(props.loading),
1442
- withIcon: Boolean(props.icon),
1443
- onlyIcon: Boolean((props.icon || endIcon) && !children),
1444
- isAnchor: Boolean(props.href && !type),
1445
- danger: Boolean(props.danger),
1446
- enableAnimation: theme.options.enableAnimation,
1447
- size: size || 'middle',
1448
- type,
1449
- isFlex,
1450
- forceIconStyles: Boolean(dangerouslySetForceIconStyles),
1451
- useFocusPseudoClass: Boolean(dangerouslyUseFocusPseudoClass)
1452
- }),
1453
- href: props.disabled ? undefined : props.href,
1454
- ...dangerouslySetAntdProps,
1455
- ref: ref,
1456
- type: type === 'tertiary' ? 'link' : type,
1457
- children: children && jsxs("span", {
1458
- style: {
1459
- visibility: props !== null && props !== void 0 && props.loading ? 'hidden' : 'visible',
1460
- ...(isFlex && {
1461
- display: 'inline-flex',
1462
- alignItems: 'center'
1463
- })
1464
- },
1465
- children: [children, endIcon && jsx("span", {
1466
- className: clsEndIcon,
1467
- style: {
1468
- ...(isFlex && {
1469
- display: 'inline-flex',
1470
- alignItems: 'center'
1471
- })
1472
- },
1473
- children: endIcon
1474
- })]
1475
- })
1476
- })
1477
- });
1478
- });
1479
-
1480
- // This is needed for other Ant components that wrap Button, such as Tooltip, to correctly
1481
- // identify it as an Ant button.
1482
- // This should be removed if the component is rewritten to no longer be a wrapper around Ant.
1483
- // See: https://github.com/ant-design/ant-design/blob/6dd39c1f89b4d6632e6ed022ff1bc275ca1e0f1f/components/button/button.tsx#L291
1484
- Button.__ANT_BUTTON = true;
1485
- return Button;
1486
- })();
1487
-
1488
- const getInputEmotionStyles = (clsPrefix, theme, _ref, useTransparent) => {
1489
- let {
1490
- validationState
1491
- } = _ref;
1492
- const inputClass = `.${clsPrefix}-input`;
1493
- const affixClass = `.${clsPrefix}-input-affix-wrapper`;
1494
- const affixClassFocused = `.${clsPrefix}-input-affix-wrapper-focused`;
1495
- const clearIcon = `.${clsPrefix}-input-clear-icon`;
1496
- const prefixIcon = `.${clsPrefix}-input-prefix`;
1497
- const suffixIcon = `.${clsPrefix}-input-suffix`;
1498
- const validationColor = getValidationStateColor(theme, validationState);
1499
- const styles = {
1500
- '&&': {
1501
- lineHeight: theme.typography.lineHeightBase,
1502
- minHeight: theme.general.heightSm,
1503
- ...(validationState && {
1504
- borderColor: validationColor
1505
- }),
1506
- '&:hover': {
1507
- borderColor: validationState ? validationColor : theme.colors.actionPrimaryBackgroundHover
1508
- },
1509
- '&:focus': {
1510
- outlineColor: validationState ? validationColor : theme.colors.actionPrimaryBackgroundDefault,
1511
- outlineWidth: 2,
1512
- outlineOffset: -2,
1513
- outlineStyle: 'solid',
1514
- boxShadow: 'none',
1515
- borderColor: 'transparent'
1516
- },
1517
- '&:disabled': {
1518
- backgroundColor: theme.colors.actionDisabledBackground,
1519
- color: theme.colors.actionDisabledText
1520
- }
1521
- },
1522
- [`&${inputClass}, ${inputClass}`]: {
1523
- ...(useTransparent && {
1524
- backgroundColor: 'transparent'
1525
- })
1526
- },
1527
- [`&${affixClass}`]: {
1528
- ...(useTransparent && {
1529
- backgroundColor: 'transparent'
1530
- }),
1531
- lineHeight: theme.typography.lineHeightBase,
1532
- paddingTop: 5,
1533
- paddingBottom: 5,
1534
- minHeight: theme.general.heightSm,
1535
- '::before': {
1536
- lineHeight: theme.typography.lineHeightBase
1537
- },
1538
- '&:hover': {
1539
- borderColor: theme.colors.actionPrimaryBackgroundHover
1540
- },
1541
- [`input.${clsPrefix}-input`]: {
1542
- borderRadius: 0
1543
- }
1544
- },
1545
- [`&${affixClassFocused}`]: {
1546
- boxShadow: 'none',
1547
- '&&, &:focus': {
1548
- outlineColor: theme.colors.actionPrimaryBackgroundDefault,
1549
- outlineWidth: 2,
1550
- outlineOffset: -2,
1551
- outlineStyle: 'solid',
1552
- boxShadow: 'none',
1553
- borderColor: 'transparent'
1554
- }
1555
- },
1556
- [clearIcon]: {
1557
- fontSize: theme.general.iconFontSize
1558
- },
1559
- [prefixIcon]: {
1560
- marginRight: theme.spacing.sm,
1561
- color: theme.colors.textSecondary
1562
- },
1563
- [suffixIcon]: {
1564
- marginLeft: theme.spacing.sm,
1565
- color: theme.colors.textSecondary
1566
- },
1567
- ...getAnimationCss(theme.options.enableAnimation)
1568
- };
1569
- return /*#__PURE__*/css(importantify(styles), process.env.NODE_ENV === "production" ? "" : ";label:getInputEmotionStyles;");
1570
- };
1571
- const getInputGroupStyling = (clsPrefix, theme) => {
1572
- const inputClass = `.${clsPrefix}-input`;
1573
- const buttonClass = `.${clsPrefix}-btn`;
1574
- return /*#__PURE__*/css({
1575
- display: 'inline-flex !important',
1576
- width: 'auto',
1577
- [`& > ${inputClass}`]: {
1578
- flexGrow: 1,
1579
- '&:disabled': {
1580
- border: 'none',
1581
- '&:hover': {
1582
- borderRight: `1px solid ${theme.colors.actionDisabledText} !important`
1583
- }
1584
- }
1585
- },
1586
- [`& > ${buttonClass} > span`]: {
1587
- verticalAlign: 'middle'
1588
- },
1589
- [`& > ${buttonClass}:disabled, & > ${buttonClass}:disabled:hover`]: {
1590
- borderLeft: `1px solid ${theme.colors.actionDisabledText} !important`
1591
- }
1592
- }, process.env.NODE_ENV === "production" ? "" : ";label:getInputGroupStyling;");
1593
- };
1594
- const TextArea = /*#__PURE__*/forwardRef(function TextArea(_ref2, ref) {
1595
- let {
1596
- validationState,
1597
- autoComplete = 'off',
1598
- dangerouslySetAntdProps,
1599
- dangerouslyAppendEmotionCSS,
1600
- ...props
1601
- } = _ref2;
1602
- const {
1603
- classNamePrefix,
1604
- theme
1605
- } = useDesignSystemTheme();
1606
- const {
1607
- USE_TRANSPARENT_INPUT: useTransparent
1608
- } = useDesignSystemFlags();
1609
- return jsx(DesignSystemAntDConfigProvider, {
1610
- children: jsx(Input$1.TextArea, {
1611
- ref: ref,
1612
- autoComplete: autoComplete,
1613
- css: [getInputEmotionStyles(classNamePrefix, theme, {
1614
- validationState
1615
- }, useTransparent), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:TextArea;"],
1616
- ...props,
1617
- ...dangerouslySetAntdProps
1618
- })
1619
- });
1620
- });
1621
- const Password = /*#__PURE__*/forwardRef(function Password(_ref3, ref) {
1622
- let {
1623
- validationState,
1624
- autoComplete = 'off',
1625
- dangerouslySetAntdProps,
1626
- dangerouslyAppendEmotionCSS,
1627
- ...props
1628
- } = _ref3;
1629
- const {
1630
- classNamePrefix,
1631
- theme
1632
- } = useDesignSystemTheme();
1633
- const {
1634
- USE_TRANSPARENT_INPUT: useTransparent
1635
- } = useDesignSystemFlags();
1636
- return jsx(DesignSystemAntDConfigProvider, {
1637
- children: jsx(Input$1.Password, {
1638
- visibilityToggle: false,
1639
- ref: ref,
1640
- autoComplete: autoComplete,
1641
- css: [getInputEmotionStyles(classNamePrefix, theme, {
1642
- validationState
1643
- }, useTransparent), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:Password;"],
1644
- ...props,
1645
- ...dangerouslySetAntdProps
1646
- })
1647
- });
1648
- });
1649
- const DuboisInput = /*#__PURE__*/forwardRef(function Input(_ref4, ref) {
1650
- let {
1651
- validationState,
1652
- autoComplete = 'off',
1653
- dangerouslySetAntdProps,
1654
- dangerouslyAppendEmotionCSS,
1655
- onChange,
1656
- onClear,
1657
- ...props
1658
- } = _ref4;
1659
- const {
1660
- classNamePrefix,
1661
- theme
1662
- } = useDesignSystemTheme();
1663
- const {
1664
- USE_TRANSPARENT_INPUT: useTransparent
1665
- } = useDesignSystemFlags();
1666
- const handleChange = e => {
1667
- // If the input is cleared, call the onClear handler, but only
1668
- // if the event is not an input event -- which is the case when you click the
1669
- // ant-provided (X) button.
1670
- if (!e.target.value && e.nativeEvent instanceof InputEvent === false && onClear) {
1671
- onClear === null || onClear === void 0 ? void 0 : onClear();
1672
- } else {
1673
- onChange === null || onChange === void 0 ? void 0 : onChange(e);
1674
- }
1675
- };
1676
- return jsx(DesignSystemAntDConfigProvider, {
1677
- children: jsx(Input$1, {
1678
- autoComplete: autoComplete,
1679
- ref: ref,
1680
- css: [getInputEmotionStyles(classNamePrefix, theme, {
1681
- validationState
1682
- }, useTransparent), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:DuboisInput;"],
1683
- onChange: handleChange,
1684
- ...props,
1685
- ...dangerouslySetAntdProps
1686
- })
1687
- });
1688
- });
1689
- const Group = _ref5 => {
1690
- let {
1691
- dangerouslySetAntdProps,
1692
- dangerouslyAppendEmotionCSS,
1693
- compact = true,
1694
- ...props
1695
- } = _ref5;
1696
- const {
1697
- classNamePrefix,
1698
- theme
1699
- } = useDesignSystemTheme();
1700
- return jsx(DesignSystemAntDConfigProvider, {
1701
- children: jsx(Input$1.Group, {
1702
- css: [getInputGroupStyling(classNamePrefix, theme), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:Group;"],
1703
- compact: compact,
1704
- ...props,
1705
- ...dangerouslySetAntdProps
1706
- })
1707
- });
1708
- };
1709
-
1710
- // Properly creates the namespace and dot-notation components with correct types.
1711
- const InputNamespace = /* #__PURE__ */Object.assign(DuboisInput, {
1712
- TextArea,
1713
- Password,
1714
- Group
1715
- });
1716
- const Input = InputNamespace;
1717
-
1718
- // TODO: I'm doing this to support storybook's docgen;
1719
- // We should remove this once we have a better storybook integration,
1720
- // since these will be exposed in the library's exports.
1721
- const __INTERNAL_DO_NOT_USE__TextArea = TextArea;
1722
- const __INTERNAL_DO_NOT_USE__Password = Password;
1723
- const __INTERNAL_DO_NOT_USE_DEDUPE__Group = Group;
1724
-
1725
- const Spacer = _ref => {
1726
- let {
1727
- size = 'md',
1728
- shrinks,
1729
- ...props
1730
- } = _ref;
1731
- const {
1732
- theme
1733
- } = useDesignSystemTheme();
1734
- const spacingValues = {
1735
- xs: theme.spacing.xs,
1736
- sm: theme.spacing.sm,
1737
- md: theme.spacing.md,
1738
- lg: theme.spacing.lg
1739
- };
1740
- return jsx("div", {
1741
- css: /*#__PURE__*/css({
1742
- height: spacingValues[size],
1743
- ...(shrinks === false ? {
1744
- flexShrink: 0
1745
- } : undefined)
1746
- }, process.env.NODE_ENV === "production" ? "" : ";label:Spacer;"),
1747
- ...props
1748
- });
1749
- };
1750
-
1751
- const getLinkStyles = (theme, clsPrefix) => {
1752
- const classTypography = `.${clsPrefix}-typography`;
1753
- const styles = {
1754
- [`&${classTypography}, &${classTypography}:focus`]: {
1755
- color: theme.colors.actionTertiaryTextDefault
1756
- },
1757
- [`&${classTypography}:hover, &${classTypography}:hover .anticon`]: {
1758
- color: theme.colors.actionTertiaryTextHover,
1759
- textDecoration: 'underline'
1760
- },
1761
- [`&${classTypography}:active, &${classTypography}:active .anticon`]: {
1762
- color: theme.colors.actionTertiaryTextPress,
1763
- textDecoration: 'underline'
1764
- },
1765
- [`&${classTypography}:focus-visible`]: {
1766
- textDecoration: 'underline'
1767
- },
1768
- '.anticon': {
1769
- fontSize: 12
1770
- }
1771
- };
1772
- return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getLinkStyles;");
1773
- };
1774
- const getEllipsisNewTabLinkStyles = () => {
1775
- const styles = {
1776
- paddingRight: 'calc(2px + 1em)',
1777
- // 1em for icon
1778
- position: 'relative'
1779
- };
1780
- return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getEllipsisNewTabLinkStyles;");
1781
- };
1782
- const getIconStyles = theme => {
1783
- const styles = {
1784
- marginLeft: 2,
1785
- color: theme.colors.actionTertiaryTextDefault
1786
- };
1787
- return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getIconStyles;");
1788
- };
1789
- const getEllipsisIconStyles = useNewIcons => {
1790
- const styles = {
1791
- position: 'absolute',
1792
- right: 0,
1793
- bottom: 0,
1794
- top: 0,
1795
- display: 'flex',
1796
- alignItems: 'center',
1797
- ...(useNewIcons && {
1798
- fontSize: 12
1799
- })
1800
- };
1801
- return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getEllipsisIconStyles;");
1802
- };
1803
- function Link(_ref) {
1804
- let {
1805
- dangerouslySetAntdProps,
1806
- ...props
1807
- } = _ref;
1808
- const {
1809
- children,
1810
- openInNewTab,
1811
- ...restProps
1812
- } = props;
1813
- const {
1814
- theme,
1815
- classNamePrefix
1816
- } = useDesignSystemTheme();
1817
- const newTabProps = {
1818
- rel: 'noopener noreferrer',
1819
- target: '_blank'
1820
- };
1821
- const linkProps = openInNewTab ? {
1822
- ...restProps,
1823
- ...newTabProps
1824
- } : {
1825
- ...restProps
1826
- };
1827
- const linkStyles = props.ellipsis && openInNewTab ? [getLinkStyles(theme, classNamePrefix), getEllipsisNewTabLinkStyles()] : getLinkStyles(theme, classNamePrefix);
1828
- const iconStyles = props.ellipsis ? [getIconStyles(theme), getEllipsisIconStyles()] : getIconStyles(theme);
1829
- return jsx(DesignSystemAntDConfigProvider, {
1830
- children: jsxs(Typography$1.Link, {
1831
- "aria-disabled": linkProps.disabled,
1832
- css: linkStyles,
1833
- ...linkProps,
1834
- ...dangerouslySetAntdProps,
1835
- children: [children, openInNewTab ? jsx(NewWindowIcon, {
1836
- css: iconStyles,
1837
- ...newTabProps
1838
- }) : null]
1839
- })
1840
- });
1841
- }
1842
-
1843
- const {
1844
- Paragraph: AntDParagraph
1845
- } = Typography$1;
1846
- function getParagraphEmotionStyles(theme, props) {
1847
- return /*#__PURE__*/css({
1848
- '&&': {
1849
- fontSize: theme.typography.fontSizeBase,
1850
- lineHeight: theme.typography.lineHeightBase,
1851
- color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
1852
- }
1853
- }, props.disabled && {
1854
- '&&': {
1855
- color: theme.colors.actionDisabledText
1856
- }
1857
- }, props.withoutMargins && {
1858
- '&&': {
1859
- marginTop: 0,
1860
- marginBottom: 0
1861
- }
1862
- }, process.env.NODE_ENV === "production" ? "" : ";label:getParagraphEmotionStyles;");
1863
- }
1864
- function Paragraph(userProps) {
1865
- const {
1866
- dangerouslySetAntdProps,
1867
- withoutMargins,
1868
- color,
1869
- ...props
1870
- } = userProps;
1871
- const {
1872
- theme
1873
- } = useDesignSystemTheme();
1874
- return jsx(DesignSystemAntDConfigProvider, {
1875
- children: jsx(AntDParagraph, {
1876
- ...props,
1877
- className: props.className,
1878
- css: getParagraphEmotionStyles(theme, userProps),
1879
- ...dangerouslySetAntdProps
1880
- })
1881
- });
1882
- }
1883
-
1884
- const {
1885
- Text: AntDText
1886
- } = Typography$1;
1887
- function getTextEmotionStyles(theme, props) {
1888
- return /*#__PURE__*/css({
1889
- '&&': {
1890
- fontSize: theme.typography.fontSizeBase,
1891
- lineHeight: theme.typography.lineHeightBase,
1892
- color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
1893
- }
1894
- }, props.disabled && {
1895
- '&&': {
1896
- color: theme.colors.actionDisabledText
1897
- }
1898
- }, props.hint && {
1899
- '&&': {
1900
- fontSize: theme.typography.fontSizeSm,
1901
- lineHeight: theme.typography.lineHeightSm
1902
- }
1903
- }, props.bold && {
1904
- '&&': {
1905
- fontSize: theme.typography.fontSizeBase,
1906
- fontWeight: theme.typography.typographyBoldFontWeight,
1907
- lineHeight: theme.typography.lineHeightBase
1908
- }
1909
- }, props.code && {
1910
- '&& > code': {
1911
- fontSize: theme.typography.fontSizeBase,
1912
- lineHeight: theme.typography.lineHeightBase,
1913
- background: theme.colors.typographyCodeBg,
1914
- fontFamily: 'monospace',
1915
- borderRadius: theme.borders.borderRadiusMd,
1916
- padding: '2px 4px',
1917
- border: 'unset',
1918
- margin: 0
1919
- }
1920
- }, props.size && {
1921
- '&&': (() => {
1922
- switch (props.size) {
1923
- case 'xxl':
1924
- return {
1925
- fontSize: theme.typography.fontSizeXxl,
1926
- lineHeight: theme.typography.lineHeightXxl
1927
- };
1928
- case 'xl':
1929
- return {
1930
- fontSize: theme.typography.fontSizeXl,
1931
- lineHeight: theme.typography.lineHeightXl
1932
- };
1933
- case 'lg':
1934
- return {
1935
- fontSize: theme.typography.fontSizeLg,
1936
- lineHeight: theme.typography.lineHeightLg
1937
- };
1938
- case 'sm':
1939
- return {
1940
- fontSize: theme.typography.fontSizeSm,
1941
- lineHeight: theme.typography.lineHeightSm
1942
- };
1943
- default:
1944
- return {
1945
- fontSize: theme.typography.fontSizeMd,
1946
- lineHeight: theme.typography.lineHeightMd
1947
- };
1948
- }
1949
- })()
1950
- }, props.withoutMargins && {
1951
- '&&': {
1952
- marginTop: 0,
1953
- marginBottom: 0
1954
- }
1955
- }, process.env.NODE_ENV === "production" ? "" : ";label:getTextEmotionStyles;");
1956
- }
1957
- function Text(userProps) {
1958
- // Omit props that are not supported by `antd`
1959
- const {
1960
- dangerouslySetAntdProps,
1961
- bold,
1962
- hint,
1963
- withoutMargins,
1964
- color,
1965
- ...props
1966
- } = userProps;
1967
- const {
1968
- theme
1969
- } = useDesignSystemTheme();
1970
- return jsx(DesignSystemAntDConfigProvider, {
1971
- children: jsx(AntDText, {
1972
- ...props,
1973
- className: props.className,
1974
- css: getTextEmotionStyles(theme, userProps),
1975
- ...dangerouslySetAntdProps
1976
- })
1977
- });
1978
- }
1979
-
1980
- const {
1981
- Title: AntDTitle
1982
- } = Typography$1;
1983
- function getLevelStyles(theme, props) {
1984
- switch (props.level) {
1985
- case 1:
1986
- return /*#__PURE__*/css({
1987
- '&&': {
1988
- fontSize: theme.typography.fontSizeXxl,
1989
- lineHeight: theme.typography.lineHeightXxl,
1990
- fontWeight: theme.typography.typographyBoldFontWeight
1991
- }
1992
- }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
1993
- case 2:
1994
- return /*#__PURE__*/css({
1995
- '&&': {
1996
- fontSize: theme.typography.fontSizeXl,
1997
- lineHeight: theme.typography.lineHeightXl,
1998
- fontWeight: theme.typography.typographyBoldFontWeight
1999
- }
2000
- }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
2001
- case 3:
2002
- return /*#__PURE__*/css({
2003
- '&&': {
2004
- fontSize: theme.typography.fontSizeLg,
2005
- lineHeight: theme.typography.lineHeightLg,
2006
- fontWeight: theme.typography.typographyBoldFontWeight
2007
- }
2008
- }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
2009
- case 4:
2010
- default:
2011
- return /*#__PURE__*/css({
2012
- '&&': {
2013
- fontSize: theme.typography.fontSizeMd,
2014
- lineHeight: theme.typography.lineHeightMd,
2015
- fontWeight: theme.typography.typographyBoldFontWeight
2016
- }
2017
- }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
2018
- }
2019
- }
2020
- function getTitleEmotionStyles(theme, props) {
2021
- return /*#__PURE__*/css(getLevelStyles(theme, props), {
2022
- '&&': {
2023
- color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
2024
- }
2025
- }, props.withoutMargins && {
2026
- '&&': {
2027
- marginTop: '0 !important',
2028
- // override general styling
2029
- marginBottom: '0 !important' // override general styling
2030
- }
2031
- }, process.env.NODE_ENV === "production" ? "" : ";label:getTitleEmotionStyles;");
2032
- }
2033
- function Title(userProps) {
2034
- const {
2035
- dangerouslySetAntdProps,
2036
- withoutMargins,
2037
- color,
2038
- ...props
2039
- } = userProps;
2040
- const {
2041
- theme
2042
- } = useDesignSystemTheme();
2043
- return jsx(DesignSystemAntDConfigProvider, {
2044
- children: jsx(AntDTitle, {
2045
- ...props,
2046
- className: props.className,
2047
- css: getTitleEmotionStyles(theme, userProps),
2048
- ...dangerouslySetAntdProps
2049
- })
2050
- });
2051
- }
2052
-
2053
- const Typography = /* #__PURE__ */(() => {
2054
- function Typography(_ref) {
2055
- let {
2056
- dangerouslySetAntdProps,
2057
- ...props
2058
- } = _ref;
2059
- return jsx(DesignSystemAntDConfigProvider, {
2060
- children: jsx(Typography$1, {
2061
- ...props,
2062
- ...dangerouslySetAntdProps
2063
- })
2064
- });
2065
- }
2066
- Typography.Text = Text;
2067
- Typography.Title = Title;
2068
- Typography.Paragraph = Paragraph;
2069
- Typography.Link = Link;
2070
- return Typography;
2071
- })();
2072
-
2073
- export { ApplyDesignSystemContextOverrides as A, Button as B, CloseIcon as C, DesignSystemAntDConfigProvider as D, FaceFrownIcon as F, Icon as I, NewWindowIcon as N, RestoreAntDDefaultClsPrefix as R, Spacer as S, Typography as T, WithDesignSystemThemeHoc as W, __INTERNAL_DO_NOT_USE__TextArea as _, ChevronRightIcon as a, useDesignSystemFlags as b, DU_BOIS_ENABLE_ANIMATION_CLASSNAME as c, useDesignSystemContext as d, Input as e, getValidationStateColor as f, getAnimationCss as g, Title as h, importantify as i, ChevronLeftIcon as j, getDefaultStyles as k, getPrimaryStyles as l, getDisabledStyles as m, lightColorList as n, getButtonEmotionStyles as o, DesignSystemThemeContext as p, DesignSystemContext as q, DesignSystemThemeProvider as r, DesignSystemProvider as s, ApplyDesignSystemFlags as t, useDesignSystemTheme as u, useAntDConfigProviderContext as v, FaceNeutralIcon as w, FaceSmileIcon as x, __INTERNAL_DO_NOT_USE__Password as y, __INTERNAL_DO_NOT_USE_DEDUPE__Group as z };
2074
- //# sourceMappingURL=Typography-1b037412.js.map