@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,965 @@
|
|
|
1
|
+
# RulesWrapper, RuleContainer and RuleConnector
|
|
2
|
+
|
|
3
|
+
*Category:* Components
|
|
4
|
+
*Section:* Misc
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#components/rules
|
|
6
|
+
*Captured:* 2025-12-12T12:38:59.394Z
|
|
7
|
+
|
|
8
|
+
## RulesWrapper, RuleContainer and RuleConnector
|
|
9
|
+
|
|
10
|
+
### Example: Example 1
|
|
11
|
+
|
|
12
|
+
Default Example (interactive)Why should the rule be triggered?
|
|
13
|
+
Mileage
|
|
14
|
+
|
|
15
|
+
Speed
|
|
16
|
+
|
|
17
|
+
Engine Speed
|
|
18
|
+
|
|
19
|
+
When should the rule be triggered?
|
|
20
|
+
Immediately
|
|
21
|
+
|
|
22
|
+
When all conditions apply for at least
|
|
23
|
+
|
|
24
|
+
#### Summary
|
|
25
|
+
|
|
26
|
+
Default Example (interactive)Why should the rule be triggered?
|
|
27
|
+
Mileage
|
|
28
|
+
|
|
29
|
+
Speed
|
|
30
|
+
|
|
31
|
+
Engine Speed
|
|
32
|
+
|
|
33
|
+
When should the rule be triggered?
|
|
34
|
+
Immediately
|
|
35
|
+
|
|
36
|
+
When all conditions apply for at least
|
|
37
|
+
|
|
38
|
+
#### React (tsx)
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { useEffect, useState, type JSX } from 'react';
|
|
42
|
+
import { isEmpty, pull, size } from 'es-toolkit/compat';
|
|
43
|
+
|
|
44
|
+
import RulesWrapper from '@rio-cloud/rio-uikit/RulesWrapper';
|
|
45
|
+
import RuleContainer from '@rio-cloud/rio-uikit/RuleContainer';
|
|
46
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
47
|
+
import Tag from '@rio-cloud/rio-uikit/Tag';
|
|
48
|
+
import TagList from '@rio-cloud/rio-uikit/TagList';
|
|
49
|
+
|
|
50
|
+
const firstRuleSetLabel = 'Why should the rule be triggered?';
|
|
51
|
+
|
|
52
|
+
type Condition = {
|
|
53
|
+
id: string;
|
|
54
|
+
label: string;
|
|
55
|
+
enabled: boolean;
|
|
56
|
+
formElements: JSX.Element;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const firstRuleSet: Condition[] = [
|
|
60
|
+
{
|
|
61
|
+
id: 'Mileage',
|
|
62
|
+
label: 'Mileage is greater than',
|
|
63
|
+
enabled: true,
|
|
64
|
+
formElements: (
|
|
65
|
+
<div className='width-100pct margin-bottom-0'>
|
|
66
|
+
<div className='input-group min-width-100'>
|
|
67
|
+
<input className='form-control' type='text' name='value' />
|
|
68
|
+
<div className='input-group-addon'>km</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
),
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: 'Speed',
|
|
75
|
+
label: 'Speed is greater than',
|
|
76
|
+
enabled: true,
|
|
77
|
+
formElements: (
|
|
78
|
+
<div className='width-100pct margin-bottom-0'>
|
|
79
|
+
<div className='input-group min-width-100'>
|
|
80
|
+
<input className='form-control' type='text' name='value' />
|
|
81
|
+
<div className='input-group-addon'>km</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
),
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'Engine Speed',
|
|
88
|
+
label: 'Engine speed is greater than',
|
|
89
|
+
enabled: true,
|
|
90
|
+
formElements: (
|
|
91
|
+
<div className='width-100pct margin-bottom-0'>
|
|
92
|
+
<div className='input-group min-width-100'>
|
|
93
|
+
<input className='form-control' type='text' name='value' />
|
|
94
|
+
<div className='input-group-addon'>rpm</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
),
|
|
98
|
+
},
|
|
99
|
+
];
|
|
100
|
+
|
|
101
|
+
export default () => {
|
|
102
|
+
const [firstConditionsSelected, setFirstConditionsSelected] = useState<string[]>([]);
|
|
103
|
+
|
|
104
|
+
const handleSelectFirstCondition = (conditionId: string) =>
|
|
105
|
+
setFirstConditionsSelected([...firstConditionsSelected, conditionId]);
|
|
106
|
+
|
|
107
|
+
const handleRemoveFirstCondition = (conditionId: string) =>
|
|
108
|
+
setFirstConditionsSelected(pull(firstConditionsSelected, conditionId));
|
|
109
|
+
|
|
110
|
+
const availableFirstConditions: Condition[] = firstRuleSet.filter(condition => condition.enabled);
|
|
111
|
+
|
|
112
|
+
const hasMoreFirstConditions = size(firstConditionsSelected) !== size(firstRuleSet);
|
|
113
|
+
|
|
114
|
+
const allConditionsSelected = size(firstConditionsSelected) === size(availableFirstConditions);
|
|
115
|
+
|
|
116
|
+
const [secondRuleSelected, setSecondRuleSelected] = useState(false);
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<div>
|
|
120
|
+
<label>Default Example (interactive)</label>
|
|
121
|
+
{/* First rule set */}
|
|
122
|
+
<RulesWrapper>
|
|
123
|
+
<RuleContainer key='AllRuleTags' show={isEmpty(firstConditionsSelected)} unchecked>
|
|
124
|
+
<ConditionsList
|
|
125
|
+
label={firstRuleSetLabel}
|
|
126
|
+
conditions={firstRuleSet}
|
|
127
|
+
selectedConditions={firstConditionsSelected}
|
|
128
|
+
onConditionSelected={handleSelectFirstCondition}
|
|
129
|
+
/>
|
|
130
|
+
</RuleContainer>
|
|
131
|
+
{firstConditionsSelected.map((selectedCondition, index) => {
|
|
132
|
+
const isLastCondition = index === size(firstConditionsSelected) - 1;
|
|
133
|
+
return (
|
|
134
|
+
<RuleContainer
|
|
135
|
+
key={selectedCondition}
|
|
136
|
+
show={!isEmpty(firstConditionsSelected)}
|
|
137
|
+
hideConnector={isLastCondition && allConditionsSelected}
|
|
138
|
+
>
|
|
139
|
+
<ConditionEditor
|
|
140
|
+
condition={
|
|
141
|
+
availableFirstConditions.find(condition => condition.id === selectedCondition)!
|
|
142
|
+
}
|
|
143
|
+
onDelete={handleRemoveFirstCondition}
|
|
144
|
+
/>
|
|
145
|
+
</RuleContainer>
|
|
146
|
+
);
|
|
147
|
+
})}
|
|
148
|
+
<RuleContainer
|
|
149
|
+
key='AddMore'
|
|
150
|
+
show={!isEmpty(firstConditionsSelected) && hasMoreFirstConditions}
|
|
151
|
+
hideConnector
|
|
152
|
+
>
|
|
153
|
+
<ConditionsList
|
|
154
|
+
showMoreOption={hasMoreFirstConditions}
|
|
155
|
+
label={firstRuleSetLabel}
|
|
156
|
+
conditions={firstRuleSet}
|
|
157
|
+
selectedConditions={firstConditionsSelected}
|
|
158
|
+
onConditionSelected={handleSelectFirstCondition}
|
|
159
|
+
/>
|
|
160
|
+
</RuleContainer>
|
|
161
|
+
</RulesWrapper>
|
|
162
|
+
|
|
163
|
+
{/* Second rule set */}
|
|
164
|
+
<RulesWrapper>
|
|
165
|
+
<RuleContainer key='secondRuleSet' unchecked={!secondRuleSelected} hideConnector={secondRuleSelected}>
|
|
166
|
+
{secondRuleSelected ? (
|
|
167
|
+
<ConditionEditorTwo onDelete={() => setSecondRuleSelected(false)} />
|
|
168
|
+
) : (
|
|
169
|
+
<ConditionsTwo onRuleSelect={() => setSecondRuleSelected(true)} />
|
|
170
|
+
)}
|
|
171
|
+
</RuleContainer>
|
|
172
|
+
</RulesWrapper>
|
|
173
|
+
</div>
|
|
174
|
+
);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
// Custom components to fill the rules container - this usually is service logic and are service specific components
|
|
178
|
+
|
|
179
|
+
type ConditionsListProps = {
|
|
180
|
+
showMoreOption?: boolean;
|
|
181
|
+
label: string;
|
|
182
|
+
conditions: Condition[];
|
|
183
|
+
selectedConditions: string[];
|
|
184
|
+
onConditionSelected: (id: string) => void;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
const ConditionsList = ({
|
|
188
|
+
showMoreOption = false,
|
|
189
|
+
label,
|
|
190
|
+
conditions = [],
|
|
191
|
+
selectedConditions = [],
|
|
192
|
+
onConditionSelected,
|
|
193
|
+
}: ConditionsListProps) => {
|
|
194
|
+
const [showMore, setShowMore] = useState(showMoreOption);
|
|
195
|
+
useEffect(() => setShowMore(showMoreOption), [showMoreOption]);
|
|
196
|
+
|
|
197
|
+
const handleSelectOption = (conditionId: string) => {
|
|
198
|
+
setShowMore(true);
|
|
199
|
+
onConditionSelected(conditionId);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
return (
|
|
203
|
+
<div className='display-flex flex-column align-items-center'>
|
|
204
|
+
{showMore && (
|
|
205
|
+
<div
|
|
206
|
+
key='moreButton'
|
|
207
|
+
className='text-center text-color-primary hover-text-color-highlight-dark cursor-pointer'
|
|
208
|
+
onClick={() => setShowMore(false)}
|
|
209
|
+
>
|
|
210
|
+
Which additional conditions should count for this rule?
|
|
211
|
+
</div>
|
|
212
|
+
)}
|
|
213
|
+
{!showMore && (
|
|
214
|
+
<div key='tagList' className='display-flex flex-column align-items-center gap-15'>
|
|
215
|
+
<div className='text-center'>{label}</div>
|
|
216
|
+
<TagList>
|
|
217
|
+
{conditions.map(condition => {
|
|
218
|
+
if (selectedConditions.includes(condition.id)) {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
return (
|
|
222
|
+
<Tag
|
|
223
|
+
key={condition.id}
|
|
224
|
+
clickable={condition.enabled}
|
|
225
|
+
disabled={!condition.enabled}
|
|
226
|
+
onClick={() => handleSelectOption(condition.id)}
|
|
227
|
+
>
|
|
228
|
+
{condition.id}
|
|
229
|
+
</Tag>
|
|
230
|
+
);
|
|
231
|
+
})}
|
|
232
|
+
</TagList>
|
|
233
|
+
</div>
|
|
234
|
+
)}
|
|
235
|
+
</div>
|
|
236
|
+
);
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
type ConditionEditorProps = { condition: Condition; onDelete: (id: string) => void };
|
|
240
|
+
|
|
241
|
+
const ConditionEditor = ({ condition, onDelete }: ConditionEditorProps) => {
|
|
242
|
+
return (
|
|
243
|
+
<form>
|
|
244
|
+
<div className='display-flex align-items-center gap-10 flex-1-1 flex-wrap'>
|
|
245
|
+
<div className='flex-1-1-0 line-height-125rel'>{condition.label}</div>
|
|
246
|
+
<div className='flex-1-1-0 display-flex gap-10'>
|
|
247
|
+
{condition.formElements}
|
|
248
|
+
<Button bsStyle={Button.MUTED} iconOnly onClick={() => onDelete(condition.id)}>
|
|
249
|
+
<span className='rioglyph rioglyph-trash' />
|
|
250
|
+
</Button>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
</form>
|
|
254
|
+
);
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
type ConditionsTwoProps = { onRuleSelect: VoidFunction };
|
|
258
|
+
|
|
259
|
+
const ConditionsTwo = ({ onRuleSelect }: ConditionsTwoProps) => {
|
|
260
|
+
return (
|
|
261
|
+
<div className='display-flex flex-column align-items-center gap-15'>
|
|
262
|
+
<div className='text-center'>When should the rule be triggered?</div>
|
|
263
|
+
<TagList>
|
|
264
|
+
<Tag active clickable={false}>
|
|
265
|
+
Immediately
|
|
266
|
+
</Tag>
|
|
267
|
+
<Tag clickable onClick={onRuleSelect}>
|
|
268
|
+
When all conditions apply for at least
|
|
269
|
+
</Tag>
|
|
270
|
+
</TagList>
|
|
271
|
+
</div>
|
|
272
|
+
);
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
type ConditionEditorTwpProps = { onDelete: VoidFunction };
|
|
276
|
+
|
|
277
|
+
const ConditionEditorTwo = ({ onDelete }: ConditionEditorTwpProps) => {
|
|
278
|
+
return (
|
|
279
|
+
<form>
|
|
280
|
+
<div className='display-flex align-items-center gap-10 flex-1-1 flex-wrap'>
|
|
281
|
+
<div className='flex-1-1-0 line-height-125rel'>When all conditions apply for at least</div>
|
|
282
|
+
<div className='flex-1-1-0 display-flex gap-10'>
|
|
283
|
+
<div className='width-100pct margin-bottom-0'>
|
|
284
|
+
<div className='input-group min-width-100'>
|
|
285
|
+
<input className='form-control' type='text' name='value' />
|
|
286
|
+
<div className='input-group-addon'>minutes</div>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
<Button bsStyle={Button.MUTED} iconOnly onClick={onDelete}>
|
|
290
|
+
<span className='rioglyph rioglyph-trash' />
|
|
291
|
+
</Button>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</form>
|
|
295
|
+
);
|
|
296
|
+
};
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
#### HTML (html)
|
|
300
|
+
|
|
301
|
+
```html
|
|
302
|
+
<div>
|
|
303
|
+
<label>Default Example (interactive)</label>
|
|
304
|
+
<div>
|
|
305
|
+
<div>
|
|
306
|
+
<div class="RuleContainer">
|
|
307
|
+
<div class="RuleContainerBox position-relative rounded padding-20 bg-lightest border border-width border-style-dashed " data-testid="ruleContainerBox">
|
|
308
|
+
<div style="opacity: 0;">
|
|
309
|
+
<div class="display-flex flex-column align-items-center">
|
|
310
|
+
<div class="display-flex flex-column align-items-center gap-15">
|
|
311
|
+
<div class="text-center">Why should the rule be triggered?</div>
|
|
312
|
+
<div class="taglist taglist-autowidth">
|
|
313
|
+
<div class="tag clickable">
|
|
314
|
+
<div class="tag-inner">Mileage</div>
|
|
315
|
+
</div>
|
|
316
|
+
<div class="tag clickable">
|
|
317
|
+
<div class="tag-inner">Speed</div>
|
|
318
|
+
</div>
|
|
319
|
+
<div class="tag clickable">
|
|
320
|
+
<div class="tag-inner">Engine Speed</div>
|
|
321
|
+
</div>
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
<div data-testid="ruleConnector" class="RuleConnector height-20 display-flex justify-content-center align-items-center position-relative opacity-0">
|
|
328
|
+
<div class="margin-right--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
329
|
+
<div class="right-50pct position-relative width-20 height-20 bg-white">
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
<span class="padding-left-20 padding-right-20 z-index-1 bg-lightest">
|
|
333
|
+
<span class="text-color-light">
|
|
334
|
+
<span class="rioglyph rioglyph-plus" data-testid="ruleConnectorIcon">
|
|
335
|
+
</span>
|
|
336
|
+
</span>
|
|
337
|
+
</span>
|
|
338
|
+
<div class="margin-left--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
339
|
+
<div class="left-50pct position-relative width-20 height-20 bg-white">
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
<div>
|
|
347
|
+
<div>
|
|
348
|
+
<div class="RuleContainer">
|
|
349
|
+
<div class="RuleContainerBox position-relative rounded padding-20 bg-lightest border border-width border-style-dashed " data-testid="ruleContainerBox">
|
|
350
|
+
<div style="opacity: 0;">
|
|
351
|
+
<div class="display-flex flex-column align-items-center gap-15">
|
|
352
|
+
<div class="text-center">When should the rule be triggered?</div>
|
|
353
|
+
<div class="taglist taglist-autowidth">
|
|
354
|
+
<div class="tag active clickable rioglyph rioglyph-ok">
|
|
355
|
+
<div class="tag-inner">Immediately</div>
|
|
356
|
+
</div>
|
|
357
|
+
<div class="tag clickable">
|
|
358
|
+
<div class="tag-inner">When all conditions apply for at least</div>
|
|
359
|
+
</div>
|
|
360
|
+
</div>
|
|
361
|
+
</div>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
<div data-testid="ruleConnector" class="RuleConnector height-20 display-flex justify-content-center align-items-center position-relative opacity-0">
|
|
365
|
+
<div class="margin-right--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
366
|
+
<div class="right-50pct position-relative width-20 height-20 bg-white">
|
|
367
|
+
</div>
|
|
368
|
+
</div>
|
|
369
|
+
<span class="padding-left-20 padding-right-20 z-index-1 bg-lightest">
|
|
370
|
+
<span class="text-color-light">
|
|
371
|
+
<span class="rioglyph rioglyph-plus" data-testid="ruleConnectorIcon">
|
|
372
|
+
</span>
|
|
373
|
+
</span>
|
|
374
|
+
</span>
|
|
375
|
+
<div class="margin-left--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
376
|
+
<div class="left-50pct position-relative width-20 height-20 bg-white">
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
#### Props: RuleContainer
|
|
387
|
+
|
|
388
|
+
### RuleContainer
|
|
389
|
+
|
|
390
|
+
| Name | Type | Default | Description |
|
|
391
|
+
| --- | --- | --- | --- |
|
|
392
|
+
| show | Boolean | true | Defines whether the container is shown. |
|
|
393
|
+
| unchecked | Boolean | false | Determines the container style for when no rule option is selected. It also hides the connector in this case. |
|
|
394
|
+
| background | String | bg-lightest | The box background class name. |
|
|
395
|
+
| borderColor | String | — | The border color class name. |
|
|
396
|
+
| hideConnector | Boolean | false | Defines whether the connector is shown. |
|
|
397
|
+
| customConnector | String \| Node | — | Overwrites the default connector. |
|
|
398
|
+
| className | String | — | Additional classes for the wrapper element. |
|
|
399
|
+
|
|
400
|
+
#### Props: RuleConnector
|
|
401
|
+
|
|
402
|
+
### RuleConnector
|
|
403
|
+
|
|
404
|
+
| Name | Type | Default | Description |
|
|
405
|
+
| --- | --- | --- | --- |
|
|
406
|
+
| placement | String | center | The placement for the connector. Possible values are "start", "center" and "end". |
|
|
407
|
+
| icon | String | rioglyph-plus | The rioglyph icon name. |
|
|
408
|
+
| hidden | Boolean | false | Defines whether the connector is shown. |
|
|
409
|
+
| background | String | bg-lightest | Background color of the connector itself. |
|
|
410
|
+
| pageBackground | String | bg-white | Background color of the surrounding area where the rule containers are placed. |
|
|
411
|
+
| contentClassName | String | text-color-light | Classes to be set on the connector content. |
|
|
412
|
+
| hasBorder | Boolean | false | Defines whether the connector has a border. |
|
|
413
|
+
| borderColor | String | — | The border color class name. |
|
|
414
|
+
| className | String | — | Additional classes for the wrapper element. |
|
|
415
|
+
|
|
416
|
+
### Example: Example 2
|
|
417
|
+
|
|
418
|
+
Default Example with morde conditions - (static)Mileage is greater than
|
|
419
|
+
km
|
|
420
|
+
|
|
421
|
+
Which additional conditions should count for this rule?
|
|
422
|
+
|
|
423
|
+
Why should the rule be triggered?
|
|
424
|
+
Category AMileage
|
|
425
|
+
|
|
426
|
+
Fuel Level
|
|
427
|
+
|
|
428
|
+
Engine speed
|
|
429
|
+
|
|
430
|
+
Driving/standing
|
|
431
|
+
|
|
432
|
+
Category BRemaining daily driving time
|
|
433
|
+
|
|
434
|
+
Remaining weekly driving time
|
|
435
|
+
|
|
436
|
+
Daily driving time
|
|
437
|
+
|
|
438
|
+
Weekly driving time
|
|
439
|
+
|
|
440
|
+
Category CDriver Card
|
|
441
|
+
|
|
442
|
+
Power take-off
|
|
443
|
+
|
|
444
|
+
Inside/Outside geofence
|
|
445
|
+
|
|
446
|
+
Inside/Outside Country
|
|
447
|
+
|
|
448
|
+
When should the rule be triggered?Immediately
|
|
449
|
+
|
|
450
|
+
When all conditions apply for at least
|
|
451
|
+
|
|
452
|
+
#### Summary
|
|
453
|
+
|
|
454
|
+
Default Example with morde conditions - (static)Mileage is greater than
|
|
455
|
+
km
|
|
456
|
+
|
|
457
|
+
Which additional conditions should count for this rule?
|
|
458
|
+
|
|
459
|
+
Why should the rule be triggered?
|
|
460
|
+
Category AMileage
|
|
461
|
+
|
|
462
|
+
Fuel Level
|
|
463
|
+
|
|
464
|
+
Engine speed
|
|
465
|
+
|
|
466
|
+
Driving/standing
|
|
467
|
+
|
|
468
|
+
Category BRemaining daily driving time
|
|
469
|
+
|
|
470
|
+
Remaining weekly driving time
|
|
471
|
+
|
|
472
|
+
Daily driving time
|
|
473
|
+
|
|
474
|
+
Weekly driving time
|
|
475
|
+
|
|
476
|
+
Category CDriver Card
|
|
477
|
+
|
|
478
|
+
Power take-off
|
|
479
|
+
|
|
480
|
+
Inside/Outside geofence
|
|
481
|
+
|
|
482
|
+
Inside/Outside Country
|
|
483
|
+
|
|
484
|
+
When should the rule be triggered?Immediately
|
|
485
|
+
|
|
486
|
+
When all conditions apply for at least
|
|
487
|
+
|
|
488
|
+
#### React (tsx)
|
|
489
|
+
|
|
490
|
+
```tsx
|
|
491
|
+
import RuleContainer from '@rio-cloud/rio-uikit/RuleContainer';
|
|
492
|
+
import Button from '@rio-cloud/rio-uikit/Button';
|
|
493
|
+
import TagList from '@rio-cloud/rio-uikit/TagList';
|
|
494
|
+
import Tag from '@rio-cloud/rio-uikit/Tag';
|
|
495
|
+
import RulesWrapper from '@rio-cloud/rio-uikit/components/rules/RulesWrapper';
|
|
496
|
+
|
|
497
|
+
export default () => (
|
|
498
|
+
<div>
|
|
499
|
+
<label>Default Example with morde conditions - (static)</label>
|
|
500
|
+
<RulesWrapper>
|
|
501
|
+
<RuleContainer>
|
|
502
|
+
<form>
|
|
503
|
+
<div className='display-flex align-items-center gap-10 flex-1-1 flex-wrap'>
|
|
504
|
+
<div className='flex-1-1-0 line-height-125rel'>Mileage is greater than</div>
|
|
505
|
+
<div className='flex-1-1-0 display-flex gap-10'>
|
|
506
|
+
<div className='width-100pct margin-bottom-0'>
|
|
507
|
+
<div className='input-group min-width-100'>
|
|
508
|
+
<input className='form-control' type='text' name='value' />
|
|
509
|
+
<div className='input-group-addon'>km</div>
|
|
510
|
+
</div>
|
|
511
|
+
</div>
|
|
512
|
+
<Button bsStyle={Button.MUTED} iconOnly>
|
|
513
|
+
<span className='rioglyph rioglyph-trash' />
|
|
514
|
+
</Button>
|
|
515
|
+
</div>
|
|
516
|
+
</div>
|
|
517
|
+
</form>
|
|
518
|
+
</RuleContainer>
|
|
519
|
+
|
|
520
|
+
<RuleContainer hideConnector>
|
|
521
|
+
<div className='text-center'>
|
|
522
|
+
<div className='text-center text-color-primary hover-text-color-highlight-dark cursor-pointer'>
|
|
523
|
+
Which additional conditions should count for this rule?
|
|
524
|
+
</div>
|
|
525
|
+
</div>
|
|
526
|
+
</RuleContainer>
|
|
527
|
+
|
|
528
|
+
<RuleContainer unchecked hideConnector>
|
|
529
|
+
<span className='display-flex align-items-center justify-content-center'>
|
|
530
|
+
<span data-testid='AddCondition-message'>Why should the rule be triggered?</span>
|
|
531
|
+
</span>
|
|
532
|
+
|
|
533
|
+
<div className='display-flex flex-wrap gap-20 margin-top-20'>
|
|
534
|
+
<div className='flex-1-1-0'>
|
|
535
|
+
<legend>Category A</legend>
|
|
536
|
+
<TagList>
|
|
537
|
+
<Tag clickable>Mileage</Tag>
|
|
538
|
+
<Tag clickable>Fuel Level</Tag>
|
|
539
|
+
<Tag clickable>Engine speed</Tag>
|
|
540
|
+
<Tag clickable>Driving/standing</Tag>
|
|
541
|
+
</TagList>
|
|
542
|
+
</div>
|
|
543
|
+
<div className='flex-1-1-0'>
|
|
544
|
+
<legend>Category B</legend>
|
|
545
|
+
<TagList>
|
|
546
|
+
<Tag clickable>Remaining daily driving time</Tag>
|
|
547
|
+
<Tag clickable>Remaining weekly driving time</Tag>
|
|
548
|
+
<Tag clickable>Daily driving time</Tag>
|
|
549
|
+
<Tag clickable>Weekly driving time</Tag>
|
|
550
|
+
</TagList>
|
|
551
|
+
</div>
|
|
552
|
+
<div className='flex-1-1-0'>
|
|
553
|
+
<legend>Category C</legend>
|
|
554
|
+
<TagList>
|
|
555
|
+
<Tag clickable>Driver Card</Tag>
|
|
556
|
+
<Tag clickable>Power take-off</Tag>
|
|
557
|
+
<Tag clickable>Inside/Outside geofence</Tag>
|
|
558
|
+
<Tag clickable>Inside/Outside Country</Tag>
|
|
559
|
+
</TagList>
|
|
560
|
+
</div>
|
|
561
|
+
</div>
|
|
562
|
+
</RuleContainer>
|
|
563
|
+
|
|
564
|
+
<RuleContainer unchecked>
|
|
565
|
+
<div className='display-flex flex-column align-items-center gap-15'>
|
|
566
|
+
<span>When should the rule be triggered?</span>
|
|
567
|
+
|
|
568
|
+
<TagList>
|
|
569
|
+
<Tag active clickable={false}>
|
|
570
|
+
Immediately
|
|
571
|
+
</Tag>
|
|
572
|
+
<Tag clickable>When all conditions apply for at least</Tag>
|
|
573
|
+
</TagList>
|
|
574
|
+
</div>
|
|
575
|
+
</RuleContainer>
|
|
576
|
+
</RulesWrapper>
|
|
577
|
+
</div>
|
|
578
|
+
);
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
#### HTML (html)
|
|
582
|
+
|
|
583
|
+
```html
|
|
584
|
+
<div>
|
|
585
|
+
<label>Default Example with morde conditions - (static)</label>
|
|
586
|
+
<div>
|
|
587
|
+
<div>
|
|
588
|
+
<div class="RuleContainer">
|
|
589
|
+
<div class="RuleContainerBox position-relative rounded padding-20 bg-lightest" data-testid="ruleContainerBox">
|
|
590
|
+
<div style="opacity: 1;">
|
|
591
|
+
<form>
|
|
592
|
+
<div class="display-flex align-items-center gap-10 flex-1-1 flex-wrap">
|
|
593
|
+
<div class="flex-1-1-0 line-height-125rel">Mileage is greater than</div>
|
|
594
|
+
<div class="flex-1-1-0 display-flex gap-10">
|
|
595
|
+
<div class="width-100pct margin-bottom-0">
|
|
596
|
+
<div class="input-group min-width-100">
|
|
597
|
+
<input class="form-control" type="text" name="value">
|
|
598
|
+
<div class="input-group-addon">km</div>
|
|
599
|
+
</div>
|
|
600
|
+
</div>
|
|
601
|
+
<button type="button" class="btn btn-muted btn-icon-only btn-component" tabindex="0">
|
|
602
|
+
<span class="rioglyph rioglyph-trash">
|
|
603
|
+
</span>
|
|
604
|
+
</button>
|
|
605
|
+
</div>
|
|
606
|
+
</div>
|
|
607
|
+
</form>
|
|
608
|
+
</div>
|
|
609
|
+
</div>
|
|
610
|
+
<div data-testid="ruleConnector" class="RuleConnector height-20 display-flex justify-content-center align-items-center position-relative">
|
|
611
|
+
<div class="margin-right--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
612
|
+
<div class="right-50pct position-relative width-20 height-20 bg-white">
|
|
613
|
+
</div>
|
|
614
|
+
</div>
|
|
615
|
+
<span class="padding-left-20 padding-right-20 z-index-1 bg-lightest">
|
|
616
|
+
<span class="text-color-light">
|
|
617
|
+
<span class="rioglyph rioglyph-plus" data-testid="ruleConnectorIcon">
|
|
618
|
+
</span>
|
|
619
|
+
</span>
|
|
620
|
+
</span>
|
|
621
|
+
<div class="margin-left--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
622
|
+
<div class="left-50pct position-relative width-20 height-20 bg-white">
|
|
623
|
+
</div>
|
|
624
|
+
</div>
|
|
625
|
+
</div>
|
|
626
|
+
</div>
|
|
627
|
+
<div class="RuleContainer">
|
|
628
|
+
<div class="RuleContainerBox position-relative rounded padding-20 bg-lightest" data-testid="ruleContainerBox">
|
|
629
|
+
<div style="opacity: 1;">
|
|
630
|
+
<div class="text-center">
|
|
631
|
+
<div class="text-center text-color-primary hover-text-color-highlight-dark cursor-pointer">Which additional conditions should count for this rule?</div>
|
|
632
|
+
</div>
|
|
633
|
+
</div>
|
|
634
|
+
</div>
|
|
635
|
+
<div data-testid="ruleConnector" class="RuleConnector height-20 display-flex justify-content-center align-items-center position-relative opacity-0">
|
|
636
|
+
<div class="margin-right--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
637
|
+
<div class="right-50pct position-relative width-20 height-20 bg-white">
|
|
638
|
+
</div>
|
|
639
|
+
</div>
|
|
640
|
+
<span class="padding-left-20 padding-right-20 z-index-1 bg-lightest">
|
|
641
|
+
<span class="text-color-light">
|
|
642
|
+
<span class="rioglyph rioglyph-plus" data-testid="ruleConnectorIcon">
|
|
643
|
+
</span>
|
|
644
|
+
</span>
|
|
645
|
+
</span>
|
|
646
|
+
<div class="margin-left--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
647
|
+
<div class="left-50pct position-relative width-20 height-20 bg-white">
|
|
648
|
+
</div>
|
|
649
|
+
</div>
|
|
650
|
+
</div>
|
|
651
|
+
</div>
|
|
652
|
+
<div class="RuleContainer">
|
|
653
|
+
<div class="RuleContainerBox position-relative rounded padding-20 bg-lightest border border-width border-style-dashed " data-testid="ruleContainerBox">
|
|
654
|
+
<div style="opacity: 1;">
|
|
655
|
+
<span class="display-flex align-items-center justify-content-center">
|
|
656
|
+
<span data-testid="AddCondition-message">Why should the rule be triggered?</span>
|
|
657
|
+
</span>
|
|
658
|
+
</div>
|
|
659
|
+
<div style="opacity: 1;">
|
|
660
|
+
<div class="display-flex flex-wrap gap-20 margin-top-20">
|
|
661
|
+
<div class="flex-1-1-0">
|
|
662
|
+
<legend>Category A</legend>
|
|
663
|
+
<div class="taglist taglist-autowidth">
|
|
664
|
+
<div class="tag clickable">
|
|
665
|
+
<div class="tag-inner">Mileage</div>
|
|
666
|
+
</div>
|
|
667
|
+
<div class="tag clickable">
|
|
668
|
+
<div class="tag-inner">Fuel Level</div>
|
|
669
|
+
</div>
|
|
670
|
+
<div class="tag clickable">
|
|
671
|
+
<div class="tag-inner">Engine speed</div>
|
|
672
|
+
</div>
|
|
673
|
+
<div class="tag clickable">
|
|
674
|
+
<div class="tag-inner">Driving/standing</div>
|
|
675
|
+
</div>
|
|
676
|
+
</div>
|
|
677
|
+
</div>
|
|
678
|
+
<div class="flex-1-1-0">
|
|
679
|
+
<legend>Category B</legend>
|
|
680
|
+
<div class="taglist taglist-autowidth">
|
|
681
|
+
<div class="tag clickable">
|
|
682
|
+
<div class="tag-inner">Remaining daily driving time</div>
|
|
683
|
+
</div>
|
|
684
|
+
<div class="tag clickable">
|
|
685
|
+
<div class="tag-inner">Remaining weekly driving time</div>
|
|
686
|
+
</div>
|
|
687
|
+
<div class="tag clickable">
|
|
688
|
+
<div class="tag-inner">Daily driving time</div>
|
|
689
|
+
</div>
|
|
690
|
+
<div class="tag clickable">
|
|
691
|
+
<div class="tag-inner">Weekly driving time</div>
|
|
692
|
+
</div>
|
|
693
|
+
</div>
|
|
694
|
+
</div>
|
|
695
|
+
<div class="flex-1-1-0">
|
|
696
|
+
<legend>Category C</legend>
|
|
697
|
+
<div class="taglist taglist-autowidth">
|
|
698
|
+
<div class="tag clickable">
|
|
699
|
+
<div class="tag-inner">Driver Card</div>
|
|
700
|
+
</div>
|
|
701
|
+
<div class="tag clickable">
|
|
702
|
+
<div class="tag-inner">Power take-off</div>
|
|
703
|
+
</div>
|
|
704
|
+
<div class="tag clickable">
|
|
705
|
+
<div class="tag-inner">Inside/Outside geofence</div>
|
|
706
|
+
</div>
|
|
707
|
+
<div class="tag clickable">
|
|
708
|
+
<div class="tag-inner">Inside/Outside Country</div>
|
|
709
|
+
</div>
|
|
710
|
+
</div>
|
|
711
|
+
</div>
|
|
712
|
+
</div>
|
|
713
|
+
</div>
|
|
714
|
+
</div>
|
|
715
|
+
<div data-testid="ruleConnector" class="RuleConnector height-20 display-flex justify-content-center align-items-center position-relative opacity-0">
|
|
716
|
+
<div class="margin-right--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
717
|
+
<div class="right-50pct position-relative width-20 height-20 bg-white">
|
|
718
|
+
</div>
|
|
719
|
+
</div>
|
|
720
|
+
<span class="padding-left-20 padding-right-20 z-index-1 bg-lightest">
|
|
721
|
+
<span class="text-color-light">
|
|
722
|
+
<span class="rioglyph rioglyph-plus" data-testid="ruleConnectorIcon">
|
|
723
|
+
</span>
|
|
724
|
+
</span>
|
|
725
|
+
</span>
|
|
726
|
+
<div class="margin-left--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
727
|
+
<div class="left-50pct position-relative width-20 height-20 bg-white">
|
|
728
|
+
</div>
|
|
729
|
+
</div>
|
|
730
|
+
</div>
|
|
731
|
+
</div>
|
|
732
|
+
<div class="RuleContainer">
|
|
733
|
+
<div class="RuleContainerBox position-relative rounded padding-20 bg-lightest border border-width border-style-dashed " data-testid="ruleContainerBox">
|
|
734
|
+
<div style="opacity: 1;">
|
|
735
|
+
<div class="display-flex flex-column align-items-center gap-15">
|
|
736
|
+
<span>When should the rule be triggered?</span>
|
|
737
|
+
<div class="taglist taglist-autowidth">
|
|
738
|
+
<div class="tag active clickable rioglyph rioglyph-ok">
|
|
739
|
+
<div class="tag-inner">Immediately</div>
|
|
740
|
+
</div>
|
|
741
|
+
<div class="tag clickable">
|
|
742
|
+
<div class="tag-inner">When all conditions apply for at least</div>
|
|
743
|
+
</div>
|
|
744
|
+
</div>
|
|
745
|
+
</div>
|
|
746
|
+
</div>
|
|
747
|
+
</div>
|
|
748
|
+
<div data-testid="ruleConnector" class="RuleConnector height-20 display-flex justify-content-center align-items-center position-relative opacity-0">
|
|
749
|
+
<div class="margin-right--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
750
|
+
<div class="right-50pct position-relative width-20 height-20 bg-white">
|
|
751
|
+
</div>
|
|
752
|
+
</div>
|
|
753
|
+
<span class="padding-left-20 padding-right-20 z-index-1 bg-lightest">
|
|
754
|
+
<span class="text-color-light">
|
|
755
|
+
<span class="rioglyph rioglyph-plus" data-testid="ruleConnectorIcon">
|
|
756
|
+
</span>
|
|
757
|
+
</span>
|
|
758
|
+
</span>
|
|
759
|
+
<div class="margin-left--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
760
|
+
<div class="left-50pct position-relative width-20 height-20 bg-white">
|
|
761
|
+
</div>
|
|
762
|
+
</div>
|
|
763
|
+
</div>
|
|
764
|
+
</div>
|
|
765
|
+
</div>
|
|
766
|
+
</div>
|
|
767
|
+
</div>
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
#### Props: RuleContainer
|
|
771
|
+
|
|
772
|
+
### RuleContainer
|
|
773
|
+
|
|
774
|
+
| Name | Type | Default | Description |
|
|
775
|
+
| --- | --- | --- | --- |
|
|
776
|
+
| show | Boolean | true | Defines whether the container is shown. |
|
|
777
|
+
| unchecked | Boolean | false | Determines the container style for when no rule option is selected. It also hides the connector in this case. |
|
|
778
|
+
| background | String | bg-lightest | The box background class name. |
|
|
779
|
+
| borderColor | String | — | The border color class name. |
|
|
780
|
+
| hideConnector | Boolean | false | Defines whether the connector is shown. |
|
|
781
|
+
| customConnector | String \| Node | — | Overwrites the default connector. |
|
|
782
|
+
| className | String | — | Additional classes for the wrapper element. |
|
|
783
|
+
|
|
784
|
+
#### Props: RuleConnector
|
|
785
|
+
|
|
786
|
+
### RuleConnector
|
|
787
|
+
|
|
788
|
+
| Name | Type | Default | Description |
|
|
789
|
+
| --- | --- | --- | --- |
|
|
790
|
+
| placement | String | center | The placement for the connector. Possible values are "start", "center" and "end". |
|
|
791
|
+
| icon | String | rioglyph-plus | The rioglyph icon name. |
|
|
792
|
+
| hidden | Boolean | false | Defines whether the connector is shown. |
|
|
793
|
+
| background | String | bg-lightest | Background color of the connector itself. |
|
|
794
|
+
| pageBackground | String | bg-white | Background color of the surrounding area where the rule containers are placed. |
|
|
795
|
+
| contentClassName | String | text-color-light | Classes to be set on the connector content. |
|
|
796
|
+
| hasBorder | Boolean | false | Defines whether the connector has a border. |
|
|
797
|
+
| borderColor | String | — | The border color class name. |
|
|
798
|
+
| className | String | — | Additional classes for the wrapper element. |
|
|
799
|
+
|
|
800
|
+
### Example: AND
|
|
801
|
+
|
|
802
|
+
Custom Example
|
|
803
|
+
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.
|
|
804
|
+
|
|
805
|
+
AND
|
|
806
|
+
|
|
807
|
+
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.
|
|
808
|
+
|
|
809
|
+
OR
|
|
810
|
+
|
|
811
|
+
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.
|
|
812
|
+
|
|
813
|
+
#### Summary
|
|
814
|
+
|
|
815
|
+
Custom Example
|
|
816
|
+
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.
|
|
817
|
+
|
|
818
|
+
AND
|
|
819
|
+
|
|
820
|
+
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.
|
|
821
|
+
|
|
822
|
+
OR
|
|
823
|
+
|
|
824
|
+
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.
|
|
825
|
+
|
|
826
|
+
#### React (tsx)
|
|
827
|
+
|
|
828
|
+
```tsx
|
|
829
|
+
import RuleContainer from '@rio-cloud/rio-uikit/RuleContainer';
|
|
830
|
+
import RuleConnector from '@rio-cloud/rio-uikit/RuleConnector';
|
|
831
|
+
import { dummyTextExtraShort } from '../../../utils/data';
|
|
832
|
+
|
|
833
|
+
const background = 'bg-white';
|
|
834
|
+
|
|
835
|
+
export default () => (
|
|
836
|
+
<div>
|
|
837
|
+
<label>Custom Example</label>
|
|
838
|
+
<RuleContainer className='border' background={background} customConnector={<CustomConnector value='AND' />}>
|
|
839
|
+
{dummyTextExtraShort}
|
|
840
|
+
</RuleContainer>
|
|
841
|
+
|
|
842
|
+
<RuleContainer className='border' background={background} customConnector={<CustomConnector value='OR' />}>
|
|
843
|
+
{dummyTextExtraShort}
|
|
844
|
+
</RuleContainer>
|
|
845
|
+
|
|
846
|
+
<RuleContainer className='border' background={background} hideConnector>
|
|
847
|
+
{dummyTextExtraShort}
|
|
848
|
+
</RuleContainer>
|
|
849
|
+
</div>
|
|
850
|
+
);
|
|
851
|
+
|
|
852
|
+
const CustomConnector = ({ value }: { value: string }) => (
|
|
853
|
+
<RuleConnector
|
|
854
|
+
background={background}
|
|
855
|
+
pageBackground='bg-lightest'
|
|
856
|
+
placement='start'
|
|
857
|
+
hasBorder
|
|
858
|
+
borderColor='border-color-light'
|
|
859
|
+
>
|
|
860
|
+
<span className='text-color-dark text-size-12'>{value}</span>
|
|
861
|
+
</RuleConnector>
|
|
862
|
+
);
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
#### HTML (html)
|
|
866
|
+
|
|
867
|
+
```html
|
|
868
|
+
<div>
|
|
869
|
+
<label>Custom Example</label>
|
|
870
|
+
<div class="RuleContainer">
|
|
871
|
+
<div class="RuleContainerBox position-relative rounded padding-20 bg-white border" data-testid="ruleContainerBox">
|
|
872
|
+
<div style="opacity: 1;">
|
|
873
|
+
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.</div>
|
|
874
|
+
</div>
|
|
875
|
+
<div data-testid="ruleConnector" class="RuleConnector height-20 display-flex justify-content-start align-items-center position-relative">
|
|
876
|
+
<div class="margin-right--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-lightest border border-color-light">
|
|
877
|
+
<div class="right-50pct position-relative width-20 height-20 bg-lightest">
|
|
878
|
+
</div>
|
|
879
|
+
</div>
|
|
880
|
+
<span class="padding-left-20 padding-right-20 z-index-1 bg-white border border-color-white">
|
|
881
|
+
<span class="text-color-light">
|
|
882
|
+
<span class="text-color-dark text-size-12">AND</span>
|
|
883
|
+
</span>
|
|
884
|
+
</span>
|
|
885
|
+
<div class="margin-left--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-lightest border border-color-light">
|
|
886
|
+
<div class="left-50pct position-relative width-20 height-20 bg-lightest">
|
|
887
|
+
</div>
|
|
888
|
+
</div>
|
|
889
|
+
</div>
|
|
890
|
+
</div>
|
|
891
|
+
<div class="RuleContainer">
|
|
892
|
+
<div class="RuleContainerBox position-relative rounded padding-20 bg-white border" data-testid="ruleContainerBox">
|
|
893
|
+
<div style="opacity: 1;">
|
|
894
|
+
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.</div>
|
|
895
|
+
</div>
|
|
896
|
+
<div data-testid="ruleConnector" class="RuleConnector height-20 display-flex justify-content-start align-items-center position-relative">
|
|
897
|
+
<div class="margin-right--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-lightest border border-color-light">
|
|
898
|
+
<div class="right-50pct position-relative width-20 height-20 bg-lightest">
|
|
899
|
+
</div>
|
|
900
|
+
</div>
|
|
901
|
+
<span class="padding-left-20 padding-right-20 z-index-1 bg-white border border-color-white">
|
|
902
|
+
<span class="text-color-light">
|
|
903
|
+
<span class="text-color-dark text-size-12">OR</span>
|
|
904
|
+
</span>
|
|
905
|
+
</span>
|
|
906
|
+
<div class="margin-left--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-lightest border border-color-light">
|
|
907
|
+
<div class="left-50pct position-relative width-20 height-20 bg-lightest">
|
|
908
|
+
</div>
|
|
909
|
+
</div>
|
|
910
|
+
</div>
|
|
911
|
+
</div>
|
|
912
|
+
<div class="RuleContainer">
|
|
913
|
+
<div class="RuleContainerBox position-relative rounded padding-20 bg-white border" data-testid="ruleContainerBox">
|
|
914
|
+
<div style="opacity: 1;">
|
|
915
|
+
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.</div>
|
|
916
|
+
</div>
|
|
917
|
+
<div data-testid="ruleConnector" class="RuleConnector height-20 display-flex justify-content-center align-items-center position-relative opacity-0">
|
|
918
|
+
<div class="margin-right--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
919
|
+
<div class="right-50pct position-relative width-20 height-20 bg-white">
|
|
920
|
+
</div>
|
|
921
|
+
</div>
|
|
922
|
+
<span class="padding-left-20 padding-right-20 z-index-1 bg-lightest">
|
|
923
|
+
<span class="text-color-light">
|
|
924
|
+
<span class="rioglyph rioglyph-plus" data-testid="ruleConnectorIcon">
|
|
925
|
+
</span>
|
|
926
|
+
</span>
|
|
927
|
+
</span>
|
|
928
|
+
<div class="margin-left--10 width-20 height-20 rounded-circle position-relative z-index-2 box-sizing-content-box bg-white">
|
|
929
|
+
<div class="left-50pct position-relative width-20 height-20 bg-white">
|
|
930
|
+
</div>
|
|
931
|
+
</div>
|
|
932
|
+
</div>
|
|
933
|
+
</div>
|
|
934
|
+
</div>
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
#### Props: RuleContainer
|
|
938
|
+
|
|
939
|
+
### RuleContainer
|
|
940
|
+
|
|
941
|
+
| Name | Type | Default | Description |
|
|
942
|
+
| --- | --- | --- | --- |
|
|
943
|
+
| show | Boolean | true | Defines whether the container is shown. |
|
|
944
|
+
| unchecked | Boolean | false | Determines the container style for when no rule option is selected. It also hides the connector in this case. |
|
|
945
|
+
| background | String | bg-lightest | The box background class name. |
|
|
946
|
+
| borderColor | String | — | The border color class name. |
|
|
947
|
+
| hideConnector | Boolean | false | Defines whether the connector is shown. |
|
|
948
|
+
| customConnector | String \| Node | — | Overwrites the default connector. |
|
|
949
|
+
| className | String | — | Additional classes for the wrapper element. |
|
|
950
|
+
|
|
951
|
+
#### Props: RuleConnector
|
|
952
|
+
|
|
953
|
+
### RuleConnector
|
|
954
|
+
|
|
955
|
+
| Name | Type | Default | Description |
|
|
956
|
+
| --- | --- | --- | --- |
|
|
957
|
+
| placement | String | center | The placement for the connector. Possible values are "start", "center" and "end". |
|
|
958
|
+
| icon | String | rioglyph-plus | The rioglyph icon name. |
|
|
959
|
+
| hidden | Boolean | false | Defines whether the connector is shown. |
|
|
960
|
+
| background | String | bg-lightest | Background color of the connector itself. |
|
|
961
|
+
| pageBackground | String | bg-white | Background color of the surrounding area where the rule containers are placed. |
|
|
962
|
+
| contentClassName | String | text-color-light | Classes to be set on the connector content. |
|
|
963
|
+
| hasBorder | Boolean | false | Defines whether the connector has a border. |
|
|
964
|
+
| borderColor | String | — | The border color class name. |
|
|
965
|
+
| className | String | — | Additional classes for the wrapper element. |
|