@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,1105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"captured_at": "2025-11-21T12:07:18.242Z",
|
|
4
|
+
"source": "https://uikit.developers.rio.cloud/#components/radiobutton",
|
|
5
|
+
"category": "Components",
|
|
6
|
+
"section": "Interaction",
|
|
7
|
+
"slug": "components/radiobutton",
|
|
8
|
+
"version": "v1.13.2",
|
|
9
|
+
"hash_algorithm": "sha256",
|
|
10
|
+
"hash": "85852fad58c92572865d3942c41a4f1d17c3cfe57d2300c29b47b87406f242c3"
|
|
11
|
+
},
|
|
12
|
+
"title": "RadioButton",
|
|
13
|
+
"lead": null,
|
|
14
|
+
"content": [
|
|
15
|
+
{
|
|
16
|
+
"heading": "RadioButton",
|
|
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><div><label id=\"optionsRadios1\" class=\"radio\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radios\" value=\"option1\" checked=\"\"><span class=\"radio-text\"><span>Option one is selected by default</span></span></label></div><div><label id=\"optionsRadios2\" class=\"radio\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radios\" value=\"option2\"><span class=\"radio-text\"><span>Option two can be something else and selecting it will deselect option one</span></span></label></div><div><label id=\"optionsRadios3\" class=\"radio\" tabindex=\"0\"><input type=\"radio\" disabled=\"\" class=\"\" name=\"radios\" value=\"option3\"><span class=\"radio-text\"><span>Option three is disabled</span></span></label></div><hr><div><label id=\"1\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radiosInline\" value=\"\"><span class=\"radio-text\"><span>1</span></span></label><label id=\"2\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radiosInline\" value=\"\"><span class=\"radio-text\"><span>2</span></span></label><label id=\"3\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radiosInline\" value=\"\"><span class=\"radio-text\"><span>3</span></span></label></div><hr><div><label id=\"km\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"icon-right\" name=\"radiosRight\" value=\"\"><span class=\"radio-text\"><span>Km</span></span></label></div><div><label id=\"miles\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"icon-right\" name=\"radiosRight\" value=\"\"><span class=\"radio-text\"><span>Miles</span></span></label></div></div></div>",
|
|
22
|
+
"tabs": [
|
|
23
|
+
{
|
|
24
|
+
"label": "React",
|
|
25
|
+
"language": "tsx",
|
|
26
|
+
"code": "import RadioButton from '@rio-cloud/rio-uikit/RadioButton';\n\nexport default () => (\n <div>\n <div>\n <RadioButton name='radios' id='optionsRadios1' value='option1' defaultChecked>\n Option one is selected by default\n </RadioButton>\n </div>\n <div>\n <RadioButton name='radios' id='optionsRadios2' value='option2'>\n Option two can be something else and selecting it will deselect option one\n </RadioButton>\n </div>\n <div>\n <RadioButton name='radios' id='optionsRadios3' value='option3' disabled>\n Option three is disabled\n </RadioButton>\n </div>\n\n <hr />\n\n <div>\n <RadioButton name='radiosInline' id='1' inline>\n 1\n </RadioButton>\n <RadioButton name='radiosInline' id='2' inline>\n 2\n </RadioButton>\n <RadioButton name='radiosInline' id='3' inline>\n 3\n </RadioButton>\n </div>\n\n <hr />\n\n <div>\n <RadioButton name='radiosRight' id='km' right inline>\n Km\n </RadioButton>\n </div>\n <div>\n <RadioButton name='radiosRight' id='miles' right inline>\n Miles\n </RadioButton>\n </div>\n </div>\n);"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"label": "HTML",
|
|
30
|
+
"language": "html",
|
|
31
|
+
"code": "<div>\n <div>\n <label id=\"optionsRadios1\" class=\"radio\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radios\" value=\"option1\" checked=\"\">\n <span class=\"radio-text\">\n <span>Option one is selected by default</span>\n </span>\n </label>\n </div>\n <div>\n <label id=\"optionsRadios2\" class=\"radio\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radios\" value=\"option2\">\n <span class=\"radio-text\">\n <span>Option two can be something else and selecting it will deselect option one</span>\n </span>\n </label>\n </div>\n <div>\n <label id=\"optionsRadios3\" class=\"radio\" tabindex=\"0\">\n <input type=\"radio\" disabled=\"\" class=\"\" name=\"radios\" value=\"option3\">\n <span class=\"radio-text\">\n <span>Option three is disabled</span>\n </span>\n </label>\n </div>\n <hr>\n <div>\n <label id=\"1\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radiosInline\" value=\"\">\n <span class=\"radio-text\">\n <span>1</span>\n </span>\n </label>\n <label id=\"2\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radiosInline\" value=\"\">\n <span class=\"radio-text\">\n <span>2</span>\n </span>\n </label>\n <label id=\"3\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radiosInline\" value=\"\">\n <span class=\"radio-text\">\n <span>3</span>\n </span>\n </label>\n </div>\n <hr>\n <div>\n <label id=\"km\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"icon-right\" name=\"radiosRight\" value=\"\">\n <span class=\"radio-text\">\n <span>Km</span>\n </span>\n </label>\n </div>\n <div>\n <label id=\"miles\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"icon-right\" name=\"radiosRight\" value=\"\">\n <span class=\"radio-text\">\n <span>Miles</span>\n </span>\n </label>\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": "label",
|
|
43
|
+
"type": "String / Node",
|
|
44
|
+
"default": "",
|
|
45
|
+
"description": "Defines the label text."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "defaultChecked",
|
|
49
|
+
"type": "Boolean",
|
|
50
|
+
"default": "",
|
|
51
|
+
"description": "Defines whether the radio is initially checked or not (state can be changed on click)."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "checked",
|
|
55
|
+
"type": "Boolean",
|
|
56
|
+
"default": "",
|
|
57
|
+
"description": "Defines whether the radio is checked or not (for controlled usage)."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "disabled",
|
|
61
|
+
"type": "Boolean",
|
|
62
|
+
"default": "false",
|
|
63
|
+
"description": "Defines whether the checkbox is disabled or not."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "inline",
|
|
67
|
+
"type": "Boolean",
|
|
68
|
+
"default": "false",
|
|
69
|
+
"description": "Defines whether the radio button is applying an inline style. Use this in combinationwith other radio buttons."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "right",
|
|
73
|
+
"type": "Boolean",
|
|
74
|
+
"default": "false",
|
|
75
|
+
"description": "Displays the icon on the right side of the text."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "custom",
|
|
79
|
+
"type": "Boolean",
|
|
80
|
+
"default": "false",
|
|
81
|
+
"description": "Allows for rendering a completely different layout with or without a radio tick."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "tabIndex",
|
|
85
|
+
"type": "Number",
|
|
86
|
+
"default": "0",
|
|
87
|
+
"description": "The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "inputRef",
|
|
91
|
+
"type": "Ref",
|
|
92
|
+
"default": "",
|
|
93
|
+
"description": "Ref which is added to the input element."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "onClick",
|
|
97
|
+
"type": "Function",
|
|
98
|
+
"default": "() => {}",
|
|
99
|
+
"description": "Callback function that is invoked when the radio button is clicked."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "onChange",
|
|
103
|
+
"type": "Function",
|
|
104
|
+
"default": "() => {}",
|
|
105
|
+
"description": "Callback function that is invoked when the radio button is clicked and the state changes (for controlled usage)."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "className",
|
|
109
|
+
"type": "String",
|
|
110
|
+
"default": "",
|
|
111
|
+
"description": "Additional classes to be set on the input element."
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "children",
|
|
115
|
+
"type": "any",
|
|
116
|
+
"default": "",
|
|
117
|
+
"description": "Any element to be rendered inside the text element."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "icon",
|
|
121
|
+
"type": "String",
|
|
122
|
+
"default": "",
|
|
123
|
+
"description": "Define any rioglyph icon like \"rioglyph-truck\"."
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "iconSize",
|
|
127
|
+
"type": "Number",
|
|
128
|
+
"default": "",
|
|
129
|
+
"description": "The icon Size in px."
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "name",
|
|
133
|
+
"type": "String",
|
|
134
|
+
"default": "",
|
|
135
|
+
"description": "Name to be given to the input element."
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "iconLabelPosition",
|
|
139
|
+
"type": "String",
|
|
140
|
+
"default": "",
|
|
141
|
+
"description": "The label position. Possible values are: \"horizontal\" or \"vertical\"."
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"heading": "Controlled example",
|
|
153
|
+
"body": "",
|
|
154
|
+
"examples": [
|
|
155
|
+
{
|
|
156
|
+
"caption": "Example 2",
|
|
157
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div><label class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radioGroup\" value=\"\" checked=\"\"><span class=\"radio-text\"><span>Option 1</span></span></label><label class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radioGroup\" value=\"\"><span class=\"radio-text\"><span>Option 2</span></span></label><label class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radioGroup\" value=\"\"><span class=\"radio-text\"><span>Option 3</span></span></label></div></div>",
|
|
158
|
+
"tabs": [
|
|
159
|
+
{
|
|
160
|
+
"label": "React",
|
|
161
|
+
"language": "tsx",
|
|
162
|
+
"code": "import { useState } from 'react';\n\nimport RadioButton from '@rio-cloud/rio-uikit/RadioButton';\n\nexport default () => {\n const [selectedOption, setSelectedOption] = useState(1);\n\n return (\n <div>\n <RadioButton name='radioGroup' onChange={() => setSelectedOption(1)} checked={selectedOption === 1} inline>\n Option 1\n </RadioButton>\n\n <RadioButton name='radioGroup' onChange={() => setSelectedOption(2)} checked={selectedOption === 2} inline>\n Option 2\n </RadioButton>\n\n <RadioButton name='radioGroup' onChange={() => setSelectedOption(3)} checked={selectedOption === 3} inline>\n Option 3\n </RadioButton>\n </div>\n );\n};"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"label": "HTML",
|
|
166
|
+
"language": "html",
|
|
167
|
+
"code": "<div>\n <label class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radioGroup\" value=\"\" checked=\"\">\n <span class=\"radio-text\">\n <span>Option 1</span>\n </span>\n </label>\n <label class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radioGroup\" value=\"\">\n <span class=\"radio-text\">\n <span>Option 2</span>\n </span>\n </label>\n <label class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radioGroup\" value=\"\">\n <span class=\"radio-text\">\n <span>Option 3</span>\n </span>\n </label>\n</div>"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"label": "Props",
|
|
171
|
+
"language": "json",
|
|
172
|
+
"code": null,
|
|
173
|
+
"props": [
|
|
174
|
+
{
|
|
175
|
+
"heading": null,
|
|
176
|
+
"rows": [
|
|
177
|
+
{
|
|
178
|
+
"name": "label",
|
|
179
|
+
"type": "String / Node",
|
|
180
|
+
"default": "",
|
|
181
|
+
"description": "Defines the label text."
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "defaultChecked",
|
|
185
|
+
"type": "Boolean",
|
|
186
|
+
"default": "",
|
|
187
|
+
"description": "Defines whether the radio is initially checked or not (state can be changed on click)."
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "checked",
|
|
191
|
+
"type": "Boolean",
|
|
192
|
+
"default": "",
|
|
193
|
+
"description": "Defines whether the radio is checked or not (for controlled usage)."
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "disabled",
|
|
197
|
+
"type": "Boolean",
|
|
198
|
+
"default": "false",
|
|
199
|
+
"description": "Defines whether the checkbox is disabled or not."
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "inline",
|
|
203
|
+
"type": "Boolean",
|
|
204
|
+
"default": "false",
|
|
205
|
+
"description": "Defines whether the radio button is applying an inline style. Use this in combinationwith other radio buttons."
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "right",
|
|
209
|
+
"type": "Boolean",
|
|
210
|
+
"default": "false",
|
|
211
|
+
"description": "Displays the icon on the right side of the text."
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "custom",
|
|
215
|
+
"type": "Boolean",
|
|
216
|
+
"default": "false",
|
|
217
|
+
"description": "Allows for rendering a completely different layout with or without a radio tick."
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "tabIndex",
|
|
221
|
+
"type": "Number",
|
|
222
|
+
"default": "0",
|
|
223
|
+
"description": "The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "inputRef",
|
|
227
|
+
"type": "Ref",
|
|
228
|
+
"default": "",
|
|
229
|
+
"description": "Ref which is added to the input element."
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"name": "onClick",
|
|
233
|
+
"type": "Function",
|
|
234
|
+
"default": "() => {}",
|
|
235
|
+
"description": "Callback function that is invoked when the radio button is clicked."
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "onChange",
|
|
239
|
+
"type": "Function",
|
|
240
|
+
"default": "() => {}",
|
|
241
|
+
"description": "Callback function that is invoked when the radio button is clicked and the state changes (for controlled usage)."
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "className",
|
|
245
|
+
"type": "String",
|
|
246
|
+
"default": "",
|
|
247
|
+
"description": "Additional classes to be set on the input element."
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "children",
|
|
251
|
+
"type": "any",
|
|
252
|
+
"default": "",
|
|
253
|
+
"description": "Any element to be rendered inside the text element."
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "icon",
|
|
257
|
+
"type": "String",
|
|
258
|
+
"default": "",
|
|
259
|
+
"description": "Define any rioglyph icon like \"rioglyph-truck\"."
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "iconSize",
|
|
263
|
+
"type": "Number",
|
|
264
|
+
"default": "",
|
|
265
|
+
"description": "The icon Size in px."
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "name",
|
|
269
|
+
"type": "String",
|
|
270
|
+
"default": "",
|
|
271
|
+
"description": "Name to be given to the input element."
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "iconLabelPosition",
|
|
275
|
+
"type": "String",
|
|
276
|
+
"default": "",
|
|
277
|
+
"description": "The label position. Possible values are: \"horizontal\" or \"vertical\"."
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"heading": "RadioButton with FormData",
|
|
289
|
+
"body": "",
|
|
290
|
+
"examples": [
|
|
291
|
+
{
|
|
292
|
+
"caption": "Example 3",
|
|
293
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"display-flex gap-20\"><form class=\"well border rounded bg-lightest width-300 max-width-300\"><label>Please contact me via</label><div><label class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"contactOptions\" value=\"email\"><span class=\"radio-text\"><span>Email</span></span></label><label class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"contactOptions\" value=\"phone\"><span class=\"radio-text\"><span>Phone</span></span></label></div><button type=\"submit\" class=\"btn btn-default btn-component margin-top-20\" tabindex=\"0\">Submit selection</button></form><div><label>Selected value</label><div>-</div></div></div></div>",
|
|
294
|
+
"tabs": [
|
|
295
|
+
{
|
|
296
|
+
"label": "React",
|
|
297
|
+
"language": "tsx",
|
|
298
|
+
"code": "import { useState } from 'react';\n\nimport { Button } from '@rio-cloud/rio-uikit';\nimport RadioButton from '@rio-cloud/rio-uikit/RadioButton';\n\nexport default () => {\n const [selectedValue, setSelectedValue] = useState('-');\n\n const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {\n // avoid page reload on submit\n event.preventDefault();\n\n const formData = new FormData(event.target as HTMLFormElement);\n const entries = Object.fromEntries(formData.entries());\n console.log(entries);\n\n setSelectedValue(entries.contactOptions as string);\n };\n\n return (\n <div className='display-flex gap-20'>\n <form className='well border rounded bg-lightest width-300 max-width-300' onSubmit={handleSubmit}>\n <label>Please contact me via</label>\n <div>\n <RadioButton name='contactOptions' value='email' inline>\n Email\n </RadioButton>\n <RadioButton name='contactOptions' value='phone' inline>\n Phone\n </RadioButton>\n </div>\n <Button className='margin-top-20' type='submit'>\n Submit selection\n </Button>\n </form>\n <div>\n <label>Selected value</label>\n <div>{selectedValue ?? 'Nothing selected'}</div>\n </div>\n </div>\n );\n};"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"label": "HTML",
|
|
302
|
+
"language": "html",
|
|
303
|
+
"code": "<div class=\"display-flex gap-20\">\n <form class=\"well border rounded bg-lightest width-300 max-width-300\">\n <label>Please contact me via</label>\n <div>\n <label class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"contactOptions\" value=\"email\">\n <span class=\"radio-text\">\n <span>Email</span>\n </span>\n </label>\n <label class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"contactOptions\" value=\"phone\">\n <span class=\"radio-text\">\n <span>Phone</span>\n </span>\n </label>\n </div>\n <button type=\"submit\" class=\"btn btn-default btn-component margin-top-20\" tabindex=\"0\">Submit selection</button>\n </form>\n <div>\n <label>Selected value</label>\n <div>-</div>\n </div>\n</div>"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"label": "Props",
|
|
307
|
+
"language": "json",
|
|
308
|
+
"code": null,
|
|
309
|
+
"props": [
|
|
310
|
+
{
|
|
311
|
+
"heading": null,
|
|
312
|
+
"rows": [
|
|
313
|
+
{
|
|
314
|
+
"name": "label",
|
|
315
|
+
"type": "String / Node",
|
|
316
|
+
"default": "",
|
|
317
|
+
"description": "Defines the label text."
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "defaultChecked",
|
|
321
|
+
"type": "Boolean",
|
|
322
|
+
"default": "",
|
|
323
|
+
"description": "Defines whether the radio is initially checked or not (state can be changed on click)."
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "checked",
|
|
327
|
+
"type": "Boolean",
|
|
328
|
+
"default": "",
|
|
329
|
+
"description": "Defines whether the radio is checked or not (for controlled usage)."
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "disabled",
|
|
333
|
+
"type": "Boolean",
|
|
334
|
+
"default": "false",
|
|
335
|
+
"description": "Defines whether the checkbox is disabled or not."
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "inline",
|
|
339
|
+
"type": "Boolean",
|
|
340
|
+
"default": "false",
|
|
341
|
+
"description": "Defines whether the radio button is applying an inline style. Use this in combinationwith other radio buttons."
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "right",
|
|
345
|
+
"type": "Boolean",
|
|
346
|
+
"default": "false",
|
|
347
|
+
"description": "Displays the icon on the right side of the text."
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"name": "custom",
|
|
351
|
+
"type": "Boolean",
|
|
352
|
+
"default": "false",
|
|
353
|
+
"description": "Allows for rendering a completely different layout with or without a radio tick."
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "tabIndex",
|
|
357
|
+
"type": "Number",
|
|
358
|
+
"default": "0",
|
|
359
|
+
"description": "The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "inputRef",
|
|
363
|
+
"type": "Ref",
|
|
364
|
+
"default": "",
|
|
365
|
+
"description": "Ref which is added to the input element."
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"name": "onClick",
|
|
369
|
+
"type": "Function",
|
|
370
|
+
"default": "() => {}",
|
|
371
|
+
"description": "Callback function that is invoked when the radio button is clicked."
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "onChange",
|
|
375
|
+
"type": "Function",
|
|
376
|
+
"default": "() => {}",
|
|
377
|
+
"description": "Callback function that is invoked when the radio button is clicked and the state changes (for controlled usage)."
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"name": "className",
|
|
381
|
+
"type": "String",
|
|
382
|
+
"default": "",
|
|
383
|
+
"description": "Additional classes to be set on the input element."
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "children",
|
|
387
|
+
"type": "any",
|
|
388
|
+
"default": "",
|
|
389
|
+
"description": "Any element to be rendered inside the text element."
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"name": "icon",
|
|
393
|
+
"type": "String",
|
|
394
|
+
"default": "",
|
|
395
|
+
"description": "Define any rioglyph icon like \"rioglyph-truck\"."
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"name": "iconSize",
|
|
399
|
+
"type": "Number",
|
|
400
|
+
"default": "",
|
|
401
|
+
"description": "The icon Size in px."
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"name": "name",
|
|
405
|
+
"type": "String",
|
|
406
|
+
"default": "",
|
|
407
|
+
"description": "Name to be given to the input element."
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"name": "iconLabelPosition",
|
|
411
|
+
"type": "String",
|
|
412
|
+
"default": "",
|
|
413
|
+
"description": "The label position. Possible values are: \"horizontal\" or \"vertical\"."
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
]
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"heading": "Custom cards example",
|
|
425
|
+
"body": "> Note: NoteWhen using the custom option, make sure to wrap the children with the class name radio-text-wrapper. For using the radio tick, use an element with class name radio-text.",
|
|
426
|
+
"examples": [
|
|
427
|
+
{
|
|
428
|
+
"caption": "This option is a first option",
|
|
429
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"display-flex gap-15\"><label class=\"radio padding-15 border rounded border-color-highlight\" tabindex=\"0\"><input type=\"radio\" class=\"padding-15 border rounded border-color-highlight\" name=\"radioBox\" value=\"\" checked=\"\"><div class=\"radio-text-wrapper display-flex\"><div class=\"radio-text\"></div><div class=\"margin-left-5 margin-right-5\"><div class=\"text-medium\">Option 1</div><div class=\"text-color-dark\">This option is a first option</div></div></div></label><label class=\"radio padding-15 border rounded \" tabindex=\"0\"><input type=\"radio\" class=\"padding-15 border rounded \" name=\"radioBox\" value=\"\"><div class=\"radio-text-wrapper display-flex\"><div class=\"radio-text\"></div><div class=\"margin-left-5 margin-right-5\"><div class=\"text-medium\">Option 2</div><div class=\"text-color-dark\">This option is a second option</div></div></div></label><label class=\"radio padding-15 border rounded \" tabindex=\"0\"><input type=\"radio\" class=\"padding-15 border rounded \" name=\"radioBox\" value=\"\"><div class=\"radio-text-wrapper display-flex\"><div class=\"radio-text\"></div><div class=\"margin-left-5 margin-right-5\"><div class=\"text-medium\">Option 3</div><div class=\"text-color-dark\">This option is a third option</div></div></div></label></div></div>",
|
|
430
|
+
"tabs": [
|
|
431
|
+
{
|
|
432
|
+
"label": "React",
|
|
433
|
+
"language": "tsx",
|
|
434
|
+
"code": "import { useState } from 'react';\n\nimport RadioButton from '@rio-cloud/rio-uikit/RadioButton';\n\nconst getRadioClasses = (isSelected: boolean) =>\n `padding-15 border rounded ${isSelected ? 'border-color-highlight' : ''}`;\n\nexport default () => {\n const [selectedOption, setSelectedOption] = useState(1);\n\n return (\n <div className='display-flex gap-15'>\n <RadioButton\n name='radioBox'\n custom\n className={getRadioClasses(selectedOption === 1)}\n onChange={() => setSelectedOption(1)}\n checked={selectedOption === 1}\n >\n <div className='radio-text-wrapper display-flex'>\n <div className='radio-text' />\n <div className='margin-left-5 margin-right-5'>\n <div className='text-medium'>Option 1</div>\n <div className='text-color-dark'>This option is a first option</div>\n </div>\n </div>\n </RadioButton>\n\n <RadioButton\n name='radioBox'\n custom\n className={getRadioClasses(selectedOption === 2)}\n onChange={() => setSelectedOption(2)}\n checked={selectedOption === 2}\n >\n <div className='radio-text-wrapper display-flex'>\n <div className='radio-text' />\n <div className='margin-left-5 margin-right-5'>\n <div className='text-medium'>Option 2</div>\n <div className='text-color-dark'>This option is a second option</div>\n </div>\n </div>\n </RadioButton>\n\n <RadioButton\n name='radioBox'\n custom\n className={getRadioClasses(selectedOption === 3)}\n onChange={() => setSelectedOption(3)}\n checked={selectedOption === 3}\n >\n <div className='radio-text-wrapper display-flex'>\n <div className='radio-text' />\n <div className='margin-left-5 margin-right-5'>\n <div className='text-medium'>Option 3</div>\n <div className='text-color-dark'>This option is a third option</div>\n </div>\n </div>\n </RadioButton>\n </div>\n );\n};"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"label": "HTML",
|
|
438
|
+
"language": "html",
|
|
439
|
+
"code": "<div class=\"display-flex gap-15\">\n <label class=\"radio padding-15 border rounded border-color-highlight\" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-15 border rounded border-color-highlight\" name=\"radioBox\" value=\"\" checked=\"\">\n <div class=\"radio-text-wrapper display-flex\">\n <div class=\"radio-text\">\n </div>\n <div class=\"margin-left-5 margin-right-5\">\n <div class=\"text-medium\">Option 1</div>\n <div class=\"text-color-dark\">This option is a first option</div>\n </div>\n </div>\n </label>\n <label class=\"radio padding-15 border rounded \" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-15 border rounded \" name=\"radioBox\" value=\"\">\n <div class=\"radio-text-wrapper display-flex\">\n <div class=\"radio-text\">\n </div>\n <div class=\"margin-left-5 margin-right-5\">\n <div class=\"text-medium\">Option 2</div>\n <div class=\"text-color-dark\">This option is a second option</div>\n </div>\n </div>\n </label>\n <label class=\"radio padding-15 border rounded \" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-15 border rounded \" name=\"radioBox\" value=\"\">\n <div class=\"radio-text-wrapper display-flex\">\n <div class=\"radio-text\">\n </div>\n <div class=\"margin-left-5 margin-right-5\">\n <div class=\"text-medium\">Option 3</div>\n <div class=\"text-color-dark\">This option is a third option</div>\n </div>\n </div>\n </label>\n</div>"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"label": "Props",
|
|
443
|
+
"language": "json",
|
|
444
|
+
"code": null,
|
|
445
|
+
"props": [
|
|
446
|
+
{
|
|
447
|
+
"heading": null,
|
|
448
|
+
"rows": [
|
|
449
|
+
{
|
|
450
|
+
"name": "label",
|
|
451
|
+
"type": "String / Node",
|
|
452
|
+
"default": "",
|
|
453
|
+
"description": "Defines the label text."
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "defaultChecked",
|
|
457
|
+
"type": "Boolean",
|
|
458
|
+
"default": "",
|
|
459
|
+
"description": "Defines whether the radio is initially checked or not (state can be changed on click)."
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "checked",
|
|
463
|
+
"type": "Boolean",
|
|
464
|
+
"default": "",
|
|
465
|
+
"description": "Defines whether the radio is checked or not (for controlled usage)."
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "disabled",
|
|
469
|
+
"type": "Boolean",
|
|
470
|
+
"default": "false",
|
|
471
|
+
"description": "Defines whether the checkbox is disabled or not."
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"name": "inline",
|
|
475
|
+
"type": "Boolean",
|
|
476
|
+
"default": "false",
|
|
477
|
+
"description": "Defines whether the radio button is applying an inline style. Use this in combinationwith other radio buttons."
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"name": "right",
|
|
481
|
+
"type": "Boolean",
|
|
482
|
+
"default": "false",
|
|
483
|
+
"description": "Displays the icon on the right side of the text."
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"name": "custom",
|
|
487
|
+
"type": "Boolean",
|
|
488
|
+
"default": "false",
|
|
489
|
+
"description": "Allows for rendering a completely different layout with or without a radio tick."
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"name": "tabIndex",
|
|
493
|
+
"type": "Number",
|
|
494
|
+
"default": "0",
|
|
495
|
+
"description": "The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"name": "inputRef",
|
|
499
|
+
"type": "Ref",
|
|
500
|
+
"default": "",
|
|
501
|
+
"description": "Ref which is added to the input element."
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "onClick",
|
|
505
|
+
"type": "Function",
|
|
506
|
+
"default": "() => {}",
|
|
507
|
+
"description": "Callback function that is invoked when the radio button is clicked."
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"name": "onChange",
|
|
511
|
+
"type": "Function",
|
|
512
|
+
"default": "() => {}",
|
|
513
|
+
"description": "Callback function that is invoked when the radio button is clicked and the state changes (for controlled usage)."
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"name": "className",
|
|
517
|
+
"type": "String",
|
|
518
|
+
"default": "",
|
|
519
|
+
"description": "Additional classes to be set on the input element."
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"name": "children",
|
|
523
|
+
"type": "any",
|
|
524
|
+
"default": "",
|
|
525
|
+
"description": "Any element to be rendered inside the text element."
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"name": "icon",
|
|
529
|
+
"type": "String",
|
|
530
|
+
"default": "",
|
|
531
|
+
"description": "Define any rioglyph icon like \"rioglyph-truck\"."
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"name": "iconSize",
|
|
535
|
+
"type": "Number",
|
|
536
|
+
"default": "",
|
|
537
|
+
"description": "The icon Size in px."
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"name": "name",
|
|
541
|
+
"type": "String",
|
|
542
|
+
"default": "",
|
|
543
|
+
"description": "Name to be given to the input element."
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"name": "iconLabelPosition",
|
|
547
|
+
"type": "String",
|
|
548
|
+
"default": "",
|
|
549
|
+
"description": "The label position. Possible values are: \"horizontal\" or \"vertical\"."
|
|
550
|
+
}
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
]
|
|
554
|
+
}
|
|
555
|
+
]
|
|
556
|
+
}
|
|
557
|
+
]
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"heading": "Custom stacked example",
|
|
561
|
+
"body": "",
|
|
562
|
+
"examples": [
|
|
563
|
+
{
|
|
564
|
+
"caption": "This option is a first option",
|
|
565
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"display-flex flex-column\"><label class=\"radio padding-15 rounded-top-left rounded-top-right border border-color-highlight bg-highlight-decent z-index-1\" tabindex=\"0\"><input type=\"radio\" class=\"padding-15 rounded-top-left rounded-top-right border border-color-highlight bg-highlight-decent z-index-1\" name=\"stackedRadioBoxes\" value=\"\" checked=\"\"><div class=\"radio-text-wrapper display-flex\"><span class=\"radio-text\"></span><div class=\"margin-left-5 margin-right-5\"><div class=\"text-medium\">Option 1</div><div class=\"text-color-dark\">This option is a first option</div></div></div></label><label class=\"radio padding-15 margin-top--1 border \" tabindex=\"0\"><input type=\"radio\" disabled=\"\" class=\"padding-15 margin-top--1 border \" name=\"stackedRadioBoxes\" value=\"\"><div class=\"radio-text-wrapper display-flex\"><span class=\"radio-text\"></span><div class=\"margin-left-5 margin-right-5\"><div class=\"text-medium\">Option 2 (disabled)</div><div class=\"text-color-dark\">This option is a second option</div></div></div></label><label class=\"radio padding-15 margin-top--1 rounded-bottom-left rounded-bottom-right border \" tabindex=\"0\"><input type=\"radio\" class=\"padding-15 margin-top--1 rounded-bottom-left rounded-bottom-right border \" name=\"stackedRadioBoxes\" value=\"\"><div class=\"radio-text-wrapper display-flex\"><span class=\"radio-text\"></span><div class=\"margin-left-5 margin-right-5\"><div class=\"text-medium\">Option 3</div><div class=\"text-color-dark\">This option is a third option</div></div></div></label></div></div>",
|
|
566
|
+
"tabs": [
|
|
567
|
+
{
|
|
568
|
+
"label": "React",
|
|
569
|
+
"language": "tsx",
|
|
570
|
+
"code": "import { useState } from 'react';\n\nimport RadioButton from '@rio-cloud/rio-uikit/RadioButton';\n\nconst getSelectedClass = (isSelected: boolean) =>\n isSelected ? 'border-color-highlight bg-highlight-decent z-index-1' : '';\n\nexport default () => {\n const [selectedOption, setSelectedOption] = useState(1);\n\n return (\n <div className='display-flex flex-column'>\n <RadioButton\n name='stackedRadioBoxes'\n custom\n className={`padding-15 rounded-top-left rounded-top-right border ${getSelectedClass(\n selectedOption === 1\n )}`}\n onChange={() => setSelectedOption(1)}\n checked={selectedOption === 1}\n >\n <div className='radio-text-wrapper display-flex'>\n <span className='radio-text' />\n <div className='margin-left-5 margin-right-5'>\n <div className='text-medium'>Option 1</div>\n <div className='text-color-dark'>This option is a first option</div>\n </div>\n </div>\n </RadioButton>\n\n <RadioButton\n name='stackedRadioBoxes'\n custom\n className={`padding-15 margin-top--1 border ${getSelectedClass(selectedOption === 2)}`}\n onChange={() => setSelectedOption(2)}\n checked={selectedOption === 2}\n disabled\n >\n <div className='radio-text-wrapper display-flex'>\n <span className='radio-text' />\n <div className='margin-left-5 margin-right-5'>\n <div className='text-medium'>Option 2 (disabled)</div>\n <div className='text-color-dark'>This option is a second option</div>\n </div>\n </div>\n </RadioButton>\n\n <RadioButton\n name='stackedRadioBoxes'\n custom\n className={`padding-15 margin-top--1 rounded-bottom-left rounded-bottom-right border ${getSelectedClass(\n selectedOption === 3\n )}`}\n onChange={() => setSelectedOption(3)}\n checked={selectedOption === 3}\n >\n <div className='radio-text-wrapper display-flex'>\n <span className='radio-text' />\n <div className='margin-left-5 margin-right-5'>\n <div className='text-medium'>Option 3</div>\n <div className='text-color-dark'>This option is a third option</div>\n </div>\n </div>\n </RadioButton>\n </div>\n );\n};"
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"label": "HTML",
|
|
574
|
+
"language": "html",
|
|
575
|
+
"code": "<div class=\"display-flex flex-column\">\n <label class=\"radio padding-15 rounded-top-left rounded-top-right border border-color-highlight bg-highlight-decent z-index-1\" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-15 rounded-top-left rounded-top-right border border-color-highlight bg-highlight-decent z-index-1\" name=\"stackedRadioBoxes\" value=\"\" checked=\"\">\n <div class=\"radio-text-wrapper display-flex\">\n <span class=\"radio-text\">\n </span>\n <div class=\"margin-left-5 margin-right-5\">\n <div class=\"text-medium\">Option 1</div>\n <div class=\"text-color-dark\">This option is a first option</div>\n </div>\n </div>\n </label>\n <label class=\"radio padding-15 margin-top--1 border \" tabindex=\"0\">\n <input type=\"radio\" disabled=\"\" class=\"padding-15 margin-top--1 border \" name=\"stackedRadioBoxes\" value=\"\">\n <div class=\"radio-text-wrapper display-flex\">\n <span class=\"radio-text\">\n </span>\n <div class=\"margin-left-5 margin-right-5\">\n <div class=\"text-medium\">Option 2 (disabled)</div>\n <div class=\"text-color-dark\">This option is a second option</div>\n </div>\n </div>\n </label>\n <label class=\"radio padding-15 margin-top--1 rounded-bottom-left rounded-bottom-right border \" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-15 margin-top--1 rounded-bottom-left rounded-bottom-right border \" name=\"stackedRadioBoxes\" value=\"\">\n <div class=\"radio-text-wrapper display-flex\">\n <span class=\"radio-text\">\n </span>\n <div class=\"margin-left-5 margin-right-5\">\n <div class=\"text-medium\">Option 3</div>\n <div class=\"text-color-dark\">This option is a third option</div>\n </div>\n </div>\n </label>\n</div>"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"label": "Props",
|
|
579
|
+
"language": "json",
|
|
580
|
+
"code": null,
|
|
581
|
+
"props": [
|
|
582
|
+
{
|
|
583
|
+
"heading": null,
|
|
584
|
+
"rows": [
|
|
585
|
+
{
|
|
586
|
+
"name": "label",
|
|
587
|
+
"type": "String / Node",
|
|
588
|
+
"default": "",
|
|
589
|
+
"description": "Defines the label text."
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"name": "defaultChecked",
|
|
593
|
+
"type": "Boolean",
|
|
594
|
+
"default": "",
|
|
595
|
+
"description": "Defines whether the radio is initially checked or not (state can be changed on click)."
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"name": "checked",
|
|
599
|
+
"type": "Boolean",
|
|
600
|
+
"default": "",
|
|
601
|
+
"description": "Defines whether the radio is checked or not (for controlled usage)."
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"name": "disabled",
|
|
605
|
+
"type": "Boolean",
|
|
606
|
+
"default": "false",
|
|
607
|
+
"description": "Defines whether the checkbox is disabled or not."
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"name": "inline",
|
|
611
|
+
"type": "Boolean",
|
|
612
|
+
"default": "false",
|
|
613
|
+
"description": "Defines whether the radio button is applying an inline style. Use this in combinationwith other radio buttons."
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "right",
|
|
617
|
+
"type": "Boolean",
|
|
618
|
+
"default": "false",
|
|
619
|
+
"description": "Displays the icon on the right side of the text."
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"name": "custom",
|
|
623
|
+
"type": "Boolean",
|
|
624
|
+
"default": "false",
|
|
625
|
+
"description": "Allows for rendering a completely different layout with or without a radio tick."
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"name": "tabIndex",
|
|
629
|
+
"type": "Number",
|
|
630
|
+
"default": "0",
|
|
631
|
+
"description": "The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"name": "inputRef",
|
|
635
|
+
"type": "Ref",
|
|
636
|
+
"default": "",
|
|
637
|
+
"description": "Ref which is added to the input element."
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"name": "onClick",
|
|
641
|
+
"type": "Function",
|
|
642
|
+
"default": "() => {}",
|
|
643
|
+
"description": "Callback function that is invoked when the radio button is clicked."
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"name": "onChange",
|
|
647
|
+
"type": "Function",
|
|
648
|
+
"default": "() => {}",
|
|
649
|
+
"description": "Callback function that is invoked when the radio button is clicked and the state changes (for controlled usage)."
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"name": "className",
|
|
653
|
+
"type": "String",
|
|
654
|
+
"default": "",
|
|
655
|
+
"description": "Additional classes to be set on the input element."
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"name": "children",
|
|
659
|
+
"type": "any",
|
|
660
|
+
"default": "",
|
|
661
|
+
"description": "Any element to be rendered inside the text element."
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"name": "icon",
|
|
665
|
+
"type": "String",
|
|
666
|
+
"default": "",
|
|
667
|
+
"description": "Define any rioglyph icon like \"rioglyph-truck\"."
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"name": "iconSize",
|
|
671
|
+
"type": "Number",
|
|
672
|
+
"default": "",
|
|
673
|
+
"description": "The icon Size in px."
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"name": "name",
|
|
677
|
+
"type": "String",
|
|
678
|
+
"default": "",
|
|
679
|
+
"description": "Name to be given to the input element."
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"name": "iconLabelPosition",
|
|
683
|
+
"type": "String",
|
|
684
|
+
"default": "",
|
|
685
|
+
"description": "The label position. Possible values are: \"horizontal\" or \"vertical\"."
|
|
686
|
+
}
|
|
687
|
+
]
|
|
688
|
+
}
|
|
689
|
+
]
|
|
690
|
+
}
|
|
691
|
+
]
|
|
692
|
+
}
|
|
693
|
+
]
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"heading": "Custom list example",
|
|
697
|
+
"body": "",
|
|
698
|
+
"examples": [
|
|
699
|
+
{
|
|
700
|
+
"caption": "Example 6",
|
|
701
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"display-flex flex-column width-200 margin-bottom-20\"><div class=\"text-medium\">Vehicle type</div><label class=\"radio padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" tabindex=\"0\"><input type=\"radio\" class=\"padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" name=\"listRadioBoxes\" value=\"\" checked=\"\"><div class=\"radio-text-wrapper display-flex justify-content-between\"><div class=\"text-size-16 text-color-darker\">Truck</div><div class=\"radio-text\"></div></div></label><label class=\"radio padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" tabindex=\"0\"><input type=\"radio\" class=\"padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" name=\"listRadioBoxes\" value=\"\"><div class=\"radio-text-wrapper display-flex justify-content-between\"><div class=\"text-size-16 text-color-darker\">Trailer</div><div class=\"radio-text\"></div></div></label><label class=\"radio padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" tabindex=\"0\"><input type=\"radio\" class=\"padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" name=\"listRadioBoxes\" value=\"\"><div class=\"radio-text-wrapper display-flex justify-content-between\"><div class=\"text-size-16 text-color-darker\">Bus</div><div class=\"radio-text\"></div></div></label><label class=\"radio padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" tabindex=\"0\"><input type=\"radio\" class=\"padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" name=\"listRadioBoxes\" value=\"\"><div class=\"radio-text-wrapper display-flex justify-content-between\"><div class=\"text-size-16 text-color-darker\">Van</div><div class=\"radio-text\"></div></div></label></div></div>",
|
|
702
|
+
"tabs": [
|
|
703
|
+
{
|
|
704
|
+
"label": "React",
|
|
705
|
+
"language": "tsx",
|
|
706
|
+
"code": "import { useState } from 'react';\n\nimport RadioButton from '@rio-cloud/rio-uikit/RadioButton';\n\nexport default () => {\n const [selectedOption, setSelectedOption] = useState(1);\n\n const radioButtonClassName =\n 'padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent';\n\n return (\n <div className='display-flex flex-column width-200 margin-bottom-20'>\n <div className='text-medium'>Vehicle type</div>\n\n <RadioButton\n name='listRadioBoxes'\n custom\n className={radioButtonClassName}\n onChange={() => setSelectedOption(1)}\n checked={selectedOption === 1}\n >\n <div className='radio-text-wrapper display-flex justify-content-between'>\n <div className='text-size-16 text-color-darker'>Truck</div>\n <div className='radio-text' />\n </div>\n </RadioButton>\n\n <RadioButton\n name='listRadioBoxes'\n custom\n className={radioButtonClassName}\n onChange={() => setSelectedOption(2)}\n checked={selectedOption === 2}\n >\n <div className='radio-text-wrapper display-flex justify-content-between'>\n <div className='text-size-16 text-color-darker'>Trailer</div>\n <div className='radio-text' />\n </div>\n </RadioButton>\n\n <RadioButton\n name='listRadioBoxes'\n custom\n className={radioButtonClassName}\n onChange={() => setSelectedOption(3)}\n checked={selectedOption === 3}\n >\n <div className='radio-text-wrapper display-flex justify-content-between'>\n <div className='text-size-16 text-color-darker'>Bus</div>\n <div className='radio-text' />\n </div>\n </RadioButton>\n\n <RadioButton\n name='listRadioBoxes'\n custom\n className={radioButtonClassName}\n onChange={() => setSelectedOption(4)}\n checked={selectedOption === 4}\n >\n <div className='radio-text-wrapper display-flex justify-content-between'>\n <div className='text-size-16 text-color-darker'>Van</div>\n <div className='radio-text' />\n </div>\n </RadioButton>\n </div>\n );\n};"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
"label": "HTML",
|
|
710
|
+
"language": "html",
|
|
711
|
+
"code": "<div class=\"display-flex flex-column width-200 margin-bottom-20\">\n <div class=\"text-medium\">Vehicle type</div>\n <label class=\"radio padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" name=\"listRadioBoxes\" value=\"\" checked=\"\">\n <div class=\"radio-text-wrapper display-flex justify-content-between\">\n <div class=\"text-size-16 text-color-darker\">Truck</div>\n <div class=\"radio-text\">\n </div>\n </div>\n </label>\n <label class=\"radio padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" name=\"listRadioBoxes\" value=\"\">\n <div class=\"radio-text-wrapper display-flex justify-content-between\">\n <div class=\"text-size-16 text-color-darker\">Trailer</div>\n <div class=\"radio-text\">\n </div>\n </div>\n </label>\n <label class=\"radio padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" name=\"listRadioBoxes\" value=\"\">\n <div class=\"radio-text-wrapper display-flex justify-content-between\">\n <div class=\"text-size-16 text-color-darker\">Bus</div>\n <div class=\"radio-text\">\n </div>\n </div>\n </label>\n <label class=\"radio padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-15 padding-left-10 padding-right-5 border border-bottom-only hover-bg-highlight-decent\" name=\"listRadioBoxes\" value=\"\">\n <div class=\"radio-text-wrapper display-flex justify-content-between\">\n <div class=\"text-size-16 text-color-darker\">Van</div>\n <div class=\"radio-text\">\n </div>\n </div>\n </label>\n</div>"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"label": "Props",
|
|
715
|
+
"language": "json",
|
|
716
|
+
"code": null,
|
|
717
|
+
"props": [
|
|
718
|
+
{
|
|
719
|
+
"heading": null,
|
|
720
|
+
"rows": [
|
|
721
|
+
{
|
|
722
|
+
"name": "label",
|
|
723
|
+
"type": "String / Node",
|
|
724
|
+
"default": "",
|
|
725
|
+
"description": "Defines the label text."
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "defaultChecked",
|
|
729
|
+
"type": "Boolean",
|
|
730
|
+
"default": "",
|
|
731
|
+
"description": "Defines whether the radio is initially checked or not (state can be changed on click)."
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"name": "checked",
|
|
735
|
+
"type": "Boolean",
|
|
736
|
+
"default": "",
|
|
737
|
+
"description": "Defines whether the radio is checked or not (for controlled usage)."
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"name": "disabled",
|
|
741
|
+
"type": "Boolean",
|
|
742
|
+
"default": "false",
|
|
743
|
+
"description": "Defines whether the checkbox is disabled or not."
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"name": "inline",
|
|
747
|
+
"type": "Boolean",
|
|
748
|
+
"default": "false",
|
|
749
|
+
"description": "Defines whether the radio button is applying an inline style. Use this in combinationwith other radio buttons."
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"name": "right",
|
|
753
|
+
"type": "Boolean",
|
|
754
|
+
"default": "false",
|
|
755
|
+
"description": "Displays the icon on the right side of the text."
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"name": "custom",
|
|
759
|
+
"type": "Boolean",
|
|
760
|
+
"default": "false",
|
|
761
|
+
"description": "Allows for rendering a completely different layout with or without a radio tick."
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"name": "tabIndex",
|
|
765
|
+
"type": "Number",
|
|
766
|
+
"default": "0",
|
|
767
|
+
"description": "The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "inputRef",
|
|
771
|
+
"type": "Ref",
|
|
772
|
+
"default": "",
|
|
773
|
+
"description": "Ref which is added to the input element."
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"name": "onClick",
|
|
777
|
+
"type": "Function",
|
|
778
|
+
"default": "() => {}",
|
|
779
|
+
"description": "Callback function that is invoked when the radio button is clicked."
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"name": "onChange",
|
|
783
|
+
"type": "Function",
|
|
784
|
+
"default": "() => {}",
|
|
785
|
+
"description": "Callback function that is invoked when the radio button is clicked and the state changes (for controlled usage)."
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
"name": "className",
|
|
789
|
+
"type": "String",
|
|
790
|
+
"default": "",
|
|
791
|
+
"description": "Additional classes to be set on the input element."
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"name": "children",
|
|
795
|
+
"type": "any",
|
|
796
|
+
"default": "",
|
|
797
|
+
"description": "Any element to be rendered inside the text element."
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"name": "icon",
|
|
801
|
+
"type": "String",
|
|
802
|
+
"default": "",
|
|
803
|
+
"description": "Define any rioglyph icon like \"rioglyph-truck\"."
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"name": "iconSize",
|
|
807
|
+
"type": "Number",
|
|
808
|
+
"default": "",
|
|
809
|
+
"description": "The icon Size in px."
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"name": "name",
|
|
813
|
+
"type": "String",
|
|
814
|
+
"default": "",
|
|
815
|
+
"description": "Name to be given to the input element."
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"name": "iconLabelPosition",
|
|
819
|
+
"type": "String",
|
|
820
|
+
"default": "",
|
|
821
|
+
"description": "The label position. Possible values are: \"horizontal\" or \"vertical\"."
|
|
822
|
+
}
|
|
823
|
+
]
|
|
824
|
+
}
|
|
825
|
+
]
|
|
826
|
+
}
|
|
827
|
+
]
|
|
828
|
+
}
|
|
829
|
+
]
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"heading": "Custom example without the tick",
|
|
833
|
+
"body": "",
|
|
834
|
+
"examples": [
|
|
835
|
+
{
|
|
836
|
+
"caption": "Example 7",
|
|
837
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"display-flex gap-15 margin-bottom-20\"><label class=\"radio width-80 padding-15 border rounded border-color-highlight bg-highlight text-color-white\" tabindex=\"0\"><input type=\"radio\" class=\"width-80 padding-15 border rounded border-color-highlight bg-highlight text-color-white\" name=\"noTickRadioBoxes\" value=\"\" checked=\"\"><div class=\"text-center text-size-16 text-medium\">4 GB</div></label><label class=\"radio width-80 padding-15 border rounded hover-bg-highlight-decent\" tabindex=\"0\"><input type=\"radio\" class=\"width-80 padding-15 border rounded hover-bg-highlight-decent\" name=\"noTickRadioBoxes\" value=\"\"><div class=\"text-center text-size-16 text-medium\">8 GB</div></label><label class=\"radio width-80 padding-15 border rounded hover-bg-highlight-decent\" tabindex=\"0\"><input type=\"radio\" class=\"width-80 padding-15 border rounded hover-bg-highlight-decent\" name=\"noTickRadioBoxes\" value=\"\"><div class=\"text-center text-size-16 text-medium\">16 GB</div></label><label class=\"radio width-80 padding-15 border rounded hover-bg-highlight-decent\" tabindex=\"0\"><input type=\"radio\" class=\"width-80 padding-15 border rounded hover-bg-highlight-decent\" name=\"noTickRadioBoxes\" value=\"\"><div class=\"text-center text-size-16 text-medium\">32 GB</div></label><label class=\"radio width-80 padding-15 border rounded cursor-not-allowed\" tabindex=\"0\"><input type=\"radio\" disabled=\"\" class=\"width-80 padding-15 border rounded cursor-not-allowed\" name=\"noTickRadioBoxes\" value=\"\"><div class=\"text-center text-size-16 text-medium text-color-light\">64 GB</div></label></div></div>",
|
|
838
|
+
"tabs": [
|
|
839
|
+
{
|
|
840
|
+
"label": "React",
|
|
841
|
+
"language": "tsx",
|
|
842
|
+
"code": "import { useState } from 'react';\n\nimport RadioButton from '@rio-cloud/rio-uikit/RadioButton';\n\nconst getSelectedClass = (isSelected: boolean) =>\n isSelected ? 'border-color-highlight bg-highlight text-color-white' : 'hover-bg-highlight-decent';\n\nexport default () => {\n const [selectedOption, setSelectedOption] = useState(1);\n\n return (\n <div className='display-flex gap-15 margin-bottom-20'>\n <RadioButton\n name='noTickRadioBoxes'\n custom\n className={`width-80 padding-15 border rounded ${getSelectedClass(selectedOption === 1)}`}\n onChange={() => setSelectedOption(1)}\n checked={selectedOption === 1}\n >\n <div className='text-center text-size-16 text-medium'>4 GB</div>\n </RadioButton>\n\n <RadioButton\n name='noTickRadioBoxes'\n custom\n className={`width-80 padding-15 border rounded ${getSelectedClass(selectedOption === 2)}`}\n onChange={() => setSelectedOption(2)}\n checked={selectedOption === 2}\n >\n <div className='text-center text-size-16 text-medium'>8 GB</div>\n </RadioButton>\n\n <RadioButton\n name='noTickRadioBoxes'\n custom\n className={`width-80 padding-15 border rounded ${getSelectedClass(selectedOption === 3)}`}\n onChange={() => setSelectedOption(3)}\n checked={selectedOption === 3}\n >\n <div className='text-center text-size-16 text-medium'>16 GB</div>\n </RadioButton>\n\n <RadioButton\n name='noTickRadioBoxes'\n custom\n className={`width-80 padding-15 border rounded ${getSelectedClass(selectedOption === 4)}`}\n onChange={() => setSelectedOption(4)}\n checked={selectedOption === 4}\n >\n <div className='text-center text-size-16 text-medium'>32 GB</div>\n </RadioButton>\n\n <RadioButton\n name='noTickRadioBoxes'\n custom\n disabled\n className='width-80 padding-15 border rounded cursor-not-allowed'\n >\n <div className='text-center text-size-16 text-medium text-color-light'>64 GB</div>\n </RadioButton>\n </div>\n );\n};"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"label": "HTML",
|
|
846
|
+
"language": "html",
|
|
847
|
+
"code": "<div class=\"display-flex gap-15 margin-bottom-20\">\n <label class=\"radio width-80 padding-15 border rounded border-color-highlight bg-highlight text-color-white\" tabindex=\"0\">\n <input type=\"radio\" class=\"width-80 padding-15 border rounded border-color-highlight bg-highlight text-color-white\" name=\"noTickRadioBoxes\" value=\"\" checked=\"\">\n <div class=\"text-center text-size-16 text-medium\">4 GB</div>\n </label>\n <label class=\"radio width-80 padding-15 border rounded hover-bg-highlight-decent\" tabindex=\"0\">\n <input type=\"radio\" class=\"width-80 padding-15 border rounded hover-bg-highlight-decent\" name=\"noTickRadioBoxes\" value=\"\">\n <div class=\"text-center text-size-16 text-medium\">8 GB</div>\n </label>\n <label class=\"radio width-80 padding-15 border rounded hover-bg-highlight-decent\" tabindex=\"0\">\n <input type=\"radio\" class=\"width-80 padding-15 border rounded hover-bg-highlight-decent\" name=\"noTickRadioBoxes\" value=\"\">\n <div class=\"text-center text-size-16 text-medium\">16 GB</div>\n </label>\n <label class=\"radio width-80 padding-15 border rounded hover-bg-highlight-decent\" tabindex=\"0\">\n <input type=\"radio\" class=\"width-80 padding-15 border rounded hover-bg-highlight-decent\" name=\"noTickRadioBoxes\" value=\"\">\n <div class=\"text-center text-size-16 text-medium\">32 GB</div>\n </label>\n <label class=\"radio width-80 padding-15 border rounded cursor-not-allowed\" tabindex=\"0\">\n <input type=\"radio\" disabled=\"\" class=\"width-80 padding-15 border rounded cursor-not-allowed\" name=\"noTickRadioBoxes\" value=\"\">\n <div class=\"text-center text-size-16 text-medium text-color-light\">64 GB</div>\n </label>\n</div>"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"label": "Props",
|
|
851
|
+
"language": "json",
|
|
852
|
+
"code": null,
|
|
853
|
+
"props": [
|
|
854
|
+
{
|
|
855
|
+
"heading": null,
|
|
856
|
+
"rows": [
|
|
857
|
+
{
|
|
858
|
+
"name": "label",
|
|
859
|
+
"type": "String / Node",
|
|
860
|
+
"default": "",
|
|
861
|
+
"description": "Defines the label text."
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"name": "defaultChecked",
|
|
865
|
+
"type": "Boolean",
|
|
866
|
+
"default": "",
|
|
867
|
+
"description": "Defines whether the radio is initially checked or not (state can be changed on click)."
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
"name": "checked",
|
|
871
|
+
"type": "Boolean",
|
|
872
|
+
"default": "",
|
|
873
|
+
"description": "Defines whether the radio is checked or not (for controlled usage)."
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"name": "disabled",
|
|
877
|
+
"type": "Boolean",
|
|
878
|
+
"default": "false",
|
|
879
|
+
"description": "Defines whether the checkbox is disabled or not."
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"name": "inline",
|
|
883
|
+
"type": "Boolean",
|
|
884
|
+
"default": "false",
|
|
885
|
+
"description": "Defines whether the radio button is applying an inline style. Use this in combinationwith other radio buttons."
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"name": "right",
|
|
889
|
+
"type": "Boolean",
|
|
890
|
+
"default": "false",
|
|
891
|
+
"description": "Displays the icon on the right side of the text."
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"name": "custom",
|
|
895
|
+
"type": "Boolean",
|
|
896
|
+
"default": "false",
|
|
897
|
+
"description": "Allows for rendering a completely different layout with or without a radio tick."
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"name": "tabIndex",
|
|
901
|
+
"type": "Number",
|
|
902
|
+
"default": "0",
|
|
903
|
+
"description": "The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"name": "inputRef",
|
|
907
|
+
"type": "Ref",
|
|
908
|
+
"default": "",
|
|
909
|
+
"description": "Ref which is added to the input element."
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"name": "onClick",
|
|
913
|
+
"type": "Function",
|
|
914
|
+
"default": "() => {}",
|
|
915
|
+
"description": "Callback function that is invoked when the radio button is clicked."
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"name": "onChange",
|
|
919
|
+
"type": "Function",
|
|
920
|
+
"default": "() => {}",
|
|
921
|
+
"description": "Callback function that is invoked when the radio button is clicked and the state changes (for controlled usage)."
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"name": "className",
|
|
925
|
+
"type": "String",
|
|
926
|
+
"default": "",
|
|
927
|
+
"description": "Additional classes to be set on the input element."
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"name": "children",
|
|
931
|
+
"type": "any",
|
|
932
|
+
"default": "",
|
|
933
|
+
"description": "Any element to be rendered inside the text element."
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"name": "icon",
|
|
937
|
+
"type": "String",
|
|
938
|
+
"default": "",
|
|
939
|
+
"description": "Define any rioglyph icon like \"rioglyph-truck\"."
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"name": "iconSize",
|
|
943
|
+
"type": "Number",
|
|
944
|
+
"default": "",
|
|
945
|
+
"description": "The icon Size in px."
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"name": "name",
|
|
949
|
+
"type": "String",
|
|
950
|
+
"default": "",
|
|
951
|
+
"description": "Name to be given to the input element."
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"name": "iconLabelPosition",
|
|
955
|
+
"type": "String",
|
|
956
|
+
"default": "",
|
|
957
|
+
"description": "The label position. Possible values are: \"horizontal\" or \"vertical\"."
|
|
958
|
+
}
|
|
959
|
+
]
|
|
960
|
+
}
|
|
961
|
+
]
|
|
962
|
+
}
|
|
963
|
+
]
|
|
964
|
+
}
|
|
965
|
+
]
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
"heading": "RadioButton with custom icon",
|
|
969
|
+
"body": "",
|
|
970
|
+
"examples": [
|
|
971
|
+
{
|
|
972
|
+
"caption": "",
|
|
973
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div><div><label id=\"IconInlineTruck\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radiosIconInline\" value=\"\"><span class=\"radio-icon label-horizontal\"><span class=\"rioglyph rioglyph-truck\" style=\"width: 16px; height: 16px; font-size: 16px; line-height: 16px;\"></span><span class=\"radio-label\"><span>Truck</span></span></span></label><label id=\"IconInlineBus\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radiosIconInline\" value=\"\"><span class=\"radio-icon label-horizontal\"><span class=\"rioglyph rioglyph-bus\" style=\"width: 16px; height: 16px; font-size: 16px; line-height: 16px;\"></span><span class=\"radio-label\"><span>Bus</span></span></span></label><label id=\"IconInlineTrailer\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radiosIconInline\" value=\"\"><span class=\"radio-icon label-horizontal\"><span class=\"rioglyph rioglyph-trailer\" style=\"width: 16px; height: 16px; font-size: 16px; line-height: 16px;\"></span><span class=\"radio-label\"><span>Trailer</span></span></span></label></div><hr><div><label id=\"IconTruck\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radiosIcon\" value=\"\"><span class=\"radio-icon label-vertical\"><span class=\"rioglyph rioglyph-truck\" style=\"width: 75px; height: 75px; font-size: 75px; line-height: 75px;\"></span><span class=\"radio-label\"><span class=\"text-size-16 margin-top-10\">Truck</span></span></span></label><label id=\"IconBus\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radiosIcon\" value=\"\"><span class=\"radio-icon label-vertical\"><span class=\"rioglyph rioglyph-bus\" style=\"width: 75px; height: 75px; font-size: 75px; line-height: 75px;\"></span><span class=\"radio-label\"><span class=\"text-size-16 margin-top-10\">Bus</span></span></span></label><label id=\"IconBus\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radiosIcon\" value=\"\"><span class=\"radio-icon label-vertical\"><span class=\"rioglyph rioglyph-van\" style=\"width: 75px; height: 75px; font-size: 75px; line-height: 75px;\"></span><span class=\"radio-label\"><span class=\"text-size-16 margin-top-10\">Van</span></span></span></label><label id=\"IconTrailer\" class=\"radio radio-inline\" tabindex=\"0\"><input type=\"radio\" class=\"\" name=\"radiosIcon\" value=\"\"><span class=\"radio-icon label-vertical\"><span class=\"rioglyph rioglyph-trailer\" style=\"width: 75px; height: 75px; font-size: 75px; line-height: 75px;\"></span><span class=\"radio-label\"><span class=\"text-size-16 margin-top-10\">Trailer</span></span></span></label></div><hr><div class=\"padding-25 max-width-400\"><div class=\"display-flex content-space-between column-gap-25 margin-bottom-25\"><div class=\"flex-1-1 text-center line-height-125rel width-33pct margin-left-10 margin-right-10\"><div class=\"text-size-16 text-medium margin-bottom-5 white-space-nowrap\">6 Month</div><div class=\"text-size-12 text-color-dark\"></div></div><div class=\"flex-1-1 text-center line-height-125rel width-33pct margin-left-10 margin-right-10\"><div class=\"text-size-16 text-medium margin-bottom-5 white-space-nowrap\">12 Month</div><div class=\"text-size-12 text-color-dark\">Save 15%</div></div><div class=\"flex-1-1 text-center line-height-125rel width-33pct margin-left-10 margin-right-10\"><div class=\"text-size-16 text-medium margin-bottom-5 white-space-nowrap\">24 Month</div><div class=\"text-size-12 text-color-dark\">Save 25%</div></div></div><div class=\"display-flex justify-content-between column-gap-25 bg-white rounded-circle padding-3 border-style-solid border-width-1 border-color-light\"><label id=\"Periode1\" class=\"radio radio-inline padding-0 margin-0 width-33pct\" tabindex=\"0\"><input type=\"radio\" class=\"padding-0 margin-0 width-33pct\" name=\"radiosContracts\" value=\"\" checked=\"\"><span class=\"radio-icon label-vertical\"><span class=\"rioglyph rioglyph-start\" style=\"width: 30px; height: 30px; font-size: 30px; line-height: 30px;\"></span><span class=\"radio-label\"></span></span></label><label id=\"Periode2\" class=\"radio radio-inline padding-0 margin-0 width-33pct\" tabindex=\"0\"><input type=\"radio\" class=\"padding-0 margin-0 width-33pct\" name=\"radiosContracts\" value=\"\"><span class=\"radio-icon label-vertical\"><span class=\"rioglyph rioglyph-stopover\" style=\"width: 30px; height: 30px; font-size: 30px; line-height: 30px;\"></span><span class=\"radio-label\"></span></span></label><label id=\"Periode3\" class=\"radio radio-inline padding-0 margin-0 width-33pct\" tabindex=\"0\"><input type=\"radio\" class=\"padding-0 margin-0 width-33pct\" name=\"radiosContracts\" value=\"\"><span class=\"radio-icon label-vertical\"><span class=\"rioglyph rioglyph-stopover\" style=\"width: 30px; height: 30px; font-size: 30px; line-height: 30px;\"></span><span class=\"radio-label\"></span></span></label></div></div></div></div>",
|
|
974
|
+
"tabs": [
|
|
975
|
+
{
|
|
976
|
+
"label": "React",
|
|
977
|
+
"language": "tsx",
|
|
978
|
+
"code": "import RadioButton from '@rio-cloud/rio-uikit/RadioButton';\n\nexport default () => {\n return (\n <div>\n <div>\n <RadioButton\n name='radiosIconInline'\n id='IconInlineTruck'\n inline\n icon='rioglyph-truck'\n iconLabelPosition='horizontal'\n >\n <span>Truck</span>\n </RadioButton>\n\n <RadioButton\n name='radiosIconInline'\n id='IconInlineBus'\n inline\n icon='rioglyph-bus'\n iconLabelPosition='horizontal'\n >\n <span>Bus</span>\n </RadioButton>\n\n <RadioButton\n name='radiosIconInline'\n id='IconInlineTrailer'\n inline\n icon='rioglyph-trailer'\n iconLabelPosition='horizontal'\n >\n <span>Trailer</span>\n </RadioButton>\n </div>\n\n <hr />\n\n <div>\n <RadioButton name='radiosIcon' id='IconTruck' inline icon='rioglyph-truck' iconSize={75}>\n <span className='text-size-16 margin-top-10'>Truck</span>\n </RadioButton>\n\n <RadioButton name='radiosIcon' id='IconBus' inline icon='rioglyph-bus' iconSize={75}>\n <span className='text-size-16 margin-top-10'>Bus</span>\n </RadioButton>\n\n <RadioButton name='radiosIcon' id='IconBus' inline icon='rioglyph-van' iconSize={75}>\n <span className='text-size-16 margin-top-10'>Van</span>\n </RadioButton>\n\n <RadioButton name='radiosIcon' id='IconTrailer' inline icon='rioglyph-trailer' iconSize={75}>\n <span className='text-size-16 margin-top-10'>Trailer</span>\n </RadioButton>\n </div>\n\n <hr />\n\n <div className='padding-25 max-width-400'>\n <div className='display-flex content-space-between column-gap-25 margin-bottom-25'>\n <div className='flex-1-1 text-center line-height-125rel width-33pct margin-left-10 margin-right-10'>\n <div className='text-size-16 text-medium margin-bottom-5 white-space-nowrap'>6 Month</div>\n <div className='text-size-12 text-color-dark' />\n </div>\n\n <div className='flex-1-1 text-center line-height-125rel width-33pct margin-left-10 margin-right-10'>\n <div className='text-size-16 text-medium margin-bottom-5 white-space-nowrap'>12 Month</div>\n <div className='text-size-12 text-color-dark'>Save 15%</div>\n </div>\n\n <div className='flex-1-1 text-center line-height-125rel width-33pct margin-left-10 margin-right-10'>\n <div className='text-size-16 text-medium margin-bottom-5 white-space-nowrap'>24 Month</div>\n <div className='text-size-12 text-color-dark'>Save 25%</div>\n </div>\n </div>\n\n <div\n className={\n 'display-flex justify-content-between column-gap-25 bg-white rounded-circle ' +\n 'padding-3 border-style-solid border-width-1 border-color-light'\n }\n >\n <RadioButton\n name='radiosContracts'\n id='Periode1'\n inline\n icon='rioglyph-start'\n iconSize={30}\n className='padding-0 margin-0 width-33pct'\n defaultChecked\n />\n\n <RadioButton\n name='radiosContracts'\n id='Periode2'\n inline\n icon='rioglyph-stopover'\n iconSize={30}\n className='padding-0 margin-0 width-33pct'\n />\n\n <RadioButton\n name='radiosContracts'\n id='Periode3'\n inline\n icon='rioglyph-stopover'\n iconSize={30}\n className='padding-0 margin-0 width-33pct'\n />\n </div>\n </div>\n </div>\n );\n};"
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
"label": "HTML",
|
|
982
|
+
"language": "html",
|
|
983
|
+
"code": "<div>\n <div>\n <label id=\"IconInlineTruck\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radiosIconInline\" value=\"\">\n <span class=\"radio-icon label-horizontal\">\n <span class=\"rioglyph rioglyph-truck\" style=\"width: 16px; height: 16px; font-size: 16px; line-height: 16px;\">\n </span>\n <span class=\"radio-label\">\n <span>Truck</span>\n </span>\n </span>\n </label>\n <label id=\"IconInlineBus\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radiosIconInline\" value=\"\">\n <span class=\"radio-icon label-horizontal\">\n <span class=\"rioglyph rioglyph-bus\" style=\"width: 16px; height: 16px; font-size: 16px; line-height: 16px;\">\n </span>\n <span class=\"radio-label\">\n <span>Bus</span>\n </span>\n </span>\n </label>\n <label id=\"IconInlineTrailer\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radiosIconInline\" value=\"\">\n <span class=\"radio-icon label-horizontal\">\n <span class=\"rioglyph rioglyph-trailer\" style=\"width: 16px; height: 16px; font-size: 16px; line-height: 16px;\">\n </span>\n <span class=\"radio-label\">\n <span>Trailer</span>\n </span>\n </span>\n </label>\n </div>\n <hr>\n <div>\n <label id=\"IconTruck\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radiosIcon\" value=\"\">\n <span class=\"radio-icon label-vertical\">\n <span class=\"rioglyph rioglyph-truck\" style=\"width: 75px; height: 75px; font-size: 75px; line-height: 75px;\">\n </span>\n <span class=\"radio-label\">\n <span class=\"text-size-16 margin-top-10\">Truck</span>\n </span>\n </span>\n </label>\n <label id=\"IconBus\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radiosIcon\" value=\"\">\n <span class=\"radio-icon label-vertical\">\n <span class=\"rioglyph rioglyph-bus\" style=\"width: 75px; height: 75px; font-size: 75px; line-height: 75px;\">\n </span>\n <span class=\"radio-label\">\n <span class=\"text-size-16 margin-top-10\">Bus</span>\n </span>\n </span>\n </label>\n <label id=\"IconBus\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radiosIcon\" value=\"\">\n <span class=\"radio-icon label-vertical\">\n <span class=\"rioglyph rioglyph-van\" style=\"width: 75px; height: 75px; font-size: 75px; line-height: 75px;\">\n </span>\n <span class=\"radio-label\">\n <span class=\"text-size-16 margin-top-10\">Van</span>\n </span>\n </span>\n </label>\n <label id=\"IconTrailer\" class=\"radio radio-inline\" tabindex=\"0\">\n <input type=\"radio\" class=\"\" name=\"radiosIcon\" value=\"\">\n <span class=\"radio-icon label-vertical\">\n <span class=\"rioglyph rioglyph-trailer\" style=\"width: 75px; height: 75px; font-size: 75px; line-height: 75px;\">\n </span>\n <span class=\"radio-label\">\n <span class=\"text-size-16 margin-top-10\">Trailer</span>\n </span>\n </span>\n </label>\n </div>\n <hr>\n <div class=\"padding-25 max-width-400\">\n <div class=\"display-flex content-space-between column-gap-25 margin-bottom-25\">\n <div class=\"flex-1-1 text-center line-height-125rel width-33pct margin-left-10 margin-right-10\">\n <div class=\"text-size-16 text-medium margin-bottom-5 white-space-nowrap\">6 Month</div>\n <div class=\"text-size-12 text-color-dark\">\n </div>\n </div>\n <div class=\"flex-1-1 text-center line-height-125rel width-33pct margin-left-10 margin-right-10\">\n <div class=\"text-size-16 text-medium margin-bottom-5 white-space-nowrap\">12 Month</div>\n <div class=\"text-size-12 text-color-dark\">Save 15%</div>\n </div>\n <div class=\"flex-1-1 text-center line-height-125rel width-33pct margin-left-10 margin-right-10\">\n <div class=\"text-size-16 text-medium margin-bottom-5 white-space-nowrap\">24 Month</div>\n <div class=\"text-size-12 text-color-dark\">Save 25%</div>\n </div>\n </div>\n <div class=\"display-flex justify-content-between column-gap-25 bg-white rounded-circle padding-3 border-style-solid border-width-1 border-color-light\">\n <label id=\"Periode1\" class=\"radio radio-inline padding-0 margin-0 width-33pct\" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-0 margin-0 width-33pct\" name=\"radiosContracts\" value=\"\" checked=\"\">\n <span class=\"radio-icon label-vertical\">\n <span class=\"rioglyph rioglyph-start\" style=\"width: 30px; height: 30px; font-size: 30px; line-height: 30px;\">\n </span>\n <span class=\"radio-label\">\n </span>\n </span>\n </label>\n <label id=\"Periode2\" class=\"radio radio-inline padding-0 margin-0 width-33pct\" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-0 margin-0 width-33pct\" name=\"radiosContracts\" value=\"\">\n <span class=\"radio-icon label-vertical\">\n <span class=\"rioglyph rioglyph-stopover\" style=\"width: 30px; height: 30px; font-size: 30px; line-height: 30px;\">\n </span>\n <span class=\"radio-label\">\n </span>\n </span>\n </label>\n <label id=\"Periode3\" class=\"radio radio-inline padding-0 margin-0 width-33pct\" tabindex=\"0\">\n <input type=\"radio\" class=\"padding-0 margin-0 width-33pct\" name=\"radiosContracts\" value=\"\">\n <span class=\"radio-icon label-vertical\">\n <span class=\"rioglyph rioglyph-stopover\" style=\"width: 30px; height: 30px; font-size: 30px; line-height: 30px;\">\n </span>\n <span class=\"radio-label\">\n </span>\n </span>\n </label>\n </div>\n </div>\n</div>"
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
"label": "Props",
|
|
987
|
+
"language": "json",
|
|
988
|
+
"code": null,
|
|
989
|
+
"props": [
|
|
990
|
+
{
|
|
991
|
+
"heading": null,
|
|
992
|
+
"rows": [
|
|
993
|
+
{
|
|
994
|
+
"name": "label",
|
|
995
|
+
"type": "String / Node",
|
|
996
|
+
"default": "",
|
|
997
|
+
"description": "Defines the label text."
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"name": "defaultChecked",
|
|
1001
|
+
"type": "Boolean",
|
|
1002
|
+
"default": "",
|
|
1003
|
+
"description": "Defines whether the radio is initially checked or not (state can be changed on click)."
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"name": "checked",
|
|
1007
|
+
"type": "Boolean",
|
|
1008
|
+
"default": "",
|
|
1009
|
+
"description": "Defines whether the radio is checked or not (for controlled usage)."
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"name": "disabled",
|
|
1013
|
+
"type": "Boolean",
|
|
1014
|
+
"default": "false",
|
|
1015
|
+
"description": "Defines whether the checkbox is disabled or not."
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
"name": "inline",
|
|
1019
|
+
"type": "Boolean",
|
|
1020
|
+
"default": "false",
|
|
1021
|
+
"description": "Defines whether the radio button is applying an inline style. Use this in combinationwith other radio buttons."
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
"name": "right",
|
|
1025
|
+
"type": "Boolean",
|
|
1026
|
+
"default": "false",
|
|
1027
|
+
"description": "Displays the icon on the right side of the text."
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"name": "custom",
|
|
1031
|
+
"type": "Boolean",
|
|
1032
|
+
"default": "false",
|
|
1033
|
+
"description": "Allows for rendering a completely different layout with or without a radio tick."
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"name": "tabIndex",
|
|
1037
|
+
"type": "Number",
|
|
1038
|
+
"default": "0",
|
|
1039
|
+
"description": "The tabindex attribute allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the Tab key, hence the name) and determine their relative ordering for sequential focus navigation. See tabIndex"
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"name": "inputRef",
|
|
1043
|
+
"type": "Ref",
|
|
1044
|
+
"default": "",
|
|
1045
|
+
"description": "Ref which is added to the input element."
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
"name": "onClick",
|
|
1049
|
+
"type": "Function",
|
|
1050
|
+
"default": "() => {}",
|
|
1051
|
+
"description": "Callback function that is invoked when the radio button is clicked."
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"name": "onChange",
|
|
1055
|
+
"type": "Function",
|
|
1056
|
+
"default": "() => {}",
|
|
1057
|
+
"description": "Callback function that is invoked when the radio button is clicked and the state changes (for controlled usage)."
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
"name": "className",
|
|
1061
|
+
"type": "String",
|
|
1062
|
+
"default": "",
|
|
1063
|
+
"description": "Additional classes to be set on the input element."
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"name": "children",
|
|
1067
|
+
"type": "any",
|
|
1068
|
+
"default": "",
|
|
1069
|
+
"description": "Any element to be rendered inside the text element."
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
"name": "icon",
|
|
1073
|
+
"type": "String",
|
|
1074
|
+
"default": "",
|
|
1075
|
+
"description": "Define any rioglyph icon like \"rioglyph-truck\"."
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"name": "iconSize",
|
|
1079
|
+
"type": "Number",
|
|
1080
|
+
"default": "",
|
|
1081
|
+
"description": "The icon Size in px."
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
"name": "name",
|
|
1085
|
+
"type": "String",
|
|
1086
|
+
"default": "",
|
|
1087
|
+
"description": "Name to be given to the input element."
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"name": "iconLabelPosition",
|
|
1091
|
+
"type": "String",
|
|
1092
|
+
"default": "",
|
|
1093
|
+
"description": "The label position. Possible values are: \"horizontal\" or \"vertical\"."
|
|
1094
|
+
}
|
|
1095
|
+
]
|
|
1096
|
+
}
|
|
1097
|
+
]
|
|
1098
|
+
}
|
|
1099
|
+
]
|
|
1100
|
+
}
|
|
1101
|
+
]
|
|
1102
|
+
}
|
|
1103
|
+
],
|
|
1104
|
+
"see_also": []
|
|
1105
|
+
}
|