Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c3da6a8
WIP FormSteps
oscarcarlstrom Nov 28, 2025
ccb25ae
Add links
oscarcarlstrom Nov 28, 2025
36a6010
WIP: Disclosure in list
oscarcarlstrom Dec 2, 2025
c3010bc
Remove added data-slot attributes
oscarcarlstrom Dec 2, 2025
6175472
WIP
oscarcarlstrom Dec 2, 2025
a63c7fa
Toggle overflow list items on small screens with CSS only
oscarcarlstrom Dec 3, 2025
b0b55f0
Fix list item count alt text
oscarcarlstrom Dec 3, 2025
9eb2443
Fix form steps popover styles
oscarcarlstrom Dec 3, 2025
12ec8de
Hide text for current step on small screens
oscarcarlstrom Dec 3, 2025
e3ff758
Responsive layout bug fixes
oscarcarlstrom Dec 3, 2025
27ab5f7
Adjust "padding" on the form steps tooltip
oscarcarlstrom Dec 3, 2025
1933fb9
Adjust "tooltip" witdth on form steps
oscarcarlstrom Dec 3, 2025
ab9c99e
Highlight current form step
oscarcarlstrom Dec 3, 2025
017975e
Fix hidden form step when 5 items
oscarcarlstrom Dec 4, 2025
d4e474a
Fix responsive bug for 5 form steps
oscarcarlstrom Dec 4, 2025
d8e0abd
Fix condition for overflow form steps
oscarcarlstrom Dec 4, 2025
577937b
Fix edge case layout bugs on small screens
oscarcarlstrom Dec 4, 2025
db4c59f
Fix click area and current step color
oscarcarlstrom Dec 4, 2025
341a4f8
Add new hooks for clicking outside refs
oscarcarlstrom Dec 4, 2025
473ff7c
Handle click outside form steps
oscarcarlstrom Dec 4, 2025
d070ef3
Tests
oscarcarlstrom Dec 4, 2025
5f7fd44
Fix file name casing
oscarcarlstrom Dec 4, 2025
e4bb703
Add comments
oscarcarlstrom Dec 4, 2025
cc1ebfc
Fix click outside bug
oscarcarlstrom Dec 4, 2025
7939900
Fix children mapping
oscarcarlstrom Dec 4, 2025
0eedcff
Fix current step styles
oscarcarlstrom Dec 4, 2025
eb7ef3b
Fix click area for expanded second FormStep
oscarcarlstrom Dec 4, 2025
8b78d63
Fix current form-step color
oscarcarlstrom Dec 4, 2025
f432d34
Close popover on focus outisde it
oscarcarlstrom Dec 4, 2025
c11e39a
Add comment
oscarcarlstrom Dec 4, 2025
ebc08dc
Fix responsive classes
oscarcarlstrom Dec 4, 2025
f908a51
Truncate too long step texts
oscarcarlstrom Dec 4, 2025
82173e8
Use Text instead of Link for current step
oscarcarlstrom Dec 4, 2025
eec2d5e
Fix clickable link area in form steps
oscarcarlstrom Dec 5, 2025
ab80662
Refactor form steps API
oscarcarlstrom Dec 5, 2025
305cf9f
Prepare for collapsible next steps
oscarcarlstrom Dec 8, 2025
2a7e4d4
Collapse next completed steps on small screens
oscarcarlstrom Dec 8, 2025
3d07efc
Alignment in popover
oscarcarlstrom Dec 9, 2025
a08903e
Simplify selectors
oscarcarlstrom Dec 9, 2025
5fec305
-update comment
oscarcarlstrom Dec 9, 2025
4f56392
Fix selector popover
oscarcarlstrom Dec 9, 2025
d417329
Update comments
oscarcarlstrom Dec 9, 2025
ab58128
Add page padding
oscarcarlstrom Dec 9, 2025
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
13 changes: 12 additions & 1 deletion packages/react/src/content/content.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { cva, cx, type VariantProps } from 'cva';
import { createContext, type HTMLProps, type Ref } from 'react';
import { type ContextValue, useContextProps } from 'react-aria-components';
import {
type ContextValue,
Text as RACText,
type TextProps as RACTextProps,
useContextProps,
} from 'react-aria-components';

type HeadingProps = Omit<HTMLProps<HTMLHeadingElement>, 'size'> &
VariantProps<typeof headingVariants> & {
Expand Down Expand Up @@ -150,6 +155,10 @@ const Caption = ({ className, ...restProps }: CaptionProps) => (

const Footer = (props: FooterProps) => <div {...props} data-slot="footer" />;

type TextProps = RACTextProps;

const Text = (props: TextProps) => <RACText {...props} data-slot="text" />;

export {
Caption,
Content,
Expand All @@ -159,9 +168,11 @@ export {
HeadingContext,
Media,
MediaContext,
Text,
type CaptionProps,
type ContentProps,
type FooterProps,
type HeadingProps,
type MediaProps,
type TextProps,
};
5 changes: 3 additions & 2 deletions packages/react/src/disclosure/disclosure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,16 @@ export const DisclosureStateContext = createContext<DisclosureState | null>(
null,
);

const Disclosure = ({ ref: _ref, children, ..._props }: DisclosureProps) => {
const Disclosure = ({ ref: _ref, ..._props }: DisclosureProps) => {
const [props, ref] = useContextProps(
_props,
_ref as ForwardedRef<HTMLDivElement>,
DisclosureContext,
);

const groupState = useContext(DisclosureGroupStateContext);

let { id, ...otherProps } = props;
let { id, children, ...otherProps } = props;
const defaultId = useId();
id ||= defaultId;
const isExpanded = groupState
Expand Down
Loading