@react-ui-org/react-ui 0.47.0 → 0.49.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/dist/lib.development.js +465 -93
- package/dist/lib.js +1 -1
- package/package.json +1 -1
- package/src/lib/components/Alert/Alert.jsx +3 -0
- package/src/lib/components/Alert/Alert.scss +10 -10
- package/src/lib/components/Alert/README.mdx +18 -2
- package/src/lib/components/Alert/index.js +1 -1
- package/src/lib/components/Badge/Badge.jsx +4 -8
- package/src/lib/components/Badge/Badge.scss +21 -21
- package/src/lib/components/Badge/README.mdx +15 -1
- package/src/lib/components/Badge/index.js +1 -1
- package/src/lib/components/Button/Button.jsx +23 -34
- package/src/lib/components/Button/README.mdx +21 -7
- package/src/lib/components/Button/_base.scss +20 -20
- package/src/lib/components/Button/_priorities.scss +35 -35
- package/src/lib/components/Button/helpers/getRootLabelVisibilityClassName.js +7 -7
- package/src/lib/components/Button/helpers/getRootPriorityClassName.js +3 -3
- package/src/lib/components/Button/index.js +1 -1
- package/src/lib/components/ButtonGroup/ButtonGroup.jsx +2 -8
- package/src/lib/components/ButtonGroup/README.mdx +18 -2
- package/src/lib/components/Card/Card.jsx +6 -10
- package/src/lib/components/Card/Card.scss +13 -13
- package/src/lib/components/Card/CardBody.jsx +6 -10
- package/src/lib/components/Card/CardFooter.jsx +6 -7
- package/src/lib/components/Card/README.mdx +21 -5
- package/src/lib/components/CheckboxField/CheckboxField.jsx +17 -44
- package/src/lib/components/CheckboxField/README.mdx +18 -6
- package/src/lib/components/CheckboxField/index.js +1 -1
- package/src/lib/components/FileInputField/FileInputField.jsx +20 -29
- package/src/lib/components/FileInputField/FileInputField.scss +3 -3
- package/src/lib/components/FileInputField/README.mdx +30 -28
- package/src/lib/components/FileInputField/index.js +1 -1
- package/src/lib/components/FormLayout/FormLayout.jsx +5 -9
- package/src/lib/components/FormLayout/FormLayout.scss +3 -3
- package/src/lib/components/FormLayout/FormLayoutCustomField.jsx +4 -1
- package/src/lib/components/FormLayout/FormLayoutCustomField.scss +8 -8
- package/src/lib/components/FormLayout/README.mdx +28 -13
- package/src/lib/components/Grid/Grid.jsx +31 -35
- package/src/lib/components/Grid/Grid.scss +10 -15
- package/src/lib/components/Grid/GridSpan.jsx +5 -11
- package/src/lib/components/Grid/README.mdx +48 -36
- package/src/lib/components/Grid/_helpers/generateResponsiveCustomProperties.js +11 -3
- package/src/lib/components/Grid/_settings.scss +18 -0
- package/src/lib/components/Grid/_tools.scss +5 -5
- package/src/lib/components/Modal/Modal.jsx +147 -254
- package/src/lib/components/Modal/Modal.scss +7 -55
- package/src/lib/components/Modal/ModalBody.jsx +60 -0
- package/src/lib/components/Modal/ModalBody.scss +18 -0
- package/src/lib/components/Modal/ModalCloseButton.jsx +45 -0
- package/src/lib/components/Modal/ModalCloseButton.scss +18 -0
- package/src/lib/components/Modal/ModalContent.jsx +39 -0
- package/src/lib/components/Modal/ModalContent.scss +5 -0
- package/src/lib/components/Modal/ModalFooter.jsx +42 -0
- package/src/lib/components/Modal/ModalFooter.scss +35 -0
- package/src/lib/components/Modal/ModalHeader.jsx +44 -0
- package/src/lib/components/Modal/ModalHeader.scss +30 -0
- package/src/lib/components/Modal/ModalTitle.jsx +44 -0
- package/src/lib/components/Modal/ModalTitle.scss +10 -0
- package/src/lib/components/Modal/README.mdx +865 -195
- package/src/lib/components/Modal/_helpers/getJustifyClassName.js +19 -0
- package/src/lib/components/Modal/_helpers/getScrollingClassName.js +11 -0
- package/src/lib/components/Modal/_settings.scss +1 -5
- package/src/lib/components/Modal/_theme.scss +6 -0
- package/src/lib/components/Modal/index.js +7 -1
- package/src/lib/components/Paper/Paper.jsx +5 -9
- package/src/lib/components/Paper/Paper.scss +2 -2
- package/src/lib/components/Paper/README.mdx +15 -1
- package/src/lib/components/Paper/index.js +1 -1
- package/src/lib/components/Popover/Popover.jsx +14 -30
- package/src/lib/components/Popover/Popover.scss +7 -6
- package/src/lib/components/Popover/PopoverWrapper.jsx +5 -12
- package/src/lib/components/Popover/PopoverWrapper.scss +3 -0
- package/src/lib/components/Popover/README.mdx +32 -11
- package/src/lib/components/Popover/_theme.scss +1 -1
- package/src/lib/components/Radio/README.mdx +13 -6
- package/src/lib/components/Radio/Radio.jsx +39 -29
- package/src/lib/components/Radio/Radio.scss +3 -3
- package/src/lib/components/Radio/index.js +1 -1
- package/src/lib/components/ScrollView/README.mdx +165 -84
- package/src/lib/components/ScrollView/ScrollView.jsx +115 -117
- package/src/lib/components/ScrollView/ScrollView.scss +18 -16
- package/src/lib/components/ScrollView/index.js +1 -1
- package/src/lib/components/SelectField/README.mdx +83 -7
- package/src/lib/components/SelectField/SelectField.jsx +86 -61
- package/src/lib/components/SelectField/SelectField.scss +8 -8
- package/src/lib/components/SelectField/_components/Option/Option.jsx +46 -0
- package/src/lib/components/SelectField/_components/Option/index.js +1 -0
- package/src/lib/components/SelectField/index.js +1 -1
- package/src/lib/components/Table/README.mdx +25 -9
- package/src/lib/components/Table/Table.jsx +43 -101
- package/src/lib/components/Table/Table.scss +0 -24
- package/src/lib/components/Table/_components/TableBodyCell/TableBodyCell.jsx +46 -0
- package/src/lib/components/Table/_components/TableBodyCell/index.js +1 -0
- package/src/lib/components/Table/_components/TableCell.scss +25 -0
- package/src/lib/components/Table/_components/TableHeaderCell/TableHeaderCell.jsx +71 -0
- package/src/lib/components/Table/_components/TableHeaderCell/index.js +1 -0
- package/src/lib/components/Table/index.js +1 -1
- package/src/lib/components/Tabs/README.mdx +21 -3
- package/src/lib/components/Tabs/Tabs.jsx +6 -1
- package/src/lib/components/Tabs/TabsItem.jsx +3 -0
- package/src/lib/components/Tabs/TabsItem.scss +1 -2
- package/src/lib/components/Text/README.mdx +25 -7
- package/src/lib/components/Text/Text.jsx +3 -7
- package/src/lib/components/Text/Text.scss +6 -6
- package/src/lib/components/Text/_helpers/getRootClampClassName.js +2 -2
- package/src/lib/components/Text/_helpers/getRootHyphensClassName.js +2 -2
- package/src/lib/components/Text/_helpers/getRootWordWrappingClassName.js +2 -2
- package/src/lib/components/Text/index.js +1 -1
- package/src/lib/components/TextArea/README.mdx +34 -31
- package/src/lib/components/TextArea/TextArea.jsx +23 -63
- package/src/lib/components/TextArea/TextArea.scss +8 -8
- package/src/lib/components/TextArea/index.js +1 -1
- package/src/lib/components/TextField/README.mdx +56 -54
- package/src/lib/components/TextField/TextField.jsx +25 -52
- package/src/lib/components/TextField/TextField.scss +9 -9
- package/src/lib/components/TextField/index.js +1 -1
- package/src/lib/components/TextLink/README.mdx +13 -6
- package/src/lib/components/TextLink/TextLink.jsx +0 -10
- package/src/lib/components/TextLink/index.js +1 -1
- package/src/lib/components/Toggle/README.mdx +18 -6
- package/src/lib/components/Toggle/Toggle.jsx +18 -44
- package/src/lib/components/Toggle/index.js +1 -1
- package/src/lib/components/Toolbar/README.mdx +21 -6
- package/src/lib/components/Toolbar/Toolbar.jsx +9 -43
- package/src/lib/components/Toolbar/Toolbar.scss +24 -12
- package/src/lib/components/Toolbar/ToolbarGroup.jsx +7 -26
- package/src/lib/components/Toolbar/ToolbarItem.jsx +3 -7
- package/src/lib/components/Toolbar/_helpers/getAlignClassName.js +19 -0
- package/src/lib/components/Toolbar/_helpers/getJustifyClassName.js +16 -0
- package/src/lib/components/_helpers/getRootColorClassName.js +10 -10
- package/src/lib/components/_helpers/getRootSizeClassName.js +3 -3
- package/src/lib/components/_helpers/transferProps.js +1 -1
- package/src/lib/index.js +24 -16
- package/src/lib/provider/withGlobalProps.jsx +20 -3
- package/src/lib/styles/tools/form-fields/_box-field-layout.scss +15 -15
- package/src/lib/styles/tools/form-fields/_inline-field-elements.scss +1 -1
- package/src/lib/styles/tools/form-fields/_inline-field-layout.scss +9 -9
- package/src/lib/theme.scss +18 -26
- package/src/lib/translations/en.js +1 -1
- package/src/lib/components/Grid/_theme.scss +0 -11
- package/src/lib/components/ScrollView/_theme.scss +0 -2
- package/src/lib/components/withForwardedRef.jsx +0 -11
|
@@ -9,18 +9,20 @@ route: /components/scroll-view
|
|
|
9
9
|
ScrollView makes long content scrollable.
|
|
10
10
|
|
|
11
11
|
👉 Please note that HTML is rendered even when no children are provided.
|
|
12
|
-
This is needed to allow the
|
|
12
|
+
This is needed to allow the auto-scroll feature to work.
|
|
13
13
|
|
|
14
14
|
import {
|
|
15
15
|
Playground,
|
|
16
16
|
Props,
|
|
17
17
|
} from 'docz'
|
|
18
18
|
import { Placeholder } from '../../../docs/_components/Placeholder/Placeholder'
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
import {
|
|
20
|
+
Button,
|
|
21
|
+
Radio,
|
|
22
|
+
Toolbar,
|
|
23
|
+
ToolbarItem,
|
|
24
|
+
ScrollView,
|
|
25
|
+
} from '../..'
|
|
24
26
|
|
|
25
27
|
## Basic Usage
|
|
26
28
|
|
|
@@ -89,9 +91,9 @@ See [API](#api) for all available options.
|
|
|
89
91
|
to restrict the height of its parent to activate scrolling.
|
|
90
92
|
|
|
91
93
|
- While arrow controls are optional in the vertical mode, you should always
|
|
92
|
-
**enable arrows in the horizontal mode when scrollbar is disabled.**
|
|
93
|
-
if you don't, users without horizontal-scrolling-enabled devices
|
|
94
|
-
old-school mouse) might not be able to access your content.
|
|
94
|
+
**enable arrows in the horizontal mode when the scrollbar is disabled.**
|
|
95
|
+
Because if you don't, users without horizontal-scrolling-enabled devices
|
|
96
|
+
(like an old-school mouse) might not be able to access your content.
|
|
95
97
|
|
|
96
98
|
- For dynamic content such as chat window or console output, consider using the
|
|
97
99
|
**auto-scroll feature**. This will ensure the newest content is always
|
|
@@ -101,13 +103,13 @@ See [API](#api) for all available options.
|
|
|
101
103
|
area in your app scrollable based on viewport size, please use custom CSS
|
|
102
104
|
with media queries instead.
|
|
103
105
|
|
|
104
|
-
- ScrollView only supports **scrolling in single direction at a time.** It
|
|
105
|
-
content that
|
|
106
|
-
scrollbars would be unreachable under scrolling shadows. If you
|
|
107
|
-
content to be ready for bi-directional scrolling, either consider
|
|
108
|
-
`overflow: auto` instead of ScrollView, or make your content
|
|
109
|
-
putting it into ScrollView and make sure its scrollbars
|
|
110
|
-
scrolling shadows.
|
|
106
|
+
- ScrollView only supports **scrolling in a single direction at a time.** It
|
|
107
|
+
crops content that would possibly overflow in the other direction because
|
|
108
|
+
additional scrollbars would be unreachable under scrolling shadows. If you
|
|
109
|
+
need your content to be ready for bi-directional scrolling, either consider
|
|
110
|
+
using just `overflow: auto` instead of ScrollView, or make your content
|
|
111
|
+
scrollable before putting it into ScrollView and make sure its scrollbars
|
|
112
|
+
don't collide with scrolling shadows.
|
|
111
113
|
|
|
112
114
|
## Arrows
|
|
113
115
|
|
|
@@ -168,7 +170,7 @@ horizontal content and you need to make sure it remains accessible on all
|
|
|
168
170
|
viewport sizes.
|
|
169
171
|
|
|
170
172
|
<Playground>
|
|
171
|
-
<ScrollView direction="horizontal">
|
|
173
|
+
<ScrollView direction="horizontal" arrows>
|
|
172
174
|
<Placeholder>
|
|
173
175
|
<div style={{ whiteSpace: 'nowrap' }}>
|
|
174
176
|
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo
|
|
@@ -284,60 +286,20 @@ property defined because it detects changes of these keys.
|
|
|
284
286
|
It's possible to entirely customize the arrow controls, including the scroll
|
|
285
287
|
step, and the scrolling shadows.
|
|
286
288
|
|
|
287
|
-
### Custom Arrows
|
|
288
|
-
|
|
289
|
-
You can pass any HTML element or even custom React component to be used as the
|
|
290
|
-
arrow control.
|
|
289
|
+
### Custom Arrows
|
|
291
290
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
the `shadowColor` is broken down to individual color channels so we can easily
|
|
296
|
-
derive the transparent version from the value without having to parse it.
|
|
297
|
-
|
|
298
|
-
Furthermore, you can change the scroll step if you need to scroll by smaller or
|
|
299
|
-
bigger portions.
|
|
291
|
+
You can pass any HTML element or even a custom React component to be used as the
|
|
292
|
+
arrow control. Furthermore, you can change the scroll step if you need to scroll
|
|
293
|
+
by smaller or bigger portions.
|
|
300
294
|
|
|
301
295
|
<Playground>
|
|
302
296
|
<ScrollView
|
|
303
297
|
arrows
|
|
304
|
-
arrowsColor="white"
|
|
305
298
|
arrowsScrollStep={300}
|
|
306
|
-
customNextArrow={(
|
|
307
|
-
<span
|
|
308
|
-
style={{
|
|
309
|
-
fontSize: '1.5rem',
|
|
310
|
-
fontWeight: 'bold',
|
|
311
|
-
position: 'relative',
|
|
312
|
-
textShadow: '0 0 0.4em black',
|
|
313
|
-
top: '-0.05em',
|
|
314
|
-
}}
|
|
315
|
-
>
|
|
316
|
-
→
|
|
317
|
-
</span>
|
|
318
|
-
)}
|
|
319
|
-
customPrevArrow={(
|
|
320
|
-
<span
|
|
321
|
-
style={{
|
|
322
|
-
fontSize: '1.5rem',
|
|
323
|
-
fontWeight: 'bold',
|
|
324
|
-
position: 'relative',
|
|
325
|
-
textShadow: '0 0 0.4em black',
|
|
326
|
-
top: '-0.05em',
|
|
327
|
-
}}
|
|
328
|
-
>
|
|
329
|
-
←
|
|
330
|
-
</span>
|
|
331
|
-
)}
|
|
332
299
|
direction="horizontal"
|
|
300
|
+
nextArrowElement={(<span class="typography-size-3">➡️</span>)}
|
|
301
|
+
prevArrowElement={(<span class="typography-size-3">⬅️</span>)}
|
|
333
302
|
scrollbar={false}
|
|
334
|
-
shadowColor={{
|
|
335
|
-
alpha: 0.75,
|
|
336
|
-
blue: 0,
|
|
337
|
-
green: 0,
|
|
338
|
-
red: 0,
|
|
339
|
-
}}
|
|
340
|
-
shadowSize="5rem"
|
|
341
303
|
>
|
|
342
304
|
<Placeholder>
|
|
343
305
|
<div style={{ whiteSpace: 'nowrap' }}>
|
|
@@ -352,36 +314,34 @@ bigger portions.
|
|
|
352
314
|
</ScrollView>
|
|
353
315
|
</Playground>
|
|
354
316
|
|
|
355
|
-
###
|
|
356
|
-
|
|
357
|
-
Aside from setting a custom shadow color and size, you can entirely customize
|
|
358
|
-
the scrolling shadows with `background` or `box-shadow` CSS properties.
|
|
317
|
+
### Scrolling Shadows
|
|
359
318
|
|
|
360
|
-
|
|
361
|
-
|
|
319
|
+
You can customize the start and end scrolling shadows using `startShadow*` and
|
|
320
|
+
`endShadow*` properties.
|
|
362
321
|
|
|
363
322
|
<Playground>
|
|
364
323
|
<Placeholder height="200px">
|
|
365
324
|
<ScrollView
|
|
366
|
-
|
|
367
|
-
background: 'radial-gradient('
|
|
325
|
+
startShadowBackground={'radial-gradient('
|
|
368
326
|
+ 'farthest-side at center top, '
|
|
369
327
|
+ 'rgba(0, 0, 0, 0.15) 0%, '
|
|
370
328
|
+ 'rgba(0, 0, 0, 0.05) 60%, '
|
|
371
329
|
+ 'rgba(0, 0, 0, 0.02) 85%, '
|
|
372
330
|
+ 'rgba(0, 0, 0, 0) 100%'
|
|
373
|
-
+ ')'
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
|
|
331
|
+
+ ')'
|
|
332
|
+
}
|
|
333
|
+
startShadowInitialOffset="-5px"
|
|
334
|
+
startShadowSize="40px"
|
|
335
|
+
endShadowBackground={'radial-gradient('
|
|
377
336
|
+ 'farthest-side at center bottom, '
|
|
378
337
|
+ 'rgba(0, 0, 0, 0.15) 0%, '
|
|
379
338
|
+ 'rgba(0, 0, 0, 0.05) 60%, '
|
|
380
339
|
+ 'rgba(0, 0, 0, 0.02) 85%, '
|
|
381
340
|
+ 'rgba(0, 0, 0, 0) 100%'
|
|
382
|
-
+ ')'
|
|
383
|
-
}
|
|
384
|
-
|
|
341
|
+
+ ')'
|
|
342
|
+
}
|
|
343
|
+
endShadowInitialOffset="-5px"
|
|
344
|
+
endShadowSize="40px"
|
|
385
345
|
>
|
|
386
346
|
<div>
|
|
387
347
|
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo
|
|
@@ -428,13 +388,134 @@ we use in the [Modal](/components/modal#scrolling-long-content) component.
|
|
|
428
388
|
</Placeholder>
|
|
429
389
|
</Playground>
|
|
430
390
|
|
|
391
|
+
#### Linear Gradients
|
|
392
|
+
|
|
393
|
+
For easier CSS definition of [linear gradients] for both vertical and horizontal
|
|
394
|
+
directions at the same time, there are `--rui-local-start-shadow-direction` and
|
|
395
|
+
`--rui-local-end-shadow-direction` custom properties that can be used inside
|
|
396
|
+
`startShadowBackground` and `endShadowBackground` definitions. The value of the
|
|
397
|
+
custom properties then reacts to the `direction` option:
|
|
398
|
+
|
|
399
|
+
| Custom property | Vertical direction | Horizontal direction |
|
|
400
|
+
|--------------------------------------|--------------------|----------------------|
|
|
401
|
+
| `--rui-local-start-shadow-direction` | `to bottom` | `to right` |
|
|
402
|
+
| `--rui-local-end-shadow-direction` | `to top` | `to left` |
|
|
403
|
+
|
|
404
|
+
This is useful if you want to create a single definition of linear gradients for
|
|
405
|
+
scrolling shadows in both directions via
|
|
406
|
+
[global props](/customize/global-props).
|
|
407
|
+
|
|
408
|
+
<Playground>
|
|
409
|
+
{() => {
|
|
410
|
+
const START_SHADOW_BACKGROUND = `linear-gradient(
|
|
411
|
+
var(--rui-local-start-shadow-direction),
|
|
412
|
+
rgba(0 0 0 / 0.5),
|
|
413
|
+
rgba(0 0 0 / 0)
|
|
414
|
+
)`;
|
|
415
|
+
const END_SHADOW_BACKGROUND = `linear-gradient(
|
|
416
|
+
var(--rui-local-end-shadow-direction),
|
|
417
|
+
rgba(0 0 0 / 0.5),
|
|
418
|
+
rgba(0 0 0 / 0)
|
|
419
|
+
)`
|
|
420
|
+
const [direction, setDirection] = React.useState('vertical');
|
|
421
|
+
return(
|
|
422
|
+
<>
|
|
423
|
+
<Radio
|
|
424
|
+
label="Direction:"
|
|
425
|
+
onChange={(e) => setDirection(e.target.value)}
|
|
426
|
+
options={[
|
|
427
|
+
{
|
|
428
|
+
label: 'Vertical',
|
|
429
|
+
value: 'vertical',
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
label: 'Horizontal',
|
|
433
|
+
value: 'horizontal',
|
|
434
|
+
},
|
|
435
|
+
]}
|
|
436
|
+
value={direction}
|
|
437
|
+
/>
|
|
438
|
+
<Placeholder height="200px">
|
|
439
|
+
<ScrollView
|
|
440
|
+
direction={direction}
|
|
441
|
+
endShadowBackground={END_SHADOW_BACKGROUND}
|
|
442
|
+
startShadowBackground={START_SHADOW_BACKGROUND}
|
|
443
|
+
>
|
|
444
|
+
<div
|
|
445
|
+
style={{
|
|
446
|
+
width: (direction === 'horizontal' ? '3000px' : 'auto'),
|
|
447
|
+
}}
|
|
448
|
+
>
|
|
449
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
|
|
450
|
+
commodo ligula eget dolor. Aenean massa. Cum sociis natoque
|
|
451
|
+
penatibus et magnis dis parturient montes, nascetur ridiculus mus.
|
|
452
|
+
Donec quam felis, ultricies nec, pellentesque eu, pretium quis,
|
|
453
|
+
sem. Nulla consequat massa quis enim. Donec pede justo, fringilla
|
|
454
|
+
vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut,
|
|
455
|
+
imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede
|
|
456
|
+
mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum
|
|
457
|
+
semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula,
|
|
458
|
+
porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem
|
|
459
|
+
ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus
|
|
460
|
+
viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean
|
|
461
|
+
imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper
|
|
462
|
+
ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus,
|
|
463
|
+
tellus eget condimentum rhoncus, sem quam semper libero, sit amet
|
|
464
|
+
adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus
|
|
465
|
+
pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt
|
|
466
|
+
tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam
|
|
467
|
+
quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis
|
|
468
|
+
leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis
|
|
469
|
+
magna. Sed consequat, leo eget bibendum sodales, augue velit
|
|
470
|
+
cursus nunc. Aenean massa. Cum sociis natoque penatibus et magnis
|
|
471
|
+
dis parturient montes, nascetur ridiculus mus. Donec quam felis,
|
|
472
|
+
ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat
|
|
473
|
+
massa quis enim. Donec pede justo, fringilla vel, aliquet nec,
|
|
474
|
+
vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a,
|
|
475
|
+
venenatis vitae, justo. Nullam dictum felis eu pede mollis
|
|
476
|
+
pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper
|
|
477
|
+
nisi. Aenean vulputate eleifend tellus. Aenean leo ligula,
|
|
478
|
+
porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem
|
|
479
|
+
ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus
|
|
480
|
+
viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean
|
|
481
|
+
imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper
|
|
482
|
+
ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus,
|
|
483
|
+
tellus eget condimentum rhoncus, sem quam semper libero, sit amet
|
|
484
|
+
adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus
|
|
485
|
+
pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt
|
|
486
|
+
tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam
|
|
487
|
+
quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis
|
|
488
|
+
leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis
|
|
489
|
+
magna. Sed consequat, leo eget bibendum sodales, augue velit
|
|
490
|
+
cursus nunc.
|
|
491
|
+
</div>
|
|
492
|
+
</ScrollView>
|
|
493
|
+
</Placeholder>
|
|
494
|
+
</>
|
|
495
|
+
)}}
|
|
496
|
+
</Playground>
|
|
497
|
+
|
|
498
|
+
## Forwarding HTML Attributes
|
|
499
|
+
|
|
500
|
+
In addition to the options below in the [component's API](#api) section, you
|
|
501
|
+
can specify [React synthetic events] or **any HTML attribute you like.** All
|
|
502
|
+
attributes that don't interfere with the API are forwarded to the `<div>` HTML
|
|
503
|
+
element. This enables making the component interactive and helps to improve its
|
|
504
|
+
accessibility.
|
|
505
|
+
|
|
506
|
+
👉 Refer to the MDN reference for the full list of supported attributes of the
|
|
507
|
+
[div] element.
|
|
508
|
+
|
|
509
|
+
## Forwarding ref
|
|
510
|
+
|
|
511
|
+
If you provide [ref], it is forwarded to the scrolling viewport native HTML
|
|
512
|
+
`<div>` element.
|
|
513
|
+
|
|
431
514
|
## API
|
|
432
515
|
|
|
433
516
|
<Props table of={ScrollView} />
|
|
434
517
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
| `--rui-ScrollView__arrow__initial-offset` | Initial offset of scrolling arrows (transitioned) |
|
|
440
|
-
| `--rui-ScrollView__shadow__initial-offset` | Initial offset of scrolling shadows (transitioned) |
|
|
518
|
+
[linear gradients]: https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient
|
|
519
|
+
[React synthetic events]: https://reactjs.org/docs/events.html
|
|
520
|
+
[div]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes
|
|
521
|
+
[ref]: https://reactjs.org/docs/refs-and-the-dom.html
|