@genesislcap/rapid-design-system 14.424.1 → 14.426.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +81 -81
- package/dist/dts/react.d.ts +67 -0
- package/dist/react.cjs +539 -136
- package/dist/react.mjs +539 -136
- package/package.json +11 -14
package/dist/react.mjs
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Generated from custom-elements manifest.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
|
|
7
6
|
import React from 'react';
|
|
8
7
|
import { AccordionItem as AccordionItemWC } from './esm/accordion-item/accordion-item.js';
|
|
9
8
|
import { Accordion as AccordionWC } from './esm/accordion/accordion.js';
|
|
@@ -73,221 +72,625 @@ import { TreeItem as TreeItemWC } from './esm/tree-item/tree-item.js';
|
|
|
73
72
|
import { TreeView as TreeViewWC } from './esm/tree-view/tree-view.js';
|
|
74
73
|
import { UrlInput as UrlInputWC } from './esm/url-input/url-input.js';
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
function _mergeRefs(...refs) {
|
|
76
|
+
return (value) => {
|
|
77
|
+
for (const ref of refs) {
|
|
78
|
+
if (typeof ref === 'function') ref(value);
|
|
79
|
+
else if (ref != null) ref.current = value;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const Accordion = React.forwardRef(function Accordion(props, ref) {
|
|
85
|
+
const { children, ...rest } = props;
|
|
86
|
+
return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
|
|
87
|
+
});
|
|
79
88
|
|
|
80
|
-
export const AccordionItem =
|
|
89
|
+
export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
|
|
90
|
+
const { children, ...rest } = props;
|
|
91
|
+
return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
|
|
92
|
+
});
|
|
81
93
|
|
|
82
|
-
export const ActionsMenu =
|
|
94
|
+
export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
|
|
95
|
+
const { children, ...rest } = props;
|
|
96
|
+
return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
|
|
97
|
+
});
|
|
83
98
|
|
|
84
|
-
export const AiCriteriaSearch =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
99
|
+
export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
|
|
100
|
+
const { onCriteriaChanged, onValidationErrors, children, ...rest } = props;
|
|
101
|
+
const _innerRef = React.useRef(null);
|
|
102
|
+
const _onCriteriaChangedRef = React.useRef(onCriteriaChanged);
|
|
103
|
+
_onCriteriaChangedRef.current = onCriteriaChanged;
|
|
104
|
+
const _onValidationErrorsRef = React.useRef(onValidationErrors);
|
|
105
|
+
_onValidationErrorsRef.current = onValidationErrors;
|
|
106
|
+
React.useLayoutEffect(() => {
|
|
107
|
+
const el = _innerRef.current;
|
|
108
|
+
if (!el) return;
|
|
109
|
+
const _onCriteriaChangedFn = (e) => _onCriteriaChangedRef.current?.(e);
|
|
110
|
+
el.addEventListener('criteria-changed', _onCriteriaChangedFn);
|
|
111
|
+
const _onValidationErrorsFn = (e) => _onValidationErrorsRef.current?.(e);
|
|
112
|
+
el.addEventListener('validation-errors', _onValidationErrorsFn);
|
|
113
|
+
return () => {
|
|
114
|
+
el.removeEventListener('criteria-changed', _onCriteriaChangedFn);
|
|
115
|
+
el.removeEventListener('validation-errors', _onValidationErrorsFn);
|
|
116
|
+
};
|
|
117
|
+
}, []);
|
|
118
|
+
return React.createElement(customElements.getName(AiCriteriaSearchWC) ?? '%%prefix%%-ai-criteria-search', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
89
119
|
});
|
|
90
120
|
|
|
91
|
-
export const AiIndicator =
|
|
121
|
+
export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
|
|
122
|
+
const { children, ...rest } = props;
|
|
123
|
+
return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
|
|
124
|
+
});
|
|
92
125
|
|
|
93
|
-
export const Anchor =
|
|
126
|
+
export const Anchor = React.forwardRef(function Anchor(props, ref) {
|
|
127
|
+
const { children, ...rest } = props;
|
|
128
|
+
return React.createElement(customElements.getName(AnchorWC) ?? '%%prefix%%-anchor', { ...rest, ref }, children);
|
|
129
|
+
});
|
|
94
130
|
|
|
95
|
-
export const AnchoredRegion =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
131
|
+
export const AnchoredRegion = React.forwardRef(function AnchoredRegion(props, ref) {
|
|
132
|
+
const { onLoaded, onPositionchange, children, ...rest } = props;
|
|
133
|
+
const _innerRef = React.useRef(null);
|
|
134
|
+
const _onLoadedRef = React.useRef(onLoaded);
|
|
135
|
+
_onLoadedRef.current = onLoaded;
|
|
136
|
+
const _onPositionchangeRef = React.useRef(onPositionchange);
|
|
137
|
+
_onPositionchangeRef.current = onPositionchange;
|
|
138
|
+
React.useLayoutEffect(() => {
|
|
139
|
+
const el = _innerRef.current;
|
|
140
|
+
if (!el) return;
|
|
141
|
+
const _onLoadedFn = (e) => _onLoadedRef.current?.(e);
|
|
142
|
+
el.addEventListener('loaded', _onLoadedFn);
|
|
143
|
+
const _onPositionchangeFn = (e) => _onPositionchangeRef.current?.(e);
|
|
144
|
+
el.addEventListener('positionchange', _onPositionchangeFn);
|
|
145
|
+
return () => {
|
|
146
|
+
el.removeEventListener('loaded', _onLoadedFn);
|
|
147
|
+
el.removeEventListener('positionchange', _onPositionchangeFn);
|
|
148
|
+
};
|
|
149
|
+
}, []);
|
|
150
|
+
return React.createElement(customElements.getName(AnchoredRegionWC) ?? '%%prefix%%-anchored-region', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
100
151
|
});
|
|
101
152
|
|
|
102
|
-
export const Avatar =
|
|
153
|
+
export const Avatar = React.forwardRef(function Avatar(props, ref) {
|
|
154
|
+
const { children, ...rest } = props;
|
|
155
|
+
return React.createElement(customElements.getName(AvatarWC) ?? '%%prefix%%-avatar', { ...rest, ref }, children);
|
|
156
|
+
});
|
|
103
157
|
|
|
104
|
-
export const Badge =
|
|
158
|
+
export const Badge = React.forwardRef(function Badge(props, ref) {
|
|
159
|
+
const { children, ...rest } = props;
|
|
160
|
+
return React.createElement(customElements.getName(BadgeWC) ?? '%%prefix%%-badge', { ...rest, ref }, children);
|
|
161
|
+
});
|
|
105
162
|
|
|
106
|
-
export const Banner =
|
|
163
|
+
export const Banner = React.forwardRef(function Banner(props, ref) {
|
|
164
|
+
const { children, ...rest } = props;
|
|
165
|
+
return React.createElement(customElements.getName(BannerWC) ?? '%%prefix%%-banner', { ...rest, ref }, children);
|
|
166
|
+
});
|
|
107
167
|
|
|
108
|
-
export const Breadcrumb =
|
|
168
|
+
export const Breadcrumb = React.forwardRef(function Breadcrumb(props, ref) {
|
|
169
|
+
const { children, ...rest } = props;
|
|
170
|
+
return React.createElement(customElements.getName(BreadcrumbWC) ?? '%%prefix%%-breadcrumb', { ...rest, ref }, children);
|
|
171
|
+
});
|
|
109
172
|
|
|
110
|
-
export const Button =
|
|
173
|
+
export const Button = React.forwardRef(function Button(props, ref) {
|
|
174
|
+
const { children, ...rest } = props;
|
|
175
|
+
return React.createElement(customElements.getName(ButtonWC) ?? '%%prefix%%-button', { ...rest, ref }, children);
|
|
176
|
+
});
|
|
111
177
|
|
|
112
|
-
export const Calendar =
|
|
178
|
+
export const Calendar = React.forwardRef(function Calendar(props, ref) {
|
|
179
|
+
const { children, ...rest } = props;
|
|
180
|
+
return React.createElement(customElements.getName(CalendarWC) ?? '%%prefix%%-calendar', { ...rest, ref }, children);
|
|
181
|
+
});
|
|
113
182
|
|
|
114
|
-
export const Card =
|
|
183
|
+
export const Card = React.forwardRef(function Card(props, ref) {
|
|
184
|
+
const { children, ...rest } = props;
|
|
185
|
+
return React.createElement(customElements.getName(CardWC) ?? '%%prefix%%-card', { ...rest, ref }, children);
|
|
186
|
+
});
|
|
115
187
|
|
|
116
|
-
export const CategorizedMultiselect =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
188
|
+
export const CategorizedMultiselect = React.forwardRef(function CategorizedMultiselect(props, ref) {
|
|
189
|
+
const { onSelectionChange, children, ...rest } = props;
|
|
190
|
+
const _innerRef = React.useRef(null);
|
|
191
|
+
const _onSelectionChangeRef = React.useRef(onSelectionChange);
|
|
192
|
+
_onSelectionChangeRef.current = onSelectionChange;
|
|
193
|
+
React.useLayoutEffect(() => {
|
|
194
|
+
const el = _innerRef.current;
|
|
195
|
+
if (!el) return;
|
|
196
|
+
const _onSelectionChangeFn = (e) => _onSelectionChangeRef.current?.(e);
|
|
197
|
+
el.addEventListener('selectionChange', _onSelectionChangeFn);
|
|
198
|
+
return () => {
|
|
199
|
+
el.removeEventListener('selectionChange', _onSelectionChangeFn);
|
|
200
|
+
};
|
|
201
|
+
}, []);
|
|
202
|
+
return React.createElement(customElements.getName(CategorizedMultiselectWC) ?? '%%prefix%%-categorized-multiselect', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
120
203
|
});
|
|
121
204
|
|
|
122
|
-
export const Combobox =
|
|
205
|
+
export const Combobox = React.forwardRef(function Combobox(props, ref) {
|
|
206
|
+
const { children, ...rest } = props;
|
|
207
|
+
return React.createElement(customElements.getName(ComboboxWC) ?? '%%prefix%%-combobox', { ...rest, ref }, children);
|
|
208
|
+
});
|
|
123
209
|
|
|
124
|
-
export const ConnectionIndicator =
|
|
210
|
+
export const ConnectionIndicator = React.forwardRef(function ConnectionIndicator(props, ref) {
|
|
211
|
+
const { children, ...rest } = props;
|
|
212
|
+
return React.createElement(customElements.getName(ConnectionIndicatorWC) ?? '%%prefix%%-connection-indicator', { ...rest, ref }, children);
|
|
213
|
+
});
|
|
125
214
|
|
|
126
|
-
export const DatePicker =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
215
|
+
export const DatePicker = React.forwardRef(function DatePicker(props, ref) {
|
|
216
|
+
const { onValueChanged, children, ...rest } = props;
|
|
217
|
+
const _innerRef = React.useRef(null);
|
|
218
|
+
const _onValueChangedRef = React.useRef(onValueChanged);
|
|
219
|
+
_onValueChangedRef.current = onValueChanged;
|
|
220
|
+
React.useLayoutEffect(() => {
|
|
221
|
+
const el = _innerRef.current;
|
|
222
|
+
if (!el) return;
|
|
223
|
+
const _onValueChangedFn = (e) => _onValueChangedRef.current?.(e);
|
|
224
|
+
el.addEventListener('value-changed', _onValueChangedFn);
|
|
225
|
+
return () => {
|
|
226
|
+
el.removeEventListener('value-changed', _onValueChangedFn);
|
|
227
|
+
};
|
|
228
|
+
}, []);
|
|
229
|
+
return React.createElement(customElements.getName(DatePickerWC) ?? '%%prefix%%-date-picker', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
130
230
|
});
|
|
131
231
|
|
|
132
|
-
export const Dialog =
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
232
|
+
export const Dialog = React.forwardRef(function Dialog(props, ref) {
|
|
233
|
+
const { onClose, children, ...rest } = props;
|
|
234
|
+
const _innerRef = React.useRef(null);
|
|
235
|
+
const _onCloseRef = React.useRef(onClose);
|
|
236
|
+
_onCloseRef.current = onClose;
|
|
237
|
+
React.useLayoutEffect(() => {
|
|
238
|
+
const el = _innerRef.current;
|
|
239
|
+
if (!el) return;
|
|
240
|
+
const _onCloseFn = (e) => _onCloseRef.current?.(e);
|
|
241
|
+
el.addEventListener('close', _onCloseFn);
|
|
242
|
+
return () => {
|
|
243
|
+
el.removeEventListener('close', _onCloseFn);
|
|
244
|
+
};
|
|
245
|
+
}, []);
|
|
246
|
+
return React.createElement(customElements.getName(DialogWC) ?? '%%prefix%%-dialog', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
136
247
|
});
|
|
137
248
|
|
|
138
|
-
export const Disclosure =
|
|
249
|
+
export const Disclosure = React.forwardRef(function Disclosure(props, ref) {
|
|
250
|
+
const { children, ...rest } = props;
|
|
251
|
+
return React.createElement(customElements.getName(DisclosureWC) ?? '%%prefix%%-disclosure', { ...rest, ref }, children);
|
|
252
|
+
});
|
|
139
253
|
|
|
140
|
-
export const Divider =
|
|
254
|
+
export const Divider = React.forwardRef(function Divider(props, ref) {
|
|
255
|
+
const { children, ...rest } = props;
|
|
256
|
+
return React.createElement(customElements.getName(DividerWC) ?? '%%prefix%%-divider', { ...rest, ref }, children);
|
|
257
|
+
});
|
|
141
258
|
|
|
142
|
-
export const DropdownMenu =
|
|
259
|
+
export const DropdownMenu = React.forwardRef(function DropdownMenu(props, ref) {
|
|
260
|
+
const { children, ...rest } = props;
|
|
261
|
+
return React.createElement(customElements.getName(DropdownMenuWC) ?? '%%prefix%%-dropdown-menu', { ...rest, ref }, children);
|
|
262
|
+
});
|
|
143
263
|
|
|
144
|
-
export const EnvironmentIndicator =
|
|
264
|
+
export const EnvironmentIndicator = React.forwardRef(function EnvironmentIndicator(props, ref) {
|
|
265
|
+
const { children, ...rest } = props;
|
|
266
|
+
return React.createElement(customElements.getName(EnvironmentIndicatorWC) ?? '%%prefix%%-environment-indicator', { ...rest, ref }, children);
|
|
267
|
+
});
|
|
145
268
|
|
|
146
|
-
export const FileUpload =
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
269
|
+
export const FileUpload = React.forwardRef(function FileUpload(props, ref) {
|
|
270
|
+
const { onFileSelected, onSuccess, onErrorOut, onClear, children, ...rest } = props;
|
|
271
|
+
const _innerRef = React.useRef(null);
|
|
272
|
+
const _onFileSelectedRef = React.useRef(onFileSelected);
|
|
273
|
+
_onFileSelectedRef.current = onFileSelected;
|
|
274
|
+
const _onSuccessRef = React.useRef(onSuccess);
|
|
275
|
+
_onSuccessRef.current = onSuccess;
|
|
276
|
+
const _onErrorOutRef = React.useRef(onErrorOut);
|
|
277
|
+
_onErrorOutRef.current = onErrorOut;
|
|
278
|
+
const _onClearRef = React.useRef(onClear);
|
|
279
|
+
_onClearRef.current = onClear;
|
|
280
|
+
React.useLayoutEffect(() => {
|
|
281
|
+
const el = _innerRef.current;
|
|
282
|
+
if (!el) return;
|
|
283
|
+
const _onFileSelectedFn = (e) => _onFileSelectedRef.current?.(e);
|
|
284
|
+
el.addEventListener('file-selected', _onFileSelectedFn);
|
|
285
|
+
const _onSuccessFn = (e) => _onSuccessRef.current?.(e);
|
|
286
|
+
el.addEventListener('success', _onSuccessFn);
|
|
287
|
+
const _onErrorOutFn = (e) => _onErrorOutRef.current?.(e);
|
|
288
|
+
el.addEventListener('errorOut', _onErrorOutFn);
|
|
289
|
+
const _onClearFn = (e) => _onClearRef.current?.(e);
|
|
290
|
+
el.addEventListener('clear', _onClearFn);
|
|
291
|
+
return () => {
|
|
292
|
+
el.removeEventListener('file-selected', _onFileSelectedFn);
|
|
293
|
+
el.removeEventListener('success', _onSuccessFn);
|
|
294
|
+
el.removeEventListener('errorOut', _onErrorOutFn);
|
|
295
|
+
el.removeEventListener('clear', _onClearFn);
|
|
296
|
+
};
|
|
297
|
+
}, []);
|
|
298
|
+
return React.createElement(customElements.getName(FileUploadWC) ?? '%%prefix%%-file-upload', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
153
299
|
});
|
|
154
300
|
|
|
155
|
-
export const Filter =
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
301
|
+
export const Filter = React.forwardRef(function Filter(props, ref) {
|
|
302
|
+
const { onFilterChanged, onFilterCleared, children, ...rest } = props;
|
|
303
|
+
const _innerRef = React.useRef(null);
|
|
304
|
+
const _onFilterChangedRef = React.useRef(onFilterChanged);
|
|
305
|
+
_onFilterChangedRef.current = onFilterChanged;
|
|
306
|
+
const _onFilterClearedRef = React.useRef(onFilterCleared);
|
|
307
|
+
_onFilterClearedRef.current = onFilterCleared;
|
|
308
|
+
React.useLayoutEffect(() => {
|
|
309
|
+
const el = _innerRef.current;
|
|
310
|
+
if (!el) return;
|
|
311
|
+
const _onFilterChangedFn = (e) => _onFilterChangedRef.current?.(e);
|
|
312
|
+
el.addEventListener('filter-changed', _onFilterChangedFn);
|
|
313
|
+
const _onFilterClearedFn = (e) => _onFilterClearedRef.current?.(e);
|
|
314
|
+
el.addEventListener('filter-cleared', _onFilterClearedFn);
|
|
315
|
+
return () => {
|
|
316
|
+
el.removeEventListener('filter-changed', _onFilterChangedFn);
|
|
317
|
+
el.removeEventListener('filter-cleared', _onFilterClearedFn);
|
|
318
|
+
};
|
|
319
|
+
}, []);
|
|
320
|
+
return React.createElement(customElements.getName(FilterWC) ?? '%%prefix%%-filter', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
160
321
|
});
|
|
161
322
|
|
|
162
|
-
export const FilterBar =
|
|
323
|
+
export const FilterBar = React.forwardRef(function FilterBar(props, ref) {
|
|
324
|
+
const { children, ...rest } = props;
|
|
325
|
+
return React.createElement(customElements.getName(FilterBarWC) ?? '%%prefix%%-filter-bar', { ...rest, ref }, children);
|
|
326
|
+
});
|
|
163
327
|
|
|
164
|
-
export const Flyout =
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
328
|
+
export const Flyout = React.forwardRef(function Flyout(props, ref) {
|
|
329
|
+
const { onClosed, children, ...rest } = props;
|
|
330
|
+
const _innerRef = React.useRef(null);
|
|
331
|
+
const _onClosedRef = React.useRef(onClosed);
|
|
332
|
+
_onClosedRef.current = onClosed;
|
|
333
|
+
React.useLayoutEffect(() => {
|
|
334
|
+
const el = _innerRef.current;
|
|
335
|
+
if (!el) return;
|
|
336
|
+
const _onClosedFn = (e) => _onClosedRef.current?.(e);
|
|
337
|
+
el.addEventListener('closed', _onClosedFn);
|
|
338
|
+
return () => {
|
|
339
|
+
el.removeEventListener('closed', _onClosedFn);
|
|
340
|
+
};
|
|
341
|
+
}, []);
|
|
342
|
+
return React.createElement(customElements.getName(FlyoutWC) ?? '%%prefix%%-flyout', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
168
343
|
});
|
|
169
344
|
|
|
170
|
-
export const HorizontalScroll =
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
345
|
+
export const HorizontalScroll = React.forwardRef(function HorizontalScroll(props, ref) {
|
|
346
|
+
const { onScrollstart, onScrollend, children, ...rest } = props;
|
|
347
|
+
const _innerRef = React.useRef(null);
|
|
348
|
+
const _onScrollstartRef = React.useRef(onScrollstart);
|
|
349
|
+
_onScrollstartRef.current = onScrollstart;
|
|
350
|
+
const _onScrollendRef = React.useRef(onScrollend);
|
|
351
|
+
_onScrollendRef.current = onScrollend;
|
|
352
|
+
React.useLayoutEffect(() => {
|
|
353
|
+
const el = _innerRef.current;
|
|
354
|
+
if (!el) return;
|
|
355
|
+
const _onScrollstartFn = (e) => _onScrollstartRef.current?.(e);
|
|
356
|
+
el.addEventListener('scrollstart', _onScrollstartFn);
|
|
357
|
+
const _onScrollendFn = (e) => _onScrollendRef.current?.(e);
|
|
358
|
+
el.addEventListener('scrollend', _onScrollendFn);
|
|
359
|
+
return () => {
|
|
360
|
+
el.removeEventListener('scrollstart', _onScrollstartFn);
|
|
361
|
+
el.removeEventListener('scrollend', _onScrollendFn);
|
|
362
|
+
};
|
|
363
|
+
}, []);
|
|
364
|
+
return React.createElement(customElements.getName(HorizontalScrollWC) ?? '%%prefix%%-horizontal-scroll', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
175
365
|
});
|
|
176
366
|
|
|
177
|
-
export const Icon =
|
|
367
|
+
export const Icon = React.forwardRef(function Icon(props, ref) {
|
|
368
|
+
const { children, ...rest } = props;
|
|
369
|
+
return React.createElement(customElements.getName(IconWC) ?? '%%prefix%%-icon', { ...rest, ref }, children);
|
|
370
|
+
});
|
|
178
371
|
|
|
179
|
-
export const Listbox =
|
|
372
|
+
export const Listbox = React.forwardRef(function Listbox(props, ref) {
|
|
373
|
+
const { children, ...rest } = props;
|
|
374
|
+
return React.createElement(customElements.getName(ListboxWC) ?? '%%prefix%%-listbox', { ...rest, ref }, children);
|
|
375
|
+
});
|
|
180
376
|
|
|
181
|
-
export const ListboxOption =
|
|
377
|
+
export const ListboxOption = React.forwardRef(function ListboxOption(props, ref) {
|
|
378
|
+
const { children, ...rest } = props;
|
|
379
|
+
return React.createElement(customElements.getName(ListboxOptionWC) ?? '%%prefix%%-option', { ...rest, ref }, children);
|
|
380
|
+
});
|
|
182
381
|
|
|
183
|
-
export const Menu =
|
|
382
|
+
export const Menu = React.forwardRef(function Menu(props, ref) {
|
|
383
|
+
const { children, ...rest } = props;
|
|
384
|
+
return React.createElement(customElements.getName(MenuWC) ?? '%%prefix%%-menu', { ...rest, ref }, children);
|
|
385
|
+
});
|
|
184
386
|
|
|
185
|
-
export const Modal =
|
|
387
|
+
export const Modal = React.forwardRef(function Modal(props, ref) {
|
|
388
|
+
const { children, ...rest } = props;
|
|
389
|
+
return React.createElement(customElements.getName(ModalWC) ?? '%%prefix%%-modal', { ...rest, ref }, children);
|
|
390
|
+
});
|
|
186
391
|
|
|
187
|
-
export const Multiselect =
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
392
|
+
export const Multiselect = React.forwardRef(function Multiselect(props, ref) {
|
|
393
|
+
const { onSelectionChange, onClear, children, ...rest } = props;
|
|
394
|
+
const _innerRef = React.useRef(null);
|
|
395
|
+
const _onSelectionChangeRef = React.useRef(onSelectionChange);
|
|
396
|
+
_onSelectionChangeRef.current = onSelectionChange;
|
|
397
|
+
const _onClearRef = React.useRef(onClear);
|
|
398
|
+
_onClearRef.current = onClear;
|
|
399
|
+
React.useLayoutEffect(() => {
|
|
400
|
+
const el = _innerRef.current;
|
|
401
|
+
if (!el) return;
|
|
402
|
+
const _onSelectionChangeFn = (e) => _onSelectionChangeRef.current?.(e);
|
|
403
|
+
el.addEventListener('selectionChange', _onSelectionChangeFn);
|
|
404
|
+
const _onClearFn = (e) => _onClearRef.current?.(e);
|
|
405
|
+
el.addEventListener('clear', _onClearFn);
|
|
406
|
+
return () => {
|
|
407
|
+
el.removeEventListener('selectionChange', _onSelectionChangeFn);
|
|
408
|
+
el.removeEventListener('clear', _onClearFn);
|
|
409
|
+
};
|
|
410
|
+
}, []);
|
|
411
|
+
return React.createElement(customElements.getName(MultiselectWC) ?? '%%prefix%%-multiselect', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
192
412
|
});
|
|
193
413
|
|
|
194
|
-
export const NotificationListener =
|
|
414
|
+
export const NotificationListener = React.forwardRef(function NotificationListener(props, ref) {
|
|
415
|
+
const { children, ...rest } = props;
|
|
416
|
+
return React.createElement(customElements.getName(NotificationListenerWC) ?? '%%prefix%%-notification-listener', { ...rest, ref }, children);
|
|
417
|
+
});
|
|
195
418
|
|
|
196
|
-
export const NumberField =
|
|
419
|
+
export const NumberField = React.forwardRef(function NumberField(props, ref) {
|
|
420
|
+
const { children, ...rest } = props;
|
|
421
|
+
return React.createElement(customElements.getName(NumberFieldWC) ?? '%%prefix%%-number-field', { ...rest, ref }, children);
|
|
422
|
+
});
|
|
197
423
|
|
|
198
|
-
export const Optgroup =
|
|
424
|
+
export const Optgroup = React.forwardRef(function Optgroup(props, ref) {
|
|
425
|
+
const { children, ...rest } = props;
|
|
426
|
+
return React.createElement(customElements.getName(OptgroupWC) ?? '%%prefix%%-optgroup', { ...rest, ref }, children);
|
|
427
|
+
});
|
|
199
428
|
|
|
200
|
-
export const Progress =
|
|
429
|
+
export const Progress = React.forwardRef(function Progress(props, ref) {
|
|
430
|
+
const { children, ...rest } = props;
|
|
431
|
+
return React.createElement(customElements.getName(ProgressWC) ?? '%%prefix%%-progress', { ...rest, ref }, children);
|
|
432
|
+
});
|
|
201
433
|
|
|
202
|
-
export const Radio =
|
|
434
|
+
export const Radio = React.forwardRef(function Radio(props, ref) {
|
|
435
|
+
const { children, ...rest } = props;
|
|
436
|
+
return React.createElement(customElements.getName(RadioWC) ?? '%%prefix%%-radio', { ...rest, ref }, children);
|
|
437
|
+
});
|
|
203
438
|
|
|
204
|
-
export const RadioGroup =
|
|
439
|
+
export const RadioGroup = React.forwardRef(function RadioGroup(props, ref) {
|
|
440
|
+
const { children, ...rest } = props;
|
|
441
|
+
return React.createElement(customElements.getName(RadioGroupWC) ?? '%%prefix%%-radio-group', { ...rest, ref }, children);
|
|
442
|
+
});
|
|
205
443
|
|
|
206
|
-
export const Scheduler =
|
|
444
|
+
export const Scheduler = React.forwardRef(function Scheduler(props, ref) {
|
|
445
|
+
const { children, ...rest } = props;
|
|
446
|
+
return React.createElement(customElements.getName(SchedulerWC) ?? '%%prefix%%-scheduler', { ...rest, ref }, children);
|
|
447
|
+
});
|
|
207
448
|
|
|
208
|
-
export const SchedulerCronBuilder =
|
|
449
|
+
export const SchedulerCronBuilder = React.forwardRef(function SchedulerCronBuilder(props, ref) {
|
|
450
|
+
const { children, ...rest } = props;
|
|
451
|
+
return React.createElement(customElements.getName(SchedulerCronBuilderWC) ?? '%%prefix%%-scheduler-cron-builder', { ...rest, ref }, children);
|
|
452
|
+
});
|
|
209
453
|
|
|
210
|
-
export const SchedulerTimezone =
|
|
454
|
+
export const SchedulerTimezone = React.forwardRef(function SchedulerTimezone(props, ref) {
|
|
455
|
+
const { children, ...rest } = props;
|
|
456
|
+
return React.createElement(customElements.getName(SchedulerTimezoneWC) ?? '%%prefix%%-scheduler-timezone', { ...rest, ref }, children);
|
|
457
|
+
});
|
|
211
458
|
|
|
212
|
-
export const SearchBarCombobox =
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
459
|
+
export const SearchBarCombobox = React.forwardRef(function SearchBarCombobox(props, ref) {
|
|
460
|
+
const { onInputdeleted, children, ...rest } = props;
|
|
461
|
+
const _innerRef = React.useRef(null);
|
|
462
|
+
const _onInputdeletedRef = React.useRef(onInputdeleted);
|
|
463
|
+
_onInputdeletedRef.current = onInputdeleted;
|
|
464
|
+
React.useLayoutEffect(() => {
|
|
465
|
+
const el = _innerRef.current;
|
|
466
|
+
if (!el) return;
|
|
467
|
+
const _onInputdeletedFn = (e) => _onInputdeletedRef.current?.(e);
|
|
468
|
+
el.addEventListener('inputdeleted', _onInputdeletedFn);
|
|
469
|
+
return () => {
|
|
470
|
+
el.removeEventListener('inputdeleted', _onInputdeletedFn);
|
|
471
|
+
};
|
|
472
|
+
}, []);
|
|
473
|
+
return React.createElement(customElements.getName(SearchBarComboboxWC) ?? '%%prefix%%-search-bar-combobox', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
216
474
|
});
|
|
217
475
|
|
|
218
|
-
export const SearchBar =
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
476
|
+
export const SearchBar = React.forwardRef(function SearchBar(props, ref) {
|
|
477
|
+
const { onSelectionChange, children, ...rest } = props;
|
|
478
|
+
const _innerRef = React.useRef(null);
|
|
479
|
+
const _onSelectionChangeRef = React.useRef(onSelectionChange);
|
|
480
|
+
_onSelectionChangeRef.current = onSelectionChange;
|
|
481
|
+
React.useLayoutEffect(() => {
|
|
482
|
+
const el = _innerRef.current;
|
|
483
|
+
if (!el) return;
|
|
484
|
+
const _onSelectionChangeFn = (e) => _onSelectionChangeRef.current?.(e);
|
|
485
|
+
el.addEventListener('selectionChange', _onSelectionChangeFn);
|
|
486
|
+
return () => {
|
|
487
|
+
el.removeEventListener('selectionChange', _onSelectionChangeFn);
|
|
488
|
+
};
|
|
489
|
+
}, []);
|
|
490
|
+
return React.createElement(customElements.getName(SearchBarWC) ?? '%%prefix%%-search-bar', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
222
491
|
});
|
|
223
492
|
|
|
224
|
-
export const SectionNavigator =
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
493
|
+
export const SectionNavigator = React.forwardRef(function SectionNavigator(props, ref) {
|
|
494
|
+
const { onSectionNavigatorSetState, onSectionNavigatorSetStates, onSectionNavigatorClearState, onSectionNavigatorClearAllStates, children, ...rest } = props;
|
|
495
|
+
const _innerRef = React.useRef(null);
|
|
496
|
+
const _onSectionNavigatorSetStateRef = React.useRef(onSectionNavigatorSetState);
|
|
497
|
+
_onSectionNavigatorSetStateRef.current = onSectionNavigatorSetState;
|
|
498
|
+
const _onSectionNavigatorSetStatesRef = React.useRef(onSectionNavigatorSetStates);
|
|
499
|
+
_onSectionNavigatorSetStatesRef.current = onSectionNavigatorSetStates;
|
|
500
|
+
const _onSectionNavigatorClearStateRef = React.useRef(onSectionNavigatorClearState);
|
|
501
|
+
_onSectionNavigatorClearStateRef.current = onSectionNavigatorClearState;
|
|
502
|
+
const _onSectionNavigatorClearAllStatesRef = React.useRef(onSectionNavigatorClearAllStates);
|
|
503
|
+
_onSectionNavigatorClearAllStatesRef.current = onSectionNavigatorClearAllStates;
|
|
504
|
+
React.useLayoutEffect(() => {
|
|
505
|
+
const el = _innerRef.current;
|
|
506
|
+
if (!el) return;
|
|
507
|
+
const _onSectionNavigatorSetStateFn = (e) => _onSectionNavigatorSetStateRef.current?.(e);
|
|
508
|
+
el.addEventListener('section-navigator-set-state', _onSectionNavigatorSetStateFn);
|
|
509
|
+
const _onSectionNavigatorSetStatesFn = (e) => _onSectionNavigatorSetStatesRef.current?.(e);
|
|
510
|
+
el.addEventListener('section-navigator-set-states', _onSectionNavigatorSetStatesFn);
|
|
511
|
+
const _onSectionNavigatorClearStateFn = (e) => _onSectionNavigatorClearStateRef.current?.(e);
|
|
512
|
+
el.addEventListener('section-navigator-clear-state', _onSectionNavigatorClearStateFn);
|
|
513
|
+
const _onSectionNavigatorClearAllStatesFn = (e) => _onSectionNavigatorClearAllStatesRef.current?.(e);
|
|
514
|
+
el.addEventListener('section-navigator-clear-all-states', _onSectionNavigatorClearAllStatesFn);
|
|
515
|
+
return () => {
|
|
516
|
+
el.removeEventListener('section-navigator-set-state', _onSectionNavigatorSetStateFn);
|
|
517
|
+
el.removeEventListener('section-navigator-set-states', _onSectionNavigatorSetStatesFn);
|
|
518
|
+
el.removeEventListener('section-navigator-clear-state', _onSectionNavigatorClearStateFn);
|
|
519
|
+
el.removeEventListener('section-navigator-clear-all-states', _onSectionNavigatorClearAllStatesFn);
|
|
520
|
+
};
|
|
521
|
+
}, []);
|
|
522
|
+
return React.createElement(customElements.getName(SectionNavigatorWC) ?? '%%prefix%%-section-navigator', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
231
523
|
});
|
|
232
524
|
|
|
233
|
-
export const SegmentedControl =
|
|
525
|
+
export const SegmentedControl = React.forwardRef(function SegmentedControl(props, ref) {
|
|
526
|
+
const { children, ...rest } = props;
|
|
527
|
+
return React.createElement(customElements.getName(SegmentedControlWC) ?? '%%prefix%%-segmented-control', { ...rest, ref }, children);
|
|
528
|
+
});
|
|
234
529
|
|
|
235
|
-
export const Select =
|
|
530
|
+
export const Select = React.forwardRef(function Select(props, ref) {
|
|
531
|
+
const { children, ...rest } = props;
|
|
532
|
+
return React.createElement(customElements.getName(SelectWC) ?? '%%prefix%%-select', { ...rest, ref }, children);
|
|
533
|
+
});
|
|
236
534
|
|
|
237
|
-
export const Skeleton =
|
|
535
|
+
export const Skeleton = React.forwardRef(function Skeleton(props, ref) {
|
|
536
|
+
const { children, ...rest } = props;
|
|
537
|
+
return React.createElement(customElements.getName(SkeletonWC) ?? '%%prefix%%-skeleton', { ...rest, ref }, children);
|
|
538
|
+
});
|
|
238
539
|
|
|
239
|
-
export const Slider =
|
|
540
|
+
export const Slider = React.forwardRef(function Slider(props, ref) {
|
|
541
|
+
const { children, ...rest } = props;
|
|
542
|
+
return React.createElement(customElements.getName(SliderWC) ?? '%%prefix%%-slider', { ...rest, ref }, children);
|
|
543
|
+
});
|
|
240
544
|
|
|
241
|
-
export const SliderLabel =
|
|
545
|
+
export const SliderLabel = React.forwardRef(function SliderLabel(props, ref) {
|
|
546
|
+
const { children, ...rest } = props;
|
|
547
|
+
return React.createElement(customElements.getName(SliderLabelWC) ?? '%%prefix%%-slider-label', { ...rest, ref }, children);
|
|
548
|
+
});
|
|
242
549
|
|
|
243
|
-
export const Snackbar =
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
550
|
+
export const Snackbar = React.forwardRef(function Snackbar(props, ref) {
|
|
551
|
+
const { onAutoDismiss, children, ...rest } = props;
|
|
552
|
+
const _innerRef = React.useRef(null);
|
|
553
|
+
const _onAutoDismissRef = React.useRef(onAutoDismiss);
|
|
554
|
+
_onAutoDismissRef.current = onAutoDismiss;
|
|
555
|
+
React.useLayoutEffect(() => {
|
|
556
|
+
const el = _innerRef.current;
|
|
557
|
+
if (!el) return;
|
|
558
|
+
const _onAutoDismissFn = (e) => _onAutoDismissRef.current?.(e);
|
|
559
|
+
el.addEventListener('autoDismiss', _onAutoDismissFn);
|
|
560
|
+
return () => {
|
|
561
|
+
el.removeEventListener('autoDismiss', _onAutoDismissFn);
|
|
562
|
+
};
|
|
563
|
+
}, []);
|
|
564
|
+
return React.createElement(customElements.getName(SnackbarWC) ?? '%%prefix%%-snackbar', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
247
565
|
});
|
|
248
566
|
|
|
249
|
-
export const StackingIcons =
|
|
567
|
+
export const StackingIcons = React.forwardRef(function StackingIcons(props, ref) {
|
|
568
|
+
const { children, ...rest } = props;
|
|
569
|
+
return React.createElement(customElements.getName(StackingIconsWC) ?? '%%prefix%%-stacking-icons', { ...rest, ref }, children);
|
|
570
|
+
});
|
|
250
571
|
|
|
251
|
-
export const StatusPill =
|
|
572
|
+
export const StatusPill = React.forwardRef(function StatusPill(props, ref) {
|
|
573
|
+
const { children, ...rest } = props;
|
|
574
|
+
return React.createElement(customElements.getName(StatusPillWC) ?? '%%prefix%%-status-pill', { ...rest, ref }, children);
|
|
575
|
+
});
|
|
252
576
|
|
|
253
|
-
export const Stepper =
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
577
|
+
export const Stepper = React.forwardRef(function Stepper(props, ref) {
|
|
578
|
+
const { onStepClick, onValidationFailure, onNextStep, onValidationSuccess, children, ...rest } = props;
|
|
579
|
+
const _innerRef = React.useRef(null);
|
|
580
|
+
const _onStepClickRef = React.useRef(onStepClick);
|
|
581
|
+
_onStepClickRef.current = onStepClick;
|
|
582
|
+
const _onValidationFailureRef = React.useRef(onValidationFailure);
|
|
583
|
+
_onValidationFailureRef.current = onValidationFailure;
|
|
584
|
+
const _onNextStepRef = React.useRef(onNextStep);
|
|
585
|
+
_onNextStepRef.current = onNextStep;
|
|
586
|
+
const _onValidationSuccessRef = React.useRef(onValidationSuccess);
|
|
587
|
+
_onValidationSuccessRef.current = onValidationSuccess;
|
|
588
|
+
React.useLayoutEffect(() => {
|
|
589
|
+
const el = _innerRef.current;
|
|
590
|
+
if (!el) return;
|
|
591
|
+
const _onStepClickFn = (e) => _onStepClickRef.current?.(e);
|
|
592
|
+
el.addEventListener('step-click', _onStepClickFn);
|
|
593
|
+
const _onValidationFailureFn = (e) => _onValidationFailureRef.current?.(e);
|
|
594
|
+
el.addEventListener('validation-failure', _onValidationFailureFn);
|
|
595
|
+
const _onNextStepFn = (e) => _onNextStepRef.current?.(e);
|
|
596
|
+
el.addEventListener('next-step', _onNextStepFn);
|
|
597
|
+
const _onValidationSuccessFn = (e) => _onValidationSuccessRef.current?.(e);
|
|
598
|
+
el.addEventListener('validation-success', _onValidationSuccessFn);
|
|
599
|
+
return () => {
|
|
600
|
+
el.removeEventListener('step-click', _onStepClickFn);
|
|
601
|
+
el.removeEventListener('validation-failure', _onValidationFailureFn);
|
|
602
|
+
el.removeEventListener('next-step', _onNextStepFn);
|
|
603
|
+
el.removeEventListener('validation-success', _onValidationSuccessFn);
|
|
604
|
+
};
|
|
605
|
+
}, []);
|
|
606
|
+
return React.createElement(customElements.getName(StepperWC) ?? '%%prefix%%-stepper', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
260
607
|
});
|
|
261
608
|
|
|
262
|
-
export const StepperTab =
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
609
|
+
export const StepperTab = React.forwardRef(function StepperTab(props, ref) {
|
|
610
|
+
const { onTabClicked, children, ...rest } = props;
|
|
611
|
+
const _innerRef = React.useRef(null);
|
|
612
|
+
const _onTabClickedRef = React.useRef(onTabClicked);
|
|
613
|
+
_onTabClickedRef.current = onTabClicked;
|
|
614
|
+
React.useLayoutEffect(() => {
|
|
615
|
+
const el = _innerRef.current;
|
|
616
|
+
if (!el) return;
|
|
617
|
+
const _onTabClickedFn = (e) => _onTabClickedRef.current?.(e);
|
|
618
|
+
el.addEventListener('tab-clicked', _onTabClickedFn);
|
|
619
|
+
return () => {
|
|
620
|
+
el.removeEventListener('tab-clicked', _onTabClickedFn);
|
|
621
|
+
};
|
|
622
|
+
}, []);
|
|
623
|
+
return React.createElement(customElements.getName(StepperTabWC) ?? '%%prefix%%-stepper-tab', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
266
624
|
});
|
|
267
625
|
|
|
268
|
-
export const StepperTabPanel =
|
|
626
|
+
export const StepperTabPanel = React.forwardRef(function StepperTabPanel(props, ref) {
|
|
627
|
+
const { children, ...rest } = props;
|
|
628
|
+
return React.createElement(customElements.getName(StepperTabPanelWC) ?? '%%prefix%%-stepper-tab-panel', { ...rest, ref }, children);
|
|
629
|
+
});
|
|
269
630
|
|
|
270
|
-
export const Switch =
|
|
631
|
+
export const Switch = React.forwardRef(function Switch(props, ref) {
|
|
632
|
+
const { children, ...rest } = props;
|
|
633
|
+
return React.createElement(customElements.getName(SwitchWC) ?? '%%prefix%%-switch', { ...rest, ref }, children);
|
|
634
|
+
});
|
|
271
635
|
|
|
272
|
-
export const Tab =
|
|
636
|
+
export const Tab = React.forwardRef(function Tab(props, ref) {
|
|
637
|
+
const { children, ...rest } = props;
|
|
638
|
+
return React.createElement(customElements.getName(TabWC) ?? '%%prefix%%-tab', { ...rest, ref }, children);
|
|
639
|
+
});
|
|
273
640
|
|
|
274
|
-
export const TabPanel =
|
|
641
|
+
export const TabPanel = React.forwardRef(function TabPanel(props, ref) {
|
|
642
|
+
const { children, ...rest } = props;
|
|
643
|
+
return React.createElement(customElements.getName(TabPanelWC) ?? '%%prefix%%-tab-panel', { ...rest, ref }, children);
|
|
644
|
+
});
|
|
275
645
|
|
|
276
|
-
export const TextArea =
|
|
646
|
+
export const TextArea = React.forwardRef(function TextArea(props, ref) {
|
|
647
|
+
const { children, ...rest } = props;
|
|
648
|
+
return React.createElement(customElements.getName(TextAreaWC) ?? '%%prefix%%-text-area', { ...rest, ref }, children);
|
|
649
|
+
});
|
|
277
650
|
|
|
278
|
-
export const TextField =
|
|
651
|
+
export const TextField = React.forwardRef(function TextField(props, ref) {
|
|
652
|
+
const { children, ...rest } = props;
|
|
653
|
+
return React.createElement(customElements.getName(TextFieldWC) ?? '%%prefix%%-text-field', { ...rest, ref }, children);
|
|
654
|
+
});
|
|
279
655
|
|
|
280
|
-
export const Toast =
|
|
656
|
+
export const Toast = React.forwardRef(function Toast(props, ref) {
|
|
657
|
+
const { children, ...rest } = props;
|
|
658
|
+
return React.createElement(customElements.getName(ToastWC) ?? '%%prefix%%-toast', { ...rest, ref }, children);
|
|
659
|
+
});
|
|
281
660
|
|
|
282
|
-
export const Toolbar =
|
|
661
|
+
export const Toolbar = React.forwardRef(function Toolbar(props, ref) {
|
|
662
|
+
const { children, ...rest } = props;
|
|
663
|
+
return React.createElement(customElements.getName(ToolbarWC) ?? '%%prefix%%-toolbar', { ...rest, ref }, children);
|
|
664
|
+
});
|
|
283
665
|
|
|
284
|
-
export const TreeItem =
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
666
|
+
export const TreeItem = React.forwardRef(function TreeItem(props, ref) {
|
|
667
|
+
const { onExpandedChange, onSelectedChange, children, ...rest } = props;
|
|
668
|
+
const _innerRef = React.useRef(null);
|
|
669
|
+
const _onExpandedChangeRef = React.useRef(onExpandedChange);
|
|
670
|
+
_onExpandedChangeRef.current = onExpandedChange;
|
|
671
|
+
const _onSelectedChangeRef = React.useRef(onSelectedChange);
|
|
672
|
+
_onSelectedChangeRef.current = onSelectedChange;
|
|
673
|
+
React.useLayoutEffect(() => {
|
|
674
|
+
const el = _innerRef.current;
|
|
675
|
+
if (!el) return;
|
|
676
|
+
const _onExpandedChangeFn = (e) => _onExpandedChangeRef.current?.(e);
|
|
677
|
+
el.addEventListener('expanded-change', _onExpandedChangeFn);
|
|
678
|
+
const _onSelectedChangeFn = (e) => _onSelectedChangeRef.current?.(e);
|
|
679
|
+
el.addEventListener('selected-change', _onSelectedChangeFn);
|
|
680
|
+
return () => {
|
|
681
|
+
el.removeEventListener('expanded-change', _onExpandedChangeFn);
|
|
682
|
+
el.removeEventListener('selected-change', _onSelectedChangeFn);
|
|
683
|
+
};
|
|
684
|
+
}, []);
|
|
685
|
+
return React.createElement(customElements.getName(TreeItemWC) ?? '%%prefix%%-tree-item', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
289
686
|
});
|
|
290
687
|
|
|
291
|
-
export const TreeView =
|
|
688
|
+
export const TreeView = React.forwardRef(function TreeView(props, ref) {
|
|
689
|
+
const { children, ...rest } = props;
|
|
690
|
+
return React.createElement(customElements.getName(TreeViewWC) ?? '%%prefix%%-tree-view', { ...rest, ref }, children);
|
|
691
|
+
});
|
|
292
692
|
|
|
293
|
-
export const UrlInput =
|
|
693
|
+
export const UrlInput = React.forwardRef(function UrlInput(props, ref) {
|
|
694
|
+
const { children, ...rest } = props;
|
|
695
|
+
return React.createElement(customElements.getName(UrlInputWC) ?? '%%prefix%%-url-input', { ...rest, ref }, children);
|
|
696
|
+
});
|