@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
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2025 TB Digital Services GmbH
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# @rio-cloud/uikit-mcp
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
- Model Context Protocol (MCP) server that exposes the captured RIO UI Kit documentation as Markdown resources plus a keyword search tool.
|
|
6
|
+
- Ships with the full dataset under `data/`—no network calls or external services are required at runtime.
|
|
7
|
+
- Captured UI Kit version: see `data/version.json` (written automatically by `npm run capture:all`)
|
|
8
|
+
- `search_docs` must always be used before `readResource`; listResources is a static inventory snapshot and not intended for guessing IDs.
|
|
9
|
+
- `readResource` returns rich Markdown (sections, examples, code tabs, props tables) for the URI returned by `search_docs`.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## MCP Client Configuration
|
|
13
|
+
|
|
14
|
+
Add the server to an MCP-aware client configuration (example for Codex CLI):
|
|
15
|
+
|
|
16
|
+
```toml
|
|
17
|
+
[mcp_servers.uikit]
|
|
18
|
+
command = "npx"
|
|
19
|
+
args = ["@rio-cloud/uikit-mcp"]
|
|
20
|
+
startup_timeout_sec = 30
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Available Resources & Tools
|
|
25
|
+
|
|
26
|
+
- **Resource namespace:** `uikit-doc://<route>` (e.g. `uikit-doc://components/button`).
|
|
27
|
+
- Response includes category, section, source URL, captured timestamp, section bodies, rendered example HTML, code tabs, props tables, and See Also links.
|
|
28
|
+
- Resource IDs use the full hash path (e.g. `uikit-doc://start/guidelines/print-css`); always resolve via `search_docs` instead of guessing or hardcoding IDs.
|
|
29
|
+
- **Tools**
|
|
30
|
+
- `search_docs` — FlexSearch-backed keyword lookup. Input `{ query: string; limit?: number }`, output `{ results: [...] }`. Always call `readResource` on returned URIs before acting.
|
|
31
|
+
|
|
32
|
+
## Suggested Agent Guidelines
|
|
33
|
+
|
|
34
|
+
Add the short UI Kit usage snippet from `AGENTS.md` to your agent guidelines so coding sessions stay consistent:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
## RIO UI Kit usage
|
|
38
|
+
- Prefer components from '@rio-cloud/rio-uikit' and style via the provided classes instead of adding new CSS files.
|
|
39
|
+
- Wrap all app content in ApplicationLayout.
|
|
40
|
+
- Use the MCP server for docs (search_docs → readResource); don't guess resource routes.
|
|
41
|
+
- Best tech stack for the RIO UI Kit is a React application with TypeScript
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Development Notes
|
|
45
|
+
|
|
46
|
+
- Crawler scripts live in `crawler/` and stay out of the npm bundle.
|
|
47
|
+
- Download Chromium once: `npm run setup:crawler`.
|
|
48
|
+
- One-shot full run: `npm run crawl:full` (ensures Playwright Chromium, runs `crawl:navigation`, `capture:all -- --force --concurrency=5`, then `npm test`).
|
|
49
|
+
- Refresh navigation snapshot: `npm run crawl:navigation`.
|
|
50
|
+
- Capture all routes: `npm run capture:all` with optional flags:
|
|
51
|
+
- `--category=Components` (filter by top-level navigation label)
|
|
52
|
+
- `--section=Interaction` (filter by sidebar section title)
|
|
53
|
+
- `--match=button` (substring match across category/section/label/href)
|
|
54
|
+
- `--retries=3` (per-route retry count)
|
|
55
|
+
- `--concurrency=5` (parallel workers; 5 recommended for full crawl)
|
|
56
|
+
- `--force` (re-write artefacts even when hashes match existing files)
|
|
57
|
+
- Script writes JSON to `data/pages/**` and updates `data/version.json` with the detected UI Kit version. Full captures (no `--match`/`--section`) clean existing JSON artefacts per captured category before writing; partial captures rely on hash comparison to skip unchanged files.
|
|
58
|
+
- `docs/navigation-inventory.json` records the latest navigation snapshot; `docs/content-schema.md` documents the capture format.
|
|
59
|
+
- Run the lightweight regression suite with `npm test` to ensure doc loading, search, and Markdown rendering stay healthy.
|
|
60
|
+
- Search synonyms and preferred resource IDs live in `docs/search-synonyms.json`; after crawls, keep this file in sync. `npm test` fails if any preferredDocIds are missing.
|
|
61
|
+
|
|
62
|
+
### New crawl for a new UI Kit version
|
|
63
|
+
- Shortcut: `npm run crawl:full` (runs setup if needed, navigation crawl, full capture with `--force --concurrency=5`, then tests).
|
|
64
|
+
- `data/version.json` is written automatically; README points to this file so no manual version bump is needed.
|
|
65
|
+
|
|
66
|
+
### Local Installation with git checkout
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm install
|
|
70
|
+
# global link for CLI availability
|
|
71
|
+
npm link
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- CLI entrypoint: `uikit-mcp`
|
|
75
|
+
- (optional) smoke test: `node tools/demo-client.mjs`.
|
|
76
|
+
|
|
77
|
+
#### MCP Client Configuration (Local Checkout)
|
|
78
|
+
|
|
79
|
+
Add the server to an MCP-aware client configuration (example for Codex CLI):
|
|
80
|
+
|
|
81
|
+
```toml
|
|
82
|
+
# use globally linked CLI (npm link)
|
|
83
|
+
[mcp_servers.uikit]
|
|
84
|
+
command = "uikit-mcp"
|
|
85
|
+
startup_timeout_sec = 30
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
Licensed under the [Apache License 2.0](./LICENSE).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
|
|
6
|
+
async function main() {
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const projectRoot = path.resolve(path.dirname(__filename), '..');
|
|
9
|
+
|
|
10
|
+
process.chdir(projectRoot);
|
|
11
|
+
|
|
12
|
+
const serverPath = path.join(projectRoot, 'server', 'index.mjs');
|
|
13
|
+
const serverUrl = pathToFileURL(serverPath).href;
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
await import(serverUrl);
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.error('Failed to start uikit MCP server:', error);
|
|
19
|
+
process.exitCode = 1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
main();
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"captured_at": "2025-11-21T12:07:48.672Z",
|
|
4
|
+
"source": "https://uikit.developers.rio.cloud/#components/accentBar",
|
|
5
|
+
"category": "Components",
|
|
6
|
+
"section": "Misc",
|
|
7
|
+
"slug": "components/accentbar",
|
|
8
|
+
"version": "v1.13.2",
|
|
9
|
+
"hash_algorithm": "sha256",
|
|
10
|
+
"hash": "72f34e23f95ddb28f9bbaae2757ae001a15fb7381c08ba1d171d96994626728d"
|
|
11
|
+
},
|
|
12
|
+
"title": "AccentBar",
|
|
13
|
+
"lead": "The AccentBar component is a small, colored vertical bar (typically a few pixels wide) used to visually highlight or categorize rows in lists, tables, or cards. It helps improve readability by providing a quick visual cue for different statuses, categories, or priorities.",
|
|
14
|
+
"content": [
|
|
15
|
+
{
|
|
16
|
+
"heading": "AccentBar",
|
|
17
|
+
"body": "Use it to indicate status or priority in a table, as a category marker in list-based layouts where items belong to different groups, or to subtly enhance visual hierarchy in a UI without overwhelming the content. Additionally, it can be used to describe values in a chart, acting as a color-coded reference for data representation.",
|
|
18
|
+
"examples": [
|
|
19
|
+
{
|
|
20
|
+
"caption": "Example 1",
|
|
21
|
+
"rendered_html": "<div class=\"playground-content bg-lightest padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"display-flex flex-column gap-15 max-width-400\"><div class=\"bg-white rounded border shadow-default padding-15\"><div class=\"display-flex align-items-stretch\"><div class=\"AccentBar bg-secondary\"></div>Lorem ipsum dolor sit amet</div></div><div class=\"bg-white rounded border shadow-default padding-15\"><div class=\"display-flex align-items-stretch\"><div class=\"AccentBar bg-info\"></div>Lorem ipsum dolor sit amet</div></div><div class=\"bg-white rounded border shadow-default padding-15\"><div class=\"display-flex align-items-stretch\"><div class=\"AccentBar bg-warning\"></div>\nLorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.</div></div></div></div>",
|
|
22
|
+
"tabs": [
|
|
23
|
+
{
|
|
24
|
+
"label": "React",
|
|
25
|
+
"language": "tsx",
|
|
26
|
+
"code": "import AccentBar from '@rio-cloud/rio-uikit/AccentBar';\nimport Card from '@rio-cloud/rio-uikit/Card';\nimport { dummyTextShort } from '../../../utils/data';\n\nexport default () => (\n <div className='display-flex flex-column gap-15 max-width-400'>\n <Card>\n <AccentBar>Lorem ipsum dolor sit amet</AccentBar>\n </Card>\n <Card>\n <AccentBar color='bg-info'>Lorem ipsum dolor sit amet</AccentBar>\n </Card>\n <Card>\n <AccentBar color='bg-warning'>{dummyTextShort}</AccentBar>\n </Card>\n </div>\n);"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"label": "HTML",
|
|
30
|
+
"language": "html",
|
|
31
|
+
"code": "<div class=\"display-flex flex-column gap-15 max-width-400\">\n <div class=\"bg-white rounded border shadow-default padding-15\">\n <div class=\"display-flex align-items-stretch\">\n <div class=\"AccentBar bg-secondary\">\n </div>Lorem ipsum dolor sit amet\n </div>\n </div>\n <div class=\"bg-white rounded border shadow-default padding-15\">\n <div class=\"display-flex align-items-stretch\">\n <div class=\"AccentBar bg-info\">\n </div>Lorem ipsum dolor sit amet\n </div>\n </div>\n <div class=\"bg-white rounded border shadow-default padding-15\">\n <div class=\"display-flex align-items-stretch\">\n <div class=\"AccentBar bg-warning\">\n </div>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. In pharetra dui eget massa efficitur aliquam condimentum in felis. Integer eget metus vel nunc efficitur iaculis. Vivamus elementum ante et est sagittis semper. Ut consectetur enim nec tortor scelerisque tincidunt.\n </div>\n </div>\n</div>"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"label": "Props",
|
|
35
|
+
"language": "json",
|
|
36
|
+
"code": null,
|
|
37
|
+
"props": [
|
|
38
|
+
{
|
|
39
|
+
"heading": null,
|
|
40
|
+
"rows": [
|
|
41
|
+
{
|
|
42
|
+
"name": "color",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"default": "bg-secondary",
|
|
45
|
+
"description": "Defines the color by setting it to a UIKIT bg-<name> class name."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "circle",
|
|
49
|
+
"type": "boolean",
|
|
50
|
+
"default": "false",
|
|
51
|
+
"description": "Defines if the element is rendered as a stretching bar or just a centered circle."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "className",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"default": "",
|
|
57
|
+
"description": "Additional class names passed to the actual element."
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"caption": "Example 2",
|
|
67
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"table-responsive\"><table class=\"table\"><thead><tr><th>Status</th><th>Location</th><th>ETA</th></tr></thead><tbody><tr><td><div class=\"display-flex align-items-stretch\"><div class=\"AccentBar bg-warning\"></div>In transit</div></td><td>Hamburg, DE</td><td>2024-02-02</td></tr><tr><td><div class=\"display-flex align-items-stretch\"><div class=\"AccentBar bg-success\"></div>Delivered</div></td><td>Rotterdam, NL</td><td>2024-01-29</td></tr><tr><td><div class=\"display-flex align-items-stretch\"><div class=\"AccentBar bg-info\"></div>Awaiting pickup</div></td><td>Warsaw, PL</td><td>2024-02-05</td></tr><tr><td><div class=\"display-flex align-items-stretch\"><div class=\"AccentBar bg-danger\"></div>Customs clearance</div></td><td>Antwerp, BE</td><td>2024-02-03</td></tr></tbody></table></div></div>",
|
|
68
|
+
"tabs": [
|
|
69
|
+
{
|
|
70
|
+
"label": "React",
|
|
71
|
+
"language": "tsx",
|
|
72
|
+
"code": "import AccentBar from '@rio-cloud/rio-uikit/AccentBar';\n\nconst data = [\n { id: 1, status: 'In transit', location: 'Hamburg, DE', eta: '2024-02-02' },\n { id: 2, status: 'Delivered', location: 'Rotterdam, NL', eta: '2024-01-29' },\n { id: 3, status: 'Awaiting pickup', location: 'Warsaw, PL', eta: '2024-02-05' },\n { id: 4, status: 'Customs clearance', location: 'Antwerp, BE', eta: '2024-02-03' },\n];\n\nexport default () => {\n return (\n <div className='table-responsive'>\n <table className='table'>\n <thead>\n <tr>\n <th>Status</th>\n <th>Location</th>\n <th>ETA</th>\n </tr>\n </thead>\n <tbody>\n {data.map(row => (\n <tr key={row.id}>\n <td>\n <AccentBar color={getStatusColor(row.status)}>{row.status}</AccentBar>\n </td>\n <td>{row.location}</td>\n <td>{row.eta}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n};\n\nconst getStatusColor = (status: string) => {\n switch (status) {\n case 'In transit':\n return 'bg-warning';\n case 'Delivered':\n return 'bg-success';\n case 'Awaiting pickup':\n return 'bg-info';\n case 'Customs clearance':\n return 'bg-danger';\n default:\n return 'bg-primary';\n }\n};"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"label": "HTML",
|
|
76
|
+
"language": "html",
|
|
77
|
+
"code": "<div class=\"table-responsive\">\n <table class=\"table\">\n <thead>\n <tr>\n <th>Status</th>\n <th>Location</th>\n <th>ETA</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <div class=\"display-flex align-items-stretch\">\n <div class=\"AccentBar bg-warning\">\n </div>In transit\n </div>\n </td>\n <td>Hamburg, DE</td>\n <td>2024-02-02</td>\n </tr>\n <tr>\n <td>\n <div class=\"display-flex align-items-stretch\">\n <div class=\"AccentBar bg-success\">\n </div>Delivered\n </div>\n </td>\n <td>Rotterdam, NL</td>\n <td>2024-01-29</td>\n </tr>\n <tr>\n <td>\n <div class=\"display-flex align-items-stretch\">\n <div class=\"AccentBar bg-info\">\n </div>Awaiting pickup\n </div>\n </td>\n <td>Warsaw, PL</td>\n <td>2024-02-05</td>\n </tr>\n <tr>\n <td>\n <div class=\"display-flex align-items-stretch\">\n <div class=\"AccentBar bg-danger\">\n </div>Customs clearance\n </div>\n </td>\n <td>Antwerp, BE</td>\n <td>2024-02-03</td>\n </tr>\n </tbody>\n </table>\n</div>"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"label": "Props",
|
|
81
|
+
"language": "json",
|
|
82
|
+
"code": null,
|
|
83
|
+
"props": [
|
|
84
|
+
{
|
|
85
|
+
"heading": null,
|
|
86
|
+
"rows": [
|
|
87
|
+
{
|
|
88
|
+
"name": "color",
|
|
89
|
+
"type": "string",
|
|
90
|
+
"default": "bg-secondary",
|
|
91
|
+
"description": "Defines the color by setting it to a UIKIT bg-<name> class name."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "circle",
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"default": "false",
|
|
97
|
+
"description": "Defines if the element is rendered as a stretching bar or just a centered circle."
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "className",
|
|
101
|
+
"type": "string",
|
|
102
|
+
"default": "",
|
|
103
|
+
"description": "Additional class names passed to the actual element."
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"caption": "Example 3",
|
|
113
|
+
"rendered_html": "<div class=\"playground-content bg-lightest padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"bg-white rounded border shadow-default padding-15 max-width-500 padding-25\"><div class=\"text-size-h5 text-medium text-color darker margin-bottom-25\">Visualizing rating distribution</div><div class=\"margin-bottom-25\"><div class=\"progress\"><div class=\"progress-bar bg-rating-1 progress-divider\" style=\"width: 15%;\"></div><div class=\"progress-bar bg-rating-2 progress-divider\" style=\"width: 20%;\"></div><div class=\"progress-bar bg-rating-3 progress-divider\" style=\"width: 25%;\"></div><div class=\"progress-bar bg-rating-4 progress-divider\" style=\"width: 15%;\"></div><div class=\"progress-bar bg-rating-5 progress-divider\" style=\"width: 25%;\"></div></div></div><table class=\"table table-compact\"><thead><tr><th class=\"width-10\"></th><th>Category</th><th>Percentage</th></tr></thead><tbody><tr><td class=\"align-center width-5 padding-right-0\"><div class=\"AccentBar bg-rating-1\"></div></td><td>Poor</td><td>15%</td></tr><tr><td class=\"align-center width-5 padding-right-0\"><div class=\"AccentBar bg-rating-2\"></div></td><td>Below Average</td><td>20%</td></tr><tr><td class=\"align-center width-5 padding-right-0\"><div class=\"AccentBar bg-rating-3\"></div></td><td>Average</td><td>25%</td></tr><tr><td class=\"align-center width-5 padding-right-0\"><div class=\"AccentBar bg-rating-4\"></div></td><td>Good</td><td>15%</td></tr><tr><td class=\"align-center width-5 padding-right-0\"><div class=\"AccentBar bg-rating-5\"></div></td><td>Excellent</td><td>25%</td></tr></tbody></table></div></div>",
|
|
114
|
+
"tabs": [
|
|
115
|
+
{
|
|
116
|
+
"label": "React",
|
|
117
|
+
"language": "tsx",
|
|
118
|
+
"code": "import AccentBar from '@rio-cloud/rio-uikit/AccentBar';\nimport Card from '@rio-cloud/rio-uikit/Card';\n\nconst data = [\n { id: 1, status: 'In transit', location: 'Hamburg, DE', eta: '2024-02-02' },\n { id: 2, status: 'Delivered', location: 'Rotterdam, NL', eta: '2024-01-29' },\n { id: 3, status: 'Awaiting pickup', location: 'Warsaw, PL', eta: '2024-02-05' },\n { id: 4, status: 'Customs clearance', location: 'Antwerp, BE', eta: '2024-02-03' },\n];\n\nexport default () => {\n return (\n <Card className='max-width-500 padding-25'>\n <div className='text-size-h5 text-medium text-color darker margin-bottom-25'>\n Visualizing rating distribution\n </div>\n <div className='margin-bottom-25'>\n <div className='progress'>\n <div className='progress-bar bg-rating-1 progress-divider' style={{ width: '15%' }} />\n <div className='progress-bar bg-rating-2 progress-divider' style={{ width: '20%' }} />\n <div className='progress-bar bg-rating-3 progress-divider' style={{ width: '25%' }} />\n <div className='progress-bar bg-rating-4 progress-divider' style={{ width: '15%' }} />\n <div className='progress-bar bg-rating-5 progress-divider' style={{ width: '25%' }} />\n </div>\n </div>\n\n <table className='table table-compact'>\n <thead>\n <tr>\n <th className='width-10' />\n <th>Category</th>\n <th>Percentage</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td className='align-center width-5 padding-right-0'>\n <AccentBar color='bg-rating-1' />\n </td>\n <td>Poor</td>\n <td>15%</td>\n </tr>\n <tr>\n <td className='align-center width-5 padding-right-0'>\n <AccentBar color='bg-rating-2' />\n </td>\n <td>Below Average</td>\n <td>20%</td>\n </tr>\n <tr>\n <td className='align-center width-5 padding-right-0'>\n <AccentBar color='bg-rating-3' />\n </td>\n <td>Average</td>\n <td>25%</td>\n </tr>\n <tr>\n <td className='align-center width-5 padding-right-0'>\n <AccentBar color='bg-rating-4' />\n </td>\n <td>Good</td>\n <td>15%</td>\n </tr>\n <tr>\n <td className='align-center width-5 padding-right-0'>\n <AccentBar color='bg-rating-5' />\n </td>\n <td>Excellent</td>\n <td>25%</td>\n </tr>\n </tbody>\n </table>\n </Card>\n );\n};\n\nconst getStatusColor = (status: string) => {\n switch (status) {\n case 'In transit':\n return 'bg-warning';\n case 'Delivered':\n return 'bg-success';\n case 'Awaiting pickup':\n return 'bg-info';\n case 'Customs clearance':\n return 'bg-danger';\n default:\n return 'bg-primary';\n }\n};"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"label": "HTML",
|
|
122
|
+
"language": "html",
|
|
123
|
+
"code": "<div class=\"bg-white rounded border shadow-default padding-15 max-width-500 padding-25\">\n <div class=\"text-size-h5 text-medium text-color darker margin-bottom-25\">Visualizing rating distribution</div>\n <div class=\"margin-bottom-25\">\n <div class=\"progress\">\n <div class=\"progress-bar bg-rating-1 progress-divider\" style=\"width: 15%;\">\n </div>\n <div class=\"progress-bar bg-rating-2 progress-divider\" style=\"width: 20%;\">\n </div>\n <div class=\"progress-bar bg-rating-3 progress-divider\" style=\"width: 25%;\">\n </div>\n <div class=\"progress-bar bg-rating-4 progress-divider\" style=\"width: 15%;\">\n </div>\n <div class=\"progress-bar bg-rating-5 progress-divider\" style=\"width: 25%;\">\n </div>\n </div>\n </div>\n <table class=\"table table-compact\">\n <thead>\n <tr>\n <th class=\"width-10\">\n </th>\n <th>Category</th>\n <th>Percentage</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class=\"align-center width-5 padding-right-0\">\n <div class=\"AccentBar bg-rating-1\">\n </div>\n </td>\n <td>Poor</td>\n <td>15%</td>\n </tr>\n <tr>\n <td class=\"align-center width-5 padding-right-0\">\n <div class=\"AccentBar bg-rating-2\">\n </div>\n </td>\n <td>Below Average</td>\n <td>20%</td>\n </tr>\n <tr>\n <td class=\"align-center width-5 padding-right-0\">\n <div class=\"AccentBar bg-rating-3\">\n </div>\n </td>\n <td>Average</td>\n <td>25%</td>\n </tr>\n <tr>\n <td class=\"align-center width-5 padding-right-0\">\n <div class=\"AccentBar bg-rating-4\">\n </div>\n </td>\n <td>Good</td>\n <td>15%</td>\n </tr>\n <tr>\n <td class=\"align-center width-5 padding-right-0\">\n <div class=\"AccentBar bg-rating-5\">\n </div>\n </td>\n <td>Excellent</td>\n <td>25%</td>\n </tr>\n </tbody>\n </table>\n</div>"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"label": "Props",
|
|
127
|
+
"language": "json",
|
|
128
|
+
"code": null,
|
|
129
|
+
"props": [
|
|
130
|
+
{
|
|
131
|
+
"heading": null,
|
|
132
|
+
"rows": [
|
|
133
|
+
{
|
|
134
|
+
"name": "color",
|
|
135
|
+
"type": "string",
|
|
136
|
+
"default": "bg-secondary",
|
|
137
|
+
"description": "Defines the color by setting it to a UIKIT bg-<name> class name."
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "circle",
|
|
141
|
+
"type": "boolean",
|
|
142
|
+
"default": "false",
|
|
143
|
+
"description": "Defines if the element is rendered as a stretching bar or just a centered circle."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "className",
|
|
147
|
+
"type": "string",
|
|
148
|
+
"default": "",
|
|
149
|
+
"description": "Additional class names passed to the actual element."
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"caption": "Example 4",
|
|
159
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"table-responsive max-width-600\"><table class=\"table\"><thead><tr><th>Risk level</th><th>Reason</th><th>Suggested action</th></tr></thead><tbody><tr><td><div class=\"display-flex align-items-center\"><div class=\"AccentBar AccentBarCircle bg-success\"></div>Low risk</div></td><td>Stable weather conditions</td><td>Monitor</td></tr><tr><td><div class=\"display-flex align-items-center\"><div class=\"AccentBar AccentBarCircle bg-warning\"></div>High risk</div></td><td>Labor strike at destination</td><td>Reroute shipment</td></tr><tr><td><div class=\"display-flex align-items-center\"><div class=\"AccentBar AccentBarCircle bg-danger\"></div>Critical risk</div></td><td>Customs hold & inspection</td><td>Expedite clearance</td></tr></tbody></table></div></div>",
|
|
160
|
+
"tabs": [
|
|
161
|
+
{
|
|
162
|
+
"label": "React",
|
|
163
|
+
"language": "tsx",
|
|
164
|
+
"code": "import AccentBar from '@rio-cloud/rio-uikit/AccentBar';\n\nconst data = [\n { id: 1, riskLevel: 'Low risk', reason: 'Stable weather conditions', action: 'Monitor' },\n { id: 3, riskLevel: 'High risk', reason: 'Labor strike at destination', action: 'Reroute shipment' },\n { id: 4, riskLevel: 'Critical risk', reason: 'Customs hold & inspection', action: 'Expedite clearance' },\n];\n\nexport default () => {\n return (\n <div className='table-responsive max-width-600'>\n <table className='table'>\n <thead>\n <tr>\n <th>Risk level</th>\n <th>Reason</th>\n <th>Suggested action</th>\n </tr>\n </thead>\n <tbody>\n {data.map(row => (\n <tr key={row.id}>\n <td>\n <AccentBar color={getRiskColor(row.riskLevel)} circle>\n {row.riskLevel}\n </AccentBar>\n </td>\n <td>{row.reason}</td>\n <td>{row.action}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n );\n};\n\nconst getRiskColor = (riskLevel: string) => {\n switch (riskLevel) {\n case 'Low risk':\n return 'bg-success';\n case 'High risk':\n return 'bg-warning';\n case 'Critical risk':\n return 'bg-danger';\n default:\n return 'bg-secondary';\n }\n};"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"label": "HTML",
|
|
168
|
+
"language": "html",
|
|
169
|
+
"code": "<div class=\"table-responsive max-width-600\">\n <table class=\"table\">\n <thead>\n <tr>\n <th>Risk level</th>\n <th>Reason</th>\n <th>Suggested action</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <div class=\"display-flex align-items-center\">\n <div class=\"AccentBar AccentBarCircle bg-success\">\n </div>Low risk\n </div>\n </td>\n <td>Stable weather conditions</td>\n <td>Monitor</td>\n </tr>\n <tr>\n <td>\n <div class=\"display-flex align-items-center\">\n <div class=\"AccentBar AccentBarCircle bg-warning\">\n </div>High risk\n </div>\n </td>\n <td>Labor strike at destination</td>\n <td>Reroute shipment</td>\n </tr>\n <tr>\n <td>\n <div class=\"display-flex align-items-center\">\n <div class=\"AccentBar AccentBarCircle bg-danger\">\n </div>Critical risk\n </div>\n </td>\n <td>Customs hold & inspection</td>\n <td>Expedite clearance</td>\n </tr>\n </tbody>\n </table>\n</div>"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"label": "Props",
|
|
173
|
+
"language": "json",
|
|
174
|
+
"code": null,
|
|
175
|
+
"props": [
|
|
176
|
+
{
|
|
177
|
+
"heading": null,
|
|
178
|
+
"rows": [
|
|
179
|
+
{
|
|
180
|
+
"name": "color",
|
|
181
|
+
"type": "string",
|
|
182
|
+
"default": "bg-secondary",
|
|
183
|
+
"description": "Defines the color by setting it to a UIKIT bg-<name> class name."
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "circle",
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"default": "false",
|
|
189
|
+
"description": "Defines if the element is rendered as a stretching bar or just a centered circle."
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "className",
|
|
193
|
+
"type": "string",
|
|
194
|
+
"default": "",
|
|
195
|
+
"description": "Additional class names passed to the actual element."
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"see_also": []
|
|
207
|
+
}
|