Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"nano-staged": "^1.0.2",
"postcss-lightningcss": "^1.1.0",
"postcss-mixins": "^11.0.3",
"prettier": "^3.8.3",
"prettier": "^3.9.6",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"react-hook-form": "^7.68.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/Container/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ export type ContainerBaseProps = {
placement?: ContainerPlacementProp | ResponsiveValue<ContainerPlacementProp>;
/** Determine the max-inline-size of the container. */
maxInlineSize?:
| ContainerMaxInlineSizeProp
| ResponsiveValue<ContainerMaxInlineSizeProp>;
ContainerMaxInlineSizeProp | ResponsiveValue<ContainerMaxInlineSizeProp>;
/**
* Margins are the space between content and the left and right edges of the screen.
* @default 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import type {
import type { OverlayTriggerState } from '@react-stately/overlays';

export type ContentPanelContainerPropContent =
| ReactNode
| ((props: OverlayTriggerState) => ReactElement);
ReactNode | ((props: OverlayTriggerState) => ReactElement);

export type ContentPanelContainerProps = ExtendableComponentPropsWithRef<
{
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/FileUpload/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ export type FileUploadPropAllowed = (typeof fileUploadPropAllowed)[number];

/** Where files can be dropped: an element ref, or the whole viewport. */
export type FileUploadPropDropzoneTarget =
| 'fullscreen'
| RefObject<HTMLElement | null>;
'fullscreen' | RefObject<HTMLElement | null>;

/** Localizable strings used by `FileUpload`. */
export type FileUploadMessages = {
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/FlexBox/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export type FlexBoxBaseProps = {
rowGap?: FlexPropGap | ResponsiveValue<FlexPropGap>;
/** Defines the `justify-content` property. */
justifyContent?:
| FlexPropJustifyContent
| ResponsiveValue<FlexPropJustifyContent>;
FlexPropJustifyContent | ResponsiveValue<FlexPropJustifyContent>;
/** Defines the `align-items` property. */
alignItems?: FlexPropAlignItems | ResponsiveValue<FlexPropAlignItems>;
/** Additional CSS-classes. */
Expand Down
9 changes: 3 additions & 6 deletions packages/components/src/components/Form/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ export type FormProps = {
* @default 'top'
*/
labelPlacement?:
| FormFieldPropLabelPlacement
| ResponsiveValue<FormFieldPropLabelPlacement>;
FormFieldPropLabelPlacement | ResponsiveValue<FormFieldPropLabelPlacement>;
/**
* The label's horizontal alignment relative to the element it is labeling.
* Responsive values allowed.
* @default 'start'
*/
labelAlign?:
| FormFieldPropLabelAlign
| ResponsiveValue<FormFieldPropLabelAlign>;
FormFieldPropLabelAlign | ResponsiveValue<FormFieldPropLabelAlign>;
/**
* Size of the label column when `labelPlacement="side"`.
* Ignored for `"top"`.
Expand All @@ -56,7 +54,6 @@ export type FormProps = {
* @default 'max-content'
*/
labelInlineSize?:
| FormPropLabelInlineSize
| ResponsiveValue<FormPropLabelInlineSize>;
FormPropLabelInlineSize | ResponsiveValue<FormPropLabelInlineSize>;
} & FormPropsPrimitive;
export type FormRef = ComponentRef<'form'>;
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export type FormFieldControlGroupRenderProps = {
};

export type FormFieldControlGroupPropChildren =
| ReactNode
| ((props: FormFieldControlGroupRenderProps) => ReactNode);
ReactNode | ((props: FormFieldControlGroupRenderProps) => ReactNode);

export const formFieldControlGroupPropVariant = [
'filled',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export type GridItemBaseProps = {
| ResponsiveValue<CSSProperties['justifySelf']>;
/** The align-self CSS property overrides a grid or flex item's align-items value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. */
alignSelf?:
| CSSProperties['alignSelf']
| ResponsiveValue<CSSProperties['alignSelf']>;
CSSProperties['alignSelf'] | ResponsiveValue<CSSProperties['alignSelf']>;
/** Additional CSS-classes. */
className?: string;
/** The content of the component. */
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/Grid/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export type GridBaseProps = {
* Defines the default `alignSelf` for all items in the grid.
*/
alignItems?:
| CSSProperties['alignItems']
| ResponsiveValue<CSSProperties['alignItems']>;
CSSProperties['alignItems'] | ResponsiveValue<CSSProperties['alignItems']>;
/** Additional CSS-classes. */
className?: string;
/** The content of the component. */
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/Modal/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export const modalPropSize = ['small', 'medium', 'large'] as const;
export type ModalPropSize = (typeof modalPropSize)[number];

export type ModalPropContent =
| ReactNode
| ((props: { close(): void }) => ReactElement);
ReactNode | ((props: { close(): void }) => ReactElement);

export type ModalPropControl = (props: ButtonOptions) => ReactElement;

Expand Down
6 changes: 2 additions & 4 deletions packages/components/src/components/Popover/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export type PopoverBodyProps = DialogBodyProps;
export type PopoverFooterProps = DialogFooterProps;

export type PopoverPropContent =
| ReactNode
| ((props: { close(): void }) => ReactElement);
ReactNode | ((props: { close(): void }) => ReactElement);

export type PopoverPropControl = (
props: ButtonOptions & { ref?: Ref<HTMLButtonElement> }
Expand All @@ -53,8 +52,7 @@ export type PopoverPropPlacement = (typeof popoverPropPlacement)[number];
export const popoverPropSize = ['small', 'medium', 'large'] as const;

export type PopoverPropSize =
| (typeof popoverPropSize)[number]
| CSSProperties['inlineSize'];
(typeof popoverPropSize)[number] | CSSProperties['inlineSize'];

export const popoverPropType = [
'dialog',
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/SidePanel/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export const sidePanelPropPlacement = ['start', 'end'] as const;
export type SidePanelPropPlacement = (typeof sidePanelPropPlacement)[number];

export type SidePanelPropContent =
| ReactNode
| ((props: { close(): void }) => ReactElement);
ReactNode | ((props: { close(): void }) => ReactElement);

export type SidePanelPropControl = (props: ButtonOptions) => ReactElement;

Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/components/Sidebar/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export type SidebarRenderProps = {
};

export type SidebarPropContent =
| ReactNode
| ((props: SidebarRenderProps) => ReactNode);
ReactNode | ((props: SidebarRenderProps) => ReactNode);

export type SidebarBaseProps = {
/**
Expand Down
9 changes: 2 additions & 7 deletions packages/primitives/src/behaviors/useTagField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ import type { TagListState } from './useTagListState';

/** How the user's input ended up as new tags. */
export type TagFieldAddSource =
| 'enter'
| 'separator'
| 'paste'
| 'blur'
| 'suggestion';
'enter' | 'separator' | 'paste' | 'blur' | 'suggestion';

export type TagFieldAddContext<T = unknown> =
| { source: Exclude<TagFieldAddSource, 'suggestion'> }
Expand Down Expand Up @@ -109,8 +105,7 @@ export type TagFieldTagListProps<T extends object> = {
isDisabled: boolean | undefined;
tabIndex: -1;
onRemove:
| ((keys: Set<Key>, context?: TagListItemRemoveContext) => void)
| undefined;
((keys: Set<Key>, context?: TagListItemRemoveContext) => void) | undefined;
'aria-label': string;
};

Expand Down
3 changes: 1 addition & 2 deletions packages/primitives/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export interface DOMProps extends StyleProps, SharedDOMProps {
export interface StyleRenderProps<T> {
/** The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. */
className?:
| string
| ((values: T & { defaultClassName: string | undefined }) => string);
string | ((values: T & { defaultClassName: string | undefined }) => string);
/** The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. A function may be provided to compute the style based on component state. */
style?:
| CSSProperties
Expand Down
Loading
Loading