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
docs: Update RangeCalendar for api consitency, add docs for nonce, and TagGroup onAction docs (adobe#9910)
* update RangeCalendar interactOutsideBehavior to commitBehavior
* nonce docs
* modify warning for missing dialog labelling
* update taggroup selection docs to include actions
* slight change to description copy for clarity
* expandable tableview migration update and nits
* review comments
* add onAction to RAC Tags
* add test for onAction set on Tag directly
* fix combobox section className type
---------
Co-authored-by: Devon Govett <devongovett@gmail.com>
Copy file name to clipboardExpand all lines: packages/dev/s2-docs/pages/react-aria/TagGroup.mdx
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ import {TagGroup, Tag} from 'vanilla-starter/TagGroup';
101
101
<Content>Due to [HTML spec limitations](https://github.com/w3c/html-aria/issues/473), tags cannot be rendered as `<a>` elements. React Aria handles link clicks with JavaScript and triggers native navigation. When using a client-side router, use the `onAction` event to programmatically trigger navigation instead of the `href` prop.</Content>
102
102
</InlineAlert>
103
103
104
-
## Selection
104
+
## Selection and actions
105
105
106
106
Use the `selectionMode` prop to enable single or multiple selection. The selected items can be controlled via the `selectedKeys` prop, matching the `id` prop of the items. Items can be disabled with the `isDisabled` prop. See the [selection guide](selection?component=TagGroup) for more details.
Copy file name to clipboardExpand all lines: packages/dev/s2-docs/pages/react-aria/frameworks.mdx
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,9 @@ export const description = 'How to integrate with your framework.';
73
73
}
74
74
```
75
75
</Step>
76
+
<Step>
77
+
<Counter />If you are using a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) with a nonce, add a `<meta property="csp-nonce">` tag to your document head, setting the `content` attribute to the generated nonce value. React Aria automatically reads the nonce from this tag.
78
+
</Step>
76
79
</StepList>
77
80
</TabPanel>
78
81
<TabPanelid="react-router">
@@ -184,6 +187,9 @@ export const description = 'How to integrate with your framework.';
184
187
});
185
188
```
186
189
</Step>
190
+
<Step>
191
+
<Counter />If you are using a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) with a nonce, add a `<meta property="csp-nonce">` tag to your document head, setting the `content` attribute to the generated nonce value. React Aria automatically reads the nonce from this tag.
192
+
</Step>
187
193
</StepList>
188
194
</TabPanel>
189
195
<TabPanelid="parcel">
@@ -213,6 +219,9 @@ export const description = 'How to integrate with your framework.';
213
219
}
214
220
```
215
221
</Step>
222
+
<Step>
223
+
<Counter />If you are using a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) with a nonce, add a `<meta property="csp-nonce">` tag to your document head, setting the `content` attribute to the generated nonce value. React Aria automatically reads the nonce from this tag.
224
+
</Step>
216
225
</StepList>
217
226
</TabPanel>
218
227
<TabPanelid="vite">
@@ -243,6 +252,9 @@ export const description = 'How to integrate with your framework.';
243
252
});
244
253
```
245
254
</Step>
255
+
<Step>
256
+
<Counter />If you are using a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) with a nonce, configure [`html.cspNonce`](https://vite.dev/config/shared-options.html#html-cspnonce) in `vite.config.ts`. React Aria automatically reads the nonce that Vite injects.
257
+
</Step>
246
258
</StepList>
247
259
</TabPanel>
248
260
<TabPanelid="webpack">
@@ -270,6 +282,9 @@ export const description = 'How to integrate with your framework.';
270
282
};
271
283
```
272
284
</Step>
285
+
<Step>
286
+
<Counter />If you are using a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) with a nonce, configure [`__webpack_nonce__`](https://webpack.js.org/guides/csp/) in your entry script. React Aria automatically reads the nonce from the webpack global.
287
+
</Step>
273
288
</StepList>
274
289
</TabPanel>
275
290
<TabPanelid="rollup">
@@ -297,6 +312,9 @@ export const description = 'How to integrate with your framework.';
297
312
};
298
313
```
299
314
</Step>
315
+
<Step>
316
+
<Counter />If you are using a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) with a nonce, add a `<meta property="csp-nonce">` tag to your document head, setting the `content` attribute to the generated nonce value. React Aria automatically reads the nonce from this tag.
317
+
</Step>
300
318
</StepList>
301
319
</TabPanel>
302
320
<TabPanelid="esbuild">
@@ -324,6 +342,9 @@ export const description = 'How to integrate with your framework.';
324
342
});
325
343
```
326
344
</Step>
345
+
<Step>
346
+
<Counter />If you are using a [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) with a nonce, add a `<meta property="csp-nonce">` tag to your document head, setting the `content` attribute to the generated nonce value. React Aria automatically reads the nonce from this tag.
Copy file name to clipboardExpand all lines: packages/dev/s2-docs/pages/s2/TagGroup.mdx
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ import {Link} from '@react-spectrum/s2/Link';
201
201
</TagGroup>
202
202
```
203
203
204
-
## Selection
204
+
## Selection and actions
205
205
206
206
Use the `selectionMode` prop to enable single or multiple selection. The selected items can be controlled via the `selectedKeys` prop, matching the `id` prop of the items. Items can be disabled with the `isDisabled` prop. See the [selection guide](selection?component=TagGroup) for more details.
0 commit comments