@rio-cloud/uikit-mcp 1.1.7 → 1.1.8
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/README.md +13 -17
- package/dist/doc-metadata.json +125 -295
- package/dist/docs/components/accentBar.md +16 -69
- package/dist/docs/components/activity.md +7 -44
- package/dist/docs/components/animatedNumber.md +3 -11
- package/dist/docs/components/animatedTextReveal.md +6 -34
- package/dist/docs/components/animations.md +21 -54
- package/dist/docs/components/appHeader.md +11 -30
- package/dist/docs/components/appLayout.md +40 -193
- package/dist/docs/components/appNavigationBar.md +1 -24
- package/dist/docs/components/areaCharts.md +7 -22
- package/dist/docs/components/aspectRatioPlaceholder.md +1 -9
- package/dist/docs/components/assetTree.md +241 -280
- package/dist/docs/components/autosuggests.md +3 -102
- package/dist/docs/components/avatar.md +1 -16
- package/dist/docs/components/banner.md +4 -37
- package/dist/docs/components/barCharts.md +20 -75
- package/dist/docs/components/barList.md +10 -78
- package/dist/docs/components/basicMap.md +1 -67
- package/dist/docs/components/bottomSheet.md +2 -28
- package/dist/docs/components/button.md +12 -65
- package/dist/docs/components/buttonToolbar.md +5 -19
- package/dist/docs/components/calendarStripe.md +50 -100
- package/dist/docs/components/card.md +1 -9
- package/dist/docs/components/carousel.md +1 -14
- package/dist/docs/components/chartColors.md +1 -156
- package/dist/docs/components/chartsGettingStarted.md +1 -1
- package/dist/docs/components/chat.md +2 -81
- package/dist/docs/components/checkbox.md +11 -72
- package/dist/docs/components/circularProgress.md +8 -49
- package/dist/docs/components/clearableInput.md +3 -62
- package/dist/docs/components/collapse.md +2 -15
- package/dist/docs/components/composedCharts.md +16 -26
- package/dist/docs/components/contentLoader.md +7 -25
- package/dist/docs/components/dataTabs.md +16 -104
- package/dist/docs/components/datepickers.md +710 -962
- package/dist/docs/components/dialogs.md +5 -67
- package/dist/docs/components/divider.md +1 -33
- package/dist/docs/components/dropdowns.md +3424 -5567
- package/dist/docs/components/editableContent.md +4 -82
- package/dist/docs/components/expander.md +15 -88
- package/dist/docs/components/fade.md +4 -61
- package/dist/docs/components/fadeExpander.md +1 -7
- package/dist/docs/components/fadeUp.md +2 -76
- package/dist/docs/components/feedback.md +9 -68
- package/dist/docs/components/filePickers.md +4 -18
- package/dist/docs/components/formLabel.md +7 -27
- package/dist/docs/components/groupedItemList.md +2 -158
- package/dist/docs/components/iconList.md +7 -64
- package/dist/docs/components/imagePreloader.md +1 -9
- package/dist/docs/components/labeledElement.md +3 -18
- package/dist/docs/components/licensePlate.md +1 -43
- package/dist/docs/components/lineCharts.md +8 -39
- package/dist/docs/components/listMenu.md +2 -34
- package/dist/docs/components/loadMore.md +5 -24
- package/dist/docs/components/mainNavigation.md +1 -9
- package/dist/docs/components/mapCircle.md +1 -23
- package/dist/docs/components/mapCluster.md +2 -54
- package/dist/docs/components/mapContext.md +1 -23
- package/dist/docs/components/mapDraggableMarker.md +2 -28
- package/dist/docs/components/mapGettingStarted.md +2 -2
- package/dist/docs/components/mapInfoBubble.md +1 -27
- package/dist/docs/components/mapLayerGroup.md +1 -23
- package/dist/docs/components/mapMarker.md +1 -99
- package/dist/docs/components/mapPolygon.md +2 -116
- package/dist/docs/components/mapRoute.md +6 -1465
- package/dist/docs/components/mapRouteGenerator.md +1 -1
- package/dist/docs/components/mapSettings.md +11 -128
- package/dist/docs/components/mapUtils.md +10 -113
- package/dist/docs/components/multiselects.md +14 -163
- package/dist/docs/components/noData.md +8 -22
- package/dist/docs/components/notifications.md +3 -19
- package/dist/docs/components/numbercontrol.md +3 -47
- package/dist/docs/components/onboarding.md +3 -15
- package/dist/docs/components/page.md +1 -33
- package/dist/docs/components/pager.md +1 -17
- package/dist/docs/components/pieCharts.md +40 -71
- package/dist/docs/components/popover.md +1 -12
- package/dist/docs/components/position.md +2 -6
- package/dist/docs/components/radialBarCharts.md +32 -116
- package/dist/docs/components/radioCardGroup.md +6 -48
- package/dist/docs/components/radiobutton.md +6 -75
- package/dist/docs/components/releaseNotes.md +3 -21
- package/dist/docs/components/resizer.md +1 -7
- package/dist/docs/components/responsiveColumnStripe.md +9 -49
- package/dist/docs/components/responsiveVideo.md +1 -7
- package/dist/docs/components/rioglyph.md +1 -17
- package/dist/docs/components/rules.md +7 -70
- package/dist/docs/components/saveableInput.md +267 -401
- package/dist/docs/components/selects.md +27 -1164
- package/dist/docs/components/sidebar.md +6 -17
- package/dist/docs/components/sliders.md +1 -27
- package/dist/docs/components/smoothScrollbars.md +1 -73
- package/dist/docs/components/spinners.md +6 -51
- package/dist/docs/components/states.md +6 -92
- package/dist/docs/components/statsWidgets.md +1 -76
- package/dist/docs/components/statusBar.md +1 -57
- package/dist/docs/components/stepButton.md +2 -7
- package/dist/docs/components/steppedProgressBars.md +5 -62
- package/dist/docs/components/subNavigation.md +1 -31
- package/dist/docs/components/supportMarker.md +2 -14
- package/dist/docs/components/svgImage.md +1 -5
- package/dist/docs/components/switch.md +2 -33
- package/dist/docs/components/tables.md +1 -1
- package/dist/docs/components/tagManager.md +1 -41
- package/dist/docs/components/tags.md +1 -138
- package/dist/docs/components/teaser.md +2 -122
- package/dist/docs/components/textTruncateMiddle.md +2 -9
- package/dist/docs/components/timeline.md +1 -99
- package/dist/docs/components/timepicker.md +4 -79
- package/dist/docs/components/toggleButton.md +2 -15
- package/dist/docs/components/tooltip.md +9 -30
- package/dist/docs/components/tracker.md +2 -19
- package/dist/docs/components/virtualList.md +61 -130
- package/dist/docs/foundations.md +749 -4069
- package/dist/docs/start/changelog.md +5 -1
- package/dist/docs/start/goodtoknow.md +1 -1
- package/dist/docs/start/guidelines/color-combinations.md +149 -483
- package/dist/docs/start/guidelines/custom-css.md +1 -1
- package/dist/docs/start/guidelines/custom-rioglyph.md +1 -1
- package/dist/docs/start/guidelines/formatting.md +1 -1
- package/dist/docs/start/guidelines/iframe.md +4 -16
- package/dist/docs/start/guidelines/obfuscate-data.md +1 -1
- package/dist/docs/start/guidelines/print-css.md +1 -1
- package/dist/docs/start/guidelines/spinner.md +13 -67
- package/dist/docs/start/guidelines/state-in-url.md +1 -1
- package/dist/docs/start/guidelines/supported-browsers.md +1 -1
- package/dist/docs/start/guidelines/writing.md +1 -1
- package/dist/docs/start/howto.md +11 -11
- package/dist/docs/start/intro.md +1 -1
- package/dist/docs/start/responsiveness.md +1 -1
- package/dist/docs/utilities/classNames.md +3 -18
- package/dist/docs/utilities/deviceUtils.md +7 -13
- package/dist/docs/utilities/featureToggles.md +1 -1
- package/dist/docs/utilities/fuelTypeUtils.md +2 -12
- package/dist/docs/utilities/routeUtils.md +25 -343
- package/dist/docs/utilities/useAfterMount.md +1 -6
- package/dist/docs/utilities/useAutoAnimate.md +2 -15
- package/dist/docs/utilities/useAverage.md +1 -6
- package/dist/docs/utilities/useClickOutside.md +1 -5
- package/dist/docs/utilities/useClipboard.md +2 -6
- package/dist/docs/utilities/useCookies.md +2 -10
- package/dist/docs/utilities/useCount.md +7 -16
- package/dist/docs/utilities/useDarkMode.md +2 -6
- package/dist/docs/utilities/useDebugInfo.md +6 -20
- package/dist/docs/utilities/useEffectOnce.md +1 -6
- package/dist/docs/utilities/useElapsedTime.md +2 -6
- package/dist/docs/utilities/useElementSize.md +1 -7
- package/dist/docs/utilities/useEsc.md +1 -5
- package/dist/docs/utilities/useEvent.md +1 -5
- package/dist/docs/utilities/useFocusTrap.md +1 -5
- package/dist/docs/utilities/useFullscreen.md +2 -15
- package/dist/docs/utilities/useHover.md +1 -5
- package/dist/docs/utilities/useIncomingPostMessages.md +2 -18
- package/dist/docs/utilities/useInterval.md +2 -8
- package/dist/docs/utilities/useIsFocusWithin.md +1 -10
- package/dist/docs/utilities/useKey.md +1 -15
- package/dist/docs/utilities/useLocalStorage.md +2 -11
- package/dist/docs/utilities/useLocationSuggestions.md +1 -5
- package/dist/docs/utilities/useMax.md +1 -5
- package/dist/docs/utilities/useMin.md +1 -5
- package/dist/docs/utilities/useMutationObserver.md +3 -11
- package/dist/docs/utilities/useOnScreen.md +1 -8
- package/dist/docs/utilities/useOnlineStatus.md +1 -5
- package/dist/docs/utilities/usePostMessage.md +3 -9
- package/dist/docs/utilities/usePostMessageSender.md +3 -13
- package/dist/docs/utilities/usePrevious.md +1 -5
- package/dist/docs/utilities/useResizeObserver.md +3 -11
- package/dist/docs/utilities/useRioCookieConsent.md +1 -5
- package/dist/docs/utilities/useScrollPosition.md +3 -59
- package/dist/docs/utilities/useSearch.md +2 -16
- package/dist/docs/utilities/useSearchHighlight.md +13 -78
- package/dist/docs/utilities/useSorting.md +18 -43
- package/dist/docs/utilities/useStateWithValidation.md +1 -5
- package/dist/docs/utilities/useSum.md +1 -9
- package/dist/docs/utilities/useTableExport.md +42 -59
- package/dist/docs/utilities/useTableSelection.md +74 -119
- package/dist/docs/utilities/useTimeout.md +2 -6
- package/dist/docs/utilities/useToggle.md +4 -14
- package/dist/docs/utilities/useUrlState.md +2 -27
- package/dist/docs/utilities/useWindowResize.md +1 -5
- package/dist/index.mjs +46 -10
- package/dist/version.json +2 -2
- package/package.json +2 -2
- package/dist/docs/templates/common-table.md +0 -1112
- package/dist/docs/templates/detail-views.md +0 -942
- package/dist/docs/templates/expandable-details.md +0 -228
- package/dist/docs/templates/feature-cards.md +0 -549
- package/dist/docs/templates/form-summary.md +0 -199
- package/dist/docs/templates/form-toggle.md +0 -367
- package/dist/docs/templates/list-blocks.md +0 -1021
- package/dist/docs/templates/loading-progress.md +0 -109
- package/dist/docs/templates/options-panel.md +0 -152
- package/dist/docs/templates/panel-variants.md +0 -164
- package/dist/docs/templates/progress-cards.md +0 -607
- package/dist/docs/templates/progress-success.md +0 -142
- package/dist/docs/templates/settings-form.md +0 -434
- package/dist/docs/templates/stats-blocks.md +0 -1381
- package/dist/docs/templates/table-panel.md +0 -184
- package/dist/docs/templates/table-row-animation.md +0 -317
- package/dist/docs/templates/usage-cards.md +0 -227
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
# Combined tables in ExpandablePanel
|
|
2
|
-
|
|
3
|
-
*Category:* Templates
|
|
4
|
-
*Section:* Tables
|
|
5
|
-
*Source:* https://uikit.developers.rio.cloud/#/templates/table-panel
|
|
6
|
-
*Captured:* 2026-02-23T15:49:41.504Z
|
|
7
|
-
|
|
8
|
-
## Combined tables in ExpandablePanel
|
|
9
|
-
|
|
10
|
-
### Example: Example 1
|
|
11
|
-
|
|
12
|
-
Panel header tableLorem ipsum dolor
|
|
13
|
-
Dolor sitAmet
|
|
14
|
-
|
|
15
|
-
Head columnHead columnHead columnHead columnHead column
|
|
16
|
-
|
|
17
|
-
Lorem ipsum2 Lorems
|
|
18
|
-
|
|
19
|
-
Dolor sit amet1 Lorem
|
|
20
|
-
|
|
21
|
-
#### Summary
|
|
22
|
-
|
|
23
|
-
Panel header tableLorem ipsum dolor
|
|
24
|
-
Dolor sitAmet
|
|
25
|
-
|
|
26
|
-
Head columnHead columnHead columnHead columnHead column
|
|
27
|
-
|
|
28
|
-
Lorem ipsum2 Lorems
|
|
29
|
-
|
|
30
|
-
Dolor sit amet1 Lorem
|
|
31
|
-
|
|
32
|
-
#### React (tsx)
|
|
33
|
-
|
|
34
|
-
```tsx
|
|
35
|
-
import ExpanderPanel from '@rio-cloud/rio-uikit/ExpanderPanel';
|
|
36
|
-
|
|
37
|
-
const TablePanelExample = () => {
|
|
38
|
-
return (
|
|
39
|
-
<ExpanderPanel
|
|
40
|
-
open
|
|
41
|
-
title={
|
|
42
|
-
<table className='table table-layout-fixed width-100pct'>
|
|
43
|
-
<thead>
|
|
44
|
-
<tr>
|
|
45
|
-
<td colSpan={2}>
|
|
46
|
-
<b>Panel header table</b>
|
|
47
|
-
</td>
|
|
48
|
-
<td>
|
|
49
|
-
<div>
|
|
50
|
-
<span className='rioglyph rioglyph-volume margin-right-3' />
|
|
51
|
-
<span>Lorem ipsum dolor</span>
|
|
52
|
-
</div>
|
|
53
|
-
</td>
|
|
54
|
-
<td>Dolor sit</td>
|
|
55
|
-
<td>Amet</td>
|
|
56
|
-
</tr>
|
|
57
|
-
</thead>
|
|
58
|
-
</table>
|
|
59
|
-
}
|
|
60
|
-
headerClassName='padding-0 position-relative'
|
|
61
|
-
iconClassName='position-absolute top-0 right-15 height-100pct display-flex align-items-center'
|
|
62
|
-
titleClassName='width-100pct margin-0 overflow-hidden'
|
|
63
|
-
bodyClassName='padding-0'
|
|
64
|
-
className='shadow-default overflow-hidden'
|
|
65
|
-
>
|
|
66
|
-
<table className='table table-head-filled table-layout-fixed'>
|
|
67
|
-
<thead>
|
|
68
|
-
<tr>
|
|
69
|
-
{[...Array(5)].map(() => (
|
|
70
|
-
<th key={crypto.randomUUID()} className='ellipsis-1'>
|
|
71
|
-
Head column
|
|
72
|
-
</th>
|
|
73
|
-
))}
|
|
74
|
-
</tr>
|
|
75
|
-
</thead>
|
|
76
|
-
<tbody>
|
|
77
|
-
<tr>
|
|
78
|
-
<td colSpan={2}>Lorem ipsum</td>
|
|
79
|
-
<td>
|
|
80
|
-
<div>
|
|
81
|
-
<span className='rioglyph rioglyph-volume margin-right-3' />
|
|
82
|
-
<span>2 Lorems</span>
|
|
83
|
-
</div>
|
|
84
|
-
</td>
|
|
85
|
-
<td />
|
|
86
|
-
<td />
|
|
87
|
-
</tr>
|
|
88
|
-
<tr>
|
|
89
|
-
<td colSpan={2}>Dolor sit amet</td>
|
|
90
|
-
<td>
|
|
91
|
-
<div>
|
|
92
|
-
<span className='rioglyph rioglyph-volume margin-right-3' />
|
|
93
|
-
<span>1 Lorem</span>
|
|
94
|
-
</div>
|
|
95
|
-
</td>
|
|
96
|
-
<td />
|
|
97
|
-
<td />
|
|
98
|
-
</tr>
|
|
99
|
-
</tbody>
|
|
100
|
-
</table>
|
|
101
|
-
</ExpanderPanel>
|
|
102
|
-
);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export default TablePanelExample;
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
#### HTML (html)
|
|
109
|
-
|
|
110
|
-
```html
|
|
111
|
-
<div class="expander-panel panel panel-blank shadow-default overflow-hidden" aria-label="expander panel">
|
|
112
|
-
<div class="panel-heading open padding-0 position-relative" aria-label="panel heading">
|
|
113
|
-
<span class="title width-100pct margin-0 overflow-hidden">
|
|
114
|
-
<table class="table table-layout-fixed width-100pct">
|
|
115
|
-
<thead>
|
|
116
|
-
<tr>
|
|
117
|
-
<td colspan="2">
|
|
118
|
-
<b>Panel header table</b>
|
|
119
|
-
</td>
|
|
120
|
-
<td>
|
|
121
|
-
<div>
|
|
122
|
-
<span class="rioglyph rioglyph-volume margin-right-3">
|
|
123
|
-
</span>
|
|
124
|
-
<span>Lorem ipsum dolor</span>
|
|
125
|
-
</div>
|
|
126
|
-
</td>
|
|
127
|
-
<td>Dolor sit</td>
|
|
128
|
-
<td>Amet</td>
|
|
129
|
-
</tr>
|
|
130
|
-
</thead>
|
|
131
|
-
</table>
|
|
132
|
-
</span>
|
|
133
|
-
<span class="expander-icon position-absolute top-0 right-15 height-100pct display-flex align-items-center rioglyph rioglyph-chevron-down">
|
|
134
|
-
</span>
|
|
135
|
-
</div>
|
|
136
|
-
<div class="collapse display-block width-100pct" style="opacity: 1; height: auto;">
|
|
137
|
-
<div>
|
|
138
|
-
<div class="panel-body padding-0">
|
|
139
|
-
<table class="table table-head-filled table-layout-fixed">
|
|
140
|
-
<thead>
|
|
141
|
-
<tr>
|
|
142
|
-
<th class="ellipsis-1">Head column</th>
|
|
143
|
-
<th class="ellipsis-1">Head column</th>
|
|
144
|
-
<th class="ellipsis-1">Head column</th>
|
|
145
|
-
<th class="ellipsis-1">Head column</th>
|
|
146
|
-
<th class="ellipsis-1">Head column</th>
|
|
147
|
-
</tr>
|
|
148
|
-
</thead>
|
|
149
|
-
<tbody>
|
|
150
|
-
<tr>
|
|
151
|
-
<td colspan="2">Lorem ipsum</td>
|
|
152
|
-
<td>
|
|
153
|
-
<div>
|
|
154
|
-
<span class="rioglyph rioglyph-volume margin-right-3">
|
|
155
|
-
</span>
|
|
156
|
-
<span>2 Lorems</span>
|
|
157
|
-
</div>
|
|
158
|
-
</td>
|
|
159
|
-
<td>
|
|
160
|
-
</td>
|
|
161
|
-
<td>
|
|
162
|
-
</td>
|
|
163
|
-
</tr>
|
|
164
|
-
<tr>
|
|
165
|
-
<td colspan="2">Dolor sit amet</td>
|
|
166
|
-
<td>
|
|
167
|
-
<div>
|
|
168
|
-
<span class="rioglyph rioglyph-volume margin-right-3">
|
|
169
|
-
</span>
|
|
170
|
-
<span>1 Lorem</span>
|
|
171
|
-
</div>
|
|
172
|
-
</td>
|
|
173
|
-
<td>
|
|
174
|
-
</td>
|
|
175
|
-
<td>
|
|
176
|
-
</td>
|
|
177
|
-
</tr>
|
|
178
|
-
</tbody>
|
|
179
|
-
</table>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
```
|
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
# Table row animation
|
|
2
|
-
|
|
3
|
-
*Category:* Templates
|
|
4
|
-
*Section:* Tables
|
|
5
|
-
*Source:* https://uikit.developers.rio.cloud/#/templates/table-row-animation
|
|
6
|
-
*Captured:* 2026-02-23T15:49:41.826Z
|
|
7
|
-
|
|
8
|
-
## Table row animation
|
|
9
|
-
|
|
10
|
-
### Example: Example 1
|
|
11
|
-
|
|
12
|
-
Remove rowReset table
|
|
13
|
-
|
|
14
|
-
IdNameVINStatus
|
|
15
|
-
|
|
16
|
-
1Lorem7354Active
|
|
17
|
-
2Ipsum456457Inactive
|
|
18
|
-
3Dolor895Active
|
|
19
|
-
4Sit3456Active
|
|
20
|
-
5Amet2445Active
|
|
21
|
-
6Consectetur878Active
|
|
22
|
-
|
|
23
|
-
70/100
|
|
24
|
-
|
|
25
|
-
Load more
|
|
26
|
-
|
|
27
|
-
#### Summary
|
|
28
|
-
|
|
29
|
-
Remove rowReset table
|
|
30
|
-
|
|
31
|
-
IdNameVINStatus
|
|
32
|
-
|
|
33
|
-
1Lorem7354Active
|
|
34
|
-
2Ipsum456457Inactive
|
|
35
|
-
3Dolor895Active
|
|
36
|
-
4Sit3456Active
|
|
37
|
-
5Amet2445Active
|
|
38
|
-
6Consectetur878Active
|
|
39
|
-
|
|
40
|
-
70/100
|
|
41
|
-
|
|
42
|
-
Load more
|
|
43
|
-
|
|
44
|
-
#### React (tsx)
|
|
45
|
-
|
|
46
|
-
```tsx
|
|
47
|
-
import { useState } from 'react';
|
|
48
|
-
|
|
49
|
-
import Button from '@rio-cloud/rio-uikit/Button';
|
|
50
|
-
import TableToolbar from '@rio-cloud/rio-uikit/TableToolbar';
|
|
51
|
-
import LoadMoreButton from '@rio-cloud/rio-uikit/LoadMoreButton';
|
|
52
|
-
|
|
53
|
-
const tableData = [
|
|
54
|
-
{
|
|
55
|
-
id: 1,
|
|
56
|
-
name: 'Lorem',
|
|
57
|
-
vin: '7354',
|
|
58
|
-
status: 'Active',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: 2,
|
|
62
|
-
name: 'Ipsum',
|
|
63
|
-
vin: '456457',
|
|
64
|
-
status: 'Inactive',
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: 3,
|
|
68
|
-
name: 'Dolor',
|
|
69
|
-
vin: '895',
|
|
70
|
-
status: 'Active',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: 4,
|
|
74
|
-
name: 'Sit',
|
|
75
|
-
vin: '3456',
|
|
76
|
-
status: 'Active',
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: 5,
|
|
80
|
-
name: 'Amet',
|
|
81
|
-
vin: '2445',
|
|
82
|
-
status: 'Active',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: 6,
|
|
86
|
-
name: 'Consectetur',
|
|
87
|
-
vin: '878',
|
|
88
|
-
status: 'Active',
|
|
89
|
-
},
|
|
90
|
-
];
|
|
91
|
-
|
|
92
|
-
const ROW_ANIMATION_CLASSNAME =
|
|
93
|
-
'bg-white opacity-50 pointer-events-none animated-05s repeat-1 ease-in restart slide-out-right';
|
|
94
|
-
|
|
95
|
-
const ANIMATION_DURATION = 300;
|
|
96
|
-
|
|
97
|
-
const TableRowAnimationExample = () => {
|
|
98
|
-
const [data, setData] = useState(tableData);
|
|
99
|
-
const [rowIdToDelete, setRowIdToDelete] = useState<number | undefined>();
|
|
100
|
-
|
|
101
|
-
const handleRemoveRow = (fatalRow: number) => {
|
|
102
|
-
setRowIdToDelete(fatalRow);
|
|
103
|
-
|
|
104
|
-
setTimeout(() => {
|
|
105
|
-
setData(data.filter(item => item.id !== fatalRow));
|
|
106
|
-
setRowIdToDelete(undefined);
|
|
107
|
-
}, ANIMATION_DURATION);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
const handleReset = () => setData(tableData);
|
|
111
|
-
|
|
112
|
-
return (
|
|
113
|
-
<div>
|
|
114
|
-
<TableToolbar>
|
|
115
|
-
<div className='table-toolbar-container'>
|
|
116
|
-
<div className='table-toolbar-group-left'>
|
|
117
|
-
<div className='table-toolbar-column'>
|
|
118
|
-
<div className='btn-toolbar'>
|
|
119
|
-
<Button
|
|
120
|
-
bsStyle={Button.PRIMARY}
|
|
121
|
-
disabled={!!rowIdToDelete}
|
|
122
|
-
onClick={() => handleRemoveRow(3)}
|
|
123
|
-
>
|
|
124
|
-
Remove row
|
|
125
|
-
</Button>
|
|
126
|
-
<Button onClick={handleReset}>Reset table</Button>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</TableToolbar>
|
|
132
|
-
<div className='overflow-hidden'>
|
|
133
|
-
<table className='table table-head-filled table-bordered'>
|
|
134
|
-
<thead>
|
|
135
|
-
<tr>
|
|
136
|
-
<th>Id</th>
|
|
137
|
-
<th>Name</th>
|
|
138
|
-
<th>VIN</th>
|
|
139
|
-
<th>Status</th>
|
|
140
|
-
<th className='width-50' />
|
|
141
|
-
</tr>
|
|
142
|
-
</thead>
|
|
143
|
-
<tbody>
|
|
144
|
-
{data.map(item => {
|
|
145
|
-
const rowClassName = rowIdToDelete === item.id ? ROW_ANIMATION_CLASSNAME : '';
|
|
146
|
-
return (
|
|
147
|
-
<tr key={item.id} className={rowClassName}>
|
|
148
|
-
<td>{item.id}</td>
|
|
149
|
-
<td>{item.name}</td>
|
|
150
|
-
<td>{item.vin}</td>
|
|
151
|
-
<td>{item.status}</td>
|
|
152
|
-
<td className='padding-0 text-center'>
|
|
153
|
-
<span>
|
|
154
|
-
<Button
|
|
155
|
-
iconOnly
|
|
156
|
-
bsStyle={Button.MUTED}
|
|
157
|
-
iconName='rioglyph-trash'
|
|
158
|
-
onClick={() => handleRemoveRow(item.id)}
|
|
159
|
-
/>
|
|
160
|
-
</span>
|
|
161
|
-
</td>
|
|
162
|
-
</tr>
|
|
163
|
-
);
|
|
164
|
-
})}
|
|
165
|
-
</tbody>
|
|
166
|
-
</table>
|
|
167
|
-
</div>
|
|
168
|
-
<LoadMoreButton
|
|
169
|
-
loaded={70}
|
|
170
|
-
total={100}
|
|
171
|
-
onLoadMore={() => {}}
|
|
172
|
-
loadMoreMessage='Load more'
|
|
173
|
-
noMoreMessage='Everything loaded'
|
|
174
|
-
/>
|
|
175
|
-
</div>
|
|
176
|
-
);
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
export default TableRowAnimationExample;
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
#### HTML (html)
|
|
183
|
-
|
|
184
|
-
```html
|
|
185
|
-
<div>
|
|
186
|
-
<div class="table-toolbar">
|
|
187
|
-
<div class="table-toolbar-container">
|
|
188
|
-
<div class="table-toolbar-group-left">
|
|
189
|
-
<div class="table-toolbar-column">
|
|
190
|
-
<div class="btn-toolbar">
|
|
191
|
-
<button type="button" class="btn btn-primary btn-component" tabindex="0">Remove row</button>
|
|
192
|
-
<button type="button" class="btn btn-default btn-component" tabindex="0">Reset table</button>
|
|
193
|
-
</div>
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
</div>
|
|
197
|
-
</div>
|
|
198
|
-
<div class="overflow-hidden">
|
|
199
|
-
<table class="table table-head-filled table-bordered">
|
|
200
|
-
<thead>
|
|
201
|
-
<tr>
|
|
202
|
-
<th>Id</th>
|
|
203
|
-
<th>Name</th>
|
|
204
|
-
<th>VIN</th>
|
|
205
|
-
<th>Status</th>
|
|
206
|
-
<th class="width-50">
|
|
207
|
-
</th>
|
|
208
|
-
</tr>
|
|
209
|
-
</thead>
|
|
210
|
-
<tbody>
|
|
211
|
-
<tr class="">
|
|
212
|
-
<td>1</td>
|
|
213
|
-
<td>Lorem</td>
|
|
214
|
-
<td>7354</td>
|
|
215
|
-
<td>Active</td>
|
|
216
|
-
<td class="padding-0 text-center">
|
|
217
|
-
<span>
|
|
218
|
-
<button type="button" class="btn btn-muted btn-icon-only btn-component" tabindex="0">
|
|
219
|
-
<span class="rioglyph rioglyph-trash">
|
|
220
|
-
</span>
|
|
221
|
-
</button>
|
|
222
|
-
</span>
|
|
223
|
-
</td>
|
|
224
|
-
</tr>
|
|
225
|
-
<tr class="">
|
|
226
|
-
<td>2</td>
|
|
227
|
-
<td>Ipsum</td>
|
|
228
|
-
<td>456457</td>
|
|
229
|
-
<td>Inactive</td>
|
|
230
|
-
<td class="padding-0 text-center">
|
|
231
|
-
<span>
|
|
232
|
-
<button type="button" class="btn btn-muted btn-icon-only btn-component" tabindex="0">
|
|
233
|
-
<span class="rioglyph rioglyph-trash">
|
|
234
|
-
</span>
|
|
235
|
-
</button>
|
|
236
|
-
</span>
|
|
237
|
-
</td>
|
|
238
|
-
</tr>
|
|
239
|
-
<tr class="">
|
|
240
|
-
<td>3</td>
|
|
241
|
-
<td>Dolor</td>
|
|
242
|
-
<td>895</td>
|
|
243
|
-
<td>Active</td>
|
|
244
|
-
<td class="padding-0 text-center">
|
|
245
|
-
<span>
|
|
246
|
-
<button type="button" class="btn btn-muted btn-icon-only btn-component" tabindex="0">
|
|
247
|
-
<span class="rioglyph rioglyph-trash">
|
|
248
|
-
</span>
|
|
249
|
-
</button>
|
|
250
|
-
</span>
|
|
251
|
-
</td>
|
|
252
|
-
</tr>
|
|
253
|
-
<tr class="">
|
|
254
|
-
<td>4</td>
|
|
255
|
-
<td>Sit</td>
|
|
256
|
-
<td>3456</td>
|
|
257
|
-
<td>Active</td>
|
|
258
|
-
<td class="padding-0 text-center">
|
|
259
|
-
<span>
|
|
260
|
-
<button type="button" class="btn btn-muted btn-icon-only btn-component" tabindex="0">
|
|
261
|
-
<span class="rioglyph rioglyph-trash">
|
|
262
|
-
</span>
|
|
263
|
-
</button>
|
|
264
|
-
</span>
|
|
265
|
-
</td>
|
|
266
|
-
</tr>
|
|
267
|
-
<tr class="">
|
|
268
|
-
<td>5</td>
|
|
269
|
-
<td>Amet</td>
|
|
270
|
-
<td>2445</td>
|
|
271
|
-
<td>Active</td>
|
|
272
|
-
<td class="padding-0 text-center">
|
|
273
|
-
<span>
|
|
274
|
-
<button type="button" class="btn btn-muted btn-icon-only btn-component" tabindex="0">
|
|
275
|
-
<span class="rioglyph rioglyph-trash">
|
|
276
|
-
</span>
|
|
277
|
-
</button>
|
|
278
|
-
</span>
|
|
279
|
-
</td>
|
|
280
|
-
</tr>
|
|
281
|
-
<tr class="">
|
|
282
|
-
<td>6</td>
|
|
283
|
-
<td>Consectetur</td>
|
|
284
|
-
<td>878</td>
|
|
285
|
-
<td>Active</td>
|
|
286
|
-
<td class="padding-0 text-center">
|
|
287
|
-
<span>
|
|
288
|
-
<button type="button" class="btn btn-muted btn-icon-only btn-component" tabindex="0">
|
|
289
|
-
<span class="rioglyph rioglyph-trash">
|
|
290
|
-
</span>
|
|
291
|
-
</button>
|
|
292
|
-
</span>
|
|
293
|
-
</td>
|
|
294
|
-
</tr>
|
|
295
|
-
</tbody>
|
|
296
|
-
</table>
|
|
297
|
-
</div>
|
|
298
|
-
<div class="LoadMoreButton align-items-center display-flex justify-content-center margin-top-25 margin-bottom-25 non-printable">
|
|
299
|
-
<div class="min-width-150">
|
|
300
|
-
<div class="text-center margin-bottom-3">
|
|
301
|
-
<span class="text-medium">70</span>
|
|
302
|
-
<span class="margin-left-5 margin-right-5">/</span>
|
|
303
|
-
<span class="text-medium">100</span>
|
|
304
|
-
</div>
|
|
305
|
-
<div class="progress height-2 margin-bottom-10 bg-white">
|
|
306
|
-
<div class="progress-bar" style="width: 70%;">
|
|
307
|
-
</div>
|
|
308
|
-
</div>
|
|
309
|
-
<div class="display-flex justify-content-center">
|
|
310
|
-
<button class="btn btn-link padding-right-20 margin-top--5" type="button">
|
|
311
|
-
<span class="rioglyph rioglyph-arrow-down">
|
|
312
|
-
</span>Load more</button>
|
|
313
|
-
</div>
|
|
314
|
-
</div>
|
|
315
|
-
</div>
|
|
316
|
-
</div>
|
|
317
|
-
```
|