@databricks/design-system 2.0.5 → 2.0.7
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.
- package/AGENTS.md +239 -166
- package/CHANGELOG.md +47 -0
- package/design-guidance/docs/README.md +40 -0
- package/design-guidance/docs/review-contract.md +22 -0
- package/design-guidance/docs/tokens.md +35 -0
- package/design-guidance/docs/voice.md +40 -0
- package/design-guidance/skills/dbui-build-screen.md +24 -0
- package/design-guidance/skills/dbui-check-ecosystem.md +21 -0
- package/design-guidance/skills/dbui-check-guidelines.md +29 -0
- package/design-guidance/skills/dbui-check-principles.md +26 -0
- package/design-guidance/skills/dbui-check-voice.md +17 -0
- package/design-guidance/skills/dbui-pick-component.md +23 -0
- package/design-guidance/skills/dbui-pick-icon.md +23 -0
- package/design-guidance/skills/dbui-review.md +30 -0
- package/design-guidance/skills/dbui-validate.md +23 -0
- package/dist/{RHFControlledTypeaheadComboboxV2-DsH-nIEk.js → RHFControlledTypeaheadComboboxV2-nSSYj16I.js} +5 -5
- package/dist/{RHFControlledTypeaheadComboboxV2-DsH-nIEk.js.map → RHFControlledTypeaheadComboboxV2-nSSYj16I.js.map} +1 -1
- package/dist/{WizardStepContentWrapper-Bq1wm0V7.js → WizardStepContentWrapper-bbh_CoIf.js} +644 -679
- package/dist/WizardStepContentWrapper-bbh_CoIf.js.map +1 -0
- package/dist/dubois-colors.less +1 -1
- package/dist/icon-metadata.json +2069 -0
- package/dist/{index-BRAVZg-S.js → index-CUCuUviS.js} +350 -139
- package/dist/index-CUCuUviS.js.map +1 -0
- package/dist/index-dark.css +593 -191
- package/dist/index-dark.mitigated.css +623 -208
- package/dist/index.css +1536 -1049
- package/dist/index.js +4 -4
- package/dist/index.mitigated.css +1566 -1066
- package/dist/patterns.js +3 -3
- package/dist-types/design-system/Alert/Alert.d.ts +21 -4
- package/dist-types/design-system/Button/Button.d.ts +2 -1
- package/dist-types/design-system/Drawer/Drawer.d.ts +3 -1
- package/dist-types/design-system/Icon/AntdIcon.d.ts +3 -0
- package/dist-types/design-system/Icon/Icon.d.ts +20 -6
- package/dist-types/design-system/Icon/NativeIcon.d.ts +3 -0
- package/dist-types/design-system/Icon/__generated/icons/LakewatchIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/SlidesIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/index.d.ts +2 -0
- package/dist-types/design-system/Icon/index.d.ts +1 -0
- package/dist-types/design-system/Icon/utils.d.ts +1 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts +0 -2
- package/dist-types/design-system/_shared_/Tabs/styles.d.ts +2 -3
- package/dist-types/design-system/index.d.ts +0 -1
- package/dist-types/design-system/utils/safex.d.ts +4 -2
- package/dist-types/theme/generalVariables.d.ts +0 -1
- package/dist-types/~patterns/Wizard/WizardModal.d.ts +1 -1
- package/package.json +8 -5
- package/setup.mjs +586 -0
- package/dist/WizardStepContentWrapper-Bq1wm0V7.js.map +0 -1
- package/dist/index-BRAVZg-S.js.map +0 -1
- package/dist-types/design-system/LegacyTooltip/LegacyTooltip.d.ts +0 -47
- package/dist-types/design-system/LegacyTooltip/index.d.ts +0 -1
package/dist/patterns.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as DocumentationSidebar, F as FIXED_VERTICAL_STEPPER_WIDTH, M as MAX_VERTICAL_WIZARD_CONTENT_WIDTH, W as Wizard, a as WizardControlled, b as WizardModal, c as WizardStepContentWrapper, d as WizardStepNavigationProvider, u as useWizardCurrentStep, e as useWizardStepNavigation } from './WizardStepContentWrapper-
|
|
1
|
+
export { D as DocumentationSidebar, F as FIXED_VERTICAL_STEPPER_WIDTH, M as MAX_VERTICAL_WIZARD_CONTENT_WIDTH, W as Wizard, a as WizardControlled, b as WizardModal, c as WizardStepContentWrapper, d as WizardStepNavigationProvider, u as useWizardCurrentStep, e as useWizardStepNavigation } from './WizardStepContentWrapper-bbh_CoIf.js';
|
|
2
2
|
import '@emotion/react/jsx-runtime';
|
|
3
3
|
import 'lodash/isUndefined';
|
|
4
4
|
import 'react';
|
|
@@ -16,6 +16,8 @@ import '@floating-ui/dom';
|
|
|
16
16
|
import 'react-dom';
|
|
17
17
|
import '@radix-ui/react-hover-card';
|
|
18
18
|
import '@radix-ui/react-toast';
|
|
19
|
+
import '@radix-ui/react-slider';
|
|
20
|
+
import '@radix-ui/react-toolbar';
|
|
19
21
|
import '@react-aria/combobox';
|
|
20
22
|
import '@react-aria/listbox';
|
|
21
23
|
import '@react-aria/overlays';
|
|
@@ -52,10 +54,8 @@ import '@radix-ui/react-navigation-menu';
|
|
|
52
54
|
import '@radix-ui/react-radio-group';
|
|
53
55
|
import '@radix-ui/react-progress';
|
|
54
56
|
import 'react-resizable';
|
|
55
|
-
import '@radix-ui/react-slider';
|
|
56
57
|
import '@radix-ui/react-scroll-area';
|
|
57
58
|
import '@radix-ui/react-tabs';
|
|
58
59
|
import 'lodash/debounce';
|
|
59
60
|
import '@radix-ui/react-toggle';
|
|
60
|
-
import '@radix-ui/react-toolbar';
|
|
61
61
|
//# sourceMappingURL=patterns.js.map
|
|
@@ -1,10 +1,27 @@
|
|
|
1
|
-
import type { AlertProps as AntDAlertProps } from "antd";
|
|
2
1
|
import type { ButtonProps } from "../Button";
|
|
3
2
|
import { DesignSystemEventProviderAnalyticsEventTypes } from "../DesignSystemEventProvider";
|
|
4
3
|
import type { AnalyticsEventProps, DangerouslySetAntdProps, HTMLDataAttributes } from "../types";
|
|
5
|
-
export type AlertType =
|
|
6
|
-
export interface AlertProps extends
|
|
4
|
+
export type AlertType = "success" | "info" | "warning" | "error";
|
|
5
|
+
export interface AlertProps extends HTMLDataAttributes, DangerouslySetAntdProps<{
|
|
6
|
+
showIcon?: boolean;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
message?: React.ReactNode;
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
type?: AlertType;
|
|
11
|
+
}>, AnalyticsEventProps<DesignSystemEventProviderAnalyticsEventTypes.OnView> {
|
|
7
12
|
type: AlertType;
|
|
13
|
+
message: React.ReactNode;
|
|
14
|
+
description?: React.ReactNode;
|
|
15
|
+
closable?: boolean;
|
|
16
|
+
onClose?: React.MouseEventHandler<HTMLButtonElement>;
|
|
17
|
+
afterClose?: () => void;
|
|
18
|
+
role?: string;
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
className?: string;
|
|
21
|
+
prefixCls?: string;
|
|
22
|
+
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
|
23
|
+
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
|
24
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
8
25
|
closeIconLabel?: string;
|
|
9
26
|
/**
|
|
10
27
|
* @deprecated Use CEP-governed banners instead. go/banner/create go/getabanner go/banner
|
|
@@ -13,7 +30,7 @@ export interface AlertProps extends Omit<AntDAlertProps, "closeText" | "showIcon
|
|
|
13
30
|
/**
|
|
14
31
|
* @deprecated Please use `actions` instead.
|
|
15
32
|
*/
|
|
16
|
-
action?:
|
|
33
|
+
action?: React.ReactNode;
|
|
17
34
|
/** Array of button props to render as footer actions. All buttons will be rendered as small size. */
|
|
18
35
|
actions?: Omit<ButtonProps, "size" | "type">[];
|
|
19
36
|
/** Force actions to be rendered beneath the description. */
|
|
@@ -5,6 +5,7 @@ import type { WithLoadingState } from "../LoadingState/LoadingState";
|
|
|
5
5
|
import type { AnalyticsEventPropsWithStartInteraction, HTMLDataAttributes } from "../types";
|
|
6
6
|
export { SMALL_BUTTON_HEIGHT, getButtonEmotionStyles, getMemoizedButtonEmotionStyles } from "./AntDButtonInternal";
|
|
7
7
|
export type ButtonSize = "middle" | "small";
|
|
8
|
+
export type ButtonForceMode = "native" | "legacy-antd" | "flag";
|
|
8
9
|
export interface ButtonProps extends Omit<AntDButtonProps, "type" | "ghost" | "shape" | "size">, HTMLDataAttributes, Omit<WithLoadingState, "loading">, AnalyticsEventPropsWithStartInteraction<DesignSystemEventProviderAnalyticsEventTypes.OnClick | DesignSystemEventProviderAnalyticsEventTypes.OnView> {
|
|
9
10
|
type?: "primary" | "link" | "tertiary";
|
|
10
11
|
size?: ButtonSize;
|
|
@@ -12,6 +13,6 @@ export interface ButtonProps extends Omit<AntDButtonProps, "type" | "ghost" | "s
|
|
|
12
13
|
dangerouslySetForceIconStyles?: boolean;
|
|
13
14
|
dangerouslyUseFocusPseudoClass?: boolean;
|
|
14
15
|
dangerouslyAppendWrapperCss?: React.CSSProperties;
|
|
15
|
-
|
|
16
|
+
forceMode?: ButtonForceMode;
|
|
16
17
|
}
|
|
17
18
|
export declare const Button: ForwardRefExoticComponent<PropsWithoutRef<ButtonProps> & RefAttributes<HTMLButtonElement>>;
|
|
@@ -84,7 +84,9 @@ export interface DrawerContentProps extends AnalyticsEventProps<DesignSystemEven
|
|
|
84
84
|
* Applies emotion styles to the top-level element in the component.
|
|
85
85
|
*/
|
|
86
86
|
css?: Interpolation<EmotionTheme>;
|
|
87
|
+
/** Applies a class name to the top-level element in the component. */
|
|
88
|
+
className?: string;
|
|
87
89
|
}
|
|
88
|
-
export declare const Content: ({ children, footer, title, width, height, position: positionOverride, useCustomScrollBehavior, expandContentToFullHeight, disableOpenAutoFocus, onInteractOutside, seeThrough, hideClose, closeOnClickOutside, onCloseClick, componentId, analyticsEvents, size, ...props }: DrawerContentProps) => JSX.Element;
|
|
90
|
+
export declare const Content: ({ children, footer, title, width, height, position: positionOverride, useCustomScrollBehavior, expandContentToFullHeight, disableOpenAutoFocus, onInteractOutside, seeThrough, hideClose, closeOnClickOutside, onCloseClick, componentId, analyticsEvents, size, className, ...props }: DrawerContentProps) => JSX.Element;
|
|
89
91
|
export declare function Root(props: Pick<DialogPrimitive.DialogProps, "onOpenChange" | "children" | "open" | "modal">): JSX.Element;
|
|
90
92
|
export declare function Trigger(props: Omit<DialogPrimitive.DialogTriggerProps, "asChild">): JSX.Element;
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ForwardRefExoticComponent, PropsWithoutRef, ReactElement, RefAttributes } from "react";
|
|
1
|
+
import type { ComponentType, CSSProperties, ForwardRefExoticComponent, HTMLProps, PropsWithoutRef, ReactElement, RefAttributes, SVGProps } from "react";
|
|
3
2
|
import React from "react";
|
|
4
3
|
import type { HTMLDataAttributes } from "../types";
|
|
5
|
-
|
|
4
|
+
export { getIconClassName } from "./utils";
|
|
6
5
|
export type IconColors = "danger" | "warning" | "success" | "ai";
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
interface CustomIconComponentProps {
|
|
7
|
+
width: string | number;
|
|
8
|
+
height: string | number;
|
|
9
|
+
fill: string;
|
|
10
|
+
viewBox?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
interface IconCompatibilityProps extends Omit<HTMLProps<HTMLSpanElement>, "onPointerEnterCapture" | "onPointerLeaveCapture"> {
|
|
15
|
+
spin?: boolean;
|
|
16
|
+
rotate?: number;
|
|
17
|
+
viewBox?: string;
|
|
18
|
+
component?: ComponentType<CustomIconComponentProps | SVGProps<SVGSVGElement>> | ForwardRefExoticComponent<CustomIconComponentProps>;
|
|
19
|
+
ariaLabel?: React.AriaAttributes["aria-label"];
|
|
20
|
+
}
|
|
21
|
+
export interface IconProps extends Omit<IconCompatibilityProps, "component">, HTMLDataAttributes, React.HTMLAttributes<HTMLSpanElement> {
|
|
22
|
+
component?: (props: SVGProps<SVGSVGElement>) => ReactElement | null;
|
|
9
23
|
color?: IconColors;
|
|
24
|
+
forceNativeIcon?: boolean;
|
|
10
25
|
}
|
|
11
26
|
export declare const Icon: ForwardRefExoticComponent<PropsWithoutRef<IconProps> & RefAttributes<HTMLSpanElement>>;
|
|
12
|
-
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
|
|
2
|
+
import type { IconProps } from "../../Icon";
|
|
3
|
+
declare const LakewatchIcon: ForwardRefExoticComponent<PropsWithoutRef<IconProps> & RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default LakewatchIcon;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
|
|
2
|
+
import type { IconProps } from "../../Icon";
|
|
3
|
+
declare const SlidesIcon: ForwardRefExoticComponent<PropsWithoutRef<IconProps> & RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default SlidesIcon;
|
|
@@ -245,6 +245,7 @@ export { default as LakeflowDesignerIcon } from "./LakeflowDesignerIcon";
|
|
|
245
245
|
export { default as LakewatchAlertIcon } from "./LakewatchAlertIcon";
|
|
246
246
|
export { default as LakewatchDatasourceIcon } from "./LakewatchDatasourceIcon";
|
|
247
247
|
export { default as LakewatchDetectionRuleIcon } from "./LakewatchDetectionRuleIcon";
|
|
248
|
+
export { default as LakewatchIcon } from "./LakewatchIcon";
|
|
248
249
|
export { default as LakewatchParserIcon } from "./LakewatchParserIcon";
|
|
249
250
|
export { default as LayerGraphIcon } from "./LayerGraphIcon";
|
|
250
251
|
export { default as LayerIcon } from "./LayerIcon";
|
|
@@ -384,6 +385,7 @@ export { default as SidebarOpenIcon } from "./SidebarOpenIcon";
|
|
|
384
385
|
export { default as SidebarSyncIcon } from "./SidebarSyncIcon";
|
|
385
386
|
export { default as SlashSquareIcon } from "./SlashSquareIcon";
|
|
386
387
|
export { default as SlidersIcon } from "./SlidersIcon";
|
|
388
|
+
export { default as SlidesIcon } from "./SlidesIcon";
|
|
387
389
|
export { default as SnippetIcon } from "./SnippetIcon";
|
|
388
390
|
export { default as SortAscendingIcon } from "./SortAscendingIcon";
|
|
389
391
|
export { default as SortCustomHorizontalIcon } from "./SortCustomHorizontalIcon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getIconClassName(): string;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { UseComboboxGetToggleButtonPropsOptions } from "downshift";
|
|
2
2
|
import { type DownshiftToggleButtonProps } from "./TypeaheadComboboxToggleButton";
|
|
3
3
|
import type { ButtonSize } from "../Button";
|
|
4
|
-
/** Height of the non-inline controls block, for callers that position it themselves. */
|
|
5
|
-
export declare const TYPEAHEAD_COMBOBOX_CONTROLS_HEIGHT = 16;
|
|
6
4
|
export interface TypeaheadComboboxControlsProps {
|
|
7
5
|
getDownshiftToggleButtonProps: (options?: UseComboboxGetToggleButtonPropsOptions) => DownshiftToggleButtonProps;
|
|
8
6
|
showClearSelectionButton?: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { CSSObject } from "@emotion/react";
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const getCommonTabsTriggerStyles: (theme: Theme) => CSSObject;
|
|
2
|
+
export declare const COMMON_TABS_LIST_STYLES: CSSObject;
|
|
3
|
+
export declare const COMMON_TABS_TRIGGER_STYLES: CSSObject;
|
|
@@ -35,7 +35,6 @@ export * from "./LegacyPopover";
|
|
|
35
35
|
export * from "./LegacySelect";
|
|
36
36
|
export * from "./LegacySkeleton";
|
|
37
37
|
export * from "./LegacyTable";
|
|
38
|
-
export * from "./LegacyTooltip";
|
|
39
38
|
export * from "./Listbox";
|
|
40
39
|
export * from "./LoadingState";
|
|
41
40
|
export * from "./Menu";
|
|
@@ -9,9 +9,10 @@ export type SAFEXValueType = boolean | number;
|
|
|
9
9
|
*
|
|
10
10
|
* @param flag The name of the flag to check
|
|
11
11
|
* @param defaultValue The default value to return if the flag is not set
|
|
12
|
+
* @param testDefault The default to use in Jest or UiTestServer tests
|
|
12
13
|
* @returns
|
|
13
14
|
*/
|
|
14
|
-
export declare const safex: <T extends SAFEXValueType>(flag: string, defaultValue: T) => T;
|
|
15
|
+
export declare const safex: <T extends SAFEXValueType>(flag: string, defaultValue: T, testDefault?: T) => T;
|
|
15
16
|
/**
|
|
16
17
|
* Reads a server-side feature flag value. Delegates to `window.__debug__serverSideSafe`
|
|
17
18
|
* which is set by `@databricks/web-shared` and includes full flag resolution with
|
|
@@ -21,6 +22,7 @@ export declare const safex: <T extends SAFEXValueType>(flag: string, defaultValu
|
|
|
21
22
|
*
|
|
22
23
|
* @param flag The name of the flag to check
|
|
23
24
|
* @param defaultValue The default value to return if the flag is not set
|
|
25
|
+
* @param testDefault The default to use in Jest or UiTestServer tests
|
|
24
26
|
* @returns
|
|
25
27
|
*/
|
|
26
|
-
export declare const serverSideSafe: <T extends SAFEXValueType>(flag: string, defaultValue: T) => T;
|
|
28
|
+
export declare const serverSideSafe: <T extends SAFEXValueType>(flag: string, defaultValue: T, testDefault?: T) => T;
|
|
@@ -3,4 +3,4 @@ import { type ModalProps } from "../../design-system";
|
|
|
3
3
|
export interface WizardModalProps extends Omit<ModalProps, "footer" | "onCancel" | "onOk">, Omit<WizardProps, "width" | "layout" | "title"> {
|
|
4
4
|
onModalClose: () => void;
|
|
5
5
|
}
|
|
6
|
-
export declare function WizardModal({ onStepChanged, onCancel, initialStep, steps, onModalClose, localizeStepNumber, cancelButtonContent, nextButtonContent, previousButtonContent, doneButtonContent, enableClickingToSteps, ...modalProps }: WizardModalProps): JSX.Element | null;
|
|
6
|
+
export declare function WizardModal({ onStepChanged, onValidateStepChange, onCancel, initialStep, steps, onModalClose, localizeStepNumber, cancelButtonContent, nextButtonContent, previousButtonContent, doneButtonContent, enableClickingToSteps, ...modalProps }: WizardModalProps): JSX.Element | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databricks/design-system",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "DuBois Design System",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "ISC",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"types": "dist-types/index.d.ts",
|
|
17
17
|
"exports": {
|
|
18
18
|
"./package.json": "./package.json",
|
|
19
|
+
"./icon-metadata.json": "./dist/icon-metadata.json",
|
|
19
20
|
".": {
|
|
20
21
|
"types": "./dist-types/index.d.ts",
|
|
21
22
|
"import": "./dist/index.js",
|
|
@@ -54,9 +55,11 @@
|
|
|
54
55
|
"files": [
|
|
55
56
|
"/AGENTS.md",
|
|
56
57
|
"/CHANGELOG.md",
|
|
58
|
+
"/setup.mjs",
|
|
57
59
|
"dist",
|
|
58
60
|
"dist-types",
|
|
59
|
-
"test-utils"
|
|
61
|
+
"test-utils",
|
|
62
|
+
"/design-guidance"
|
|
60
63
|
],
|
|
61
64
|
"scripts": {
|
|
62
65
|
"prepublish": "./scripts/prepublish",
|
|
@@ -104,7 +107,7 @@
|
|
|
104
107
|
"@figma/code-connect": "^2.0.0",
|
|
105
108
|
"@jest/globals": "^30.0.2",
|
|
106
109
|
"@svgr/cli": "^8.1.0",
|
|
107
|
-
"@swc/core": "^1.
|
|
110
|
+
"@swc/core": "^1.16.2",
|
|
108
111
|
"@swc/register": "^0.1.10",
|
|
109
112
|
"@tanstack/react-table": "8.21.2",
|
|
110
113
|
"@testing-library/jest-dom": "^6.4.2",
|
|
@@ -140,7 +143,6 @@
|
|
|
140
143
|
},
|
|
141
144
|
"dependencies": {
|
|
142
145
|
"@ant-design/icons": "^4.7.0",
|
|
143
|
-
"@databricks/testing-library": "1.0.0",
|
|
144
146
|
"@emotion/unitless": "^0.8.1",
|
|
145
147
|
"@floating-ui/dom": "^1.6.12",
|
|
146
148
|
"@floating-ui/react": "^0.26.25",
|
|
@@ -184,5 +186,6 @@
|
|
|
184
186
|
"react-resizable": "^3.0.4",
|
|
185
187
|
"tabbable": "^6.4.0",
|
|
186
188
|
"tslib": "^2.8.1"
|
|
187
|
-
}
|
|
189
|
+
},
|
|
190
|
+
"bin": "./setup.mjs"
|
|
188
191
|
}
|