@rio-cloud/uikit-mcp 1.1.4 → 1.1.6
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 +1 -0
- package/dist/doc-metadata.json +188 -88
- package/dist/docs/components/accentBar.md +35 -3
- package/dist/docs/components/activity.md +14 -3
- package/dist/docs/components/animatedNumber.md +17 -4
- package/dist/docs/components/animatedTextReveal.md +54 -8
- package/dist/docs/components/animations.md +33 -33
- package/dist/docs/components/appHeader.md +65 -9
- package/dist/docs/components/appLayout.md +566 -61
- package/dist/docs/components/appNavigationBar.md +55 -3
- package/dist/docs/components/areaCharts.md +14 -14
- package/dist/docs/components/aspectRatioPlaceholder.md +11 -3
- package/dist/docs/components/assetTree.md +1174 -328
- package/dist/docs/components/autosuggests.md +2 -2
- package/dist/docs/components/avatar.md +25 -3
- package/dist/docs/components/banner.md +3 -3
- package/dist/docs/components/barCharts.md +38 -38
- package/dist/docs/components/barList.md +22 -10
- package/dist/docs/components/basicMap.md +2 -2
- package/dist/docs/components/bottomSheet.md +100 -3
- package/dist/docs/components/button.md +549 -36
- package/dist/docs/components/buttonToolbar.md +10 -3
- package/dist/docs/components/calendarStripe.md +127 -85
- package/dist/docs/components/card.md +11 -3
- package/dist/docs/components/carousel.md +2 -2
- package/dist/docs/components/chartColors.md +2 -2
- package/dist/docs/components/chartsGettingStarted.md +2 -2
- package/dist/docs/components/chat.md +3 -3
- package/dist/docs/components/checkbox.md +67 -45
- package/dist/docs/components/circularProgress.md +465 -0
- package/dist/docs/components/clearableInput.md +18 -18
- package/dist/docs/components/collapse.md +28 -4
- package/dist/docs/components/composedCharts.md +20 -20
- package/dist/docs/components/contentLoader.md +126 -105
- package/dist/docs/components/dataTabs.md +191 -11
- package/dist/docs/components/datepickers.md +735 -723
- package/dist/docs/components/dialogs.md +362 -2
- package/dist/docs/components/divider.md +15 -3
- package/dist/docs/components/dropdowns.md +4548 -4355
- package/dist/docs/components/editableContent.md +187 -3
- package/dist/docs/components/expander.md +52 -5
- package/dist/docs/components/fade.md +42 -7
- package/dist/docs/components/fadeExpander.md +13 -4
- package/dist/docs/components/fadeUp.md +22 -4
- package/dist/docs/components/feedback.md +44 -3
- package/dist/docs/components/filePickers.md +45 -3
- package/dist/docs/components/formLabel.md +20 -5
- package/dist/docs/components/groupedItemList.md +54 -3
- package/dist/docs/components/iconList.md +5 -5
- package/dist/docs/components/imagePreloader.md +7 -3
- package/dist/docs/components/labeledElement.md +13 -3
- package/dist/docs/components/licensePlate.md +11 -3
- package/dist/docs/components/lineCharts.md +10 -10
- package/dist/docs/components/listMenu.md +78 -8
- package/dist/docs/components/loadMore.md +29 -3
- package/dist/docs/components/mainNavigation.md +5 -5
- package/dist/docs/components/mapCircle.md +2 -2
- package/dist/docs/components/mapCluster.md +2 -2
- package/dist/docs/components/mapContext.md +2 -2
- package/dist/docs/components/mapDraggableMarker.md +2 -2
- package/dist/docs/components/mapGettingStarted.md +2 -2
- package/dist/docs/components/mapInfoBubble.md +2 -2
- package/dist/docs/components/mapLayerGroup.md +2 -2
- package/dist/docs/components/mapMarker.md +2 -2
- package/dist/docs/components/mapPolygon.md +2 -2
- package/dist/docs/components/mapRoute.md +2 -2
- package/dist/docs/components/mapRouteGenerator.md +2 -2
- package/dist/docs/components/mapSettings.md +9 -9
- package/dist/docs/components/mapUtils.md +2 -2
- package/dist/docs/components/multiselects.md +2 -2
- package/dist/docs/components/noData.md +23 -3
- package/dist/docs/components/notifications.md +2 -2
- package/dist/docs/components/numbercontrol.md +54 -5
- package/dist/docs/components/onboarding.md +26 -2
- package/dist/docs/components/page.md +33 -3
- package/dist/docs/components/pager.md +15 -3
- package/dist/docs/components/pieCharts.md +89 -78
- package/dist/docs/components/popover.md +40 -2
- package/dist/docs/components/position.md +11 -3
- package/dist/docs/components/radialBarCharts.md +2054 -2012
- package/dist/docs/components/radioCardGroup.md +487 -0
- package/dist/docs/components/radiobutton.md +138 -10
- package/dist/docs/components/releaseNotes.md +19 -2
- package/dist/docs/components/resizer.md +14 -3
- package/dist/docs/components/responsiveColumnStripe.md +20 -3
- package/dist/docs/components/responsiveVideo.md +12 -3
- package/dist/docs/components/rioglyph.md +13 -3
- package/dist/docs/components/rules.md +95 -5
- package/dist/docs/components/saveableInput.md +400 -276
- package/dist/docs/components/selects.md +2 -2
- package/dist/docs/components/sidebar.md +39 -3
- package/dist/docs/components/sliders.md +38 -3
- package/dist/docs/components/smoothScrollbars.md +93 -3
- package/dist/docs/components/spinners.md +51 -3
- package/dist/docs/components/states.md +217 -2
- package/dist/docs/components/statsWidgets.md +123 -3
- package/dist/docs/components/statusBar.md +29 -3
- package/dist/docs/components/stepButton.md +9 -3
- package/dist/docs/components/steppedProgressBars.md +67 -3
- package/dist/docs/components/subNavigation.md +24 -17
- package/dist/docs/components/supportMarker.md +2 -2
- package/dist/docs/components/svgImage.md +13 -3
- package/dist/docs/components/switch.md +218 -82
- package/dist/docs/components/tables.md +2 -2
- package/dist/docs/components/tagManager.md +56 -2
- package/dist/docs/components/tags.md +33 -3
- package/dist/docs/components/teaser.md +30 -3
- package/dist/docs/components/textTruncateMiddle.md +151 -0
- package/dist/docs/components/timeline.md +2 -2
- package/dist/docs/components/timepicker.md +687 -63
- package/dist/docs/components/toggleButton.md +96 -10
- package/dist/docs/components/tooltip.md +30 -21
- package/dist/docs/components/tracker.md +631 -0
- package/dist/docs/components/virtualList.md +107 -84
- package/dist/docs/foundations.md +647 -275
- package/dist/docs/start/changelog.md +2 -738
- package/dist/docs/start/goodtoknow.md +2 -2
- package/dist/docs/start/guidelines/color-combinations.md +2 -2
- package/dist/docs/start/guidelines/custom-css.md +2 -2
- package/dist/docs/start/guidelines/custom-rioglyph.md +2 -2
- package/dist/docs/start/guidelines/formatting.md +2 -2
- package/dist/docs/start/guidelines/iframe.md +2 -2
- package/dist/docs/start/guidelines/obfuscate-data.md +2 -2
- package/dist/docs/start/guidelines/print-css.md +2 -2
- package/dist/docs/start/guidelines/spinner.md +82 -82
- package/dist/docs/start/guidelines/state-in-url.md +263 -0
- package/dist/docs/start/guidelines/supported-browsers.md +2 -2
- package/dist/docs/start/guidelines/writing.md +2 -2
- package/dist/docs/start/howto.md +10 -10
- package/dist/docs/start/intro.md +2 -2
- package/dist/docs/start/responsiveness.md +2 -2
- package/dist/docs/templates/common-table.md +15 -14
- package/dist/docs/templates/detail-views.md +3 -3
- package/dist/docs/templates/expandable-details.md +2 -2
- package/dist/docs/templates/feature-cards.md +56 -56
- package/dist/docs/templates/form-summary.md +23 -23
- package/dist/docs/templates/form-toggle.md +2 -2
- package/dist/docs/templates/list-blocks.md +204 -204
- package/dist/docs/templates/loading-progress.md +2 -2
- package/dist/docs/templates/options-panel.md +2 -2
- package/dist/docs/templates/panel-variants.md +2 -2
- package/dist/docs/templates/progress-cards.md +2 -2
- package/dist/docs/templates/progress-success.md +2 -2
- package/dist/docs/templates/settings-form.md +24 -24
- package/dist/docs/templates/stats-blocks.md +18 -18
- package/dist/docs/templates/table-panel.md +2 -2
- package/dist/docs/templates/table-row-animation.md +2 -2
- package/dist/docs/templates/usage-cards.md +2 -2
- package/dist/docs/utilities/classNames.md +191 -0
- package/dist/docs/utilities/deviceUtils.md +2 -2
- package/dist/docs/utilities/featureToggles.md +2 -2
- package/dist/docs/utilities/fuelTypeUtils.md +2 -2
- package/dist/docs/utilities/routeUtils.md +326 -90
- package/dist/docs/utilities/useAfterMount.md +2 -2
- package/dist/docs/utilities/useAutoAnimate.md +2 -2
- package/dist/docs/utilities/useAverage.md +2 -2
- package/dist/docs/utilities/useClickOutside.md +2 -2
- package/dist/docs/utilities/useClipboard.md +3 -3
- package/dist/docs/utilities/useCookies.md +188 -0
- package/dist/docs/utilities/useCount.md +2 -2
- package/dist/docs/utilities/useDarkMode.md +2 -2
- package/dist/docs/utilities/useDebugInfo.md +5 -5
- package/dist/docs/utilities/useEffectOnce.md +2 -2
- package/dist/docs/utilities/useElapsedTime.md +2 -2
- package/dist/docs/utilities/useElementSize.md +2 -2
- package/dist/docs/utilities/useEsc.md +2 -2
- package/dist/docs/utilities/useEvent.md +2 -2
- package/dist/docs/utilities/useFocusTrap.md +2 -2
- package/dist/docs/utilities/useFullscreen.md +2 -2
- package/dist/docs/utilities/useHover.md +2 -2
- package/dist/docs/utilities/useIncomingPostMessages.md +2 -2
- package/dist/docs/utilities/useInterval.md +2 -2
- package/dist/docs/utilities/useIsFocusWithin.md +2 -2
- package/dist/docs/utilities/useKey.md +2 -2
- package/dist/docs/utilities/useLocalStorage.md +2 -2
- package/dist/docs/utilities/useLocationSuggestions.md +2 -2
- package/dist/docs/utilities/useMax.md +2 -2
- package/dist/docs/utilities/useMin.md +2 -2
- package/dist/docs/utilities/useMutationObserver.md +2 -2
- package/dist/docs/utilities/useOnScreen.md +2 -2
- package/dist/docs/utilities/useOnlineStatus.md +2 -2
- package/dist/docs/utilities/usePostMessage.md +3 -3
- package/dist/docs/utilities/usePostMessageSender.md +2 -2
- package/dist/docs/utilities/usePrevious.md +2 -2
- package/dist/docs/utilities/useResizeObserver.md +2 -2
- package/dist/docs/utilities/useRioCookieConsent.md +90 -0
- package/dist/docs/utilities/useScrollPosition.md +2 -2
- package/dist/docs/utilities/useSearch.md +2 -2
- package/dist/docs/utilities/useSearchHighlight.md +815 -0
- package/dist/docs/utilities/useSorting.md +2 -2
- package/dist/docs/utilities/useStateWithValidation.md +2 -2
- package/dist/docs/utilities/useSum.md +2 -2
- package/dist/docs/utilities/useTableExport.md +53 -53
- package/dist/docs/utilities/useTableSelection.md +90 -90
- package/dist/docs/utilities/useTimeout.md +2 -2
- package/dist/docs/utilities/useToggle.md +3 -3
- package/dist/docs/utilities/useUrlState.md +418 -0
- package/dist/docs/utilities/useWindowResize.md +2 -2
- package/dist/index.mjs +8 -8
- package/dist/version.json +2 -2
- package/package.json +9 -9
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
*Category:* Components
|
|
4
4
|
*Section:* Misc
|
|
5
|
-
*Source:* https://uikit.developers.rio.cloud
|
|
6
|
-
*Captured:* 2026-
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#/components/tagManager
|
|
6
|
+
*Captured:* 2026-02-23T13:42:33.470Z
|
|
7
7
|
|
|
8
8
|
The TagManager allows to select and filter for existing tags as well as adding and removing them from a list of tags.
|
|
9
9
|
|
|
@@ -155,6 +155,24 @@ export default () => {
|
|
|
155
155
|
</div>
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
+
#### Props (json)
|
|
159
|
+
|
|
160
|
+
```json
|
|
161
|
+
[
|
|
162
|
+
{
|
|
163
|
+
label: 'Foo',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
label: 'Bar',
|
|
167
|
+
toAdd: true,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
label: 'Lorem ipsum',
|
|
171
|
+
toRemove: true,
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
```
|
|
175
|
+
|
|
158
176
|
### Example: Example 2
|
|
159
177
|
|
|
160
178
|
Lorem
|
|
@@ -257,6 +275,24 @@ export default () => {
|
|
|
257
275
|
</div>
|
|
258
276
|
```
|
|
259
277
|
|
|
278
|
+
#### Props (json)
|
|
279
|
+
|
|
280
|
+
```json
|
|
281
|
+
[
|
|
282
|
+
{
|
|
283
|
+
label: 'Foo',
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
label: 'Bar',
|
|
287
|
+
toAdd: true,
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
label: 'Lorem ipsum',
|
|
291
|
+
toRemove: true,
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
```
|
|
295
|
+
|
|
260
296
|
### Example: Fleet groups
|
|
261
297
|
|
|
262
298
|
Fleet groups
|
|
@@ -419,4 +455,22 @@ export default () => {
|
|
|
419
455
|
</div>
|
|
420
456
|
<button type="button" class="btn btn-default btn-component margin-top-15 disabled" tabindex="0">Save</button>
|
|
421
457
|
</div>
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
#### Props (json)
|
|
461
|
+
|
|
462
|
+
```json
|
|
463
|
+
[
|
|
464
|
+
{
|
|
465
|
+
label: 'Foo',
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
label: 'Bar',
|
|
469
|
+
toAdd: true,
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
label: 'Lorem ipsum',
|
|
473
|
+
toRemove: true,
|
|
474
|
+
}
|
|
475
|
+
]
|
|
422
476
|
```
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
*Category:* Components
|
|
4
4
|
*Section:* Misc
|
|
5
|
-
*Source:* https://uikit.developers.rio.cloud
|
|
6
|
-
*Captured:* 2026-
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#/components/tags
|
|
6
|
+
*Captured:* 2026-02-23T13:42:33.231Z
|
|
7
7
|
|
|
8
8
|
## Tag
|
|
9
9
|
|
|
@@ -753,4 +753,34 @@ export default () => (
|
|
|
753
753
|
</div>
|
|
754
754
|
</div>
|
|
755
755
|
</div>
|
|
756
|
-
```
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
#### Props: Tag
|
|
759
|
+
|
|
760
|
+
### Tag
|
|
761
|
+
|
|
762
|
+
| Name | Type | Default | Description |
|
|
763
|
+
| --- | --- | --- | --- |
|
|
764
|
+
| active | boolean | false | Defines if the tag is active. |
|
|
765
|
+
| clickable | boolean | false | Defines if the tag is clickable. |
|
|
766
|
+
| deletable | boolean | false | Defines if the tag is deletable. |
|
|
767
|
+
| revertable | boolean | false | Defines if the tag is revertable. |
|
|
768
|
+
| disabled | boolean | false | Defines if the tag is disabled. |
|
|
769
|
+
| icon | string | — | Define any rioglyph icon like "rioglyph-truck". |
|
|
770
|
+
| muted | boolean | false | Sets a more subtle style for border and background. |
|
|
771
|
+
| round | boolean | true | Defines if the tag is round. |
|
|
772
|
+
| selectable | boolean | false | Defines if the tag is selectable. |
|
|
773
|
+
| size | 'small' \| 'medium' | — | Defines if you want to render the tag in a different size. Possible values are: 'small' and 'medium' |
|
|
774
|
+
| multiline | boolean | false | Allows to render text on multiple lines. |
|
|
775
|
+
| className | string | — | Additional classes to be set on the wrapper element. |
|
|
776
|
+
|
|
777
|
+
#### Props: TagList
|
|
778
|
+
|
|
779
|
+
### TagList
|
|
780
|
+
|
|
781
|
+
| Name | Type | Default | Description |
|
|
782
|
+
| --- | --- | --- | --- |
|
|
783
|
+
| inline | boolean | true | Defines if the tag list is rendered inline or vertically. |
|
|
784
|
+
| autoTagWidth | boolean | false | Defines if the tag has the same with as it`s parent container. |
|
|
785
|
+
| tagsPerRow | 1 \| 2 \| 3 \| 4 \| 6 | — | Possible values are 1-6 |
|
|
786
|
+
| className | string | — | Additional classes to be set on the wrapper element. |
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
*Category:* Components
|
|
4
4
|
*Section:* Content
|
|
5
|
-
*Source:* https://uikit.developers.rio.cloud
|
|
6
|
-
*Captured:* 2026-
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#/components/teaser
|
|
6
|
+
*Captured:* 2026-02-23T13:42:17.029Z
|
|
7
7
|
|
|
8
8
|
The teaser component was built to create all kinds of landing and/or single pages. for example, be used in dialogs or sidebars.
|
|
9
9
|
|
|
@@ -894,4 +894,31 @@ export default () => (
|
|
|
894
894
|
|
|
895
895
|
| Name | Type | Default | Description |
|
|
896
896
|
| --- | --- | --- | --- |
|
|
897
|
-
| teaserPerRow | number | — |
|
|
897
|
+
| teaserPerRow | number | — | Defines how many children are rendered into a row. If "teaserPerRow" is not defined, the container tries to put all children in a row with regard to the Bootstrap grid. This is done by dividing the amount of children by 12 in order to figure out the col grid classes. It is recommended to define "teasersPerRow" when having more than 4 teasers. Possible values are: 1 2 3 4 6 12 |
|
|
898
|
+
| columnClassName | string | — | Optional string for additional classes added to each column of a child. |
|
|
899
|
+
| className | string | — | Optional string for additional classes added to the row. |
|
|
900
|
+
|
|
901
|
+
#### Props: Teaser
|
|
902
|
+
|
|
903
|
+
### Teaser
|
|
904
|
+
|
|
905
|
+
| Name | Type | Default | Description |
|
|
906
|
+
| --- | --- | --- | --- |
|
|
907
|
+
| headline | string \| React.ReactNode | — | The headline for the teaser. |
|
|
908
|
+
| content | string \| React.ReactNode | — | The actual content to show e.g. some kind of text. |
|
|
909
|
+
| image | TeaserImage | — | Defines an image to render. |
|
|
910
|
+
| └src | string | — | The src URL for the image. |
|
|
911
|
+
| └alt | string | — | The alternate text for the image. |
|
|
912
|
+
| └align | 'left' \| 'right' | — | Defines whether the image is on the left or right side of the component. Possible values are: 'left' and 'right'. |
|
|
913
|
+
| └onClick | VoidFunction | — | Callback function for the image. |
|
|
914
|
+
| └aspectRatio | '1:1' \| '3:1' \| '3:2' \| '16:9' | — | Ratio of the transparent image placeholder. Possible values are '1:1', '3:1', '3:2' and '16:9'. |
|
|
915
|
+
| └className | string | — | Additional classes added to the image wrapper. |
|
|
916
|
+
| button | TeaserButton | — | Defines a button to render with. |
|
|
917
|
+
| └text | string \| React.ReactNode | — | The text content for the button. |
|
|
918
|
+
| └bsStyle | BUTTON_STYLE | 'primary' | The button style. See the button styles definition for possible values. |
|
|
919
|
+
| └onClick | (event: SyntheticEvent<HTMLButtonElement, MouseEvent>) => void | — | Callback function for the button. |
|
|
920
|
+
| └className | string | — | Additional classes added to the button. |
|
|
921
|
+
| verticalAlignment | 'top' \| 'center' | 'top' | Defines where the teaser content is aligned including headline and image. Possible values are: 'top' and 'center'. |
|
|
922
|
+
| segmentation | '50' \| '25:75' \| '75:25' \| '100' | — | Defines how the teaser content is segmented. Possible values are: '50', '25:75', '75:25' and '100'. |
|
|
923
|
+
| footer | string \| React.ReactNode | — | Optional content for footer in case the prop "button" is not sufficient. |
|
|
924
|
+
| className | string | — | Additional classes added to the wrapper. |
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# TextTruncateMiddle
|
|
2
|
+
|
|
3
|
+
*Category:* Components
|
|
4
|
+
*Section:* Content
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#/components/textTruncateMiddle
|
|
6
|
+
*Captured:* 2026-02-23T13:42:18.141Z
|
|
7
|
+
|
|
8
|
+
TextTruncateMiddle truncates long text in the middle and keeps the end segment visible.
|
|
9
|
+
|
|
10
|
+
## TextTruncateMiddle
|
|
11
|
+
|
|
12
|
+
Useful for IDs, URLs, and file names where the suffix helps identify the value quickly.
|
|
13
|
+
|
|
14
|
+
### Example: Example 1
|
|
15
|
+
|
|
16
|
+
Drag the right handle to change width2bb5e796-6c5e-4bc4-871b-f3af-d469-1c1ehttps://service.example.com/fleet/vehicles/2bb5e796-6c5e-4bc4-871b-f3af-d469-1c1e/details
|
|
17
|
+
|
|
18
|
+
Suffix length
|
|
19
|
+
9
|
|
20
|
+
|
|
21
|
+
#### Summary
|
|
22
|
+
|
|
23
|
+
Drag the right handle to change width2bb5e796-6c5e-4bc4-871b-f3af-d469-1c1ehttps://service.example.com/fleet/vehicles/2bb5e796-6c5e-4bc4-871b-f3af-d469-1c1e/details
|
|
24
|
+
|
|
25
|
+
Suffix length
|
|
26
|
+
9
|
|
27
|
+
|
|
28
|
+
#### React (tsx)
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import { useState } from 'react';
|
|
32
|
+
|
|
33
|
+
import Resizer from '@rio-cloud/rio-uikit/Resizer';
|
|
34
|
+
import Slider from '@rio-cloud/rio-uikit/Slider';
|
|
35
|
+
import TextTruncateMiddle from '@rio-cloud/rio-uikit/TextTruncateMiddle';
|
|
36
|
+
|
|
37
|
+
const sampleId = '2bb5e796-6c5e-4bc4-871b-f3af-d469-1c1e';
|
|
38
|
+
const sampleUrl = 'https://service.example.com/fleet/vehicles/2bb5e796-6c5e-4bc4-871b-f3af-d469-1c1e/details';
|
|
39
|
+
|
|
40
|
+
const MIN_SUFFIX_LENGTH = 2;
|
|
41
|
+
const MAX_SUFFIX_LENGTH = 12;
|
|
42
|
+
|
|
43
|
+
const MIN_WIDTH = 220;
|
|
44
|
+
const MAX_WIDTH = 620;
|
|
45
|
+
const INITIAL_WIDTH = 300;
|
|
46
|
+
const INITIAL_SUFFIX_LENGTH = 9;
|
|
47
|
+
|
|
48
|
+
export default () => {
|
|
49
|
+
const [suffixLength, setSuffixLength] = useState(INITIAL_SUFFIX_LENGTH);
|
|
50
|
+
const [contentWidth, setContentWidth] = useState(INITIAL_WIDTH);
|
|
51
|
+
|
|
52
|
+
const onResize = (diff: number) => {
|
|
53
|
+
setContentWidth(currentWidth => {
|
|
54
|
+
const updatedWidth = currentWidth - diff;
|
|
55
|
+
if (updatedWidth < MIN_WIDTH) {
|
|
56
|
+
return MIN_WIDTH;
|
|
57
|
+
}
|
|
58
|
+
if (updatedWidth > MAX_WIDTH) {
|
|
59
|
+
return MAX_WIDTH;
|
|
60
|
+
}
|
|
61
|
+
return updatedWidth;
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div className='max-width-700'>
|
|
67
|
+
<label>Drag the right handle to change width</label>
|
|
68
|
+
|
|
69
|
+
<div className='position-relative border rounded padding-15 bg-white' style={{ width: contentWidth }}>
|
|
70
|
+
<TextTruncateMiddle
|
|
71
|
+
className='border rounded padding-x-10 padding-y-5 margin-bottom-15'
|
|
72
|
+
text={sampleId}
|
|
73
|
+
suffixLength={suffixLength}
|
|
74
|
+
endClassName='text-medium'
|
|
75
|
+
/>
|
|
76
|
+
|
|
77
|
+
<TextTruncateMiddle
|
|
78
|
+
className='border rounded padding-x-10 padding-y-5'
|
|
79
|
+
text={sampleUrl}
|
|
80
|
+
suffixLength={suffixLength}
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
<Resizer
|
|
84
|
+
className='right-0 display-grid place-items-center width-auto height-100pct padding-x-2'
|
|
85
|
+
position={Resizer.RIGHT}
|
|
86
|
+
onResize={onResize}
|
|
87
|
+
>
|
|
88
|
+
<div className='height-30 width-2 bg-gray' />
|
|
89
|
+
</Resizer>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div className='margin-top-20 max-width-300'>
|
|
93
|
+
<label>Suffix length</label>
|
|
94
|
+
<Slider
|
|
95
|
+
value={suffixLength}
|
|
96
|
+
minValue={MIN_SUFFIX_LENGTH}
|
|
97
|
+
maxValue={MAX_SUFFIX_LENGTH}
|
|
98
|
+
step={1}
|
|
99
|
+
valueLabels
|
|
100
|
+
onChange={value => setSuffixLength(value)}
|
|
101
|
+
onDragEnd={value => setSuffixLength(value)}
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
#### HTML (html)
|
|
110
|
+
|
|
111
|
+
```html
|
|
112
|
+
<div class="max-width-700">
|
|
113
|
+
<label>Drag the right handle to change width</label>
|
|
114
|
+
<div class="position-relative border rounded padding-15 bg-white" style="width: 300px;">
|
|
115
|
+
<span class="ellipsis-middle border rounded padding-x-10 padding-y-5 margin-bottom-15" title="2bb5e796-6c5e-4bc4-871b-f3af-d469-1c1e">
|
|
116
|
+
<span class="">2bb5e796-6c5e-4bc4-871b-f3af-</span>
|
|
117
|
+
<span class="text-medium">d469-1c1e</span>
|
|
118
|
+
</span>
|
|
119
|
+
<span class="ellipsis-middle border rounded padding-x-10 padding-y-5" title="https://service.example.com/fleet/vehicles/2bb5e796-6c5e-4bc4-871b-f3af-d469-1c1e/details">
|
|
120
|
+
<span class="">https://service.example.com/fleet/vehicles/2bb5e796-6c5e-4bc4-871b-f3af-d469-1c1</span>
|
|
121
|
+
<span class="">e/details</span>
|
|
122
|
+
</span>
|
|
123
|
+
<div class="Resizer resize-horizontal resize-right right-0 display-grid place-items-center width-auto height-100pct padding-x-2">
|
|
124
|
+
<div class="height-30 width-2 bg-gray">
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="margin-top-20 max-width-300">
|
|
129
|
+
<label>Suffix length</label>
|
|
130
|
+
<div class="range-slider show-value-labels" style="color: var(--brand-primary);">
|
|
131
|
+
<div class="range-whole-track">
|
|
132
|
+
</div>
|
|
133
|
+
<div class="range-track" style="width: 70%;">
|
|
134
|
+
<div class="range-value">
|
|
135
|
+
<span>9</span>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
<input class="" min="2" max="12" step="1" type="range" value="9">
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
#### Props
|
|
145
|
+
|
|
146
|
+
| Name | Type | Default | Description |
|
|
147
|
+
| --- | --- | --- | --- |
|
|
148
|
+
| text | string | — | Full text value to render. |
|
|
149
|
+
| suffixLength | number | 6 | Number of characters preserved at the end. |
|
|
150
|
+
| startClassName | string | — | Additional classes for the first text segment (start). |
|
|
151
|
+
| endClassName | string | — | Additional classes for the second text segment (end). |
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
*Category:* Components
|
|
4
4
|
*Section:* CSS Only
|
|
5
|
-
*Source:* https://uikit.developers.rio.cloud
|
|
6
|
-
*Captured:* 2026-
|
|
5
|
+
*Source:* https://uikit.developers.rio.cloud/#/components/timeline
|
|
6
|
+
*Captured:* 2026-02-23T13:42:34.917Z
|
|
7
7
|
|
|
8
8
|
The timeline component is a pure CSS component.
|
|
9
9
|
|