@rio-cloud/uikit-mcp 1.1.9 → 1.1.10

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.
Files changed (209) hide show
  1. package/dist/doc-metadata.json +325 -85
  2. package/dist/docs/components/accentBar.md +110 -116
  3. package/dist/docs/components/activity.md +1 -1
  4. package/dist/docs/components/analyticsAnalysisOverlay.md +628 -0
  5. package/dist/docs/components/animatedNumber.md +2 -2
  6. package/dist/docs/components/animatedTextReveal.md +53 -55
  7. package/dist/docs/components/animations.md +22 -22
  8. package/dist/docs/components/appHeader.md +27 -38
  9. package/dist/docs/components/appLayout.md +38 -42
  10. package/dist/docs/components/appNavigationBar.md +1 -1
  11. package/dist/docs/components/areaCharts.md +57 -63
  12. package/dist/docs/components/aspectRatioPlaceholder.md +1 -1
  13. package/dist/docs/components/assetTree.md +200 -167
  14. package/dist/docs/components/autosuggests.md +1 -1
  15. package/dist/docs/components/avatar.md +1 -1
  16. package/dist/docs/components/banner.md +2 -2
  17. package/dist/docs/components/barCharts.md +531 -417
  18. package/dist/docs/components/barList.md +9 -9
  19. package/dist/docs/components/basicMap.md +60 -39
  20. package/dist/docs/components/bottomSheet.md +2 -2
  21. package/dist/docs/components/button.md +8 -2
  22. package/dist/docs/components/buttonToolbar.md +1 -1
  23. package/dist/docs/components/calendarStripe.md +57 -65
  24. package/dist/docs/components/card.md +1 -1
  25. package/dist/docs/components/carousel.md +1 -1
  26. package/dist/docs/components/chartColors.md +1 -3
  27. package/dist/docs/components/chartsGettingStarted.md +1 -3
  28. package/dist/docs/components/chat.md +2 -2
  29. package/dist/docs/components/checkbox.md +15 -12
  30. package/dist/docs/components/circularProgress.md +8 -8
  31. package/dist/docs/components/clearableInput.md +1 -1
  32. package/dist/docs/components/collapse.md +2 -4
  33. package/dist/docs/components/composedCharts.md +63 -53
  34. package/dist/docs/components/contentLoader.md +1 -1
  35. package/dist/docs/components/dataTabs.md +33 -33
  36. package/dist/docs/components/datepickers.md +693 -687
  37. package/dist/docs/components/dayPicker.md +5574 -0
  38. package/dist/docs/components/dayPickerCalendar.md +5269 -0
  39. package/dist/docs/components/dialogs.md +17 -19
  40. package/dist/docs/components/divider.md +1 -1
  41. package/dist/docs/components/dropdowns.md +3252 -3276
  42. package/dist/docs/components/editableContent.md +91 -91
  43. package/dist/docs/components/expander.md +4 -1
  44. package/dist/docs/components/fade.md +1 -1
  45. package/dist/docs/components/fadeExpander.md +1 -1
  46. package/dist/docs/components/fadeUp.md +32 -36
  47. package/dist/docs/components/feedback.md +1 -1
  48. package/dist/docs/components/filePickers.md +1 -1
  49. package/dist/docs/components/formLabel.md +29 -31
  50. package/dist/docs/components/groupedItemList.md +3 -7
  51. package/dist/docs/components/htmlTable.md +5074 -0
  52. package/dist/docs/components/iconList.md +4 -4
  53. package/dist/docs/components/imagePreloader.md +1 -1
  54. package/dist/docs/components/labeledElement.md +1 -1
  55. package/dist/docs/components/licensePlate.md +1 -1
  56. package/dist/docs/components/lineCharts.md +172 -172
  57. package/dist/docs/components/listMenu.md +15 -12
  58. package/dist/docs/components/loadMore.md +4 -2
  59. package/dist/docs/components/mainNavigation.md +1 -1
  60. package/dist/docs/components/mapCircle.md +10 -1
  61. package/dist/docs/components/mapCluster.md +23 -1
  62. package/dist/docs/components/mapContext.md +12 -4
  63. package/dist/docs/components/mapDraggableMarker.md +12 -1
  64. package/dist/docs/components/mapGettingStarted.md +1 -1
  65. package/dist/docs/components/mapInfoBubble.md +129 -2
  66. package/dist/docs/components/mapLayerGroup.md +10 -1
  67. package/dist/docs/components/mapMarker.md +10 -3
  68. package/dist/docs/components/mapPolygon.md +288 -85
  69. package/dist/docs/components/mapRoute.md +262 -172
  70. package/dist/docs/components/mapRouteGenerator.md +1 -1
  71. package/dist/docs/components/mapSettings.md +23 -1
  72. package/dist/docs/components/mapUtils.md +1 -1
  73. package/dist/docs/components/multiselects.md +211 -18
  74. package/dist/docs/components/noData.md +1 -1
  75. package/dist/docs/components/notifications.md +2 -2
  76. package/dist/docs/components/numbercontrol.md +15 -15
  77. package/dist/docs/components/onboarding.md +1 -1
  78. package/dist/docs/components/page.md +1 -1
  79. package/dist/docs/components/pager.md +1 -1
  80. package/dist/docs/components/pieCharts.md +237 -213
  81. package/dist/docs/components/popover.md +1 -1
  82. package/dist/docs/components/position.md +1 -1
  83. package/dist/docs/components/radialBarCharts.md +446 -400
  84. package/dist/docs/components/radioCardGroup.md +1 -1
  85. package/dist/docs/components/radiobutton.md +96 -98
  86. package/dist/docs/components/releaseNotes.md +1 -1
  87. package/dist/docs/components/resizer.md +1 -3
  88. package/dist/docs/components/responsiveColumnStripe.md +1 -3
  89. package/dist/docs/components/responsiveVideo.md +1 -1
  90. package/dist/docs/components/rioglyph.md +1 -1
  91. package/dist/docs/components/rules.md +41 -47
  92. package/dist/docs/components/saveableInput.md +252 -252
  93. package/dist/docs/components/selects.md +165 -111
  94. package/dist/docs/components/sidebar.md +1 -1
  95. package/dist/docs/components/sliders.md +1 -1
  96. package/dist/docs/components/smoothScrollbars.md +19 -15
  97. package/dist/docs/components/spinners.md +1 -1
  98. package/dist/docs/components/states.md +1 -1
  99. package/dist/docs/components/statsWidgets.md +1 -1
  100. package/dist/docs/components/statusBar.md +1 -1
  101. package/dist/docs/components/stepButton.md +1 -1
  102. package/dist/docs/components/steppedProgressBars.md +9 -11
  103. package/dist/docs/components/subNavigation.md +1 -1
  104. package/dist/docs/components/supportMarker.md +1 -1
  105. package/dist/docs/components/svgImage.md +1 -1
  106. package/dist/docs/components/switch.md +3 -1
  107. package/dist/docs/components/table.md +19584 -0
  108. package/dist/docs/components/tableControls.md +982 -0
  109. package/dist/docs/components/tagManager.md +1 -1
  110. package/dist/docs/components/tags.md +1 -1
  111. package/dist/docs/components/teaser.md +1 -3
  112. package/dist/docs/components/textTruncateMiddle.md +1 -1
  113. package/dist/docs/components/timeline.md +1 -1
  114. package/dist/docs/components/timepicker.md +1 -1
  115. package/dist/docs/components/toggleButton.md +3 -1
  116. package/dist/docs/components/tooltip.md +4 -2
  117. package/dist/docs/components/tracker.md +1 -1
  118. package/dist/docs/components/virtualList.md +56 -56
  119. package/dist/docs/foundations.md +640 -3122
  120. package/dist/docs/start/changelog.md +53 -3
  121. package/dist/docs/start/goodtoknow.md +2 -4
  122. package/dist/docs/start/guidelines/color-combinations.md +1 -1
  123. package/dist/docs/start/guidelines/custom-css.md +1 -1
  124. package/dist/docs/start/guidelines/custom-rioglyph.md +1 -1
  125. package/dist/docs/start/guidelines/formatting.md +1 -3
  126. package/dist/docs/start/guidelines/iframe.md +17 -19
  127. package/dist/docs/start/guidelines/obfuscate-data.md +2 -4
  128. package/dist/docs/start/guidelines/print-css.md +1 -1
  129. package/dist/docs/start/guidelines/spinner.md +1 -1
  130. package/dist/docs/start/guidelines/state-in-url.md +1 -1
  131. package/dist/docs/start/guidelines/supported-browsers.md +1 -1
  132. package/dist/docs/start/guidelines/writing.md +1 -1
  133. package/dist/docs/start/howto.md +12 -20
  134. package/dist/docs/start/intro.md +1 -1
  135. package/dist/docs/start/responsiveness.md +1 -3
  136. package/dist/docs/templates/ai-assistant.md +311 -0
  137. package/dist/docs/templates/common-table.md +814 -0
  138. package/dist/docs/templates/detail-views.md +846 -0
  139. package/dist/docs/templates/expandable-details.md +214 -0
  140. package/dist/docs/templates/feature-cards.md +479 -0
  141. package/dist/docs/templates/form-summary.md +179 -0
  142. package/dist/docs/templates/form-toggle.md +329 -0
  143. package/dist/docs/templates/list-blocks.md +872 -0
  144. package/dist/docs/templates/loading-progress.md +100 -0
  145. package/dist/docs/templates/options-panel.md +132 -0
  146. package/dist/docs/templates/panel-variants.md +137 -0
  147. package/dist/docs/templates/progress-cards.md +541 -0
  148. package/dist/docs/templates/progress-success.md +125 -0
  149. package/dist/docs/templates/settings-form.md +401 -0
  150. package/dist/docs/templates/stats-blocks.md +1245 -0
  151. package/dist/docs/templates/table-panel.md +310 -0
  152. package/dist/docs/templates/usage-cards.md +199 -0
  153. package/dist/docs/utilities/classNames.md +1 -1
  154. package/dist/docs/utilities/deviceUtils.md +2 -2
  155. package/dist/docs/utilities/featureToggles.md +1 -1
  156. package/dist/docs/utilities/fuelTypeUtils.md +27 -29
  157. package/dist/docs/utilities/getTrackingAttributes.md +277 -0
  158. package/dist/docs/utilities/routeUtils.md +2 -2
  159. package/dist/docs/utilities/useAfterMount.md +1 -1
  160. package/dist/docs/utilities/useAutoAnimate.md +1 -1
  161. package/dist/docs/utilities/useAverage.md +1 -1
  162. package/dist/docs/utilities/useClickOutside.md +1 -1
  163. package/dist/docs/utilities/useClipboard.md +2 -2
  164. package/dist/docs/utilities/useCookies.md +1 -1
  165. package/dist/docs/utilities/useCount.md +1 -1
  166. package/dist/docs/utilities/useDarkMode.md +5 -4
  167. package/dist/docs/utilities/useDebugInfo.md +3 -3
  168. package/dist/docs/utilities/useDraggableElement.md +281 -0
  169. package/dist/docs/utilities/useEffectOnce.md +1 -1
  170. package/dist/docs/utilities/useElapsedTime.md +1 -1
  171. package/dist/docs/utilities/useElementSize.md +1 -1
  172. package/dist/docs/utilities/useEsc.md +1 -1
  173. package/dist/docs/utilities/useEvent.md +1 -1
  174. package/dist/docs/utilities/useFocusTrap.md +1 -1
  175. package/dist/docs/utilities/useFullscreen.md +1 -1
  176. package/dist/docs/utilities/useHover.md +1 -1
  177. package/dist/docs/utilities/useIncomingPostMessages.md +1 -1
  178. package/dist/docs/utilities/useInterval.md +1 -1
  179. package/dist/docs/utilities/useIsFocusWithin.md +1 -1
  180. package/dist/docs/utilities/useKey.md +8 -10
  181. package/dist/docs/utilities/useLocalStorage.md +1 -1
  182. package/dist/docs/utilities/useLocationSuggestions.md +1 -1
  183. package/dist/docs/utilities/useMax.md +1 -1
  184. package/dist/docs/utilities/useMin.md +1 -1
  185. package/dist/docs/utilities/useMutationObserver.md +1 -1
  186. package/dist/docs/utilities/useOnScreen.md +1 -1
  187. package/dist/docs/utilities/useOnlineStatus.md +1 -1
  188. package/dist/docs/utilities/usePostMessage.md +2 -2
  189. package/dist/docs/utilities/usePostMessageSender.md +1 -1
  190. package/dist/docs/utilities/usePrevious.md +2 -4
  191. package/dist/docs/utilities/useResizeObserver.md +35 -15
  192. package/dist/docs/utilities/useRioCookieConsent.md +1 -1
  193. package/dist/docs/utilities/useScrollPosition.md +3 -6
  194. package/dist/docs/utilities/useSearch.md +1 -3
  195. package/dist/docs/utilities/useSearchHighlight.md +1 -1
  196. package/dist/docs/utilities/useSorting.md +370 -239
  197. package/dist/docs/utilities/useStateWithValidation.md +1 -1
  198. package/dist/docs/utilities/useSum.md +1 -1
  199. package/dist/docs/utilities/useTableExport.md +364 -288
  200. package/dist/docs/utilities/useTableSelection.md +88 -92
  201. package/dist/docs/utilities/useTimeout.md +1 -1
  202. package/dist/docs/utilities/useToggle.md +1 -1
  203. package/dist/docs/utilities/useUrlState.md +1 -1
  204. package/dist/docs/utilities/useWindowResize.md +1 -1
  205. package/dist/index.mjs +1 -1
  206. package/dist/search-synonyms.json +2 -2
  207. package/dist/version.json +2 -2
  208. package/package.json +2 -2
  209. package/dist/docs/components/tables.md +0 -8
@@ -0,0 +1,281 @@
1
+ # useDraggableElement
2
+
3
+ *Category:* Utilities
4
+ *Section:* DOM behavior hooks
5
+ *Source:* https://uikit.developers.rio.cloud/#/utilities/useDraggableElement
6
+ *Captured:* 2026-04-20T12:55:53.921Z
7
+
8
+ The useDraggableElement hook provides drag behavior for an element. It manages pointer events, viewport clamping and draggable position state for UI elements like floating panels or overlays. Viewport mode renders through the shared portal root, while container mode is intended for absolutely positioned elements that must stay aligned with a scrollable boundary. The hook can also apply an initial position, including centered placement. The renderElement helper is mainly relevant for viewport mode; in container mode it simply returns the element unchanged.
9
+
10
+ ## useDraggableElement
11
+
12
+ ### Example: Example 1
13
+
14
+ Use the drag icon to move the fixed panel around the viewport. Viewport mode automatically renders through the shared portal root.
15
+ Show draggable element Reset panel position
16
+
17
+ #### React (tsx)
18
+
19
+ ```tsx
20
+ import { useState, type CSSProperties } from 'react';
21
+
22
+ import Button from '@rio-cloud/rio-uikit/Button';
23
+ import useDraggableElement from '@rio-cloud/rio-uikit/hooks/useDraggableElement';
24
+ import ButtonToolbar from '@rio-cloud/rio-uikit/ButtonToolbar';
25
+ import classNames from '@rio-cloud/rio-uikit/classNames';
26
+
27
+ const defaultPositionStyle: CSSProperties = {
28
+ top: '180px',
29
+ left: '50%',
30
+ transform: 'translateX(-50%)',
31
+ };
32
+
33
+ const DraggablePanel = () => {
34
+ const { draggableRef, isDragging, position, onDragHandleDown, renderElement } = useDraggableElement();
35
+
36
+ const positionStyle = position.hasDragged ? { ...position } : defaultPositionStyle;
37
+
38
+ return renderElement(
39
+ <div
40
+ ref={draggableRef}
41
+ className='position-fixed rounded bg-primary padding-left-10 padding-right-20 padding-y-10 shadow-focused z-index-max'
42
+ style={positionStyle}
43
+ >
44
+ <div className='display-flex align-items-center gap-10'>
45
+ <span
46
+ role='button'
47
+ aria-label='Drag panel'
48
+ className={classNames(
49
+ 'rioglyph rioglyph-drag-n-drop text-size-20',
50
+ isDragging ? 'cursor-grabbing' : 'cursor-grab'
51
+ )}
52
+ onPointerDown={onDragHandleDown}
53
+ />
54
+ <div className='display-flex flex-column line-height-14'>
55
+ <b>Draggable demo panel</b>
56
+ <span className='text-size-12'>Drag only with the icon on the left</span>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ );
61
+ };
62
+
63
+ export default () => {
64
+ const [show, setShow] = useState(false);
65
+ const [instanceKey, setInstanceKey] = useState(0);
66
+
67
+ return (
68
+ <div>
69
+ <p>
70
+ Use the drag icon to move the fixed panel around the viewport. Viewport mode automatically renders
71
+ through the shared portal root.
72
+ </p>
73
+ <ButtonToolbar>
74
+ <Button onClick={() => setShow(!show)}>{show ? 'Hide' : 'Show'} draggable element</Button>
75
+ <Button onClick={() => setInstanceKey(previous => previous + 1)}>Reset panel position</Button>
76
+ </ButtonToolbar>
77
+ {show && <DraggablePanel key={instanceKey} />}
78
+ </div>
79
+ );
80
+ };
81
+ ```
82
+
83
+ #### HTML (html)
84
+
85
+ ```html
86
+ <div>
87
+ <p>Use the drag icon to move the fixed panel around the viewport. Viewport mode automatically renders through the shared portal root.</p>
88
+ <div class="btn-toolbar">
89
+ <button type="button" class="btn btn-default btn-component" tabindex="0">Show draggable element</button>
90
+ <button type="button" class="btn btn-default btn-component" tabindex="0">Reset panel position</button>
91
+ </div>
92
+ </div>
93
+ ```
94
+
95
+ #### Props: Options (UseDraggableElementOptions)
96
+
97
+ ### Options (UseDraggableElementOptions)
98
+
99
+ | Name | Type | Default | Description |
100
+ | --- | --- | --- | --- |
101
+ | positioning | 'viewport' \| 'container' | — | Defines whether drag coordinates are resolved against the viewport or a collision container. Viewport mode also enables portal rendering via renderElement. |
102
+ | initialPosition | 'center' \| Pick<DraggablePosition, 'top' \| 'left'> | — | Optional initial position for the draggable element. Use center to center the element inside the active positioning context on mount. |
103
+ | collisionContainerRef | RefObject<HTMLElement \| null> | — | Optional container whose visible client rect is used as the drag boundary in container mode. |
104
+
105
+ #### Props: Return value (UseDraggableResult)
106
+
107
+ ### Return value (UseDraggableResult)
108
+
109
+ | Name | Type | Default | Description |
110
+ | --- | --- | --- | --- |
111
+ | draggableRef | MutableRefObject<T \| null> | — | Ref that must be attached to the draggable element container. |
112
+ | isDragging | boolean | — | Indicates whether a drag interaction is currently active. |
113
+ | position | DraggablePosition | — | Current draggable coordinates and drag-state metadata. |
114
+ | onDragHandleDown | (event: ReactPointerEvent<HTMLElement>) => void | — | Pointer down handler for the dedicated drag handle element. |
115
+ | renderElement | (element: ReactNode, target?: HTMLElement \| null) => ReactNode | — | Renders the provided element through the shared portal root in viewport mode. An optional custom target can be passed for specialized overlay hosts. In container mode, the element is returned unchanged and this helper is usually not needed. |
116
+
117
+ #### Props: Position object (DraggablePosition)
118
+
119
+ ### Position object (DraggablePosition)
120
+
121
+ | Name | Type | Default | Description |
122
+ | --- | --- | --- | --- |
123
+ | top | number | — | Top offset in pixels relative to the active positioning context. |
124
+ | left | number | — | Left offset in pixels relative to the active positioning context. |
125
+ | hasDragged | boolean | — | Indicates whether the element has been moved by dragging at least once. |
126
+
127
+ ## Draggable element inside container
128
+
129
+ ### Example: Example 2
130
+
131
+ Use the drag icon to move the card inside the dashed boundary container.
132
+ Show draggable card Reset card position
133
+ Drag boundary container
134
+ Container mode keeps the draggable element inside this box and aligned correctly while the page scrolls.
135
+
136
+ #### React (tsx)
137
+
138
+ ```tsx
139
+ import { useRef, useState, type RefObject } from 'react';
140
+
141
+ import Button from '@rio-cloud/rio-uikit/Button';
142
+ import ButtonToolbar from '@rio-cloud/rio-uikit/ButtonToolbar';
143
+ import Card from '@rio-cloud/rio-uikit/Card';
144
+ import useDraggableElement from '@rio-cloud/rio-uikit/hooks/useDraggableElement';
145
+
146
+ type DraggableCardProps = {
147
+ onClose: () => void;
148
+ collisionContainerRef: RefObject<HTMLDivElement | null>;
149
+ };
150
+
151
+ const DraggableCard = (props: DraggableCardProps) => {
152
+ const { onClose, collisionContainerRef } = props;
153
+
154
+ const { draggableRef, isDragging, position, onDragHandleDown } = useDraggableElement<HTMLDivElement>({
155
+ positioning: 'container',
156
+ initialPosition: 'center',
157
+ collisionContainerRef,
158
+ });
159
+
160
+ return (
161
+ <div ref={draggableRef} className='position-absolute z-index-1' style={{ ...position }}>
162
+ <Card className='width-350 shadow-smooth' padding={20}>
163
+ <div className='display-flex align-items-center justify-content-between gap-10'>
164
+ <div className='display-flex align-items-center gap-10'>
165
+ <div className='margin-left--5'>
166
+ <span
167
+ role='button'
168
+ aria-label='Drag card'
169
+ className='rioglyph rioglyph-drag-n-drop text-size-20 text-color-dark hover-text-color-darker'
170
+ style={{
171
+ cursor: isDragging ? 'grabbing' : 'grab',
172
+ touchAction: 'none',
173
+ }}
174
+ onPointerDown={onDragHandleDown}
175
+ />
176
+ </div>
177
+ <div className='text-size-16 text-medium text-color-darker'>Draggable card</div>
178
+ </div>
179
+ <Button
180
+ bsSize='xs'
181
+ bsStyle='muted'
182
+ onClick={onClose}
183
+ iconName='rioglyph-remove'
184
+ iconOnly
185
+ className='position-absolute top-15 right-15 hover-bg-none'
186
+ />
187
+ </div>
188
+
189
+ <div className='margin-top-15'>
190
+ This card is absolutely positioned inside the dashed container, so scrolling keeps it in sync with
191
+ its boundary.
192
+ </div>
193
+ </Card>
194
+ </div>
195
+ );
196
+ };
197
+
198
+ export default () => {
199
+ const [show, setShow] = useState(false);
200
+ const [instanceKey, setInstanceKey] = useState(0);
201
+
202
+ const collisionContainerRef = useRef<HTMLDivElement>(null);
203
+
204
+ const handleResetPosition = () => setInstanceKey(previous => previous + 1);
205
+
206
+ return (
207
+ <div>
208
+ <p>Use the drag icon to move the card inside the dashed boundary container.</p>
209
+ <ButtonToolbar>
210
+ <Button onClick={() => setShow(!show)}>{show ? 'Hide' : 'Show'} draggable card</Button>
211
+ <Button onClick={handleResetPosition}>Reset card position</Button>
212
+ </ButtonToolbar>
213
+ <div
214
+ ref={collisionContainerRef}
215
+ className='position-relative margin-top-20 min-height-300 rounded border border-style-dashed border-color-info bg-highlight-decent padding-20'
216
+ >
217
+ <div className='text-size-16 text-medium text-color-info'>Drag boundary container</div>
218
+ <div className='margin-top-10 max-width-450 text-size-13 text-color-darker'>
219
+ Container mode keeps the draggable element inside this box and aligned correctly while the page
220
+ scrolls.
221
+ </div>
222
+ {show && (
223
+ <DraggableCard
224
+ key={instanceKey}
225
+ onClose={() => setShow(false)}
226
+ collisionContainerRef={collisionContainerRef}
227
+ />
228
+ )}
229
+ </div>
230
+ </div>
231
+ );
232
+ };
233
+ ```
234
+
235
+ #### HTML (html)
236
+
237
+ ```html
238
+ <div>
239
+ <p>Use the drag icon to move the card inside the dashed boundary container.</p>
240
+ <div class="btn-toolbar">
241
+ <button type="button" class="btn btn-default btn-component" tabindex="0">Show draggable card</button>
242
+ <button type="button" class="btn btn-default btn-component" tabindex="0">Reset card position</button>
243
+ </div>
244
+ <div class="position-relative margin-top-20 min-height-300 rounded border border-style-dashed border-color-info bg-highlight-decent padding-20">
245
+ <div class="text-size-16 text-medium text-color-info">Drag boundary container</div>
246
+ <div class="margin-top-10 max-width-450 text-size-13 text-color-darker">Container mode keeps the draggable element inside this box and aligned correctly while the page scrolls.</div>
247
+ </div>
248
+ </div>
249
+ ```
250
+
251
+ #### Props: Options (UseDraggableElementOptions)
252
+
253
+ ### Options (UseDraggableElementOptions)
254
+
255
+ | Name | Type | Default | Description |
256
+ | --- | --- | --- | --- |
257
+ | positioning | 'viewport' \| 'container' | — | Defines whether drag coordinates are resolved against the viewport or a collision container. Viewport mode also enables portal rendering via renderElement. |
258
+ | initialPosition | 'center' \| Pick<DraggablePosition, 'top' \| 'left'> | — | Optional initial position for the draggable element. Use center to center the element inside the active positioning context on mount. |
259
+ | collisionContainerRef | RefObject<HTMLElement \| null> | — | Optional container whose visible client rect is used as the drag boundary in container mode. |
260
+
261
+ #### Props: Return value (UseDraggableResult)
262
+
263
+ ### Return value (UseDraggableResult)
264
+
265
+ | Name | Type | Default | Description |
266
+ | --- | --- | --- | --- |
267
+ | draggableRef | MutableRefObject<T \| null> | — | Ref that must be attached to the draggable element container. |
268
+ | isDragging | boolean | — | Indicates whether a drag interaction is currently active. |
269
+ | position | DraggablePosition | — | Current draggable coordinates and drag-state metadata. |
270
+ | onDragHandleDown | (event: ReactPointerEvent<HTMLElement>) => void | — | Pointer down handler for the dedicated drag handle element. |
271
+ | renderElement | (element: ReactNode, target?: HTMLElement \| null) => ReactNode | — | Renders the provided element through the shared portal root in viewport mode. An optional custom target can be passed for specialized overlay hosts. In container mode, the element is returned unchanged and this helper is usually not needed. |
272
+
273
+ #### Props: Position object (DraggablePosition)
274
+
275
+ ### Position object (DraggablePosition)
276
+
277
+ | Name | Type | Default | Description |
278
+ | --- | --- | --- | --- |
279
+ | top | number | — | Top offset in pixels relative to the active positioning context. |
280
+ | left | number | — | Left offset in pixels relative to the active positioning context. |
281
+ | hasDragged | boolean | — | Indicates whether the element has been moved by dragging at least once. |
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Lifecycle & execution hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useEffectOnce
6
- *Captured:* 2026-03-06T10:41:34.405Z
6
+ *Captured:* 2026-04-20T12:55:50.223Z
7
7
 
8
8
  The useEffectOnce hook allows to use a side effect only once after the component has been mounted.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Lifecycle & execution hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useElapsedTime
6
- *Captured:* 2026-03-06T10:41:35.679Z
6
+ *Captured:* 2026-04-20T12:55:50.724Z
7
7
 
8
8
  ## useElapsedTime
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* DOM behavior hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useElementSize
6
- *Captured:* 2026-03-06T10:41:38.089Z
6
+ *Captured:* 2026-04-20T12:55:53.547Z
7
7
 
8
8
  The useElementSize hook allows to easily detect an elements dimension.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* DOM behavior hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useEsc
6
- *Captured:* 2026-03-06T10:41:39.113Z
6
+ *Captured:* 2026-04-20T12:55:54.488Z
7
7
 
8
8
  The useEsc hook allows to easily detect keydown events for escape key to to react on. This comes in handy when closing something or aborting some operation on esc.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* UI state & input hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useEvent
6
- *Captured:* 2026-03-06T10:41:51.160Z
6
+ *Captured:* 2026-04-20T12:56:02.563Z
7
7
 
8
8
  The useEvent hook allows to easily detect given events registered on the document.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* DOM behavior hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useFocusTrap
6
- *Captured:* 2026-03-06T10:41:39.661Z
6
+ *Captured:* 2026-04-20T12:55:54.488Z
7
7
 
8
8
  This custom hook allows to keep the focus inside a defined wrapper element. This might be a dialog or a custom overlay.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* DOM behavior hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useFullscreen
6
- *Captured:* 2026-03-06T10:41:43.215Z
6
+ *Captured:* 2026-04-20T12:55:55.657Z
7
7
 
8
8
  The cross-browser useFullscreen hook allows to easily switch to fullscreen mode for the document or a dedicated element like a map or a certain part of a service.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* DOM behavior hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useHover
6
- *Captured:* 2026-03-06T10:41:40.955Z
6
+ *Captured:* 2026-04-20T12:55:55.343Z
7
7
 
8
8
  ## useHover
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Browser & device hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useIncomingPostMessages
6
- *Captured:* 2026-03-06T10:41:47.230Z
6
+ *Captured:* 2026-04-20T12:55:59.869Z
7
7
 
8
8
  For handling postMessage events in React components.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Lifecycle & execution hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useInterval
6
- *Captured:* 2026-03-06T10:41:35.430Z
6
+ *Captured:* 2026-04-20T12:55:51.405Z
7
7
 
8
8
  The useInterval hook allows for executing some code after a specified amount of time.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* DOM behavior hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useIsFocusWithin
6
- *Captured:* 2026-03-06T10:41:40.739Z
6
+ *Captured:* 2026-04-20T12:55:55.909Z
7
7
 
8
8
  The useIsFocusWithin hook allows you to detect whether the focus is currently within a specific element or any of its children. This is useful for managing focus-based behavior like showing or hiding UI elements, styling active areas, or triggering accessibility behavior.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* DOM behavior hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useKey
6
- *Captured:* 2026-03-06T10:41:41.456Z
6
+ *Captured:* 2026-04-20T12:55:55.969Z
7
7
 
8
8
  The useKey hook allows to easily detect key events. It can be used in two ways, either to specify a specific key to listen for or with a callback to listen for all keys.
9
9
 
@@ -94,15 +94,13 @@ const Usage3 = () => {
94
94
  );
95
95
  };
96
96
 
97
- const UseKeyExample = () => {
98
- return (
99
- <div className='display-flex flex-column justify-content-center align-items-center'>
100
- <Usage1 />
101
- <Usage2 />
102
- <Usage3 />
103
- </div>
104
- );
105
- };
97
+ const UseKeyExample = () => (
98
+ <div className='display-flex flex-column justify-content-center align-items-center'>
99
+ <Usage1 />
100
+ <Usage2 />
101
+ <Usage3 />
102
+ </div>
103
+ );
106
104
 
107
105
  export default UseKeyExample;
108
106
  ```
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Browser & device hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useLocalStorage
6
- *Captured:* 2026-03-06T10:41:50.097Z
6
+ *Captured:* 2026-04-20T12:56:01.143Z
7
7
 
8
8
  The useLocalStorage and the useSessionStorage hook allows to save custom data in the respective storage locations.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* UI state & input hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useLocationSuggestions
6
- *Captured:* 2026-03-06T10:41:51.833Z
6
+ *Captured:* 2026-04-20T12:56:02.807Z
7
7
 
8
8
  The useLocationSuggestions hook allows to use a side effect after the component has been mounted and rendered. The effect will not be triggered on mount and only when the dependencies change.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Data aggregation hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useMax
6
- *Captured:* 2026-03-06T10:41:56.465Z
6
+ *Captured:* 2026-04-20T12:56:05.504Z
7
7
 
8
8
  Returns the largest valid numeric value found at the specified path within a list of objects. Supports localized formats and gracefully skips unparsable values.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Data aggregation hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useMin
6
- *Captured:* 2026-03-06T10:41:56.398Z
6
+ *Captured:* 2026-04-20T12:56:05.919Z
7
7
 
8
8
  Returns the smallest valid numeric value found at the specified path within a list of objects. Handles localized number strings and safely ignores invalid values.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* DOM behavior hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useMutationObserver
6
- *Captured:* 2026-03-06T10:41:42.777Z
6
+ *Captured:* 2026-04-20T12:55:56.718Z
7
7
 
8
8
  The useMutationObserver hook enables you to listen for changes on the given element or on its children. For more details, check out https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* DOM behavior hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useOnScreen
6
- *Captured:* 2026-03-06T10:41:43.357Z
6
+ *Captured:* 2026-04-20T12:55:57.126Z
7
7
 
8
8
  The useOnScreen hook tells you when an element is visible on screen.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Browser & device hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useOnlineStatus
6
- *Captured:* 2026-03-06T10:41:49.569Z
6
+ *Captured:* 2026-04-20T12:56:01.076Z
7
7
 
8
8
  The useOnlineStatus hook tells you when there is a network connection or not.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Browser & device hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/usePostMessage
6
- *Captured:* 2026-03-06T10:41:49.551Z
6
+ *Captured:* 2026-04-20T12:56:01.271Z
7
7
 
8
8
  The usePostMessage hook allows to easily exchange events and data between the parent window and embedded iframes.
9
9
 
@@ -88,7 +88,7 @@ export default () => {
88
88
  </div>
89
89
  </div>
90
90
  <div class="iframe-wrapper">
91
- <iframe title="iframe" id="postMessageExample" src="/#postMessageExample" class="unstyled width-100pct" style="width: 1px; min-width: 100%; overflow: hidden; height: 150px;" scrolling="no">
91
+ <iframe title="iframe" id="postMessageExample" src="/#postMessageExample" class="unstyled width-100pct" style="width: 1px; min-width: 100%; overflow: hidden; height: 200px;" scrolling="no">
92
92
  </iframe>
93
93
  </div>
94
94
  </div>
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Browser & device hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/usePostMessageSender
6
- *Captured:* 2026-03-06T10:41:50.191Z
6
+ *Captured:* 2026-04-20T12:56:01.294Z
7
7
 
8
8
  Helper hook to fire postMessage events to other windows: a specific target (including yourself), the parent or top window, or every iframe on the page. It uses the wildcard target origin (*) and no-ops when a target window is missing, so it is safe to call even when an iframe or parent is not present.
9
9
 
@@ -3,7 +3,7 @@
3
3
  *Category:* Utilities
4
4
  *Section:* Lifecycle & execution hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/usePrevious
6
- *Captured:* 2026-03-06T10:41:36.456Z
6
+ *Captured:* 2026-04-20T12:55:51.620Z
7
7
 
8
8
  The usePrevious hook allows to easily access state from previous component render. Instead of using a React.ref and a useEffect, this hook uses a useState internally to keep track of the previous state value.
9
9
 
@@ -28,8 +28,6 @@ setSelection(null);
28
28
  }
29
29
  ```
30
30
 
31
- > Note: If you want to use this to update the internal state due to a prop change, you might run into a loop. Therefore, use the following snippet suggested by the React team here: https://react.dev/learn/you-might-not-need-an-effect#adjusting-some-state-when-a-prop-changes
32
-
33
31
  ### Example: Example 1
34
32
 
35
33
  { count: 1, previousCount: 1 }
@@ -69,7 +67,7 @@ export default () => {
69
67
  <div class="NumberControl margin-0 width-100">
70
68
  <div class="input-group">
71
69
  <div class="form-control-feedback-wrapper">
72
- <input type="number" step="1" min="0" max="1.7976931348623157e+308" class="form-control no-controls" aria-label="number-input" value="1">
70
+ <input type="number" step="1" min="0" max="1.7976931348623157e+308" class="form-control no-controls padding-right-5" aria-label="number-input" value="1">
73
71
  </div>
74
72
  <div class="input-group-addon ">
75
73
  <div class="display-flex padding-left-10">
@@ -3,15 +3,17 @@
3
3
  *Category:* Utilities
4
4
  *Section:* DOM behavior hooks
5
5
  *Source:* https://uikit.developers.rio.cloud/#/utilities/useResizeObserver
6
- *Captured:* 2026-03-06T10:41:44.548Z
6
+ *Captured:* 2026-04-20T12:55:58.056Z
7
7
 
8
8
  The useResizeObserver hook allows to react on resize changes of a given element.
9
9
 
10
10
  ## useResizeObserver
11
11
 
12
+ You can either attach the returned ref to the observed element or pass an existing DOM element directly as the optional first argument.
13
+
12
14
  > Note: that is important to consider the padding of the element to observe and to take it into consideration when working with its width and height. When using the contentRect from the observerEntry, keep in mind that this will not include the paddings.
13
15
 
14
- To include the target elements padding, please use the borderBoxSize instead.
16
+ To include the target element padding, use the third return value with inlineSize and blockSize, or read borderBoxSize from the observer entry directly.
15
17
 
16
18
  ### Example: Example 1
17
19
 
@@ -28,9 +30,7 @@ import useResizeObserver from '@rio-cloud/rio-uikit/useResizeObserver';
28
30
  export default () => {
29
31
  const [boxWidth, setBoxWidth] = useState(200);
30
32
 
31
- // To include target elements padding, use "borderBoxSize" or for convenience
32
- // purpose, use the dedicated return object already containing "inlineSize" and "blockSize".
33
- // const [ref, { borderBox }] = useResizeObserver();
33
+ // The third tuple item already exposes border-box based inline/block size values.
34
34
  const [ref, _, { inlineSize, blockSize }] = useResizeObserver();
35
35
 
36
36
  const handleResizeHorizontal = (diff: number) => setBoxWidth(previousValue => previousValue - diff);
@@ -47,7 +47,7 @@ export default () => {
47
47
  ref={ref}
48
48
  >
49
49
  <div className='text-color-white text-medium'>
50
- {inlineSize}x{blockSize}
50
+ {inlineSize ?? 0}x{blockSize ?? 0}
51
51
  </div>
52
52
  <Resizer onResize={handleResizeHorizontal}>
53
53
  <div className='width-5 height-100pct bg-light' />
@@ -71,11 +71,19 @@ export default () => {
71
71
  </div>
72
72
  ```
73
73
 
74
- #### Props (json)
74
+ #### Props
75
75
 
76
- ```json
77
- ref
78
- ```
76
+ | Name | Type | Default | Description |
77
+ | --- | --- | --- | --- |
78
+ | observedElement | HTMLElement \| null | — | Optional existing DOM element to observe directly instead of attaching the returned ref. |
79
+
80
+ #### Props
81
+
82
+ | Name | Type | Default | Description |
83
+ | --- | --- | --- | --- |
84
+ | ref | MutableRefObject<T \| null> | — | Ref object for the observed element. When you pass observedElement directly, this ref can be ignored. |
85
+ | observerEntry | ResizeObserverEntry \| null | — | The latest ResizeObserverEntry or null until the first observation. See https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry |
86
+ | size | { inlineSize: number \| undefined; blockSize: number \| undefined } | — | Convenience object that prefers borderBoxSize and falls back to contentRect. |
79
87
 
80
88
  ### Example: Example 2
81
89
 
@@ -97,7 +105,11 @@ export default () => {
97
105
  const contentRect = observerEntry?.contentRect;
98
106
 
99
107
  const getContentRect = useCallback(
100
- (key: keyof DOMRectReadOnly) => Math.round(contentRect?.[key] as number),
108
+ (key: keyof DOMRectReadOnly) => {
109
+ const value = contentRect?.[key];
110
+
111
+ return typeof value === 'number' ? Math.round(value) : 0;
112
+ },
101
113
  [contentRect]
102
114
  );
103
115
 
@@ -136,8 +148,16 @@ export default () => {
136
148
  </div>
137
149
  ```
138
150
 
139
- #### Props (json)
151
+ #### Props
152
+
153
+ | Name | Type | Default | Description |
154
+ | --- | --- | --- | --- |
155
+ | observedElement | HTMLElement \| null | — | Optional existing DOM element to observe directly instead of attaching the returned ref. |
156
+
157
+ #### Props
140
158
 
141
- ```json
142
- ref
143
- ```
159
+ | Name | Type | Default | Description |
160
+ | --- | --- | --- | --- |
161
+ | ref | MutableRefObject<T \| null> | — | Ref object for the observed element. When you pass observedElement directly, this ref can be ignored. |
162
+ | observerEntry | ResizeObserverEntry \| null | — | The latest ResizeObserverEntry or null until the first observation. See https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry |
163
+ | size | { inlineSize: number \| undefined; blockSize: number \| undefined } | — | Convenience object that prefers borderBoxSize and falls back to contentRect. |