@rio-cloud/uikit-mcp 1.0.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/LICENSE +202 -0
- package/README.md +91 -0
- package/bin/uikit-mcp.mjs +23 -0
- package/data/pages/Components/components/accentbar.json +207 -0
- package/data/pages/Components/components/activity.json +87 -0
- package/data/pages/Components/components/animatednumber.json +99 -0
- package/data/pages/Components/components/animations.json +87 -0
- package/data/pages/Components/components/appheader.json +291 -0
- package/data/pages/Components/components/applayout.json +1198 -0
- package/data/pages/Components/components/appnavigationbar.json +327 -0
- package/data/pages/Components/components/areacharts.json +563 -0
- package/data/pages/Components/components/aspectratioplaceholder.json +75 -0
- package/data/pages/Components/components/assettree.json +3080 -0
- package/data/pages/Components/components/autosuggests.json +710 -0
- package/data/pages/Components/components/avatar.json +157 -0
- package/data/pages/Components/components/banner.json +599 -0
- package/data/pages/Components/components/barcharts.json +1507 -0
- package/data/pages/Components/components/barlist.json +223 -0
- package/data/pages/Components/components/basicmap.json +68 -0
- package/data/pages/Components/components/bottomsheet.json +601 -0
- package/data/pages/Components/components/button.json +583 -0
- package/data/pages/Components/components/buttontoolbar.json +63 -0
- package/data/pages/Components/components/calendarstripe.json +235 -0
- package/data/pages/Components/components/card.json +69 -0
- package/data/pages/Components/components/carousel.json +39 -0
- package/data/pages/Components/components/chartcolors.json +34 -0
- package/data/pages/Components/components/chartsgettingstarted.json +32 -0
- package/data/pages/Components/components/chat.json +39 -0
- package/data/pages/Components/components/checkbox.json +847 -0
- package/data/pages/Components/components/clearableinput.json +789 -0
- package/data/pages/Components/components/collapse.json +175 -0
- package/data/pages/Components/components/composedcharts.json +159 -0
- package/data/pages/Components/components/contentloader.json +233 -0
- package/data/pages/Components/components/datatabs.json +680 -0
- package/data/pages/Components/components/datepickers.json +287 -0
- package/data/pages/Components/components/dialogs.json +1492 -0
- package/data/pages/Components/components/divider.json +93 -0
- package/data/pages/Components/components/dropdowns.json +936 -0
- package/data/pages/Components/components/editablecontent.json +1117 -0
- package/data/pages/Components/components/expander.json +377 -0
- package/data/pages/Components/components/fade.json +403 -0
- package/data/pages/Components/components/fadeexpander.json +75 -0
- package/data/pages/Components/components/fadeup.json +127 -0
- package/data/pages/Components/components/feedback.json +269 -0
- package/data/pages/Components/components/filepickers.json +269 -0
- package/data/pages/Components/components/formlabel.json +115 -0
- package/data/pages/Components/components/fullscreenmap.json +22 -0
- package/data/pages/Components/components/groupeditemlist.json +323 -0
- package/data/pages/Components/components/iconlist.json +45 -0
- package/data/pages/Components/components/imagepreloader.json +81 -0
- package/data/pages/Components/components/labeledelement.json +75 -0
- package/data/pages/Components/components/licenseplate.json +69 -0
- package/data/pages/Components/components/linecharts.json +987 -0
- package/data/pages/Components/components/listmenu.json +313 -0
- package/data/pages/Components/components/loadmore.json +175 -0
- package/data/pages/Components/components/mainnavigation.json +39 -0
- package/data/pages/Components/components/mapcircle.json +34 -0
- package/data/pages/Components/components/mapcluster.json +51 -0
- package/data/pages/Components/components/mapcontext.json +105 -0
- package/data/pages/Components/components/mapdraggablemarker.json +34 -0
- package/data/pages/Components/components/mapgettingstarted.json +27 -0
- package/data/pages/Components/components/mapgroup.json +1198 -0
- package/data/pages/Components/components/mapinfobubble.json +34 -0
- package/data/pages/Components/components/maplayergroup.json +34 -0
- package/data/pages/Components/components/mapmarker.json +700 -0
- package/data/pages/Components/components/mappolygon.json +45 -0
- package/data/pages/Components/components/maproute.json +623 -0
- package/data/pages/Components/components/maproutegenerator.json +16 -0
- package/data/pages/Components/components/mapsettings.json +51 -0
- package/data/pages/Components/components/maputils.json +34 -0
- package/data/pages/Components/components/multiselects.json +1451 -0
- package/data/pages/Components/components/nodata.json +139 -0
- package/data/pages/Components/components/notifications.json +65 -0
- package/data/pages/Components/components/numbercontrol.json +301 -0
- package/data/pages/Components/components/onboarding.json +302 -0
- package/data/pages/Components/components/page.json +197 -0
- package/data/pages/Components/components/pager.json +93 -0
- package/data/pages/Components/components/piecharts.json +731 -0
- package/data/pages/Components/components/popover.json +251 -0
- package/data/pages/Components/components/position.json +69 -0
- package/data/pages/Components/components/radialbarcharts.json +1304 -0
- package/data/pages/Components/components/radiobutton.json +1105 -0
- package/data/pages/Components/components/releasenotes.json +44 -0
- package/data/pages/Components/components/resizer.json +93 -0
- package/data/pages/Components/components/responsivecolumnstripe.json +123 -0
- package/data/pages/Components/components/responsivevideo.json +75 -0
- package/data/pages/Components/components/rioglyph.json +93 -0
- package/data/pages/Components/components/rules.json +410 -0
- package/data/pages/Components/components/saveableinput.json +703 -0
- package/data/pages/Components/components/selects.json +701 -0
- package/data/pages/Components/components/sidebar.json +243 -0
- package/data/pages/Components/components/sliders.json +235 -0
- package/data/pages/Components/components/smoothscrollbars.json +335 -0
- package/data/pages/Components/components/spinners.json +343 -0
- package/data/pages/Components/components/states.json +1705 -0
- package/data/pages/Components/components/statswidgets.json +314 -0
- package/data/pages/Components/components/statusbar.json +177 -0
- package/data/pages/Components/components/stepbutton.json +57 -0
- package/data/pages/Components/components/steppedprogressbars.json +417 -0
- package/data/pages/Components/components/subnavigation.json +107 -0
- package/data/pages/Components/components/supportmarker.json +45 -0
- package/data/pages/Components/components/svgimage.json +81 -0
- package/data/pages/Components/components/switch.json +111 -0
- package/data/pages/Components/components/tables.json +144 -0
- package/data/pages/Components/components/tagmanager.json +86 -0
- package/data/pages/Components/components/tags.json +146 -0
- package/data/pages/Components/components/teaser.json +188 -0
- package/data/pages/Components/components/timeline.json +45 -0
- package/data/pages/Components/components/timepicker.json +163 -0
- package/data/pages/Components/components/togglebutton.json +247 -0
- package/data/pages/Components/components/tooltip.json +270 -0
- package/data/pages/Components/components/virtuallist.json +175 -0
- package/data/pages/Foundations/foundations.json +2475 -0
- package/data/pages/Getting-started/start/changelog.json +22 -0
- package/data/pages/Getting-started/start/goodtoknow.json +32 -0
- package/data/pages/Getting-started/start/guidelines/color-combinations.json +58 -0
- package/data/pages/Getting-started/start/guidelines/custom-css.json +27 -0
- package/data/pages/Getting-started/start/guidelines/custom-rioglyph.json +22 -0
- package/data/pages/Getting-started/start/guidelines/formatting.json +97 -0
- package/data/pages/Getting-started/start/guidelines/iframe.json +93 -0
- package/data/pages/Getting-started/start/guidelines/obfuscate-data.json +22 -0
- package/data/pages/Getting-started/start/guidelines/print-css.json +37 -0
- package/data/pages/Getting-started/start/guidelines/spinner.json +144 -0
- package/data/pages/Getting-started/start/guidelines/supported-browsers.json +22 -0
- package/data/pages/Getting-started/start/guidelines/writing.json +242 -0
- package/data/pages/Getting-started/start/howto.json +72 -0
- package/data/pages/Getting-started/start/intro.json +37 -0
- package/data/pages/Getting-started/start/responsiveness.json +52 -0
- package/data/pages/Templates/templates/common-table.json +39 -0
- package/data/pages/Templates/templates/detail-views.json +71 -0
- package/data/pages/Templates/templates/expandable-details.json +39 -0
- package/data/pages/Templates/templates/feature-cards.json +103 -0
- package/data/pages/Templates/templates/form-summary.json +39 -0
- package/data/pages/Templates/templates/form-toggle.json +39 -0
- package/data/pages/Templates/templates/list-blocks.json +119 -0
- package/data/pages/Templates/templates/loading-progress.json +39 -0
- package/data/pages/Templates/templates/options-panel.json +39 -0
- package/data/pages/Templates/templates/panel-variants.json +39 -0
- package/data/pages/Templates/templates/progress-cards.json +71 -0
- package/data/pages/Templates/templates/progress-success.json +39 -0
- package/data/pages/Templates/templates/settings-form.json +39 -0
- package/data/pages/Templates/templates/stats-blocks.json +135 -0
- package/data/pages/Templates/templates/table-panel.json +39 -0
- package/data/pages/Templates/templates/table-row-animation.json +39 -0
- package/data/pages/Templates/templates/usage-cards.json +39 -0
- package/data/pages/Utilities/utilities/deviceutils.json +39 -0
- package/data/pages/Utilities/utilities/featuretoggles.json +42 -0
- package/data/pages/Utilities/utilities/fueltypeutils.json +118 -0
- package/data/pages/Utilities/utilities/routeutils.json +34 -0
- package/data/pages/Utilities/utilities/useaftermount.json +63 -0
- package/data/pages/Utilities/utilities/useaverage.json +86 -0
- package/data/pages/Utilities/utilities/useclickoutside.json +69 -0
- package/data/pages/Utilities/utilities/useclipboard.json +57 -0
- package/data/pages/Utilities/utilities/usecount.json +92 -0
- package/data/pages/Utilities/utilities/usedarkmode.json +50 -0
- package/data/pages/Utilities/utilities/usedebuginfo.json +63 -0
- package/data/pages/Utilities/utilities/useeffectonce.json +57 -0
- package/data/pages/Utilities/utilities/useelapsedtime.json +57 -0
- package/data/pages/Utilities/utilities/useelementsize.json +63 -0
- package/data/pages/Utilities/utilities/useesc.json +57 -0
- package/data/pages/Utilities/utilities/useevent.json +75 -0
- package/data/pages/Utilities/utilities/usefocustrap.json +57 -0
- package/data/pages/Utilities/utilities/usefullscreen.json +197 -0
- package/data/pages/Utilities/utilities/usehover.json +57 -0
- package/data/pages/Utilities/utilities/useinterval.json +63 -0
- package/data/pages/Utilities/utilities/useisfocuswithin.json +75 -0
- package/data/pages/Utilities/utilities/usekey.json +75 -0
- package/data/pages/Utilities/utilities/uselocalstorage.json +69 -0
- package/data/pages/Utilities/utilities/uselocationsuggestions.json +110 -0
- package/data/pages/Utilities/utilities/usemax.json +86 -0
- package/data/pages/Utilities/utilities/usemin.json +86 -0
- package/data/pages/Utilities/utilities/usemutationobserver.json +69 -0
- package/data/pages/Utilities/utilities/useonlinestatus.json +39 -0
- package/data/pages/Utilities/utilities/useonscreen.json +63 -0
- package/data/pages/Utilities/utilities/usepostmessage.json +80 -0
- package/data/pages/Utilities/utilities/useprevious.json +63 -0
- package/data/pages/Utilities/utilities/useresizeobserver.json +65 -0
- package/data/pages/Utilities/utilities/usescrollposition.json +103 -0
- package/data/pages/Utilities/utilities/usesearch.json +197 -0
- package/data/pages/Utilities/utilities/usesorting.json +139 -0
- package/data/pages/Utilities/utilities/usestatewithvalidation.json +69 -0
- package/data/pages/Utilities/utilities/usesum.json +86 -0
- package/data/pages/Utilities/utilities/usetableexport.json +87 -0
- package/data/pages/Utilities/utilities/usetableselection.json +311 -0
- package/data/pages/Utilities/utilities/usetimeout.json +63 -0
- package/data/pages/Utilities/utilities/usetoggle.json +75 -0
- package/data/pages/Utilities/utilities/usewindowresize.json +63 -0
- package/data/version.json +4 -0
- package/docs/content-schema.md +147 -0
- package/docs/navigation-inventory.json +1310 -0
- package/docs/search-synonyms.json +43 -0
- package/package.json +38 -0
- package/server/index.mjs +268 -0
- package/server/lib/load-docs.mjs +48 -0
- package/server/lib/normalise-doc.mjs +220 -0
- package/server/lib/render-markdown.mjs +82 -0
- package/server/lib/search-index.mjs +49 -0
- package/server/lib/types.js +99 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"captured_at": "2025-11-21T12:07:40.154Z",
|
|
4
|
+
"source": "https://uikit.developers.rio.cloud/#components/noData",
|
|
5
|
+
"category": "Components",
|
|
6
|
+
"section": "Content",
|
|
7
|
+
"slug": "components/nodata",
|
|
8
|
+
"version": "v1.13.2",
|
|
9
|
+
"hash_algorithm": "sha256",
|
|
10
|
+
"hash": "33febc972d900e15fe367f4ceabf5b0379708e8360d7a6efebc972d84b063b4d"
|
|
11
|
+
},
|
|
12
|
+
"title": "NoData",
|
|
13
|
+
"lead": null,
|
|
14
|
+
"content": [
|
|
15
|
+
{
|
|
16
|
+
"heading": "NoData",
|
|
17
|
+
"body": "",
|
|
18
|
+
"examples": [
|
|
19
|
+
{
|
|
20
|
+
"caption": "Example 1",
|
|
21
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"margin-10\"><label>Simple NoData element</label><span class=\"NoData\"><span class=\"pointer-events-none user-select-none\">No data</span></span></div><div class=\"margin-10\"><label>Simple NoData element with lager text</label><span class=\"NoData text-size-16\"><span class=\"pointer-events-none user-select-none\">No data</span></span></div><div class=\"margin-10\"><label>NoData with tooltip</label><span class=\"NoData\"><span class=\"pointer-events-none user-select-none\">No data</span><span class=\"rioglyph rioglyph-info-sign margin-left-5\"></span></span></div><div class=\"margin-10\"><label>NoData with tooltip right</label><span class=\"NoData\"><span class=\"pointer-events-none user-select-none\">No data</span><span class=\"rioglyph rioglyph-info-sign margin-left-5\"></span></span></div></div>",
|
|
22
|
+
"tabs": [
|
|
23
|
+
{
|
|
24
|
+
"label": "React",
|
|
25
|
+
"language": "tsx",
|
|
26
|
+
"code": "import React from 'react';\n\nimport NoData from '@rio-cloud/rio-uikit/NoData';\n\nexport default () => (\n <React.Fragment>\n <div className='margin-10'>\n <label>Simple NoData element</label>\n <NoData text='No data' />\n </div>\n <div className='margin-10'>\n <label>Simple NoData element with lager text</label>\n <NoData text='No data' className='text-size-16' />\n </div>\n <div className='margin-10'>\n <label>NoData with tooltip</label>\n <NoData text='No data' tooltip='Lorem ipsum dolor sit amet' />\n </div>\n <div className='margin-10'>\n <label>NoData with tooltip right</label>\n <NoData text='No data' tooltip='Lorem ipsum dolor sit amet' tooltipPlacement='right' />\n </div>\n </React.Fragment>\n);"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"label": "HTML",
|
|
30
|
+
"language": "html",
|
|
31
|
+
"code": "<div class=\"margin-10\">\n <label>Simple NoData element</label>\n <span class=\"NoData\">\n <span class=\"pointer-events-none user-select-none\">No data</span>\n </span>\n</div>\n<div class=\"margin-10\">\n <label>Simple NoData element with lager text</label>\n <span class=\"NoData text-size-16\">\n <span class=\"pointer-events-none user-select-none\">No data</span>\n </span>\n</div>\n<div class=\"margin-10\">\n <label>NoData with tooltip</label>\n <span class=\"NoData\">\n <span class=\"pointer-events-none user-select-none\">No data</span>\n <span class=\"rioglyph rioglyph-info-sign margin-left-5\">\n </span>\n </span>\n</div>\n<div class=\"margin-10\">\n <label>NoData with tooltip right</label>\n <span class=\"NoData\">\n <span class=\"pointer-events-none user-select-none\">No data</span>\n <span class=\"rioglyph rioglyph-info-sign margin-left-5\">\n </span>\n </span>\n</div>"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"label": "Props",
|
|
35
|
+
"language": "json",
|
|
36
|
+
"code": null,
|
|
37
|
+
"props": [
|
|
38
|
+
{
|
|
39
|
+
"heading": null,
|
|
40
|
+
"rows": [
|
|
41
|
+
{
|
|
42
|
+
"name": "text",
|
|
43
|
+
"type": "String / Node",
|
|
44
|
+
"default": "",
|
|
45
|
+
"description": "The actual translated \"No data\" text."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "tooltip",
|
|
49
|
+
"type": "String / Node",
|
|
50
|
+
"default": "",
|
|
51
|
+
"description": "Additional explanation shown inside a tooltip."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "tooltipPlacement",
|
|
55
|
+
"type": "String",
|
|
56
|
+
"default": "bottom",
|
|
57
|
+
"description": "Sets the direction the Tooltip is positioned towards. Possible values are: auto-start, auto, auto-end, top-start, top, top-end, bottom-start, bottom, bottom-end, right-start, right, right-end, left-start, left or left-end"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "tooltipWidth",
|
|
61
|
+
"type": "String",
|
|
62
|
+
"default": "auto",
|
|
63
|
+
"description": "Possible values are: auto, 100, 150, 200, 250, 300, 350, 400, 450, 500"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "className",
|
|
67
|
+
"type": "String",
|
|
68
|
+
"default": "",
|
|
69
|
+
"description": "Additional class names to be added to the wrapping element."
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"caption": "Example 2",
|
|
79
|
+
"rendered_html": "<div class=\"playground-content bg-lighter padding-20 padding-bottom-25\" style=\"width: 100%;\"><label>NoData in tables</label><table class=\"table table-bordered table-head-filled table-hover margin-top-15\"><thead><tr><th>Column 1</th><th>Column 2</th><th>Column 3</th></tr></thead><tbody><tr><td><span>Lorem</span></td><td><span class=\"NoData\"><span class=\"pointer-events-none user-select-none\">No data</span></span></td><td><span class=\"NoData\"><span class=\"pointer-events-none user-select-none\">No data</span></span></td></tr><tr><td><span>Ipsum</span></td><td><span class=\"NoData\"><span class=\"pointer-events-none user-select-none\">No data</span></span></td><td><span class=\"NoData\"><span class=\"pointer-events-none user-select-none\">No data</span></span></td></tr></tbody></table></div>",
|
|
80
|
+
"tabs": [
|
|
81
|
+
{
|
|
82
|
+
"label": "React",
|
|
83
|
+
"language": "tsx",
|
|
84
|
+
"code": "import React from 'react';\n\nimport NoData from '@rio-cloud/rio-uikit/NoData';\n\nexport default () => (\n <>\n <label>NoData in tables</label>\n <table className='table table-bordered table-head-filled table-hover margin-top-15'>\n <thead>\n <tr>\n <th>Column 1</th>\n <th>Column 2</th>\n <th>Column 3</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <span>Lorem</span>\n </td>\n <td>\n <NoData text='No data' />\n </td>\n <td>\n <NoData text='No data' />\n </td>\n </tr>\n <tr>\n <td>\n <span>Ipsum</span>\n </td>\n <td>\n <NoData text='No data' />\n </td>\n <td>\n <NoData text='No data' />\n </td>\n </tr>\n </tbody>\n </table>\n </>\n);"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"label": "HTML",
|
|
88
|
+
"language": "html",
|
|
89
|
+
"code": "<label>NoData in tables</label>\n<table class=\"table table-bordered table-head-filled table-hover margin-top-15\">\n <thead>\n <tr>\n <th>Column 1</th>\n <th>Column 2</th>\n <th>Column 3</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <span>Lorem</span>\n </td>\n <td>\n <span class=\"NoData\">\n <span class=\"pointer-events-none user-select-none\">No data</span>\n </span>\n </td>\n <td>\n <span class=\"NoData\">\n <span class=\"pointer-events-none user-select-none\">No data</span>\n </span>\n </td>\n </tr>\n <tr>\n <td>\n <span>Ipsum</span>\n </td>\n <td>\n <span class=\"NoData\">\n <span class=\"pointer-events-none user-select-none\">No data</span>\n </span>\n </td>\n <td>\n <span class=\"NoData\">\n <span class=\"pointer-events-none user-select-none\">No data</span>\n </span>\n </td>\n </tr>\n </tbody>\n</table>"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"label": "Props",
|
|
93
|
+
"language": "json",
|
|
94
|
+
"code": null,
|
|
95
|
+
"props": [
|
|
96
|
+
{
|
|
97
|
+
"heading": null,
|
|
98
|
+
"rows": [
|
|
99
|
+
{
|
|
100
|
+
"name": "text",
|
|
101
|
+
"type": "String / Node",
|
|
102
|
+
"default": "",
|
|
103
|
+
"description": "The actual translated \"No data\" text."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "tooltip",
|
|
107
|
+
"type": "String / Node",
|
|
108
|
+
"default": "",
|
|
109
|
+
"description": "Additional explanation shown inside a tooltip."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "tooltipPlacement",
|
|
113
|
+
"type": "String",
|
|
114
|
+
"default": "bottom",
|
|
115
|
+
"description": "Sets the direction the Tooltip is positioned towards. Possible values are: auto-start, auto, auto-end, top-start, top, top-end, bottom-start, bottom, bottom-end, right-start, right, right-end, left-start, left or left-end"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "tooltipWidth",
|
|
119
|
+
"type": "String",
|
|
120
|
+
"default": "auto",
|
|
121
|
+
"description": "Possible values are: auto, 100, 150, 200, 250, 300, 350, 400, 450, 500"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "className",
|
|
125
|
+
"type": "String",
|
|
126
|
+
"default": "",
|
|
127
|
+
"description": "Additional class names to be added to the wrapping element."
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"see_also": []
|
|
139
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"captured_at": "2025-11-21T12:07:52.838Z",
|
|
4
|
+
"source": "https://uikit.developers.rio.cloud/#components/notifications",
|
|
5
|
+
"category": "Components",
|
|
6
|
+
"section": "Misc",
|
|
7
|
+
"slug": "components/notifications",
|
|
8
|
+
"version": "v1.13.2",
|
|
9
|
+
"hash_algorithm": "sha256",
|
|
10
|
+
"hash": "0e8460b7cedb713d5ceeef0b5e46da889da6f7c4ed686f391e85e8faee5b1b81"
|
|
11
|
+
},
|
|
12
|
+
"title": "Notification",
|
|
13
|
+
"lead": "Hint: Notifications need to be wrapped by a NotificationsContainer inside your application layout body.",
|
|
14
|
+
"content": [
|
|
15
|
+
{
|
|
16
|
+
"heading": "Notification",
|
|
17
|
+
"body": "Please check out the notifications guidelines here.",
|
|
18
|
+
"examples": [
|
|
19
|
+
{
|
|
20
|
+
"caption": "Notifications",
|
|
21
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5\">Notifications</div><div class=\"margin-bottom-20\"><button type=\"button\" class=\"btn btn-default btn-component\" tabindex=\"0\">Default notification</button></div><div class=\"btn-toolbar margin-bottom-20\"><button type=\"button\" class=\"btn btn-info btn-component\" tabindex=\"0\">Info notification</button><button type=\"button\" class=\"btn btn-success btn-component\" tabindex=\"0\">Success notification</button><button type=\"button\" class=\"btn btn-warning btn-component\" tabindex=\"0\">Warning notification</button><button type=\"button\" class=\"btn btn-danger btn-component\" tabindex=\"0\">Error notification</button></div><div class=\"Divider position-relative width-100pct\" style=\"padding-top: 25px; padding-bottom: 25px;\"><div class=\"divider-line bg-light\" style=\"width: 100%; height: 1px;\"></div></div><div class=\"text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5\">Notifications with options</div><div class=\"btn-toolbar\"><button type=\"button\" class=\"btn btn-info btn-component\" tabindex=\"0\">Info</button><button type=\"button\" class=\"btn btn-success btn-component\" tabindex=\"0\">Success</button><button type=\"button\" class=\"btn btn-warning btn-component\" tabindex=\"0\">Warning</button><button type=\"button\" class=\"btn btn-danger btn-component\" tabindex=\"0\">Error</button></div><div class=\"margin-top-25 display-inline-flex\"><div class=\"display-flex gap-10 max-width-1000 margin-bottom-10 last-child-margin-bottom-0\"><div data-capture-callout=\"true\"><span class=\"label label-info label-condensed label-filled\">Note</span></div><div class=\"width-100pct children-first-margin-top-0 children-last-margin-bottom-0 padding-top-1\"></div></div>Use notifications with a progress bar only when the user should interact with the notification for example when adding a link or a button.</div><div class=\"Divider position-relative width-100pct\" style=\"padding-top: 25px; padding-bottom: 25px;\"><div class=\"divider-line bg-light\" style=\"width: 100%; height: 1px;\"></div></div><div class=\"text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5\">Legacy notification API - will be removed in the future</div><div><button type=\"button\" class=\"btn btn-danger btn-component\" tabindex=\"0\">Legacy notification with callback and close icon</button></div></div>",
|
|
22
|
+
"tabs": [
|
|
23
|
+
{
|
|
24
|
+
"label": "React",
|
|
25
|
+
"language": "tsx",
|
|
26
|
+
"code": "import Notification, { NOTIFICATION_TIMEOUT_INFINITE } from '@rio-cloud/rio-uikit/Notification';\nimport Divider from '@rio-cloud/rio-uikit/Divider';\nimport Button from '@rio-cloud/rio-uikit/Button';\nimport FormLabel from '@rio-cloud/rio-uikit/FormLabel';\nimport ButtonToolbar from '@rio-cloud/rio-uikit/ButtonToolbar';\nimport { Note } from '../../../components/Note';\n\n// Note: make sure you have set up the NotificationContainer\n\nexport default () => (\n <>\n <FormLabel>Notifications</FormLabel>\n <div className='margin-bottom-20'>\n <Button onClick={() => Notification.default('Your report is being generated')}>Default notification</Button>\n </div>\n <div className='btn-toolbar margin-bottom-20'>\n <Button bsStyle='info' onClick={() => Notification.info('Info message')}>\n Info notification\n </Button>\n <Button bsStyle='success' onClick={() => Notification.success('Success message')}>\n Success notification\n </Button>\n <Button bsStyle='warning' onClick={() => Notification.warning('Warning message')}>\n Warning notification\n </Button>\n <Button bsStyle='danger' onClick={() => Notification.error('Error message')}>\n Error notification\n </Button>\n </div>\n <Divider spacing={25} />\n <FormLabel>Notifications with options</FormLabel>\n <ButtonToolbar>\n <Button\n bsStyle='info'\n onClick={() => {\n Notification.info(\n <div>\n <div className='margin-bottom-5'>Lorem ipsum dolor sit amet </div>\n <a href='#' onClick={event => event.stopPropagation()}>\n <span>Read more information here</span>\n <span className='rioglyph rioglyph-new-window margin-left-5' />\n </a>\n </div>,\n {\n title: 'Info title',\n timeout: 10_000,\n closeButton: true,\n hideProgressBar: false,\n callback: () => {\n Notification.success('Clicked');\n },\n }\n );\n }}\n >\n Info\n </Button>\n <Button\n bsStyle='success'\n onClick={() => {\n Notification.success(\n <div>\n <a href='#' onClick={event => event.stopPropagation()}>\n See all appointments here\n </a>\n </div>,\n {\n title: 'Appointment created successfully',\n timeout: 10_000,\n closeButton: true,\n hideProgressBar: false,\n callback: () => {\n Notification.success('Clicked');\n },\n }\n );\n }}\n >\n Success\n </Button>\n <Button\n bsStyle='warning'\n onClick={() => {\n Notification.warning(\n <div>\n <div className='margin-bottom-10'>Lorem ipsum dolor sit amet </div>\n <Button bsStyle='warning' variant='outline' onClick={event => event.stopPropagation()}>\n Retry\n </Button>\n </div>,\n {\n title: 'Warning title',\n timeout: 10_000,\n closeButton: true,\n hideProgressBar: false,\n callback: () => {\n Notification.success('Clicked');\n },\n }\n );\n }}\n >\n Warning\n </Button>\n <Button\n bsStyle='danger'\n onClick={() => {\n Notification.error(\n <div>\n <div className='margin-bottom-10'>Lorem ipsum dolor sit amet </div>\n <Button bsStyle='danger' variant='outline' onClick={event => event.stopPropagation()}>\n Retry\n </Button>\n </div>,\n {\n title: 'Error title',\n timeout: 10_000,\n closeButton: true,\n hideProgressBar: false,\n callback: () => {\n Notification.success('Clicked');\n },\n }\n );\n }}\n >\n Error\n </Button>\n </ButtonToolbar>\n <div className='margin-top-25 display-inline-flex'>\n <Note />\n Use notifications with a progress bar only when the user should interact with the notification for example\n when adding a link or a button.\n </div>\n <Divider spacing={25} />\n <FormLabel>Legacy notification API - will be removed in the future</FormLabel>\n <div>\n <Button\n bsStyle='danger'\n onClick={() => {\n Notification.error(\n <span>\n {'You seem to be offline. '}\n <span className='notification-close'>\n <span className='rioglyph rioglyph-remove' />\n </span>\n </span>,\n 'Connection loss',\n NOTIFICATION_TIMEOUT_INFINITE,\n () => {\n Notification.success('Clicked');\n }\n );\n }}\n >\n Legacy notification with callback and close icon\n </Button>\n </div>\n </>\n);"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"label": "HTML",
|
|
30
|
+
"language": "html",
|
|
31
|
+
"code": "<div class=\"text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5\">Notifications</div>\n<div class=\"margin-bottom-20\">\n <button type=\"button\" class=\"btn btn-default btn-component\" tabindex=\"0\">Default notification</button>\n</div>\n<div class=\"btn-toolbar margin-bottom-20\">\n <button type=\"button\" class=\"btn btn-info btn-component\" tabindex=\"0\">Info notification</button>\n <button type=\"button\" class=\"btn btn-success btn-component\" tabindex=\"0\">Success notification</button>\n <button type=\"button\" class=\"btn btn-warning btn-component\" tabindex=\"0\">Warning notification</button>\n <button type=\"button\" class=\"btn btn-danger btn-component\" tabindex=\"0\">Error notification</button>\n</div>\n<div class=\"Divider position-relative width-100pct\" style=\"padding-top: 25px; padding-bottom: 25px;\">\n <div class=\"divider-line bg-light\" style=\"width: 100%; height: 1px;\">\n </div>\n</div>\n<div class=\"text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5\">Notifications with options</div>\n<div class=\"btn-toolbar\">\n <button type=\"button\" class=\"btn btn-info btn-component\" tabindex=\"0\">Info</button>\n <button type=\"button\" class=\"btn btn-success btn-component\" tabindex=\"0\">Success</button>\n <button type=\"button\" class=\"btn btn-warning btn-component\" tabindex=\"0\">Warning</button>\n <button type=\"button\" class=\"btn btn-danger btn-component\" tabindex=\"0\">Error</button>\n</div>\n<div class=\"margin-top-25 display-inline-flex\">\n <div class=\"display-flex gap-10 max-width-1000 margin-bottom-10 last-child-margin-bottom-0\">\n <div data-capture-callout=\"true\">\n <span class=\"label label-info label-condensed label-filled\">Note</span>\n </div>\n <div class=\"width-100pct children-first-margin-top-0 children-last-margin-bottom-0 padding-top-1\">\n </div>\n </div>Use notifications with a progress bar only when the user should interact with the notification for example when adding a link or a button.\n</div>\n<div class=\"Divider position-relative width-100pct\" style=\"padding-top: 25px; padding-bottom: 25px;\">\n <div class=\"divider-line bg-light\" style=\"width: 100%; height: 1px;\">\n </div>\n</div>\n<div class=\"text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5\">Legacy notification API - will be removed in the future</div>\n<div>\n <button type=\"button\" class=\"btn btn-danger btn-component\" tabindex=\"0\">Legacy notification with callback and close icon</button>\n</div>"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"label": "Props",
|
|
35
|
+
"language": "json",
|
|
36
|
+
"code": "<ApplicationLayout>\n <ApplicationLayout.Header>...</ApplicationLayout.Header>\n <ApplicationLayout.Body>\n <NotificationsContainer />\n ...\n </ApplicationLayout.Body>\n ...\n</ApplicationLayout>"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"caption": "Example 2",
|
|
42
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"max-width-250\"><div class=\"form-group\"><label for=\"totalLength\" class=\"display-inline-block\"><span>Copy to clipboard notification example</span></label><div class=\"input-group\"><input id=\"totalLength\" class=\"form-control\" type=\"text\" value=\"6.52\"><div class=\"input-group-addon padding-right-0\"><button type=\"button\" class=\"btn btn-muted btn-icon-only btn-component hover-bg-none\" tabindex=\"0\"><span class=\"rioglyph rioglyph-duplicate\"></span></button></div></div></div></div></div>",
|
|
43
|
+
"tabs": [
|
|
44
|
+
{
|
|
45
|
+
"label": "React",
|
|
46
|
+
"language": "tsx",
|
|
47
|
+
"code": "import { useEffect, useRef } from 'react';\n\nimport Notification from '@rio-cloud/rio-uikit/Notification';\nimport Button from '@rio-cloud/rio-uikit/Button';\nimport FormLabel from '@rio-cloud/rio-uikit/FormLabel';\nimport useClipboard from '@rio-cloud/rio-uikit/useClipboard';\n\n// Note: make sure you have set up the NotificationContainer\n\nexport default () => {\n const inputRef = useRef<HTMLInputElement>(null);\n\n const clipboard = useClipboard();\n\n const handleCopyToClipboard = () => clipboard.copy(inputRef.current?.value ?? '');\n\n useEffect(() => {\n clipboard.copied && Notification.default('Value copied to clipboard');\n }, [clipboard.copied]);\n\n return (\n <div className='max-width-250'>\n <div className='form-group'>\n <FormLabel htmlFor='totalLength'>Copy to clipboard notification example</FormLabel>\n <div className='input-group'>\n <input id='totalLength' className='form-control' type='text' defaultValue='6.52' ref={inputRef} />\n <div className='input-group-addon padding-right-0'>\n <Button\n bsStyle='muted'\n iconName='rioglyph-duplicate'\n iconOnly\n className='hover-bg-none'\n onClick={handleCopyToClipboard}\n />\n </div>\n </div>\n </div>\n </div>\n );\n};"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"label": "HTML",
|
|
51
|
+
"language": "html",
|
|
52
|
+
"code": "<div class=\"max-width-250\">\n <div class=\"form-group\">\n <label for=\"totalLength\" class=\"display-inline-block\">\n <span>Copy to clipboard notification example</span>\n </label>\n <div class=\"input-group\">\n <input id=\"totalLength\" class=\"form-control\" type=\"text\" value=\"6.52\">\n <div class=\"input-group-addon padding-right-0\">\n <button type=\"button\" class=\"btn btn-muted btn-icon-only btn-component hover-bg-none\" tabindex=\"0\">\n <span class=\"rioglyph rioglyph-duplicate\">\n </span>\n </button>\n </div>\n </div>\n </div>\n</div>"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"label": "Props",
|
|
56
|
+
"language": "json",
|
|
57
|
+
"code": "<ApplicationLayout>\n <ApplicationLayout.Header>...</ApplicationLayout.Header>\n <ApplicationLayout.Body>\n <NotificationsContainer />\n ...\n </ApplicationLayout.Body>\n ...\n</ApplicationLayout>"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"see_also": []
|
|
65
|
+
}
|