@rio-cloud/uikit-mcp 1.1.6 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -17
- package/dist/doc-metadata.json +125 -295
- package/dist/docs/components/accentBar.md +16 -69
- package/dist/docs/components/activity.md +7 -44
- package/dist/docs/components/animatedNumber.md +3 -11
- package/dist/docs/components/animatedTextReveal.md +3 -31
- package/dist/docs/components/animations.md +21 -54
- package/dist/docs/components/appHeader.md +11 -30
- package/dist/docs/components/appLayout.md +36 -172
- package/dist/docs/components/appNavigationBar.md +1 -24
- package/dist/docs/components/areaCharts.md +7 -22
- package/dist/docs/components/aspectRatioPlaceholder.md +1 -9
- package/dist/docs/components/assetTree.md +141 -374
- package/dist/docs/components/autosuggests.md +3 -102
- package/dist/docs/components/avatar.md +1 -16
- package/dist/docs/components/banner.md +4 -37
- package/dist/docs/components/barCharts.md +20 -75
- package/dist/docs/components/barList.md +9 -77
- package/dist/docs/components/basicMap.md +1 -67
- package/dist/docs/components/bottomSheet.md +2 -28
- package/dist/docs/components/button.md +12 -65
- package/dist/docs/components/buttonToolbar.md +5 -19
- package/dist/docs/components/calendarStripe.md +48 -106
- package/dist/docs/components/card.md +1 -9
- package/dist/docs/components/carousel.md +1 -14
- package/dist/docs/components/chartColors.md +1 -156
- package/dist/docs/components/chartsGettingStarted.md +1 -1
- package/dist/docs/components/chat.md +2 -81
- package/dist/docs/components/checkbox.md +11 -72
- package/dist/docs/components/circularProgress.md +8 -49
- package/dist/docs/components/clearableInput.md +3 -62
- package/dist/docs/components/collapse.md +2 -15
- package/dist/docs/components/composedCharts.md +16 -26
- package/dist/docs/components/contentLoader.md +7 -25
- package/dist/docs/components/dataTabs.md +16 -104
- package/dist/docs/components/datepickers.md +710 -962
- package/dist/docs/components/dialogs.md +5 -67
- package/dist/docs/components/divider.md +1 -33
- package/dist/docs/components/dropdowns.md +3412 -5600
- package/dist/docs/components/editableContent.md +4 -82
- package/dist/docs/components/expander.md +15 -88
- package/dist/docs/components/fade.md +4 -61
- package/dist/docs/components/fadeExpander.md +1 -7
- package/dist/docs/components/fadeUp.md +2 -76
- package/dist/docs/components/feedback.md +9 -68
- package/dist/docs/components/filePickers.md +4 -18
- package/dist/docs/components/formLabel.md +7 -27
- package/dist/docs/components/groupedItemList.md +2 -158
- package/dist/docs/components/iconList.md +8 -65
- package/dist/docs/components/imagePreloader.md +1 -9
- package/dist/docs/components/labeledElement.md +3 -18
- package/dist/docs/components/licensePlate.md +1 -43
- package/dist/docs/components/lineCharts.md +7 -38
- package/dist/docs/components/listMenu.md +2 -34
- package/dist/docs/components/loadMore.md +5 -24
- package/dist/docs/components/mainNavigation.md +1 -9
- package/dist/docs/components/mapCircle.md +1 -23
- package/dist/docs/components/mapCluster.md +2 -54
- package/dist/docs/components/mapContext.md +1 -23
- package/dist/docs/components/mapDraggableMarker.md +2 -28
- package/dist/docs/components/mapGettingStarted.md +2 -2
- package/dist/docs/components/mapInfoBubble.md +1 -27
- package/dist/docs/components/mapLayerGroup.md +1 -23
- package/dist/docs/components/mapMarker.md +1 -99
- package/dist/docs/components/mapPolygon.md +2 -116
- package/dist/docs/components/mapRoute.md +6 -1465
- package/dist/docs/components/mapRouteGenerator.md +1 -1
- package/dist/docs/components/mapSettings.md +11 -128
- package/dist/docs/components/mapUtils.md +10 -113
- package/dist/docs/components/multiselects.md +14 -163
- package/dist/docs/components/noData.md +8 -22
- package/dist/docs/components/notifications.md +3 -19
- package/dist/docs/components/numbercontrol.md +3 -47
- package/dist/docs/components/onboarding.md +3 -15
- package/dist/docs/components/page.md +1 -33
- package/dist/docs/components/pager.md +1 -17
- package/dist/docs/components/pieCharts.md +40 -71
- package/dist/docs/components/popover.md +1 -12
- package/dist/docs/components/position.md +2 -6
- package/dist/docs/components/radialBarCharts.md +32 -116
- package/dist/docs/components/radioCardGroup.md +6 -48
- package/dist/docs/components/radiobutton.md +6 -75
- package/dist/docs/components/releaseNotes.md +3 -21
- package/dist/docs/components/resizer.md +1 -7
- package/dist/docs/components/responsiveColumnStripe.md +9 -49
- package/dist/docs/components/responsiveVideo.md +1 -7
- package/dist/docs/components/rioglyph.md +1 -17
- package/dist/docs/components/rules.md +7 -70
- package/dist/docs/components/saveableInput.md +267 -401
- package/dist/docs/components/selects.md +27 -1164
- package/dist/docs/components/sidebar.md +6 -17
- package/dist/docs/components/sliders.md +1 -27
- package/dist/docs/components/smoothScrollbars.md +1 -73
- package/dist/docs/components/spinners.md +6 -51
- package/dist/docs/components/states.md +6 -92
- package/dist/docs/components/statsWidgets.md +1 -76
- package/dist/docs/components/statusBar.md +1 -57
- package/dist/docs/components/stepButton.md +2 -7
- package/dist/docs/components/steppedProgressBars.md +5 -62
- package/dist/docs/components/subNavigation.md +1 -31
- package/dist/docs/components/supportMarker.md +2 -14
- package/dist/docs/components/svgImage.md +1 -5
- package/dist/docs/components/switch.md +2 -33
- package/dist/docs/components/tables.md +1 -1
- package/dist/docs/components/tagManager.md +1 -41
- package/dist/docs/components/tags.md +1 -138
- package/dist/docs/components/teaser.md +2 -122
- package/dist/docs/components/textTruncateMiddle.md +2 -9
- package/dist/docs/components/timeline.md +1 -99
- package/dist/docs/components/timepicker.md +4 -79
- package/dist/docs/components/toggleButton.md +2 -15
- package/dist/docs/components/tooltip.md +9 -30
- package/dist/docs/components/tracker.md +2 -19
- package/dist/docs/components/virtualList.md +57 -123
- package/dist/docs/foundations.md +753 -4073
- package/dist/docs/start/changelog.md +793 -1
- package/dist/docs/start/goodtoknow.md +1 -1
- package/dist/docs/start/guidelines/color-combinations.md +149 -483
- package/dist/docs/start/guidelines/custom-css.md +1 -1
- package/dist/docs/start/guidelines/custom-rioglyph.md +1 -1
- package/dist/docs/start/guidelines/formatting.md +1 -1
- package/dist/docs/start/guidelines/iframe.md +4 -16
- package/dist/docs/start/guidelines/obfuscate-data.md +1 -1
- package/dist/docs/start/guidelines/print-css.md +1 -1
- package/dist/docs/start/guidelines/spinner.md +13 -67
- package/dist/docs/start/guidelines/state-in-url.md +1 -1
- package/dist/docs/start/guidelines/supported-browsers.md +1 -1
- package/dist/docs/start/guidelines/writing.md +1 -1
- package/dist/docs/start/howto.md +11 -11
- package/dist/docs/start/intro.md +1 -1
- package/dist/docs/start/responsiveness.md +1 -1
- package/dist/docs/utilities/classNames.md +3 -18
- package/dist/docs/utilities/deviceUtils.md +7 -13
- package/dist/docs/utilities/featureToggles.md +1 -1
- package/dist/docs/utilities/fuelTypeUtils.md +2 -12
- package/dist/docs/utilities/routeUtils.md +25 -343
- package/dist/docs/utilities/useAfterMount.md +1 -6
- package/dist/docs/utilities/useAutoAnimate.md +2 -15
- package/dist/docs/utilities/useAverage.md +1 -6
- package/dist/docs/utilities/useClickOutside.md +1 -5
- package/dist/docs/utilities/useClipboard.md +2 -6
- package/dist/docs/utilities/useCookies.md +2 -10
- package/dist/docs/utilities/useCount.md +7 -16
- package/dist/docs/utilities/useDarkMode.md +2 -6
- package/dist/docs/utilities/useDebugInfo.md +6 -20
- package/dist/docs/utilities/useEffectOnce.md +1 -6
- package/dist/docs/utilities/useElapsedTime.md +2 -6
- package/dist/docs/utilities/useElementSize.md +1 -7
- package/dist/docs/utilities/useEsc.md +1 -5
- package/dist/docs/utilities/useEvent.md +1 -5
- package/dist/docs/utilities/useFocusTrap.md +1 -5
- package/dist/docs/utilities/useFullscreen.md +2 -15
- package/dist/docs/utilities/useHover.md +1 -5
- package/dist/docs/utilities/useIncomingPostMessages.md +2 -18
- package/dist/docs/utilities/useInterval.md +2 -8
- package/dist/docs/utilities/useIsFocusWithin.md +1 -10
- package/dist/docs/utilities/useKey.md +1 -15
- package/dist/docs/utilities/useLocalStorage.md +2 -11
- package/dist/docs/utilities/useLocationSuggestions.md +1 -5
- package/dist/docs/utilities/useMax.md +1 -5
- package/dist/docs/utilities/useMin.md +1 -5
- package/dist/docs/utilities/useMutationObserver.md +3 -11
- package/dist/docs/utilities/useOnScreen.md +1 -8
- package/dist/docs/utilities/useOnlineStatus.md +1 -5
- package/dist/docs/utilities/usePostMessage.md +3 -9
- package/dist/docs/utilities/usePostMessageSender.md +3 -13
- package/dist/docs/utilities/usePrevious.md +1 -5
- package/dist/docs/utilities/useResizeObserver.md +3 -11
- package/dist/docs/utilities/useRioCookieConsent.md +1 -5
- package/dist/docs/utilities/useScrollPosition.md +3 -59
- package/dist/docs/utilities/useSearch.md +2 -16
- package/dist/docs/utilities/useSearchHighlight.md +13 -78
- package/dist/docs/utilities/useSorting.md +18 -43
- package/dist/docs/utilities/useStateWithValidation.md +1 -5
- package/dist/docs/utilities/useSum.md +1 -9
- package/dist/docs/utilities/useTableExport.md +42 -59
- package/dist/docs/utilities/useTableSelection.md +75 -120
- package/dist/docs/utilities/useTimeout.md +2 -6
- package/dist/docs/utilities/useToggle.md +4 -14
- package/dist/docs/utilities/useUrlState.md +2 -27
- package/dist/docs/utilities/useWindowResize.md +1 -5
- package/dist/index.mjs +46 -10
- package/dist/version.json +2 -2
- package/package.json +2 -2
- package/dist/docs/templates/common-table.md +0 -1112
- package/dist/docs/templates/detail-views.md +0 -942
- package/dist/docs/templates/expandable-details.md +0 -228
- package/dist/docs/templates/feature-cards.md +0 -549
- package/dist/docs/templates/form-summary.md +0 -199
- package/dist/docs/templates/form-toggle.md +0 -367
- package/dist/docs/templates/list-blocks.md +0 -1021
- package/dist/docs/templates/loading-progress.md +0 -109
- package/dist/docs/templates/options-panel.md +0 -152
- package/dist/docs/templates/panel-variants.md +0 -164
- package/dist/docs/templates/progress-cards.md +0 -607
- package/dist/docs/templates/progress-success.md +0 -142
- package/dist/docs/templates/settings-form.md +0 -434
- package/dist/docs/templates/stats-blocks.md +0 -1381
- package/dist/docs/templates/table-panel.md +0 -184
- package/dist/docs/templates/table-row-animation.md +0 -317
- package/dist/docs/templates/usage-cards.md +0 -227
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
# Form summary
|
|
2
|
-
|
|
3
|
-
*Category:* Templates
|
|
4
|
-
*Section:* Forms
|
|
5
|
-
*Source:* https://uikit.developers.rio.cloud/#/templates/form-summary
|
|
6
|
-
*Captured:* 2026-02-23T13:48:42.803Z
|
|
7
|
-
|
|
8
|
-
## Form summary
|
|
9
|
-
|
|
10
|
-
### Example: Request summary
|
|
11
|
-
|
|
12
|
-
Request summary
|
|
13
|
-
Generated client request data
|
|
14
|
-
|
|
15
|
-
Contact personEunice Cole
|
|
16
|
-
Requested roleNational Branding Analyst
|
|
17
|
-
Contact emailOlivia7@gmail.com
|
|
18
|
-
Annual budget€99,514.00
|
|
19
|
-
Project descriptionEt consuasor summisse tempore valde.
|
|
20
|
-
Crinis adimpleo contigo enim aedificium valde.
|
|
21
|
-
Solutio similique stillicidium expedita tandem denego cursim timidus coerceo.
|
|
22
|
-
Supporting filesproject-outline.pdf
|
|
23
|
-
2.4MB
|
|
24
|
-
Download
|
|
25
|
-
|
|
26
|
-
wireframes.pdf
|
|
27
|
-
3.7MB
|
|
28
|
-
Download
|
|
29
|
-
|
|
30
|
-
#### Summary
|
|
31
|
-
|
|
32
|
-
Request summary
|
|
33
|
-
Generated client request data
|
|
34
|
-
|
|
35
|
-
Contact personEunice Cole
|
|
36
|
-
Requested roleNational Branding Analyst
|
|
37
|
-
Contact emailOlivia7@gmail.com
|
|
38
|
-
Annual budget€99,514.00
|
|
39
|
-
Project descriptionEt consuasor summisse tempore valde.
|
|
40
|
-
Crinis adimpleo contigo enim aedificium valde.
|
|
41
|
-
Solutio similique stillicidium expedita tandem denego cursim timidus coerceo.
|
|
42
|
-
Supporting filesproject-outline.pdf
|
|
43
|
-
2.4MB
|
|
44
|
-
Download
|
|
45
|
-
|
|
46
|
-
wireframes.pdf
|
|
47
|
-
3.7MB
|
|
48
|
-
Download
|
|
49
|
-
|
|
50
|
-
#### React (tsx)
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
import { faker } from '@faker-js/faker';
|
|
54
|
-
import Button from '@rio-cloud/rio-uikit/Button';
|
|
55
|
-
import { FormattedNumber } from 'react-intl';
|
|
56
|
-
|
|
57
|
-
export default () => {
|
|
58
|
-
const subjectInfo = {
|
|
59
|
-
fullName: faker.person.fullName(),
|
|
60
|
-
role: faker.person.jobTitle(),
|
|
61
|
-
email: faker.internet.email(),
|
|
62
|
-
budget: faker.number.int({ min: 50_000, max: 200_000 }),
|
|
63
|
-
description: faker.lorem.lines(3),
|
|
64
|
-
attachments: [
|
|
65
|
-
{
|
|
66
|
-
name: 'project-outline.pdf',
|
|
67
|
-
sizeMB: 2.4,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name: 'wireframes.pdf',
|
|
71
|
-
sizeMB: 3.7,
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<div className='max-width-600 margin-auto'>
|
|
78
|
-
<div>
|
|
79
|
-
<div className='padding-x-5'>
|
|
80
|
-
<h3 className='text-base/7 font-semibold text-text-color-darker'>Request summary</h3>
|
|
81
|
-
<p className='mt-1 max-w-2xl text-sm/6 text-gray-500'>Generated client request data</p>
|
|
82
|
-
</div>
|
|
83
|
-
<div className='mt-6 border-t border-gray-100'>
|
|
84
|
-
<dl className='divider-y-1 divider-color-lighter divider-style-solid'>
|
|
85
|
-
<div className='display-grid grid-cols-3 padding-x-5 padding-y-15'>
|
|
86
|
-
<dt className='text-medium text-color-darkest'>Contact person</dt>
|
|
87
|
-
<dd className='grid-colspan-2 text-color-darker'>{subjectInfo.fullName}</dd>
|
|
88
|
-
</div>
|
|
89
|
-
<div className='display-grid grid-cols-3 padding-x-5 padding-y-15'>
|
|
90
|
-
<dt className='text-medium text-color-darkest'>Requested role</dt>
|
|
91
|
-
<dd className='grid-colspan-2 text-color-darker'>{subjectInfo.role}</dd>
|
|
92
|
-
</div>
|
|
93
|
-
<div className='display-grid grid-cols-3 padding-x-5 padding-y-15'>
|
|
94
|
-
<dt className='text-medium text-color-darkest'>Contact email</dt>
|
|
95
|
-
<dd className='grid-colspan-2 text-color-darker'>{subjectInfo.email}</dd>
|
|
96
|
-
</div>
|
|
97
|
-
<div className='display-grid grid-cols-3 padding-x-5 padding-y-15'>
|
|
98
|
-
<dt className='text-medium text-color-darkest'>Annual budget</dt>
|
|
99
|
-
<dd className='grid-colspan-2 text-color-darker'>
|
|
100
|
-
<FormattedNumber value={subjectInfo.budget} style='currency' currency='EUR' />
|
|
101
|
-
</dd>
|
|
102
|
-
</div>
|
|
103
|
-
<div className='display-grid grid-cols-3 padding-x-5 padding-y-15'>
|
|
104
|
-
<dt className='text-medium text-color-darkest'>Project description</dt>
|
|
105
|
-
<dd className='grid-colspan-2 text-color-darker'>{subjectInfo.description}</dd>
|
|
106
|
-
</div>
|
|
107
|
-
<div className='display-grid grid-cols-3 padding-x-5 padding-y-15'>
|
|
108
|
-
<dt className='text-medium text-color-darkest'>Supporting files</dt>
|
|
109
|
-
<dd className='grid-colspan-2'>
|
|
110
|
-
<div className='list-group border rounded'>
|
|
111
|
-
{subjectInfo.attachments.map(file => (
|
|
112
|
-
<div
|
|
113
|
-
key={file.name}
|
|
114
|
-
className='list-group-item display-flex flex-wrap justify-content-between display-grid-sm grid-cols-7-sm align-items-center column-gap-5 padding-x-15 padding-y-5'
|
|
115
|
-
>
|
|
116
|
-
<div className='grid-colspan-4'>{file.name}</div>
|
|
117
|
-
<div className='text-color-dark text-size-12'>
|
|
118
|
-
<FormattedNumber
|
|
119
|
-
value={file.sizeMB}
|
|
120
|
-
style='unit'
|
|
121
|
-
unit='megabyte'
|
|
122
|
-
unitDisplay='narrow'
|
|
123
|
-
/>
|
|
124
|
-
</div>
|
|
125
|
-
<div className='grid-colspan-2 text-right'>
|
|
126
|
-
<Button variant='link'>Download</Button>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
))}
|
|
130
|
-
</div>
|
|
131
|
-
</dd>
|
|
132
|
-
</div>
|
|
133
|
-
</dl>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
);
|
|
138
|
-
};
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
#### HTML (html)
|
|
142
|
-
|
|
143
|
-
```html
|
|
144
|
-
<div class="max-width-600 margin-auto">
|
|
145
|
-
<div>
|
|
146
|
-
<div class="padding-x-5">
|
|
147
|
-
<h3 class="text-base/7 font-semibold text-text-color-darker">Request summary</h3>
|
|
148
|
-
<p class="mt-1 max-w-2xl text-sm/6 text-gray-500">Generated client request data</p>
|
|
149
|
-
</div>
|
|
150
|
-
<div class="mt-6 border-t border-gray-100">
|
|
151
|
-
<dl class="divider-y-1 divider-color-lighter divider-style-solid">
|
|
152
|
-
<div class="display-grid grid-cols-3 padding-x-5 padding-y-15">
|
|
153
|
-
<dt class="text-medium text-color-darkest">Contact person</dt>
|
|
154
|
-
<dd class="grid-colspan-2 text-color-darker">Eunice Cole</dd>
|
|
155
|
-
</div>
|
|
156
|
-
<div class="display-grid grid-cols-3 padding-x-5 padding-y-15">
|
|
157
|
-
<dt class="text-medium text-color-darkest">Requested role</dt>
|
|
158
|
-
<dd class="grid-colspan-2 text-color-darker">National Branding Analyst</dd>
|
|
159
|
-
</div>
|
|
160
|
-
<div class="display-grid grid-cols-3 padding-x-5 padding-y-15">
|
|
161
|
-
<dt class="text-medium text-color-darkest">Contact email</dt>
|
|
162
|
-
<dd class="grid-colspan-2 text-color-darker">Olivia7@gmail.com</dd>
|
|
163
|
-
</div>
|
|
164
|
-
<div class="display-grid grid-cols-3 padding-x-5 padding-y-15">
|
|
165
|
-
<dt class="text-medium text-color-darkest">Annual budget</dt>
|
|
166
|
-
<dd class="grid-colspan-2 text-color-darker">€99,514.00</dd>
|
|
167
|
-
</div>
|
|
168
|
-
<div class="display-grid grid-cols-3 padding-x-5 padding-y-15">
|
|
169
|
-
<dt class="text-medium text-color-darkest">Project description</dt>
|
|
170
|
-
<dd class="grid-colspan-2 text-color-darker">Et consuasor summisse tempore valde.
|
|
171
|
-
Crinis adimpleo contigo enim aedificium valde.
|
|
172
|
-
Solutio similique stillicidium expedita tandem denego cursim timidus coerceo.</dd>
|
|
173
|
-
</div>
|
|
174
|
-
<div class="display-grid grid-cols-3 padding-x-5 padding-y-15">
|
|
175
|
-
<dt class="text-medium text-color-darkest">Supporting files</dt>
|
|
176
|
-
<dd class="grid-colspan-2">
|
|
177
|
-
<div class="list-group border rounded">
|
|
178
|
-
<div class="list-group-item display-flex flex-wrap justify-content-between display-grid-sm grid-cols-7-sm align-items-center column-gap-5 padding-x-15 padding-y-5">
|
|
179
|
-
<div class="grid-colspan-4">project-outline.pdf</div>
|
|
180
|
-
<div class="text-color-dark text-size-12">2.4MB</div>
|
|
181
|
-
<div class="grid-colspan-2 text-right">
|
|
182
|
-
<button type="button" class="btn btn-default btn-link btn-component" tabindex="0">Download</button>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
<div class="list-group-item display-flex flex-wrap justify-content-between display-grid-sm grid-cols-7-sm align-items-center column-gap-5 padding-x-15 padding-y-5">
|
|
186
|
-
<div class="grid-colspan-4">wireframes.pdf</div>
|
|
187
|
-
<div class="text-color-dark text-size-12">3.7MB</div>
|
|
188
|
-
<div class="grid-colspan-2 text-right">
|
|
189
|
-
<button type="button" class="btn btn-default btn-link btn-component" tabindex="0">Download</button>
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
</div>
|
|
193
|
-
</dd>
|
|
194
|
-
</div>
|
|
195
|
-
</dl>
|
|
196
|
-
</div>
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
```
|
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
# Form toggle
|
|
2
|
-
|
|
3
|
-
*Category:* Templates
|
|
4
|
-
*Section:* Forms
|
|
5
|
-
*Source:* https://uikit.developers.rio.cloud/#/templates/form-toggle
|
|
6
|
-
*Captured:* 2026-02-23T13:48:42.030Z
|
|
7
|
-
|
|
8
|
-
## Form toggle
|
|
9
|
-
|
|
10
|
-
### Example: Example 1
|
|
11
|
-
|
|
12
|
-
Size by form-group
|
|
13
|
-
Note
|
|
14
|
-
Different form-group sizes come with different bottom spacing
|
|
15
|
-
|
|
16
|
-
Wrapped by sized form-groups
|
|
17
|
-
form-group-sm + form-group-not-editableLorem Ipsum Dolor
|
|
18
|
-
|
|
19
|
-
form-group + form-group-not-editableLorem Ipsum Dolor
|
|
20
|
-
|
|
21
|
-
form-group-lg + form-group-not-editableLorem Ipsum Dolor
|
|
22
|
-
|
|
23
|
-
Edit
|
|
24
|
-
|
|
25
|
-
Size by input-group
|
|
26
|
-
Note
|
|
27
|
-
No form-group size results in the same bottom spacing
|
|
28
|
-
|
|
29
|
-
Wrapped only by form-group
|
|
30
|
-
input-group-sm input-group-not-editableLorem Ipsum Dolor
|
|
31
|
-
|
|
32
|
-
input-group input-group-not-editableLorem Ipsum Dolor
|
|
33
|
-
|
|
34
|
-
input-group-lg input-group-not-editableLorem Ipsum Dolor
|
|
35
|
-
|
|
36
|
-
Edit
|
|
37
|
-
|
|
38
|
-
#### Summary
|
|
39
|
-
|
|
40
|
-
Size by form-group
|
|
41
|
-
Note
|
|
42
|
-
Different form-group sizes come with different bottom spacing
|
|
43
|
-
|
|
44
|
-
Wrapped by sized form-groups
|
|
45
|
-
form-group-sm + form-group-not-editableLorem Ipsum Dolor
|
|
46
|
-
|
|
47
|
-
form-group + form-group-not-editableLorem Ipsum Dolor
|
|
48
|
-
|
|
49
|
-
form-group-lg + form-group-not-editableLorem Ipsum Dolor
|
|
50
|
-
|
|
51
|
-
Edit
|
|
52
|
-
|
|
53
|
-
Size by input-group
|
|
54
|
-
Note
|
|
55
|
-
No form-group size results in the same bottom spacing
|
|
56
|
-
|
|
57
|
-
Wrapped only by form-group
|
|
58
|
-
input-group-sm input-group-not-editableLorem Ipsum Dolor
|
|
59
|
-
|
|
60
|
-
input-group input-group-not-editableLorem Ipsum Dolor
|
|
61
|
-
|
|
62
|
-
input-group-lg input-group-not-editableLorem Ipsum Dolor
|
|
63
|
-
|
|
64
|
-
Edit
|
|
65
|
-
|
|
66
|
-
#### React (tsx)
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
import { useState } from 'react';
|
|
70
|
-
|
|
71
|
-
import { Note } from '../../../components/Note';
|
|
72
|
-
|
|
73
|
-
import Button from '@rio-cloud/rio-uikit/Button';
|
|
74
|
-
import Card from '@rio-cloud/rio-uikit/Card';
|
|
75
|
-
import FormLabel from '@rio-cloud/rio-uikit/FormLabel';
|
|
76
|
-
|
|
77
|
-
type FormGroupProps = {
|
|
78
|
-
size?: 'sm' | 'lg';
|
|
79
|
-
value: string;
|
|
80
|
-
editMode: boolean;
|
|
81
|
-
onChange: VoidFunction;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const FormGroup = ({ size, value, editMode, onChange }: FormGroupProps) => {
|
|
85
|
-
return (
|
|
86
|
-
<div className={`form-group ${size ? `form-group-${size}` : ''} ${!editMode ? 'form-group-not-editable' : ''}`}>
|
|
87
|
-
<FormLabel htmlFor='input1'>{`form-group${size ? `-${size}` : ''} ${
|
|
88
|
-
!editMode ? '+ form-group-not-editable' : ''
|
|
89
|
-
}`}</FormLabel>
|
|
90
|
-
{editMode ? (
|
|
91
|
-
<div className='input-group'>
|
|
92
|
-
<input id='input1' className='form-control' type='text' defaultValue={value} onChange={onChange} />
|
|
93
|
-
<span className='input-group-btn'>
|
|
94
|
-
<Button
|
|
95
|
-
iconOnly
|
|
96
|
-
iconName='rioglyph-trash'
|
|
97
|
-
bsSize={size}
|
|
98
|
-
className={!editMode ? 'form-group-not-editable' : ''}
|
|
99
|
-
/>
|
|
100
|
-
</span>
|
|
101
|
-
</div>
|
|
102
|
-
) : (
|
|
103
|
-
<div>{value}</div>
|
|
104
|
-
)}
|
|
105
|
-
</div>
|
|
106
|
-
);
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
type InputGroupProps = {
|
|
110
|
-
size?: 'sm' | 'lg';
|
|
111
|
-
value: string;
|
|
112
|
-
editMode: boolean;
|
|
113
|
-
onChange: VoidFunction;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
const InputGroup = ({ size, value, editMode, onChange }: InputGroupProps) => {
|
|
117
|
-
return (
|
|
118
|
-
<>
|
|
119
|
-
<FormLabel htmlFor='input2'>{`input-group${size ? `-${size}` : ''} ${
|
|
120
|
-
!editMode ? 'input-group-not-editable' : ''
|
|
121
|
-
}`}</FormLabel>
|
|
122
|
-
<div
|
|
123
|
-
className={`input-group ${size ? `input-group-${size}` : ''} ${
|
|
124
|
-
!editMode ? '+ input-group-not-editable' : ''
|
|
125
|
-
}`}
|
|
126
|
-
>
|
|
127
|
-
{editMode ? (
|
|
128
|
-
<>
|
|
129
|
-
<input
|
|
130
|
-
id='input2'
|
|
131
|
-
className='form-control'
|
|
132
|
-
type='text'
|
|
133
|
-
defaultValue={value}
|
|
134
|
-
onChange={onChange}
|
|
135
|
-
/>
|
|
136
|
-
<span className='input-group-btn'>
|
|
137
|
-
<Button
|
|
138
|
-
iconOnly
|
|
139
|
-
iconName='rioglyph-trash'
|
|
140
|
-
bsSize={size}
|
|
141
|
-
className={!editMode ? 'form-group-not-editable' : ''}
|
|
142
|
-
/>
|
|
143
|
-
</span>
|
|
144
|
-
</>
|
|
145
|
-
) : (
|
|
146
|
-
<div>{value}</div>
|
|
147
|
-
)}
|
|
148
|
-
</div>
|
|
149
|
-
</>
|
|
150
|
-
);
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
export default () => {
|
|
154
|
-
const [editModes, setEditModes] = useState<Record<string, boolean>>({
|
|
155
|
-
formGroupEditMode: false,
|
|
156
|
-
inputGroupEditMode: false,
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
const [hasFormGroupExampleChanged, setHasFormGroupExampleChanged] = useState(false);
|
|
160
|
-
const [hasInputGroupExampleChanged, setHasInputGroupExampleChanged] = useState(false);
|
|
161
|
-
|
|
162
|
-
const handleFormInputChange = () => setHasFormGroupExampleChanged(true);
|
|
163
|
-
const handleInputChange = () => setHasInputGroupExampleChanged(true);
|
|
164
|
-
|
|
165
|
-
const handleChange = (key: string) => {
|
|
166
|
-
const newState = !editModes[key];
|
|
167
|
-
|
|
168
|
-
setEditModes({
|
|
169
|
-
...editModes,
|
|
170
|
-
[key]: newState,
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
setHasFormGroupExampleChanged(false);
|
|
174
|
-
setHasInputGroupExampleChanged(false);
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
const { formGroupEditMode, inputGroupEditMode } = editModes;
|
|
178
|
-
|
|
179
|
-
return (
|
|
180
|
-
<div className='display-grid gap-25 grid-cols-1 grid-cols-2-sm'>
|
|
181
|
-
<Card className='display-flex flex-column justify-content-between' padding={25}>
|
|
182
|
-
<div>
|
|
183
|
-
<div className='text-medium text-size-18 margin-bottom-5'>Size by form-group</div>
|
|
184
|
-
<Note>Different form-group sizes come with different bottom spacing</Note>
|
|
185
|
-
<hr className='margin-top-20 margin-bottom-15' />
|
|
186
|
-
|
|
187
|
-
<div className='h5'>Wrapped by sized form-groups</div>
|
|
188
|
-
<FormGroup
|
|
189
|
-
onChange={handleFormInputChange}
|
|
190
|
-
editMode={formGroupEditMode}
|
|
191
|
-
size='sm'
|
|
192
|
-
value='Lorem Ipsum Dolor'
|
|
193
|
-
/>
|
|
194
|
-
<FormGroup
|
|
195
|
-
onChange={handleFormInputChange}
|
|
196
|
-
editMode={formGroupEditMode}
|
|
197
|
-
value='Lorem Ipsum Dolor'
|
|
198
|
-
/>
|
|
199
|
-
<FormGroup
|
|
200
|
-
onChange={handleFormInputChange}
|
|
201
|
-
editMode={formGroupEditMode}
|
|
202
|
-
size='lg'
|
|
203
|
-
value='Lorem Ipsum Dolor'
|
|
204
|
-
/>
|
|
205
|
-
</div>
|
|
206
|
-
|
|
207
|
-
<div className={`margin-top-25 display-flex ${formGroupEditMode ? 'justify-content-end' : ''}`}>
|
|
208
|
-
{!formGroupEditMode && (
|
|
209
|
-
<Button iconName='rioglyph-pencil' onClick={() => handleChange('formGroupEditMode')}>
|
|
210
|
-
Edit
|
|
211
|
-
</Button>
|
|
212
|
-
)}
|
|
213
|
-
{formGroupEditMode && (
|
|
214
|
-
<div className='btn-toolbar'>
|
|
215
|
-
<Button onClick={() => handleChange('formGroupEditMode')}>Cancel</Button>
|
|
216
|
-
<Button
|
|
217
|
-
bsStyle='primary'
|
|
218
|
-
disabled={!hasFormGroupExampleChanged}
|
|
219
|
-
onClick={() => handleChange('formGroupEditMode')}
|
|
220
|
-
>
|
|
221
|
-
Save changes
|
|
222
|
-
</Button>
|
|
223
|
-
</div>
|
|
224
|
-
)}
|
|
225
|
-
</div>
|
|
226
|
-
</Card>
|
|
227
|
-
|
|
228
|
-
<Card className='display-flex flex-column justify-content-between' padding={25}>
|
|
229
|
-
<div>
|
|
230
|
-
<div className='text-medium text-size-18 margin-bottom-5'>Size by input-group</div>
|
|
231
|
-
<Note>No form-group size results in the same bottom spacing</Note>
|
|
232
|
-
<hr className='margin-top-20 margin-bottom-15' />
|
|
233
|
-
<div className='h5'>Wrapped only by form-group</div>
|
|
234
|
-
<div className='form-group'>
|
|
235
|
-
<InputGroup
|
|
236
|
-
onChange={handleInputChange}
|
|
237
|
-
editMode={inputGroupEditMode}
|
|
238
|
-
size='sm'
|
|
239
|
-
value='Lorem Ipsum Dolor'
|
|
240
|
-
/>
|
|
241
|
-
</div>
|
|
242
|
-
<div className='form-group'>
|
|
243
|
-
<InputGroup
|
|
244
|
-
onChange={handleInputChange}
|
|
245
|
-
editMode={inputGroupEditMode}
|
|
246
|
-
value='Lorem Ipsum Dolor'
|
|
247
|
-
/>
|
|
248
|
-
</div>
|
|
249
|
-
<div className='form-group'>
|
|
250
|
-
<InputGroup
|
|
251
|
-
onChange={handleInputChange}
|
|
252
|
-
editMode={inputGroupEditMode}
|
|
253
|
-
size='lg'
|
|
254
|
-
value='Lorem Ipsum Dolor'
|
|
255
|
-
/>
|
|
256
|
-
</div>
|
|
257
|
-
</div>
|
|
258
|
-
|
|
259
|
-
<div className={`margin-top-25 display-flex ${inputGroupEditMode ? 'justify-content-end' : ''}`}>
|
|
260
|
-
{!inputGroupEditMode && (
|
|
261
|
-
<Button iconName='rioglyph-pencil' onClick={() => handleChange('inputGroupEditMode')}>
|
|
262
|
-
Edit
|
|
263
|
-
</Button>
|
|
264
|
-
)}
|
|
265
|
-
{inputGroupEditMode && (
|
|
266
|
-
<div className='btn-toolbar'>
|
|
267
|
-
<Button onClick={() => handleChange('inputGroupEditMode')}>Cancel</Button>
|
|
268
|
-
<Button
|
|
269
|
-
bsStyle='primary'
|
|
270
|
-
disabled={!hasInputGroupExampleChanged}
|
|
271
|
-
onClick={() => handleChange('inputGroupEditMode')}
|
|
272
|
-
>
|
|
273
|
-
Save changes
|
|
274
|
-
</Button>
|
|
275
|
-
</div>
|
|
276
|
-
)}
|
|
277
|
-
</div>
|
|
278
|
-
</Card>
|
|
279
|
-
</div>
|
|
280
|
-
);
|
|
281
|
-
};
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
#### HTML (html)
|
|
285
|
-
|
|
286
|
-
```html
|
|
287
|
-
<div class="display-grid gap-25 grid-cols-1 grid-cols-2-sm">
|
|
288
|
-
<div class="bg-white rounded border shadow-default padding-25 display-flex flex-column justify-content-between">
|
|
289
|
-
<div>
|
|
290
|
-
<div class="text-medium text-size-18 margin-bottom-5">Size by form-group</div>
|
|
291
|
-
<div class="display-flex gap-10 max-width-1000 margin-bottom-10 last-child-margin-bottom-0" data-capture-callout="true">
|
|
292
|
-
<div>
|
|
293
|
-
<span class="label label-info label-condensed label-filled">Note</span>
|
|
294
|
-
</div>
|
|
295
|
-
<div class="width-100pct children-first-margin-top-0 children-last-margin-bottom-0 padding-top-1">Different form-group sizes come with different bottom spacing</div>
|
|
296
|
-
</div>
|
|
297
|
-
<hr class="margin-top-20 margin-bottom-15">
|
|
298
|
-
<div class="h5">Wrapped by sized form-groups</div>
|
|
299
|
-
<div class="form-group form-group-sm form-group-not-editable">
|
|
300
|
-
<label for="input1" class="display-inline-block">
|
|
301
|
-
<span>form-group-sm + form-group-not-editable</span>
|
|
302
|
-
</label>
|
|
303
|
-
<div>Lorem Ipsum Dolor</div>
|
|
304
|
-
</div>
|
|
305
|
-
<div class="form-group form-group-not-editable">
|
|
306
|
-
<label for="input1" class="display-inline-block">
|
|
307
|
-
<span>form-group + form-group-not-editable</span>
|
|
308
|
-
</label>
|
|
309
|
-
<div>Lorem Ipsum Dolor</div>
|
|
310
|
-
</div>
|
|
311
|
-
<div class="form-group form-group-lg form-group-not-editable">
|
|
312
|
-
<label for="input1" class="display-inline-block">
|
|
313
|
-
<span>form-group-lg + form-group-not-editable</span>
|
|
314
|
-
</label>
|
|
315
|
-
<div>Lorem Ipsum Dolor</div>
|
|
316
|
-
</div>
|
|
317
|
-
</div>
|
|
318
|
-
<div class="margin-top-25 display-flex ">
|
|
319
|
-
<button type="button" class="btn btn-default btn-component" tabindex="0">
|
|
320
|
-
<span class="rioglyph rioglyph-pencil">
|
|
321
|
-
</span>Edit</button>
|
|
322
|
-
</div>
|
|
323
|
-
</div>
|
|
324
|
-
<div class="bg-white rounded border shadow-default padding-25 display-flex flex-column justify-content-between">
|
|
325
|
-
<div>
|
|
326
|
-
<div class="text-medium text-size-18 margin-bottom-5">Size by input-group</div>
|
|
327
|
-
<div class="display-flex gap-10 max-width-1000 margin-bottom-10 last-child-margin-bottom-0" data-capture-callout="true">
|
|
328
|
-
<div>
|
|
329
|
-
<span class="label label-info label-condensed label-filled">Note</span>
|
|
330
|
-
</div>
|
|
331
|
-
<div class="width-100pct children-first-margin-top-0 children-last-margin-bottom-0 padding-top-1">No form-group size results in the same bottom spacing</div>
|
|
332
|
-
</div>
|
|
333
|
-
<hr class="margin-top-20 margin-bottom-15">
|
|
334
|
-
<div class="h5">Wrapped only by form-group</div>
|
|
335
|
-
<div class="form-group">
|
|
336
|
-
<label for="input2" class="display-inline-block">
|
|
337
|
-
<span>input-group-sm input-group-not-editable</span>
|
|
338
|
-
</label>
|
|
339
|
-
<div class="input-group input-group-sm + input-group-not-editable">
|
|
340
|
-
<div>Lorem Ipsum Dolor</div>
|
|
341
|
-
</div>
|
|
342
|
-
</div>
|
|
343
|
-
<div class="form-group">
|
|
344
|
-
<label for="input2" class="display-inline-block">
|
|
345
|
-
<span>input-group input-group-not-editable</span>
|
|
346
|
-
</label>
|
|
347
|
-
<div class="input-group + input-group-not-editable">
|
|
348
|
-
<div>Lorem Ipsum Dolor</div>
|
|
349
|
-
</div>
|
|
350
|
-
</div>
|
|
351
|
-
<div class="form-group">
|
|
352
|
-
<label for="input2" class="display-inline-block">
|
|
353
|
-
<span>input-group-lg input-group-not-editable</span>
|
|
354
|
-
</label>
|
|
355
|
-
<div class="input-group input-group-lg + input-group-not-editable">
|
|
356
|
-
<div>Lorem Ipsum Dolor</div>
|
|
357
|
-
</div>
|
|
358
|
-
</div>
|
|
359
|
-
</div>
|
|
360
|
-
<div class="margin-top-25 display-flex ">
|
|
361
|
-
<button type="button" class="btn btn-default btn-component" tabindex="0">
|
|
362
|
-
<span class="rioglyph rioglyph-pencil">
|
|
363
|
-
</span>Edit</button>
|
|
364
|
-
</div>
|
|
365
|
-
</div>
|
|
366
|
-
</div>
|
|
367
|
-
```
|