@rio-cloud/uikit-mcp 1.0.0 → 1.1.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/README.md +75 -40
- package/dist/doc-metadata.json +1872 -0
- package/dist/docs/components/accentBar.md +582 -0
- package/dist/docs/components/activity.md +330 -0
- package/dist/docs/components/animatedNumber.md +88 -0
- package/dist/docs/components/animatedTextReveal.md +381 -0
- package/dist/docs/components/animations.md +459 -0
- package/dist/docs/components/appHeader.md +737 -0
- package/dist/docs/components/appLayout.md +2016 -0
- package/dist/docs/components/appNavigationBar.md +274 -0
- package/dist/docs/components/areaCharts.md +828 -0
- package/dist/docs/components/aspectRatioPlaceholder.md +106 -0
- package/dist/docs/components/assetTree.md +3223 -0
- package/dist/docs/components/autosuggests.md +1177 -0
- package/dist/docs/components/avatar.md +206 -0
- package/dist/docs/components/banner.md +668 -0
- package/dist/docs/components/barCharts.md +2785 -0
- package/dist/docs/components/barList.md +517 -0
- package/dist/docs/components/basicMap.md +167 -0
- package/dist/docs/components/bottomSheet.md +721 -0
- package/dist/docs/components/button.md +775 -0
- package/dist/docs/components/buttonToolbar.md +134 -0
- package/dist/docs/components/calendarStripe.md +525 -0
- package/dist/docs/components/card.md +86 -0
- package/dist/docs/components/carousel.md +128 -0
- package/dist/docs/components/chartColors.md +716 -0
- package/dist/docs/components/chartsGettingStarted.md +28 -0
- package/dist/docs/components/chat.md +932 -0
- package/dist/docs/components/checkbox.md +996 -0
- package/dist/docs/components/clearableInput.md +806 -0
- package/dist/docs/components/collapse.md +189 -0
- package/dist/docs/components/composedCharts.md +424 -0
- package/dist/docs/components/contentLoader.md +674 -0
- package/dist/docs/components/dataTabs.md +1251 -0
- package/dist/docs/components/datepickers.md +2543 -0
- package/dist/docs/components/dialogs.md +2244 -0
- package/dist/docs/components/divider.md +219 -0
- package/dist/docs/components/dropdowns.md +17550 -0
- package/dist/docs/components/editableContent.md +1127 -0
- package/dist/docs/components/expander.md +970 -0
- package/dist/docs/components/fade.md +836 -0
- package/dist/docs/components/fadeExpander.md +180 -0
- package/dist/docs/components/fadeUp.md +396 -0
- package/dist/docs/components/feedback.md +758 -0
- package/dist/docs/components/filePickers.md +370 -0
- package/dist/docs/components/formLabel.md +251 -0
- package/dist/docs/components/fullscreenMap.md +10 -0
- package/dist/docs/components/groupedItemList.md +1001 -0
- package/dist/docs/components/iconList.md +306 -0
- package/dist/docs/components/imagePreloader.md +167 -0
- package/dist/docs/components/labeledElement.md +115 -0
- package/dist/docs/components/licensePlate.md +412 -0
- package/dist/docs/components/lineCharts.md +2014 -0
- package/dist/docs/components/listMenu.md +392 -0
- package/dist/docs/components/loadMore.md +219 -0
- package/dist/docs/components/mainNavigation.md +129 -0
- package/dist/docs/components/mapCircle.md +93 -0
- package/dist/docs/components/mapCluster.md +337 -0
- package/dist/docs/components/mapContext.md +284 -0
- package/dist/docs/components/mapDraggableMarker.md +150 -0
- package/dist/docs/components/mapGettingStarted.md +39 -0
- package/dist/docs/components/mapInfoBubble.md +135 -0
- package/dist/docs/components/mapLayerGroup.md +94 -0
- package/dist/docs/components/mapMarker.md +1814 -0
- package/dist/docs/components/mapPolygon.md +959 -0
- package/dist/docs/components/mapRoute.md +3816 -0
- package/dist/docs/components/mapRouteGenerator.md +6 -0
- package/dist/docs/components/mapSettings.md +1040 -0
- package/dist/docs/components/mapUtils.md +132 -0
- package/dist/docs/components/multiselects.md +1921 -0
- package/dist/docs/components/noData.md +210 -0
- package/dist/docs/components/notifications.md +314 -0
- package/dist/docs/components/numbercontrol.md +706 -0
- package/dist/docs/components/onboarding.md +297 -0
- package/dist/docs/components/page.md +241 -0
- package/dist/docs/components/pager.md +133 -0
- package/dist/docs/components/pieCharts.md +1284 -0
- package/dist/docs/components/popover.md +222 -0
- package/dist/docs/components/position.md +50 -0
- package/dist/docs/components/radialBarCharts.md +3663 -0
- package/dist/docs/components/radiobutton.md +1271 -0
- package/dist/docs/components/releaseNotes.md +135 -0
- package/dist/docs/components/resizer.md +162 -0
- package/dist/docs/components/responsiveColumnStripe.md +435 -0
- package/dist/docs/components/responsiveVideo.md +71 -0
- package/dist/docs/components/rioglyph.md +331 -0
- package/dist/docs/components/rules.md +965 -0
- package/dist/docs/components/saveableInput.md +1721 -0
- package/dist/docs/components/selects.md +1993 -0
- package/dist/docs/components/sidebar.md +332 -0
- package/dist/docs/components/sliders.md +376 -0
- package/dist/docs/components/smoothScrollbars.md +1180 -0
- package/dist/docs/components/spinners.md +506 -0
- package/dist/docs/components/states.md +1176 -0
- package/dist/docs/components/statsWidgets.md +636 -0
- package/dist/docs/components/statusBar.md +644 -0
- package/dist/docs/components/stepButton.md +61 -0
- package/dist/docs/components/steppedProgressBars.md +1064 -0
- package/dist/docs/components/subNavigation.md +470 -0
- package/dist/docs/components/supportMarker.md +115 -0
- package/dist/docs/components/svgImage.md +248 -0
- package/dist/docs/components/switch.md +554 -0
- package/dist/docs/components/tables.md +8 -0
- package/dist/docs/components/tagManager.md +476 -0
- package/dist/docs/components/tags.md +785 -0
- package/dist/docs/components/teaser.md +925 -0
- package/dist/docs/components/timeline.md +514 -0
- package/dist/docs/components/timepicker.md +262 -0
- package/dist/docs/components/toggleButton.md +178 -0
- package/dist/docs/components/tooltip.md +454 -0
- package/dist/docs/components/virtualList.md +483 -0
- package/dist/docs/foundations.md +20901 -0
- package/dist/docs/start/changelog.md +439 -0
- package/dist/docs/start/goodtoknow.md +14 -0
- package/dist/docs/start/guidelines/color-combinations.md +678 -0
- package/dist/docs/start/guidelines/custom-css.md +42 -0
- package/dist/docs/start/guidelines/custom-rioglyph.md +35 -0
- package/dist/docs/start/guidelines/formatting.md +587 -0
- package/dist/docs/start/guidelines/iframe.md +323 -0
- package/dist/docs/start/guidelines/obfuscate-data.md +30 -0
- package/dist/docs/start/guidelines/print-css.md +36 -0
- package/dist/docs/start/guidelines/spinner.md +710 -0
- package/dist/docs/start/guidelines/supported-browsers.md +10 -0
- package/dist/docs/start/guidelines/writing.md +635 -0
- package/dist/docs/start/howto.md +187 -0
- package/dist/docs/start/intro.md +43 -0
- package/dist/docs/start/responsiveness.md +98 -0
- package/dist/docs/templates/common-table.md +1111 -0
- package/dist/docs/templates/detail-views.md +942 -0
- package/dist/docs/templates/expandable-details.md +228 -0
- package/dist/docs/templates/feature-cards.md +549 -0
- package/dist/docs/templates/form-summary.md +199 -0
- package/dist/docs/templates/form-toggle.md +367 -0
- package/dist/docs/templates/list-blocks.md +1021 -0
- package/dist/docs/templates/loading-progress.md +109 -0
- package/dist/docs/templates/options-panel.md +152 -0
- package/dist/docs/templates/panel-variants.md +164 -0
- package/dist/docs/templates/progress-cards.md +607 -0
- package/dist/docs/templates/progress-success.md +142 -0
- package/dist/docs/templates/settings-form.md +434 -0
- package/dist/docs/templates/stats-blocks.md +1381 -0
- package/dist/docs/templates/table-panel.md +184 -0
- package/dist/docs/templates/table-row-animation.md +317 -0
- package/dist/docs/templates/usage-cards.md +227 -0
- package/dist/docs/utilities/deviceUtils.md +123 -0
- package/dist/docs/utilities/featureToggles.md +90 -0
- package/dist/docs/utilities/fuelTypeUtils.md +186 -0
- package/dist/docs/utilities/routeUtils.md +138 -0
- package/dist/docs/utilities/useAfterMount.md +66 -0
- package/dist/docs/utilities/useAutoAnimate.md +193 -0
- package/dist/docs/utilities/useAverage.md +95 -0
- package/dist/docs/utilities/useClickOutside.md +61 -0
- package/dist/docs/utilities/useClipboard.md +93 -0
- package/dist/docs/utilities/useCount.md +178 -0
- package/dist/docs/utilities/useDarkMode.md +49 -0
- package/dist/docs/utilities/useDebugInfo.md +126 -0
- package/dist/docs/utilities/useEffectOnce.md +58 -0
- package/dist/docs/utilities/useElapsedTime.md +58 -0
- package/dist/docs/utilities/useElementSize.md +71 -0
- package/dist/docs/utilities/useEsc.md +58 -0
- package/dist/docs/utilities/useEvent.md +64 -0
- package/dist/docs/utilities/useFocusTrap.md +85 -0
- package/dist/docs/utilities/useFullscreen.md +198 -0
- package/dist/docs/utilities/useHover.md +55 -0
- package/dist/docs/utilities/useIncomingPostMessages.md +237 -0
- package/dist/docs/utilities/useInterval.md +85 -0
- package/dist/docs/utilities/useIsFocusWithin.md +114 -0
- package/dist/docs/utilities/useKey.md +151 -0
- package/dist/docs/utilities/useLocalStorage.md +91 -0
- package/dist/docs/utilities/useLocationSuggestions.md +114 -0
- package/dist/docs/utilities/useMax.md +62 -0
- package/dist/docs/utilities/useMin.md +78 -0
- package/dist/docs/utilities/useMutationObserver.md +113 -0
- package/dist/docs/utilities/useOnScreen.md +138 -0
- package/dist/docs/utilities/useOnlineStatus.md +49 -0
- package/dist/docs/utilities/usePostMessage.md +117 -0
- package/dist/docs/utilities/usePostMessageSender.md +257 -0
- package/dist/docs/utilities/usePrevious.md +101 -0
- package/dist/docs/utilities/useResizeObserver.md +151 -0
- package/dist/docs/utilities/useScrollPosition.md +252 -0
- package/dist/docs/utilities/useSearch.md +228 -0
- package/dist/docs/utilities/useSorting.md +389 -0
- package/dist/docs/utilities/useStateWithValidation.md +83 -0
- package/dist/docs/utilities/useSum.md +155 -0
- package/dist/docs/utilities/useTableExport.md +404 -0
- package/dist/docs/utilities/useTableSelection.md +1120 -0
- package/dist/docs/utilities/useTimeout.md +55 -0
- package/dist/docs/utilities/useToggle.md +115 -0
- package/dist/docs/utilities/useWindowResize.md +70 -0
- package/dist/index.mjs +271 -0
- package/dist/search-synonyms.json +134 -0
- package/dist/version.json +4 -0
- package/package.json +23 -19
- package/bin/uikit-mcp.mjs +0 -23
- package/data/pages/Components/components/accentbar.json +0 -207
- package/data/pages/Components/components/activity.json +0 -87
- package/data/pages/Components/components/animatednumber.json +0 -99
- package/data/pages/Components/components/animations.json +0 -87
- package/data/pages/Components/components/appheader.json +0 -291
- package/data/pages/Components/components/applayout.json +0 -1198
- package/data/pages/Components/components/appnavigationbar.json +0 -327
- package/data/pages/Components/components/areacharts.json +0 -563
- package/data/pages/Components/components/aspectratioplaceholder.json +0 -75
- package/data/pages/Components/components/assettree.json +0 -3080
- package/data/pages/Components/components/autosuggests.json +0 -710
- package/data/pages/Components/components/avatar.json +0 -157
- package/data/pages/Components/components/banner.json +0 -599
- package/data/pages/Components/components/barcharts.json +0 -1507
- package/data/pages/Components/components/barlist.json +0 -223
- package/data/pages/Components/components/basicmap.json +0 -68
- package/data/pages/Components/components/bottomsheet.json +0 -601
- package/data/pages/Components/components/button.json +0 -583
- package/data/pages/Components/components/buttontoolbar.json +0 -63
- package/data/pages/Components/components/calendarstripe.json +0 -235
- package/data/pages/Components/components/card.json +0 -69
- package/data/pages/Components/components/carousel.json +0 -39
- package/data/pages/Components/components/chartcolors.json +0 -34
- package/data/pages/Components/components/chartsgettingstarted.json +0 -32
- package/data/pages/Components/components/chat.json +0 -39
- package/data/pages/Components/components/checkbox.json +0 -847
- package/data/pages/Components/components/clearableinput.json +0 -789
- package/data/pages/Components/components/collapse.json +0 -175
- package/data/pages/Components/components/composedcharts.json +0 -159
- package/data/pages/Components/components/contentloader.json +0 -233
- package/data/pages/Components/components/datatabs.json +0 -680
- package/data/pages/Components/components/datepickers.json +0 -287
- package/data/pages/Components/components/dialogs.json +0 -1492
- package/data/pages/Components/components/divider.json +0 -93
- package/data/pages/Components/components/dropdowns.json +0 -936
- package/data/pages/Components/components/editablecontent.json +0 -1117
- package/data/pages/Components/components/expander.json +0 -377
- package/data/pages/Components/components/fade.json +0 -403
- package/data/pages/Components/components/fadeexpander.json +0 -75
- package/data/pages/Components/components/fadeup.json +0 -127
- package/data/pages/Components/components/feedback.json +0 -269
- package/data/pages/Components/components/filepickers.json +0 -269
- package/data/pages/Components/components/formlabel.json +0 -115
- package/data/pages/Components/components/fullscreenmap.json +0 -22
- package/data/pages/Components/components/groupeditemlist.json +0 -323
- package/data/pages/Components/components/iconlist.json +0 -45
- package/data/pages/Components/components/imagepreloader.json +0 -81
- package/data/pages/Components/components/labeledelement.json +0 -75
- package/data/pages/Components/components/licenseplate.json +0 -69
- package/data/pages/Components/components/linecharts.json +0 -987
- package/data/pages/Components/components/listmenu.json +0 -313
- package/data/pages/Components/components/loadmore.json +0 -175
- package/data/pages/Components/components/mainnavigation.json +0 -39
- package/data/pages/Components/components/mapcircle.json +0 -34
- package/data/pages/Components/components/mapcluster.json +0 -51
- package/data/pages/Components/components/mapcontext.json +0 -105
- package/data/pages/Components/components/mapdraggablemarker.json +0 -34
- package/data/pages/Components/components/mapgettingstarted.json +0 -27
- package/data/pages/Components/components/mapgroup.json +0 -1198
- package/data/pages/Components/components/mapinfobubble.json +0 -34
- package/data/pages/Components/components/maplayergroup.json +0 -34
- package/data/pages/Components/components/mapmarker.json +0 -700
- package/data/pages/Components/components/mappolygon.json +0 -45
- package/data/pages/Components/components/maproute.json +0 -623
- package/data/pages/Components/components/maproutegenerator.json +0 -16
- package/data/pages/Components/components/mapsettings.json +0 -51
- package/data/pages/Components/components/maputils.json +0 -34
- package/data/pages/Components/components/multiselects.json +0 -1451
- package/data/pages/Components/components/nodata.json +0 -139
- package/data/pages/Components/components/notifications.json +0 -65
- package/data/pages/Components/components/numbercontrol.json +0 -301
- package/data/pages/Components/components/onboarding.json +0 -302
- package/data/pages/Components/components/page.json +0 -197
- package/data/pages/Components/components/pager.json +0 -93
- package/data/pages/Components/components/piecharts.json +0 -731
- package/data/pages/Components/components/popover.json +0 -251
- package/data/pages/Components/components/position.json +0 -69
- package/data/pages/Components/components/radialbarcharts.json +0 -1304
- package/data/pages/Components/components/radiobutton.json +0 -1105
- package/data/pages/Components/components/releasenotes.json +0 -44
- package/data/pages/Components/components/resizer.json +0 -93
- package/data/pages/Components/components/responsivecolumnstripe.json +0 -123
- package/data/pages/Components/components/responsivevideo.json +0 -75
- package/data/pages/Components/components/rioglyph.json +0 -93
- package/data/pages/Components/components/rules.json +0 -410
- package/data/pages/Components/components/saveableinput.json +0 -703
- package/data/pages/Components/components/selects.json +0 -701
- package/data/pages/Components/components/sidebar.json +0 -243
- package/data/pages/Components/components/sliders.json +0 -235
- package/data/pages/Components/components/smoothscrollbars.json +0 -335
- package/data/pages/Components/components/spinners.json +0 -343
- package/data/pages/Components/components/states.json +0 -1705
- package/data/pages/Components/components/statswidgets.json +0 -314
- package/data/pages/Components/components/statusbar.json +0 -177
- package/data/pages/Components/components/stepbutton.json +0 -57
- package/data/pages/Components/components/steppedprogressbars.json +0 -417
- package/data/pages/Components/components/subnavigation.json +0 -107
- package/data/pages/Components/components/supportmarker.json +0 -45
- package/data/pages/Components/components/svgimage.json +0 -81
- package/data/pages/Components/components/switch.json +0 -111
- package/data/pages/Components/components/tables.json +0 -144
- package/data/pages/Components/components/tagmanager.json +0 -86
- package/data/pages/Components/components/tags.json +0 -146
- package/data/pages/Components/components/teaser.json +0 -188
- package/data/pages/Components/components/timeline.json +0 -45
- package/data/pages/Components/components/timepicker.json +0 -163
- package/data/pages/Components/components/togglebutton.json +0 -247
- package/data/pages/Components/components/tooltip.json +0 -270
- package/data/pages/Components/components/virtuallist.json +0 -175
- package/data/pages/Foundations/foundations.json +0 -2475
- package/data/pages/Getting-started/start/changelog.json +0 -22
- package/data/pages/Getting-started/start/goodtoknow.json +0 -32
- package/data/pages/Getting-started/start/guidelines/color-combinations.json +0 -58
- package/data/pages/Getting-started/start/guidelines/custom-css.json +0 -27
- package/data/pages/Getting-started/start/guidelines/custom-rioglyph.json +0 -22
- package/data/pages/Getting-started/start/guidelines/formatting.json +0 -97
- package/data/pages/Getting-started/start/guidelines/iframe.json +0 -93
- package/data/pages/Getting-started/start/guidelines/obfuscate-data.json +0 -22
- package/data/pages/Getting-started/start/guidelines/print-css.json +0 -37
- package/data/pages/Getting-started/start/guidelines/spinner.json +0 -144
- package/data/pages/Getting-started/start/guidelines/supported-browsers.json +0 -22
- package/data/pages/Getting-started/start/guidelines/writing.json +0 -242
- package/data/pages/Getting-started/start/howto.json +0 -72
- package/data/pages/Getting-started/start/intro.json +0 -37
- package/data/pages/Getting-started/start/responsiveness.json +0 -52
- package/data/pages/Templates/templates/common-table.json +0 -39
- package/data/pages/Templates/templates/detail-views.json +0 -71
- package/data/pages/Templates/templates/expandable-details.json +0 -39
- package/data/pages/Templates/templates/feature-cards.json +0 -103
- package/data/pages/Templates/templates/form-summary.json +0 -39
- package/data/pages/Templates/templates/form-toggle.json +0 -39
- package/data/pages/Templates/templates/list-blocks.json +0 -119
- package/data/pages/Templates/templates/loading-progress.json +0 -39
- package/data/pages/Templates/templates/options-panel.json +0 -39
- package/data/pages/Templates/templates/panel-variants.json +0 -39
- package/data/pages/Templates/templates/progress-cards.json +0 -71
- package/data/pages/Templates/templates/progress-success.json +0 -39
- package/data/pages/Templates/templates/settings-form.json +0 -39
- package/data/pages/Templates/templates/stats-blocks.json +0 -135
- package/data/pages/Templates/templates/table-panel.json +0 -39
- package/data/pages/Templates/templates/table-row-animation.json +0 -39
- package/data/pages/Templates/templates/usage-cards.json +0 -39
- package/data/pages/Utilities/utilities/deviceutils.json +0 -39
- package/data/pages/Utilities/utilities/featuretoggles.json +0 -42
- package/data/pages/Utilities/utilities/fueltypeutils.json +0 -118
- package/data/pages/Utilities/utilities/routeutils.json +0 -34
- package/data/pages/Utilities/utilities/useaftermount.json +0 -63
- package/data/pages/Utilities/utilities/useaverage.json +0 -86
- package/data/pages/Utilities/utilities/useclickoutside.json +0 -69
- package/data/pages/Utilities/utilities/useclipboard.json +0 -57
- package/data/pages/Utilities/utilities/usecount.json +0 -92
- package/data/pages/Utilities/utilities/usedarkmode.json +0 -50
- package/data/pages/Utilities/utilities/usedebuginfo.json +0 -63
- package/data/pages/Utilities/utilities/useeffectonce.json +0 -57
- package/data/pages/Utilities/utilities/useelapsedtime.json +0 -57
- package/data/pages/Utilities/utilities/useelementsize.json +0 -63
- package/data/pages/Utilities/utilities/useesc.json +0 -57
- package/data/pages/Utilities/utilities/useevent.json +0 -75
- package/data/pages/Utilities/utilities/usefocustrap.json +0 -57
- package/data/pages/Utilities/utilities/usefullscreen.json +0 -197
- package/data/pages/Utilities/utilities/usehover.json +0 -57
- package/data/pages/Utilities/utilities/useinterval.json +0 -63
- package/data/pages/Utilities/utilities/useisfocuswithin.json +0 -75
- package/data/pages/Utilities/utilities/usekey.json +0 -75
- package/data/pages/Utilities/utilities/uselocalstorage.json +0 -69
- package/data/pages/Utilities/utilities/uselocationsuggestions.json +0 -110
- package/data/pages/Utilities/utilities/usemax.json +0 -86
- package/data/pages/Utilities/utilities/usemin.json +0 -86
- package/data/pages/Utilities/utilities/usemutationobserver.json +0 -69
- package/data/pages/Utilities/utilities/useonlinestatus.json +0 -39
- package/data/pages/Utilities/utilities/useonscreen.json +0 -63
- package/data/pages/Utilities/utilities/usepostmessage.json +0 -80
- package/data/pages/Utilities/utilities/useprevious.json +0 -63
- package/data/pages/Utilities/utilities/useresizeobserver.json +0 -65
- package/data/pages/Utilities/utilities/usescrollposition.json +0 -103
- package/data/pages/Utilities/utilities/usesearch.json +0 -197
- package/data/pages/Utilities/utilities/usesorting.json +0 -139
- package/data/pages/Utilities/utilities/usestatewithvalidation.json +0 -69
- package/data/pages/Utilities/utilities/usesum.json +0 -86
- package/data/pages/Utilities/utilities/usetableexport.json +0 -87
- package/data/pages/Utilities/utilities/usetableselection.json +0 -311
- package/data/pages/Utilities/utilities/usetimeout.json +0 -63
- package/data/pages/Utilities/utilities/usetoggle.json +0 -75
- package/data/pages/Utilities/utilities/usewindowresize.json +0 -63
- package/data/version.json +0 -4
- package/docs/content-schema.md +0 -147
- package/docs/navigation-inventory.json +0 -1310
- package/docs/search-synonyms.json +0 -43
- package/server/index.mjs +0 -268
- package/server/lib/load-docs.mjs +0 -48
- package/server/lib/normalise-doc.mjs +0 -220
- package/server/lib/render-markdown.mjs +0 -82
- package/server/lib/search-index.mjs +0 -49
- package/server/lib/types.js +0 -99
|
@@ -0,0 +1,1064 @@
|
|
|
1
|
+
# SteppedProgressBar - Circle
|
|
2
|
+
|
|
3
|
+
*Category:* Components
|
|
4
|
+
*Section:* Progress
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#components/steppedProgressBars
|
|
6
|
+
*Captured:* 2025-12-12T12:38:36.094Z
|
|
7
|
+
|
|
8
|
+
## SteppedProgressBar - Circle
|
|
9
|
+
|
|
10
|
+
### Example: Example 1
|
|
11
|
+
|
|
12
|
+
1
|
|
13
|
+
Label for step 1
|
|
14
|
+
|
|
15
|
+
2
|
|
16
|
+
Label for step 2
|
|
17
|
+
|
|
18
|
+
Label for final step
|
|
19
|
+
|
|
20
|
+
Content of page 2
|
|
21
|
+
|
|
22
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.
|
|
23
|
+
Click here to complete this step. There is no other way forward.PreviousNext
|
|
24
|
+
|
|
25
|
+
#### Summary
|
|
26
|
+
|
|
27
|
+
1
|
|
28
|
+
Label for step 1
|
|
29
|
+
|
|
30
|
+
2
|
|
31
|
+
Label for step 2
|
|
32
|
+
|
|
33
|
+
Label for final step
|
|
34
|
+
|
|
35
|
+
Content of page 2
|
|
36
|
+
|
|
37
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.
|
|
38
|
+
Click here to complete this step. There is no other way forward.PreviousNext
|
|
39
|
+
|
|
40
|
+
#### React (tsx)
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
import { type ChangeEvent, useState } from 'react';
|
|
44
|
+
|
|
45
|
+
import SteppedProgressBar from '@rio-cloud/rio-uikit/SteppedProgressBar';
|
|
46
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
47
|
+
import { dummyText, dummyTextShort } from '../../../utils/data';
|
|
48
|
+
import Checkbox from '@rio-cloud/rio-uikit/components/checkbox/Checkbox';
|
|
49
|
+
|
|
50
|
+
const SteppedProgressBarExampleDefault = () => {
|
|
51
|
+
const [selectedStep, setSelectedStep] = useState(1);
|
|
52
|
+
const [disableFollowingPages, setDisableFollowingPages] = useState<number>();
|
|
53
|
+
|
|
54
|
+
const handlePageNext = () => {
|
|
55
|
+
setSelectedStep(selectedStep + 1);
|
|
56
|
+
setDisableFollowingPages(3);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const handlePagePrevious = () => setSelectedStep(selectedStep - 1);
|
|
60
|
+
const handleSelectedChanged = (selectedKey: number) => setSelectedStep(selectedKey);
|
|
61
|
+
const handleDisableFollowingPages = (pageNumber: number) => setDisableFollowingPages(pageNumber);
|
|
62
|
+
|
|
63
|
+
const pageContent = [
|
|
64
|
+
<FirstPageContent key='firstStep' pageNumber={1} onClickNext={handlePageNext} />,
|
|
65
|
+
<SecondPageContent
|
|
66
|
+
key='secondStep'
|
|
67
|
+
pageNumber={2}
|
|
68
|
+
onClickNext={handlePageNext}
|
|
69
|
+
onClickPrevious={handlePagePrevious}
|
|
70
|
+
onDisableFollowingPages={handleDisableFollowingPages}
|
|
71
|
+
/>,
|
|
72
|
+
<ThirdPageContent key='thirdStep' pageNumber={3} onClickPrevious={handlePagePrevious} />,
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<div className='steppedProgressBarExample'>
|
|
77
|
+
<div className='margin-bottom-25'>
|
|
78
|
+
<SteppedProgressBar
|
|
79
|
+
variant='circle'
|
|
80
|
+
selectedStepNumber={selectedStep}
|
|
81
|
+
onSelectedChanged={handleSelectedChanged}
|
|
82
|
+
disableFollowingPages={disableFollowingPages}
|
|
83
|
+
mobileBreakpoint={false}
|
|
84
|
+
labels={[
|
|
85
|
+
{ icon: '1', label: 'Label for step 1' },
|
|
86
|
+
{ icon: '2', label: 'Label for step 2' },
|
|
87
|
+
{ icon: <i className='rioglyph rioglyph-ok' />, label: 'Label for final step' },
|
|
88
|
+
]}
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
{pageContent[selectedStep]}
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export default SteppedProgressBarExampleDefault;
|
|
97
|
+
|
|
98
|
+
type FirstPageContentProps = { pageNumber: number; onClickNext: VoidFunction };
|
|
99
|
+
|
|
100
|
+
const FirstPageContent = ({ pageNumber, onClickNext }: FirstPageContentProps) => (
|
|
101
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
102
|
+
<div className='text-size-h2'>{`Content of page ${pageNumber}`}</div>
|
|
103
|
+
<div className='padding-y-25'>{dummyText}</div>
|
|
104
|
+
<div className='btn-toolbar justify-content-end'>
|
|
105
|
+
<Button className='btn-icon-right' iconName='rioglyph-chevron-right' onClick={onClickNext}>
|
|
106
|
+
Next
|
|
107
|
+
</Button>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
type SecondPageContentProps = {
|
|
113
|
+
pageNumber: number;
|
|
114
|
+
onClickNext: VoidFunction;
|
|
115
|
+
onClickPrevious: VoidFunction;
|
|
116
|
+
onDisableFollowingPages: (pageNumber: number) => void;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const SecondPageContent = (props: SecondPageContentProps) => {
|
|
120
|
+
const { pageNumber, onClickNext, onClickPrevious, onDisableFollowingPages } = props;
|
|
121
|
+
|
|
122
|
+
const [isAccepted, setIsAccepted] = useState(false);
|
|
123
|
+
|
|
124
|
+
const handleNext = () => isAccepted && onClickNext();
|
|
125
|
+
|
|
126
|
+
const handleAccept = (event: ChangeEvent<HTMLInputElement>) => {
|
|
127
|
+
setIsAccepted(event.target.checked);
|
|
128
|
+
if (!event.target.checked) {
|
|
129
|
+
onDisableFollowingPages(pageNumber);
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
return (
|
|
134
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
135
|
+
<div className='text-size-h3'>{`Content of page ${pageNumber}`}</div>
|
|
136
|
+
<div className='padding-y-20'>{dummyTextShort}</div>
|
|
137
|
+
<Checkbox
|
|
138
|
+
onChange={handleAccept}
|
|
139
|
+
checked={isAccepted}
|
|
140
|
+
className={`padding-15 border rounded margin-bottom-20 ${isAccepted ? 'border-color-highlight' : ''}`}
|
|
141
|
+
>
|
|
142
|
+
Click here to complete this step. There is no other way forward.
|
|
143
|
+
</Checkbox>
|
|
144
|
+
<div className='btn-toolbar justify-content-between'>
|
|
145
|
+
<Button iconName='rioglyph-chevron-left' onClick={onClickPrevious}>
|
|
146
|
+
Previous
|
|
147
|
+
</Button>
|
|
148
|
+
<Button
|
|
149
|
+
className='btn-icon-right'
|
|
150
|
+
iconName='rioglyph-chevron-right'
|
|
151
|
+
onClick={handleNext}
|
|
152
|
+
disabled={!isAccepted}
|
|
153
|
+
>
|
|
154
|
+
Next
|
|
155
|
+
</Button>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
);
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
type ThirdPageContentProps = {
|
|
162
|
+
pageNumber: number;
|
|
163
|
+
onClickPrevious: VoidFunction;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
const ThirdPageContent = ({ pageNumber, onClickPrevious }: ThirdPageContentProps) => (
|
|
167
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
168
|
+
<div className='text-size-h2'>{`Content of page ${pageNumber}`}</div>
|
|
169
|
+
<div className='padding-y-25'>{dummyText}</div>
|
|
170
|
+
<div className='btn-toolbar'>
|
|
171
|
+
<Button iconName='rioglyph-chevron-left' onClick={onClickPrevious}>
|
|
172
|
+
Previous
|
|
173
|
+
</Button>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
);
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### HTML (html)
|
|
180
|
+
|
|
181
|
+
```html
|
|
182
|
+
<div class="steppedProgressBarExample">
|
|
183
|
+
<div class="margin-bottom-25">
|
|
184
|
+
<div class="stepped-progress-bar variant-circle nav">
|
|
185
|
+
<a data-rb-event-key="0" class="step-tab nav-link">
|
|
186
|
+
<div class="step-tab-content">
|
|
187
|
+
<div class="item-icon">1</div>
|
|
188
|
+
<div class="item-label">Label for step 1</div>
|
|
189
|
+
</div>
|
|
190
|
+
</a>
|
|
191
|
+
<a data-rb-event-key="1" class="step-tab nav-link active">
|
|
192
|
+
<div class="step-tab-content">
|
|
193
|
+
<div class="item-icon">2</div>
|
|
194
|
+
<div class="item-label">Label for step 2</div>
|
|
195
|
+
</div>
|
|
196
|
+
</a>
|
|
197
|
+
<a disabled="" data-rb-event-key="2" class="step-tab nav-link disabled">
|
|
198
|
+
<div class="step-tab-content">
|
|
199
|
+
<div class="item-icon">
|
|
200
|
+
<i class="rioglyph rioglyph-ok">
|
|
201
|
+
</i>
|
|
202
|
+
</div>
|
|
203
|
+
<div class="item-label">Label for final step</div>
|
|
204
|
+
</div>
|
|
205
|
+
</a>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
<div class="panel panel-default panel-body padding-25">
|
|
209
|
+
<div class="text-size-h3">Content of page 2</div>
|
|
210
|
+
<div class="padding-y-20">
|
|
211
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.</div>
|
|
212
|
+
<label class="checkbox padding-15 border rounded margin-bottom-20 " tabindex="0">
|
|
213
|
+
<input type="checkbox" class="padding-15 border rounded margin-bottom-20 ">
|
|
214
|
+
<span class="checkbox-text">
|
|
215
|
+
<span>Click here to complete this step. There is no other way forward.</span>
|
|
216
|
+
</span>
|
|
217
|
+
</label>
|
|
218
|
+
<div class="btn-toolbar justify-content-between">
|
|
219
|
+
<button type="button" class="btn btn-default btn-component" tabindex="0">
|
|
220
|
+
<span class="rioglyph rioglyph-chevron-left">
|
|
221
|
+
</span>Previous</button>
|
|
222
|
+
<button type="button" class="btn btn-default btn-component btn-icon-right" disabled="" tabindex="0">
|
|
223
|
+
<span class="rioglyph rioglyph-chevron-right">
|
|
224
|
+
</span>Next</button>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
#### Props
|
|
231
|
+
|
|
232
|
+
| Name | Type | Default | Description |
|
|
233
|
+
| --- | --- | --- | --- |
|
|
234
|
+
| labels | Array of Objects | — | Objects to define the icon and the label of the navigation items. The icon can be a string or an icon. |
|
|
235
|
+
| └icon | String / Node | — | The element shown in the step element. This can be a single step number or an icon element. |
|
|
236
|
+
| └label | String / Node | — | The label shown below the step element. |
|
|
237
|
+
| └labelClassName | String | — | Additional classes to be set on the label element. |
|
|
238
|
+
| └labelWrapperClassName | String | — | Additional classes to be set on the label wrapping element. |
|
|
239
|
+
| selectedStepNumber | Number | — | Index of the selected navigation item. |
|
|
240
|
+
| onSelectedChanged | Function | () => {} | Called with the new selected index after the user clicked a nav item. |
|
|
241
|
+
| variant | String | circle | The SteppedProgressBar Variant. One of "circle", "rectangle" or "roadsign". |
|
|
242
|
+
| disableFollowingPages | Number | — | All navigation items with a higher index than this will be disabled. |
|
|
243
|
+
| mobileBreakpoint | Boolean | true | Deactivating the Wrapping of bubbles on mobile |
|
|
244
|
+
| className | String | — | Additional classes to be set on the wrapper element. |
|
|
245
|
+
|
|
246
|
+
## SteppedProgressBar - Rectangle
|
|
247
|
+
|
|
248
|
+
### Example: Example 2
|
|
249
|
+
|
|
250
|
+
Label for step 1
|
|
251
|
+
|
|
252
|
+
Label for step 2
|
|
253
|
+
|
|
254
|
+
Label for final step
|
|
255
|
+
|
|
256
|
+
Content of page 2
|
|
257
|
+
|
|
258
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.
|
|
259
|
+
Click here to complete this step. There is no other way forward.PreviousNext
|
|
260
|
+
|
|
261
|
+
#### Summary
|
|
262
|
+
|
|
263
|
+
Label for step 1
|
|
264
|
+
|
|
265
|
+
Label for step 2
|
|
266
|
+
|
|
267
|
+
Label for final step
|
|
268
|
+
|
|
269
|
+
Content of page 2
|
|
270
|
+
|
|
271
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.
|
|
272
|
+
Click here to complete this step. There is no other way forward.PreviousNext
|
|
273
|
+
|
|
274
|
+
#### React (tsx)
|
|
275
|
+
|
|
276
|
+
```tsx
|
|
277
|
+
import { type ChangeEvent, useState } from 'react';
|
|
278
|
+
|
|
279
|
+
import SteppedProgressBar from '@rio-cloud/rio-uikit/SteppedProgressBar';
|
|
280
|
+
import Checkbox from '@rio-cloud/rio-uikit/Checkbox';
|
|
281
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
282
|
+
import { dummyText, dummyTextShort } from '../../../utils/data';
|
|
283
|
+
|
|
284
|
+
const SteppedProgressBarExampleDefault = () => {
|
|
285
|
+
const [selectedStep, setSelectedStep] = useState(1);
|
|
286
|
+
const [disableFollowingPages, setDisableFollowingPages] = useState<number>();
|
|
287
|
+
|
|
288
|
+
const handlePageNext = () => {
|
|
289
|
+
setSelectedStep(selectedStep + 1);
|
|
290
|
+
setDisableFollowingPages(3);
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
const handlePagePrevious = () => setSelectedStep(selectedStep - 1);
|
|
294
|
+
const handleSelectedChanged = (selectedKey: number) => setSelectedStep(selectedKey);
|
|
295
|
+
const handleDisableFollowingPages = (pageNumber: number) => setDisableFollowingPages(pageNumber - 1);
|
|
296
|
+
|
|
297
|
+
const pageContent = [
|
|
298
|
+
<FirstPageContent key='firstStep' pageNumber={1} onClickNext={handlePageNext} />,
|
|
299
|
+
<SecondPageContent
|
|
300
|
+
key='secondStep'
|
|
301
|
+
pageNumber={2}
|
|
302
|
+
onClickNext={handlePageNext}
|
|
303
|
+
onClickPrevious={handlePagePrevious}
|
|
304
|
+
onDisableFollowingPages={handleDisableFollowingPages}
|
|
305
|
+
/>,
|
|
306
|
+
<ThirdPageContent key='thirdStep' pageNumber={3} onClickPrevious={handlePagePrevious} />,
|
|
307
|
+
];
|
|
308
|
+
|
|
309
|
+
return (
|
|
310
|
+
<div className='steppedProgressBarExample'>
|
|
311
|
+
<div className='margin-bottom-25'>
|
|
312
|
+
<SteppedProgressBar
|
|
313
|
+
variant={SteppedProgressBar.VARIANT_RECTANGLE}
|
|
314
|
+
selectedStepNumber={selectedStep}
|
|
315
|
+
onSelectedChanged={handleSelectedChanged}
|
|
316
|
+
disableFollowingPages={disableFollowingPages}
|
|
317
|
+
mobileBreakpoint={false}
|
|
318
|
+
labels={[
|
|
319
|
+
{
|
|
320
|
+
icon: <i className='rioglyph rioglyph-document' />,
|
|
321
|
+
label: 'Label for step 1',
|
|
322
|
+
labelWrapperClassName: 'flex-1-1-0',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
icon: <i className='rioglyph rioglyph-pdf-file' />,
|
|
326
|
+
label: 'Label for step 2',
|
|
327
|
+
labelWrapperClassName: 'flex-1-1-0',
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
icon: <i className='rioglyph rioglyph-print' />,
|
|
331
|
+
label: 'Label for final step',
|
|
332
|
+
labelWrapperClassName: 'flex-1-1-0',
|
|
333
|
+
},
|
|
334
|
+
]}
|
|
335
|
+
/>
|
|
336
|
+
</div>
|
|
337
|
+
{pageContent[selectedStep]}
|
|
338
|
+
</div>
|
|
339
|
+
);
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
export default SteppedProgressBarExampleDefault;
|
|
343
|
+
|
|
344
|
+
type FirstPageContentProps = { pageNumber: number; onClickNext: VoidFunction };
|
|
345
|
+
|
|
346
|
+
const FirstPageContent = ({ pageNumber, onClickNext }: FirstPageContentProps) => (
|
|
347
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
348
|
+
<div className='text-size-h2'>{`Content of page ${pageNumber}`}</div>
|
|
349
|
+
<div className='padding-y-25'>{dummyText}</div>
|
|
350
|
+
<div className='btn-toolbar justify-content-end'>
|
|
351
|
+
<Button className='btn-icon-right' iconName='rioglyph-chevron-right' onClick={onClickNext}>
|
|
352
|
+
Next
|
|
353
|
+
</Button>
|
|
354
|
+
</div>
|
|
355
|
+
</div>
|
|
356
|
+
);
|
|
357
|
+
|
|
358
|
+
type SecondPageContentProps = {
|
|
359
|
+
pageNumber: number;
|
|
360
|
+
onClickNext: VoidFunction;
|
|
361
|
+
onClickPrevious: VoidFunction;
|
|
362
|
+
onDisableFollowingPages: (pageNumber: number) => void;
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
const SecondPageContent = (props: SecondPageContentProps) => {
|
|
366
|
+
const { pageNumber, onClickNext, onClickPrevious, onDisableFollowingPages } = props;
|
|
367
|
+
|
|
368
|
+
const [isAccepted, setIsAccepted] = useState(false);
|
|
369
|
+
|
|
370
|
+
const handleNext = () => isAccepted && onClickNext();
|
|
371
|
+
|
|
372
|
+
const handleAccept = (event: ChangeEvent<HTMLInputElement>) => {
|
|
373
|
+
setIsAccepted(event.target.checked);
|
|
374
|
+
if (!event.target.checked) {
|
|
375
|
+
onDisableFollowingPages(pageNumber);
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
return (
|
|
380
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
381
|
+
<div className='text-size-h3'>{`Content of page ${pageNumber}`}</div>
|
|
382
|
+
<div className='padding-y-20'>{dummyTextShort}</div>
|
|
383
|
+
<Checkbox
|
|
384
|
+
onChange={handleAccept}
|
|
385
|
+
checked={isAccepted}
|
|
386
|
+
className={`padding-15 border rounded margin-bottom-20 ${isAccepted ? 'border-color-highlight' : ''}`}
|
|
387
|
+
>
|
|
388
|
+
Click here to complete this step. There is no other way forward.
|
|
389
|
+
</Checkbox>
|
|
390
|
+
<div className='btn-toolbar justify-content-between'>
|
|
391
|
+
<Button iconName='rioglyph-chevron-left' onClick={onClickPrevious}>
|
|
392
|
+
Previous
|
|
393
|
+
</Button>
|
|
394
|
+
<Button
|
|
395
|
+
className='btn-icon-right'
|
|
396
|
+
iconName='rioglyph-chevron-right'
|
|
397
|
+
onClick={handleNext}
|
|
398
|
+
disabled={!isAccepted}
|
|
399
|
+
>
|
|
400
|
+
Next
|
|
401
|
+
</Button>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
);
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
type ThirdPageContentProps = {
|
|
408
|
+
pageNumber: number;
|
|
409
|
+
onClickPrevious: VoidFunction;
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
const ThirdPageContent = ({ pageNumber, onClickPrevious }: ThirdPageContentProps) => (
|
|
413
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
414
|
+
<div className='text-size-h2'>{`Content of page ${pageNumber}`}</div>
|
|
415
|
+
<div className='padding-y-25'>{dummyText}</div>
|
|
416
|
+
<div className='btn-toolbar'>
|
|
417
|
+
<Button iconName='rioglyph-chevron-left' onClick={onClickPrevious}>
|
|
418
|
+
Previous
|
|
419
|
+
</Button>
|
|
420
|
+
</div>
|
|
421
|
+
</div>
|
|
422
|
+
);
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
#### HTML (html)
|
|
426
|
+
|
|
427
|
+
```html
|
|
428
|
+
<div class="steppedProgressBarExample">
|
|
429
|
+
<div class="margin-bottom-25">
|
|
430
|
+
<div class="stepped-progress-bar variant-rectangle nav">
|
|
431
|
+
<a data-rb-event-key="0" class="step-tab flex-1-1-0 nav-link">
|
|
432
|
+
<div class="step-tab-content">
|
|
433
|
+
<div class="item-icon">
|
|
434
|
+
<i class="rioglyph rioglyph-document">
|
|
435
|
+
</i>
|
|
436
|
+
</div>
|
|
437
|
+
<div class="item-label">Label for step 1</div>
|
|
438
|
+
</div>
|
|
439
|
+
</a>
|
|
440
|
+
<a data-rb-event-key="1" class="step-tab flex-1-1-0 nav-link active">
|
|
441
|
+
<div class="step-tab-content">
|
|
442
|
+
<div class="item-icon">
|
|
443
|
+
<i class="rioglyph rioglyph-pdf-file">
|
|
444
|
+
</i>
|
|
445
|
+
</div>
|
|
446
|
+
<div class="item-label">Label for step 2</div>
|
|
447
|
+
</div>
|
|
448
|
+
</a>
|
|
449
|
+
<a disabled="" data-rb-event-key="2" class="step-tab flex-1-1-0 nav-link disabled">
|
|
450
|
+
<div class="step-tab-content">
|
|
451
|
+
<div class="item-icon">
|
|
452
|
+
<i class="rioglyph rioglyph-print">
|
|
453
|
+
</i>
|
|
454
|
+
</div>
|
|
455
|
+
<div class="item-label">Label for final step</div>
|
|
456
|
+
</div>
|
|
457
|
+
</a>
|
|
458
|
+
</div>
|
|
459
|
+
</div>
|
|
460
|
+
<div class="panel panel-default panel-body padding-25">
|
|
461
|
+
<div class="text-size-h3">Content of page 2</div>
|
|
462
|
+
<div class="padding-y-20">
|
|
463
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.</div>
|
|
464
|
+
<label class="checkbox padding-15 border rounded margin-bottom-20 " tabindex="0">
|
|
465
|
+
<input type="checkbox" class="padding-15 border rounded margin-bottom-20 ">
|
|
466
|
+
<span class="checkbox-text">
|
|
467
|
+
<span>Click here to complete this step. There is no other way forward.</span>
|
|
468
|
+
</span>
|
|
469
|
+
</label>
|
|
470
|
+
<div class="btn-toolbar justify-content-between">
|
|
471
|
+
<button type="button" class="btn btn-default btn-component" tabindex="0">
|
|
472
|
+
<span class="rioglyph rioglyph-chevron-left">
|
|
473
|
+
</span>Previous</button>
|
|
474
|
+
<button type="button" class="btn btn-default btn-component btn-icon-right" disabled="" tabindex="0">
|
|
475
|
+
<span class="rioglyph rioglyph-chevron-right">
|
|
476
|
+
</span>Next</button>
|
|
477
|
+
</div>
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
#### Props
|
|
483
|
+
|
|
484
|
+
| Name | Type | Default | Description |
|
|
485
|
+
| --- | --- | --- | --- |
|
|
486
|
+
| labels | Array of Objects | — | Objects to define the icon and the label of the navigation items. The icon can be a string or an icon. |
|
|
487
|
+
| └icon | String / Node | — | The element shown in the step element. This can be a single step number or an icon element. |
|
|
488
|
+
| └label | String / Node | — | The label shown below the step element. |
|
|
489
|
+
| └labelClassName | String | — | Additional classes to be set on the label element. |
|
|
490
|
+
| └labelWrapperClassName | String | — | Additional classes to be set on the label wrapping element. |
|
|
491
|
+
| selectedStepNumber | Number | — | Index of the selected navigation item. |
|
|
492
|
+
| onSelectedChanged | Function | () => {} | Called with the new selected index after the user clicked a nav item. |
|
|
493
|
+
| variant | String | circle | The SteppedProgressBar Variant. One of "circle", "rectangle" or "roadsign". |
|
|
494
|
+
| disableFollowingPages | Number | — | All navigation items with a higher index than this will be disabled. |
|
|
495
|
+
| mobileBreakpoint | Boolean | true | Deactivating the Wrapping of bubbles on mobile |
|
|
496
|
+
| className | String | — | Additional classes to be set on the wrapper element. |
|
|
497
|
+
|
|
498
|
+
## SteppedProgressBar - Rectangle with custom content
|
|
499
|
+
|
|
500
|
+
### Example: Example 3
|
|
501
|
+
|
|
502
|
+
Initial step
|
|
503
|
+
Lorem ipsum dolor
|
|
504
|
+
|
|
505
|
+
Second step
|
|
506
|
+
Lorem ipsum dolor
|
|
507
|
+
|
|
508
|
+
Final step
|
|
509
|
+
Lorem ipsum dolor
|
|
510
|
+
|
|
511
|
+
Content of page 2
|
|
512
|
+
|
|
513
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.
|
|
514
|
+
Click here to complete this step. There is no other way forward.PreviousNext
|
|
515
|
+
|
|
516
|
+
#### Summary
|
|
517
|
+
|
|
518
|
+
Initial step
|
|
519
|
+
Lorem ipsum dolor
|
|
520
|
+
|
|
521
|
+
Second step
|
|
522
|
+
Lorem ipsum dolor
|
|
523
|
+
|
|
524
|
+
Final step
|
|
525
|
+
Lorem ipsum dolor
|
|
526
|
+
|
|
527
|
+
Content of page 2
|
|
528
|
+
|
|
529
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.
|
|
530
|
+
Click here to complete this step. There is no other way forward.PreviousNext
|
|
531
|
+
|
|
532
|
+
#### React (tsx)
|
|
533
|
+
|
|
534
|
+
```tsx
|
|
535
|
+
import { type ChangeEvent, useState } from 'react';
|
|
536
|
+
|
|
537
|
+
import SteppedProgressBar from '@rio-cloud/rio-uikit/SteppedProgressBar';
|
|
538
|
+
import Checkbox from '@rio-cloud/rio-uikit/Checkbox';
|
|
539
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
540
|
+
import { dummyText, dummyTextShort } from '../../../utils/data';
|
|
541
|
+
|
|
542
|
+
const SteppedProgressBarExampleDefault = () => {
|
|
543
|
+
const [selectedStep, setSelectedStep] = useState(1);
|
|
544
|
+
const [disableFollowingPages, setDisableFollowingPages] = useState<number>();
|
|
545
|
+
|
|
546
|
+
const handlePageNext = () => {
|
|
547
|
+
setSelectedStep(selectedStep + 1);
|
|
548
|
+
setDisableFollowingPages(3);
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
const handlePagePrevious = () => setSelectedStep(selectedStep - 1);
|
|
552
|
+
const handleSelectedChanged = (selectedKey: number) => setSelectedStep(selectedKey);
|
|
553
|
+
const handleDisableFollowingPages = (pageNumber: number) => setDisableFollowingPages(pageNumber - 1);
|
|
554
|
+
|
|
555
|
+
const pageContent = [
|
|
556
|
+
<FirstPageContent key='firstStep' pageNumber={1} onClickNext={handlePageNext} />,
|
|
557
|
+
<SecondPageContent
|
|
558
|
+
key='secondStep'
|
|
559
|
+
pageNumber={2}
|
|
560
|
+
onClickNext={handlePageNext}
|
|
561
|
+
onClickPrevious={handlePagePrevious}
|
|
562
|
+
onDisableFollowingPages={handleDisableFollowingPages}
|
|
563
|
+
/>,
|
|
564
|
+
<ThirdPageContent key='thirdStep' pageNumber={3} onClickPrevious={handlePagePrevious} />,
|
|
565
|
+
];
|
|
566
|
+
|
|
567
|
+
return (
|
|
568
|
+
<div className='steppedProgressBarExample'>
|
|
569
|
+
<div className='margin-bottom-25'>
|
|
570
|
+
<SteppedProgressBar
|
|
571
|
+
variant={SteppedProgressBar.VARIANT_RECTANGLE}
|
|
572
|
+
selectedStepNumber={selectedStep}
|
|
573
|
+
onSelectedChanged={handleSelectedChanged}
|
|
574
|
+
disableFollowingPages={disableFollowingPages}
|
|
575
|
+
mobileBreakpoint={false}
|
|
576
|
+
labels={[
|
|
577
|
+
{
|
|
578
|
+
label: (
|
|
579
|
+
<StepLabelContent
|
|
580
|
+
label='Initial step'
|
|
581
|
+
description='Lorem ipsum dolor'
|
|
582
|
+
icon='rioglyph rioglyph-clipboard'
|
|
583
|
+
done={selectedStep > 0}
|
|
584
|
+
/>
|
|
585
|
+
),
|
|
586
|
+
labelClassName: 'width-100pct text-left',
|
|
587
|
+
labelWrapperClassName: 'flex-1-1-0',
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
label: (
|
|
591
|
+
<StepLabelContent
|
|
592
|
+
label='Second step'
|
|
593
|
+
description='Lorem ipsum dolor'
|
|
594
|
+
icon='rioglyph rioglyph-parcel'
|
|
595
|
+
done={selectedStep > 1}
|
|
596
|
+
/>
|
|
597
|
+
),
|
|
598
|
+
labelClassName: 'width-100pct text-left',
|
|
599
|
+
labelWrapperClassName: 'flex-1-1-0',
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
label: (
|
|
603
|
+
<StepLabelContent
|
|
604
|
+
label='Final step'
|
|
605
|
+
description='Lorem ipsum dolor'
|
|
606
|
+
icon='rioglyph rioglyph-print'
|
|
607
|
+
done={selectedStep > 2}
|
|
608
|
+
/>
|
|
609
|
+
),
|
|
610
|
+
labelClassName: 'width-100pct text-left',
|
|
611
|
+
labelWrapperClassName: 'flex-1-1-0',
|
|
612
|
+
},
|
|
613
|
+
]}
|
|
614
|
+
/>
|
|
615
|
+
</div>
|
|
616
|
+
{pageContent[selectedStep]}
|
|
617
|
+
</div>
|
|
618
|
+
);
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
export default SteppedProgressBarExampleDefault;
|
|
622
|
+
|
|
623
|
+
type StepLabelContentProps = {
|
|
624
|
+
label: string;
|
|
625
|
+
description: string;
|
|
626
|
+
icon: string;
|
|
627
|
+
done: boolean;
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
const StepLabelContent = ({ label, description, icon, done }: StepLabelContentProps) => {
|
|
631
|
+
return (
|
|
632
|
+
<div className='display-flex align-items-center gap-10'>
|
|
633
|
+
<span className={`${done ? 'rioglyph rioglyph-ok text-color-success' : icon} margin-x-10 text-size-h2`} />
|
|
634
|
+
<div>
|
|
635
|
+
<div className='text-colot-darkest text-medium'>{label}</div>
|
|
636
|
+
<div className='text-color-darker'>{description}</div>
|
|
637
|
+
</div>
|
|
638
|
+
</div>
|
|
639
|
+
);
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
type FirstPageContentProps = { pageNumber: number; onClickNext: VoidFunction };
|
|
643
|
+
|
|
644
|
+
const FirstPageContent = ({ pageNumber, onClickNext }: FirstPageContentProps) => (
|
|
645
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
646
|
+
<div className='text-size-h2'>{`Content of page ${pageNumber}`}</div>
|
|
647
|
+
<div className='padding-y-25'>{dummyText}</div>
|
|
648
|
+
<div className='btn-toolbar justify-content-end'>
|
|
649
|
+
<Button className='btn-icon-right' iconName='rioglyph-chevron-right' onClick={onClickNext}>
|
|
650
|
+
Next
|
|
651
|
+
</Button>
|
|
652
|
+
</div>
|
|
653
|
+
</div>
|
|
654
|
+
);
|
|
655
|
+
|
|
656
|
+
type SecondPageContentProps = {
|
|
657
|
+
pageNumber: number;
|
|
658
|
+
onClickNext: VoidFunction;
|
|
659
|
+
onClickPrevious: VoidFunction;
|
|
660
|
+
onDisableFollowingPages: (pageNumber: number) => void;
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
const SecondPageContent = (props: SecondPageContentProps) => {
|
|
664
|
+
const { pageNumber, onClickNext, onClickPrevious, onDisableFollowingPages } = props;
|
|
665
|
+
|
|
666
|
+
const [isAccepted, setIsAccepted] = useState(false);
|
|
667
|
+
|
|
668
|
+
const handleNext = () => isAccepted && onClickNext();
|
|
669
|
+
|
|
670
|
+
const handleAccept = (event: ChangeEvent<HTMLInputElement>) => {
|
|
671
|
+
setIsAccepted(event.target.checked);
|
|
672
|
+
if (!event.target.checked) {
|
|
673
|
+
onDisableFollowingPages(pageNumber);
|
|
674
|
+
}
|
|
675
|
+
};
|
|
676
|
+
|
|
677
|
+
return (
|
|
678
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
679
|
+
<div className='text-size-h3'>{`Content of page ${pageNumber}`}</div>
|
|
680
|
+
<div className='padding-y-20'>{dummyTextShort}</div>
|
|
681
|
+
<Checkbox
|
|
682
|
+
onChange={handleAccept}
|
|
683
|
+
checked={isAccepted}
|
|
684
|
+
className={`padding-15 border rounded margin-bottom-20 ${isAccepted ? 'border-color-highlight' : ''}`}
|
|
685
|
+
>
|
|
686
|
+
Click here to complete this step. There is no other way forward.
|
|
687
|
+
</Checkbox>
|
|
688
|
+
<div className='btn-toolbar justify-content-between'>
|
|
689
|
+
<Button iconName='rioglyph-chevron-left' onClick={onClickPrevious}>
|
|
690
|
+
Previous
|
|
691
|
+
</Button>
|
|
692
|
+
<Button
|
|
693
|
+
className='btn-icon-right'
|
|
694
|
+
iconName='rioglyph-chevron-right'
|
|
695
|
+
onClick={handleNext}
|
|
696
|
+
disabled={!isAccepted}
|
|
697
|
+
>
|
|
698
|
+
Next
|
|
699
|
+
</Button>
|
|
700
|
+
</div>
|
|
701
|
+
</div>
|
|
702
|
+
);
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
type ThirdPageContentProps = {
|
|
706
|
+
pageNumber: number;
|
|
707
|
+
onClickPrevious: VoidFunction;
|
|
708
|
+
};
|
|
709
|
+
|
|
710
|
+
const ThirdPageContent = ({ pageNumber, onClickPrevious }: ThirdPageContentProps) => (
|
|
711
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
712
|
+
<div className='text-size-h2'>{`Content of page ${pageNumber}`}</div>
|
|
713
|
+
<div className='padding-y-25'>{dummyText}</div>
|
|
714
|
+
<div className='btn-toolbar'>
|
|
715
|
+
<Button iconName='rioglyph-chevron-left' onClick={onClickPrevious}>
|
|
716
|
+
Previous
|
|
717
|
+
</Button>
|
|
718
|
+
</div>
|
|
719
|
+
</div>
|
|
720
|
+
);
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
#### HTML (html)
|
|
724
|
+
|
|
725
|
+
```html
|
|
726
|
+
<div class="steppedProgressBarExample">
|
|
727
|
+
<div class="margin-bottom-25">
|
|
728
|
+
<div class="stepped-progress-bar variant-rectangle nav">
|
|
729
|
+
<a data-rb-event-key="0" class="step-tab flex-1-1-0 nav-link">
|
|
730
|
+
<div class="step-tab-content">
|
|
731
|
+
<div class="item-icon">
|
|
732
|
+
</div>
|
|
733
|
+
<div class="item-label width-100pct text-left">
|
|
734
|
+
<div class="display-flex align-items-center gap-10">
|
|
735
|
+
<span class="rioglyph rioglyph-ok text-color-success margin-x-10 text-size-h2">
|
|
736
|
+
</span>
|
|
737
|
+
<div>
|
|
738
|
+
<div class="text-colot-darkest text-medium">Initial step</div>
|
|
739
|
+
<div class="text-color-darker">Lorem ipsum dolor</div>
|
|
740
|
+
</div>
|
|
741
|
+
</div>
|
|
742
|
+
</div>
|
|
743
|
+
</div>
|
|
744
|
+
</a>
|
|
745
|
+
<a data-rb-event-key="1" class="step-tab flex-1-1-0 nav-link active">
|
|
746
|
+
<div class="step-tab-content">
|
|
747
|
+
<div class="item-icon">
|
|
748
|
+
</div>
|
|
749
|
+
<div class="item-label width-100pct text-left">
|
|
750
|
+
<div class="display-flex align-items-center gap-10">
|
|
751
|
+
<span class="rioglyph rioglyph-parcel margin-x-10 text-size-h2">
|
|
752
|
+
</span>
|
|
753
|
+
<div>
|
|
754
|
+
<div class="text-colot-darkest text-medium">Second step</div>
|
|
755
|
+
<div class="text-color-darker">Lorem ipsum dolor</div>
|
|
756
|
+
</div>
|
|
757
|
+
</div>
|
|
758
|
+
</div>
|
|
759
|
+
</div>
|
|
760
|
+
</a>
|
|
761
|
+
<a disabled="" data-rb-event-key="2" class="step-tab flex-1-1-0 nav-link disabled">
|
|
762
|
+
<div class="step-tab-content">
|
|
763
|
+
<div class="item-icon">
|
|
764
|
+
</div>
|
|
765
|
+
<div class="item-label width-100pct text-left">
|
|
766
|
+
<div class="display-flex align-items-center gap-10">
|
|
767
|
+
<span class="rioglyph rioglyph-print margin-x-10 text-size-h2">
|
|
768
|
+
</span>
|
|
769
|
+
<div>
|
|
770
|
+
<div class="text-colot-darkest text-medium">Final step</div>
|
|
771
|
+
<div class="text-color-darker">Lorem ipsum dolor</div>
|
|
772
|
+
</div>
|
|
773
|
+
</div>
|
|
774
|
+
</div>
|
|
775
|
+
</div>
|
|
776
|
+
</a>
|
|
777
|
+
</div>
|
|
778
|
+
</div>
|
|
779
|
+
<div class="panel panel-default panel-body padding-25">
|
|
780
|
+
<div class="text-size-h3">Content of page 2</div>
|
|
781
|
+
<div class="padding-y-20">
|
|
782
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.</div>
|
|
783
|
+
<label class="checkbox padding-15 border rounded margin-bottom-20 " tabindex="0">
|
|
784
|
+
<input type="checkbox" class="padding-15 border rounded margin-bottom-20 ">
|
|
785
|
+
<span class="checkbox-text">
|
|
786
|
+
<span>Click here to complete this step. There is no other way forward.</span>
|
|
787
|
+
</span>
|
|
788
|
+
</label>
|
|
789
|
+
<div class="btn-toolbar justify-content-between">
|
|
790
|
+
<button type="button" class="btn btn-default btn-component" tabindex="0">
|
|
791
|
+
<span class="rioglyph rioglyph-chevron-left">
|
|
792
|
+
</span>Previous</button>
|
|
793
|
+
<button type="button" class="btn btn-default btn-component btn-icon-right" disabled="" tabindex="0">
|
|
794
|
+
<span class="rioglyph rioglyph-chevron-right">
|
|
795
|
+
</span>Next</button>
|
|
796
|
+
</div>
|
|
797
|
+
</div>
|
|
798
|
+
</div>
|
|
799
|
+
```
|
|
800
|
+
|
|
801
|
+
#### Props
|
|
802
|
+
|
|
803
|
+
| Name | Type | Default | Description |
|
|
804
|
+
| --- | --- | --- | --- |
|
|
805
|
+
| labels | Array of Objects | — | Objects to define the icon and the label of the navigation items. The icon can be a string or an icon. |
|
|
806
|
+
| └icon | String / Node | — | The element shown in the step element. This can be a single step number or an icon element. |
|
|
807
|
+
| └label | String / Node | — | The label shown below the step element. |
|
|
808
|
+
| └labelClassName | String | — | Additional classes to be set on the label element. |
|
|
809
|
+
| └labelWrapperClassName | String | — | Additional classes to be set on the label wrapping element. |
|
|
810
|
+
| selectedStepNumber | Number | — | Index of the selected navigation item. |
|
|
811
|
+
| onSelectedChanged | Function | () => {} | Called with the new selected index after the user clicked a nav item. |
|
|
812
|
+
| variant | String | circle | The SteppedProgressBar Variant. One of "circle", "rectangle" or "roadsign". |
|
|
813
|
+
| disableFollowingPages | Number | — | All navigation items with a higher index than this will be disabled. |
|
|
814
|
+
| mobileBreakpoint | Boolean | true | Deactivating the Wrapping of bubbles on mobile |
|
|
815
|
+
| className | String | — | Additional classes to be set on the wrapper element. |
|
|
816
|
+
|
|
817
|
+
## SteppedProgressBar - Road Sign
|
|
818
|
+
|
|
819
|
+
### Example: Example 4
|
|
820
|
+
|
|
821
|
+
Label for step 1
|
|
822
|
+
|
|
823
|
+
Label for step 2
|
|
824
|
+
|
|
825
|
+
Label for final step
|
|
826
|
+
|
|
827
|
+
Content of page 2
|
|
828
|
+
|
|
829
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.
|
|
830
|
+
Click here to complete this step. There is no other way forward.PreviousNext
|
|
831
|
+
|
|
832
|
+
#### Summary
|
|
833
|
+
|
|
834
|
+
Label for step 1
|
|
835
|
+
|
|
836
|
+
Label for step 2
|
|
837
|
+
|
|
838
|
+
Label for final step
|
|
839
|
+
|
|
840
|
+
Content of page 2
|
|
841
|
+
|
|
842
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.
|
|
843
|
+
Click here to complete this step. There is no other way forward.PreviousNext
|
|
844
|
+
|
|
845
|
+
#### React (tsx)
|
|
846
|
+
|
|
847
|
+
```tsx
|
|
848
|
+
import { type ChangeEvent, useState } from 'react';
|
|
849
|
+
|
|
850
|
+
import SteppedProgressBar from '@rio-cloud/rio-uikit/SteppedProgressBar';
|
|
851
|
+
import Checkbox from '@rio-cloud/rio-uikit/Checkbox';
|
|
852
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
853
|
+
import { dummyText, dummyTextShort } from '../../../utils/data';
|
|
854
|
+
|
|
855
|
+
const SteppedProgressBarExampleDefault = () => {
|
|
856
|
+
const [selectedStep, setSelectedStep] = useState(1);
|
|
857
|
+
const [disableFollowingPages, setDisableFollowingPages] = useState<number>();
|
|
858
|
+
|
|
859
|
+
const handlePageNext = () => {
|
|
860
|
+
setSelectedStep(selectedStep + 1);
|
|
861
|
+
setDisableFollowingPages(3);
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
const handlePagePrevious = () => setSelectedStep(selectedStep - 1);
|
|
865
|
+
const handleSelectedChanged = (selectedKey: number) => setSelectedStep(selectedKey);
|
|
866
|
+
const handleDisableFollowingPages = (pageNumber: number) => setDisableFollowingPages(pageNumber - 1);
|
|
867
|
+
|
|
868
|
+
const pageContent = [
|
|
869
|
+
<FirstPageContent key='firstStep' pageNumber={1} onClickNext={handlePageNext} />,
|
|
870
|
+
<SecondPageContent
|
|
871
|
+
key='secondStep'
|
|
872
|
+
pageNumber={2}
|
|
873
|
+
onClickNext={handlePageNext}
|
|
874
|
+
onClickPrevious={handlePagePrevious}
|
|
875
|
+
onDisableFollowingPages={handleDisableFollowingPages}
|
|
876
|
+
/>,
|
|
877
|
+
<ThirdPageContent key='thirdStep' pageNumber={3} onClickPrevious={handlePagePrevious} />,
|
|
878
|
+
];
|
|
879
|
+
|
|
880
|
+
return (
|
|
881
|
+
<div className='steppedProgressBarExample'>
|
|
882
|
+
<div className='margin-bottom-25'>
|
|
883
|
+
<SteppedProgressBar
|
|
884
|
+
variant={SteppedProgressBar.VARIANT_ROADSIGN}
|
|
885
|
+
selectedStepNumber={selectedStep}
|
|
886
|
+
onSelectedChanged={handleSelectedChanged}
|
|
887
|
+
disableFollowingPages={disableFollowingPages}
|
|
888
|
+
mobileBreakpoint={false}
|
|
889
|
+
labels={[
|
|
890
|
+
{
|
|
891
|
+
icon: <i className='rioglyph rioglyph-document' />,
|
|
892
|
+
label: 'Label for step 1',
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
icon: <i className='rioglyph rioglyph-pdf-file' />,
|
|
896
|
+
label: 'Label for step 2',
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
icon: <i className='rioglyph rioglyph-print' />,
|
|
900
|
+
label: 'Label for final step',
|
|
901
|
+
},
|
|
902
|
+
]}
|
|
903
|
+
/>
|
|
904
|
+
</div>
|
|
905
|
+
{pageContent[selectedStep]}
|
|
906
|
+
</div>
|
|
907
|
+
);
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
export default SteppedProgressBarExampleDefault;
|
|
911
|
+
|
|
912
|
+
type FirstPageContentProps = { pageNumber: number; onClickNext: VoidFunction };
|
|
913
|
+
|
|
914
|
+
const FirstPageContent = ({ pageNumber, onClickNext }: FirstPageContentProps) => (
|
|
915
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
916
|
+
<div className='text-size-h2'>{`Content of page ${pageNumber}`}</div>
|
|
917
|
+
<div className='padding-y-25'>{dummyText}</div>
|
|
918
|
+
<div className='btn-toolbar justify-content-end'>
|
|
919
|
+
<Button className='btn-icon-right' iconName='rioglyph-chevron-right' onClick={onClickNext}>
|
|
920
|
+
Next
|
|
921
|
+
</Button>
|
|
922
|
+
</div>
|
|
923
|
+
</div>
|
|
924
|
+
);
|
|
925
|
+
|
|
926
|
+
type SecondPageContentProps = {
|
|
927
|
+
pageNumber: number;
|
|
928
|
+
onClickNext: VoidFunction;
|
|
929
|
+
onClickPrevious: VoidFunction;
|
|
930
|
+
onDisableFollowingPages: (pageNumber: number) => void;
|
|
931
|
+
};
|
|
932
|
+
|
|
933
|
+
const SecondPageContent = (props: SecondPageContentProps) => {
|
|
934
|
+
const { pageNumber, onClickNext, onClickPrevious, onDisableFollowingPages } = props;
|
|
935
|
+
|
|
936
|
+
const [isAccepted, setIsAccepted] = useState(false);
|
|
937
|
+
|
|
938
|
+
const handleNext = () => isAccepted && onClickNext();
|
|
939
|
+
|
|
940
|
+
const handleAccept = (event: ChangeEvent<HTMLInputElement>) => {
|
|
941
|
+
setIsAccepted(event.target.checked);
|
|
942
|
+
if (!event.target.checked) {
|
|
943
|
+
onDisableFollowingPages(pageNumber);
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
return (
|
|
948
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
949
|
+
<div className='text-size-h3'>{`Content of page ${pageNumber}`}</div>
|
|
950
|
+
<div className='padding-y-20'>{dummyTextShort}</div>
|
|
951
|
+
<Checkbox
|
|
952
|
+
onChange={handleAccept}
|
|
953
|
+
checked={isAccepted}
|
|
954
|
+
className={`padding-15 border rounded margin-bottom-20 ${isAccepted ? 'border-color-highlight' : ''}`}
|
|
955
|
+
>
|
|
956
|
+
Click here to complete this step. There is no other way forward.
|
|
957
|
+
</Checkbox>
|
|
958
|
+
<div className='btn-toolbar justify-content-between'>
|
|
959
|
+
<Button iconName='rioglyph-chevron-left' onClick={onClickPrevious}>
|
|
960
|
+
Previous
|
|
961
|
+
</Button>
|
|
962
|
+
<Button
|
|
963
|
+
className='btn-icon-right'
|
|
964
|
+
iconName='rioglyph-chevron-right'
|
|
965
|
+
onClick={handleNext}
|
|
966
|
+
disabled={!isAccepted}
|
|
967
|
+
>
|
|
968
|
+
Next
|
|
969
|
+
</Button>
|
|
970
|
+
</div>
|
|
971
|
+
</div>
|
|
972
|
+
);
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
type ThirdPageContentProps = {
|
|
976
|
+
pageNumber: number;
|
|
977
|
+
onClickPrevious: VoidFunction;
|
|
978
|
+
};
|
|
979
|
+
|
|
980
|
+
const ThirdPageContent = ({ pageNumber, onClickPrevious }: ThirdPageContentProps) => (
|
|
981
|
+
<div className='panel panel-default panel-body padding-25'>
|
|
982
|
+
<div className='text-size-h2'>{`Content of page ${pageNumber}`}</div>
|
|
983
|
+
<div className='padding-y-25'>{dummyText}</div>
|
|
984
|
+
<div className='btn-toolbar'>
|
|
985
|
+
<Button iconName='rioglyph-chevron-left' onClick={onClickPrevious}>
|
|
986
|
+
Previous
|
|
987
|
+
</Button>
|
|
988
|
+
</div>
|
|
989
|
+
</div>
|
|
990
|
+
);
|
|
991
|
+
```
|
|
992
|
+
|
|
993
|
+
#### HTML (html)
|
|
994
|
+
|
|
995
|
+
```html
|
|
996
|
+
<div class="steppedProgressBarExample">
|
|
997
|
+
<div class="margin-bottom-25">
|
|
998
|
+
<div class="stepped-progress-bar variant-roadsign nav">
|
|
999
|
+
<a data-rb-event-key="0" class="step-tab nav-link">
|
|
1000
|
+
<div class="step-tab-content">
|
|
1001
|
+
<div class="item-icon">
|
|
1002
|
+
<i class="rioglyph rioglyph-document">
|
|
1003
|
+
</i>
|
|
1004
|
+
</div>
|
|
1005
|
+
<div class="item-label">Label for step 1</div>
|
|
1006
|
+
</div>
|
|
1007
|
+
</a>
|
|
1008
|
+
<a data-rb-event-key="1" class="step-tab nav-link active">
|
|
1009
|
+
<div class="step-tab-content">
|
|
1010
|
+
<div class="item-icon">
|
|
1011
|
+
<i class="rioglyph rioglyph-pdf-file">
|
|
1012
|
+
</i>
|
|
1013
|
+
</div>
|
|
1014
|
+
<div class="item-label">Label for step 2</div>
|
|
1015
|
+
</div>
|
|
1016
|
+
</a>
|
|
1017
|
+
<a disabled="" data-rb-event-key="2" class="step-tab nav-link disabled">
|
|
1018
|
+
<div class="step-tab-content">
|
|
1019
|
+
<div class="item-icon">
|
|
1020
|
+
<i class="rioglyph rioglyph-print">
|
|
1021
|
+
</i>
|
|
1022
|
+
</div>
|
|
1023
|
+
<div class="item-label">Label for final step</div>
|
|
1024
|
+
</div>
|
|
1025
|
+
</a>
|
|
1026
|
+
</div>
|
|
1027
|
+
</div>
|
|
1028
|
+
<div class="panel panel-default panel-body padding-25">
|
|
1029
|
+
<div class="text-size-h3">Content of page 2</div>
|
|
1030
|
+
<div class="padding-y-20">
|
|
1031
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.</div>
|
|
1032
|
+
<label class="checkbox padding-15 border rounded margin-bottom-20 " tabindex="0">
|
|
1033
|
+
<input type="checkbox" class="padding-15 border rounded margin-bottom-20 ">
|
|
1034
|
+
<span class="checkbox-text">
|
|
1035
|
+
<span>Click here to complete this step. There is no other way forward.</span>
|
|
1036
|
+
</span>
|
|
1037
|
+
</label>
|
|
1038
|
+
<div class="btn-toolbar justify-content-between">
|
|
1039
|
+
<button type="button" class="btn btn-default btn-component" tabindex="0">
|
|
1040
|
+
<span class="rioglyph rioglyph-chevron-left">
|
|
1041
|
+
</span>Previous</button>
|
|
1042
|
+
<button type="button" class="btn btn-default btn-component btn-icon-right" disabled="" tabindex="0">
|
|
1043
|
+
<span class="rioglyph rioglyph-chevron-right">
|
|
1044
|
+
</span>Next</button>
|
|
1045
|
+
</div>
|
|
1046
|
+
</div>
|
|
1047
|
+
</div>
|
|
1048
|
+
```
|
|
1049
|
+
|
|
1050
|
+
#### Props
|
|
1051
|
+
|
|
1052
|
+
| Name | Type | Default | Description |
|
|
1053
|
+
| --- | --- | --- | --- |
|
|
1054
|
+
| labels | Array of Objects | — | Objects to define the icon and the label of the navigation items. The icon can be a string or an icon. |
|
|
1055
|
+
| └icon | String / Node | — | The element shown in the step element. This can be a single step number or an icon element. |
|
|
1056
|
+
| └label | String / Node | — | The label shown below the step element. |
|
|
1057
|
+
| └labelClassName | String | — | Additional classes to be set on the label element. |
|
|
1058
|
+
| └labelWrapperClassName | String | — | Additional classes to be set on the label wrapping element. |
|
|
1059
|
+
| selectedStepNumber | Number | — | Index of the selected navigation item. |
|
|
1060
|
+
| onSelectedChanged | Function | () => {} | Called with the new selected index after the user clicked a nav item. |
|
|
1061
|
+
| variant | String | circle | The SteppedProgressBar Variant. One of "circle", "rectangle" or "roadsign". |
|
|
1062
|
+
| disableFollowingPages | Number | — | All navigation items with a higher index than this will be disabled. |
|
|
1063
|
+
| mobileBreakpoint | Boolean | true | Deactivating the Wrapping of bubbles on mobile |
|
|
1064
|
+
| className | String | — | Additional classes to be set on the wrapper element. |
|