Skip to content

Commit e6e7905

Browse files
authored
Release Audit (#5594)
1 parent 1b74aff commit e6e7905

File tree

10 files changed

+19
-9
lines changed

10 files changed

+19
-9
lines changed

packages/@react-aria/tabs/src/TabsKeyboardDelegate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ export class TabsKeyboardDelegate<T> implements KeyboardDelegate {
4747

4848
getFirstKey() {
4949
let key = this.collection.getFirstKey();
50-
if (key && this.disabledKeys.has(key)) {
50+
if (key != null && this.disabledKeys.has(key)) {
5151
key = this.getNextKey(key);
5252
}
5353
return key;
5454
}
5555

5656
getLastKey() {
5757
let key = this.collection.getLastKey();
58-
if (key && this.disabledKeys.has(key)) {
58+
if (key != null && this.disabledKeys.has(key)) {
5959
key = this.getPreviousKey(key);
6060
}
6161
return key;

packages/dev/docs/src/PropTable.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ function groupProps(props) {
117117
}
118118

119119
if (props[propName]) {
120+
if (propName === 'id' && props[propName].value.type !== 'string') {
121+
continue;
122+
}
123+
120124
groupProps[propName] = props[propName];
121125
delete props[propName];
122126
}

packages/dev/docs/src/StateTable.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ export function StateTable({properties, showOptional}) {
2222
if (!showOptional) {
2323
props = props.filter(prop => !prop.optional);
2424
}
25+
let showSelector = props.some(prop => prop.selector);
2526

2627
return (
2728
<table className={`${tableStyles['spectrum-Table']} ${styles.propTable}`}>
2829
<thead>
2930
<tr>
3031
<td role="columnheader" className={tableStyles['spectrum-Table-headCell']}>Name</td>
31-
<td role="columnheader" className={tableStyles['spectrum-Table-headCell']}>CSS Selector</td>
32+
{showSelector && <td role="columnheader" className={tableStyles['spectrum-Table-headCell']}>CSS Selector</td>}
3233
<td role="columnheader" className={tableStyles['spectrum-Table-headCell']}>Description</td>
3334
</tr>
3435
</thead>
@@ -40,11 +41,11 @@ export function StateTable({properties, showOptional}) {
4041
<span className="token hljs-variable">{prop.name}</span>
4142
</code>
4243
</td>
43-
<td role="rowheader" className={clsx(tableStyles['spectrum-Table-cell'], styles.tableCell)} data-column="CSS Selector">
44+
{showSelector && <td role="rowheader" className={clsx(tableStyles['spectrum-Table-cell'], styles.tableCell)} data-column="CSS Selector">
4445
<code className={`${typographyStyles['spectrum-Code4']}`}>
4546
<span className={prop.selector ? 'token hljs-string' : null}>{prop.selector || '—'}</span>
4647
</code>
47-
</td>
48+
</td>}
4849
<td className={clsx(tableStyles['spectrum-Table-cell'], styles.tableCell)}>{renderHTMLfromMarkdown(prop.description, {forceInline: false})}</td>
4950
</tr>
5051
))}

packages/react-aria-components/src/Checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import React, {createContext, ForwardedRef, forwardRef, useContext, useRef} from
1919
import {TextContext} from './Text';
2020

2121
export interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<CheckboxGroupRenderProps>, SlotProps {}
22-
export interface CheckboxProps extends Omit<AriaCheckboxProps, 'children' | 'validationState'>, HoverEvents, RACValidation, RenderProps<CheckboxRenderProps>, SlotProps {}
22+
export interface CheckboxProps extends Omit<AriaCheckboxProps, 'children' | 'validationState' | 'validationBehavior'>, HoverEvents, RACValidation, RenderProps<CheckboxRenderProps>, SlotProps {}
2323

2424
export interface CheckboxGroupRenderProps {
2525
/**

packages/react-aria-components/src/Collection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ export interface SectionProps<T> extends Omit<SharedSectionProps<T>, 'children'
900900
value?: T,
901901
/** Static child items or a function to render children. */
902902
children?: ReactNode | ((item: T) => ReactElement),
903-
/** Values that should invalidate the column cache when using dynamic collections. */
903+
/** Values that should invalidate the item cache when using dynamic collections. */
904904
dependencies?: any[]
905905
}
906906

packages/react-aria-components/src/DatePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export interface DateRangePickerRenderProps extends Omit<DatePickerRenderProps,
6262
state: DateRangePickerState
6363
}
6464

65-
export interface DatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState'>, Pick<DatePickerStateOptions<T>, 'shouldCloseOnSelect'>, RACValidation, RenderProps<DatePickerRenderProps>, SlotProps {}
65+
export interface DatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, Pick<DatePickerStateOptions<T>, 'shouldCloseOnSelect'>, RACValidation, RenderProps<DatePickerRenderProps>, SlotProps {}
6666
export interface DateRangePickerProps<T extends DateValue> extends Omit<AriaDateRangePickerProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, Pick<DateRangePickerStateOptions<T>, 'shouldCloseOnSelect'>, RACValidation, RenderProps<DateRangePickerRenderProps>, SlotProps {}
6767

6868
export const DatePickerContext = createContext<ContextValue<DatePickerProps<any>, HTMLDivElement>>(null);

packages/react-aria-components/src/Slider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export interface SliderThumbRenderProps {
210210
isDisabled: boolean
211211
}
212212

213-
export interface SliderThumbProps extends Omit<AriaSliderThumbProps, 'validationState'>, HoverEvents, RenderProps<SliderThumbRenderProps> {}
213+
export interface SliderThumbProps extends Omit<AriaSliderThumbProps, 'label' | 'validationState'>, HoverEvents, RenderProps<SliderThumbRenderProps> {}
214214

215215
function SliderThumb(props: SliderThumbProps, ref: ForwardedRef<HTMLDivElement>) {
216216
let state = useContext(SliderStateContext)!;

packages/react-aria-components/src/Table.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ export interface ColumnRenderProps {
529529
}
530530

531531
export interface ColumnProps extends RenderProps<ColumnRenderProps> {
532+
/** The unique id of the column. */
532533
id?: Key,
533534
/** Whether the column allows sorting. */
534535
allowsSorting?: boolean,
@@ -588,6 +589,7 @@ export {_TableBody as TableBody};
588589
export interface RowRenderProps extends ItemRenderProps {}
589590

590591
export interface RowProps<T> extends StyleRenderProps<RowRenderProps>, LinkDOMProps {
592+
/** The unique id of the row. */
591593
id?: Key,
592594
/** A list of columns used when dynamically rendering cells. */
593595
columns?: Iterable<T>,
@@ -649,6 +651,7 @@ export interface CellRenderProps {
649651
}
650652

651653
export interface CellProps extends RenderProps<CellRenderProps> {
654+
/** The unique id of the cell. */
652655
id?: Key,
653656
/** A string representation of the cell's contents, used for features like typeahead. */
654657
textValue?: string

packages/react-aria-components/src/Tabs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export interface TabListRenderProps {
4343
}
4444

4545
export interface TabProps extends RenderProps<TabRenderProps>, AriaLabelingProps, LinkDOMProps {
46+
/** The unique id of the tab. */
4647
id?: Key
4748
}
4849

packages/react-aria-components/src/utils.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export interface DOMProps extends StyleProps {
7575
}
7676

7777
export interface ScrollableProps<T extends Element> {
78+
/** Handler that is called when a user scrolls. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event). */
7879
onScroll?: (e: UIEvent<T>) => void
7980
}
8081

0 commit comments

Comments
 (0)