Skip to content

Commit 86d80e3

Browse files
committed
Merge branch 'main' of github.com:adobe/react-spectrum
2 parents a162d75 + 914b5df commit 86d80e3

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

examples/rsp-next-ts/next.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
transpilePackages: [
66
'@adobe/react-spectrum',
77
'@react-spectrum/*',
8-
'@spectrum-icons/*',
8+
'@spectrum-icons/*'
99
].flatMap(spec => glob.sync(`${spec}`, { cwd: 'node_modules/' })),
1010
basePath:
1111
process.env.VERDACCIO && process.env.CIRCLE_SHA1

examples/rsp-next-ts/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function MyApp({ Component, pageProps }: AppProps) {
3131
enableTableNestedRows();
3232

3333
return (
34-
<Provider
34+
<Provider
3535
theme={lightTheme}
3636
colorScheme={theme}
3737
router={{

examples/rsp-next-ts/pages/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ import {
7979
ColorArea,
8080
ColorField,
8181
ColorSlider,
82+
ColorSwatch,
83+
ColorSwatchPicker,
8284
ColorWheel,
8385
} from "@react-spectrum/color";
8486
import ReorderableListView from "../components/ReorderableListView";
@@ -242,6 +244,12 @@ export default function Home() {
242244
<ColorField label="Primary Color" />
243245
<ColorSlider defaultValue="#7f0000" channel="red" />
244246
<ColorWheel defaultValue="hsl(30, 100%, 50%)" />
247+
<ColorSwatchPicker defaultValue="#f00">
248+
<ColorSwatch color="#f00" />
249+
<ColorSwatch color="#0f0" />
250+
<ColorSwatch color="#0ff" />
251+
<ColorSwatch color="#00f" />
252+
</ColorSwatchPicker>
245253
</Section>
246254

247255
<Section title="Date and Time">

packages/@react-aria/overlays/src/useOverlayPosition.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function useOverlayPosition(props: AriaPositionProps): PositionAria {
140140
}, [isOpen]);
141141

142142
let updatePosition = useCallback(() => {
143-
if (shouldUpdatePosition === false || !isOpen || !overlayRef.current || !targetRef.current || !scrollRef.current || !boundaryElement) {
143+
if (shouldUpdatePosition === false || !isOpen || !overlayRef.current || !targetRef.current || !boundaryElement) {
144144
return;
145145
}
146146

@@ -153,7 +153,7 @@ export function useOverlayPosition(props: AriaPositionProps): PositionAria {
153153
// so it can be restored after repositioning. This way if the overlay height
154154
// changes, the focused element appears to stay in the same position.
155155
let anchor: ScrollAnchor | null = null;
156-
if (scrollRef.current.contains(document.activeElement)) {
156+
if (scrollRef.current && scrollRef.current.contains(document.activeElement)) {
157157
let anchorRect = document.activeElement.getBoundingClientRect();
158158
let scrollRect = scrollRef.current.getBoundingClientRect();
159159
// Anchor from the top if the offset is in the top half of the scrollable element,
@@ -181,7 +181,7 @@ export function useOverlayPosition(props: AriaPositionProps): PositionAria {
181181
placement: translateRTL(placement, direction),
182182
overlayNode: overlayRef.current,
183183
targetNode: targetRef.current,
184-
scrollNode: scrollRef.current,
184+
scrollNode: scrollRef.current || overlayRef.current,
185185
padding: containerPadding,
186186
shouldFlip,
187187
boundaryElement,

packages/@react-spectrum/tree/src/TreeView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export interface SpectrumTreeViewProps<T> extends Omit<AriaTreeGridListProps<T>,
3838
children?: ReactNode | ((item: T) => ReactNode)
3939
}
4040

41-
export interface SpectrumTreeViewItemProps<T extends object = object> extends Omit<TreeItemProps, 'className' | 'style' | 'value'> {
41+
export interface SpectrumTreeViewItemProps<T extends object = object> extends Omit<TreeItemProps, 'className' | 'style' | 'value' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'> {
4242
/** Rendered contents of the tree item or child items. */
4343
children: ReactNode,
4444
/** Whether this item has children, even if not loaded yet. */

scripts/buildI18n.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,6 @@ export declare function createLocalizedStringDictionary(packages: string[]): Loc
137137
`);
138138
}
139139

140-
build('{@react-aria,@react-stately,@react-spectrum}/*', '@adobe/react-spectrum');
140+
build('{@react-aria/*,@react-stately/*,@react-spectrum/*,react-aria-components}', '@adobe/react-spectrum');
141141
build('{@react-aria/*,@react-stately/*,react-aria-components}', 'react-aria-components');
142142
build('{@react-aria,@react-stately}/*', 'react-aria');

0 commit comments

Comments
 (0)