You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .storybook-s2/docs/Migrating.jsx
+38-2Lines changed: 38 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,19 @@ export function Migrating() {
54
54
<liclassName={style({font: 'body',marginY: 8})}>Update <Code>Item</Code> to be a <Code>MenuItem</Code></li>
55
55
</ul>
56
56
57
+
<H3>ActionGroup</H3>
58
+
<ulclassName="sb-unstyled">
59
+
<liclassName={style({font: 'body',marginY: 8})}>Use <Code>ActionButtonGroup</Code> if you are migrating from an <Code>ActionGroup</Code> that didn't allow for selection. <Code>ActionButtonGroup</Code> takes <Code>ActionButtons</Code> as children. </li>
60
+
<liclassName={style({font: 'body',marginY: 8})}>Use <Code>ToggleButtonGroup</Code> if you are migrating from an <Code>ActionGroup</Code> that used single or multiple selection. <Code>ToggleButtonGroup</Code> takes <Code>ToggleButtons</Code> as children. </li>
61
+
<liclassName={style({font: 'body',marginY: 8})}>[PENDING] Comment out <Code>overflowMode</Code> (it has not been implemented yet)</li>
62
+
<liclassName={style({font: 'body',marginY: 8})}>[PENDING] Comment out <Code>buttonLabelBehavior</Code> (it has not been implemented yet)</li>
63
+
<liclassName={style({font: 'body',marginY: 8})}>[PENDING] Comment out <Code>summaryIcon</Code> (it has not been implemented yet)</li>
64
+
<liclassName={style({font: 'body',marginY: 8})}>Update root level <Code>onAction</Code> to called via <Code>onPress</Code> on each <Code>ActionButton</Code></li>
65
+
<liclassName={style({font: 'body',marginY: 8})}>Apply <Code>isDisabled</Code> directly on each <Code>ActionButton</Code> or <Code>ToggleButton</Code> instead of root level <Code>disabledKeys</Code></li>
66
+
<liclassName={style({font: 'body',marginY: 8})}>Update <Code>key</Code> to be <Code>id</Code> (and keep <Code>key</Code> if rendered inside <Code>array.map</Code>)</li>
67
+
<liclassName={style({font: 'body',marginY: 8})}>Convert dynamic collections render function to <Code>items.map</Code></li>
68
+
</ul>
69
+
57
70
<H3>AlertDialog</H3>
58
71
<P>No updates needed.</P>
59
72
@@ -141,14 +154,37 @@ export function Migrating() {
141
154
<ulclassName="sb-unstyled">
142
155
<liclassName={style({font: 'body',marginY: 8})}>Update children to move render props from being the second child of <Code>DialogTrigger</Code> to being a child of <Code>Dialog</Code></li>
143
156
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>onDismiss</Code> and use <Code>onOpenChange</Code> on the <Code>DialogTrigger</Code>, or <Code>onDismiss</Code> on the <Code>DialogContainer</Code> instead</li>
157
+
<liclassName={style({font: 'body',marginY: 8})}><Code>Dialog</Code> is now meant specifically for rendering modal dialogs only and follows the same preset layout as before</li>
158
+
<liclassName={style({font: 'body',marginY: 8})}>If you are trying to create a dialog with a custom layout use <Code>CustomDialog</Code></li>
159
+
<liclassName={style({font: 'body',marginY: 8})}>If you are trying to create a fullscreen dialog use <Code>FullscreenDialog</Code></li>
160
+
<liclassName={style({font: 'body',marginY: 8})}>If you are trying to create a popover dialog use <Code>Popover</Code></li>
161
+
<liclassName={style({font: 'body',marginY: 8})}>Supports <Code>isKeyboardDismissDisabled</Code> in place of <Code>DialogTrigger</Code></li>
162
+
<liclassName={style({font: 'body',marginY: 8})}>Supports <Code>isDismissible</Code> in place of <Code>DialogTrigger</Code>. Note the fixed spelling from previous <Code>isDismissible</Code> prop.</li>
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>type</Code>, this is dependent on the dialog level child that you use (e.g. <Code>Dialog</Code>, <Code>FullscreenDialog</Code>, <Code>Popover</Code>)</li>
169
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>isDismissable</Code>, prop now exists on the dialog level component as <Code>isDismissible</Code></li>
170
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>isKeyboardDismissDisabled</Code>, prop now exists on the dialog level component</li>
144
171
</ul>
145
172
146
173
<H3>DialogTrigger</H3>
147
174
<ulclassName="sb-unstyled">
148
175
<liclassName={style({font: 'body',marginY: 8})}>[PENDING] Comment out <Code>type="tray"</Code> (<Code>Tray</Code> has not been implemented yet)</li>
149
-
<liclassName={style({font: 'body',marginY: 8})}>[PENDING] Comment out <Code>mobileType="tray"</Code> (<Code>Tray</Code>has not been implemented yet)</li>
176
+
<liclassName={style({font: 'body',marginY: 8})}>[PENDING] Comment out <Code>mobileType</Code> (<Code>Tray</Code>and other types have not been implemented yet for <Code>Popover</Code>)</li>
150
177
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>targetRef</Code> (it is no longer supported in Spectrum 2)</li>
151
178
<liclassName={style({font: 'body',marginY: 8})}>Update <Code>children</Code> to remove render props usage, and note that the <Code>close</Code> function was moved from <Code>DialogTrigger</Code> to <Code>Dialog</Code></li>
179
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>containerPadding</Code>, prop now exists on the <Code>Popover</Code> component</li>
180
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>crossOffset</Code>, prop now exists on the <Code>Popover</Code> component</li>
181
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>hideArrow</Code>, prop now exists on the <Code>Popover</Code> component</li>
182
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>isDismissable</Code>, prop now exists on the dialog level component as <Code>isDismissible</Code></li>
183
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>isKeyboardDismissDisabled</Code>, prop now exists on the dialog level component</li>
184
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>offset</Code>, prop now exists on the <Code>Popover</Code> component</li>
185
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>placement</Code>, prop now exists on the <Code>Popover</Code> component</li>
186
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>shouldFlip</Code>, prop now exists on the <Code>Popover</Code> component</li>
187
+
<liclassName={style({font: 'body',marginY: 8})}>Remove <Code>type</Code>, this is dependent on the dialog level child that you use (e.g. <Code>Dialog</Code>, <Code>FullscreenDialog</Code>, <Code>Popover</Code>)</li>
Copy file name to clipboardExpand all lines: .storybook-s2/docs/Release Notes.mdx
+50Lines changed: 50 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,56 @@ export default MDXLayout;
4
4
5
5
# Release Notes
6
6
7
+
## v0.5.0
8
+
9
+
In this release we have updated our Dialog and DialogTrigger APIs to improve layout flexibility for custom dialogs and popovers. Dialog has been split into four components:
10
+
11
+
*[Dialog](?path=/docs/dialog--docs) – a modal dialog with a standard layout with slots for the heading, content, hero image, button group, etc. This corresponds to the previous `type="modal"` API.
12
+
*[FullscreenDialog](?path=/docs/fullscreendialog--docs) – a fullscreen or takeover modal, similar to a Dialog but with different slots and layout. This corresponds to the previous `type="fullscreen"` and `type="fullscreenTakeover"` APIs.
13
+
*[CustomDialog](?path=/docs/customdialog--docs) – a modal dialog with a completely custom layout. It can have default padding or go edge-to-edge. No built-in slots are provided, the layout is entirely up to you.
14
+
*[Popover](?path=/docs/popover--docs) Popovers no longer support the previous dialog-style layout, which was rarely needed in recent apps. In addition, popover now has a reduced amount of padding by default, which was a common request.
15
+
16
+
In addition, several DialogTrigger props have moved to the above children:
17
+
18
+
*`type` is removed. Use one of the above components instead.
19
+
*`isKeyboardDismissDisabled` moved to Dialog, FullscreenDialog, and CustomDialog
20
+
*`isDismissable` was renamed to `isDismissible` (fixed spelling), and moved to Dialog and CustomDialog
21
+
*`hideArrow`, `offset`, `crossOffset`, `containerPadding`, `placement`, and `shouldFlip` moved to Popover
22
+
23
+
We've also continued to iterate on developer experience based on your feedback. Documentation on style macro usage with regards to
24
+
[colors](?path=/docs/style-macro--docs#colors) and [typography](?path=/docs/style-macro--docs#typography) have been added to help clarify
25
+
these common use cases. Style macro properties like `width` and `height` now allow for arbitrary pixel size values, please see the [docs](?path=/docs/style-macro--docs#sizing)
26
+
for more information. Finally, documentation on [optimizing CSS bundling](?path=/docs/style-macro--docs#css-optimization) have also been
27
+
added to help you generate a properly optimized output when using the bundler of your choice.
@@ -44,7 +45,7 @@ import {Disclosure, DisclosureTitle, DisclosurePanel} from '@react-spectrum/acco
44
45
45
46
## Content
46
47
47
-
Disclosure follows the [ARIA Disclosure pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/) and consists of two children: `DisclosureTitle` and `DisclosurePanel`. The `DisclosureTitle` controls the expansion of the `DisclosurePanel` and the contents inside.
48
+
Disclosure follows the [ARIA Disclosure pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/) and consists of two children: `DisclosureTitle` and `DisclosurePanel`. The `DisclosureTitle` controls the expansion of the `DisclosurePanel` and the contents inside.
48
49
49
50
Disclosure can be used as a standalone collapsible section of content. However, multiple discosures can be combined to form an [Accordion](Accordion.html).
50
51
@@ -59,7 +60,7 @@ Disclosure accepts an `onExpandedChange` prop which is triggered when it is expa
59
60
```tsx example
60
61
function ControlledExpansion() {
61
62
let [isExpanded, setIsExpanded] =React.useState<boolean>(false);
Copy file name to clipboardExpand all lines: packages/@react-spectrum/color/docs/ColorField.mdx
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,8 @@ keywords: [color field, input]
33
33
<HeaderInfo
34
34
packageData={packageData}
35
35
componentNames={['ColorField']}
36
-
sourceData={[]} />
36
+
sourceData={[]}
37
+
since="3.35.0" />
37
38
38
39
## Example
39
40
@@ -44,7 +45,7 @@ keywords: [color field, input]
44
45
## Value
45
46
46
47
A ColorField's `value` is empty by default, but an initial, uncontrolled, value can be provided using the `defaultValue` prop.
47
-
Alternatively, a controlled value can be provided using the `value` prop. The value provided to either of these props should be a color string or <TypeLinklinks={colorTypes.links}type={colorTypes.exports.Color} /> object.
48
+
Alternatively, a controlled value can be provided using the `value` prop. The value provided to either of these props should be a color string or <TypeLinklinks={colorTypes.links}type={colorTypes.exports.Color} /> object.
48
49
49
50
In the example below, the <TypeLinklinks={statelyDocs.links}type={statelyDocs.exports.parseColor} /> function is used to parse the initial color
0 commit comments