@databricks/design-system 2.0.4 → 2.0.6
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/CHANGELOG.md +43 -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-Ct9x3rC1.js +172 -0
- package/dist/RHFControlledTypeaheadComboboxV2-Ct9x3rC1.js.map +1 -0
- package/dist/{WizardStepContentWrapper-8bs2FwRi.js → WizardStepContentWrapper-6YTjeEaA.js} +1017 -840
- package/dist/WizardStepContentWrapper-6YTjeEaA.js.map +1 -0
- package/dist/icon-metadata.json +2064 -0
- package/dist/index-DiRpSwH2.js +8509 -0
- package/dist/index-DiRpSwH2.js.map +1 -0
- package/dist/index-dark.css +648 -113
- package/dist/index-dark.mitigated.css +648 -113
- package/dist/index.css +1045 -145
- package/dist/index.js +27 -8148
- package/dist/index.js.map +1 -1
- package/dist/index.mitigated.css +1046 -146
- package/dist/patterns.js +3 -3
- package/dist-types/design-system/Breadcrumb/Breadcrumb.d.ts +10 -3
- package/dist-types/design-system/Button/AntDButtonInternal.d.ts +21 -0
- package/dist-types/design-system/Button/Button.d.ts +3 -19
- package/dist-types/design-system/Button/NativeButton.d.ts +3 -0
- package/dist-types/design-system/Button/getBtnClassName.d.ts +17 -0
- package/dist-types/design-system/Button/index.d.ts +1 -0
- package/dist-types/design-system/DesignSystemProvider/DesignTokenScopeWithEmotionTheme.d.ts +4 -4
- package/dist-types/design-system/Drawer/Drawer.d.ts +3 -1
- package/dist-types/design-system/FormV2/RHFAdapters.d.ts +8 -0
- package/dist-types/design-system/FormV2/RHFControlledTypeaheadComboboxV2.d.ts +58 -0
- package/dist-types/design-system/Icon/AntdIcon.d.ts +3 -0
- package/dist-types/design-system/Icon/Icon.d.ts +21 -7
- package/dist-types/design-system/Icon/NativeIcon.d.ts +3 -0
- package/dist-types/design-system/Icon/__generated/icons/ColorMappingEditIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/ColorMappingIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/LakewatchIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/MicrophoneIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/MicrophoneOffIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/OperatorIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/VoiceModeIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/index.d.ts +7 -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/Overflow/Overflow.d.ts +3 -1
- package/dist-types/design-system/Overflow/OverflowPopover.d.ts +2 -1
- package/dist-types/design-system/TypeaheadComboboxV2/TypeaheadComboboxMenu.d.ts +2 -0
- package/dist-types/design-system/_shared_/Tabs/styles.d.ts +2 -3
- package/dist-types/design-system/shape-tokens.d.ts +1 -1
- package/dist-types/test-utils/rtl/buttonVariants.d.ts +4 -4
- package/dist-types/~patterns/Wizard/WizardModal.d.ts +1 -1
- package/dist-types/~patterns/Wizard/WizardStepNavigation.d.ts +9 -0
- package/dist-types/~patterns/Wizard/index.d.ts +1 -0
- package/package.json +9 -5
- package/dist/WizardStepContentWrapper-8bs2FwRi.js.map +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, u as useWizardCurrentStep } 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-6YTjeEaA.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,17 @@
|
|
|
1
|
-
import type { BreadcrumbProps as AntDBreadcrumbPropsRaw } from "antd";
|
|
2
1
|
import { Breadcrumb as AntDBreadcrumbRaw } from "antd";
|
|
3
2
|
import type React from "react";
|
|
4
|
-
import type {
|
|
5
|
-
|
|
3
|
+
import type { HTMLDataAttributes, WithChildrenProps } from "../types";
|
|
4
|
+
interface BreadcrumbDangerouslySetAntdProps {
|
|
5
|
+
/** Custom separator between crumbs. Defaults to a chevron. */
|
|
6
|
+
separator?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface BreadcrumbProps extends HTMLDataAttributes {
|
|
9
|
+
/** Custom className applied to the breadcrumb root */
|
|
10
|
+
className?: string;
|
|
6
11
|
/** Include trailing caret */
|
|
7
12
|
includeTrailingCaret?: boolean;
|
|
13
|
+
/** Escape hatch to allow passing props directly to the underlying Ant `Breadcrumb` component. Only known-used props are allowed. */
|
|
14
|
+
dangerouslySetAntdProps?: BreadcrumbDangerouslySetAntdProps;
|
|
8
15
|
/** The breadcrumb items */
|
|
9
16
|
children?: React.ReactNode;
|
|
10
17
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SerializedStyles } from "@emotion/react";
|
|
2
|
+
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
|
|
3
|
+
import type { ButtonProps, ButtonSize } from "./Button";
|
|
4
|
+
import type { ComponentTheme } from "../../theme";
|
|
5
|
+
export declare const SMALL_BUTTON_HEIGHT = 24;
|
|
6
|
+
export declare const getMemoizedButtonEmotionStyles: (props: Parameters<typeof getButtonEmotionStyles>[0]) => SerializedStyles;
|
|
7
|
+
export declare const getButtonEmotionStyles: ({ theme, classNamePrefix, loading, withIcon, onlyIcon, isAnchor, enableAnimation, size, type, useFocusPseudoClass, forceIconStyles, danger }: {
|
|
8
|
+
theme: ComponentTheme;
|
|
9
|
+
classNamePrefix: string;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
withIcon?: boolean;
|
|
12
|
+
onlyIcon?: boolean;
|
|
13
|
+
isAnchor?: boolean;
|
|
14
|
+
danger?: boolean;
|
|
15
|
+
enableAnimation: boolean;
|
|
16
|
+
size: ButtonSize;
|
|
17
|
+
type?: ButtonProps["type"];
|
|
18
|
+
useFocusPseudoClass?: boolean;
|
|
19
|
+
forceIconStyles?: boolean;
|
|
20
|
+
}) => SerializedStyles;
|
|
21
|
+
export declare const AntDButtonInternal: ForwardRefExoticComponent<PropsWithoutRef<ButtonProps> & RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
import type { SerializedStyles } from "@emotion/react";
|
|
2
1
|
import type { ButtonProps as AntDButtonProps } from "antd";
|
|
3
2
|
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
|
|
4
|
-
import type {
|
|
5
|
-
import { DesignSystemEventProviderAnalyticsEventTypes } from "../DesignSystemEventProvider";
|
|
3
|
+
import type { DesignSystemEventProviderAnalyticsEventTypes } from "../DesignSystemEventProvider";
|
|
6
4
|
import type { WithLoadingState } from "../LoadingState/LoadingState";
|
|
7
5
|
import type { AnalyticsEventPropsWithStartInteraction, HTMLDataAttributes } from "../types";
|
|
8
|
-
export
|
|
9
|
-
export declare const getMemoizedButtonEmotionStyles: (props: Parameters<typeof getButtonEmotionStyles>[0]) => SerializedStyles;
|
|
10
|
-
export declare const getButtonEmotionStyles: ({ theme, classNamePrefix, loading, withIcon, onlyIcon, isAnchor, enableAnimation, size, type, useFocusPseudoClass, forceIconStyles, danger }: {
|
|
11
|
-
theme: ComponentTheme;
|
|
12
|
-
classNamePrefix: string;
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
withIcon?: boolean;
|
|
15
|
-
onlyIcon?: boolean;
|
|
16
|
-
isAnchor?: boolean;
|
|
17
|
-
danger?: boolean;
|
|
18
|
-
enableAnimation: boolean;
|
|
19
|
-
size: ButtonSize;
|
|
20
|
-
type?: ButtonProps["type"];
|
|
21
|
-
useFocusPseudoClass?: boolean;
|
|
22
|
-
forceIconStyles?: boolean;
|
|
23
|
-
}) => SerializedStyles;
|
|
6
|
+
export { SMALL_BUTTON_HEIGHT, getButtonEmotionStyles, getMemoizedButtonEmotionStyles } from "./AntDButtonInternal";
|
|
24
7
|
export type ButtonSize = "middle" | "small";
|
|
25
8
|
export interface ButtonProps extends Omit<AntDButtonProps, "type" | "ghost" | "shape" | "size">, HTMLDataAttributes, Omit<WithLoadingState, "loading">, AnalyticsEventPropsWithStartInteraction<DesignSystemEventProviderAnalyticsEventTypes.OnClick | DesignSystemEventProviderAnalyticsEventTypes.OnView> {
|
|
26
9
|
type?: "primary" | "link" | "tertiary";
|
|
@@ -29,5 +12,6 @@ export interface ButtonProps extends Omit<AntDButtonProps, "type" | "ghost" | "s
|
|
|
29
12
|
dangerouslySetForceIconStyles?: boolean;
|
|
30
13
|
dangerouslyUseFocusPseudoClass?: boolean;
|
|
31
14
|
dangerouslyAppendWrapperCss?: React.CSSProperties;
|
|
15
|
+
useNativeButtonOverride?: boolean;
|
|
32
16
|
}
|
|
33
17
|
export declare const Button: ForwardRefExoticComponent<PropsWithoutRef<ButtonProps> & RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
|
|
2
|
+
import type { ButtonProps } from "./Button";
|
|
3
|
+
export declare const NativeButton: ForwardRefExoticComponent<PropsWithoutRef<ButtonProps> & RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Emotion selector that matches a Du Bois button by BOTH its legacy AntD-prefixed class
|
|
3
|
+
* (`.<clsNamePrefix>-btn…`) and the NativeButton class (`.db-btn…`). Style overrides keyed off the
|
|
4
|
+
* button class must match `.db-btn` too, so they survive the migration off the AntD-prefixed
|
|
5
|
+
* `Button` onto `NativeButton`.
|
|
6
|
+
*
|
|
7
|
+
* @param clsNamePrefix theme class prefix, e.g. `classNamePrefix` from `useDesignSystemTheme()`.
|
|
8
|
+
* @param suffix raw selector fragment appended after `-btn` on each class — e.g. `'-primary'`,
|
|
9
|
+
* `'-icon-only'`, `':first-child'`, `'[disabled]'`, `' > span'`, or `''` for none. Include the
|
|
10
|
+
* leading `-` yourself.
|
|
11
|
+
* @param prefix combinator/anchor prepended before each class — pass it explicitly so the call reads
|
|
12
|
+
* at a glance: `'&'` for a self-target selector (`&.…-btn`, when the `css` sits on the Button
|
|
13
|
+
* element itself), `''` for a bare descendant (`.…-btn`), `'& > '` for a direct child, `'& '` for
|
|
14
|
+
* any descendant, or a fuller container prefix (e.g. `` `.${prefix}-dropdown-button > ` ``) when the
|
|
15
|
+
* button is nested deeper.
|
|
16
|
+
*/
|
|
17
|
+
export declare const getBtnClassName: (clsNamePrefix: string, suffix: string, prefix: string) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type PropsWithChildren } from "react";
|
|
2
2
|
import type { Theme } from "../../theme";
|
|
3
3
|
export interface DesignTokenScopeWithEmotionThemeProps {
|
|
4
4
|
theme: Theme;
|
|
@@ -8,9 +8,9 @@ export interface DesignTokenScopeWithEmotionThemeProps {
|
|
|
8
8
|
* a full emotion `Theme` on top of `DesignTokenScope` so the override stays consistent across both
|
|
9
9
|
* delivery paths that would otherwise diverge:
|
|
10
10
|
* 1. Emotion JS theme — what legacy AntD-path components read; crosses React portals via context.
|
|
11
|
-
* 2. Design tokens (in-tree + portaled) — `DesignTokenScope` stamps the
|
|
12
|
-
* `--db-color-*` variables
|
|
13
|
-
* and portaled native (token-based) components inherit them.
|
|
11
|
+
* 2. Design tokens (in-tree + portaled) — `DesignTokenScope` stamps the colors that differ from the
|
|
12
|
+
* ambient theme as native `--db-color-*` variables and feeds `DesignSystemThemeContext`, so both
|
|
13
|
+
* in-tree and portaled native (token-based) components inherit them.
|
|
14
14
|
*
|
|
15
15
|
* A bare emotion `ThemeProvider` only drives path 1, so an overridden theme's colors would land on
|
|
16
16
|
* AntD components but leave native ones on the ambient scope's standard tokens. Once everything is on
|
|
@@ -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;
|
|
@@ -3,6 +3,7 @@ import type { UseComboboxReturnValue } from "downshift";
|
|
|
3
3
|
import type { HTMLAttributes } from "react";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import type { Control, FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
|
|
6
|
+
import type { RHFControlledMultiSelectTypeaheadComboboxV2Props, RHFControlledTypeaheadComboboxV2Props } from "./RHFControlledTypeaheadComboboxV2";
|
|
6
7
|
import type { CheckboxProps } from "../Checkbox";
|
|
7
8
|
import type { DesignSystemEventProviderAnalyticsEventTypes } from "../DesignSystemEventProvider";
|
|
8
9
|
import type { ConditionalOptionalLabel, DialogComboboxContentProps, DialogComboboxOptionListProps, DialogComboboxProps, DialogComboboxTriggerProps } from "../DialogCombobox";
|
|
@@ -146,6 +147,11 @@ interface RHFControlledMultiSelectTypeaheadComboboxProps<
|
|
|
146
147
|
onInputChange?: (inputValue: string) => void;
|
|
147
148
|
}
|
|
148
149
|
declare function RHFControlledMultiSelectTypeaheadCombobox<TFieldValues extends FieldValues>({ name, control, rules, allItems, itemToString, matcher, children, validationState, inputProps, menuProps, onInputChange, componentId, analyticsEvents, valueHasNoPii, ...props }: RHFControlledMultiSelectTypeaheadComboboxProps<TFieldValues> & Omit<HTMLAttributes<HTMLDivElement>, "children">): JSX.Element;
|
|
150
|
+
declare function RHFControlledTypeaheadComboboxV2<
|
|
151
|
+
TFieldValues extends FieldValues,
|
|
152
|
+
TName extends FieldPath<TFieldValues>
|
|
153
|
+
>(props: RHFControlledTypeaheadComboboxV2Props<TFieldValues, TName> & Omit<HTMLAttributes<HTMLDivElement>, "children">): JSX.Element;
|
|
154
|
+
declare function RHFControlledMultiSelectTypeaheadComboboxV2<TFieldValues extends FieldValues>(props: RHFControlledMultiSelectTypeaheadComboboxV2Props<TFieldValues> & Omit<HTMLAttributes<HTMLDivElement>, "children">): JSX.Element;
|
|
149
155
|
interface RHFControlledCheckboxGroupProps<
|
|
150
156
|
TFieldValues extends FieldValues = FieldValues,
|
|
151
157
|
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
|
@@ -198,6 +204,8 @@ export declare const RHFControlledComponents: {
|
|
|
198
204
|
RadioGroup: typeof RHFControlledRadioGroup;
|
|
199
205
|
TypeaheadCombobox: typeof RHFControlledTypeaheadCombobox;
|
|
200
206
|
MultiSelectTypeaheadCombobox: typeof RHFControlledMultiSelectTypeaheadCombobox;
|
|
207
|
+
TypeaheadComboboxV2: typeof RHFControlledTypeaheadComboboxV2;
|
|
208
|
+
MultiSelectTypeaheadComboboxV2: typeof RHFControlledMultiSelectTypeaheadComboboxV2;
|
|
201
209
|
Switch: typeof RHFControlledSwitch;
|
|
202
210
|
};
|
|
203
211
|
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Key } from "@react-types/shared";
|
|
2
|
+
import type { HTMLAttributes } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import type { Control, FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
|
|
5
|
+
import type { DesignSystemEventProviderAnalyticsEventTypes } from "../DesignSystemEventProvider";
|
|
6
|
+
import type { TypeaheadComboboxInputProps as TypeaheadComboboxV2InputProps } from "../TypeaheadComboboxV2/TypeaheadComboboxInput";
|
|
7
|
+
import type { TypeaheadComboboxMenuProps as TypeaheadComboboxV2MenuProps } from "../TypeaheadComboboxV2/TypeaheadComboboxMenu";
|
|
8
|
+
import type { TypeaheadComboboxMultiSelectInputProps as TypeaheadComboboxV2MultiSelectInputProps } from "../TypeaheadComboboxV2/TypeaheadComboboxMultiSelectInput";
|
|
9
|
+
import type { TypeaheadComboboxRootProps as TypeaheadComboboxV2RootProps } from "../TypeaheadComboboxV2/TypeaheadComboboxRoot";
|
|
10
|
+
import type { ComboboxStateValue } from "../TypeaheadComboboxV2/hooks/useComboboxState";
|
|
11
|
+
import type { AnalyticsEventValueChangeNoPiiFlagProps, ValidationState } from "../types";
|
|
12
|
+
type OmittedOriginalProps = "name" | "onChange" | "onBlur" | "value" | "defaultValue" | "checked";
|
|
13
|
+
export interface RHFControlledTypeaheadComboboxV2Props<
|
|
14
|
+
TFieldValues extends FieldValues = FieldValues,
|
|
15
|
+
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
|
16
|
+
> extends Omit<TypeaheadComboboxV2RootProps<TFieldValues[TName]>, OmittedOriginalProps | "comboboxState" | "componentId" | "children">, UseControllerProps<TFieldValues, TName>, AnalyticsEventValueChangeNoPiiFlagProps<DesignSystemEventProviderAnalyticsEventTypes.OnValueChange> {
|
|
17
|
+
control: Control<TFieldValues, any>;
|
|
18
|
+
name: TName;
|
|
19
|
+
children: (renderProps: {
|
|
20
|
+
comboboxState: ComboboxStateValue<Required<TFieldValues>[TName]>;
|
|
21
|
+
}) => React.ReactNode;
|
|
22
|
+
validationState?: ValidationState;
|
|
23
|
+
allItems: Required<TFieldValues>[TName][];
|
|
24
|
+
itemToString: (item: Required<TFieldValues>[TName]) => string;
|
|
25
|
+
matcher?: (item: Required<TFieldValues>[TName], query: string) => boolean;
|
|
26
|
+
getKey?: (item: Required<TFieldValues>[TName]) => Key;
|
|
27
|
+
allowNewValue?: boolean;
|
|
28
|
+
inputProps?: Partial<Omit<TypeaheadComboboxV2InputProps, "componentId">>;
|
|
29
|
+
menuProps?: Partial<TypeaheadComboboxV2MenuProps>;
|
|
30
|
+
onInputChange?: (inputValue: string) => void;
|
|
31
|
+
/** @deprecated No-op under react-aria; accepted for source-compat while migrating off the legacy adapter. */
|
|
32
|
+
preventUnsetOnBlur?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare function RHFControlledTypeaheadComboboxV2<
|
|
35
|
+
TFieldValues extends FieldValues,
|
|
36
|
+
TName extends FieldPath<TFieldValues>
|
|
37
|
+
>({ name, control, rules, allItems, itemToString, matcher, getKey, allowNewValue, children, validationState, inputProps, menuProps, onInputChange, componentId, analyticsEvents, valueHasNoPii, preventUnsetOnBlur, ...props }: RHFControlledTypeaheadComboboxV2Props<TFieldValues, TName> & Omit<HTMLAttributes<HTMLDivElement>, "children">): JSX.Element;
|
|
38
|
+
export interface RHFControlledMultiSelectTypeaheadComboboxV2Props<
|
|
39
|
+
TFieldValues extends FieldValues = FieldValues,
|
|
40
|
+
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
|
41
|
+
> extends Omit<TypeaheadComboboxV2RootProps<TFieldValues>, OmittedOriginalProps | "comboboxState" | "componentId" | "children">, UseControllerProps<TFieldValues, TName>, AnalyticsEventValueChangeNoPiiFlagProps<DesignSystemEventProviderAnalyticsEventTypes.OnValueChange> {
|
|
42
|
+
control: Control<any, TFieldValues>;
|
|
43
|
+
name: any;
|
|
44
|
+
children: (renderProps: {
|
|
45
|
+
comboboxState: ComboboxStateValue<TFieldValues>;
|
|
46
|
+
selectedItems: TFieldValues[];
|
|
47
|
+
}) => React.ReactNode;
|
|
48
|
+
validationState?: ValidationState;
|
|
49
|
+
allItems: TFieldValues[];
|
|
50
|
+
itemToString: (item: TFieldValues) => string;
|
|
51
|
+
matcher?: (item: TFieldValues, query: string) => boolean;
|
|
52
|
+
getKey?: (item: TFieldValues) => Key;
|
|
53
|
+
inputProps?: Partial<Omit<TypeaheadComboboxV2MultiSelectInputProps<TFieldValues>, "selectedItems" | "setSelectedItems" | "getSelectedItemLabel">>;
|
|
54
|
+
menuProps?: Partial<TypeaheadComboboxV2MenuProps>;
|
|
55
|
+
onInputChange?: (inputValue: string) => void;
|
|
56
|
+
}
|
|
57
|
+
export declare function RHFControlledMultiSelectTypeaheadComboboxV2<TFieldValues extends FieldValues>({ name, control, rules, allItems, itemToString, matcher, getKey, children, validationState, inputProps, menuProps, onInputChange, componentId, analyticsEvents, valueHasNoPii, ...props }: RHFControlledMultiSelectTypeaheadComboboxV2Props<TFieldValues> & Omit<HTMLAttributes<HTMLDivElement>, "children">): JSX.Element;
|
|
58
|
+
export {};
|
|
@@ -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
|
-
import type {
|
|
5
|
-
|
|
3
|
+
import type { HTMLDataAttributes } from "../types";
|
|
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 ColorMappingEditIcon: ForwardRefExoticComponent<PropsWithoutRef<IconProps> & RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default ColorMappingEditIcon;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
|
|
2
|
+
import type { IconProps } from "../../Icon";
|
|
3
|
+
declare const ColorMappingIcon: ForwardRefExoticComponent<PropsWithoutRef<IconProps> & RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default ColorMappingIcon;
|
|
@@ -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 MicrophoneIcon: ForwardRefExoticComponent<PropsWithoutRef<IconProps> & RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default MicrophoneIcon;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
|
|
2
|
+
import type { IconProps } from "../../Icon";
|
|
3
|
+
declare const MicrophoneOffIcon: ForwardRefExoticComponent<PropsWithoutRef<IconProps> & RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default MicrophoneOffIcon;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
|
|
2
|
+
import type { IconProps } from "../../Icon";
|
|
3
|
+
declare const OperatorIcon: ForwardRefExoticComponent<PropsWithoutRef<IconProps> & RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default OperatorIcon;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from "react";
|
|
2
|
+
import type { IconProps } from "../../Icon";
|
|
3
|
+
declare const VoiceModeIcon: ForwardRefExoticComponent<PropsWithoutRef<IconProps> & RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export default VoiceModeIcon;
|
|
@@ -120,6 +120,8 @@ export { default as CloudOffIcon } from "./CloudOffIcon";
|
|
|
120
120
|
export { default as CloudUploadIcon } from "./CloudUploadIcon";
|
|
121
121
|
export { default as CodeIcon } from "./CodeIcon";
|
|
122
122
|
export { default as ColorFillIcon } from "./ColorFillIcon";
|
|
123
|
+
export { default as ColorMappingEditIcon } from "./ColorMappingEditIcon";
|
|
124
|
+
export { default as ColorMappingIcon } from "./ColorMappingIcon";
|
|
123
125
|
export { default as ColumnIcon } from "./ColumnIcon";
|
|
124
126
|
export { default as ColumnSplitIcon } from "./ColumnSplitIcon";
|
|
125
127
|
export { default as ColumnTagIcon } from "./ColumnTagIcon";
|
|
@@ -243,6 +245,7 @@ export { default as LakeflowDesignerIcon } from "./LakeflowDesignerIcon";
|
|
|
243
245
|
export { default as LakewatchAlertIcon } from "./LakewatchAlertIcon";
|
|
244
246
|
export { default as LakewatchDatasourceIcon } from "./LakewatchDatasourceIcon";
|
|
245
247
|
export { default as LakewatchDetectionRuleIcon } from "./LakewatchDetectionRuleIcon";
|
|
248
|
+
export { default as LakewatchIcon } from "./LakewatchIcon";
|
|
246
249
|
export { default as LakewatchParserIcon } from "./LakewatchParserIcon";
|
|
247
250
|
export { default as LayerGraphIcon } from "./LayerGraphIcon";
|
|
248
251
|
export { default as LayerIcon } from "./LayerIcon";
|
|
@@ -276,6 +279,8 @@ export { default as McpIcon } from "./McpIcon";
|
|
|
276
279
|
export { default as MeasureIcon } from "./MeasureIcon";
|
|
277
280
|
export { default as MegaphoneIcon } from "./MegaphoneIcon";
|
|
278
281
|
export { default as MenuIcon } from "./MenuIcon";
|
|
282
|
+
export { default as MicrophoneIcon } from "./MicrophoneIcon";
|
|
283
|
+
export { default as MicrophoneOffIcon } from "./MicrophoneOffIcon";
|
|
279
284
|
export { default as MinusCircleFillIcon } from "./MinusCircleFillIcon";
|
|
280
285
|
export { default as MinusCircleIcon } from "./MinusCircleIcon";
|
|
281
286
|
export { default as MinusCircleSmallIcon } from "./MinusCircleSmallIcon";
|
|
@@ -297,6 +302,7 @@ export { default as NumberFormatIcon } from "./NumberFormatIcon";
|
|
|
297
302
|
export { default as NumbersIcon } from "./NumbersIcon";
|
|
298
303
|
export { default as OfficeIcon } from "./OfficeIcon";
|
|
299
304
|
export { default as OntologyIcon } from "./OntologyIcon";
|
|
305
|
+
export { default as OperatorIcon } from "./OperatorIcon";
|
|
300
306
|
export { default as OverflowHorizontalIcon } from "./OverflowHorizontalIcon";
|
|
301
307
|
export { default as OverflowIcon } from "./OverflowIcon";
|
|
302
308
|
export { default as PageBottomIcon } from "./PageBottomIcon";
|
|
@@ -469,6 +475,7 @@ export { default as UserTeamIcon } from "./UserTeamIcon";
|
|
|
469
475
|
export { default as VisibleFillIcon } from "./VisibleFillIcon";
|
|
470
476
|
export { default as VisibleIcon } from "./VisibleIcon";
|
|
471
477
|
export { default as VisibleOffIcon } from "./VisibleOffIcon";
|
|
478
|
+
export { default as VoiceModeIcon } from "./VoiceModeIcon";
|
|
472
479
|
export { default as WarningFillIcon } from "./WarningFillIcon";
|
|
473
480
|
export { default as WarningIcon } from "./WarningIcon";
|
|
474
481
|
export { default as WorkflowCodeIcon } from "./WorkflowCodeIcon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getIconClassName(): string;
|
|
@@ -8,6 +8,8 @@ export interface OverflowProps extends PopoverProps {
|
|
|
8
8
|
* @default 1
|
|
9
9
|
*/
|
|
10
10
|
visibleItemsCount?: number;
|
|
11
|
+
/** Opens the overflow menu on mount; passed through to the underlying Popover. */
|
|
12
|
+
defaultOpen?: boolean;
|
|
11
13
|
children: React.ReactNode;
|
|
12
14
|
}
|
|
13
|
-
export declare const Overflow: ({ children, noMargin, visibleItemsCount, ...props }: OverflowProps) => React.ReactElement;
|
|
15
|
+
export declare const Overflow: ({ children, noMargin, visibleItemsCount, defaultOpen, ...props }: OverflowProps) => React.ReactElement;
|
|
@@ -4,6 +4,7 @@ interface OverflowPopoverProps extends PopoverProps {
|
|
|
4
4
|
renderLabel?: (label: string) => React.ReactNode;
|
|
5
5
|
tooltipText?: string;
|
|
6
6
|
ariaLabel?: string;
|
|
7
|
+
defaultOpen?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const OverflowPopover: ({ items, renderLabel, tooltipText, ariaLabel, ...props }: OverflowPopoverProps) => JSX.Element;
|
|
9
|
+
export declare const OverflowPopover: ({ items, renderLabel, tooltipText, ariaLabel, defaultOpen, ...props }: OverflowPopoverProps) => JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -13,5 +13,7 @@ export interface TypeaheadComboboxMenuProps extends HTMLAttributes<HTMLUListElem
|
|
|
13
13
|
virtualizerRef?: Ref<HTMLUListElement>;
|
|
14
14
|
children?: ReactNode;
|
|
15
15
|
matchTriggerWidth?: boolean;
|
|
16
|
+
/** Gap in px between the trigger and the menu. */
|
|
17
|
+
offset?: number;
|
|
16
18
|
}
|
|
17
19
|
export declare const TypeaheadComboboxMenu: ForwardRefExoticComponent<TypeaheadComboboxMenuProps & RefAttributes<HTMLElement | null>>;
|
|
@@ -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;
|
|
@@ -2,6 +2,6 @@ export declare enum ShapeTokens {
|
|
|
2
2
|
ACTION_BORDER_RADIUS = "--action-border-radius",
|
|
3
3
|
INPUT_BORDER_RADIUS = "--input-border-radius",
|
|
4
4
|
LIST_ITEM_BORDER_RADIUS = "--list-item-border-radius",
|
|
5
|
-
|
|
5
|
+
POPUP_BORDER_RADIUS = "--popup-border-radius",
|
|
6
6
|
INFO_CONTAINER_BORDER_RADIUS = "--info-container-border-radius"
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const BUTTON_VARIANT_CLASS_TOKENS: {
|
|
2
|
-
readonly primary: readonly ["du-bois-light-btn-primary", "du-bois-dark-btn-primary", "ant-btn-primary", "
|
|
3
|
-
readonly dangerous: readonly ["du-bois-light-btn-dangerous", "du-bois-dark-btn-dangerous", "ant-btn-dangerous", "
|
|
4
|
-
readonly block: readonly ["du-bois-light-btn-block", "du-bois-dark-btn-block", "ant-btn-block", "
|
|
5
|
-
readonly link: readonly ["du-bois-light-btn-link", "du-bois-dark-btn-link", "ant-btn-link", "
|
|
2
|
+
readonly primary: readonly ["du-bois-light-btn-primary", "du-bois-dark-btn-primary", "ant-btn-primary", "db-btn-primary"];
|
|
3
|
+
readonly dangerous: readonly ["du-bois-light-btn-dangerous", "du-bois-dark-btn-dangerous", "ant-btn-dangerous", "db-btn-danger"];
|
|
4
|
+
readonly block: readonly ["du-bois-light-btn-block", "du-bois-dark-btn-block", "ant-btn-block", "db-btn-block"];
|
|
5
|
+
readonly link: readonly ["du-bois-light-btn-link", "du-bois-dark-btn-link", "ant-btn-link", "db-btn-link"];
|
|
6
6
|
};
|
|
7
7
|
export type ButtonVariant = keyof typeof BUTTON_VARIANT_CLASS_TOKENS;
|
|
8
8
|
export declare const isPrimaryButton: (button: Element) => boolean;
|
|
@@ -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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface WizardStepNavigation {
|
|
3
|
+
goToStep: (step: number) => void;
|
|
4
|
+
currentStepIndex: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function useWizardStepNavigation(): WizardStepNavigation | undefined;
|
|
7
|
+
export declare function WizardStepNavigationProvider({ goToStep, currentStepIndex, children }: WizardStepNavigation & {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -2,6 +2,7 @@ export * from "./Wizard";
|
|
|
2
2
|
export * from "./WizardProps";
|
|
3
3
|
export * from "./useWizardCurrentStep";
|
|
4
4
|
export type { WizardStep } from "./WizardStep";
|
|
5
|
+
export * from "./WizardStepNavigation";
|
|
5
6
|
export * from "./WizardModal";
|
|
6
7
|
export * from "./DocumentationSidebar";
|
|
7
8
|
export * from "./WizardStepContentWrapper";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databricks/design-system",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
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",
|
|
@@ -56,7 +57,8 @@
|
|
|
56
57
|
"/CHANGELOG.md",
|
|
57
58
|
"dist",
|
|
58
59
|
"dist-types",
|
|
59
|
-
"test-utils"
|
|
60
|
+
"test-utils",
|
|
61
|
+
"/design-guidance"
|
|
60
62
|
],
|
|
61
63
|
"scripts": {
|
|
62
64
|
"prepublish": "./scripts/prepublish",
|
|
@@ -84,6 +86,8 @@
|
|
|
84
86
|
"test:watch": "yarn test --watch",
|
|
85
87
|
"type-check": "tsc --noEmit --project ./tsconfig.json",
|
|
86
88
|
"type-check:watch": "yarn type-check --watch",
|
|
89
|
+
"figma:publish": "figma connect publish",
|
|
90
|
+
"figma:unpublish": "figma connect unpublish",
|
|
87
91
|
"check-all": "yarn type-check && yarn format:check && yarn lint",
|
|
88
92
|
"fix-all": "yarn generate && yarn format && yarn indexes-regenerate && yarn lint:fix && yarn type-check",
|
|
89
93
|
"prep-deps": ": # magic task to allow yarn ensure-deps plugin prepare dependencies of this package"
|
|
@@ -99,6 +103,7 @@
|
|
|
99
103
|
"@emotion/cache": "^11.11.0",
|
|
100
104
|
"@emotion/react": "^11.11.3",
|
|
101
105
|
"@faker-js/faker": "^9.8.0",
|
|
106
|
+
"@figma/code-connect": "^2.0.0",
|
|
102
107
|
"@jest/globals": "^30.0.2",
|
|
103
108
|
"@svgr/cli": "^8.1.0",
|
|
104
109
|
"@swc/core": "^1.15.47",
|
|
@@ -110,8 +115,8 @@
|
|
|
110
115
|
"@types/jscodeshift": "^0.11.2",
|
|
111
116
|
"@types/lodash": "^4.17.14",
|
|
112
117
|
"@types/node": "24.12.0",
|
|
113
|
-
"@types/react": "^
|
|
114
|
-
"@types/react-dom": "^
|
|
118
|
+
"@types/react": "^18.3.31",
|
|
119
|
+
"@types/react-dom": "^18.3.7",
|
|
115
120
|
"@types/react-resizable": "^3.0.3",
|
|
116
121
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
117
122
|
"glob": "^8.0.1",
|
|
@@ -169,7 +174,6 @@
|
|
|
169
174
|
"@testing-library/dom": "^10.4.0",
|
|
170
175
|
"@testing-library/react": "^16.1.0",
|
|
171
176
|
"@testing-library/user-event": "^14.5.2",
|
|
172
|
-
"@types/use-sync-external-store": "^1.5.0",
|
|
173
177
|
"antd": "4.16.8",
|
|
174
178
|
"chroma-js": "^2.4.2",
|
|
175
179
|
"classnames": "^2.3.1",
|