@iress-oss/ids-mcp-server 5.15.0 → 6.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generated/docs/components-alert-docs.md +579 -7
- package/generated/docs/components-autocomplete-docs.md +694 -15
- package/generated/docs/components-autocomplete-recipes-docs.md +1 -1
- package/generated/docs/components-badge-docs.md +442 -59
- package/generated/docs/components-button-docs.md +1150 -70
- package/generated/docs/components-buttongroup-docs.md +441 -3
- package/generated/docs/components-card-docs.md +487 -37
- package/generated/docs/components-checkbox-docs.md +506 -5
- package/generated/docs/components-checkboxgroup-docs.md +586 -191
- package/generated/docs/components-checkboxgroup-recipes-docs.md +3 -3
- package/generated/docs/components-col-docs.md +451 -36
- package/generated/docs/components-container-docs.md +32 -0
- package/generated/docs/components-divider-docs.md +427 -27
- package/generated/docs/components-expander-docs.md +487 -108
- package/generated/docs/components-field-docs.md +1400 -68
- package/generated/docs/components-filter-docs.md +268 -55
- package/generated/docs/components-hide-docs.md +447 -10
- package/generated/docs/components-icon-docs.md +522 -259
- package/generated/docs/components-image-docs.md +493 -0
- package/generated/docs/components-inline-docs.md +1179 -44
- package/generated/docs/components-input-docs.md +544 -12
- package/generated/docs/components-input-recipes-docs.md +4 -4
- package/generated/docs/components-inputcurrency-docs.md +532 -0
- package/generated/docs/components-inputcurrency-recipes-docs.md +4 -5
- package/generated/docs/components-introduction-docs.md +450 -0
- package/generated/docs/components-label-docs.md +454 -27
- package/generated/docs/components-link-docs.md +586 -0
- package/generated/docs/components-menu-docs.md +531 -89
- package/generated/docs/components-menu-menuitem-docs.md +556 -10
- package/generated/docs/components-modal-docs.md +814 -55
- package/generated/docs/components-panel-docs.md +418 -198
- package/generated/docs/components-placeholder-docs.md +420 -1
- package/generated/docs/components-popover-docs.md +1097 -32
- package/generated/docs/components-popover-recipes-docs.md +39 -73
- package/generated/docs/components-progress-docs.md +464 -0
- package/generated/docs/components-provider-docs.md +57 -2
- package/generated/docs/components-radio-docs.md +460 -4
- package/generated/docs/components-radiogroup-docs.md +586 -116
- package/generated/docs/components-readonly-docs.md +450 -4
- package/generated/docs/components-richselect-docs.md +4660 -1257
- package/generated/docs/components-row-docs.md +2065 -588
- package/generated/docs/components-select-docs.md +489 -5
- package/generated/docs/components-skeleton-docs.md +399 -16
- package/generated/docs/components-skeleton-recipes-docs.md +7 -7
- package/generated/docs/components-skiplink-docs.md +548 -27
- package/generated/docs/components-slideout-docs.md +648 -150
- package/generated/docs/components-slider-docs.md +515 -33
- package/generated/docs/components-spinner-docs.md +393 -2
- package/generated/docs/components-stack-docs.md +732 -74
- package/generated/docs/components-table-ag-grid-docs.md +497 -127
- package/generated/docs/components-table-docs.md +1049 -27
- package/generated/docs/components-tabset-docs.md +454 -27
- package/generated/docs/components-tabset-tab-docs.md +464 -0
- package/generated/docs/components-tag-docs.md +452 -19
- package/generated/docs/components-text-docs.md +322 -131
- package/generated/docs/components-toaster-docs.md +463 -53
- package/generated/docs/components-toggle-docs.md +476 -20
- package/generated/docs/components-tooltip-docs.md +443 -7
- package/generated/docs/components-validationmessage-docs.md +933 -13
- package/generated/docs/extensions-editor-docs.md +906 -13
- package/generated/docs/extensions-editor-recipes-docs.md +51 -1
- package/generated/docs/foundations-accessibility-docs.md +1 -23
- package/generated/docs/foundations-grid-docs.md +74 -0
- package/generated/docs/foundations-introduction-docs.md +6 -4
- package/generated/docs/foundations-responsive-breakpoints-docs.md +193 -0
- package/generated/docs/foundations-tokens-colour-docs.md +564 -0
- package/generated/docs/foundations-tokens-elevation-docs.md +155 -0
- package/generated/docs/foundations-tokens-introduction-docs.md +190 -0
- package/generated/docs/foundations-tokens-radius-docs.md +71 -0
- package/generated/docs/foundations-tokens-spacing-docs.md +89 -0
- package/generated/docs/foundations-tokens-typography-docs.md +322 -0
- package/generated/docs/foundations-z-index-stacking-docs.md +31 -0
- package/generated/docs/guidelines.md +1537 -295
- package/generated/docs/introduction-docs.md +65 -21
- package/generated/docs/news-version-6-docs.md +93 -0
- package/generated/docs/patterns-form-docs.md +3902 -0
- package/generated/docs/patterns-form-recipes-docs.md +1370 -0
- package/generated/docs/patterns-introduction-docs.md +24 -0
- package/generated/docs/patterns-loading-docs.md +2940 -201
- package/generated/docs/resources-introduction-docs.md +38 -0
- package/generated/docs/resources-mcp-server-docs.md +27 -0
- package/generated/docs/styling-props-colour-docs.md +172 -0
- package/generated/docs/styling-props-elevation-docs.md +88 -0
- package/generated/docs/styling-props-radius-docs.md +86 -0
- package/generated/docs/styling-props-reference-docs.md +160 -0
- package/generated/docs/styling-props-screen-readers-docs.md +71 -0
- package/generated/docs/styling-props-sizing-docs.md +627 -0
- package/generated/docs/styling-props-spacing-docs.md +2282 -0
- package/generated/docs/styling-props-typography-docs.md +121 -0
- package/generated/docs/themes-available-themes-docs.md +29 -29
- package/generated/docs/themes-introduction-docs.md +1 -1
- package/package.json +3 -22
- package/generated/docs/components-button-recipes-docs.md +0 -76
- package/generated/docs/components-card-recipes-docs.md +0 -89
- package/generated/docs/components-combobox-docs.md +0 -1016
- package/generated/docs/components-form-docs.md +0 -2410
- package/generated/docs/components-form-recipes-docs.md +0 -886
- package/generated/docs/components-navbar-docs.md +0 -291
- package/generated/docs/components-navbar-recipes-docs.md +0 -413
- package/generated/docs/components-toaster-toast-docs.md +0 -157
- package/generated/docs/foundations-colours-docs.md +0 -257
- package/generated/docs/foundations-typography-docs.md +0 -191
- package/generated/docs/resources-changelog-docs.md +0 -6
- package/generated/docs/themes-tokens-docs.md +0 -1200
|
@@ -6,6 +6,14 @@ Overview
|
|
|
6
6
|
|
|
7
7
|
Slideouts are used to show additional information or to allow users to perform secondary tasks without leaving their normal workflow.
|
|
8
8
|
|
|
9
|
+
* * *
|
|
10
|
+
|
|
11
|
+
Updated
|
|
12
|
+
|
|
13
|
+
**Recently updated**
|
|
14
|
+
|
|
15
|
+
This component has been recently updated with new props. The props have been marked as beta. Please tell us if there are any issues.
|
|
16
|
+
|
|
9
17
|
Read more
|
|
10
18
|
|
|
11
19
|
[](#use-a-slideout-when)Use a slideout when:
|
|
@@ -14,7 +22,7 @@ Read more
|
|
|
14
22
|
* Providing supplemental tasks that require the underlying page to still be visible
|
|
15
23
|
* Providing non-essential information related to the underlying page
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
Toggle slideout
|
|
18
26
|
|
|
19
27
|
Hide code
|
|
20
28
|
|
|
@@ -22,18 +30,18 @@ Hide code
|
|
|
22
30
|
|
|
23
31
|
const Story \= () \=> {
|
|
24
32
|
const { showSlideout } \= useSlideout();
|
|
25
|
-
const SLIDEOUT\_ID \= 'storybook-slideout';
|
|
26
|
-
return (
|
|
27
|
-
|
|
33
|
+
const SLIDEOUT\_ID \= 'storybook-slideout';
|
|
34
|
+
return (
|
|
35
|
+
<\>
|
|
28
36
|
<IressButton onClick\={() \=> showSlideout(SLIDEOUT\_ID)}\>
|
|
29
|
-
|
|
37
|
+
Toggle slideout </IressButton\>
|
|
30
38
|
<IressSlideout
|
|
31
39
|
footer\="Footer slot"
|
|
32
40
|
id\="storybook-slideout"
|
|
33
41
|
\>
|
|
34
42
|
Slideout content </IressSlideout\>
|
|
35
43
|
</\>
|
|
36
|
-
);
|
|
44
|
+
);
|
|
37
45
|
};
|
|
38
46
|
|
|
39
47
|
export const App \= () \=> (
|
|
@@ -44,6 +52,539 @@ export const App \= () \=> (
|
|
|
44
52
|
|
|
45
53
|
Copy
|
|
46
54
|
|
|
55
|
+
[](#props)Props
|
|
56
|
+
---------------
|
|
57
|
+
|
|
58
|
+
| Name | Description | Default | Control |
|
|
59
|
+
| --- | --- | --- | --- |
|
|
60
|
+
| bg |
|
|
61
|
+
**`bg`** sets the background color of an element using the `background-color` css property using the color tokens in the design system.
|
|
62
|
+
|
|
63
|
+
We recommend using the following token values for best background contrast:
|
|
64
|
+
|
|
65
|
+
* `colour.primary.fill` for primary backgrounds that need to stand out
|
|
66
|
+
* `colour.primary.surface` for primary backgrounds that need to be less prominent
|
|
67
|
+
* `colour.neutral.10` for the base background color, normally white in light mode or shade of grey in dark mode
|
|
68
|
+
* `colour.neutral.20` for a slightly darker background color, used in neutral state components
|
|
69
|
+
* `colour.system.danger.fill` for error backgrounds that need to stand out
|
|
70
|
+
* `colour.system.danger.surface` for error backgrounds that need to be less prominent
|
|
71
|
+
* `colour.system.success.fill` for success backgrounds that need to stand out
|
|
72
|
+
* `colour.system.success.surface` for success backgrounds that need to be less prominent
|
|
73
|
+
* `colour.system.warning.fill` for warning backgrounds that need to stand out
|
|
74
|
+
* `colour.system.warning.surface` for warning backgrounds that need to be less prominent
|
|
75
|
+
* `colour.system.info.fill` for info backgrounds that need to stand out
|
|
76
|
+
* `colour.system.info.surface` for info backgrounds that need to be less prominent
|
|
77
|
+
|
|
78
|
+
ResponsiveProp<ColorToken> | undefined
|
|
79
|
+
|
|
80
|
+
| \- | Set object |
|
|
81
|
+
| borderRadius |
|
|
82
|
+
|
|
83
|
+
The **`border-radius`** CSS property rounds the corners of an element's outer border edge using the radius tokens in the design system.
|
|
84
|
+
|
|
85
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
86
|
+
| --- | --- | --- | --- | --- |
|
|
87
|
+
| **4** | **4** | **5** | **12** | **9** |
|
|
88
|
+
| 1 _\-x-_ | | 3 _\-x-_ | | |
|
|
89
|
+
|
|
90
|
+
ResponsiveProp<RadiusToken> | undefined
|
|
91
|
+
|
|
92
|
+
| \- | Set object |
|
|
93
|
+
| children |
|
|
94
|
+
|
|
95
|
+
Content to be displayed within the slideout.
|
|
96
|
+
|
|
97
|
+
ReactNode
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
| \- |
|
|
102
|
+
|
|
103
|
+
"Slideout content"
|
|
104
|
+
|
|
105
|
+
|
|
|
106
|
+
| closeText |
|
|
107
|
+
|
|
108
|
+
Screenreader text for close button.
|
|
109
|
+
|
|
110
|
+
stringundefined
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
|
115
|
+
|
|
116
|
+
Close
|
|
117
|
+
|
|
118
|
+
| Set object |
|
|
119
|
+
| color |
|
|
120
|
+
|
|
121
|
+
The **`color`** CSS property sets the foreground color value of an element's text and text decorations using the colour tokens from the design system. It also sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`.
|
|
122
|
+
|
|
123
|
+
We recommend using the following token values for best color contrast:
|
|
124
|
+
|
|
125
|
+
* `colour.primary.onFill` used on top of `colour.primary.fill` for primary text that needs to stand out
|
|
126
|
+
* `colour.primary.text` used on top of `colour.primary.surface` or `colour.neutral.10` for primary text that needs to be less prominent
|
|
127
|
+
* `colour.neutral.70` used on top of `colour.neutral.10` or `colour.neutral.20` for muted text
|
|
128
|
+
* `colour.neutral.80` used on top of `colour.neutral.10` or `colour.neutral.20` for standard text
|
|
129
|
+
* `colour.system.danger.onFill` used on top of `colour.system.danger.fill` for error text that needs to stand out
|
|
130
|
+
* `colour.system.danger.text` used on top of `colour.system.danger.surface` for error text that needs to be less prominent
|
|
131
|
+
* `colour.system.success.onFill` used on top of `colour.system.success.fill` for success text that needs to stand out
|
|
132
|
+
* `colour.system.success.text` used on top of `colour.system.success.surface` for success text that needs to be less prominent
|
|
133
|
+
* `colour.system.warning.onFill` used on top of `colour.system.warning.fill` for warning text that needs to stand out
|
|
134
|
+
* `colour.system.warning.text` used on top of `colour.system.warning.surface` for warning text that needs to be less prominent
|
|
135
|
+
* `colour.system.info.onFill` used on top of `colour.system.info.fill` for informative text that needs to stand out
|
|
136
|
+
* `colour.system.info.text` used on top of `colour.system.info.surface` for informative text that needs to be less prominent
|
|
137
|
+
|
|
138
|
+
ResponsiveProp<ColorToken> | undefined
|
|
139
|
+
|
|
140
|
+
| \- | Set object |
|
|
141
|
+
| container |
|
|
142
|
+
|
|
143
|
+
The container element to render the slideout into. By default, the slideout will render at the end of the document body.
|
|
144
|
+
|
|
145
|
+
FloatingUIContainerundefined
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
| \- | Set object |
|
|
150
|
+
| defaultShow |
|
|
151
|
+
|
|
152
|
+
When set to `true` the slideout will be visible. Use for uncontrolled slideouts.
|
|
153
|
+
|
|
154
|
+
booleanundefined
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
|
159
|
+
|
|
160
|
+
false
|
|
161
|
+
|
|
162
|
+
| Set object |
|
|
163
|
+
| eleToPush |
|
|
164
|
+
|
|
165
|
+
The element that needs to be pushed relative to the slideout. This can be a string selector to match an existing element in the DOM, a html element, or a React reference. Will be ignored if `mode` is not set to `push` or if element does not exist.
|
|
166
|
+
|
|
167
|
+
string | HTMLElement | MutableRefObject<HTMLElement | null> | undefined
|
|
168
|
+
|
|
169
|
+
| \- | Set object |
|
|
170
|
+
| focusable |
|
|
171
|
+
|
|
172
|
+
The `focusable` prop is used to apply the focus elevation when focused. It can be set to `true` to apply focus styles on focus, or `'within'` to apply focus styles when the element or any of its children are focused.
|
|
173
|
+
|
|
174
|
+
"true""within"undefined
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
| \- | Set object |
|
|
179
|
+
| footer |
|
|
180
|
+
|
|
181
|
+
Panel to place slideout controls.
|
|
182
|
+
|
|
183
|
+
ReactNode
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
| \- |
|
|
188
|
+
|
|
189
|
+
"Footer slot"
|
|
190
|
+
|
|
191
|
+
|
|
|
192
|
+
| heading |
|
|
193
|
+
|
|
194
|
+
Sets the heading for the slideout. If passed an element, it will render the element with an id, to ensure its connection to the slideout.
|
|
195
|
+
|
|
196
|
+
string | ReactElement<any, string | JSXElementConstructor<any>> | undefined
|
|
197
|
+
|
|
198
|
+
| \- | Set object |
|
|
199
|
+
| hide |
|
|
200
|
+
|
|
201
|
+
Set **`hide`** to hide an element completely using `display: none`. It can also be set to an object of breakpoints to hide the element at specific breakpoints.
|
|
202
|
+
|
|
203
|
+
Hide on all breakpoints: `hide: true` Hide on specific breakpoints: `hide: { xs: false, sm: true, md: false, lg: true, xl: false, xxl: true }`
|
|
204
|
+
|
|
205
|
+
Notes:
|
|
206
|
+
|
|
207
|
+
* If you need to hide an element but allow it to be visible to screen readers, use the `srOnly` prop instead.
|
|
208
|
+
* Consider if you can conditionally render the element instead of hiding it.
|
|
209
|
+
|
|
210
|
+
ResponsiveProp<boolean> | undefined
|
|
211
|
+
|
|
212
|
+
| \- | Set object |
|
|
213
|
+
| id |
|
|
214
|
+
|
|
215
|
+
Unique ID for the slideout. Use if you would like to open this slideout from anywhere in your app using the `useSlideout` hook.
|
|
216
|
+
|
|
217
|
+
stringundefined
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
| \- |
|
|
222
|
+
|
|
223
|
+
"storybook-slideout"
|
|
224
|
+
|
|
225
|
+
|
|
|
226
|
+
| layerStyle |
|
|
227
|
+
|
|
228
|
+
Elevate a layer by using a **`layerStyle`**. These are connected to the elevation tokens in the design system. They can be combined to create hierarchy and structure.
|
|
229
|
+
|
|
230
|
+
* `elevation.raised`: Raised elevations sit slightly higher than other content. They are reserved for cards that can be moved, such as Jira issue cards and Trello cards. In special circumstances, they can be used for cards as a way to provide additional heirarchy or emphasis.
|
|
231
|
+
* `elevation.floating`: Floating is the highest elevation available. It is reserved for a UI that sits over another UI, such as modals, dialogs, dropdown menus, floating toolbars, and floating single-action buttons.
|
|
232
|
+
* `elevation.overflow`: Overflow is a shadow indicating content has scrolled outside a view. It can be used for vertical or horizontal scroll. An example of overflow shadows is the horizontal scroll in tables on a Confluence page.
|
|
233
|
+
|
|
234
|
+
ResponsiveProp<"elevation.raised" | "elevation.floating" | "elevation.overflow" | "elevation.focus" | "elevation.focusCompact"> | undefined
|
|
235
|
+
|
|
236
|
+
| \- | Set object |
|
|
237
|
+
| m |
|
|
238
|
+
|
|
239
|
+
The **`m`** property is short for `margin`, and sets the margin area on all four sides of an element.
|
|
240
|
+
|
|
241
|
+
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
242
|
+
|
|
243
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
244
|
+
| --- | --- | --- | --- | --- |
|
|
245
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
246
|
+
|
|
247
|
+
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
248
|
+
|
|
249
|
+
| \- | Set object |
|
|
250
|
+
| maxWidth |
|
|
251
|
+
|
|
252
|
+
The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`.
|
|
253
|
+
|
|
254
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
255
|
+
| --- | --- | --- | --- | --- |
|
|
256
|
+
| **1** | **1** | **1** | **12** | **7** |
|
|
257
|
+
|
|
258
|
+
ResponsiveProp<"auto" | SizeToken | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | ... 8 more ... | "11/12"> | undefined
|
|
259
|
+
|
|
260
|
+
| \- | Set object |
|
|
261
|
+
| mb |
|
|
262
|
+
|
|
263
|
+
The **`mb`** property is short for `margin-bottom` and sets the margin area on the bottom side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
264
|
+
|
|
265
|
+
It uses the spacing tokens in the design system.
|
|
266
|
+
|
|
267
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
268
|
+
| --- | --- | --- | --- | --- |
|
|
269
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
270
|
+
|
|
271
|
+
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
272
|
+
|
|
273
|
+
| \- | Set object |
|
|
274
|
+
| ml |
|
|
275
|
+
|
|
276
|
+
The **`ml`** property is short for `margin-left` and sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
277
|
+
|
|
278
|
+
It uses the spacing tokens in the design system.
|
|
279
|
+
|
|
280
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
281
|
+
| --- | --- | --- | --- | --- |
|
|
282
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
283
|
+
|
|
284
|
+
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
285
|
+
|
|
286
|
+
| \- | Set object |
|
|
287
|
+
| mode |
|
|
288
|
+
|
|
289
|
+
Sets how the Slideout interacts with the content of the page. `overlay` overlays the page content, obscuring the content below. `push` will push the element (specified by `eleToPush`) across the page. `push` will revert back to `overlay` if `eleToPush` is not specified or if the screen size < 1200px.
|
|
290
|
+
|
|
291
|
+
"overlay""push"undefined
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
|
296
|
+
|
|
297
|
+
overlay
|
|
298
|
+
|
|
299
|
+
| Set object |
|
|
300
|
+
| mr |
|
|
301
|
+
|
|
302
|
+
The **`mr`** property is short for `margin-right` and sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
303
|
+
|
|
304
|
+
It uses the spacing tokens in the design system.
|
|
305
|
+
|
|
306
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
307
|
+
| --- | --- | --- | --- | --- |
|
|
308
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
309
|
+
|
|
310
|
+
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
311
|
+
|
|
312
|
+
| \- | Set object |
|
|
313
|
+
| mt |
|
|
314
|
+
|
|
315
|
+
The **`mt`** property is short for `margin-top` and sets the margin area on the top side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.
|
|
316
|
+
|
|
317
|
+
It uses the spacing tokens in the design system.
|
|
318
|
+
|
|
319
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
320
|
+
| --- | --- | --- | --- | --- |
|
|
321
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
322
|
+
|
|
323
|
+
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
324
|
+
|
|
325
|
+
| \- | Set object |
|
|
326
|
+
| mx |
|
|
327
|
+
|
|
328
|
+
The **`mx`** property is short for `margin-inline`. It is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
|
|
329
|
+
|
|
330
|
+
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
331
|
+
|
|
332
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
333
|
+
| --- | --- | --- | --- | --- |
|
|
334
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
335
|
+
|
|
336
|
+
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
337
|
+
|
|
338
|
+
| \- | Set object |
|
|
339
|
+
| my |
|
|
340
|
+
|
|
341
|
+
The **`my`** property is short for `margin-block`. It defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
|
|
342
|
+
|
|
343
|
+
It uses the spacing tokens in the design system. You can also use the negative values to overlap elements or ignore padding based on the design requirements.
|
|
344
|
+
|
|
345
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
346
|
+
| --- | --- | --- | --- | --- |
|
|
347
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
348
|
+
|
|
349
|
+
ResponsiveProp<SpacingToken | "auto"> | undefined
|
|
350
|
+
|
|
351
|
+
| \- | Set object |
|
|
352
|
+
| noGutter |
|
|
353
|
+
|
|
354
|
+
The **`noGutter`** property is used to remove the bottom margin from the last child of a component. This is useful when you want to avoid extra spacing at the end of a layout.
|
|
355
|
+
|
|
356
|
+
booleanundefined
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
| \- | Set object |
|
|
361
|
+
| onEntered |
|
|
362
|
+
|
|
363
|
+
Emitted when the slideout has opened.
|
|
364
|
+
|
|
365
|
+
(() => void) | undefined
|
|
366
|
+
|
|
367
|
+
| \- | \- |
|
|
368
|
+
| onExited |
|
|
369
|
+
|
|
370
|
+
Emitted when the slideout has closed.
|
|
371
|
+
|
|
372
|
+
(() => void) | undefined
|
|
373
|
+
|
|
374
|
+
| \- | \- |
|
|
375
|
+
| onShowChange |
|
|
376
|
+
|
|
377
|
+
Emitted when the slideout has opened or closed internally. Use for controlled slideouts.
|
|
378
|
+
|
|
379
|
+
((show: boolean, reason?: OpenChangeReason | undefined) => void) | undefined
|
|
380
|
+
|
|
381
|
+
| \- | \- |
|
|
382
|
+
| onStatus |
|
|
383
|
+
|
|
384
|
+
Emitted when the slideout has mounted, unmounted, opened or closed. Open and close occur before animation begins.
|
|
385
|
+
|
|
386
|
+
((status: "initial" | "open" | "close" | "unmounted") => void) | undefined
|
|
387
|
+
|
|
388
|
+
| \- | \- |
|
|
389
|
+
| p |
|
|
390
|
+
|
|
391
|
+
The **`p`** property is short for `padding`, and sets the padding area on all four sides of an element at once.
|
|
392
|
+
|
|
393
|
+
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
394
|
+
|
|
395
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
396
|
+
| --- | --- | --- | --- | --- |
|
|
397
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
398
|
+
|
|
399
|
+
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
400
|
+
|
|
401
|
+
| \- | Set object |
|
|
402
|
+
| pb |
|
|
403
|
+
|
|
404
|
+
The **`pb`** property is short for `padding-bottom` and sets the padding area on the bottom side of an element.
|
|
405
|
+
|
|
406
|
+
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
407
|
+
|
|
408
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
409
|
+
| --- | --- | --- | --- | --- |
|
|
410
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
411
|
+
|
|
412
|
+
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
413
|
+
|
|
414
|
+
| \- | Set object |
|
|
415
|
+
| pl |
|
|
416
|
+
|
|
417
|
+
The **`pl`** property is short for `padding-left` and sets the padding area on the left side of an element.
|
|
418
|
+
|
|
419
|
+
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
420
|
+
|
|
421
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
422
|
+
| --- | --- | --- | --- | --- |
|
|
423
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
424
|
+
|
|
425
|
+
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
426
|
+
|
|
427
|
+
| \- | Set object |
|
|
428
|
+
| position |
|
|
429
|
+
|
|
430
|
+
Position of the slideout relative to the page. `left` or `right`.
|
|
431
|
+
|
|
432
|
+
"left""right"undefined
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
|
437
|
+
|
|
438
|
+
right
|
|
439
|
+
|
|
440
|
+
| Set object |
|
|
441
|
+
| pr |
|
|
442
|
+
|
|
443
|
+
The **`pr`** property is short for `padding-right` and sets the padding area on the right side of an element.
|
|
444
|
+
|
|
445
|
+
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
446
|
+
|
|
447
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
448
|
+
| --- | --- | --- | --- | --- |
|
|
449
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
450
|
+
|
|
451
|
+
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
452
|
+
|
|
453
|
+
| \- | Set object |
|
|
454
|
+
| pt |
|
|
455
|
+
|
|
456
|
+
The **`pt`** property is short for `padding-top` and sets the padding area on the top side of an element.
|
|
457
|
+
|
|
458
|
+
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
459
|
+
|
|
460
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
461
|
+
| --- | --- | --- | --- | --- |
|
|
462
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
463
|
+
|
|
464
|
+
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
465
|
+
|
|
466
|
+
| \- | Set object |
|
|
467
|
+
| px |
|
|
468
|
+
|
|
469
|
+
The **`px`** property is short for `padding-inline`. It is a shorthand property that defines both the logical inline start and end paddings of an element, which maps to physical paddings depending on the element's writing mode, directionality, and text orientation.
|
|
470
|
+
|
|
471
|
+
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
472
|
+
|
|
473
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
474
|
+
| --- | --- | --- | --- | --- |
|
|
475
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
476
|
+
|
|
477
|
+
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
478
|
+
|
|
479
|
+
| \- | Set object |
|
|
480
|
+
| py |
|
|
481
|
+
|
|
482
|
+
The **`py`** property is short for `padding-block`. It defines the logical block start and end paddings of an element, which maps to physical paddings depending on the element's writing mode, directionality, and text orientation.
|
|
483
|
+
|
|
484
|
+
It uses the spacing tokens in the design system. Padding cannot use negative values, if you need to overlap elements or ignore padding, use the margin property instead.
|
|
485
|
+
|
|
486
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
487
|
+
| --- | --- | --- | --- | --- |
|
|
488
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
489
|
+
|
|
490
|
+
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
491
|
+
|
|
492
|
+
| \- | Set object |
|
|
493
|
+
| rowGap |
|
|
494
|
+
|
|
495
|
+
The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows.
|
|
496
|
+
|
|
497
|
+
Note: It only has an effect when used as a direct child of a layout component, such as IressRow, IressStack or IressInline.
|
|
498
|
+
|
|
499
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
500
|
+
| --- | --- | --- | --- | --- |
|
|
501
|
+
| **47** | **52** | **10.1** | **16** | No |
|
|
502
|
+
|
|
503
|
+
ResponsiveProp<"xs" | "sm" | "md" | "lg" | "xl" | "none" | "spacing.000" | "spacing.050" | "spacing.100" | "spacing.150" | "spacing.200" | "spacing.250" | "spacing.300" | "spacing.350" | ... 9 more ... | "slider.tick"> | undefined
|
|
504
|
+
|
|
505
|
+
| \- | Set object |
|
|
506
|
+
| show |
|
|
507
|
+
|
|
508
|
+
When set to `true` the slideout will be visible. Use for controlled slideouts.
|
|
509
|
+
|
|
510
|
+
booleanundefined
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
| \- | \- |
|
|
515
|
+
| size |
|
|
516
|
+
|
|
517
|
+
Accepts a single `SlideoutSize`. Slideouts will display at 100% for mobile screens (<576px).
|
|
518
|
+
|
|
519
|
+
"sm""md"undefined
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
|
524
|
+
|
|
525
|
+
sm
|
|
526
|
+
|
|
527
|
+
| Set object |
|
|
528
|
+
| srOnly |
|
|
529
|
+
|
|
530
|
+
Set **`srOnly`** to hide an element visually but still make it accessible to screen readers. It can also be set to an object of breakpoints to hide the element at specific breakpoints.
|
|
531
|
+
|
|
532
|
+
Hide on all breakpoints: `srOnly: true` Hide on specific breakpoints: `srOnly: { xs: false, sm: true, md: false, lg: true, xl: false, xxl: true }`
|
|
533
|
+
|
|
534
|
+
ResponsiveProp<boolean> | undefined
|
|
535
|
+
|
|
536
|
+
| \- | Set object |
|
|
537
|
+
| stretch |
|
|
538
|
+
|
|
539
|
+
The **`stretch`** property is used to stretch an element to fill the available space in its parent container. It sets the `height` property to `100%` and `alignSelf` to `stretch`, allowing the element to expand and contract based on the size of its parent.
|
|
540
|
+
|
|
541
|
+
booleanundefined
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
| \- | Set object |
|
|
546
|
+
| textAlign |
|
|
547
|
+
|
|
548
|
+
The **`text-align`** CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box.
|
|
549
|
+
|
|
550
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
551
|
+
| --- | --- | --- | --- | --- |
|
|
552
|
+
| **1** | **1** | **1** | **12** | **3** |
|
|
553
|
+
|
|
554
|
+
ResponsiveProp<"center" | "left" | "right" | "inherit" | "justify"> | undefined
|
|
555
|
+
|
|
556
|
+
| \- | Set object |
|
|
557
|
+
| textStyle |
|
|
558
|
+
|
|
559
|
+
Select the typography to be used using the **`textStyle`** prop. These are connected to the typography tokens in the design system.'
|
|
560
|
+
|
|
561
|
+
* `typography.body.sm` - Use for small components such as badges and disclaimers, as well as compact variations of tables and lists.
|
|
562
|
+
* `typography.body.md` - The most commonly used body text size, used for most text content in the product and the default state of all components in the design system.
|
|
563
|
+
* `typography.body.lg` - Use for tag lines, subtitles, and other large text content in the product.
|
|
564
|
+
* `typography.heading.1` - Use for the main page title to establish a clear hierarchy. There is typically only one H1 per screen, emphasising the primary purpose or context of the page.
|
|
565
|
+
* `typography.heading.2` - Use for primary section headings within a page to organise content and guide the user through key areas. Also suitable for large components—such as modals—where space allows and where it pairs well with body.md or body.lg.
|
|
566
|
+
* `typography.heading.3` - Use for sub-sections under H2s to further structure content and maintain a clear visual hierarchy. Ideal for breaking down complex sections into manageable parts.
|
|
567
|
+
* `typography.heading.4` - Use for supporting headings within content blocks or small components where space is limited—such as table headers, cards, or side panels. Provides structure without overwhelming the layout.
|
|
568
|
+
* `typography.heading.5` - Use for minor labels or titles in compact UI elements, such as cards, sidebars, or inline labels. Best used to emphasise supplementary information without drawing too much attention. Works well with body.sm and is ideal for subtle content like fine print. Use sparingly to preserve typographic hierarchy.
|
|
569
|
+
* `typography.code` - Used to display code snippets in the product, such as in the API documentation.
|
|
570
|
+
|
|
571
|
+
ResponsiveProp<"typography.heading.1" | "typography.heading.2" | "typography.heading.3" | "typography.heading.4" | "typography.heading.5" | "typography.body.sm" | "typography.body.sm.regular" | ... 10 more ... | "typography.code"> | undefined
|
|
572
|
+
|
|
573
|
+
| \- | Set object |
|
|
574
|
+
| width |
|
|
575
|
+
|
|
576
|
+
The **`width`** CSS property sets an element's width. By default, it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area.
|
|
577
|
+
|
|
578
|
+
This prop only allows widths available throughout the component library. To use a custom width, you need to use the `style` prop, or add a custom class to the element and use CSS.
|
|
579
|
+
|
|
580
|
+
| Chrome | Firefox | Safari | Edge | IE |
|
|
581
|
+
| --- | --- | --- | --- | --- |
|
|
582
|
+
| **1** | **1** | **1** | **12** | **4** |
|
|
583
|
+
|
|
584
|
+
ResponsiveProp<"auto" | SizeToken | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | ... 8 more ... | "11/12"> | undefined
|
|
585
|
+
|
|
586
|
+
| \- | Set object |
|
|
587
|
+
|
|
47
588
|
[](#controlling-the-slideout)Controlling the slideout
|
|
48
589
|
-----------------------------------------------------
|
|
49
590
|
|
|
@@ -122,6 +663,27 @@ const SlideoutWithTrigger \= ({
|
|
|
122
663
|
|
|
123
664
|
Copy
|
|
124
665
|
|
|
666
|
+
#### [](#provider-api)Props
|
|
667
|
+
|
|
668
|
+
These are some settings you can use to customise the provider, such as setting where the slideouts are rendered in the DOM.
|
|
669
|
+
|
|
670
|
+
| Name | Description | Default | Control |
|
|
671
|
+
| --- | --- | --- | --- |
|
|
672
|
+
| children |
|
|
673
|
+
\-
|
|
674
|
+
|
|
675
|
+
| \- | \- |
|
|
676
|
+
| container |
|
|
677
|
+
|
|
678
|
+
The container element to render the slideout into. By default, the slideout will render at the end of the document body.
|
|
679
|
+
|
|
680
|
+
FloatingUIContainerundefined
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
| \- | \- |
|
|
685
|
+
| Show Storybook only itemsStorybook only | Show Storybook only items |
|
|
686
|
+
|
|
125
687
|
[](#examples)Examples
|
|
126
688
|
---------------------
|
|
127
689
|
|
|
@@ -137,53 +699,58 @@ Hide code
|
|
|
137
699
|
|
|
138
700
|
const Story \= () \=> {
|
|
139
701
|
const { showSlideout } \= useSlideout();
|
|
140
|
-
const SLIDEOUT\_ID \= 'storybook-slideout';
|
|
141
|
-
return (
|
|
142
|
-
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
Overlay </h2\>
|
|
152
|
-
For most situations{' '}
|
|
153
|
-
<code\>
|
|
154
|
-
overlay </code\>
|
|
155
|
-
{' '}will be what you need, which is why this is the default behaviour. You do not need to specify the mode if you want your slideout to sit on top of the page.
|
|
156
|
-
</IressSlideout\>
|
|
157
|
-
<IressButton onClick\={() \=> showSlideout("push")}\>
|
|
158
|
-
Push slideout </IressButton\>
|
|
159
|
-
<IressSlideout
|
|
160
|
-
eleToPush\="#storybook-docs"
|
|
161
|
-
footer\=""
|
|
162
|
-
id\="push"
|
|
163
|
-
mode\="push"
|
|
164
|
-
\>
|
|
165
|
-
<IressText\>
|
|
702
|
+
const SLIDEOUT\_ID \= 'storybook-slideout';
|
|
703
|
+
return (
|
|
704
|
+
<IressPanel bg\="alt"\>
|
|
705
|
+
<IressInline gap\="md"\>
|
|
706
|
+
<IressButton onClick\={() \=> showSlideout("overlay")}\>
|
|
707
|
+
Overlay slideout </IressButton\>
|
|
708
|
+
<IressSlideout
|
|
709
|
+
footer\=""
|
|
710
|
+
id\="overlay"
|
|
711
|
+
mode\="overlay"
|
|
712
|
+
\>
|
|
166
713
|
<h2\>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
714
|
+
Overlay </h2\>
|
|
715
|
+
For most situations{' '}
|
|
716
|
+
<code\>
|
|
717
|
+
overlay </code\>
|
|
718
|
+
{' '}will be what you need, which is why this is the default behaviour. You do not need to specify the mode if you want your slideout to sit on top of the page.
|
|
719
|
+
</IressSlideout\>
|
|
720
|
+
<IressButton onClick\={() \=> showSlideout("push")}\>
|
|
721
|
+
Push slideout </IressButton\>
|
|
722
|
+
<IressSlideout
|
|
723
|
+
eleToPush\="#storybook-docs, html"
|
|
724
|
+
footer\=""
|
|
725
|
+
id\="push"
|
|
726
|
+
mode\="push"
|
|
727
|
+
\>
|
|
728
|
+
<IressText\>
|
|
729
|
+
<h2\>
|
|
730
|
+
Push </h2\>
|
|
731
|
+
<p\>
|
|
732
|
+
If you have a data-heavy screen where you need all of the data to be visible when the slideout is open, use{' '}
|
|
733
|
+
<code\>
|
|
734
|
+
push </code\>
|
|
735
|
+
. To allow push to work you will need to supply the ID of the element that needs to be pushed via the{' '}
|
|
736
|
+
<code\>
|
|
737
|
+
eleToPush </code\>
|
|
738
|
+
{' '}prop. If the ID is not supplied, or the element cannot be found, the slideout will revert to{' '}
|
|
739
|
+
<code\>
|
|
740
|
+
overlay </code\>
|
|
741
|
+
{' '}behaviour.
|
|
742
|
+
</p\>
|
|
743
|
+
<p\>
|
|
744
|
+
{\`Be aware though that push will only work on larger screens (>1200px); on smaller screens the slideout will overlay the content.\`}
|
|
745
|
+
</p\>
|
|
746
|
+
<IressPanel bg\="alt"\>
|
|
747
|
+
<CurrentBreakpoint />
|
|
748
|
+
</IressPanel\>
|
|
749
|
+
</IressText\>
|
|
750
|
+
</IressSlideout\>
|
|
751
|
+
</IressInline\>
|
|
752
|
+
</IressPanel\>
|
|
753
|
+
);
|
|
187
754
|
};
|
|
188
755
|
|
|
189
756
|
export const App \= () \=> (
|
|
@@ -207,17 +774,13 @@ Hide code
|
|
|
207
774
|
const Slideouts \= () \=> {
|
|
208
775
|
const { showSlideout } \= useSlideout();
|
|
209
776
|
return (
|
|
210
|
-
<IressInline
|
|
211
|
-
{
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
Slideout opened on the {position}
|
|
218
|
-
</IressSlideout\>
|
|
219
|
-
</\>
|
|
220
|
-
))}
|
|
777
|
+
<IressInline gap\="md" horizontalAlign\="between"\>
|
|
778
|
+
<IressButton onClick\={() \=> showSlideout('right')}\>right</IressButton\>
|
|
779
|
+
<IressSlideout id\="right" position\="right"\>
|
|
780
|
+
Slideout opened on the right </IressSlideout\>
|
|
781
|
+
<IressButton onClick\={() \=> showSlideout('left')}\>left</IressButton\>
|
|
782
|
+
<IressSlideout id\="left" position\="left"\>
|
|
783
|
+
Slideout opened on the left </IressSlideout\>
|
|
221
784
|
</IressInline\>
|
|
222
785
|
);
|
|
223
786
|
};
|
|
@@ -229,48 +792,11 @@ export const SlideoutPositions \= () \=> (
|
|
|
229
792
|
|
|
230
793
|
Copy
|
|
231
794
|
|
|
232
|
-
### [](#backdrop)Backdrop
|
|
233
|
-
|
|
234
|
-
Slideouts can be used with or without a backdrop. Using a backdrop places more emphasis on the slideout, but prevents users from accessing content on the rest of the page. If your users need to interact with page content (for example to copy information), don't use a backdrop.
|
|
235
|
-
|
|
236
|
-
The slideout backdrop works in the same way as the modal backdrop; clicking on the backdrop will close the slideout.
|
|
237
|
-
|
|
238
|
-
Show slideout with backdrop
|
|
239
|
-
|
|
240
|
-
Hide code
|
|
241
|
-
|
|
242
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
243
|
-
|
|
244
|
-
const Story \= () \=> {
|
|
245
|
-
const { showSlideout } \= useSlideout();
|
|
246
|
-
const SLIDEOUT\_ID \= 'storybook-slideout';
|
|
247
|
-
return (
|
|
248
|
-
<\>
|
|
249
|
-
<IressButton onClick\={() \=> showSlideout(SLIDEOUT\_ID)}\>
|
|
250
|
-
Show slideout with backdrop </IressButton\>
|
|
251
|
-
<IressSlideout
|
|
252
|
-
backdrop
|
|
253
|
-
footer\="Footer slot"
|
|
254
|
-
id\="storybook-slideout"
|
|
255
|
-
\>
|
|
256
|
-
Slideout content </IressSlideout\>
|
|
257
|
-
</\>
|
|
258
|
-
);
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
export const App \= () \=> (
|
|
262
|
-
<IressSlideoutProvider\>
|
|
263
|
-
<Story />
|
|
264
|
-
</IressSlideoutProvider\>
|
|
265
|
-
);
|
|
266
|
-
|
|
267
|
-
Copy
|
|
268
|
-
|
|
269
795
|
### [](#size)Size
|
|
270
796
|
|
|
271
|
-
The width of your slideout can be set using the `size` prop. By default it is `sm`, but it can be made larger by setting `size` to `md
|
|
797
|
+
The width of your slideout can be set using the `size` prop. By default it is `sm`, but it can be made larger by setting `size` to `md`.
|
|
272
798
|
|
|
273
|
-
|
|
799
|
+
smmd
|
|
274
800
|
|
|
275
801
|
Hide code
|
|
276
802
|
|
|
@@ -279,14 +805,13 @@ Hide code
|
|
|
279
805
|
const Slideouts \= () \=> {
|
|
280
806
|
const { showSlideout } \= useSlideout();
|
|
281
807
|
return (
|
|
282
|
-
<IressInline
|
|
283
|
-
{
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
))}
|
|
808
|
+
<IressInline gap\="spacing.400"\>
|
|
809
|
+
<IressButton onClick\={() \=> showSlideout('sm')}\>sm</IressButton\>
|
|
810
|
+
<IressSlideout id\="sm" size\="sm"\>
|
|
811
|
+
Small slideout </IressSlideout\>
|
|
812
|
+
<IressButton onClick\={() \=> showSlideout('md')}\>md</IressButton\>
|
|
813
|
+
<IressSlideout id\="md" size\="md"\>
|
|
814
|
+
Medium slideout </IressSlideout\>
|
|
290
815
|
</IressInline\>
|
|
291
816
|
);
|
|
292
817
|
};
|
|
@@ -300,37 +825,11 @@ Copy
|
|
|
300
825
|
|
|
301
826
|
### [](#padding)Padding
|
|
302
827
|
|
|
303
|
-
Slideout padding
|
|
304
|
-
|
|
305
|
-
nonesmmdlg
|
|
306
|
-
|
|
307
|
-
Hide code
|
|
308
|
-
|
|
309
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
828
|
+
Slideout padding now is a global styling prop.
|
|
310
829
|
|
|
311
|
-
|
|
312
|
-
const { showSlideout } \= useSlideout();
|
|
313
|
-
return (
|
|
314
|
-
<IressInline gutter\="md"\>
|
|
315
|
-
{PADDING\_SIZES.map((padding) \=> (
|
|
316
|
-
<\>
|
|
317
|
-
<IressButton onClick\={() \=> showSlideout(padding)}\>
|
|
318
|
-
{padding}
|
|
319
|
-
</IressButton\>
|
|
320
|
-
<IressSlideout id\={padding} padding\={padding}\>
|
|
321
|
-
Slideout opened with {padding} padding </IressSlideout\>
|
|
322
|
-
</\>
|
|
323
|
-
))}
|
|
324
|
-
</IressInline\>
|
|
325
|
-
);
|
|
326
|
-
};
|
|
327
|
-
export const SlideoutPaddings \= () \=> (
|
|
328
|
-
<IressSlideoutProvider\>
|
|
329
|
-
<Slideouts />
|
|
330
|
-
</IressSlideoutProvider\>
|
|
331
|
-
);
|
|
830
|
+
[](/?path=/docs/styling-props-spacing--docs#padding)
|
|
332
831
|
|
|
333
|
-
|
|
832
|
+
[Learn more](/?path=/docs/styling-props-spacing--docs#padding)
|
|
334
833
|
|
|
335
834
|
### [](#footer)Footer
|
|
336
835
|
|
|
@@ -344,9 +843,9 @@ Hide code
|
|
|
344
843
|
|
|
345
844
|
const Story \= () \=> {
|
|
346
845
|
const { showSlideout } \= useSlideout();
|
|
347
|
-
const SLIDEOUT\_ID \= 'storybook-slideout';
|
|
348
|
-
return (
|
|
349
|
-
|
|
846
|
+
const SLIDEOUT\_ID \= 'storybook-slideout';
|
|
847
|
+
return (
|
|
848
|
+
<\>
|
|
350
849
|
<IressButton onClick\={() \=> showSlideout(SLIDEOUT\_ID)}\>
|
|
351
850
|
Show slideout with footer </IressButton\>
|
|
352
851
|
<IressSlideout
|
|
@@ -355,7 +854,7 @@ return (
|
|
|
355
854
|
\>
|
|
356
855
|
Slideout content </IressSlideout\>
|
|
357
856
|
</\>
|
|
358
|
-
);
|
|
857
|
+
);
|
|
359
858
|
};
|
|
360
859
|
|
|
361
860
|
export const App \= () \=> (
|
|
@@ -368,9 +867,9 @@ Copy
|
|
|
368
867
|
|
|
369
868
|
### [](#absolute-position-slideouts)Absolute position slideouts
|
|
370
869
|
|
|
371
|
-
By default, slideout is set to `position: fixed` which means it will appear from the edge of the browser window. By setting the
|
|
870
|
+
By default, slideout is set to `position: fixed` which means it will appear from the edge of the browser window. By setting the `position: 'absolute'` in custom inline style, the slideout can appear from the edge of its closest relative positioned container. You will also need to set the `container` prop to the a reference of the relatively positioned container, so it can appear in the correct place in the DOM.
|
|
372
871
|
|
|
373
|
-
If you're using an absolutely positioned slideout you may also want to change the vertical and horizontal positioning. By default this will be the top left or top right of the container, but you can use
|
|
872
|
+
If you're using an absolutely positioned slideout you may also want to change the vertical and horizontal positioning. By default this will be the top left or top right of the container, but you can use inline style `style={{top: '30px', height: 'calc(100% - 30px)'}}` to adjust that if you need to.
|
|
374
873
|
|
|
375
874
|
Show slideout
|
|
376
875
|
|
|
@@ -390,18 +889,18 @@ import {
|
|
|
390
889
|
IressSlideoutProps,
|
|
391
890
|
} from '@iress-oss/ids-components';
|
|
392
891
|
import { useRef, useState } from 'react';
|
|
892
|
+
import { cssVars } from '@iress-oss/ids-tokens';
|
|
393
893
|
export const AbsolutePositionSlideout \= () \=> {
|
|
394
894
|
const \[show, setShow\] \= useState(false);
|
|
395
895
|
const containerRef \= useRef<HTMLDivElement | null\>(null);
|
|
396
896
|
return (
|
|
397
|
-
<IressStack
|
|
897
|
+
<IressStack gap\="md"\>
|
|
398
898
|
<IressButton onClick\={() \=> setShow(true)}\>Show slideout</IressButton\>
|
|
399
899
|
<div
|
|
400
900
|
ref\={containerRef}
|
|
401
901
|
style\={{
|
|
402
902
|
height: '300px',
|
|
403
|
-
border:
|
|
404
|
-
'1px solid var(--iress-g-border-color, var(--iress-default-border-color))',
|
|
903
|
+
border: \`1px solid ${cssVars.colour.neutral\[30\]}\`,
|
|
405
904
|
padding: '1rem',
|
|
406
905
|
overflow: 'hidden',
|
|
407
906
|
position: 'relative',
|
|
@@ -426,7 +925,7 @@ export const AbsolutePositionSlideout \= () \=> {
|
|
|
426
925
|
onShowChange\={setShow}
|
|
427
926
|
style\={
|
|
428
927
|
{
|
|
429
|
-
|
|
928
|
+
position: 'absolute',
|
|
430
929
|
} as never
|
|
431
930
|
}
|
|
432
931
|
/>
|
|
@@ -527,7 +1026,6 @@ On this page
|
|
|
527
1026
|
* [Examples](#examples)
|
|
528
1027
|
* [Modes](#modes)
|
|
529
1028
|
* [Position](#position)
|
|
530
|
-
* [Backdrop](#backdrop)
|
|
531
1029
|
* [Size](#size)
|
|
532
1030
|
* [Padding](#padding)
|
|
533
1031
|
* [Footer](#footer)
|