@databricks/design-system 1.7.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/design-system/Alert/Alert.d.ts +1 -1
  2. package/dist/design-system/Alert/Alert.d.ts.map +1 -1
  3. package/dist/design-system/Button/Button.d.ts +1 -1
  4. package/dist/design-system/Button/Button.d.ts.map +1 -1
  5. package/dist/design-system/DatePicker/DatePicker.d.ts +7 -7
  6. package/dist/design-system/DatePicker/DatePicker.d.ts.map +1 -1
  7. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts +1 -0
  8. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts.map +1 -1
  9. package/dist/design-system/Drawer/Drawer.d.ts +38 -0
  10. package/dist/design-system/Drawer/Drawer.d.ts.map +1 -0
  11. package/dist/design-system/Drawer/index.d.ts +2 -0
  12. package/dist/design-system/Drawer/index.d.ts.map +1 -0
  13. package/dist/design-system/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  14. package/dist/design-system/Empty/Empty.d.ts.map +1 -1
  15. package/dist/design-system/Form/Form.d.ts +1 -1
  16. package/dist/design-system/Form/Form.d.ts.map +1 -1
  17. package/dist/design-system/FormV2/RHFAdapters.d.ts +12 -2
  18. package/dist/design-system/FormV2/RHFAdapters.d.ts.map +1 -1
  19. package/dist/design-system/Hooks/useDesignSystemTheme.d.ts +1 -1
  20. package/dist/design-system/Hooks/useDesignSystemTheme.d.ts.map +1 -1
  21. package/dist/design-system/Icon/Icon.d.ts +2 -2
  22. package/dist/design-system/Icon/Icon.d.ts.map +1 -1
  23. package/dist/design-system/Icon/__generated/icons/VariableIcon.v2.d.ts +4 -0
  24. package/dist/design-system/Icon/__generated/icons/VariableIcon.v2.d.ts.map +1 -0
  25. package/dist/design-system/Icon/__generated/icons/index.d.ts +1 -0
  26. package/dist/design-system/Icon/__generated/icons/index.d.ts.map +1 -1
  27. package/dist/design-system/Input/Input.d.ts +1 -1
  28. package/dist/design-system/Input/Input.d.ts.map +1 -1
  29. package/dist/design-system/Modal/Modal.d.ts.map +1 -1
  30. package/dist/design-system/Notification/Notification.d.ts +2 -2
  31. package/dist/design-system/Notification/Notification.d.ts.map +1 -1
  32. package/dist/design-system/PopoverV2/PopoverV2.d.ts +10 -0
  33. package/dist/design-system/PopoverV2/PopoverV2.d.ts.map +1 -0
  34. package/dist/design-system/PopoverV2/PopoverV2.test.d.ts +2 -0
  35. package/dist/design-system/PopoverV2/PopoverV2.test.d.ts.map +1 -0
  36. package/dist/design-system/PopoverV2/index.d.ts +2 -0
  37. package/dist/design-system/PopoverV2/index.d.ts.map +1 -0
  38. package/dist/design-system/Radio/Radio.d.ts +10 -8
  39. package/dist/design-system/Radio/Radio.d.ts.map +1 -1
  40. package/dist/design-system/Select/Select.d.ts +3 -3
  41. package/dist/design-system/Select/Select.d.ts.map +1 -1
  42. package/dist/design-system/Spacer/Spacer.d.ts +1 -1
  43. package/dist/design-system/Spacer/Spacer.d.ts.map +1 -1
  44. package/dist/design-system/SplitButton/Dropdown/DropdownButton.d.ts +4 -4
  45. package/dist/design-system/SplitButton/Dropdown/DropdownButton.d.ts.map +1 -1
  46. package/dist/design-system/SplitButton/SplitButton.d.ts +1 -1
  47. package/dist/design-system/SplitButton/SplitButton.d.ts.map +1 -1
  48. package/dist/design-system/Tag/index.d.ts +5 -3
  49. package/dist/design-system/Tag/index.d.ts.map +1 -1
  50. package/dist/design-system/Tree/Tree.d.ts +1 -1
  51. package/dist/design-system/Tree/Tree.d.ts.map +1 -1
  52. package/dist/design-system/Typography/Link.d.ts +1 -1
  53. package/dist/design-system/Typography/Link.d.ts.map +1 -1
  54. package/dist/design-system/Typography/Paragraph.d.ts +2 -2
  55. package/dist/design-system/Typography/Paragraph.d.ts.map +1 -1
  56. package/dist/design-system/Typography/Text.d.ts +2 -2
  57. package/dist/design-system/Typography/Text.d.ts.map +1 -1
  58. package/dist/design-system/Typography/Title.d.ts +2 -2
  59. package/dist/design-system/Typography/Title.d.ts.map +1 -1
  60. package/dist/design-system/index.d.ts +2 -0
  61. package/dist/design-system/index.d.ts.map +1 -1
  62. package/dist/design-system/types.d.ts +2 -2
  63. package/dist/design-system/types.d.ts.map +1 -1
  64. package/dist/flags.d.ts +4 -3
  65. package/dist/flags.d.ts.map +1 -1
  66. package/dist/index-mfe-dark.css +17524 -0
  67. package/dist/index-mfe.css +17183 -0
  68. package/dist/index.js +1387 -909
  69. package/dist/index.js.map +1 -1
  70. package/dist/test-utils/enzyme.d.ts +8 -0
  71. package/dist/test-utils/enzyme.d.ts.map +1 -0
  72. package/dist/test-utils/enzyme.js +16 -0
  73. package/dist/test-utils/enzyme.js.map +1 -0
  74. package/dist/test-utils/rtl.d.ts +7 -0
  75. package/dist/test-utils/rtl.d.ts.map +1 -0
  76. package/dist/test-utils/rtl.js +13 -0
  77. package/dist/test-utils/rtl.js.map +1 -0
  78. package/dist/test-utils/types.d.ts +15 -0
  79. package/dist/test-utils/types.d.ts.map +1 -0
  80. package/dist/theme/colorList.d.ts +7 -7
  81. package/dist/theme/colorList.d.ts.map +1 -1
  82. package/dist/theme/colors.d.ts +1 -1
  83. package/dist/theme/colors.d.ts.map +1 -1
  84. package/dist/theme/index.d.ts +2 -2
  85. package/dist/theme/index.d.ts.map +1 -1
  86. package/package.json +20 -14
  87. package/dist/design-system/Collapse/Collapse.d.ts +0 -44
  88. package/dist/design-system/Collapse/Collapse.d.ts.map +0 -1
  89. package/dist/design-system/Collapse/index.d.ts +0 -2
  90. package/dist/design-system/Collapse/index.d.ts.map +0 -1
  91. package/dist/design-system/FormV2/FormV2.d.ts +0 -21
  92. package/dist/design-system/FormV2/FormV2.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { createContext, useMemo, useEffect, useContext, useRef, forwardRef, useImperativeHandle, Children, useCallback, useState } from 'react';
3
3
  import AntDIcon from '@ant-design/icons';
4
- import { useTheme, ThemeProvider, css, ClassNames, keyframes } from '@emotion/react';
4
+ import { useTheme, ThemeProvider, css, keyframes, ClassNames } from '@emotion/react';
5
5
  import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
6
6
  import chroma from 'chroma-js';
7
- import { notification, ConfigProvider, Collapse, Alert as Alert$1, AutoComplete as AutoComplete$1, Breadcrumb as Breadcrumb$1, Button as Button$1, Checkbox as Checkbox$1, DatePicker, Dropdown as Dropdown$1, Tooltip as Tooltip$1, Typography as Typography$1, Form as Form$1, Input as Input$1, Radio as Radio$1, Select as Select$1, Switch as Switch$1, Col as Col$1, Row as Row$1, Space as Space$1, Layout as Layout$1, Menu as Menu$1, Modal as Modal$1, Pagination as Pagination$1, Popover as Popover$1, Skeleton as Skeleton$1, Table as Table$1, Tabs as Tabs$1, Tree as Tree$1 } from 'antd';
7
+ import { notification, ConfigProvider, Collapse, Alert as Alert$1, AutoComplete as AutoComplete$1, Breadcrumb as Breadcrumb$1, Button as Button$1, Checkbox as Checkbox$1, DatePicker, Typography as Typography$1, Dropdown as Dropdown$1, Tooltip as Tooltip$1, Form as Form$1, Input as Input$1, Radio as Radio$1, Select as Select$1, Switch as Switch$1, Col as Col$1, Row as Row$1, Space as Space$1, Layout as Layout$1, Menu as Menu$1, Modal as Modal$1, Pagination as Pagination$1, Popover as Popover$2, Skeleton as Skeleton$1, Table as Table$1, Tabs as Tabs$1, Tree as Tree$1 } from 'antd';
8
8
  import classnames from 'classnames';
9
9
  import _isNil from 'lodash/isNil';
10
10
  import _endsWith from 'lodash/endsWith';
@@ -13,8 +13,10 @@ import _isNumber from 'lodash/isNumber';
13
13
  import _isString from 'lodash/isString';
14
14
  import _mapValues from 'lodash/mapValues';
15
15
  import unitless from '@emotion/unitless';
16
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
16
17
  import * as DropdownMenu$1 from '@radix-ui/react-dropdown-menu';
17
18
  import { useController } from 'react-hook-form';
19
+ import * as Popover$1 from '@radix-ui/react-popover';
18
20
  import _taggedTemplateLiteral from '@babel/runtime/helpers/taggedTemplateLiteral';
19
21
  import { ResizableBox } from 'react-resizable';
20
22
 
@@ -268,6 +270,7 @@ function getSemanticColors(theme) {
268
270
  }
269
271
  }
270
272
 
273
+ // TODO (FEINF-1674): Remove when removing USE_NEW_RADIO_STYLES
271
274
  /*
272
275
  Colors that need to be replaced by semantic colors.
273
276
  */
@@ -536,12 +539,43 @@ const DesignSystemProvider = _ref => {
536
539
  })
537
540
  });
538
541
  };
539
- const ApplyDesignSystemFlags = _ref2 => {
542
+ const ApplyDesignSystemContextOverrides = _ref2 => {
540
543
  let {
544
+ theme,
545
+ enableAnimation,
546
+ zIndexBase,
547
+ getPopupContainer,
541
548
  flags,
542
549
  children
543
550
  } = _ref2;
544
551
  const parentDesignSystemProviderProps = useContext(DesignSystemProviderPropsContext);
552
+ if (parentDesignSystemProviderProps === null) {
553
+ throw new Error("ApplyDesignSystemContextOverrides cannot be used standalone - DesignSystemProvider must exist in the React context");
554
+ }
555
+ const newProps = useMemo(() => ({
556
+ ...parentDesignSystemProviderProps,
557
+ theme: theme !== null && theme !== void 0 ? theme : parentDesignSystemProviderProps.theme,
558
+ enableAnimation: enableAnimation !== null && enableAnimation !== void 0 ? enableAnimation : parentDesignSystemProviderProps.enableAnimation,
559
+ zIndexBase: zIndexBase !== null && zIndexBase !== void 0 ? zIndexBase : parentDesignSystemProviderProps.zIndexBase,
560
+ getPopupContainer: getPopupContainer !== null && getPopupContainer !== void 0 ? getPopupContainer : parentDesignSystemProviderProps.getPopupContainer,
561
+ flags: {
562
+ ...parentDesignSystemProviderProps.flags,
563
+ ...flags
564
+ }
565
+ }), [parentDesignSystemProviderProps, theme, enableAnimation, zIndexBase, getPopupContainer, flags]);
566
+ return jsx(DesignSystemProvider, {
567
+ ...newProps,
568
+ children: children
569
+ });
570
+ };
571
+
572
+ // This is a more-specific version of `ApplyDesignSystemContextOverrides` that only allows overriding the flags.
573
+ const ApplyDesignSystemFlags = _ref3 => {
574
+ let {
575
+ flags,
576
+ children
577
+ } = _ref3;
578
+ const parentDesignSystemProviderProps = useContext(DesignSystemProviderPropsContext);
545
579
  if (parentDesignSystemProviderProps === null) {
546
580
  throw new Error("ApplyDesignSystemFlags cannot be used standalone - DesignSystemProvider must exist in the React context");
547
581
  }
@@ -557,10 +591,10 @@ const ApplyDesignSystemFlags = _ref2 => {
557
591
  children: children
558
592
  });
559
593
  };
560
- const DesignSystemAntDConfigProvider = _ref3 => {
594
+ const DesignSystemAntDConfigProvider = _ref4 => {
561
595
  let {
562
596
  children
563
- } = _ref3;
597
+ } = _ref4;
564
598
  const antdContext = useAntDConfigProviderContext();
565
599
  return jsx(ConfigProvider, {
566
600
  ...antdContext,
@@ -581,10 +615,10 @@ const useAntDConfigProviderContext = () => {
581
615
  * Since all Design System's components have are wrapped with DesignSystemAntDConfigProvider,
582
616
  * this won't affect their own prefixCls, but just allow nested antd components to keep their ant prefix.
583
617
  */
584
- const RestoreAntDDefaultClsPrefix = _ref4 => {
618
+ const RestoreAntDDefaultClsPrefix = _ref5 => {
585
619
  let {
586
620
  children
587
- } = _ref4;
621
+ } = _ref5;
588
622
  return jsx(ConfigProvider, {
589
623
  prefixCls: "ant",
590
624
  children: children
@@ -8776,6 +8810,27 @@ function UnderlineIcon(props) {
8776
8810
  });
8777
8811
  }
8778
8812
 
8813
+ function SvgVariableIcon(props) {
8814
+ return jsx("svg", {
8815
+ width: "1em",
8816
+ height: "1em",
8817
+ viewBox: "0 0 16 16",
8818
+ fill: "none",
8819
+ xmlns: "http://www.w3.org/2000/svg",
8820
+ ...props,
8821
+ children: jsx("path", {
8822
+ d: "M3.73 13.2h.4v-1.109h-.257c-.78 0-1.084-.345-1.084-1.228v-1.74c0-.858-.507-1.347-1.472-1.448v-.173c.965-.108 1.472-.596 1.472-1.455v-1.71c0-.883.304-1.228 1.084-1.228h.257V2h-.4c-1.638 0-2.353.662-2.353 2.158v1.46c0 .906-.37 1.234-1.377 1.234v1.466c1.013.006 1.377.334 1.377 1.234v1.472c0 1.502.715 2.176 2.353 2.176zM4.994 11.036H6.59L7.92 8.771h.1l1.336 2.265h1.668L8.897 7.74 11 4.521H9.374l-1.288 2.26h-.1L6.691 4.52H4.976l2.127 3.285-2.11 3.23zM12.27 13.2c1.638 0 2.354-.674 2.354-2.176V9.552c0-.9.363-1.228 1.376-1.234V6.852c-1.007 0-1.377-.328-1.377-1.234v-1.46C14.623 2.662 13.909 2 12.27 2h-.4v1.109h.257c.786 0 1.09.345 1.09 1.228v1.71c0 .859.5 1.347 1.466 1.455v.173c-.965.1-1.466.59-1.466 1.448v1.74c0 .883-.31 1.228-1.09 1.228h-.257V13.2h.4z",
8823
+ fill: "currentColor"
8824
+ })
8825
+ });
8826
+ }
8827
+ function VariableIcon(props) {
8828
+ return jsx(Icon, {
8829
+ ...props,
8830
+ component: SvgVariableIcon
8831
+ });
8832
+ }
8833
+
8779
8834
  function SvgWorkspacesIcon(props) {
8780
8835
  return jsxs("svg", {
8781
8836
  width: "1em",
@@ -10048,841 +10103,1039 @@ const LegacyDatePicker = /* #__PURE__ */Object.assign(DuboisDatePicker, {
10048
10103
  YearPicker
10049
10104
  });
10050
10105
 
10051
- /**
10052
- * @deprecated Use `DropdownMenu` instead.
10053
- */
10054
- const Dropdown = _ref => {
10106
+ const Spacer = _ref => {
10055
10107
  let {
10056
- dangerouslySetAntdProps,
10108
+ size = 'md',
10057
10109
  ...props
10058
10110
  } = _ref;
10059
10111
  const {
10060
10112
  theme
10061
10113
  } = useDesignSystemTheme();
10062
- return jsx(DesignSystemAntDConfigProvider, {
10063
- children: jsx(Dropdown$1, {
10064
- mouseLeaveDelay: 0.25,
10065
- ...props,
10066
- overlayStyle: {
10067
- zIndex: theme.options.zIndexBase + 50,
10068
- ...props.overlayStyle
10069
- },
10070
- ...dangerouslySetAntdProps
10071
- })
10114
+ const spacingValues = {
10115
+ xs: theme.spacing.xs,
10116
+ sm: theme.spacing.sm,
10117
+ md: theme.spacing.md,
10118
+ lg: theme.spacing.lg
10119
+ };
10120
+ return jsx("div", {
10121
+ css: /*#__PURE__*/css({
10122
+ height: spacingValues[size]
10123
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Spacer;"),
10124
+ ...props
10072
10125
  });
10073
10126
  };
10074
10127
 
10075
- const Tooltip = _ref => {
10128
+ const getLinkStyles = (theme, clsPrefix, useNewIcons) => {
10129
+ const classTypography = ".".concat(clsPrefix, "-typography");
10130
+ const styles = {
10131
+ ["&".concat(classTypography, ", &").concat(classTypography, ":focus")]: {
10132
+ color: theme.colors.actionTertiaryTextDefault
10133
+ },
10134
+ ["&".concat(classTypography, ":hover, &").concat(classTypography, ":hover .anticon")]: {
10135
+ color: theme.colors.actionTertiaryTextHover,
10136
+ textDecoration: 'underline'
10137
+ },
10138
+ ["&".concat(classTypography, ":active, &").concat(classTypography, ":active .anticon")]: {
10139
+ color: theme.colors.actionTertiaryTextPress,
10140
+ textDecoration: 'underline'
10141
+ },
10142
+ ["&".concat(classTypography, ":focus-visible")]: {
10143
+ textDecoration: 'underline'
10144
+ },
10145
+ ...(useNewIcons && {
10146
+ '.anticon': {
10147
+ fontSize: 12
10148
+ }
10149
+ })
10150
+ };
10151
+ return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getLinkStyles;");
10152
+ };
10153
+ const getEllipsisNewTabLinkStyles = () => {
10154
+ const styles = {
10155
+ paddingRight: 'calc(2px + 1em)',
10156
+ // 1em for icon
10157
+ position: 'relative'
10158
+ };
10159
+ return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getEllipsisNewTabLinkStyles;");
10160
+ };
10161
+ const getIconStyles = theme => {
10162
+ const styles = {
10163
+ marginLeft: 2,
10164
+ color: theme.colors.actionTertiaryTextDefault
10165
+ };
10166
+ return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getIconStyles;");
10167
+ };
10168
+ const getEllipsisIconStyles = useNewIcons => {
10169
+ const styles = {
10170
+ position: 'absolute',
10171
+ right: 0,
10172
+ bottom: 0,
10173
+ top: 0,
10174
+ display: 'flex',
10175
+ alignItems: 'center',
10176
+ ...(useNewIcons && {
10177
+ fontSize: 12
10178
+ })
10179
+ };
10180
+ return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getEllipsisIconStyles;");
10181
+ };
10182
+ function Link(_ref) {
10076
10183
  let {
10077
- children,
10078
- title,
10079
- placement = 'top',
10080
- dataTestId,
10081
10184
  dangerouslySetAntdProps,
10082
10185
  ...props
10083
10186
  } = _ref;
10084
10187
  const {
10085
- theme
10188
+ children,
10189
+ openInNewTab,
10190
+ ...restProps
10191
+ } = props;
10192
+ const {
10193
+ theme,
10194
+ classNamePrefix
10086
10195
  } = useDesignSystemTheme();
10087
- if (!title) {
10088
- return jsx(React__default.Fragment, {
10089
- children: children
10090
- });
10091
- }
10196
+ const {
10197
+ USE_NEW_ICONS: useNewIcons
10198
+ } = useDesignSystemFlags();
10199
+ const newTabProps = {
10200
+ rel: 'noopener noreferrer',
10201
+ target: '_blank'
10202
+ };
10203
+ const linkProps = openInNewTab ? {
10204
+ ...restProps,
10205
+ ...newTabProps
10206
+ } : {
10207
+ ...restProps
10208
+ };
10209
+ const linkStyles = props.ellipsis && openInNewTab ? [getLinkStyles(theme, classNamePrefix, useNewIcons), getEllipsisNewTabLinkStyles()] : getLinkStyles(theme, classNamePrefix, useNewIcons);
10210
+ const iconStyles = props.ellipsis ? [getIconStyles(theme), getEllipsisIconStyles()] : getIconStyles(theme);
10092
10211
  return jsx(DesignSystemAntDConfigProvider, {
10093
- children: jsx(Tooltip$1
10094
- // eslint-disable-next-line react/forbid-dom-props -- FEINF-1337 - this should turn into data-testid
10095
- , {
10096
- title: jsx("span", {
10097
- "data-test-id": dataTestId,
10098
- children: title
10099
- }),
10100
- placement: placement
10101
- // Always trigger on hover and focus
10102
- ,
10103
- trigger: ['hover', 'focus'],
10104
- overlayInnerStyle: {
10105
- backgroundColor: '#2F3941',
10106
- lineHeight: '22px',
10107
- padding: '4px 8px'
10108
- },
10109
- overlayStyle: {
10110
- zIndex: theme.options.zIndexBase + 70
10111
- },
10112
- css: getAnimationCss(theme.options.enableAnimation),
10212
+ children: jsxs(Typography$1.Link, {
10213
+ css: linkStyles,
10214
+ ...linkProps,
10113
10215
  ...dangerouslySetAntdProps,
10114
- ...props,
10115
- children: children
10216
+ children: [children, openInNewTab ? jsx(NewWindowIcon, {
10217
+ css: iconStyles,
10218
+ ...newTabProps
10219
+ }) : null]
10116
10220
  })
10117
10221
  });
10118
- };
10119
-
10120
- const Root = DropdownMenu$1.Root; // Behavioral component only
10222
+ }
10121
10223
 
10122
- const Content$2 = /*#__PURE__*/forwardRef(function Content(_ref, ref) {
10123
- let {
10124
- children,
10125
- minWidth = 220,
10224
+ const {
10225
+ Paragraph: AntDParagraph
10226
+ } = Typography$1;
10227
+ function getParagraphEmotionStyles(theme, props) {
10228
+ return /*#__PURE__*/css({
10229
+ '&&': {
10230
+ fontSize: theme.typography.fontSizeBase,
10231
+ lineHeight: theme.typography.lineHeightBase,
10232
+ color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
10233
+ }
10234
+ }, props.disabled && {
10235
+ '&&': {
10236
+ color: theme.colors.actionDisabledText
10237
+ }
10238
+ }, props.withoutMargins && {
10239
+ '&&': {
10240
+ marginTop: 0,
10241
+ marginBottom: 0
10242
+ }
10243
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getParagraphEmotionStyles;");
10244
+ }
10245
+ function Paragraph$1(userProps) {
10246
+ const {
10247
+ dangerouslySetAntdProps,
10248
+ withoutMargins,
10249
+ color,
10126
10250
  ...props
10127
- } = _ref;
10251
+ } = userProps;
10128
10252
  const {
10129
- getPopupContainer
10130
- } = useDesignSystemContext();
10131
- return jsx(DropdownMenu$1.Portal, {
10132
- container: getPopupContainer && getPopupContainer(),
10133
- children: jsx(DropdownMenu$1.Content, {
10134
- ref: ref,
10135
- css: [contentStyles, {
10136
- minWidth
10137
- }, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
10138
- sideOffset: 4,
10139
- align: "start",
10253
+ theme
10254
+ } = useDesignSystemTheme();
10255
+ return jsx(DesignSystemAntDConfigProvider, {
10256
+ children: jsx(AntDParagraph, {
10140
10257
  ...props,
10141
- children: children
10258
+ className: props.className,
10259
+ css: getParagraphEmotionStyles(theme, userProps),
10260
+ ...dangerouslySetAntdProps
10142
10261
  })
10143
10262
  });
10144
- });
10145
- const SubContent = /*#__PURE__*/forwardRef(function Content(_ref2, ref) {
10146
- let {
10147
- children,
10148
- minWidth = 220,
10149
- ...props
10150
- } = _ref2;
10151
- const {
10152
- getPopupContainer
10153
- } = useDesignSystemContext();
10154
- return jsx(DropdownMenu$1.Portal, {
10155
- container: getPopupContainer && getPopupContainer(),
10156
- children: jsx(DropdownMenu$1.SubContent, {
10157
- ref: ref,
10158
- css: [contentStyles, {
10159
- minWidth
10160
- }, process.env.NODE_ENV === "production" ? "" : ";label:SubContent;"],
10161
- sideOffset: -2,
10162
- alignOffset: -5,
10163
- ...props,
10164
- children: children
10165
- })
10166
- });
10167
- });
10168
- const Trigger = /*#__PURE__*/forwardRef(function Trigger(_ref3, ref) {
10169
- let {
10170
- children,
10171
- ...props
10172
- } = _ref3;
10173
- return jsx(DropdownMenu$1.Trigger, {
10174
- ref: ref,
10175
- ...props,
10176
- children: children
10177
- });
10178
- });
10179
- const Item = /*#__PURE__*/forwardRef(function Item(_ref4, ref) {
10180
- let {
10181
- children,
10182
- disabledReason,
10183
- danger,
10184
- ...props
10185
- } = _ref4;
10186
- const itemRef = useRef(null);
10187
- useImperativeHandle(ref, () => itemRef.current);
10188
- return jsx(DropdownMenu$1.Item, {
10189
- css: theme => [itemStyles, danger && dangerItemStyles(theme)],
10190
- ref: itemRef,
10191
- ...props,
10192
- children: getNewChildren(children, props, disabledReason, itemRef)
10193
- });
10194
- });
10195
- const Label$1 = /*#__PURE__*/forwardRef(function Label(_ref5, ref) {
10196
- let {
10197
- children,
10198
- ...props
10199
- } = _ref5;
10200
- return jsx(DropdownMenu$1.Label, {
10201
- ref: ref,
10202
- css: [itemStyles, theme => ({
10203
- color: theme.colors.textSecondary,
10204
- '&:hover': {
10205
- cursor: 'default'
10206
- }
10207
- }), process.env.NODE_ENV === "production" ? "" : ";label:Label;"],
10208
- ...props,
10209
- children: children
10210
- });
10211
- });
10212
- const Separator = /*#__PURE__*/forwardRef(function Separator(_ref6, ref) {
10213
- let {
10214
- children,
10215
- ...props
10216
- } = _ref6;
10217
- return jsx(DropdownMenu$1.Separator, {
10218
- ref: ref,
10219
- css: theme => ({
10220
- height: 1,
10221
- margin: "".concat(theme.spacing.xs, "px ").concat(theme.spacing.sm, "px"),
10222
- backgroundColor: theme.colors.borderDecorative
10223
- }),
10224
- ...props,
10225
- children: children
10226
- });
10227
- });
10228
- const SubTrigger = /*#__PURE__*/forwardRef(function TriggerItem(_ref7, ref) {
10229
- let {
10230
- children,
10231
- disabledReason,
10232
- ...props
10233
- } = _ref7;
10234
- const subTriggerRef = useRef(null);
10235
- useImperativeHandle(ref, () => subTriggerRef.current);
10236
- return jsxs(DropdownMenu$1.SubTrigger, {
10237
- ref: subTriggerRef,
10238
- css: [itemStyles, theme => ({
10239
- '&[data-state="open"]': {
10240
- backgroundColor: theme.colors.actionTertiaryBackgroundHover
10241
- }
10242
- }), process.env.NODE_ENV === "production" ? "" : ";label:SubTrigger;"],
10243
- ...props,
10244
- children: [getNewChildren(children, props, disabledReason, subTriggerRef), jsx(HintColumn, {
10245
- css: theme => ({
10246
- margin: CONSTANTS.subMenuIconMargin(theme),
10247
- display: 'flex',
10248
- alignSelf: 'stretch',
10249
- alignItems: 'center'
10250
- }),
10251
- children: jsx(ChevronRightIcon, {
10252
- css: theme => ({
10253
- fontSize: CONSTANTS.subMenuIconSize(theme)
10254
- })
10255
- })
10256
- })]
10257
- });
10258
- });
10263
+ }
10259
10264
 
10260
- /**
10261
- * Deprecated. Use `SubTrigger` instead.
10262
- * @deprecated
10263
- */
10264
- const TriggerItem = SubTrigger;
10265
- const CheckboxItem = /*#__PURE__*/forwardRef(function CheckboxItem(_ref8, ref) {
10266
- let {
10267
- children,
10268
- disabledReason,
10269
- ...props
10270
- } = _ref8;
10271
- const flags = useDesignSystemFlags();
10272
- const checkboxItemRef = useRef(null);
10273
- useImperativeHandle(ref, () => checkboxItemRef.current);
10274
- return jsx(DropdownMenu$1.CheckboxItem, {
10275
- ref: checkboxItemRef,
10276
- css: theme => [itemStyles, checkboxItemStyles(theme, flags)],
10277
- ...props,
10278
- children: getNewChildren(children, props, disabledReason, checkboxItemRef)
10279
- });
10280
- });
10281
- const ItemIndicator = /*#__PURE__*/forwardRef(function ItemIndicator(_ref9, ref) {
10282
- let {
10283
- children,
10284
- ...props
10285
- } = _ref9;
10286
- const flags = useDesignSystemFlags();
10287
- return jsx(DropdownMenu$1.ItemIndicator, {
10288
- ref: ref,
10289
- css: theme => ({
10290
- marginLeft: -(CONSTANTS.checkboxIconWidth(theme, flags) + CONSTANTS.checkboxPaddingRight(theme, flags)),
10291
- position: 'absolute',
10292
- ...(!flags.USE_NEW_ICONS && {
10293
- fontSize: 24
10294
- })
10295
- }),
10296
- ...props,
10297
- children: children !== null && children !== void 0 ? children : jsx(CheckIcon, {
10298
- css: theme => ({
10299
- color: theme.colors.textSecondary
10300
- })
10301
- })
10302
- });
10303
- });
10304
- const Arrow = /*#__PURE__*/forwardRef(function Arrow(_ref10, ref) {
10305
- let {
10306
- children,
10265
+ const {
10266
+ Text: AntDText
10267
+ } = Typography$1;
10268
+ function getTextEmotionStyles(theme, props) {
10269
+ return /*#__PURE__*/css({
10270
+ '&&': {
10271
+ fontSize: theme.typography.fontSizeBase,
10272
+ lineHeight: theme.typography.lineHeightBase,
10273
+ color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
10274
+ }
10275
+ }, props.disabled && {
10276
+ '&&': {
10277
+ color: theme.colors.actionDisabledText
10278
+ }
10279
+ }, props.hint && {
10280
+ '&&': {
10281
+ fontSize: theme.typography.fontSizeSm,
10282
+ lineHeight: theme.typography.lineHeightSm
10283
+ }
10284
+ }, props.bold && {
10285
+ '&&': {
10286
+ fontSize: theme.typography.fontSizeBase,
10287
+ fontWeight: theme.typography.typographyBoldFontWeight,
10288
+ lineHeight: theme.typography.lineHeightBase
10289
+ }
10290
+ }, props.code && {
10291
+ '&& > code': {
10292
+ fontSize: theme.typography.fontSizeBase,
10293
+ lineHeight: theme.typography.lineHeightBase,
10294
+ fontWeight: theme.typography.typographyBoldFontWeight,
10295
+ background: theme.colors.typographyCodeBg,
10296
+ fontFamily: 'monospace',
10297
+ borderRadius: theme.borders.borderRadiusMd,
10298
+ padding: '2px 4px',
10299
+ border: 'unset',
10300
+ margin: 0
10301
+ }
10302
+ }, props.size && {
10303
+ '&&': (() => {
10304
+ switch (props.size) {
10305
+ case 'xxl':
10306
+ return {
10307
+ fontSize: theme.typography.fontSizeXxl,
10308
+ lineHeight: theme.typography.lineHeightXxl
10309
+ };
10310
+ case 'xl':
10311
+ return {
10312
+ fontSize: theme.typography.fontSizeXl,
10313
+ lineHeight: theme.typography.lineHeightXl
10314
+ };
10315
+ case 'lg':
10316
+ return {
10317
+ fontSize: theme.typography.fontSizeLg,
10318
+ lineHeight: theme.typography.lineHeightLg
10319
+ };
10320
+ case 'sm':
10321
+ return {
10322
+ fontSize: theme.typography.fontSizeSm,
10323
+ lineHeight: theme.typography.lineHeightSm
10324
+ };
10325
+ default:
10326
+ return {
10327
+ fontSize: theme.typography.fontSizeMd,
10328
+ lineHeight: theme.typography.lineHeightMd
10329
+ };
10330
+ }
10331
+ })()
10332
+ }, props.withoutMargins && {
10333
+ '&&': {
10334
+ marginTop: 0,
10335
+ marginBottom: 0
10336
+ }
10337
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getTextEmotionStyles;");
10338
+ }
10339
+ function Text(userProps) {
10340
+ // Omit props that are not supported by `antd`
10341
+ const {
10342
+ dangerouslySetAntdProps,
10343
+ bold,
10344
+ hint,
10345
+ withoutMargins,
10346
+ color,
10307
10347
  ...props
10308
- } = _ref10;
10348
+ } = userProps;
10309
10349
  const {
10310
10350
  theme
10311
10351
  } = useDesignSystemTheme();
10312
- return jsx(DropdownMenu$1.Arrow, {
10313
- css: /*#__PURE__*/css({
10314
- fill: theme.colors.backgroundPrimary,
10315
- stroke: theme.colors.borderDecorative,
10316
- strokeDashoffset: -CONSTANTS.arrowBottomLength(),
10317
- strokeDasharray: CONSTANTS.arrowBottomLength() + 2 * CONSTANTS.arrowSide(),
10318
- strokeWidth: CONSTANTS.arrowStrokeWidth(),
10319
- // TODO: This is a temporary fix for the alignment of the Arrow;
10320
- // Radix has changed the implementation for v1.0.0 (uses floating-ui)
10321
- // which has new behaviors for alignment that we don't want. Generally
10322
- // we need to fix the arrow to always be aligned to the left of the menu (with
10323
- // offset equal to border radius)
10324
- position: 'relative',
10325
- top: -1
10326
- }, process.env.NODE_ENV === "production" ? "" : ";label:Arrow;"),
10327
- ref: ref,
10328
- width: 12,
10329
- height: 6,
10330
- ...props,
10331
- children: children
10332
- });
10333
- });
10334
- const RadioItem = /*#__PURE__*/forwardRef(function RadioItem(_ref11, ref) {
10335
- let {
10336
- children,
10337
- disabledReason,
10338
- ...props
10339
- } = _ref11;
10340
- const flags = useDesignSystemFlags();
10341
- const radioItemRef = useRef(null);
10342
- useImperativeHandle(ref, () => radioItemRef.current);
10343
- return jsx(DropdownMenu$1.RadioItem, {
10344
- ref: radioItemRef,
10345
- css: theme => [itemStyles, checkboxItemStyles(theme, flags)],
10346
- ...props,
10347
- children: getNewChildren(children, props, disabledReason, radioItemRef)
10352
+ return jsx(DesignSystemAntDConfigProvider, {
10353
+ children: jsx(AntDText, {
10354
+ ...props,
10355
+ className: props.className,
10356
+ css: getTextEmotionStyles(theme, userProps),
10357
+ ...dangerouslySetAntdProps
10358
+ })
10348
10359
  });
10349
- });
10350
-
10351
- // UNWRAPPED RADIX-UI-COMPONENTS
10352
- const Group$1 = DropdownMenu$1.Group;
10353
- const RadioGroup = DropdownMenu$1.RadioGroup;
10354
- const Sub = DropdownMenu$1.Sub;
10360
+ }
10355
10361
 
10356
- // EXTRA COMPONENTS
10357
- const HintColumn = /*#__PURE__*/forwardRef(function HintColumn(_ref12, ref) {
10358
- let {
10359
- children,
10360
- ...props
10361
- } = _ref12;
10362
- return jsx("div", {
10363
- ref: ref,
10364
- css: [metaTextStyles, "margin-left:auto;" + (process.env.NODE_ENV === "production" ? "" : ";label:HintColumn;")],
10365
- ...props,
10366
- children: children
10367
- });
10368
- });
10369
- const HintRow = /*#__PURE__*/forwardRef(function HintRow(_ref13, ref) {
10370
- let {
10371
- children,
10372
- ...props
10373
- } = _ref13;
10374
- return jsx("div", {
10375
- ref: ref,
10376
- css: [metaTextStyles, "min-width:100%;" + (process.env.NODE_ENV === "production" ? "" : ";label:HintRow;")],
10377
- ...props,
10378
- children: children
10379
- });
10380
- });
10381
- const IconWrapper = /*#__PURE__*/forwardRef(function IconWrapper(_ref14, ref) {
10382
- let {
10383
- children,
10384
- ...props
10385
- } = _ref14;
10386
- return jsx("div", {
10387
- ref: ref,
10388
- css: theme => ({
10389
- fontSize: 16,
10390
- color: theme.colors.textSecondary,
10391
- paddingRight: 4
10392
- }),
10393
- ...props,
10394
- children: children
10395
- });
10396
- });
10397
- const getNewChildren = (children, props, disabledReason, ref) => {
10398
- const childCount = Children.count(children);
10399
- const tooltip = jsx(Tooltip, {
10400
- title: disabledReason,
10401
- placement: "right",
10402
- dangerouslySetAntdProps: {
10403
- getPopupContainer: () => ref.current || document.body
10404
- },
10405
- children: jsx("span", {
10406
- css: theme => infoIconStyles(theme),
10407
- children: jsx(InfoBorderIcon, {})
10362
+ const {
10363
+ Title: AntDTitle
10364
+ } = Typography$1;
10365
+ function getLevelStyles(theme, props) {
10366
+ switch (props.level) {
10367
+ case 1:
10368
+ return /*#__PURE__*/css({
10369
+ '&&': {
10370
+ fontSize: theme.typography.fontSizeXxl,
10371
+ lineHeight: theme.typography.lineHeightXxl,
10372
+ fontWeight: theme.typography.typographyBoldFontWeight
10373
+ }
10374
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
10375
+ case 2:
10376
+ return /*#__PURE__*/css({
10377
+ '&&': {
10378
+ fontSize: theme.typography.fontSizeXl,
10379
+ lineHeight: theme.typography.lineHeightXl,
10380
+ fontWeight: theme.typography.typographyBoldFontWeight
10381
+ }
10382
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
10383
+ case 3:
10384
+ return /*#__PURE__*/css({
10385
+ '&&': {
10386
+ fontSize: theme.typography.fontSizeLg,
10387
+ lineHeight: theme.typography.lineHeightLg,
10388
+ fontWeight: theme.typography.typographyBoldFontWeight
10389
+ }
10390
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
10391
+ case 4:
10392
+ default:
10393
+ return /*#__PURE__*/css({
10394
+ '&&': {
10395
+ fontSize: theme.typography.fontSizeMd,
10396
+ lineHeight: theme.typography.lineHeightMd,
10397
+ fontWeight: theme.typography.typographyBoldFontWeight
10398
+ }
10399
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
10400
+ }
10401
+ }
10402
+ function getTitleEmotionStyles(theme, props) {
10403
+ return /*#__PURE__*/css(getLevelStyles(theme, props), {
10404
+ '&&': {
10405
+ color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
10406
+ }
10407
+ }, props.withoutMargins && {
10408
+ '&&': {
10409
+ marginTop: '0 !important',
10410
+ // override general styling
10411
+ marginBottom: '0 !important' // override general styling
10412
+ }
10413
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getTitleEmotionStyles;");
10414
+ }
10415
+ function Title$1(userProps) {
10416
+ const {
10417
+ dangerouslySetAntdProps,
10418
+ withoutMargins,
10419
+ color,
10420
+ ...props
10421
+ } = userProps;
10422
+ const {
10423
+ theme
10424
+ } = useDesignSystemTheme();
10425
+ return jsx(DesignSystemAntDConfigProvider, {
10426
+ children: jsx(AntDTitle, {
10427
+ ...props,
10428
+ className: props.className,
10429
+ css: getTitleEmotionStyles(theme, userProps),
10430
+ ...dangerouslySetAntdProps
10408
10431
  })
10409
10432
  });
10410
- if (childCount === 1) {
10411
- return getChild(children, !!props['disabled'], disabledReason, tooltip, 0, childCount);
10412
- }
10413
- return Children.map(children, (child, idx) => {
10414
- return getChild(child, !!props['disabled'], disabledReason, tooltip, idx, childCount);
10415
- });
10416
- };
10417
- const getChild = (child, isDisabled, disabledReason, tooltip, index, siblingCount) => {
10418
- const HintColumnType = jsx(HintColumn, {}).type;
10419
- const isHintColumnType = !!(child && typeof child !== 'string' && typeof child !== 'number' && typeof child !== 'boolean' && 'type' in child && (child === null || child === void 0 ? void 0 : child.type) === HintColumnType);
10420
- if (isDisabled && disabledReason && child && isHintColumnType) {
10421
- return jsxs(Fragment, {
10422
- children: [tooltip, child]
10423
- });
10424
- } else if (index === siblingCount - 1 && isDisabled && disabledReason) {
10425
- return jsxs(Fragment, {
10426
- children: [child, tooltip]
10433
+ }
10434
+
10435
+ const Typography = /* #__PURE__ */(() => {
10436
+ function Typography(_ref) {
10437
+ let {
10438
+ dangerouslySetAntdProps,
10439
+ ...props
10440
+ } = _ref;
10441
+ return jsx(DesignSystemAntDConfigProvider, {
10442
+ children: jsx(Typography$1, {
10443
+ ...props,
10444
+ ...dangerouslySetAntdProps
10445
+ })
10427
10446
  });
10428
10447
  }
10429
- return child;
10430
- };
10448
+ Typography.Text = Text;
10449
+ Typography.Title = Title$1;
10450
+ Typography.Paragraph = Paragraph$1;
10451
+ Typography.Link = Link;
10452
+ return Typography;
10453
+ })();
10431
10454
 
10432
- // CONSTANTS
10433
- const CONSTANTS = {
10434
- itemPaddingVertical(theme) {
10435
- // The number from the mocks is the midpoint between constants
10436
- return 0.5 * theme.spacing.xs + 0.5 * theme.spacing.sm;
10437
- },
10438
- itemPaddingHorizontal(theme) {
10439
- return theme.spacing.sm;
10440
- },
10441
- checkboxIconWidth(theme, flags) {
10442
- return flags.USE_NEW_ICONS ? theme.general.iconFontSizeNew : theme.spacing.lg;
10443
- },
10444
- checkboxPaddingLeft(theme) {
10445
- return theme.spacing.sm;
10446
- },
10447
- checkboxPaddingRight(theme, flags) {
10448
- return flags.USE_NEW_ICONS ? theme.spacing.sm : theme.spacing.xs;
10449
- },
10450
- subMenuIconMargin(theme) {
10451
- // Negative margin so the icons can be larger without increasing the overall item height
10452
- const iconMarginVertical = this.itemPaddingVertical(theme) / 2;
10453
- const iconMarginRight = -this.itemPaddingVertical(theme) + theme.spacing.sm * 1.5;
10454
- return "".concat(-iconMarginVertical, "px ").concat(-iconMarginRight, "px ").concat(-iconMarginVertical, "px auto");
10455
- },
10456
- subMenuIconSize(theme) {
10457
- return theme.spacing.lg;
10458
- },
10459
- arrowBottomLength() {
10460
- // The built in arrow is a polygon: 0,0 30,0 15,10
10461
- return 30;
10462
- },
10463
- arrowHeight() {
10464
- return 10;
10465
- },
10466
- arrowSide() {
10467
- return 2 * (this.arrowHeight() ** 2 * 2) ** 0.5;
10468
- },
10469
- arrowStrokeWidth() {
10470
- // This is eyeballed b/c relative to the svg viewbox coordinate system
10471
- return 2;
10472
- }
10455
+ function _EMOTION_STRINGIFIED_CSS_ERROR__$6() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
10456
+ const DEFAULT_WIDTH$1 = 320;
10457
+ const MIN_WIDTH = 320;
10458
+ const MAX_WIDTH = '90vw';
10459
+ const DEFAULT_POSITION = 'right';
10460
+ const ZINDEX_OVERLAY = 10;
10461
+ const ZINDEX_CONTENT = ZINDEX_OVERLAY + 10;
10462
+ var _ref2$2 = process.env.NODE_ENV === "production" ? {
10463
+ name: "1tflovp",
10464
+ styles: "flex-grow:1;margin-bottom:0;margin-top:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
10465
+ } : {
10466
+ name: "1bqm4qg-Content",
10467
+ styles: "flex-grow:1;margin-bottom:0;margin-top:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;label:Content;",
10468
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
10473
10469
  };
10474
- const dropdownContentStyles = theme => ({
10475
- backgroundColor: theme.colors.backgroundPrimary,
10476
- color: theme.colors.textPrimary,
10477
- lineHeight: theme.typography.lineHeightBase,
10478
- border: "1px solid ".concat(theme.colors.borderDecorative),
10479
- borderRadius: theme.borders.borderRadiusMd,
10480
- padding: "".concat(theme.spacing.xs, "px 0"),
10481
- boxShadow: theme.themeName !== 'dark' ? "0px 4px 16px 0px rgba(205, 218, 229, 1)" : undefined,
10482
- userSelect: 'none',
10483
- // Ant Design uses 1000s for their zIndex space; this ensures Radix works with that, but
10484
- // we'll likely need to be sure that all Radix components are using the same zIndex going forward.
10485
- zIndex: 2000,
10486
- a: importantify({
10487
- color: theme.colors.textPrimary,
10488
- '&:hover, &:focus': {
10489
- color: theme.colors.textPrimary
10490
- }
10491
- })
10492
- });
10493
- const contentStyles = theme => ({
10494
- ...dropdownContentStyles(theme)
10495
- });
10496
- const itemStyles = theme => ({
10497
- padding: "".concat(CONSTANTS.itemPaddingVertical(theme), "px ").concat(CONSTANTS.itemPaddingHorizontal(theme), "px"),
10498
- display: 'flex',
10499
- flexWrap: 'wrap',
10500
- alignItems: 'center',
10501
- outline: 'unset',
10502
- '&:hover': {
10503
- cursor: 'pointer'
10504
- },
10505
- '&:focus': {
10506
- backgroundColor: theme.colors.actionTertiaryBackgroundHover
10507
- },
10508
- '&[data-disabled]': {
10509
- pointerEvents: 'none',
10510
- color: theme.colors.actionDisabledText
10511
- }
10512
- });
10513
- const dangerItemStyles = theme => ({
10514
- color: theme.colors.textValidationDanger,
10515
- '&:hover, &:focus': {
10516
- backgroundColor: theme.colors.actionDangerDefaultBackgroundHover
10517
- }
10518
- });
10519
- const infoIconStyles = theme => ({
10520
- display: 'inline-flex',
10521
- paddingLeft: theme.spacing.xs,
10522
- color: theme.colors.textSecondary,
10523
- pointerEvents: 'all'
10524
- });
10525
- const checkboxItemStyles = (theme, flags) => ({
10526
- paddingLeft: CONSTANTS.checkboxIconWidth(theme, flags) + CONSTANTS.checkboxPaddingLeft(theme) + CONSTANTS.checkboxPaddingRight(theme, flags)
10527
- });
10528
- const metaTextStyles = theme => ({
10529
- color: theme.colors.textSecondary,
10530
- fontSize: theme.typography.fontSizeSm,
10531
- '[data-disabled] &': {
10532
- color: theme.colors.actionDisabledText
10533
- }
10534
- });
10535
-
10536
- var DropdownMenu = /*#__PURE__*/Object.freeze({
10537
- __proto__: null,
10538
- Root: Root,
10539
- Content: Content$2,
10540
- SubContent: SubContent,
10541
- Trigger: Trigger,
10542
- Item: Item,
10543
- Label: Label$1,
10544
- Separator: Separator,
10545
- SubTrigger: SubTrigger,
10546
- TriggerItem: TriggerItem,
10547
- CheckboxItem: CheckboxItem,
10548
- ItemIndicator: ItemIndicator,
10549
- Arrow: Arrow,
10550
- RadioItem: RadioItem,
10551
- Group: Group$1,
10552
- RadioGroup: RadioGroup,
10553
- Sub: Sub,
10554
- HintColumn: HintColumn,
10555
- HintRow: HintRow,
10556
- IconWrapper: IconWrapper,
10557
- dropdownContentStyles: dropdownContentStyles
10558
- });
10470
+ const Content$4 = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
10471
+ let {
10472
+ children,
10473
+ footer,
10474
+ title,
10475
+ width,
10476
+ position: positionOverride,
10477
+ useCustomScrollBehavior
10478
+ } = _ref;
10479
+ const {
10480
+ theme
10481
+ } = useDesignSystemTheme();
10482
+ const rightContentPadding = theme.spacing.lg; // matches left/top/bottom padding
10559
10483
 
10560
- const getLinkStyles = (theme, clsPrefix, useNewIcons) => {
10561
- const classTypography = ".".concat(clsPrefix, "-typography");
10562
- const styles = {
10563
- ["&".concat(classTypography, ", &").concat(classTypography, ":focus")]: {
10564
- color: theme.colors.actionTertiaryTextDefault
10565
- },
10566
- ["&".concat(classTypography, ":hover, &").concat(classTypography, ":hover .anticon")]: {
10567
- color: theme.colors.actionTertiaryTextHover,
10568
- textDecoration: 'underline'
10569
- },
10570
- ["&".concat(classTypography, ":active, &").concat(classTypography, ":active .anticon")]: {
10571
- color: theme.colors.actionTertiaryTextPress,
10572
- textDecoration: 'underline'
10484
+ const position = positionOverride !== null && positionOverride !== void 0 ? positionOverride : DEFAULT_POSITION;
10485
+ const overlayShow = position === 'right' ? keyframes({
10486
+ '0%': {
10487
+ transform: 'translate(100%, 0)'
10573
10488
  },
10574
- ["&".concat(classTypography, ":focus-visible")]: {
10575
- textDecoration: 'underline'
10489
+ '100%': {
10490
+ transform: 'translate(0, 0)'
10491
+ }
10492
+ }) : keyframes({
10493
+ '0%': {
10494
+ transform: 'translate(-100%, 0)'
10576
10495
  },
10577
- ...(useNewIcons && {
10578
- '.anticon': {
10579
- fontSize: 12
10580
- }
10581
- })
10582
- };
10583
- return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getLinkStyles;");
10584
- };
10585
- const getEllipsisNewTabLinkStyles = () => {
10586
- const styles = {
10587
- paddingRight: 'calc(2px + 1em)',
10588
- // 1em for icon
10589
- position: 'relative'
10590
- };
10591
- return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getEllipsisNewTabLinkStyles;");
10592
- };
10593
- const getIconStyles = theme => {
10594
- const styles = {
10595
- marginLeft: 2,
10596
- color: theme.colors.actionTertiaryTextDefault
10597
- };
10598
- return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getIconStyles;");
10599
- };
10600
- const getEllipsisIconStyles = useNewIcons => {
10601
- const styles = {
10602
- position: 'absolute',
10603
- right: 0,
10604
- bottom: 0,
10496
+ '100%': {
10497
+ transform: 'translate(0, 0)'
10498
+ }
10499
+ });
10500
+ const dialogPrimitiveContentStyle = /*#__PURE__*/css({
10501
+ color: theme.colors.textPrimary,
10502
+ backgroundColor: theme.colors.backgroundPrimary,
10503
+ boxShadow: 'hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px',
10504
+ position: 'fixed',
10605
10505
  top: 0,
10606
- display: 'flex',
10607
- alignItems: 'center',
10608
- ...(useNewIcons && {
10609
- fontSize: 12
10610
- })
10611
- };
10612
- return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getEllipsisIconStyles;");
10613
- };
10614
- function Link(_ref) {
10506
+ left: position === 'left' ? 0 : undefined,
10507
+ right: position === 'right' ? 0 : undefined,
10508
+ boxSizing: 'border-box',
10509
+ width: width !== null && width !== void 0 ? width : DEFAULT_WIDTH$1,
10510
+ minWidth: MIN_WIDTH,
10511
+ maxWidth: MAX_WIDTH,
10512
+ zIndex: theme.options.zIndexBase + ZINDEX_CONTENT,
10513
+ height: '100vh',
10514
+ // in order to have specific content in the drawer scroll with fixed title
10515
+ // hide overflow here and remove padding on the right side; content will be responsible for setting right padding
10516
+ // so that the scrollbar will appear in the padding right gutter
10517
+ paddingTop: theme.spacing.md,
10518
+ paddingLeft: theme.spacing.lg,
10519
+ paddingBottom: 0,
10520
+ paddingRight: 0,
10521
+ overflow: 'hidden',
10522
+ '&:focus': {
10523
+ outline: 'none'
10524
+ },
10525
+ '@media (prefers-reduced-motion: no-preference)': {
10526
+ animation: "".concat(overlayShow, " 350ms cubic-bezier(0.16, 1, 0.3, 1)")
10527
+ }
10528
+ }, process.env.NODE_ENV === "production" ? "" : ";label:dialogPrimitiveContentStyle;");
10529
+ return jsxs(Fragment, {
10530
+ children: [jsx(DialogPrimitive.Overlay, {
10531
+ css: /*#__PURE__*/css({
10532
+ backgroundColor: theme.colors.overlayOverlay,
10533
+ position: 'fixed',
10534
+ inset: 0,
10535
+ // needed so that it covers the PersonaNavSidebar
10536
+ zIndex: theme.options.zIndexBase + ZINDEX_OVERLAY
10537
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Content;")
10538
+ }), jsxs(DialogPrimitive.DialogContent, {
10539
+ css: dialogPrimitiveContentStyle,
10540
+ style: {
10541
+ display: 'flex',
10542
+ flexDirection: 'column',
10543
+ justifyContent: 'flex-start'
10544
+ },
10545
+ ref: ref,
10546
+ children: [jsxs("div", {
10547
+ css: /*#__PURE__*/css({
10548
+ flexGrow: 0,
10549
+ flexShrink: 1,
10550
+ display: 'flex',
10551
+ flexDirection: 'row',
10552
+ justifyContent: 'space-between',
10553
+ alignItems: 'center',
10554
+ paddingRight: rightContentPadding,
10555
+ marginBottom: theme.spacing.sm
10556
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Content;"),
10557
+ children: [jsx(DialogPrimitive.Title, {
10558
+ title: typeof title === 'string' ? title : undefined,
10559
+ asChild: typeof title === 'string',
10560
+ css: _ref2$2,
10561
+ children: typeof title === 'string' ? jsx(Typography.Title, {
10562
+ level: 2,
10563
+ withoutMargins: true,
10564
+ ellipsis: true,
10565
+ children: title
10566
+ }) : title
10567
+ }), jsx(DialogPrimitive.Close, {
10568
+ asChild: true,
10569
+ css: /*#__PURE__*/css({
10570
+ flexShrink: 1,
10571
+ marginLeft: theme.spacing.xs
10572
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Content;"),
10573
+ children: jsx(Button, {
10574
+ "aria-label": "Close",
10575
+ icon: jsx(CloseIcon, {})
10576
+ })
10577
+ })]
10578
+ }), jsxs("div", {
10579
+ css: /*#__PURE__*/css({
10580
+ paddingRight: useCustomScrollBehavior ? 0 : rightContentPadding,
10581
+ overflowY: useCustomScrollBehavior ? 'hidden' : 'auto',
10582
+ ...(theme.themeName === 'default' && !useCustomScrollBehavior ? {
10583
+ // Achieves an inner shadow on the content, but only when there is more left to scroll. When the content fits
10584
+ // in the container without scrolling, no shadow will be shown.
10585
+ // Taken from: https://css-tricks.com/scroll-shadows-with-javascript/
10586
+ background: "linear-gradient(\n white 30%,\n rgba(255, 255, 255, 0)\n ) center top,\n \n linear-gradient(\n rgba(255, 255, 255, 0),\n white 70%\n ) center bottom,\n \n radial-gradient(\n farthest-side at 50% 0,\n rgba(0, 0, 0, 0.2),\n rgba(0, 0, 0, 0)\n ) center top,\n \n radial-gradient(\n farthest-side at 50% 100%,\n rgba(0, 0, 0, 0.2),\n rgba(0, 0, 0, 0)\n ) center bottom",
10587
+ backgroundRepeat: 'no-repeat',
10588
+ backgroundSize: '100% 40px, 100% 40px, 100% 14px, 100% 14px',
10589
+ backgroundAttachment: 'local, local, scroll, scroll'
10590
+ } : {})
10591
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Content;"),
10592
+ children: [children, !footer && jsx(Spacer, {
10593
+ size: "lg"
10594
+ })]
10595
+ }), footer && jsx("div", {
10596
+ style: {
10597
+ paddingTop: theme.spacing.md,
10598
+ paddingRight: rightContentPadding,
10599
+ paddingBottom: theme.spacing.lg,
10600
+ flexGrow: 0,
10601
+ flexShrink: 1
10602
+ },
10603
+ children: footer
10604
+ })]
10605
+ })]
10606
+ });
10607
+ });
10608
+ function Root$2(props) {
10609
+ return jsx(DialogPrimitive.Root, {
10610
+ ...props
10611
+ });
10612
+ }
10613
+ function Trigger$2(props) {
10614
+ return jsx(DialogPrimitive.Trigger, {
10615
+ asChild: true,
10616
+ ...props
10617
+ });
10618
+ }
10619
+
10620
+ var Drawer = /*#__PURE__*/Object.freeze({
10621
+ __proto__: null,
10622
+ Content: Content$4,
10623
+ Root: Root$2,
10624
+ Trigger: Trigger$2
10625
+ });
10626
+
10627
+ /**
10628
+ * @deprecated Use `DropdownMenu` instead.
10629
+ */
10630
+ const Dropdown = _ref => {
10615
10631
  let {
10616
10632
  dangerouslySetAntdProps,
10617
10633
  ...props
10618
10634
  } = _ref;
10619
10635
  const {
10636
+ theme
10637
+ } = useDesignSystemTheme();
10638
+ return jsx(DesignSystemAntDConfigProvider, {
10639
+ children: jsx(Dropdown$1, {
10640
+ mouseLeaveDelay: 0.25,
10641
+ ...props,
10642
+ overlayStyle: {
10643
+ zIndex: theme.options.zIndexBase + 50,
10644
+ ...props.overlayStyle
10645
+ },
10646
+ ...dangerouslySetAntdProps
10647
+ })
10648
+ });
10649
+ };
10650
+
10651
+ const Tooltip = _ref => {
10652
+ let {
10620
10653
  children,
10621
- openInNewTab,
10622
- ...restProps
10623
- } = props;
10654
+ title,
10655
+ placement = 'top',
10656
+ dataTestId,
10657
+ dangerouslySetAntdProps,
10658
+ ...props
10659
+ } = _ref;
10624
10660
  const {
10625
- theme,
10626
- classNamePrefix
10661
+ theme
10627
10662
  } = useDesignSystemTheme();
10628
- const {
10629
- USE_NEW_ICONS: useNewIcons
10630
- } = useDesignSystemFlags();
10631
- const newTabProps = {
10632
- rel: 'noopener noreferrer',
10633
- target: '_blank'
10634
- };
10635
- const linkProps = openInNewTab ? {
10636
- ...restProps,
10637
- ...newTabProps
10638
- } : {
10639
- ...restProps
10640
- };
10641
- const linkStyles = props.ellipsis && openInNewTab ? [getLinkStyles(theme, classNamePrefix, useNewIcons), getEllipsisNewTabLinkStyles()] : getLinkStyles(theme, classNamePrefix, useNewIcons);
10642
- const iconStyles = props.ellipsis ? [getIconStyles(theme), getEllipsisIconStyles()] : getIconStyles(theme);
10663
+ if (!title) {
10664
+ return jsx(React__default.Fragment, {
10665
+ children: children
10666
+ });
10667
+ }
10643
10668
  return jsx(DesignSystemAntDConfigProvider, {
10644
- children: jsxs(Typography$1.Link, {
10645
- css: linkStyles,
10646
- ...linkProps,
10669
+ children: jsx(Tooltip$1
10670
+ // eslint-disable-next-line react/forbid-dom-props -- FEINF-1337 - this should turn into data-testid
10671
+ , {
10672
+ title: jsx("span", {
10673
+ "data-test-id": dataTestId,
10674
+ children: title
10675
+ }),
10676
+ placement: placement
10677
+ // Always trigger on hover and focus
10678
+ ,
10679
+ trigger: ['hover', 'focus'],
10680
+ overlayInnerStyle: {
10681
+ backgroundColor: '#2F3941',
10682
+ lineHeight: '22px',
10683
+ padding: '4px 8px'
10684
+ },
10685
+ overlayStyle: {
10686
+ zIndex: theme.options.zIndexBase + 70
10687
+ },
10688
+ css: getAnimationCss(theme.options.enableAnimation),
10647
10689
  ...dangerouslySetAntdProps,
10648
- children: [children, openInNewTab ? jsx(NewWindowIcon, {
10649
- css: iconStyles,
10650
- ...newTabProps
10651
- }) : null]
10690
+ ...props,
10691
+ children: children
10692
+ })
10693
+ });
10694
+ };
10695
+
10696
+ const Root$1 = DropdownMenu$1.Root; // Behavioral component only
10697
+
10698
+ const Content$3 = /*#__PURE__*/forwardRef(function Content(_ref, ref) {
10699
+ let {
10700
+ children,
10701
+ minWidth = 220,
10702
+ ...props
10703
+ } = _ref;
10704
+ const {
10705
+ getPopupContainer
10706
+ } = useDesignSystemContext();
10707
+ return jsx(DropdownMenu$1.Portal, {
10708
+ container: getPopupContainer && getPopupContainer(),
10709
+ children: jsx(DropdownMenu$1.Content, {
10710
+ ref: ref,
10711
+ css: [contentStyles$1, {
10712
+ minWidth
10713
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
10714
+ sideOffset: 4,
10715
+ align: "start",
10716
+ ...props,
10717
+ children: children
10652
10718
  })
10653
10719
  });
10654
- }
10655
-
10656
- const {
10657
- Paragraph: AntDParagraph
10658
- } = Typography$1;
10659
- function getParagraphEmotionStyles(theme, props) {
10660
- return /*#__PURE__*/css({
10661
- '&&': {
10662
- fontSize: theme.typography.fontSizeBase,
10663
- lineHeight: theme.typography.lineHeightBase,
10664
- color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
10665
- }
10666
- }, props.disabled && {
10667
- '&&': {
10668
- color: theme.colors.actionDisabledText
10669
- }
10670
- }, props.withoutMargins && {
10671
- '&&': {
10672
- marginTop: 0,
10673
- marginBottom: 0
10674
- }
10675
- }, process.env.NODE_ENV === "production" ? "" : ";label:getParagraphEmotionStyles;");
10676
- }
10677
- function Paragraph$1(userProps) {
10678
- const {
10679
- dangerouslySetAntdProps,
10680
- withoutMargins,
10681
- color,
10720
+ });
10721
+ const SubContent = /*#__PURE__*/forwardRef(function Content(_ref2, ref) {
10722
+ let {
10723
+ children,
10724
+ minWidth = 220,
10725
+ ...props
10726
+ } = _ref2;
10727
+ const {
10728
+ getPopupContainer
10729
+ } = useDesignSystemContext();
10730
+ return jsx(DropdownMenu$1.Portal, {
10731
+ container: getPopupContainer && getPopupContainer(),
10732
+ children: jsx(DropdownMenu$1.SubContent, {
10733
+ ref: ref,
10734
+ css: [contentStyles$1, {
10735
+ minWidth
10736
+ }, process.env.NODE_ENV === "production" ? "" : ";label:SubContent;"],
10737
+ sideOffset: -2,
10738
+ alignOffset: -5,
10739
+ ...props,
10740
+ children: children
10741
+ })
10742
+ });
10743
+ });
10744
+ const Trigger$1 = /*#__PURE__*/forwardRef(function Trigger(_ref3, ref) {
10745
+ let {
10746
+ children,
10747
+ ...props
10748
+ } = _ref3;
10749
+ return jsx(DropdownMenu$1.Trigger, {
10750
+ ref: ref,
10751
+ ...props,
10752
+ children: children
10753
+ });
10754
+ });
10755
+ const Item = /*#__PURE__*/forwardRef(function Item(_ref4, ref) {
10756
+ let {
10757
+ children,
10758
+ disabledReason,
10759
+ danger,
10760
+ ...props
10761
+ } = _ref4;
10762
+ const itemRef = useRef(null);
10763
+ useImperativeHandle(ref, () => itemRef.current);
10764
+ return jsx(DropdownMenu$1.Item, {
10765
+ css: theme => [itemStyles, danger && dangerItemStyles(theme)],
10766
+ ref: itemRef,
10767
+ ...props,
10768
+ children: getNewChildren(children, props, disabledReason, itemRef)
10769
+ });
10770
+ });
10771
+ const Label$1 = /*#__PURE__*/forwardRef(function Label(_ref5, ref) {
10772
+ let {
10773
+ children,
10774
+ ...props
10775
+ } = _ref5;
10776
+ return jsx(DropdownMenu$1.Label, {
10777
+ ref: ref,
10778
+ css: [itemStyles, theme => ({
10779
+ color: theme.colors.textSecondary,
10780
+ '&:hover': {
10781
+ cursor: 'default'
10782
+ }
10783
+ }), process.env.NODE_ENV === "production" ? "" : ";label:Label;"],
10784
+ ...props,
10785
+ children: children
10786
+ });
10787
+ });
10788
+ const Separator = /*#__PURE__*/forwardRef(function Separator(_ref6, ref) {
10789
+ let {
10790
+ children,
10791
+ ...props
10792
+ } = _ref6;
10793
+ return jsx(DropdownMenu$1.Separator, {
10794
+ ref: ref,
10795
+ css: theme => ({
10796
+ height: 1,
10797
+ margin: "".concat(theme.spacing.xs, "px ").concat(theme.spacing.sm, "px"),
10798
+ backgroundColor: theme.colors.borderDecorative
10799
+ }),
10800
+ ...props,
10801
+ children: children
10802
+ });
10803
+ });
10804
+ const SubTrigger = /*#__PURE__*/forwardRef(function TriggerItem(_ref7, ref) {
10805
+ let {
10806
+ children,
10807
+ disabledReason,
10808
+ ...props
10809
+ } = _ref7;
10810
+ const subTriggerRef = useRef(null);
10811
+ useImperativeHandle(ref, () => subTriggerRef.current);
10812
+ return jsxs(DropdownMenu$1.SubTrigger, {
10813
+ ref: subTriggerRef,
10814
+ css: [itemStyles, theme => ({
10815
+ '&[data-state="open"]': {
10816
+ backgroundColor: theme.colors.actionTertiaryBackgroundHover
10817
+ }
10818
+ }), process.env.NODE_ENV === "production" ? "" : ";label:SubTrigger;"],
10819
+ ...props,
10820
+ children: [getNewChildren(children, props, disabledReason, subTriggerRef), jsx(HintColumn, {
10821
+ css: theme => ({
10822
+ margin: CONSTANTS$1.subMenuIconMargin(theme),
10823
+ display: 'flex',
10824
+ alignSelf: 'stretch',
10825
+ alignItems: 'center'
10826
+ }),
10827
+ children: jsx(ChevronRightIcon, {
10828
+ css: theme => ({
10829
+ fontSize: CONSTANTS$1.subMenuIconSize(theme)
10830
+ })
10831
+ })
10832
+ })]
10833
+ });
10834
+ });
10835
+
10836
+ /**
10837
+ * Deprecated. Use `SubTrigger` instead.
10838
+ * @deprecated
10839
+ */
10840
+ const TriggerItem = SubTrigger;
10841
+ const CheckboxItem = /*#__PURE__*/forwardRef(function CheckboxItem(_ref8, ref) {
10842
+ let {
10843
+ children,
10844
+ disabledReason,
10845
+ ...props
10846
+ } = _ref8;
10847
+ const flags = useDesignSystemFlags();
10848
+ const checkboxItemRef = useRef(null);
10849
+ useImperativeHandle(ref, () => checkboxItemRef.current);
10850
+ return jsx(DropdownMenu$1.CheckboxItem, {
10851
+ ref: checkboxItemRef,
10852
+ css: theme => [itemStyles, checkboxItemStyles(theme, flags)],
10853
+ ...props,
10854
+ children: getNewChildren(children, props, disabledReason, checkboxItemRef)
10855
+ });
10856
+ });
10857
+ const ItemIndicator = /*#__PURE__*/forwardRef(function ItemIndicator(_ref9, ref) {
10858
+ let {
10859
+ children,
10682
10860
  ...props
10683
- } = userProps;
10684
- const {
10685
- theme
10686
- } = useDesignSystemTheme();
10687
- return jsx(DesignSystemAntDConfigProvider, {
10688
- children: jsx(AntDParagraph, {
10689
- ...props,
10690
- className: props.className,
10691
- css: getParagraphEmotionStyles(theme, userProps),
10692
- ...dangerouslySetAntdProps
10861
+ } = _ref9;
10862
+ const flags = useDesignSystemFlags();
10863
+ return jsx(DropdownMenu$1.ItemIndicator, {
10864
+ ref: ref,
10865
+ css: theme => ({
10866
+ marginLeft: -(CONSTANTS$1.checkboxIconWidth(theme, flags) + CONSTANTS$1.checkboxPaddingRight(theme, flags)),
10867
+ position: 'absolute',
10868
+ ...(!flags.USE_NEW_ICONS && {
10869
+ fontSize: 24
10870
+ })
10871
+ }),
10872
+ ...props,
10873
+ children: children !== null && children !== void 0 ? children : jsx(CheckIcon, {
10874
+ css: theme => ({
10875
+ color: theme.colors.textSecondary
10876
+ })
10693
10877
  })
10694
10878
  });
10695
- }
10696
-
10697
- const {
10698
- Text: AntDText
10699
- } = Typography$1;
10700
- function getTextEmotionStyles(theme, props) {
10701
- return /*#__PURE__*/css({
10702
- '&&': {
10703
- fontSize: theme.typography.fontSizeBase,
10704
- lineHeight: theme.typography.lineHeightBase,
10705
- color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
10706
- }
10707
- }, props.disabled && {
10708
- '&&': {
10709
- color: theme.colors.actionDisabledText
10710
- }
10711
- }, props.hint && {
10712
- '&&': {
10713
- fontSize: theme.typography.fontSizeSm,
10714
- lineHeight: theme.typography.lineHeightSm
10715
- }
10716
- }, props.bold && {
10717
- '&&': {
10718
- fontSize: theme.typography.fontSizeBase,
10719
- fontWeight: theme.typography.typographyBoldFontWeight,
10720
- lineHeight: theme.typography.lineHeightBase
10721
- }
10722
- }, props.code && {
10723
- '&& > code': {
10724
- fontSize: theme.typography.fontSizeBase,
10725
- lineHeight: theme.typography.lineHeightBase,
10726
- fontWeight: theme.typography.typographyBoldFontWeight,
10727
- background: theme.colors.typographyCodeBg,
10728
- fontFamily: 'monospace',
10729
- borderRadius: theme.borders.borderRadiusMd,
10730
- padding: '2px 4px',
10731
- border: 'unset',
10732
- margin: 0
10733
- }
10734
- }, props.size && {
10735
- '&&': (() => {
10736
- switch (props.size) {
10737
- case 'xxl':
10738
- return {
10739
- fontSize: theme.typography.fontSizeXxl,
10740
- lineHeight: theme.typography.lineHeightXxl
10741
- };
10742
- case 'xl':
10743
- return {
10744
- fontSize: theme.typography.fontSizeXl,
10745
- lineHeight: theme.typography.lineHeightXl
10746
- };
10747
- case 'lg':
10748
- return {
10749
- fontSize: theme.typography.fontSizeLg,
10750
- lineHeight: theme.typography.lineHeightLg
10751
- };
10752
- case 'sm':
10753
- return {
10754
- fontSize: theme.typography.fontSizeSm,
10755
- lineHeight: theme.typography.lineHeightSm
10756
- };
10757
- default:
10758
- return {
10759
- fontSize: theme.typography.fontSizeMd,
10760
- lineHeight: theme.typography.lineHeightMd
10761
- };
10762
- }
10763
- })()
10764
- }, props.withoutMargins && {
10765
- '&&': {
10766
- marginTop: 0,
10767
- marginBottom: 0
10768
- }
10769
- }, process.env.NODE_ENV === "production" ? "" : ";label:getTextEmotionStyles;");
10770
- }
10771
- function Text(userProps) {
10772
- // Omit props that are not supported by `antd`
10773
- const {
10774
- dangerouslySetAntdProps,
10775
- bold,
10776
- hint,
10777
- withoutMargins,
10778
- color,
10879
+ });
10880
+ const Arrow$1 = /*#__PURE__*/forwardRef(function Arrow(_ref10, ref) {
10881
+ let {
10882
+ children,
10779
10883
  ...props
10780
- } = userProps;
10884
+ } = _ref10;
10781
10885
  const {
10782
10886
  theme
10783
10887
  } = useDesignSystemTheme();
10784
- return jsx(DesignSystemAntDConfigProvider, {
10785
- children: jsx(AntDText, {
10786
- ...props,
10787
- className: props.className,
10788
- css: getTextEmotionStyles(theme, userProps),
10789
- ...dangerouslySetAntdProps
10790
- })
10888
+ return jsx(DropdownMenu$1.Arrow, {
10889
+ css: /*#__PURE__*/css({
10890
+ fill: theme.colors.backgroundPrimary,
10891
+ stroke: theme.colors.borderDecorative,
10892
+ strokeDashoffset: -CONSTANTS$1.arrowBottomLength(),
10893
+ strokeDasharray: CONSTANTS$1.arrowBottomLength() + 2 * CONSTANTS$1.arrowSide(),
10894
+ strokeWidth: CONSTANTS$1.arrowStrokeWidth(),
10895
+ // TODO: This is a temporary fix for the alignment of the Arrow;
10896
+ // Radix has changed the implementation for v1.0.0 (uses floating-ui)
10897
+ // which has new behaviors for alignment that we don't want. Generally
10898
+ // we need to fix the arrow to always be aligned to the left of the menu (with
10899
+ // offset equal to border radius)
10900
+ position: 'relative',
10901
+ top: -1
10902
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Arrow;"),
10903
+ ref: ref,
10904
+ width: 12,
10905
+ height: 6,
10906
+ ...props,
10907
+ children: children
10791
10908
  });
10792
- }
10909
+ });
10910
+ const RadioItem = /*#__PURE__*/forwardRef(function RadioItem(_ref11, ref) {
10911
+ let {
10912
+ children,
10913
+ disabledReason,
10914
+ ...props
10915
+ } = _ref11;
10916
+ const flags = useDesignSystemFlags();
10917
+ const radioItemRef = useRef(null);
10918
+ useImperativeHandle(ref, () => radioItemRef.current);
10919
+ return jsx(DropdownMenu$1.RadioItem, {
10920
+ ref: radioItemRef,
10921
+ css: theme => [itemStyles, checkboxItemStyles(theme, flags)],
10922
+ ...props,
10923
+ children: getNewChildren(children, props, disabledReason, radioItemRef)
10924
+ });
10925
+ });
10793
10926
 
10794
- const {
10795
- Title: AntDTitle
10796
- } = Typography$1;
10797
- function getLevelStyles(theme, props) {
10798
- switch (props.level) {
10799
- case 1:
10800
- return /*#__PURE__*/css({
10801
- '&&': {
10802
- fontSize: theme.typography.fontSizeXxl,
10803
- lineHeight: theme.typography.lineHeightXxl,
10804
- fontWeight: theme.typography.typographyBoldFontWeight
10805
- }
10806
- }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
10807
- case 2:
10808
- return /*#__PURE__*/css({
10809
- '&&': {
10810
- fontSize: theme.typography.fontSizeXl,
10811
- lineHeight: theme.typography.lineHeightXl,
10812
- fontWeight: theme.typography.typographyBoldFontWeight
10813
- }
10814
- }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
10815
- case 3:
10816
- return /*#__PURE__*/css({
10817
- '&&': {
10818
- fontSize: theme.typography.fontSizeLg,
10819
- lineHeight: theme.typography.lineHeightLg,
10820
- fontWeight: theme.typography.typographyBoldFontWeight
10821
- }
10822
- }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
10823
- case 4:
10824
- default:
10825
- return /*#__PURE__*/css({
10826
- '&&': {
10827
- fontSize: theme.typography.fontSizeMd,
10828
- lineHeight: theme.typography.lineHeightMd,
10829
- fontWeight: theme.typography.typographyBoldFontWeight
10830
- }
10831
- }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
10832
- }
10833
- }
10834
- function getTitleEmotionStyles(theme, props) {
10835
- return /*#__PURE__*/css(getLevelStyles(theme, props), {
10836
- '&&': {
10837
- color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
10838
- }
10839
- }, props.withoutMargins && {
10840
- '&&': {
10841
- marginTop: '0 !important',
10842
- // override general styling
10843
- marginBottom: '0 !important' // override general styling
10844
- }
10845
- }, process.env.NODE_ENV === "production" ? "" : ";label:getTitleEmotionStyles;");
10846
- }
10847
- function Title$1(userProps) {
10848
- const {
10849
- dangerouslySetAntdProps,
10850
- withoutMargins,
10851
- color,
10927
+ // UNWRAPPED RADIX-UI-COMPONENTS
10928
+ const Group$2 = DropdownMenu$1.Group;
10929
+ const RadioGroup = DropdownMenu$1.RadioGroup;
10930
+ const Sub = DropdownMenu$1.Sub;
10931
+
10932
+ // EXTRA COMPONENTS
10933
+ const HintColumn = /*#__PURE__*/forwardRef(function HintColumn(_ref12, ref) {
10934
+ let {
10935
+ children,
10852
10936
  ...props
10853
- } = userProps;
10854
- const {
10855
- theme
10856
- } = useDesignSystemTheme();
10857
- return jsx(DesignSystemAntDConfigProvider, {
10858
- children: jsx(AntDTitle, {
10859
- ...props,
10860
- className: props.className,
10861
- css: getTitleEmotionStyles(theme, userProps),
10862
- ...dangerouslySetAntdProps
10937
+ } = _ref12;
10938
+ return jsx("div", {
10939
+ ref: ref,
10940
+ css: [metaTextStyles, "margin-left:auto;" + (process.env.NODE_ENV === "production" ? "" : ";label:HintColumn;")],
10941
+ ...props,
10942
+ children: children
10943
+ });
10944
+ });
10945
+ const HintRow = /*#__PURE__*/forwardRef(function HintRow(_ref13, ref) {
10946
+ let {
10947
+ children,
10948
+ ...props
10949
+ } = _ref13;
10950
+ return jsx("div", {
10951
+ ref: ref,
10952
+ css: [metaTextStyles, "min-width:100%;" + (process.env.NODE_ENV === "production" ? "" : ";label:HintRow;")],
10953
+ ...props,
10954
+ children: children
10955
+ });
10956
+ });
10957
+ const IconWrapper = /*#__PURE__*/forwardRef(function IconWrapper(_ref14, ref) {
10958
+ let {
10959
+ children,
10960
+ ...props
10961
+ } = _ref14;
10962
+ return jsx("div", {
10963
+ ref: ref,
10964
+ css: theme => ({
10965
+ fontSize: 16,
10966
+ color: theme.colors.textSecondary,
10967
+ paddingRight: 4
10968
+ }),
10969
+ ...props,
10970
+ children: children
10971
+ });
10972
+ });
10973
+ const getNewChildren = (children, props, disabledReason, ref) => {
10974
+ const childCount = Children.count(children);
10975
+ const tooltip = jsx(Tooltip, {
10976
+ title: disabledReason,
10977
+ placement: "right",
10978
+ dangerouslySetAntdProps: {
10979
+ getPopupContainer: () => ref.current || document.body
10980
+ },
10981
+ children: jsx("span", {
10982
+ css: theme => infoIconStyles(theme),
10983
+ children: jsx(InfoBorderIcon, {})
10863
10984
  })
10864
10985
  });
10865
- }
10866
-
10867
- const Typography = /* #__PURE__ */(() => {
10868
- function Typography(_ref) {
10869
- let {
10870
- dangerouslySetAntdProps,
10871
- ...props
10872
- } = _ref;
10873
- return jsx(DesignSystemAntDConfigProvider, {
10874
- children: jsx(Typography$1, {
10875
- ...props,
10876
- ...dangerouslySetAntdProps
10877
- })
10986
+ if (childCount === 1) {
10987
+ return getChild(children, !!props['disabled'], disabledReason, tooltip, 0, childCount);
10988
+ }
10989
+ return Children.map(children, (child, idx) => {
10990
+ return getChild(child, !!props['disabled'], disabledReason, tooltip, idx, childCount);
10991
+ });
10992
+ };
10993
+ const getChild = (child, isDisabled, disabledReason, tooltip, index, siblingCount) => {
10994
+ const HintColumnType = jsx(HintColumn, {}).type;
10995
+ const isHintColumnType = !!(child && typeof child !== 'string' && typeof child !== 'number' && typeof child !== 'boolean' && 'type' in child && (child === null || child === void 0 ? void 0 : child.type) === HintColumnType);
10996
+ if (isDisabled && disabledReason && child && isHintColumnType) {
10997
+ return jsxs(Fragment, {
10998
+ children: [tooltip, child]
10999
+ });
11000
+ } else if (index === siblingCount - 1 && isDisabled && disabledReason) {
11001
+ return jsxs(Fragment, {
11002
+ children: [child, tooltip]
10878
11003
  });
10879
11004
  }
10880
- Typography.Text = Text;
10881
- Typography.Title = Title$1;
10882
- Typography.Paragraph = Paragraph$1;
10883
- Typography.Link = Link;
10884
- return Typography;
10885
- })();
11005
+ return child;
11006
+ };
11007
+
11008
+ // CONSTANTS
11009
+ const CONSTANTS$1 = {
11010
+ itemPaddingVertical(theme) {
11011
+ // The number from the mocks is the midpoint between constants
11012
+ return 0.5 * theme.spacing.xs + 0.5 * theme.spacing.sm;
11013
+ },
11014
+ itemPaddingHorizontal(theme) {
11015
+ return theme.spacing.sm;
11016
+ },
11017
+ checkboxIconWidth(theme, flags) {
11018
+ return flags.USE_NEW_ICONS ? theme.general.iconFontSizeNew : theme.spacing.lg;
11019
+ },
11020
+ checkboxPaddingLeft(theme) {
11021
+ return theme.spacing.sm;
11022
+ },
11023
+ checkboxPaddingRight(theme, flags) {
11024
+ return flags.USE_NEW_ICONS ? theme.spacing.sm : theme.spacing.xs;
11025
+ },
11026
+ subMenuIconMargin(theme) {
11027
+ // Negative margin so the icons can be larger without increasing the overall item height
11028
+ const iconMarginVertical = this.itemPaddingVertical(theme) / 2;
11029
+ const iconMarginRight = -this.itemPaddingVertical(theme) + theme.spacing.sm * 1.5;
11030
+ return "".concat(-iconMarginVertical, "px ").concat(-iconMarginRight, "px ").concat(-iconMarginVertical, "px auto");
11031
+ },
11032
+ subMenuIconSize(theme) {
11033
+ return theme.spacing.lg;
11034
+ },
11035
+ arrowBottomLength() {
11036
+ // The built in arrow is a polygon: 0,0 30,0 15,10
11037
+ return 30;
11038
+ },
11039
+ arrowHeight() {
11040
+ return 10;
11041
+ },
11042
+ arrowSide() {
11043
+ return 2 * (this.arrowHeight() ** 2 * 2) ** 0.5;
11044
+ },
11045
+ arrowStrokeWidth() {
11046
+ // This is eyeballed b/c relative to the svg viewbox coordinate system
11047
+ return 2;
11048
+ }
11049
+ };
11050
+ const dropdownContentStyles = theme => ({
11051
+ backgroundColor: theme.colors.backgroundPrimary,
11052
+ color: theme.colors.textPrimary,
11053
+ lineHeight: theme.typography.lineHeightBase,
11054
+ border: "1px solid ".concat(theme.colors.borderDecorative),
11055
+ borderRadius: theme.borders.borderRadiusMd,
11056
+ padding: "".concat(theme.spacing.xs, "px 0"),
11057
+ boxShadow: theme.themeName !== 'dark' ? "0px 4px 16px 0px rgba(205, 218, 229, 1)" : undefined,
11058
+ userSelect: 'none',
11059
+ // Ant Design uses 1000s for their zIndex space; this ensures Radix works with that, but
11060
+ // we'll likely need to be sure that all Radix components are using the same zIndex going forward.
11061
+ //
11062
+ // Additionally, there is an issue where macOS overlay scrollbars in Chrome and Safari (sometimes!)
11063
+ // overlap other elements with higher zIndex, because the scrollbars themselves have zIndex 9999,
11064
+ // so we have to use a higher value than that: https://github.com/databricks/universe/pull/232825
11065
+ zIndex: 10000,
11066
+ a: importantify({
11067
+ color: theme.colors.textPrimary,
11068
+ '&:hover, &:focus': {
11069
+ color: theme.colors.textPrimary
11070
+ }
11071
+ })
11072
+ });
11073
+ const contentStyles$1 = theme => ({
11074
+ ...dropdownContentStyles(theme)
11075
+ });
11076
+ const itemStyles = theme => ({
11077
+ padding: "".concat(CONSTANTS$1.itemPaddingVertical(theme), "px ").concat(CONSTANTS$1.itemPaddingHorizontal(theme), "px"),
11078
+ display: 'flex',
11079
+ flexWrap: 'wrap',
11080
+ alignItems: 'center',
11081
+ outline: 'unset',
11082
+ '&:hover': {
11083
+ cursor: 'pointer'
11084
+ },
11085
+ '&:focus': {
11086
+ backgroundColor: theme.colors.actionTertiaryBackgroundHover
11087
+ },
11088
+ '&[data-disabled]': {
11089
+ pointerEvents: 'none',
11090
+ color: theme.colors.actionDisabledText
11091
+ }
11092
+ });
11093
+ const dangerItemStyles = theme => ({
11094
+ color: theme.colors.textValidationDanger,
11095
+ '&:hover, &:focus': {
11096
+ backgroundColor: theme.colors.actionDangerDefaultBackgroundHover
11097
+ }
11098
+ });
11099
+ const infoIconStyles = theme => ({
11100
+ display: 'inline-flex',
11101
+ paddingLeft: theme.spacing.xs,
11102
+ color: theme.colors.textSecondary,
11103
+ pointerEvents: 'all'
11104
+ });
11105
+ const checkboxItemStyles = (theme, flags) => ({
11106
+ paddingLeft: CONSTANTS$1.checkboxIconWidth(theme, flags) + CONSTANTS$1.checkboxPaddingLeft(theme) + CONSTANTS$1.checkboxPaddingRight(theme, flags)
11107
+ });
11108
+ const metaTextStyles = theme => ({
11109
+ color: theme.colors.textSecondary,
11110
+ fontSize: theme.typography.fontSizeSm,
11111
+ '[data-disabled] &': {
11112
+ color: theme.colors.actionDisabledText
11113
+ }
11114
+ });
11115
+
11116
+ var DropdownMenu = /*#__PURE__*/Object.freeze({
11117
+ __proto__: null,
11118
+ Root: Root$1,
11119
+ Content: Content$3,
11120
+ SubContent: SubContent,
11121
+ Trigger: Trigger$1,
11122
+ Item: Item,
11123
+ Label: Label$1,
11124
+ Separator: Separator,
11125
+ SubTrigger: SubTrigger,
11126
+ TriggerItem: TriggerItem,
11127
+ CheckboxItem: CheckboxItem,
11128
+ ItemIndicator: ItemIndicator,
11129
+ Arrow: Arrow$1,
11130
+ RadioItem: RadioItem,
11131
+ Group: Group$2,
11132
+ RadioGroup: RadioGroup,
11133
+ Sub: Sub,
11134
+ HintColumn: HintColumn,
11135
+ HintRow: HintRow,
11136
+ IconWrapper: IconWrapper,
11137
+ dropdownContentStyles: dropdownContentStyles
11138
+ });
10886
11139
 
10887
11140
  function _EMOTION_STRINGIFIED_CSS_ERROR__$5() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
10888
11141
  const {
@@ -10896,6 +11149,7 @@ function getEmptyStyles(theme) {
10896
11149
  alignItems: 'center',
10897
11150
  textAlign: 'center',
10898
11151
  maxWidth: 600,
11152
+ wordBreak: 'break-word',
10899
11153
  // Set size of image to 64px
10900
11154
  '> :first-child': {
10901
11155
  fontSize: 64,
@@ -10942,9 +11196,11 @@ const Empty = props => {
10942
11196
  description,
10943
11197
  image = jsx(GridDashIcon, {}),
10944
11198
  button,
10945
- dangerouslyAppendEmotionCSS
11199
+ dangerouslyAppendEmotionCSS,
11200
+ ...dataProps
10946
11201
  } = props;
10947
11202
  return jsx("div", {
11203
+ ...dataProps,
10948
11204
  css: _ref$3,
10949
11205
  children: jsxs("div", {
10950
11206
  css: [getEmptyStyles(theme), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:Empty;"],
@@ -11354,7 +11610,7 @@ const DuboisInput = /*#__PURE__*/forwardRef(function Input(_ref4, ref) {
11354
11610
  })
11355
11611
  });
11356
11612
  });
11357
- const Group = _ref5 => {
11613
+ const Group$1 = _ref5 => {
11358
11614
  let {
11359
11615
  dangerouslySetAntdProps,
11360
11616
  dangerouslyAppendEmotionCSS,
@@ -11378,7 +11634,7 @@ const Group = _ref5 => {
11378
11634
  const InputNamespace = /* #__PURE__ */Object.assign(DuboisInput, {
11379
11635
  TextArea,
11380
11636
  Password,
11381
- Group
11637
+ Group: Group$1
11382
11638
  });
11383
11639
  const Input = InputNamespace;
11384
11640
 
@@ -11387,67 +11643,24 @@ const Input = InputNamespace;
11387
11643
  // since these will be exposed in the library's exports.
11388
11644
  const __INTERNAL_DO_NOT_USE__TextArea = TextArea;
11389
11645
  const __INTERNAL_DO_NOT_USE__Password = Password;
11390
- const __INTERNAL_DO_NOT_USE_DEDUPE__Group = Group;
11646
+ const __INTERNAL_DO_NOT_USE_DEDUPE__Group = Group$1;
11391
11647
 
11392
- const verticalGroupEmotionStyles = _ref => {
11648
+ const getRadioInputStyles = _ref => {
11393
11649
  let {
11394
- theme,
11395
11650
  clsPrefix,
11396
- isBold
11397
- } = _ref;
11398
- return /*#__PURE__*/css(importantify({
11399
- display: 'flex',
11400
- flexDirection: 'column',
11401
- flexWrap: 'wrap',
11402
- '& > label': {
11403
- fontWeight: isBold ? theme.typography.typographyBoldFontWeight : 'normal'
11404
- // TODO(FEINF-1496): Uncomment, removed for now to avoid impacting app with V2 changes
11405
- // paddingBottom: theme.spacing.sm,
11406
- },
11407
-
11408
- ["& > label + .".concat(clsPrefix, "-hint")]: {
11409
- // TODO(FEINF-1496): Uncomment, removed for now to avoid impacting app with V2 changes
11410
- // marginTop: `-${theme.spacing.sm}px`,
11411
- marginBottom: theme.spacing.sm,
11412
- paddingLeft: theme.spacing.lg
11413
- }
11414
- }), process.env.NODE_ENV === "production" ? "" : ";label:verticalGroupEmotionStyles;");
11415
- };
11416
- const radioOverrideEmotionStyles = _ref2 => {
11417
- let {
11418
11651
  theme,
11419
- clsPrefix,
11420
- classNamePrefix,
11421
- isBold
11422
- } = _ref2;
11423
- return /*#__PURE__*/css({
11424
- '&&': {
11425
- display: 'grid',
11426
- gridTemplateRows: '[label] auto [hint] auto',
11427
- gridAutoColumns: 'max-content',
11428
- // TODO(FEINF-1496): Uncomment, removed for now to avoid impacting app with V2 changes
11429
- // gridColumnGap: theme.spacing.md,
11430
- gridColumnGap: theme.spacing.sm
11431
- },
11432
- '& > label': {
11433
- fontWeight: isBold ? theme.typography.typographyBoldFontWeight : 'normal',
11434
- gridRow: 'label / label',
11435
- marginRight: 0
11436
- },
11437
- ["& > label + .".concat(classNamePrefix, "-hint")]: {
11438
- display: 'inline-block',
11439
- gridRow: 'hint / hint',
11440
- paddingLeft: theme.spacing.lg
11441
- },
11652
+ useNewStyles
11653
+ } = _ref;
11654
+ return {
11442
11655
  [".".concat(clsPrefix)]: {
11443
11656
  alignSelf: 'start',
11444
11657
  // Unchecked Styles
11445
11658
  ["> .".concat(clsPrefix, "-input + .").concat(clsPrefix, "-inner")]: {
11446
11659
  width: theme.spacing.md,
11447
11660
  height: theme.spacing.md,
11448
- background: theme.colors.radioDefaultBackground,
11661
+ background: useNewStyles ? theme.colors.actionDefaultBackgroundDefault : theme.colors.radioDefaultBackground,
11449
11662
  borderStyle: 'solid',
11450
- borderColor: theme.colors.radioDefaultBorder,
11663
+ borderColor: useNewStyles ? theme.colors.actionDefaultBorderDefault : theme.colors.radioDefaultBorder,
11451
11664
  boxShadow: 'unset',
11452
11665
  transform: 'unset',
11453
11666
  // This prevents an awkward jitter on the border
@@ -11461,21 +11674,27 @@ const radioOverrideEmotionStyles = _ref2 => {
11461
11674
  },
11462
11675
  // Hover
11463
11676
  ["&:not(.".concat(clsPrefix, "-disabled) > .").concat(clsPrefix, "-input:hover + .").concat(clsPrefix, "-inner")]: {
11464
- borderColor: theme.colors.radioInteractiveHover,
11465
- background: theme.colors.radioInteractiveHoverSecondary
11677
+ borderColor: useNewStyles ? theme.colors.actionPrimaryBackgroundHover : theme.colors.radioInteractiveHover,
11678
+ background: useNewStyles ? theme.colors.actionDefaultBackgroundHover : theme.colors.radioInteractiveHoverSecondary
11466
11679
  },
11467
11680
  // Focus
11468
11681
  ["&:not(.".concat(clsPrefix, "-disabled)> .").concat(clsPrefix, "-input:focus + .").concat(clsPrefix, "-inner")]: {
11469
- borderColor: theme.colors.primary
11682
+ borderColor: useNewStyles ? theme.colors.actionPrimaryBackgroundDefault : theme.colors.primary
11470
11683
  },
11471
11684
  // Active
11472
11685
  ["&:not(.".concat(clsPrefix, "-disabled)> .").concat(clsPrefix, "-input:active + .").concat(clsPrefix, "-inner")]: {
11473
- borderColor: theme.colors.radioInteractivePress,
11474
- background: theme.colors.radioInteractivePressSecondary
11686
+ borderColor: useNewStyles ? theme.colors.actionPrimaryBackgroundPress : theme.colors.radioInteractivePress,
11687
+ background: useNewStyles ? theme.colors.actionDefaultBackgroundPress : theme.colors.radioInteractivePressSecondary
11475
11688
  },
11476
11689
  // Disabled
11477
11690
  ["&.".concat(clsPrefix, "-disabled > .").concat(clsPrefix, "-input + .").concat(clsPrefix, "-inner")]: {
11478
- borderColor: "".concat(theme.colors.radioDisabled, "!important") // Ant uses !important
11691
+ ...(useNewStyles ? {
11692
+ border: "none !important",
11693
+ // Ant uses !important
11694
+ background: theme.colors.actionDisabledBackground
11695
+ } : {
11696
+ borderColor: "".concat(theme.colors.radioDisabled, "!important") // Ant uses !important
11697
+ })
11479
11698
  },
11480
11699
 
11481
11700
  // Checked Styles
@@ -11484,69 +11703,163 @@ const radioOverrideEmotionStyles = _ref2 => {
11484
11703
  border: 'unset'
11485
11704
  },
11486
11705
  ["> .".concat(clsPrefix, "-input + .").concat(clsPrefix, "-inner")]: {
11487
- background: theme.colors.primary,
11706
+ background: useNewStyles ? theme.colors.actionPrimaryBackgroundDefault : theme.colors.primary,
11488
11707
  borderColor: theme.colors.primary,
11489
11708
  '&:after': {
11490
11709
  content: "\"\"",
11491
11710
  borderRadius: theme.spacing.xs,
11492
- backgroundColor: theme.colors.radioDefaultBackground,
11711
+ backgroundColor: useNewStyles ? theme.colors.white : theme.colors.radioDefaultBackground,
11493
11712
  width: theme.spacing.xs,
11494
11713
  height: theme.spacing.xs
11495
11714
  }
11496
11715
  },
11497
11716
  // Hover
11498
11717
  ["&:not(.".concat(clsPrefix, "-disabled) > .").concat(clsPrefix, "-input:hover + .").concat(clsPrefix, "-inner")]: {
11499
- background: theme.colors.radioInteractiveHover,
11500
- borderColor: theme.colors.radioInteractiveHover
11718
+ background: useNewStyles ? theme.colors.actionPrimaryBackgroundHover : theme.colors.radioInteractiveHover,
11719
+ borderColor: useNewStyles ? theme.colors.actionPrimaryBackgroundPress : theme.colors.radioInteractiveHover
11501
11720
  },
11502
11721
  // Focus
11503
11722
  ["&:not(.".concat(clsPrefix, "-disabled) > .").concat(clsPrefix, "-input:focus-visible + .").concat(clsPrefix, "-inner")]: {
11504
- background: theme.colors.primary,
11505
- borderColor: theme.colors.primary,
11506
- boxShadow: "0 0 0 1px ".concat(theme.colors.radioDefaultBackground, ", 0 0 0 3px ").concat(theme.colors.primary)
11723
+ background: useNewStyles ? theme.colors.actionDefaultBackgroundPress : theme.colors.primary,
11724
+ borderColor: useNewStyles ? theme.colors.actionDefaultBorderFocus : theme.colors.primary,
11725
+ boxShadow: "0 0 0 1px ".concat(useNewStyles ? theme.colors.actionDefaultBackgroundDefault : theme.colors.radioDefaultBackground, ", 0 0 0 3px ").concat(theme.colors.primary)
11507
11726
  },
11508
11727
  // Active
11509
11728
  ["&:not(.".concat(clsPrefix, "-disabled) > .").concat(clsPrefix, "-input:active + .").concat(clsPrefix, "-inner")]: {
11510
- background: theme.colors.radioInteractivePress,
11511
- borderColor: theme.colors.radioInteractivePress
11729
+ background: useNewStyles ? theme.colors.actionDefaultBackgroundPress : theme.colors.radioInteractivePress,
11730
+ borderColor: useNewStyles ? theme.colors.actionDefaultBorderPress : theme.colors.radioInteractivePress
11512
11731
  },
11513
11732
  // Disabled
11514
11733
  ["&.".concat(clsPrefix, "-disabled > .").concat(clsPrefix, "-input + .").concat(clsPrefix, "-inner")]: {
11515
- background: "".concat(theme.colors.radioDisabled),
11516
- border: "2px solid ".concat(theme.colors.radioDisabled, "!important") // !important inherited from ant
11734
+ background: useNewStyles ? theme.colors.actionDisabledBackground : theme.colors.radioDisabled,
11735
+ border: useNewStyles ? 'none !important' : "2px solid ".concat(theme.colors.radioDisabled, "!important") // !important inherited from ant
11736
+ }
11737
+ }
11738
+ }
11739
+ };
11740
+ };
11741
+
11742
+ const getCommonRadioGroupStyles = _ref2 => {
11743
+ let {
11744
+ theme,
11745
+ clsPrefix,
11746
+ classNamePrefix,
11747
+ useNewStyles
11748
+ } = _ref2;
11749
+ return /*#__PURE__*/css({
11750
+ '& > label': {
11751
+ ...(useNewStyles && {
11752
+ ["&.".concat(classNamePrefix, "-radio-wrapper-disabled > span")]: {
11753
+ color: theme.colors.textPrimary
11517
11754
  }
11518
- }
11755
+ })
11519
11756
  },
11520
-
11757
+ ["& > label + .".concat(classNamePrefix, "-hint")]: {
11758
+ paddingLeft: theme.spacing.lg
11759
+ },
11760
+ ...getRadioInputStyles({
11761
+ theme,
11762
+ clsPrefix,
11763
+ useNewStyles
11764
+ }),
11521
11765
  ...getAnimationCss(theme.options.enableAnimation)
11522
- }, process.env.NODE_ENV === "production" ? "" : ";label:radioOverrideEmotionStyles;");
11766
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getCommonRadioGroupStyles;");
11523
11767
  };
11524
- const getRadioStyles = _ref3 => {
11768
+ const getHorizontalRadioGroupStyles = _ref3 => {
11525
11769
  let {
11526
11770
  theme,
11527
- isBold
11771
+ classNamePrefix,
11772
+ useNewStyles
11528
11773
  } = _ref3;
11529
- const styles = {
11774
+ return /*#__PURE__*/css({
11530
11775
  '&&': {
11531
- fontWeight: isBold ? theme.typography.typographyBoldFontWeight : 'normal'
11776
+ display: 'grid',
11777
+ gridTemplateRows: '[label] auto [hint] auto',
11778
+ gridAutoColumns: 'max-content',
11779
+ gridColumnGap: useNewStyles ? theme.spacing.md : theme.spacing.sm
11780
+ },
11781
+ '& > label': {
11782
+ gridRow: 'label / label',
11783
+ marginRight: 0
11784
+ },
11785
+ ["& > label + .".concat(classNamePrefix, "-hint")]: {
11786
+ display: 'inline-block',
11787
+ gridRow: 'hint / hint'
11788
+ }
11789
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getHorizontalRadioGroupStyles;");
11790
+ };
11791
+ const getVerticalRadioGroupStyles = _ref4 => {
11792
+ let {
11793
+ theme,
11794
+ classNamePrefix,
11795
+ useNewStyles
11796
+ } = _ref4;
11797
+ return /*#__PURE__*/css({
11798
+ display: 'flex',
11799
+ flexDirection: 'column',
11800
+ flexWrap: 'wrap',
11801
+ '& > label': {
11802
+ fontWeight: 'normal',
11803
+ ...(useNewStyles && {
11804
+ paddingBottom: theme.spacing.sm
11805
+ })
11806
+ },
11807
+ ["& > label:last-of-type"]: {
11808
+ paddingBottom: 0
11809
+ },
11810
+ ["& > label + .".concat(classNamePrefix, "-hint")]: {
11811
+ marginBottom: theme.spacing.sm,
11812
+ paddingLeft: theme.spacing.lg,
11813
+ ...(useNewStyles && {
11814
+ marginTop: "-".concat(theme.spacing.sm, "px")
11815
+ })
11816
+ },
11817
+ ["& > label:last-of-type + .".concat(classNamePrefix, "-hint")]: {
11818
+ ...(useNewStyles && {
11819
+ marginTop: 0
11820
+ })
11532
11821
  }
11822
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getVerticalRadioGroupStyles;");
11823
+ };
11824
+ const getRadioStyles = _ref5 => {
11825
+ let {
11826
+ theme,
11827
+ clsPrefix,
11828
+ useNewStyles
11829
+ } = _ref5;
11830
+ // Default as bold for standalone radios
11831
+ const fontWeight = 'normal';
11832
+ const styles = {
11833
+ fontWeight
11533
11834
  };
11534
- return /*#__PURE__*/css(importantify(styles), process.env.NODE_ENV === "production" ? "" : ";label:getRadioStyles;");
11835
+ return /*#__PURE__*/css({
11836
+ ...getRadioInputStyles({
11837
+ theme,
11838
+ clsPrefix,
11839
+ useNewStyles
11840
+ }),
11841
+ ...styles
11842
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getRadioStyles;");
11535
11843
  };
11536
- const DuboisRadio = /*#__PURE__*/forwardRef(function Radio(_ref4, ref) {
11844
+ const DuboisRadio = /*#__PURE__*/forwardRef(function Radio(_ref6, ref) {
11537
11845
  let {
11538
11846
  dangerouslySetAntdProps,
11539
- isBold = false,
11540
11847
  ...props
11541
- } = _ref4;
11848
+ } = _ref6;
11542
11849
  const {
11543
- theme
11850
+ theme,
11851
+ getPrefixedClassName
11544
11852
  } = useDesignSystemTheme();
11853
+ const {
11854
+ USE_NEW_RADIO_STYLES
11855
+ } = useDesignSystemFlags();
11856
+ const clsPrefix = getPrefixedClassName('radio');
11545
11857
  return jsx(DesignSystemAntDConfigProvider, {
11546
11858
  children: jsx(Radio$1, {
11547
11859
  css: getRadioStyles({
11548
11860
  theme,
11549
- isBold
11861
+ clsPrefix,
11862
+ useNewStyles: USE_NEW_RADIO_STYLES
11550
11863
  }),
11551
11864
  ...props,
11552
11865
  ...dangerouslySetAntdProps,
@@ -11554,59 +11867,80 @@ const DuboisRadio = /*#__PURE__*/forwardRef(function Radio(_ref4, ref) {
11554
11867
  })
11555
11868
  });
11556
11869
  });
11557
- const StyledRadioGroup = /*#__PURE__*/forwardRef(function StyledRadioGroup(_ref5, ref) {
11870
+ const StyledRadioGroup = /*#__PURE__*/forwardRef(function StyledRadioGroup(_ref7, ref) {
11558
11871
  let {
11559
11872
  dangerouslySetAntdProps,
11560
- isBold = false,
11561
11873
  ...props
11562
- } = _ref5;
11874
+ } = _ref7;
11563
11875
  const {
11564
11876
  theme,
11565
11877
  getPrefixedClassName,
11566
11878
  classNamePrefix
11567
11879
  } = useDesignSystemTheme();
11880
+ const {
11881
+ USE_NEW_RADIO_STYLES
11882
+ } = useDesignSystemFlags();
11568
11883
  const clsPrefix = getPrefixedClassName('radio');
11569
11884
  return jsx(DesignSystemAntDConfigProvider, {
11570
11885
  children: jsx(Radio$1.Group, {
11571
11886
  ...props,
11572
- css: radioOverrideEmotionStyles({
11887
+ css: getCommonRadioGroupStyles({
11573
11888
  theme,
11574
11889
  clsPrefix,
11575
11890
  classNamePrefix,
11576
- isBold
11891
+ useNewStyles: USE_NEW_RADIO_STYLES
11577
11892
  }),
11578
11893
  ...dangerouslySetAntdProps,
11579
11894
  ref: ref
11580
11895
  })
11581
11896
  });
11582
11897
  });
11583
- const VerticalGroup = /*#__PURE__*/forwardRef(function VerticalGroup(_ref6, ref) {
11898
+ const HorizontalGroup = /*#__PURE__*/forwardRef(function HorizontalGroup(_ref8, ref) {
11584
11899
  let {
11585
11900
  dangerouslySetAntdProps,
11586
- isBold = false,
11587
11901
  ...props
11588
- } = _ref6;
11902
+ } = _ref8;
11589
11903
  const {
11590
11904
  theme,
11591
11905
  classNamePrefix
11592
11906
  } = useDesignSystemTheme();
11907
+ const {
11908
+ USE_NEW_RADIO_STYLES
11909
+ } = useDesignSystemFlags();
11593
11910
  return jsx(StyledRadioGroup, {
11594
- css: verticalGroupEmotionStyles({
11911
+ css: getHorizontalRadioGroupStyles({
11595
11912
  theme,
11596
- clsPrefix: classNamePrefix,
11597
- isBold
11913
+ classNamePrefix,
11914
+ useNewStyles: USE_NEW_RADIO_STYLES
11598
11915
  }),
11599
11916
  ...props,
11600
11917
  ref: ref,
11601
11918
  ...dangerouslySetAntdProps
11602
11919
  });
11603
11920
  });
11604
- const HorizontalGroup = /*#__PURE__*/forwardRef(function HorizontalGroup(_ref7, ref) {
11921
+ const Group = /*#__PURE__*/forwardRef(function HorizontalGroup(_ref9, ref) {
11605
11922
  let {
11606
11923
  dangerouslySetAntdProps,
11924
+ layout = 'vertical',
11607
11925
  ...props
11608
- } = _ref7;
11926
+ } = _ref9;
11927
+ const {
11928
+ theme,
11929
+ classNamePrefix
11930
+ } = useDesignSystemTheme();
11931
+ const {
11932
+ USE_NEW_RADIO_STYLES
11933
+ } = useDesignSystemFlags();
11609
11934
  return jsx(StyledRadioGroup, {
11935
+ css: layout === 'horizontal' ? getHorizontalRadioGroupStyles({
11936
+ theme,
11937
+ classNamePrefix,
11938
+ useNewStyles: USE_NEW_RADIO_STYLES
11939
+ }) : getVerticalRadioGroupStyles({
11940
+ theme,
11941
+ classNamePrefix,
11942
+ useNewStyles: USE_NEW_RADIO_STYLES
11943
+ }),
11610
11944
  ...props,
11611
11945
  ref: ref,
11612
11946
  ...dangerouslySetAntdProps
@@ -11615,7 +11949,7 @@ const HorizontalGroup = /*#__PURE__*/forwardRef(function HorizontalGroup(_ref7,
11615
11949
 
11616
11950
  // Note: We are overriding ant's default "Group" with our own.
11617
11951
  const RadioNamespace = /* #__PURE__ */Object.assign(DuboisRadio, {
11618
- Group: VerticalGroup,
11952
+ Group,
11619
11953
  HorizontalGroup
11620
11954
  });
11621
11955
  const Radio = RadioNamespace;
@@ -11625,7 +11959,7 @@ const Radio = RadioNamespace;
11625
11959
  // since these will be exposed in the library's exports.
11626
11960
  // We should ideally be using __Group instead of __VerticalGroup, but that exists under Checkbox too and conflicts, therefore
11627
11961
  // we show a wrong component name in "Show code" in docs, fix included in story to replace this with correct name
11628
- const __INTERNAL_DO_NOT_USE__VerticalGroup = VerticalGroup;
11962
+ const __INTERNAL_DO_NOT_USE__VerticalGroup = Group;
11629
11963
  const __INTERNAL_DO_NOT_USE__HorizontalGroup = HorizontalGroup;
11630
11964
 
11631
11965
  function getSelectEmotionStyles(_ref) {
@@ -11717,6 +12051,7 @@ function getSelectEmotionStyles(_ref) {
11717
12051
  [classSelector]: {
11718
12052
  outlineColor: theme.colors.actionPrimaryBackgroundDefault,
11719
12053
  outlineWidth: 2,
12054
+ outlineOffset: -2,
11720
12055
  outlineStyle: 'solid',
11721
12056
  borderColor: 'transparent',
11722
12057
  boxShadow: 'none'
@@ -11984,6 +12319,7 @@ function DuboisSelect(_ref2, ref) {
11984
12319
  optionFilterProp,
11985
12320
  dangerouslySetAntdProps,
11986
12321
  virtual,
12322
+ dropdownClassName,
11987
12323
  ...restProps
11988
12324
  } = _ref2;
11989
12325
  const {
@@ -12035,7 +12371,7 @@ function DuboisSelect(_ref2, ref) {
12035
12371
  }),
12036
12372
  children: "No results found"
12037
12373
  }),
12038
- dropdownClassName: css$1(getDropdownStyles(clsPrefix, theme, USE_NEW_SELECT_DROPDOWN_STYLES, useNewIcons)),
12374
+ dropdownClassName: css$1([getDropdownStyles(clsPrefix, theme, USE_NEW_SELECT_DROPDOWN_STYLES, useNewIcons), dropdownClassName]),
12039
12375
  maxTagPlaceholder: items => "+ ".concat(items.length, " more"),
12040
12376
  mode: mode,
12041
12377
  options: options,
@@ -12251,7 +12587,7 @@ function RHFControlledInput(_ref) {
12251
12587
  defaultValue: restProps.defaultValue
12252
12588
  });
12253
12589
  }
12254
- function RHFControlledSelect(_ref2) {
12590
+ function RHFControlledPasswordInput(_ref2) {
12255
12591
  let {
12256
12592
  name,
12257
12593
  control,
@@ -12265,6 +12601,48 @@ function RHFControlledSelect(_ref2) {
12265
12601
  control: control,
12266
12602
  rules: rules
12267
12603
  });
12604
+ return jsx(Input.Password, {
12605
+ ...restProps,
12606
+ ...field,
12607
+ value: field.value,
12608
+ defaultValue: restProps.defaultValue
12609
+ });
12610
+ }
12611
+ function RHFControlledTextArea(_ref3) {
12612
+ let {
12613
+ name,
12614
+ control,
12615
+ rules,
12616
+ ...restProps
12617
+ } = _ref3;
12618
+ const {
12619
+ field
12620
+ } = useController({
12621
+ name: name,
12622
+ control: control,
12623
+ rules: rules
12624
+ });
12625
+ return jsx(Input.TextArea, {
12626
+ ...restProps,
12627
+ ...field,
12628
+ value: field.value,
12629
+ defaultValue: restProps.defaultValue
12630
+ });
12631
+ }
12632
+ function RHFControlledSelect(_ref4) {
12633
+ let {
12634
+ name,
12635
+ control,
12636
+ rules,
12637
+ ...restProps
12638
+ } = _ref4;
12639
+ const {
12640
+ field
12641
+ } = useController({
12642
+ name: name,
12643
+ control: control,
12644
+ rules: rules
12645
+ });
12268
12646
  return jsx(Select, {
12269
12647
  ...restProps,
12270
12648
  ...field,
@@ -12272,13 +12650,13 @@ function RHFControlledSelect(_ref2) {
12272
12650
  defaultValue: field.value
12273
12651
  });
12274
12652
  }
12275
- function RHFControlledCheckboxGroup(_ref3) {
12653
+ function RHFControlledCheckboxGroup(_ref5) {
12276
12654
  let {
12277
12655
  name,
12278
12656
  control,
12279
12657
  rules,
12280
12658
  ...restProps
12281
- } = _ref3;
12659
+ } = _ref5;
12282
12660
  const {
12283
12661
  field
12284
12662
  } = useController({
@@ -12292,13 +12670,13 @@ function RHFControlledCheckboxGroup(_ref3) {
12292
12670
  value: field.value
12293
12671
  });
12294
12672
  }
12295
- function RHFControlledRadioGroup(_ref4) {
12673
+ function RHFControlledRadioGroup(_ref6) {
12296
12674
  let {
12297
12675
  name,
12298
12676
  control,
12299
12677
  rules,
12300
12678
  ...restProps
12301
- } = _ref4;
12679
+ } = _ref6;
12302
12680
  const {
12303
12681
  field
12304
12682
  } = useController({
@@ -12311,13 +12689,13 @@ function RHFControlledRadioGroup(_ref4) {
12311
12689
  ...field
12312
12690
  });
12313
12691
  }
12314
- function RHFControlledSwitch(_ref5) {
12692
+ function RHFControlledSwitch(_ref7) {
12315
12693
  let {
12316
12694
  name,
12317
12695
  control,
12318
12696
  rules,
12319
12697
  ...restProps
12320
- } = _ref5;
12698
+ } = _ref7;
12321
12699
  const {
12322
12700
  field: {
12323
12701
  value,
@@ -12336,6 +12714,8 @@ function RHFControlledSwitch(_ref5) {
12336
12714
  }
12337
12715
  const RHFControlledComponents = {
12338
12716
  Input: RHFControlledInput,
12717
+ Password: RHFControlledPasswordInput,
12718
+ TextArea: RHFControlledTextArea,
12339
12719
  Select: RHFControlledSelect,
12340
12720
  CheckboxGroup: RHFControlledCheckboxGroup,
12341
12721
  RadioGroup: RHFControlledRadioGroup,
@@ -12486,7 +12866,7 @@ const {
12486
12866
  Header,
12487
12867
  Footer,
12488
12868
  Sider,
12489
- Content: Content$1
12869
+ Content: Content$2
12490
12870
  } = Layout$1;
12491
12871
  const Layout = /* #__PURE__ */(() => {
12492
12872
  const Layout = _ref => {
@@ -12554,7 +12934,7 @@ const Layout = /* #__PURE__ */(() => {
12554
12934
  ...props
12555
12935
  } = _ref5;
12556
12936
  return jsx(DesignSystemAntDConfigProvider, {
12557
- children: jsx(Content$1, {
12937
+ children: jsx(Content$2, {
12558
12938
  ...props,
12559
12939
  children: jsx(RestoreAntDDefaultClsPrefix, {
12560
12940
  children: children
@@ -12666,7 +13046,8 @@ const getModalEmotionStyles = args => {
12666
13046
  lineHeight: 'normal',
12667
13047
  display: 'flex',
12668
13048
  alignItems: 'center',
12669
- justifyContent: 'center'
13049
+ justifyContent: 'center',
13050
+ color: theme.colors.textSecondary
12670
13051
  },
12671
13052
  [classNameClose]: {
12672
13053
  height: BUTTON_SIZE,
@@ -13136,7 +13517,7 @@ const Popover = _ref => {
13136
13517
  theme
13137
13518
  } = useDesignSystemTheme();
13138
13519
  return jsx(DesignSystemAntDConfigProvider, {
13139
- children: jsx(Popover$1, {
13520
+ children: jsx(Popover$2, {
13140
13521
  zIndex: theme.options.zIndexBase + 30,
13141
13522
  ...props,
13142
13523
  content: jsx(RestoreAntDDefaultClsPrefix, {
@@ -13146,6 +13527,125 @@ const Popover = _ref => {
13146
13527
  });
13147
13528
  };
13148
13529
 
13530
+ const Root = Popover$1.Root; // Behavioral component only
13531
+
13532
+ const Content$1 = /*#__PURE__*/forwardRef(function Content(_ref, ref) {
13533
+ let {
13534
+ children,
13535
+ minWidth = 220,
13536
+ ...props
13537
+ } = _ref;
13538
+ const {
13539
+ getPopupContainer
13540
+ } = useDesignSystemContext();
13541
+ return jsx(Popover$1.Portal, {
13542
+ container: getPopupContainer && getPopupContainer(),
13543
+ children: jsx(Popover$1.Content, {
13544
+ ref: ref,
13545
+ css: [contentStyles, {
13546
+ minWidth
13547
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
13548
+ sideOffset: 4,
13549
+ ...props,
13550
+ children: children
13551
+ })
13552
+ });
13553
+ });
13554
+ const Trigger = /*#__PURE__*/forwardRef(function Trigger(_ref2, ref) {
13555
+ let {
13556
+ children,
13557
+ ...props
13558
+ } = _ref2;
13559
+ return jsx(Popover$1.Trigger, {
13560
+ ref: ref,
13561
+ ...props,
13562
+ children: children
13563
+ });
13564
+ });
13565
+ const Arrow = /*#__PURE__*/forwardRef(function Arrow(_ref3, ref) {
13566
+ let {
13567
+ children,
13568
+ ...props
13569
+ } = _ref3;
13570
+ const {
13571
+ theme
13572
+ } = useDesignSystemTheme();
13573
+ return jsx(Popover$1.Arrow, {
13574
+ css: /*#__PURE__*/css({
13575
+ fill: theme.colors.backgroundPrimary,
13576
+ stroke: theme.colors.borderDecorative,
13577
+ strokeDashoffset: -CONSTANTS.arrowBottomLength(),
13578
+ strokeDasharray: CONSTANTS.arrowBottomLength() + 2 * CONSTANTS.arrowSide(),
13579
+ strokeWidth: CONSTANTS.arrowStrokeWidth(),
13580
+ // TODO: This is a temporary fix for the alignment of the Arrow;
13581
+ // Radix has changed the implementation for v1.0.0 (uses floating-ui)
13582
+ // which has new behaviors for alignment that we don't want. Generally
13583
+ // we need to fix the arrow to always be aligned to the left of the menu (with
13584
+ // offset equal to border radius)
13585
+ position: 'relative',
13586
+ top: -1
13587
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Arrow;"),
13588
+ ref: ref,
13589
+ width: 12,
13590
+ height: 6,
13591
+ ...props,
13592
+ children: children
13593
+ });
13594
+ });
13595
+
13596
+ // CONSTANTS
13597
+ const CONSTANTS = {
13598
+ arrowBottomLength() {
13599
+ // The built in arrow is a polygon: 0,0 30,0 15,10
13600
+ return 30;
13601
+ },
13602
+ arrowHeight() {
13603
+ return 10;
13604
+ },
13605
+ arrowSide() {
13606
+ return 2 * (this.arrowHeight() ** 2 * 2) ** 0.5;
13607
+ },
13608
+ arrowStrokeWidth() {
13609
+ // This is eyeballed b/c relative to the svg viewbox coordinate system
13610
+ return 2;
13611
+ }
13612
+ };
13613
+ const popoverContentStyles = theme => ({
13614
+ backgroundColor: theme.colors.backgroundPrimary,
13615
+ color: theme.colors.textPrimary,
13616
+ lineHeight: theme.typography.lineHeightBase,
13617
+ border: "1px solid ".concat(theme.colors.borderDecorative),
13618
+ borderRadius: theme.borders.borderRadiusMd,
13619
+ padding: "".concat(theme.spacing.sm, "px"),
13620
+ boxShadow: theme.themeName !== 'dark' ? "0px 4px 16px 0px rgba(205, 218, 229, 1)" : undefined,
13621
+ userSelect: 'none',
13622
+ zIndex: theme.options.zIndexBase + 30,
13623
+ a: importantify({
13624
+ color: theme.colors.textPrimary,
13625
+ cursor: 'default',
13626
+ '&:hover, &:focus': {
13627
+ color: theme.colors.textPrimary
13628
+ }
13629
+ }),
13630
+ '&:focus-visible': {
13631
+ outlineStyle: 'solid',
13632
+ outlineWidth: '2px',
13633
+ outlineOffset: '1px',
13634
+ outlineColor: theme.colors.primary
13635
+ }
13636
+ });
13637
+ const contentStyles = theme => ({
13638
+ ...popoverContentStyles(theme)
13639
+ });
13640
+
13641
+ var PopoverV2 = /*#__PURE__*/Object.freeze({
13642
+ __proto__: null,
13643
+ Root: Root,
13644
+ Content: Content$1,
13645
+ Trigger: Trigger,
13646
+ Arrow: Arrow
13647
+ });
13648
+
13149
13649
  function getSegmentedControlGroupEmotionStyles(clsPrefix) {
13150
13650
  const classSmallGroup = ".".concat(clsPrefix, "-radio-group-small");
13151
13651
  const classButtonWrapper = ".".concat(clsPrefix, "-radio-button-wrapper");
@@ -13580,28 +14080,6 @@ const Skeleton = /* #__PURE__ */(() => {
13580
14080
  return Skeleton;
13581
14081
  })();
13582
14082
 
13583
- const Spacer = _ref => {
13584
- let {
13585
- size = 'md',
13586
- ...props
13587
- } = _ref;
13588
- const {
13589
- theme
13590
- } = useDesignSystemTheme();
13591
- const spacingValues = {
13592
- xs: theme.spacing.xs,
13593
- sm: theme.spacing.sm,
13594
- md: theme.spacing.md,
13595
- lg: theme.spacing.lg
13596
- };
13597
- return jsx("div", {
13598
- css: /*#__PURE__*/css({
13599
- height: spacingValues[size]
13600
- }, process.env.NODE_ENV === "production" ? "" : ";label:Spacer;"),
13601
- ...props
13602
- });
13603
- };
13604
-
13605
14083
  const rotate = keyframes({
13606
14084
  '0%': {
13607
14085
  transform: 'rotate(0deg) translate3d(0, 0, 0)'
@@ -13747,9 +14225,9 @@ const DropdownButton = props => {
13747
14225
  ...dropdownProps,
13748
14226
  overlay: overlay,
13749
14227
  children: rightButtonToRender
13750
- }) : jsxs(Root, {
14228
+ }) : jsxs(Root$1, {
13751
14229
  ...props.dropdownMenuRootProps,
13752
- children: [jsx(Trigger, {
14230
+ children: [jsx(Trigger$1, {
13753
14231
  disabled: disabled,
13754
14232
  asChild: true,
13755
14233
  children: rightButtonToRender
@@ -14605,5 +15083,5 @@ const Tree = /*#__PURE__*/forwardRef(function Tree(_ref, ref) {
14605
15083
  });
14606
15084
  });
14607
15085
 
14608
- export { Accordion, AccordionPanel, Alert, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, AppIcon, ApplyDesignSystemFlags, ArrayIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowsUpDownIcon, AutoComplete, BarChartIcon, BeakerIcon, BinaryIcon, BoldIcon, BookIcon, BookmarkBorderIcon, BookmarkFillIcon, BracketsIcon, Breadcrumb, BriefcaseFillIcon, BriefcaseIcon, Button, CalendarEventIcon, CalendarIcon, CaretDownSquareIcon, CaretUpSquareIcon, CatalogIcon, ChartLineIcon, CheckCircleBorderIcon, CheckCircleFillIcon, CheckIcon, CheckLineIcon, Checkbox, ChecklistIcon, ChevronDoubleDownIcon, ChevronDoubleLeftIcon, ChevronDoubleRightIcon, ChevronDoubleUpIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDownloadIcon, CloudIcon, CloudKeyIcon, CloudOffIcon, CloudUploadIcon, ClusterIcon, ClustersIcon, CodeIcon, Col, ColorFillIcon, ConnectIcon, Content, CopyIcon, DIcon, DU_BOIS_ENABLE_ANIMATION_CLASSNAME, DangerModal, DashIcon, DashboardIcon, DataIcon, DataMarketplace, DatabaseIcon, DesignSystemAntDConfigProvider, DesignSystemContext, DesignSystemProvider, DownloadIcon, DragIcon, Dropdown, DropdownMenu, DuboisDatePicker, Empty, ErrorBorderIcon, ErrorFillIcon, ExpandLessIcon, ExpandMoreIcon, ExperimentIcon, FileCodeIcon, FileDocumentIcon, FileIcon, FileImageIcon, FileModelIcon, FilterIcon, Folder1Icon, FolderIcon, FontIcon, ForkIcon, Form, FormDubois, FormUI, FullscreenExitIcon, FullscreenIcon, Gear1Icon, GearIcon, GiftIcon, GridDashIcon, GridIcon, H1Icon, H2Icon, H3Icon, Header$1 as Header, HistoryIcon, HomeIcon, Icon, ImageIcon, IndentDecreaseIcon, IndentIncreaseIcon, InfinityIcon, InfoBorderIcon, InfoFillIcon, Input, ItalicIcon, KeyboardIcon, LayerIcon, Layout, LegacyDatePicker, LifesaverIcon, LightningIcon, LinkIcon, LinkRemoveIcon, ListBorderIcon, ListIcon, LoadingIcon, LockBorderIcon, LockFillIcon, LockUnlockedIcon, MIcon, Menu, MenuIcon, MinusBoxIcon, MinusCircleBorderIcon, MinusCircleFillIcon, Modal, ModelsIcon, Nav, NavButton, NewWindowIcon, NoIcon, NotebookIcon, NotificationIcon, NotificationsOffIcon, OfficeIcon, OptGroup, Option, OverflowIcon, PageBottomIcon, PageFirstIcon, PageLastIcon, PageTopIcon, PageWrapper, Pagination, Panel, PanelBody, PanelHeader, PanelHeaderButtons, PanelHeaderTitle, PencilIcon, PinBorderIcon, PinCancelIcon, PinFillIcon, PlayCircleBorderIcon, PlayCircleFillIcon, PlayIcon, PlugIcon, PlusCircleBorderIcon, PlusCircleFillIcon, PlusIcon, PlusSquareIcon, Popover, QueryEditorIcon, QueryIcon, QueryListViewIcon, QueryNavIcon, QuestionMarkBorderIcon, QuestionMarkFillIcon, RHFControlledComponents, ROW_GUTTER_SIZE, Radio, ReaderModeIcon, Redo, RedoIcon, Refresh, RefreshIcon, ReposIcon, RestoreAntDDefaultClsPrefix, Row, SaveIcon, SchoolIcon, Search1Icon, SearchIcon, SecurityIcon, SegmentedControlButton, SegmentedControlGroup, Select, ShareIcon, Sidebar, SidebarAutoIcon, SidebarCollapseIcon, SidebarExpandIcon, SidebarIcon, Skeleton, SlidersIcon, SortAscendingIcon, SortDescendingIcon, SortUnsortedIcon, Space, Spacer, SpeechBubbleIcon, SpeechBubblePlusIcon, Spinner, SplitButton, StarBorderIcon, StarFillIcon, StopCircleBorderIcon, StopCricleFillIcon, StopIcon, StreamIcon, Switch, SyncIcon, TabPane, Table, TableIcon, Tabs, Tag, Tooltip, TrashIcon, Tree, TreeIcon, Typography, UnderlineIcon, Undo, UploadIcon, UsbIcon, UserBadgeIcon, UserCircleIcon, UserGroupIcon, UserIcon, Visible, VisibleOff, WarningBorderIcon, WarningFillIcon, WithDesignSystemThemeHoc, WorkspacesIcon, XCircleBorderIcon, XCircleFillIcon, ZoomInIcon, ZoomOutIcon, __INTERNAL_DO_NOT_USE_DEDUPE__Group, __INTERNAL_DO_NOT_USE__FormItem, __INTERNAL_DO_NOT_USE__Group, __INTERNAL_DO_NOT_USE__HorizontalGroup, __INTERNAL_DO_NOT_USE__Password, __INTERNAL_DO_NOT_USE__TextArea, __INTERNAL_DO_NOT_USE__VerticalGroup, getAnimationCss, getButtonEmotionStyles, getPaginationEmotionStyles, getRadioStyles, getTabEmotionStyles, getWrapperStyle, useAntDConfigProviderContext, useDesignSystemFlags, useDesignSystemTheme, useNotification, useThemedStyles, withNotifications };
15086
+ export { Accordion, AccordionPanel, Alert, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, AppIcon, ApplyDesignSystemContextOverrides, ApplyDesignSystemFlags, ArrayIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowsUpDownIcon, AutoComplete, BarChartIcon, BeakerIcon, BinaryIcon, BoldIcon, BookIcon, BookmarkBorderIcon, BookmarkFillIcon, BracketsIcon, Breadcrumb, BriefcaseFillIcon, BriefcaseIcon, Button, CalendarEventIcon, CalendarIcon, CaretDownSquareIcon, CaretUpSquareIcon, CatalogIcon, ChartLineIcon, CheckCircleBorderIcon, CheckCircleFillIcon, CheckIcon, CheckLineIcon, Checkbox, ChecklistIcon, ChevronDoubleDownIcon, ChevronDoubleLeftIcon, ChevronDoubleRightIcon, ChevronDoubleUpIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDownloadIcon, CloudIcon, CloudKeyIcon, CloudOffIcon, CloudUploadIcon, ClusterIcon, ClustersIcon, CodeIcon, Col, ColorFillIcon, ConnectIcon, Content, CopyIcon, DIcon, DU_BOIS_ENABLE_ANIMATION_CLASSNAME, DangerModal, DashIcon, DashboardIcon, DataIcon, DataMarketplace, DatabaseIcon, DesignSystemAntDConfigProvider, DesignSystemContext, DesignSystemProvider, DownloadIcon, DragIcon, Drawer, Dropdown, DropdownMenu, DuboisDatePicker, Empty, ErrorBorderIcon, ErrorFillIcon, ExpandLessIcon, ExpandMoreIcon, ExperimentIcon, FileCodeIcon, FileDocumentIcon, FileIcon, FileImageIcon, FileModelIcon, FilterIcon, Folder1Icon, FolderIcon, FontIcon, ForkIcon, Form, FormDubois, FormUI, FullscreenExitIcon, FullscreenIcon, Gear1Icon, GearIcon, GiftIcon, GridDashIcon, GridIcon, H1Icon, H2Icon, H3Icon, Header$1 as Header, HistoryIcon, HomeIcon, Icon, ImageIcon, IndentDecreaseIcon, IndentIncreaseIcon, InfinityIcon, InfoBorderIcon, InfoFillIcon, Input, ItalicIcon, KeyboardIcon, LayerIcon, Layout, LegacyDatePicker, LifesaverIcon, LightningIcon, LinkIcon, LinkRemoveIcon, ListBorderIcon, ListIcon, LoadingIcon, LockBorderIcon, LockFillIcon, LockUnlockedIcon, MIcon, Menu, MenuIcon, MinusBoxIcon, MinusCircleBorderIcon, MinusCircleFillIcon, Modal, ModelsIcon, Nav, NavButton, NewWindowIcon, NoIcon, NotebookIcon, NotificationIcon, NotificationsOffIcon, OfficeIcon, OptGroup, Option, OverflowIcon, PageBottomIcon, PageFirstIcon, PageLastIcon, PageTopIcon, PageWrapper, Pagination, Panel, PanelBody, PanelHeader, PanelHeaderButtons, PanelHeaderTitle, PencilIcon, PinBorderIcon, PinCancelIcon, PinFillIcon, PlayCircleBorderIcon, PlayCircleFillIcon, PlayIcon, PlugIcon, PlusCircleBorderIcon, PlusCircleFillIcon, PlusIcon, PlusSquareIcon, Popover, PopoverV2, QueryEditorIcon, QueryIcon, QueryListViewIcon, QueryNavIcon, QuestionMarkBorderIcon, QuestionMarkFillIcon, RHFControlledComponents, ROW_GUTTER_SIZE, Radio, ReaderModeIcon, Redo, RedoIcon, Refresh, RefreshIcon, ReposIcon, RestoreAntDDefaultClsPrefix, Row, SaveIcon, SchoolIcon, Search1Icon, SearchIcon, SecurityIcon, SegmentedControlButton, SegmentedControlGroup, Select, ShareIcon, Sidebar, SidebarAutoIcon, SidebarCollapseIcon, SidebarExpandIcon, SidebarIcon, Skeleton, SlidersIcon, SortAscendingIcon, SortDescendingIcon, SortUnsortedIcon, Space, Spacer, SpeechBubbleIcon, SpeechBubblePlusIcon, Spinner, SplitButton, StarBorderIcon, StarFillIcon, StopCircleBorderIcon, StopCricleFillIcon, StopIcon, StreamIcon, Switch, SyncIcon, TabPane, Table, TableIcon, Tabs, Tag, Tooltip, TrashIcon, Tree, TreeIcon, Typography, UnderlineIcon, Undo, UploadIcon, UsbIcon, UserBadgeIcon, UserCircleIcon, UserGroupIcon, UserIcon, VariableIcon, Visible, VisibleOff, WarningBorderIcon, WarningFillIcon, WithDesignSystemThemeHoc, WorkspacesIcon, XCircleBorderIcon, XCircleFillIcon, ZoomInIcon, ZoomOutIcon, __INTERNAL_DO_NOT_USE_DEDUPE__Group, __INTERNAL_DO_NOT_USE__FormItem, __INTERNAL_DO_NOT_USE__Group, __INTERNAL_DO_NOT_USE__HorizontalGroup, __INTERNAL_DO_NOT_USE__Password, __INTERNAL_DO_NOT_USE__TextArea, __INTERNAL_DO_NOT_USE__VerticalGroup, getAnimationCss, getButtonEmotionStyles, getPaginationEmotionStyles, getRadioStyles, getTabEmotionStyles, getWrapperStyle, useAntDConfigProviderContext, useDesignSystemFlags, useDesignSystemTheme, useNotification, useThemedStyles, withNotifications };
14609
15087
  //# sourceMappingURL=index.js.map