@databricks/design-system 1.6.0 → 1.6.1

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 (45) hide show
  1. package/dist/design-system/Accordion/Accordion.d.ts +45 -0
  2. package/dist/design-system/Accordion/Accordion.d.ts.map +1 -0
  3. package/dist/design-system/Accordion/index.d.ts +2 -0
  4. package/dist/design-system/Accordion/index.d.ts.map +1 -0
  5. package/dist/design-system/Checkbox/Checkbox.d.ts +1 -1
  6. package/dist/design-system/Checkbox/Checkbox.d.ts.map +1 -1
  7. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts +23 -1
  8. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts.map +1 -1
  9. package/dist/design-system/Form/Form.d.ts +3 -2
  10. package/dist/design-system/Form/Form.d.ts.map +1 -1
  11. package/dist/design-system/FormV2/RHFAdapters.d.ts +37 -0
  12. package/dist/design-system/FormV2/RHFAdapters.d.ts.map +1 -0
  13. package/dist/design-system/FormV2/index.d.ts +40 -0
  14. package/dist/design-system/FormV2/index.d.ts.map +1 -0
  15. package/dist/design-system/Layout/Layout.d.ts +1 -1
  16. package/dist/design-system/Layout/Layout.d.ts.map +1 -1
  17. package/dist/design-system/Modal/Modal.d.ts +1 -1
  18. package/dist/design-system/Modal/Modal.d.ts.map +1 -1
  19. package/dist/design-system/Popover/Popover.d.ts.map +1 -1
  20. package/dist/design-system/SplitButton/SplitButton.d.ts.map +1 -1
  21. package/dist/design-system/Switch/Switch.d.ts.map +1 -1
  22. package/dist/design-system/Table/Table.d.ts.map +1 -1
  23. package/dist/design-system/Tabs/index.d.ts.map +1 -1
  24. package/dist/design-system/index.d.ts +1 -1
  25. package/dist/design-system/index.d.ts.map +1 -1
  26. package/dist/index.js +345 -141
  27. package/dist/index.js.map +1 -1
  28. package/package.json +1 -1
  29. package/dist/design-system/Button/Button.styles.d.ts +0 -4
  30. package/dist/design-system/Button/Button.styles.d.ts.map +0 -1
  31. package/dist/design-system/Icon/__generated/icons/AIcon.d.ts +0 -4
  32. package/dist/design-system/Icon/__generated/icons/AIcon.d.ts.map +0 -1
  33. package/dist/design-system/Icon/__generated/icons/Clock1Icon.d.ts +0 -4
  34. package/dist/design-system/Icon/__generated/icons/Clock1Icon.d.ts.map +0 -1
  35. package/dist/design-system/Icon/__generated/icons/FeatureStoreIcon.d.ts +0 -4
  36. package/dist/design-system/Icon/__generated/icons/FeatureStoreIcon.d.ts.map +0 -1
  37. package/dist/design-system/Icon/__generated/icons/NotificationsIcon.d.ts +0 -4
  38. package/dist/design-system/Icon/__generated/icons/NotificationsIcon.d.ts.map +0 -1
  39. package/dist/design-system/Icon/__generated/icons/PinXIcon.d.ts +0 -4
  40. package/dist/design-system/Icon/__generated/icons/PinXIcon.d.ts.map +0 -1
  41. package/dist/design-system/Icon/__generated/icons/VideosIcon.d.ts +0 -4
  42. package/dist/design-system/Icon/__generated/icons/VideosIcon.d.ts.map +0 -1
  43. package/dist/theme-dark.json +0 -1
  44. package/dist/theme-default.json +0 -1
  45. package/dist/tsconfig.build.tsbuildinfo +0 -1
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import AntDIcon from '@ant-design/icons';
4
4
  import { useTheme, ThemeProvider, css, ClassNames, keyframes } 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, Alert as Alert$1, AutoComplete as AutoComplete$1, Breadcrumb as Breadcrumb$1, Button as Button$1, Checkbox as Checkbox$1, Collapse as Collapse$1, DatePicker, Dropdown as Dropdown$1, Form as Form$1, Col as Col$1, Row as Row$1, Space as Space$1, Typography as Typography$1, Input as Input$1, Layout as Layout$1, Menu as Menu$1, Modal as Modal$1, Pagination as Pagination$1, Popover as Popover$1, Radio as Radio$1, Select as Select$1, Skeleton as Skeleton$1, Switch as Switch$1, Table as Table$1, Tabs as Tabs$1, Tooltip as Tooltip$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, Dropdown as Dropdown$1, Form as Form$1, Col as Col$1, Row as Row$1, Space as Space$1, Typography as Typography$1, Input as Input$1, Layout as Layout$1, Menu as Menu$1, Modal as Modal$1, Pagination as Pagination$1, Popover as Popover$1, Radio as Radio$1, Select as Select$1, Skeleton as Skeleton$1, Switch as Switch$1, Table as Table$1, Tabs as Tabs$1, Tooltip as Tooltip$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';
@@ -545,11 +545,35 @@ const DesignSystemAntDConfigProvider = _ref3 => {
545
545
  let {
546
546
  children
547
547
  } = _ref3;
548
- const antdContext = useContext(AntDConfigProviderPropsContext);
548
+ const antdContext = useAntDConfigProviderContext();
549
549
  return jsx(ConfigProvider, { ...antdContext,
550
550
  children: children
551
551
  });
552
552
  };
553
+ const useAntDConfigProviderContext = () => {
554
+ var _useContext;
555
+
556
+ return (_useContext = useContext(AntDConfigProviderPropsContext)) !== null && _useContext !== void 0 ? _useContext : {
557
+ prefixCls: undefined
558
+ };
559
+ };
560
+ /**
561
+ * When using AntD components inside Design System wrapper components (e.g. Modal, Collapse etc),
562
+ * we don't want Design System's prefix class to override them.
563
+ *
564
+ * Since all Design System's components have are wrapped with DesignSystemAntDConfigProvider,
565
+ * this won't affect their own prefixCls, but just allow nested antd components to keep their ant prefix.
566
+ */
567
+
568
+ const RestoreAntDDefaultClsPrefix = _ref4 => {
569
+ let {
570
+ children
571
+ } = _ref4;
572
+ return jsx(ConfigProvider, {
573
+ prefixCls: "ant",
574
+ children: children
575
+ });
576
+ };
553
577
 
554
578
  function useDesignSystemContext() {
555
579
  return useContext(DesignSystemContext);
@@ -8545,6 +8569,115 @@ function WorkspacesIcon(props) {
8545
8569
  });
8546
8570
  }
8547
8571
 
8572
+ function getAccordionEmotionStyles(clsPrefix, theme) {
8573
+ const classItem = ".".concat(clsPrefix, "-item");
8574
+ const classItemActive = "".concat(classItem, "-active");
8575
+ const classHeader = ".".concat(clsPrefix, "-header");
8576
+ const classContent = ".".concat(clsPrefix, "-content");
8577
+ const classContentBox = ".".concat(clsPrefix, "-content-box");
8578
+ const classArrow = ".".concat(clsPrefix, "-arrow");
8579
+ const styles = {
8580
+ border: '0 none',
8581
+ background: 'none',
8582
+ [classItem]: {
8583
+ border: '0 none',
8584
+ ["&:hover"]: {
8585
+ [classHeader]: {
8586
+ color: theme.colors.actionPrimaryBackgroundHover
8587
+ },
8588
+ [classArrow]: {
8589
+ color: theme.colors.actionPrimaryBackgroundHover
8590
+ }
8591
+ },
8592
+ ["&:active"]: {
8593
+ [classHeader]: {
8594
+ color: theme.colors.actionPrimaryBackgroundPress
8595
+ },
8596
+ [classArrow]: {
8597
+ color: theme.colors.actionPrimaryBackgroundPress
8598
+ }
8599
+ }
8600
+ },
8601
+ [classHeader]: {
8602
+ color: theme.colors.textPrimary,
8603
+ fontWeight: 600,
8604
+ '&:focus-visible': {
8605
+ outlineColor: "".concat(theme.colors.primary, " !important"),
8606
+ outlineStyle: 'auto !important'
8607
+ }
8608
+ },
8609
+ ["& > ".concat(classItem, " > ").concat(classHeader, " > ").concat(classArrow)]: {
8610
+ fontSize: theme.general.iconSize,
8611
+ right: 12
8612
+ },
8613
+ [classArrow]: {
8614
+ color: theme.colors.textSecondary
8615
+ },
8616
+ ["& > ".concat(classItemActive, " > ").concat(classHeader, " > ").concat(classArrow)]: {
8617
+ transform: 'translateY(-50%) rotate(180deg)'
8618
+ },
8619
+ [classContent]: {
8620
+ border: '0 none'
8621
+ },
8622
+ [classContentBox]: {
8623
+ padding: '8px 16px 16px'
8624
+ },
8625
+ ["& > ".concat(classItem, " > ").concat(classHeader)]: {
8626
+ padding: '6px 44px 6px 0',
8627
+ lineHeight: theme.typography.lineHeightBase
8628
+ },
8629
+ ...getAnimationCss(theme.options.enableAnimation)
8630
+ };
8631
+ return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getAccordionEmotionStyles;");
8632
+ }
8633
+
8634
+ const AccordionPanel = _ref => {
8635
+ let {
8636
+ dangerouslySetAntdProps,
8637
+ dangerouslyAppendEmotionCSS,
8638
+ children,
8639
+ ...props
8640
+ } = _ref;
8641
+ return jsx(DesignSystemAntDConfigProvider, {
8642
+ children: jsx(Collapse.Panel, { ...props,
8643
+ ...dangerouslySetAntdProps,
8644
+ css: dangerouslyAppendEmotionCSS,
8645
+ children: jsx(RestoreAntDDefaultClsPrefix, {
8646
+ children: children
8647
+ })
8648
+ })
8649
+ });
8650
+ };
8651
+ const Accordion = /* #__PURE__ */(() => {
8652
+ const Accordion = _ref2 => {
8653
+ let {
8654
+ dangerouslySetAntdProps,
8655
+ dangerouslyAppendEmotionCSS,
8656
+ displayMode = 'multiple',
8657
+ ...props
8658
+ } = _ref2;
8659
+ const {
8660
+ theme,
8661
+ getPrefixedClassName
8662
+ } = useDesignSystemTheme(); // While this component is called `Accordion` for correctness, in AntD it is called `Collapse`.
8663
+
8664
+ const clsPrefix = getPrefixedClassName('collapse');
8665
+ return jsx(DesignSystemAntDConfigProvider, {
8666
+ children: jsx(Collapse, {
8667
+ expandIcon: () => jsx(ChevronDownIcon, {}),
8668
+ expandIconPosition: "right",
8669
+ accordion: displayMode === 'single',
8670
+ ...props,
8671
+ ...dangerouslySetAntdProps,
8672
+ css: [getAccordionEmotionStyles(clsPrefix, theme), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:Accordion;"]
8673
+ })
8674
+ });
8675
+ };
8676
+
8677
+ Accordion.Panel = AccordionPanel;
8678
+ return Accordion;
8679
+ })();
8680
+
8548
8681
  // TODO: Replace with custom icons
8549
8682
  // TODO: Reuse in Alert
8550
8683
  const filledIconsMap = {
@@ -9394,18 +9527,20 @@ function getCheckboxEmotionStyles(clsPrefix, theme) {
9394
9527
 
9395
9528
  const getWrapperStyle = _ref => {
9396
9529
  let {
9397
- clsPrefix,
9398
- theme,
9530
+ // TODO(FEINF-1497): Uncomment
9531
+ // clsPrefix,
9532
+ // theme,
9399
9533
  wrapperStyle = {}
9400
9534
  } = _ref;
9401
- const styles = {
9402
- ["&& + .".concat(clsPrefix, "-hint, && + .").concat(clsPrefix, "-form-message")]: {
9403
- paddingLeft: theme.spacing.lg,
9404
- marginTop: 0
9405
- },
9406
- ["&& + .".concat(clsPrefix, "-checkbox-container")]: {
9407
- marginTop: theme.spacing.sm
9408
- },
9535
+ const styles = { // TODO(FEINF-1497): Uncomment and make changes to support horizontal layout too
9536
+ // [`&& + .${clsPrefix}-hint, && + .${clsPrefix}-form-message`]: {
9537
+ // paddingLeft: theme.spacing.lg,
9538
+ // marginTop: 0,
9539
+ // },
9540
+ //
9541
+ // [`&& + .${clsPrefix}-checkbox-container`]: {
9542
+ // marginTop: theme.spacing.sm,
9543
+ // },
9409
9544
  ...wrapperStyle
9410
9545
  };
9411
9546
  return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getWrapperStyle;");
@@ -9477,108 +9612,6 @@ const Checkbox = CheckboxNamespace; // TODO: I'm doing this to support storybook
9477
9612
 
9478
9613
  const __INTERNAL_DO_NOT_USE__Group = CheckboxGroup;
9479
9614
 
9480
- function getCollapseEmotionStyles(clsPrefix, theme) {
9481
- const classItem = ".".concat(clsPrefix, "-item");
9482
- const classItemActive = "".concat(classItem, "-active");
9483
- const classHeader = ".".concat(clsPrefix, "-header");
9484
- const classContent = ".".concat(clsPrefix, "-content");
9485
- const classContentBox = ".".concat(clsPrefix, "-content-box");
9486
- const classArrow = ".".concat(clsPrefix, "-arrow");
9487
- const styles = {
9488
- border: '0 none',
9489
- background: 'none',
9490
- [classItem]: {
9491
- border: '0 none',
9492
- ["&:hover"]: {
9493
- [classHeader]: {
9494
- color: theme.colors.actionPrimaryBackgroundHover
9495
- },
9496
- [classArrow]: {
9497
- color: theme.colors.actionPrimaryBackgroundHover
9498
- }
9499
- },
9500
- ["&:active"]: {
9501
- [classHeader]: {
9502
- color: theme.colors.actionPrimaryBackgroundPress
9503
- },
9504
- [classArrow]: {
9505
- color: theme.colors.actionPrimaryBackgroundPress
9506
- }
9507
- }
9508
- },
9509
- [classHeader]: {
9510
- color: theme.colors.textPrimary,
9511
- fontWeight: 600,
9512
- '&:focus-visible': {
9513
- outlineColor: "".concat(theme.colors.primary, " !important"),
9514
- outlineStyle: 'auto !important'
9515
- }
9516
- },
9517
- ["& > ".concat(classItem, " > ").concat(classHeader, " > ").concat(classArrow)]: {
9518
- fontSize: theme.general.iconSize,
9519
- right: 12
9520
- },
9521
- [classArrow]: {
9522
- color: theme.colors.textSecondary
9523
- },
9524
- ["& > ".concat(classItemActive, " > ").concat(classHeader, " > ").concat(classArrow)]: {
9525
- transform: 'translateY(-50%) rotate(180deg)'
9526
- },
9527
- [classContent]: {
9528
- border: '0 none'
9529
- },
9530
- [classContentBox]: {
9531
- padding: '8px 16px 16px'
9532
- },
9533
- ["& > ".concat(classItem, " > ").concat(classHeader)]: {
9534
- padding: '6px 44px 6px 0',
9535
- lineHeight: theme.typography.lineHeightBase
9536
- },
9537
- ...getAnimationCss(theme.options.enableAnimation)
9538
- };
9539
- return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getCollapseEmotionStyles;");
9540
- }
9541
-
9542
- const CollapsePanel = _ref => {
9543
- let {
9544
- dangerouslySetAntdProps,
9545
- dangerouslyAppendEmotionCSS,
9546
- ...props
9547
- } = _ref;
9548
- return jsx(DesignSystemAntDConfigProvider, {
9549
- children: jsx(Collapse$1.Panel, { ...props,
9550
- ...dangerouslySetAntdProps,
9551
- css: dangerouslyAppendEmotionCSS
9552
- })
9553
- });
9554
- };
9555
- const Collapse = /* #__PURE__ */(() => {
9556
- const Collapse = _ref2 => {
9557
- let {
9558
- dangerouslySetAntdProps,
9559
- dangerouslyAppendEmotionCSS,
9560
- ...props
9561
- } = _ref2;
9562
- const {
9563
- theme,
9564
- getPrefixedClassName
9565
- } = useDesignSystemTheme();
9566
- const clsPrefix = getPrefixedClassName('collapse');
9567
- return jsx(DesignSystemAntDConfigProvider, {
9568
- children: jsx(Collapse$1, {
9569
- expandIcon: () => jsx(ChevronDownIcon, {}),
9570
- expandIconPosition: "right",
9571
- ...props,
9572
- ...dangerouslySetAntdProps,
9573
- css: [getCollapseEmotionStyles(clsPrefix, theme), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:Collapse;"]
9574
- })
9575
- });
9576
- };
9577
-
9578
- Collapse.Panel = Collapse$1.Panel;
9579
- return Collapse;
9580
- })();
9581
-
9582
9615
  function getEmotionStyles(clsPrefix, theme) {
9583
9616
  const classFocused = ".".concat(clsPrefix, "-focused");
9584
9617
  const classActiveBar = ".".concat(clsPrefix, "-active-bar");
@@ -9819,6 +9852,7 @@ const Content$2 = /*#__PURE__*/forwardRef(function Content(_ref, ref) {
9819
9852
  minWidth
9820
9853
  }, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
9821
9854
  sideOffset: 4,
9855
+ align: "start",
9822
9856
  ...props,
9823
9857
  children: children
9824
9858
  })
@@ -10142,6 +10176,9 @@ const itemStyles = theme => ({
10142
10176
  flexWrap: 'wrap',
10143
10177
  alignItems: 'center',
10144
10178
  outline: 'unset',
10179
+ '&:hover': {
10180
+ cursor: 'pointer'
10181
+ },
10145
10182
  '&:focus': {
10146
10183
  backgroundColor: theme.colors.actionTertiaryBackgroundHover
10147
10184
  },
@@ -10230,6 +10267,7 @@ const getFormItemEmotionStyles = _ref => {
10230
10267
  const FormDubois = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
10231
10268
  let {
10232
10269
  dangerouslySetAntdProps,
10270
+ children,
10233
10271
  ...props
10234
10272
  } = _ref2;
10235
10273
  const mergedProps = { ...props,
@@ -10240,7 +10278,10 @@ const FormDubois = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
10240
10278
  children: jsx(Form$1, { ...mergedProps,
10241
10279
  colon: false,
10242
10280
  ref: ref,
10243
- ...dangerouslySetAntdProps
10281
+ ...dangerouslySetAntdProps,
10282
+ children: jsx(RestoreAntDDefaultClsPrefix, {
10283
+ children: children
10284
+ })
10244
10285
  })
10245
10286
  });
10246
10287
  });
@@ -10248,6 +10289,7 @@ const FormDubois = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
10248
10289
  const FormItem = _ref3 => {
10249
10290
  let {
10250
10291
  dangerouslySetAntdProps,
10292
+ children,
10251
10293
  ...props
10252
10294
  } = _ref3;
10253
10295
  const {
@@ -10260,7 +10302,8 @@ const FormItem = _ref3 => {
10260
10302
  theme,
10261
10303
  clsPrefix: classNamePrefix
10262
10304
  }),
10263
- ...dangerouslySetAntdProps
10305
+ ...dangerouslySetAntdProps,
10306
+ children: children
10264
10307
  })
10265
10308
  });
10266
10309
  };
@@ -10656,19 +10699,76 @@ const {
10656
10699
  } = Layout$1;
10657
10700
  const Layout = _ref => {
10658
10701
  let {
10702
+ children,
10659
10703
  dangerouslySetAntdProps,
10660
10704
  ...props
10661
10705
  } = _ref;
10662
10706
  return jsx(DesignSystemAntDConfigProvider, {
10663
10707
  children: jsx(Layout$1, { ...props,
10664
- ...dangerouslySetAntdProps
10708
+ ...dangerouslySetAntdProps,
10709
+ children: jsx(RestoreAntDDefaultClsPrefix, {
10710
+ children: children
10711
+ })
10712
+ })
10713
+ });
10714
+ };
10715
+
10716
+ Layout.Header = _ref2 => {
10717
+ let {
10718
+ children,
10719
+ ...props
10720
+ } = _ref2;
10721
+ return jsx(DesignSystemAntDConfigProvider, {
10722
+ children: jsx(Header, { ...props,
10723
+ children: jsx(RestoreAntDDefaultClsPrefix, {
10724
+ children: children
10725
+ })
10726
+ })
10727
+ });
10728
+ };
10729
+
10730
+ Layout.Footer = _ref3 => {
10731
+ let {
10732
+ children,
10733
+ ...props
10734
+ } = _ref3;
10735
+ return jsx(DesignSystemAntDConfigProvider, {
10736
+ children: jsx(Footer, { ...props,
10737
+ children: jsx(RestoreAntDDefaultClsPrefix, {
10738
+ children: children
10739
+ })
10740
+ })
10741
+ });
10742
+ };
10743
+
10744
+ Layout.Sider = /*#__PURE__*/React__default.forwardRef((_ref4, ref) => {
10745
+ let {
10746
+ children,
10747
+ ...props
10748
+ } = _ref4;
10749
+ return jsx(DesignSystemAntDConfigProvider, {
10750
+ children: jsx(Sider, { ...props,
10751
+ ref: ref,
10752
+ children: jsx(RestoreAntDDefaultClsPrefix, {
10753
+ children: children
10754
+ })
10755
+ })
10756
+ });
10757
+ });
10758
+
10759
+ Layout.Content = _ref5 => {
10760
+ let {
10761
+ children,
10762
+ ...props
10763
+ } = _ref5;
10764
+ return jsx(DesignSystemAntDConfigProvider, {
10765
+ children: jsx(Content$1, { ...props,
10766
+ children: jsx(RestoreAntDDefaultClsPrefix, {
10767
+ children: children
10768
+ })
10665
10769
  })
10666
10770
  });
10667
10771
  };
10668
- Layout.Header = Header;
10669
- Layout.Footer = Footer;
10670
- Layout.Sider = Sider;
10671
- Layout.Content = Content$1;
10672
10772
 
10673
10773
  /**
10674
10774
  * @deprecated Use `DropdownMenu` instead.
@@ -10841,6 +10941,9 @@ function Modal(_ref) {
10841
10941
  okButtonProps,
10842
10942
  cancelButtonProps,
10843
10943
  dangerouslySetAntdProps,
10944
+ children,
10945
+ title,
10946
+ footer,
10844
10947
  ...props
10845
10948
  } = _ref;
10846
10949
  const {
@@ -10890,16 +10993,24 @@ function Modal(_ref) {
10890
10993
  css: getModalEmotionStyles({
10891
10994
  theme,
10892
10995
  clsPrefix: classNamePrefix,
10893
- hasFooter: props.footer !== null,
10996
+ hasFooter: footer !== null,
10894
10997
  maxedOutHeight: props.verticalSizing === 'maxed_out'
10895
10998
  }),
10896
- footer: props.footer === undefined ? renderDefaultFooter() : props.footer,
10999
+ title: jsx(RestoreAntDDefaultClsPrefix, {
11000
+ children: title
11001
+ }),
11002
+ footer: jsx(RestoreAntDDefaultClsPrefix, {
11003
+ children: footer === undefined ? renderDefaultFooter() : footer
11004
+ }),
10897
11005
  width: props.size ? SIZE_PRESETS[props.size] : undefined,
10898
11006
  closeIcon: jsx(CloseIcon, {}),
10899
11007
  centered: true,
10900
11008
  zIndex: theme.options.zIndexBase,
10901
11009
  ...props,
10902
- ...dangerouslySetAntdProps
11010
+ ...dangerouslySetAntdProps,
11011
+ children: jsx(RestoreAntDDefaultClsPrefix, {
11012
+ children: children
11013
+ })
10903
11014
  })
10904
11015
  });
10905
11016
  }
@@ -11234,6 +11345,7 @@ const Pagination = function Pagination(_ref) {
11234
11345
 
11235
11346
  const Popover = _ref => {
11236
11347
  let {
11348
+ content,
11237
11349
  dangerouslySetAntdProps,
11238
11350
  ...props
11239
11351
  } = _ref;
@@ -11243,7 +11355,10 @@ const Popover = _ref => {
11243
11355
  return jsx(DesignSystemAntDConfigProvider, {
11244
11356
  children: jsx(Popover$1, {
11245
11357
  zIndex: theme.options.zIndexBase + 30,
11246
- ...props
11358
+ ...props,
11359
+ content: jsx(RestoreAntDDefaultClsPrefix, {
11360
+ children: content
11361
+ })
11247
11362
  })
11248
11363
  });
11249
11364
  };
@@ -12552,7 +12667,9 @@ const DropdownButton = props => {
12552
12667
  disabled: disabled,
12553
12668
  asChild: true,
12554
12669
  children: rightButtonToRender
12555
- }), menu]
12670
+ }), menu && /*#__PURE__*/React.cloneElement(menu, {
12671
+ align: 'end'
12672
+ })]
12556
12673
  })]
12557
12674
  });
12558
12675
  };
@@ -12673,9 +12790,11 @@ const SplitButton = props => {
12673
12790
  }),
12674
12791
  ...loadingButtonStyles
12675
12792
  },
12676
- children: jsx(LoadingIcon, {
12677
- spin: true
12678
- })
12793
+ loading: true,
12794
+ htmlType: props.htmlType,
12795
+ title: props.title,
12796
+ className: props.className,
12797
+ children: children
12679
12798
  }) : jsxs(DropdownButton, { ...dropdownButtonProps,
12680
12799
  overlay: deprecatedMenu,
12681
12800
  trigger: ['click'],
@@ -12741,18 +12860,82 @@ const getSwitchWithLabelStyles = _ref => {
12741
12860
  // Default value
12742
12861
  const SWITCH_WIDTH = 28;
12743
12862
  const styles = {
12744
- '&': {
12745
- display: 'flex',
12746
- alignItems: 'center'
12863
+ display: 'flex',
12864
+ alignItems: 'center',
12865
+ // Switch is Off
12866
+ ["&.".concat(clsPrefix, "-switch")]: {
12867
+ backgroundColor: theme.colors.backgroundPrimary,
12868
+ border: "1px solid ".concat(theme.colors.actionDefaultBorderDefault),
12869
+ [".".concat(clsPrefix, "-switch-handle:before")]: {
12870
+ boxShadow: "0px 0px 0px 1px ".concat(theme.colors.actionDefaultBorderDefault),
12871
+ transition: 'none'
12872
+ },
12873
+ ["&:hover:not(.".concat(clsPrefix, "-switch-disabled)")]: {
12874
+ backgroundColor: theme.colors.actionDefaultBackgroundHover,
12875
+ border: "1px solid ".concat(theme.colors.actionPrimaryBackgroundHover),
12876
+ [".".concat(clsPrefix, "-switch-handle:before")]: {
12877
+ boxShadow: "0px 0px 0px 1px ".concat(theme.colors.actionPrimaryBackgroundHover)
12878
+ }
12879
+ },
12880
+ ["&:active:not(.".concat(clsPrefix, "-switch-disabled)")]: {
12881
+ backgroundColor: theme.colors.actionDefaultBackgroundPress,
12882
+ border: "1px solid ".concat(theme.colors.actionPrimaryBackgroundPress),
12883
+ [".".concat(clsPrefix, "-switch-handle:before")]: {
12884
+ boxShadow: "0px 0px 0px 1px ".concat(theme.colors.actionPrimaryBackgroundHover)
12885
+ }
12886
+ },
12887
+ ["&:focus-visible"]: {
12888
+ border: "1px solid ".concat(theme.colors.actionPrimaryBackgroundDefault),
12889
+ boxShadow: 'none',
12890
+ outlineStyle: 'solid',
12891
+ outlineWidth: '1px',
12892
+ outlineOffset: '1px',
12893
+ outlineColor: theme.colors.actionDefaultBorderFocus,
12894
+ [".".concat(clsPrefix, "-switch-handle:before")]: {
12895
+ boxShadow: "0px 0px 0px 1px ".concat(theme.colors.actionPrimaryBackgroundDefault)
12896
+ }
12897
+ },
12898
+ ["&:focus"]: {
12899
+ boxShadow: 'none'
12900
+ }
12901
+ },
12902
+ // Switch is On
12903
+ ["&.".concat(clsPrefix, "-switch-checked")]: {
12904
+ backgroundColor: theme.colors.actionPrimaryBackgroundDefault,
12905
+ border: "1px solid ".concat(theme.colors.actionPrimaryBackgroundDefault),
12906
+ ["&:hover:not(.".concat(clsPrefix, "-switch-disabled)")]: {
12907
+ backgroundColor: theme.colors.actionPrimaryBackgroundHover,
12908
+ border: "1px solid ".concat(theme.colors.actionPrimaryBackgroundDefault)
12909
+ },
12910
+ ["&:active:not(.".concat(clsPrefix, "-switch-disabled)")]: {
12911
+ backgroundColor: theme.colors.actionPrimaryBackgroundPress
12912
+ },
12913
+ [".".concat(clsPrefix, "-switch-handle:before")]: {
12914
+ boxShadow: "0px 0px 0px 1px ".concat(theme.colors.actionPrimaryBackgroundDefault)
12915
+ },
12916
+ ["&.".concat(clsPrefix, "-switch-disabled")]: {
12917
+ backgroundColor: theme.colors.actionDisabledBackground,
12918
+ border: "1px solid ".concat(theme.colors.actionDisabledBackground),
12919
+ [".".concat(clsPrefix, "-switch-handle:before")]: {
12920
+ boxShadow: "0px 0px 0px 1px ".concat(theme.colors.actionDisabledBackground)
12921
+ }
12922
+ }
12923
+ },
12924
+ [".".concat(clsPrefix, "-switch-handle:before")]: {
12925
+ backgroundColor: theme.colors.backgroundPrimary
12747
12926
  },
12748
12927
  ["&& + .".concat(clsPrefix, "-hint, && + .").concat(clsPrefix, "-form-message")]: {
12749
12928
  paddingLeft: theme.spacing.sm + SWITCH_WIDTH
12750
12929
  },
12751
12930
  ["&& + .".concat(clsPrefix, "-form-message")]: {
12752
12931
  marginTop: 0
12932
+ },
12933
+ [".".concat(clsPrefix, "-click-animating-node")]: {
12934
+ animation: 'none'
12753
12935
  }
12754
12936
  };
12755
- return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getSwitchWithLabelStyles;");
12937
+ const importantStyles = importantify(styles);
12938
+ return /*#__PURE__*/css(importantStyles, process.env.NODE_ENV === "production" ? "" : ";label:getSwitchWithLabelStyles;");
12756
12939
  };
12757
12940
 
12758
12941
  const Switch = _ref2 => {
@@ -12774,7 +12957,12 @@ const Switch = _ref2 => {
12774
12957
  }),
12775
12958
  children: [jsx(Switch$1, { ...props,
12776
12959
  ...dangerouslySetAntdProps,
12777
- css: /*#__PURE__*/css(getAnimationCss(theme.options.enableAnimation), process.env.NODE_ENV === "production" ? "" : ";label:Switch;")
12960
+ css: /*#__PURE__*/css({ ... /*#__PURE__*/css(getAnimationCss(theme.options.enableAnimation), process.env.NODE_ENV === "production" ? "" : ";label:Switch;"),
12961
+ ...getSwitchWithLabelStyles({
12962
+ clsPrefix: classNamePrefix,
12963
+ theme
12964
+ })
12965
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Switch;")
12778
12966
  }), jsx(Label, {
12779
12967
  inline: true,
12780
12968
  ...labelProps,
@@ -12784,7 +12972,12 @@ const Switch = _ref2 => {
12784
12972
  }) : jsx(DesignSystemAntDConfigProvider, {
12785
12973
  children: jsx(Switch$1, { ...props,
12786
12974
  ...dangerouslySetAntdProps,
12787
- css: /*#__PURE__*/css(getAnimationCss(theme.options.enableAnimation), process.env.NODE_ENV === "production" ? "" : ";label:Switch;")
12975
+ css: /*#__PURE__*/css({ ... /*#__PURE__*/css(getAnimationCss(theme.options.enableAnimation), process.env.NODE_ENV === "production" ? "" : ";label:Switch;"),
12976
+ ...getSwitchWithLabelStyles({
12977
+ clsPrefix: classNamePrefix,
12978
+ theme
12979
+ })
12980
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Switch;")
12788
12981
  })
12789
12982
  });
12790
12983
  };
@@ -12843,6 +13036,7 @@ const Table = props => {
12843
13036
  const {
12844
13037
  loading,
12845
13038
  scrollableInFlexibleContainer,
13039
+ children,
12846
13040
  ...tableProps
12847
13041
  } = props;
12848
13042
  return jsx(DesignSystemAntDConfigProvider, {
@@ -12855,7 +13049,10 @@ const Table = props => {
12855
13049
  y: 'auto'
12856
13050
  } : undefined,
12857
13051
  ...tableProps,
12858
- css: getTableEmotionStyles(classNamePrefix, theme, Boolean(scrollableInFlexibleContainer))
13052
+ css: getTableEmotionStyles(classNamePrefix, theme, Boolean(scrollableInFlexibleContainer)),
13053
+ children: jsx(RestoreAntDDefaultClsPrefix, {
13054
+ children: children
13055
+ })
12859
13056
  })
12860
13057
  });
12861
13058
  };
@@ -12993,7 +13190,11 @@ const getTabEmotionStyles = (clsPrefix, theme) => {
12993
13190
  const importantStyles = importantify(styles);
12994
13191
  return importantStyles;
12995
13192
  };
12996
- const TabPane = props => {
13193
+ const TabPane = _ref => {
13194
+ let {
13195
+ children,
13196
+ ...props
13197
+ } = _ref;
12997
13198
  const {
12998
13199
  theme
12999
13200
  } = useDesignSystemTheme();
@@ -13008,12 +13209,15 @@ const TabPane = props => {
13008
13209
  // However, we use a restricted TS interface to still discourage consumers of the library from passing in these props.
13009
13210
  ,
13010
13211
  ...props,
13011
- ...props.dangerouslySetAntdProps
13212
+ ...props.dangerouslySetAntdProps,
13213
+ children: jsx(RestoreAntDDefaultClsPrefix, {
13214
+ children: children
13215
+ })
13012
13216
  })
13013
13217
  });
13014
13218
  };
13015
13219
  const Tabs = /* #__PURE__ */(() => {
13016
- const Tabs = _ref => {
13220
+ const Tabs = _ref2 => {
13017
13221
  let {
13018
13222
  editable = false,
13019
13223
  activeKey,
@@ -13025,7 +13229,7 @@ const Tabs = /* #__PURE__ */(() => {
13025
13229
  dangerouslySetAntdProps = {},
13026
13230
  dangerouslyAppendEmotionCSS = {},
13027
13231
  ...props
13028
- } = _ref;
13232
+ } = _ref2;
13029
13233
  const {
13030
13234
  theme,
13031
13235
  classNamePrefix
@@ -13763,5 +13967,5 @@ const Typography = /* #__PURE__ */(() => {
13763
13967
  return Typography;
13764
13968
  })();
13765
13969
 
13766
- export { Alert, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, ApplyDesignSystemFlags, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowsUpDownIcon, AutoComplete, BarChartIcon, BeakerIcon, 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, Collapse, CollapsePanel, ColorFillIcon, ConnectIcon, Content, CopyIcon, DIcon, DU_BOIS_ENABLE_ANIMATION_CLASSNAME, DangerModal, DashIcon, DashboardIcon, DataIcon, DataMarketplace, DatabaseIcon, DesignSystemAntDConfigProvider, DesignSystemContext, DesignSystemProvider, DownloadIcon, DragIcon, Dropdown, DropdownMenu, DuboisDatePicker, ErrorBorderIcon, ErrorFillIcon, ExpandLessIcon, ExpandMoreIcon, ExperimentIcon, FileCodeIcon, FileDocumentIcon, FileIcon, FileImageIcon, FileModelIcon, FilterIcon, Folder1Icon, FolderIcon, FontIcon, ForkIcon, Form, FormDubois, FullscreenExitIcon, FullscreenIcon, Gear1Icon, GearIcon, 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, MinusBoxIcon, MinusCircleBorderIcon, MinusCircleFillIcon, Modal, ModelsIcon, Nav, NavButton, NewWindowIcon, NoIcon, NotebookIcon, NotificationIcon, 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, ROW_GUTTER_SIZE, Radio, ReaderModeIcon, ReposIcon, 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, UploadIcon, UsbIcon, UserBadgeIcon, UserCircleIcon, UserGroupIcon, UserIcon, Visible, VisibleOff, WarningBorderIcon, WarningFillIcon, WithDesignSystemThemeHoc, WorkspacesIcon, XCircleBorderIcon, XCircleFillIcon, ZoomInIcon, ZoomOutIcon, __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, useDesignSystemFlags, useDesignSystemTheme, useNotification, useThemedStyles, withNotifications };
13970
+ export { Accordion, AccordionPanel, Alert, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, ApplyDesignSystemFlags, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowsUpDownIcon, AutoComplete, BarChartIcon, BeakerIcon, 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, ErrorBorderIcon, ErrorFillIcon, ExpandLessIcon, ExpandMoreIcon, ExperimentIcon, FileCodeIcon, FileDocumentIcon, FileIcon, FileImageIcon, FileModelIcon, FilterIcon, Folder1Icon, FolderIcon, FontIcon, ForkIcon, Form, FormDubois, FullscreenExitIcon, FullscreenIcon, Gear1Icon, GearIcon, 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, MinusBoxIcon, MinusCircleBorderIcon, MinusCircleFillIcon, Modal, ModelsIcon, Nav, NavButton, NewWindowIcon, NoIcon, NotebookIcon, NotificationIcon, 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, ROW_GUTTER_SIZE, Radio, ReaderModeIcon, 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, UploadIcon, UsbIcon, UserBadgeIcon, UserCircleIcon, UserGroupIcon, UserIcon, Visible, VisibleOff, WarningBorderIcon, WarningFillIcon, WithDesignSystemThemeHoc, WorkspacesIcon, XCircleBorderIcon, XCircleFillIcon, ZoomInIcon, ZoomOutIcon, __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 };
13767
13971
  //# sourceMappingURL=index.js.map