Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(core): export ButtonGroup context type, remove redundant DateRangeInput xstyle, forward DialogHeader escape hatches (#2858)

Cindy Zhangdeb8f13c9877
diff --git a/packages/core/src/ButtonGroup/index.ts b/packages/core/src/ButtonGroup/index.ts
index bc40a596b7..74c83a24ca 100644
--- a/packages/core/src/ButtonGroup/index.ts
+++ b/packages/core/src/ButtonGroup/index.ts
@@ -13,4 +13,7 @@ export {XDSButtonGroup} from './XDSButtonGroup';
export type {XDSButtonGroupProps} from './XDSButtonGroup';
export {useXDSButtonGroup} from './XDSButtonGroupContext';
-export type {XDSButtonGroupOrientation} from './XDSButtonGroupContext';
+export type {
+ XDSButtonGroupOrientation,
+ XDSButtonGroupContextValue,
+} from './XDSButtonGroupContext';
diff --git a/packages/core/src/DateRangeInput/XDSDateRangeInput.tsx b/packages/core/src/DateRangeInput/XDSDateRangeInput.tsx
index 2a7a090ae3..1346ea9421 100644
--- a/packages/core/src/DateRangeInput/XDSDateRangeInput.tsx
+++ b/packages/core/src/DateRangeInput/XDSDateRangeInput.tsx
@@ -49,7 +49,6 @@ import {XDSSpinner} from '../Spinner';
import {XDSCalendar, type ISODateString, type DateRange} from '../Calendar';
import {useXDSPopover} from '../Popover';
import {mergeProps} from '../utils';
-import type {StyleXStyles} from '@stylexjs/stylex';
import type {XDSBaseProps} from '../XDSBaseProps';
import {useXDSSize} from '../SizeContext/XDSSizeContext';
import {xdsThemeProps} from '../utils/xdsThemeProps';
@@ -316,11 +315,6 @@ export interface XDSDateRangeInputProps extends Omit<
* @default 2
*/
numberOfMonths?: 1 | 2;
-
- /**
- * Style overrides.
- */
- xstyle?: StyleXStyles;
}
/**
diff --git a/packages/core/src/Dialog/XDSDialogHeader.tsx b/packages/core/src/Dialog/XDSDialogHeader.tsx
index bd25a3ec5e..aebfbd299c 100644
--- a/packages/core/src/Dialog/XDSDialogHeader.tsx
+++ b/packages/core/src/Dialog/XDSDialogHeader.tsx
@@ -126,6 +126,9 @@ export function XDSDialogHeader({
startContent,
endContent,
hasDivider,
+ xstyle,
+ className,
+ style,
ref,
}: XDSDialogHeaderProps) {
const titleRef = useRef<HTMLHeadingElement>(null);
@@ -142,7 +145,12 @@ export function XDSDialogHeader({
}, [shouldAutoFocus]);
return (
- <XDSLayoutHeader ref={ref} hasDivider={hasDivider}>
+ <XDSLayoutHeader
+ ref={ref}
+ hasDivider={hasDivider}
+ xstyle={xstyle}
+ className={className}
+ style={style}>
<div {...stylex.props(styles.container)}>
{startContent && (
<div {...stylex.props(styles.actions)}>{startContent}</div>