@databricks/design-system 1.5.1 → 1.5.2
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.
|
@@ -9,4 +9,25 @@ export interface NotificationProps extends Omit<AntDNotificationArgs, 'bottom' |
|
|
|
9
9
|
type: NotificationType;
|
|
10
10
|
}
|
|
11
11
|
export declare function useNotification(): [NotificationInstance, React.ReactElement];
|
|
12
|
+
/**
|
|
13
|
+
* A type wrapping given component interface with props returned by withNotifications() HOC
|
|
14
|
+
*
|
|
15
|
+
* @deprecated Please migrate components to functional components and use useNotification() hook instead.
|
|
16
|
+
*/
|
|
17
|
+
export declare type WithNotificationsHOCProps<T> = T & {
|
|
18
|
+
notificationAPI: NotificationInstance;
|
|
19
|
+
notificationContextHolder: React.ReactElement;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A higher-order component factory function, enables using notifications in
|
|
23
|
+
* class components in a similar way to useNotification() hook. Wrapped component will have
|
|
24
|
+
* additional "notificationAPI" and "notificationContextHolder" props injected containing
|
|
25
|
+
* the notification API object and context holder react node respectively.
|
|
26
|
+
*
|
|
27
|
+
* The wrapped component can implement WithNotificationsHOCProps<OwnProps> type which
|
|
28
|
+
* enriches the component's interface with the mentioned props.
|
|
29
|
+
*
|
|
30
|
+
* @deprecated Please migrate components to functional components and use useNotification() hook instead.
|
|
31
|
+
*/
|
|
32
|
+
export declare const withNotifications: <P, T>(Component: import("react").ComponentType<WithNotificationsHOCProps<P>>) => import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<P> & import("react").RefAttributes<T>>;
|
|
12
33
|
//# sourceMappingURL=Notification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../src/design-system/Notification/Notification.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EACV,SAAS,IAAI,oBAAoB,EACjC,QAAQ,IAAI,YAAY,EACxB,oBAAoB,IAAI,wBAAwB,EACjD,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,oBAAY,gBAAgB,GAAG,YAAY,CAAC;AAC5C,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IACpE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,iBACf,SAAQ,IAAI,CACR,oBAAoB,EACpB,QAAQ,GAAG,KAAK,GAAG,WAAW,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,CACrF,EACD,uBAAuB,CAAC,oBAAoB,CAAC;IAC/C,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAID,wBAAgB,eAAe,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,YAAY,CAAC,CA4C5E"}
|
|
1
|
+
{"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../src/design-system/Notification/Notification.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EACV,SAAS,IAAI,oBAAoB,EACjC,QAAQ,IAAI,YAAY,EACxB,oBAAoB,IAAI,wBAAwB,EACjD,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,oBAAY,gBAAgB,GAAG,YAAY,CAAC;AAC5C,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB;IACpE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,iBACf,SAAQ,IAAI,CACR,oBAAoB,EACpB,QAAQ,GAAG,KAAK,GAAG,WAAW,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,CACrF,EACD,uBAAuB,CAAC,oBAAoB,CAAC;IAC/C,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAID,wBAAgB,eAAe,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,YAAY,CAAC,CA4C5E;AAOD;;;;GAIG;AACH,oBAAY,yBAAyB,CAAC,CAAC,IAAI,CAAC,GAAG;IAC7C,eAAe,EAAE,oBAAoB,CAAC;IACtC,yBAAyB,EAAE,KAAK,CAAC,YAAY,CAAC;CAC/C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,oMAW1B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31703,6 +31703,7 @@ function OperationNode(_ref, ref) {
|
|
|
31703
31703
|
editable = _ref.editable,
|
|
31704
31704
|
tabBarGutter = _ref.tabBarGutter,
|
|
31705
31705
|
rtl = _ref.rtl,
|
|
31706
|
+
getPopupContainer = _ref.getPopupContainer,
|
|
31706
31707
|
onTabClick = _ref.onTabClick; // ======================== Dropdown ========================
|
|
31707
31708
|
|
|
31708
31709
|
var _useState = useState(false),
|
|
@@ -31827,6 +31828,7 @@ function OperationNode(_ref, ref) {
|
|
|
31827
31828
|
transitionName: moreTransitionName,
|
|
31828
31829
|
onVisibleChange: setOpen,
|
|
31829
31830
|
overlayClassName: overlayClassName,
|
|
31831
|
+
getPopupContainer: getPopupContainer,
|
|
31830
31832
|
mouseEnterDelay: 0.1,
|
|
31831
31833
|
mouseLeaveDelay: 0.1
|
|
31832
31834
|
}, /*#__PURE__*/React.createElement("button", {
|
|
@@ -32663,6 +32665,7 @@ function Tabs$2(_ref, ref) {
|
|
|
32663
32665
|
onChange = _ref.onChange,
|
|
32664
32666
|
onTabClick = _ref.onTabClick,
|
|
32665
32667
|
onTabScroll = _ref.onTabScroll,
|
|
32668
|
+
getPopupContainer = _ref.getPopupContainer,
|
|
32666
32669
|
restProps = _objectWithoutProperties$1(_ref, ["id", "prefixCls", "className", "children", "direction", "activeKey", "defaultActiveKey", "editable", "animated", "tabPosition", "tabBarGutter", "tabBarStyle", "tabBarExtraContent", "locale", "moreIcon", "moreTransitionName", "destroyInactiveTabPane", "renderTabBar", "onChange", "onTabClick", "onTabScroll"]);
|
|
32667
32670
|
|
|
32668
32671
|
var tabs = parseTabList(children);
|
|
@@ -32784,7 +32787,8 @@ function Tabs$2(_ref, ref) {
|
|
|
32784
32787
|
onTabScroll: onTabScroll,
|
|
32785
32788
|
extra: tabBarExtraContent,
|
|
32786
32789
|
style: tabBarStyle,
|
|
32787
|
-
panes: children
|
|
32790
|
+
panes: children,
|
|
32791
|
+
getPopupContainer: getPopupContainer
|
|
32788
32792
|
});
|
|
32789
32793
|
|
|
32790
32794
|
if (renderTabBar) {
|
|
@@ -32841,7 +32845,8 @@ function Tabs$1(_a) {
|
|
|
32841
32845
|
|
|
32842
32846
|
var _React$useContext = React.useContext(ConfigContext),
|
|
32843
32847
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
32844
|
-
direction = _React$useContext.direction
|
|
32848
|
+
direction = _React$useContext.direction,
|
|
32849
|
+
getPopupContainer = _React$useContext.getPopupContainer;
|
|
32845
32850
|
|
|
32846
32851
|
var prefixCls = getPrefixCls('tabs', customizePrefixCls);
|
|
32847
32852
|
var editable;
|
|
@@ -32867,6 +32872,7 @@ function Tabs$1(_a) {
|
|
|
32867
32872
|
var size = propSize !== undefined ? propSize : contextSize;
|
|
32868
32873
|
return /*#__PURE__*/React.createElement(ForwardTabs, _extends$1({
|
|
32869
32874
|
direction: direction,
|
|
32875
|
+
getPopupContainer: getPopupContainer,
|
|
32870
32876
|
moreTransitionName: "".concat(rootPrefixCls, "-slide-up")
|
|
32871
32877
|
}, props, {
|
|
32872
32878
|
className: classNames((_classNames = {}, _defineProperty$4(_classNames, "".concat(prefixCls, "-").concat(size), size), _defineProperty$4(_classNames, "".concat(prefixCls, "-card"), ['card', 'editable-card'].includes(type)), _defineProperty$4(_classNames, "".concat(prefixCls, "-editable-card"), type === 'editable-card'), _defineProperty$4(_classNames, "".concat(prefixCls, "-centered"), centered), _classNames), className),
|
|
@@ -56346,6 +56352,32 @@ const defaultProps = {
|
|
|
56346
56352
|
type: 'info',
|
|
56347
56353
|
duration: 3
|
|
56348
56354
|
};
|
|
56355
|
+
/**
|
|
56356
|
+
* A type wrapping given component interface with props returned by withNotifications() HOC
|
|
56357
|
+
*
|
|
56358
|
+
* @deprecated Please migrate components to functional components and use useNotification() hook instead.
|
|
56359
|
+
*/
|
|
56360
|
+
|
|
56361
|
+
/**
|
|
56362
|
+
* A higher-order component factory function, enables using notifications in
|
|
56363
|
+
* class components in a similar way to useNotification() hook. Wrapped component will have
|
|
56364
|
+
* additional "notificationAPI" and "notificationContextHolder" props injected containing
|
|
56365
|
+
* the notification API object and context holder react node respectively.
|
|
56366
|
+
*
|
|
56367
|
+
* The wrapped component can implement WithNotificationsHOCProps<OwnProps> type which
|
|
56368
|
+
* enriches the component's interface with the mentioned props.
|
|
56369
|
+
*
|
|
56370
|
+
* @deprecated Please migrate components to functional components and use useNotification() hook instead.
|
|
56371
|
+
*/
|
|
56372
|
+
const withNotifications = Component => /*#__PURE__*/forwardRef((props, ref) => {
|
|
56373
|
+
const [notificationAPI, notificationContextHolder] = useNotification();
|
|
56374
|
+
return jsx(Component, {
|
|
56375
|
+
ref: ref,
|
|
56376
|
+
notificationAPI: notificationAPI,
|
|
56377
|
+
notificationContextHolder: notificationContextHolder,
|
|
56378
|
+
...props
|
|
56379
|
+
});
|
|
56380
|
+
});
|
|
56349
56381
|
|
|
56350
56382
|
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)."; }
|
|
56351
56383
|
|
|
@@ -58377,5 +58409,5 @@ Typography.Title = Title;
|
|
|
58377
58409
|
Typography.Paragraph = Paragraph;
|
|
58378
58410
|
Typography.Link = Link;
|
|
58379
58411
|
|
|
58380
|
-
export { AIcon, Alert, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, ApplyDesignSystemFlags, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowsUpDownIcon, AutoComplete, BarChartIcon, BeakerIcon, BookIcon, BookmarkBorderIcon, BookmarkFillIcon, Breadcrumb, BriefcaseFillIcon, BriefcaseIcon, Button, CalendarEventIcon, CalendarIcon, CaretDownSquareIcon, CaretUpSquareIcon, CheckCircleBorderIcon, CheckCircleFillIcon, CheckIcon, CheckLineIcon, Checkbox, ChecklistIcon, ChevronDoubleDownIcon, ChevronDoubleLeftIcon, ChevronDoubleRightIcon, ChevronDoubleUpIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleIcon, ClipboardIcon, Clock1Icon, ClockIcon, CloseIcon, CloudDownloadIcon, CloudIcon, CloudOffIcon, CloudUploadIcon, ClusterIcon, ClustersIcon, CodeIcon, Col, Collapse, CollapsePanel, CopyIcon, DIcon, DU_BOIS_ENABLE_ANIMATION_CLASSNAME, DangerModal, DashIcon, DashboardIcon, DataIcon, DatabaseIcon, DesignSystemContext, DesignSystemProvider, DownloadIcon, DragIcon, Dropdown, DropdownMenu, DuboisDatePicker, ErrorBorderIcon, ErrorFillIcon, ExpandLessIcon, ExpandMoreIcon, ExperimentIcon, FeatureStoreIcon, FileCodeIcon, FileDocumentIcon, FileIcon, FileImageIcon, FileModelIcon, FilterIcon, Folder1Icon, FolderIcon, 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, KeyboardIcon, LayerIcon, Layout, LegacyDatePicker, LifesaverIcon, LightningIcon, LinkIcon, LinkRemoveIcon, ListBorderIcon, ListIcon, LoadingIcon, LockBorderIcon, LockFillIcon, LockUnlockedIcon, MIcon, Menu, MinusBoxIcon, MinusCircleBorderIcon, MinusCircleFillIcon, Modal, ModelsIcon, NewWindowIcon, NoIcon, NotebookIcon, NotificationIcon, NotificationsIcon, OfficeIcon, OptGroup, Option, OverflowIcon, PageBottomIcon, PageFirstIcon, PageLastIcon, PageTopIcon, PageWrapper, Pagination, PencilIcon, PinBorderIcon, PinCancelIcon, PinFillIcon, PinXIcon, PlayCircleBorderIcon, PlayCircleFillIcon, PlayIcon, PlusCircleBorderIcon, PlusCircleFillIcon, PlusIcon, PlusSquareIcon, Popover, QueryEditorIcon, QueryIcon, QueryListViewIcon, QueryNavIcon, QuestionMarkBorderIcon, QuestionMarkFillIcon, ROW_GUTTER_SIZE, Radio, ReaderModeIcon, ReposIcon, Row, SchoolIcon, Search1Icon, SearchIcon, SecurityIcon, SegmentedControlButton, SegmentedControlGroup, Select, ShareIcon, SidebarAutoIcon, SidebarCollapseIcon, SidebarExpandIcon, SidebarIcon, Skeleton, Space, Spacer, SpeechBubbleIcon, SpeechBubblePlusIcon, Spinner, SplitButton, StarBorderIcon, StarFillIcon, StopCircleBorderIcon, StopCricleFillIcon, StopIcon, StreamIcon, Switch, SyncIcon, TabPane, Table, TableIcon, Tabs, Tag, Tooltip, TrashIcon, Tree, TreeIcon, Typography, UploadIcon, UsbIcon, UserBadgeIcon, UserCircleIcon, UserGroupIcon, UserIcon, VideosIcon, Visible, VisibleOff, WarningBorderIcon, WarningFillIcon, WithDesignSystemThemeHoc, 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, getTabEmotionStyles, useDesignSystemFlags, useDesignSystemTheme, useNotification, useThemedStyles };
|
|
58412
|
+
export { AIcon, Alert, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, ApplyDesignSystemFlags, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowsUpDownIcon, AutoComplete, BarChartIcon, BeakerIcon, BookIcon, BookmarkBorderIcon, BookmarkFillIcon, Breadcrumb, BriefcaseFillIcon, BriefcaseIcon, Button, CalendarEventIcon, CalendarIcon, CaretDownSquareIcon, CaretUpSquareIcon, CheckCircleBorderIcon, CheckCircleFillIcon, CheckIcon, CheckLineIcon, Checkbox, ChecklistIcon, ChevronDoubleDownIcon, ChevronDoubleLeftIcon, ChevronDoubleRightIcon, ChevronDoubleUpIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleIcon, ClipboardIcon, Clock1Icon, ClockIcon, CloseIcon, CloudDownloadIcon, CloudIcon, CloudOffIcon, CloudUploadIcon, ClusterIcon, ClustersIcon, CodeIcon, Col, Collapse, CollapsePanel, CopyIcon, DIcon, DU_BOIS_ENABLE_ANIMATION_CLASSNAME, DangerModal, DashIcon, DashboardIcon, DataIcon, DatabaseIcon, DesignSystemContext, DesignSystemProvider, DownloadIcon, DragIcon, Dropdown, DropdownMenu, DuboisDatePicker, ErrorBorderIcon, ErrorFillIcon, ExpandLessIcon, ExpandMoreIcon, ExperimentIcon, FeatureStoreIcon, FileCodeIcon, FileDocumentIcon, FileIcon, FileImageIcon, FileModelIcon, FilterIcon, Folder1Icon, FolderIcon, 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, KeyboardIcon, LayerIcon, Layout, LegacyDatePicker, LifesaverIcon, LightningIcon, LinkIcon, LinkRemoveIcon, ListBorderIcon, ListIcon, LoadingIcon, LockBorderIcon, LockFillIcon, LockUnlockedIcon, MIcon, Menu, MinusBoxIcon, MinusCircleBorderIcon, MinusCircleFillIcon, Modal, ModelsIcon, NewWindowIcon, NoIcon, NotebookIcon, NotificationIcon, NotificationsIcon, OfficeIcon, OptGroup, Option, OverflowIcon, PageBottomIcon, PageFirstIcon, PageLastIcon, PageTopIcon, PageWrapper, Pagination, PencilIcon, PinBorderIcon, PinCancelIcon, PinFillIcon, PinXIcon, PlayCircleBorderIcon, PlayCircleFillIcon, PlayIcon, PlusCircleBorderIcon, PlusCircleFillIcon, PlusIcon, PlusSquareIcon, Popover, QueryEditorIcon, QueryIcon, QueryListViewIcon, QueryNavIcon, QuestionMarkBorderIcon, QuestionMarkFillIcon, ROW_GUTTER_SIZE, Radio, ReaderModeIcon, ReposIcon, Row, SchoolIcon, Search1Icon, SearchIcon, SecurityIcon, SegmentedControlButton, SegmentedControlGroup, Select, ShareIcon, SidebarAutoIcon, SidebarCollapseIcon, SidebarExpandIcon, SidebarIcon, Skeleton, Space, Spacer, SpeechBubbleIcon, SpeechBubblePlusIcon, Spinner, SplitButton, StarBorderIcon, StarFillIcon, StopCircleBorderIcon, StopCricleFillIcon, StopIcon, StreamIcon, Switch, SyncIcon, TabPane, Table, TableIcon, Tabs, Tag, Tooltip, TrashIcon, Tree, TreeIcon, Typography, UploadIcon, UsbIcon, UserBadgeIcon, UserCircleIcon, UserGroupIcon, UserIcon, VideosIcon, Visible, VisibleOff, WarningBorderIcon, WarningFillIcon, WithDesignSystemThemeHoc, 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, getTabEmotionStyles, useDesignSystemFlags, useDesignSystemTheme, useNotification, useThemedStyles, withNotifications };
|
|
58381
58413
|
//# sourceMappingURL=index.js.map
|