@genesislcap/foundation-ui 14.424.1 → 14.425.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/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';
@@ -92,280 +91,785 @@ import { Tooltip as TooltipWC } from './esm/tooltip/tooltip.js';
92
91
  import { TreeView as TreeViewWC } from './esm/tree-view/tree-view.js';
93
92
  import { UrlInput as UrlInputWC } from './esm/url-input/url-input.js';
94
93
 
95
- const { wrap } = provideReactWrapper(React);
96
-
97
- export const AccordionItem = wrap(AccordionItemWC);
94
+ function _mergeRefs(...refs) {
95
+ return (value) => {
96
+ for (const ref of refs) {
97
+ if (typeof ref === 'function') ref(value);
98
+ else if (ref != null) ref.current = value;
99
+ }
100
+ };
101
+ }
102
+
103
+ export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
104
+ const { children, ...rest } = props;
105
+ return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
106
+ });
98
107
 
99
- export const Accordion = wrap(AccordionWC);
108
+ export const AccordionItem = React.forwardRef(function AccordionItem(props, ref) {
109
+ const { children, ...rest } = props;
110
+ return React.createElement(customElements.getName(AccordionItemWC) ?? '%%prefix%%-accordion-item', { ...rest, ref }, children);
111
+ });
100
112
 
101
- export const ActionsMenu = wrap(ActionsMenuWC);
113
+ export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
114
+ const { onCriteriaChanged, onValidationErrors, children, ...rest } = props;
115
+ const _innerRef = React.useRef(null);
116
+ const _onCriteriaChangedRef = React.useRef(onCriteriaChanged);
117
+ _onCriteriaChangedRef.current = onCriteriaChanged;
118
+ const _onValidationErrorsRef = React.useRef(onValidationErrors);
119
+ _onValidationErrorsRef.current = onValidationErrors;
120
+ React.useLayoutEffect(() => {
121
+ const el = _innerRef.current;
122
+ if (!el) return;
123
+ const _onCriteriaChangedFn = (e) => _onCriteriaChangedRef.current?.(e);
124
+ el.addEventListener('criteria-changed', _onCriteriaChangedFn);
125
+ const _onValidationErrorsFn = (e) => _onValidationErrorsRef.current?.(e);
126
+ el.addEventListener('validation-errors', _onValidationErrorsFn);
127
+ return () => {
128
+ el.removeEventListener('criteria-changed', _onCriteriaChangedFn);
129
+ el.removeEventListener('validation-errors', _onValidationErrorsFn);
130
+ };
131
+ }, []);
132
+ return React.createElement(customElements.getName(AiCriteriaSearchWC) ?? '%%prefix%%-ai-criteria-search', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
133
+ });
102
134
 
103
- export const AiCriteriaSearch = wrap(AiCriteriaSearchWC, {
104
- events: {
105
- onCriteriaChanged: 'criteria-changed',
106
- onValidationErrors: 'validation-errors',
107
- },
135
+ export const Accordion = React.forwardRef(function Accordion(props, ref) {
136
+ const { children, ...rest } = props;
137
+ return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
108
138
  });
109
139
 
110
- export const AiIndicator = wrap(AiIndicatorWC);
140
+ export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
141
+ const { children, ...rest } = props;
142
+ return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
143
+ });
111
144
 
112
- export const Anchor = wrap(AnchorWC);
145
+ export const Anchor = React.forwardRef(function Anchor(props, ref) {
146
+ const { children, ...rest } = props;
147
+ return React.createElement(customElements.getName(AnchorWC) ?? '%%prefix%%-anchor', { ...rest, ref }, children);
148
+ });
113
149
 
114
- export const AnchoredRegion = wrap(AnchoredRegionWC, {
115
- events: {
116
- onLoaded: 'loaded',
117
- onPositionchange: 'positionchange',
118
- },
150
+ export const AnchoredRegion = React.forwardRef(function AnchoredRegion(props, ref) {
151
+ const { onLoaded, onPositionchange, children, ...rest } = props;
152
+ const _innerRef = React.useRef(null);
153
+ const _onLoadedRef = React.useRef(onLoaded);
154
+ _onLoadedRef.current = onLoaded;
155
+ const _onPositionchangeRef = React.useRef(onPositionchange);
156
+ _onPositionchangeRef.current = onPositionchange;
157
+ React.useLayoutEffect(() => {
158
+ const el = _innerRef.current;
159
+ if (!el) return;
160
+ const _onLoadedFn = (e) => _onLoadedRef.current?.(e);
161
+ el.addEventListener('loaded', _onLoadedFn);
162
+ const _onPositionchangeFn = (e) => _onPositionchangeRef.current?.(e);
163
+ el.addEventListener('positionchange', _onPositionchangeFn);
164
+ return () => {
165
+ el.removeEventListener('loaded', _onLoadedFn);
166
+ el.removeEventListener('positionchange', _onPositionchangeFn);
167
+ };
168
+ }, []);
169
+ return React.createElement(customElements.getName(AnchoredRegionWC) ?? '%%prefix%%-anchored-region', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
119
170
  });
120
171
 
121
- export const Avatar = wrap(AvatarWC);
172
+ export const Avatar = React.forwardRef(function Avatar(props, ref) {
173
+ const { children, ...rest } = props;
174
+ return React.createElement(customElements.getName(AvatarWC) ?? '%%prefix%%-avatar', { ...rest, ref }, children);
175
+ });
122
176
 
123
- export const Badge = wrap(BadgeWC);
177
+ export const Badge = React.forwardRef(function Badge(props, ref) {
178
+ const { children, ...rest } = props;
179
+ return React.createElement(customElements.getName(BadgeWC) ?? '%%prefix%%-badge', { ...rest, ref }, children);
180
+ });
124
181
 
125
- export const Banner = wrap(BannerWC);
182
+ export const Banner = React.forwardRef(function Banner(props, ref) {
183
+ const { children, ...rest } = props;
184
+ return React.createElement(customElements.getName(BannerWC) ?? '%%prefix%%-banner', { ...rest, ref }, children);
185
+ });
126
186
 
127
- export const Breadcrumb = wrap(BreadcrumbWC);
187
+ export const Breadcrumb = React.forwardRef(function Breadcrumb(props, ref) {
188
+ const { children, ...rest } = props;
189
+ return React.createElement(customElements.getName(BreadcrumbWC) ?? '%%prefix%%-breadcrumb', { ...rest, ref }, children);
190
+ });
128
191
 
129
- export const BreadcrumbItem = wrap(BreadcrumbItemWC);
192
+ export const BreadcrumbItem = React.forwardRef(function BreadcrumbItem(props, ref) {
193
+ const { children, ...rest } = props;
194
+ return React.createElement(customElements.getName(BreadcrumbItemWC) ?? '%%prefix%%-breadcrumb-item', { ...rest, ref }, children);
195
+ });
130
196
 
131
- export const Button = wrap(ButtonWC);
197
+ export const Button = React.forwardRef(function Button(props, ref) {
198
+ const { children, ...rest } = props;
199
+ return React.createElement(customElements.getName(ButtonWC) ?? '%%prefix%%-button', { ...rest, ref }, children);
200
+ });
132
201
 
133
- export const Calendar = wrap(CalendarWC, {
134
- events: {
135
- onDateselected: 'dateselected',
136
- },
202
+ export const Calendar = React.forwardRef(function Calendar(props, ref) {
203
+ const { onDateselected, children, ...rest } = props;
204
+ const _innerRef = React.useRef(null);
205
+ const _onDateselectedRef = React.useRef(onDateselected);
206
+ _onDateselectedRef.current = onDateselected;
207
+ React.useLayoutEffect(() => {
208
+ const el = _innerRef.current;
209
+ if (!el) return;
210
+ const _onDateselectedFn = (e) => _onDateselectedRef.current?.(e);
211
+ el.addEventListener('dateselected', _onDateselectedFn);
212
+ return () => {
213
+ el.removeEventListener('dateselected', _onDateselectedFn);
214
+ };
215
+ }, []);
216
+ return React.createElement(customElements.getName(CalendarWC) ?? '%%prefix%%-calendar', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
137
217
  });
138
218
 
139
- export const Card = wrap(CardWC);
219
+ export const Card = React.forwardRef(function Card(props, ref) {
220
+ const { children, ...rest } = props;
221
+ return React.createElement(customElements.getName(CardWC) ?? '%%prefix%%-card', { ...rest, ref }, children);
222
+ });
140
223
 
141
- export const CategorizedMultiselect = wrap(CategorizedMultiselectWC, {
142
- events: {
143
- onSelectionChange: 'selectionChange',
144
- },
224
+ export const CategorizedMultiselect = React.forwardRef(function CategorizedMultiselect(props, ref) {
225
+ const { onSelectionChange, children, ...rest } = props;
226
+ const _innerRef = React.useRef(null);
227
+ const _onSelectionChangeRef = React.useRef(onSelectionChange);
228
+ _onSelectionChangeRef.current = onSelectionChange;
229
+ React.useLayoutEffect(() => {
230
+ const el = _innerRef.current;
231
+ if (!el) return;
232
+ const _onSelectionChangeFn = (e) => _onSelectionChangeRef.current?.(e);
233
+ el.addEventListener('selectionChange', _onSelectionChangeFn);
234
+ return () => {
235
+ el.removeEventListener('selectionChange', _onSelectionChangeFn);
236
+ };
237
+ }, []);
238
+ return React.createElement(customElements.getName(CategorizedMultiselectWC) ?? '%%prefix%%-categorized-multiselect', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
145
239
  });
146
240
 
147
- export const Checkbox = wrap(CheckboxWC);
241
+ export const Checkbox = React.forwardRef(function Checkbox(props, ref) {
242
+ const { children, ...rest } = props;
243
+ return React.createElement(customElements.getName(CheckboxWC) ?? '%%prefix%%-checkbox', { ...rest, ref }, children);
244
+ });
148
245
 
149
- export const Combobox = wrap(ComboboxWC);
246
+ export const Combobox = React.forwardRef(function Combobox(props, ref) {
247
+ const { children, ...rest } = props;
248
+ return React.createElement(customElements.getName(ComboboxWC) ?? '%%prefix%%-combobox', { ...rest, ref }, children);
249
+ });
150
250
 
151
- export const ConnectionIndicator = wrap(ConnectionIndicatorWC);
251
+ export const ConnectionIndicator = React.forwardRef(function ConnectionIndicator(props, ref) {
252
+ const { children, ...rest } = props;
253
+ return React.createElement(customElements.getName(ConnectionIndicatorWC) ?? '%%prefix%%-connection-indicator', { ...rest, ref }, children);
254
+ });
152
255
 
153
- export const DataGrid = wrap(DataGridWC);
256
+ export const DataGrid = React.forwardRef(function DataGrid(props, ref) {
257
+ const { children, ...rest } = props;
258
+ return React.createElement(customElements.getName(DataGridWC) ?? '%%prefix%%-data-grid', { ...rest, ref }, children);
259
+ });
154
260
 
155
- export const DataGridCell = wrap(DataGridCellWC, {
156
- events: {
157
- onCellFocused: 'cell-focused',
158
- },
261
+ export const DataGridCell = React.forwardRef(function DataGridCell(props, ref) {
262
+ const { onCellFocused, children, ...rest } = props;
263
+ const _innerRef = React.useRef(null);
264
+ const _onCellFocusedRef = React.useRef(onCellFocused);
265
+ _onCellFocusedRef.current = onCellFocused;
266
+ React.useLayoutEffect(() => {
267
+ const el = _innerRef.current;
268
+ if (!el) return;
269
+ const _onCellFocusedFn = (e) => _onCellFocusedRef.current?.(e);
270
+ el.addEventListener('cell-focused', _onCellFocusedFn);
271
+ return () => {
272
+ el.removeEventListener('cell-focused', _onCellFocusedFn);
273
+ };
274
+ }, []);
275
+ return React.createElement(customElements.getName(DataGridCellWC) ?? '%%prefix%%-data-grid-cell', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
159
276
  });
160
277
 
161
- export const DataGridRow = wrap(DataGridRowWC, {
162
- events: {
163
- onRowFocused: 'row-focused',
164
- },
278
+ export const DataGridRow = React.forwardRef(function DataGridRow(props, ref) {
279
+ const { onRowFocused, children, ...rest } = props;
280
+ const _innerRef = React.useRef(null);
281
+ const _onRowFocusedRef = React.useRef(onRowFocused);
282
+ _onRowFocusedRef.current = onRowFocused;
283
+ React.useLayoutEffect(() => {
284
+ const el = _innerRef.current;
285
+ if (!el) return;
286
+ const _onRowFocusedFn = (e) => _onRowFocusedRef.current?.(e);
287
+ el.addEventListener('row-focused', _onRowFocusedFn);
288
+ return () => {
289
+ el.removeEventListener('row-focused', _onRowFocusedFn);
290
+ };
291
+ }, []);
292
+ return React.createElement(customElements.getName(DataGridRowWC) ?? '%%prefix%%-data-grid-row', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
165
293
  });
166
294
 
167
- export const DatePicker = wrap(DatePickerWC, {
168
- events: {
169
- onValueChanged: 'value-changed',
170
- },
295
+ export const DatePicker = React.forwardRef(function DatePicker(props, ref) {
296
+ const { onValueChanged, children, ...rest } = props;
297
+ const _innerRef = React.useRef(null);
298
+ const _onValueChangedRef = React.useRef(onValueChanged);
299
+ _onValueChangedRef.current = onValueChanged;
300
+ React.useLayoutEffect(() => {
301
+ const el = _innerRef.current;
302
+ if (!el) return;
303
+ const _onValueChangedFn = (e) => _onValueChangedRef.current?.(e);
304
+ el.addEventListener('value-changed', _onValueChangedFn);
305
+ return () => {
306
+ el.removeEventListener('value-changed', _onValueChangedFn);
307
+ };
308
+ }, []);
309
+ return React.createElement(customElements.getName(DatePickerWC) ?? '%%prefix%%-date-picker', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
171
310
  });
172
311
 
173
- export const FoundationDesignSystemProvider = wrap(FoundationDesignSystemProviderWC);
312
+ export const FoundationDesignSystemProvider = React.forwardRef(function FoundationDesignSystemProvider(props, ref) {
313
+ const { children, ...rest } = props;
314
+ return React.createElement(customElements.getName(FoundationDesignSystemProviderWC) ?? '%%prefix%%-design-system-provider', { ...rest, ref }, children);
315
+ });
174
316
 
175
- export const Dialog = wrap(DialogWC, {
176
- events: {
177
- onClose: 'close',
178
- },
317
+ export const Dialog = React.forwardRef(function Dialog(props, ref) {
318
+ const { onClose, children, ...rest } = props;
319
+ const _innerRef = React.useRef(null);
320
+ const _onCloseRef = React.useRef(onClose);
321
+ _onCloseRef.current = onClose;
322
+ React.useLayoutEffect(() => {
323
+ const el = _innerRef.current;
324
+ if (!el) return;
325
+ const _onCloseFn = (e) => _onCloseRef.current?.(e);
326
+ el.addEventListener('close', _onCloseFn);
327
+ return () => {
328
+ el.removeEventListener('close', _onCloseFn);
329
+ };
330
+ }, []);
331
+ return React.createElement(customElements.getName(DialogWC) ?? '%%prefix%%-dialog', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
179
332
  });
180
333
 
181
- export const Disclosure = wrap(DisclosureWC);
334
+ export const Disclosure = React.forwardRef(function Disclosure(props, ref) {
335
+ const { children, ...rest } = props;
336
+ return React.createElement(customElements.getName(DisclosureWC) ?? '%%prefix%%-disclosure', { ...rest, ref }, children);
337
+ });
182
338
 
183
- export const Divider = wrap(DividerWC);
339
+ export const Divider = React.forwardRef(function Divider(props, ref) {
340
+ const { children, ...rest } = props;
341
+ return React.createElement(customElements.getName(DividerWC) ?? '%%prefix%%-divider', { ...rest, ref }, children);
342
+ });
184
343
 
185
- export const DropdownMenu = wrap(DropdownMenuWC);
344
+ export const DropdownMenu = React.forwardRef(function DropdownMenu(props, ref) {
345
+ const { children, ...rest } = props;
346
+ return React.createElement(customElements.getName(DropdownMenuWC) ?? '%%prefix%%-dropdown-menu', { ...rest, ref }, children);
347
+ });
186
348
 
187
- export const EnvironmentIndicator = wrap(EnvironmentIndicatorWC);
349
+ export const EnvironmentIndicator = React.forwardRef(function EnvironmentIndicator(props, ref) {
350
+ const { children, ...rest } = props;
351
+ return React.createElement(customElements.getName(EnvironmentIndicatorWC) ?? '%%prefix%%-environment-indicator', { ...rest, ref }, children);
352
+ });
188
353
 
189
- export const ErrorBanner = wrap(ErrorBannerWC);
354
+ export const ErrorBanner = React.forwardRef(function ErrorBanner(props, ref) {
355
+ const { children, ...rest } = props;
356
+ return React.createElement(customElements.getName(ErrorBannerWC) ?? '%%prefix%%-error-banner', { ...rest, ref }, children);
357
+ });
190
358
 
191
- export const ErrorBoundary = wrap(ErrorBoundaryWC);
359
+ export const ErrorBoundary = React.forwardRef(function ErrorBoundary(props, ref) {
360
+ const { children, ...rest } = props;
361
+ return React.createElement(customElements.getName(ErrorBoundaryWC) ?? '%%prefix%%-error-boundary', { ...rest, ref }, children);
362
+ });
192
363
 
193
- export const ErrorDialog = wrap(ErrorDialogWC);
364
+ export const ErrorDialog = React.forwardRef(function ErrorDialog(props, ref) {
365
+ const { children, ...rest } = props;
366
+ return React.createElement(customElements.getName(ErrorDialogWC) ?? '%%prefix%%-error-dialog', { ...rest, ref }, children);
367
+ });
194
368
 
195
- export const FileReader = wrap(FileReaderWC, {
196
- events: {
197
- onFileRead: 'file-read',
198
- onClear: 'clear',
199
- },
369
+ export const FileReader = React.forwardRef(function FileReader(props, ref) {
370
+ const { onFileRead, onClear, children, ...rest } = props;
371
+ const _innerRef = React.useRef(null);
372
+ const _onFileReadRef = React.useRef(onFileRead);
373
+ _onFileReadRef.current = onFileRead;
374
+ const _onClearRef = React.useRef(onClear);
375
+ _onClearRef.current = onClear;
376
+ React.useLayoutEffect(() => {
377
+ const el = _innerRef.current;
378
+ if (!el) return;
379
+ const _onFileReadFn = (e) => _onFileReadRef.current?.(e);
380
+ el.addEventListener('file-read', _onFileReadFn);
381
+ const _onClearFn = (e) => _onClearRef.current?.(e);
382
+ el.addEventListener('clear', _onClearFn);
383
+ return () => {
384
+ el.removeEventListener('file-read', _onFileReadFn);
385
+ el.removeEventListener('clear', _onClearFn);
386
+ };
387
+ }, []);
388
+ return React.createElement(customElements.getName(FileReaderWC) ?? '%%prefix%%-file-reader', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
200
389
  });
201
390
 
202
- export const FileUpload = wrap(FileUploadWC, {
203
- events: {
204
- onFileSelected: 'file-selected',
205
- onSuccess: 'success',
206
- onErrorOut: 'errorOut',
207
- onClear: 'clear',
208
- },
391
+ export const FileUpload = React.forwardRef(function FileUpload(props, ref) {
392
+ const { onFileSelected, onSuccess, onErrorOut, onClear, children, ...rest } = props;
393
+ const _innerRef = React.useRef(null);
394
+ const _onFileSelectedRef = React.useRef(onFileSelected);
395
+ _onFileSelectedRef.current = onFileSelected;
396
+ const _onSuccessRef = React.useRef(onSuccess);
397
+ _onSuccessRef.current = onSuccess;
398
+ const _onErrorOutRef = React.useRef(onErrorOut);
399
+ _onErrorOutRef.current = onErrorOut;
400
+ const _onClearRef = React.useRef(onClear);
401
+ _onClearRef.current = onClear;
402
+ React.useLayoutEffect(() => {
403
+ const el = _innerRef.current;
404
+ if (!el) return;
405
+ const _onFileSelectedFn = (e) => _onFileSelectedRef.current?.(e);
406
+ el.addEventListener('file-selected', _onFileSelectedFn);
407
+ const _onSuccessFn = (e) => _onSuccessRef.current?.(e);
408
+ el.addEventListener('success', _onSuccessFn);
409
+ const _onErrorOutFn = (e) => _onErrorOutRef.current?.(e);
410
+ el.addEventListener('errorOut', _onErrorOutFn);
411
+ const _onClearFn = (e) => _onClearRef.current?.(e);
412
+ el.addEventListener('clear', _onClearFn);
413
+ return () => {
414
+ el.removeEventListener('file-selected', _onFileSelectedFn);
415
+ el.removeEventListener('success', _onSuccessFn);
416
+ el.removeEventListener('errorOut', _onErrorOutFn);
417
+ el.removeEventListener('clear', _onClearFn);
418
+ };
419
+ }, []);
420
+ return React.createElement(customElements.getName(FileUploadWC) ?? '%%prefix%%-file-upload', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
209
421
  });
210
422
 
211
- export const Filter = wrap(FilterWC, {
212
- events: {
213
- onFilterChanged: 'filter-changed',
214
- onFilterCleared: 'filter-cleared',
215
- },
423
+ export const Filter = React.forwardRef(function Filter(props, ref) {
424
+ const { onFilterChanged, onFilterCleared, children, ...rest } = props;
425
+ const _innerRef = React.useRef(null);
426
+ const _onFilterChangedRef = React.useRef(onFilterChanged);
427
+ _onFilterChangedRef.current = onFilterChanged;
428
+ const _onFilterClearedRef = React.useRef(onFilterCleared);
429
+ _onFilterClearedRef.current = onFilterCleared;
430
+ React.useLayoutEffect(() => {
431
+ const el = _innerRef.current;
432
+ if (!el) return;
433
+ const _onFilterChangedFn = (e) => _onFilterChangedRef.current?.(e);
434
+ el.addEventListener('filter-changed', _onFilterChangedFn);
435
+ const _onFilterClearedFn = (e) => _onFilterClearedRef.current?.(e);
436
+ el.addEventListener('filter-cleared', _onFilterClearedFn);
437
+ return () => {
438
+ el.removeEventListener('filter-changed', _onFilterChangedFn);
439
+ el.removeEventListener('filter-cleared', _onFilterClearedFn);
440
+ };
441
+ }, []);
442
+ return React.createElement(customElements.getName(FilterWC) ?? '%%prefix%%-filter', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
216
443
  });
217
444
 
218
- export const FilterBar = wrap(FilterBarWC);
445
+ export const FilterBar = React.forwardRef(function FilterBar(props, ref) {
446
+ const { children, ...rest } = props;
447
+ return React.createElement(customElements.getName(FilterBarWC) ?? '%%prefix%%-filter-bar', { ...rest, ref }, children);
448
+ });
219
449
 
220
- export const FlexLayout = wrap(FlexLayoutWC);
450
+ export const FlexLayout = React.forwardRef(function FlexLayout(props, ref) {
451
+ const { children, ...rest } = props;
452
+ return React.createElement(customElements.getName(FlexLayoutWC) ?? '%%prefix%%-flex-layout', { ...rest, ref }, children);
453
+ });
221
454
 
222
- export const Flipper = wrap(FlipperWC);
455
+ export const Flipper = React.forwardRef(function Flipper(props, ref) {
456
+ const { children, ...rest } = props;
457
+ return React.createElement(customElements.getName(FlipperWC) ?? '%%prefix%%-flipper', { ...rest, ref }, children);
458
+ });
223
459
 
224
- export const Flyout = wrap(FlyoutWC, {
225
- events: {
226
- onClosed: 'closed',
227
- },
460
+ export const Flyout = React.forwardRef(function Flyout(props, ref) {
461
+ const { onClosed, children, ...rest } = props;
462
+ const _innerRef = React.useRef(null);
463
+ const _onClosedRef = React.useRef(onClosed);
464
+ _onClosedRef.current = onClosed;
465
+ React.useLayoutEffect(() => {
466
+ const el = _innerRef.current;
467
+ if (!el) return;
468
+ const _onClosedFn = (e) => _onClosedRef.current?.(e);
469
+ el.addEventListener('closed', _onClosedFn);
470
+ return () => {
471
+ el.removeEventListener('closed', _onClosedFn);
472
+ };
473
+ }, []);
474
+ return React.createElement(customElements.getName(FlyoutWC) ?? '%%prefix%%-flyout', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
228
475
  });
229
476
 
230
- export const GridLayout = wrap(GridLayoutWC);
477
+ export const GridLayout = React.forwardRef(function GridLayout(props, ref) {
478
+ const { children, ...rest } = props;
479
+ return React.createElement(customElements.getName(GridLayoutWC) ?? '%%prefix%%-grid-layout', { ...rest, ref }, children);
480
+ });
231
481
 
232
- export const GridLayoutItem = wrap(GridLayoutItemWC);
482
+ export const GridLayoutItem = React.forwardRef(function GridLayoutItem(props, ref) {
483
+ const { children, ...rest } = props;
484
+ return React.createElement(customElements.getName(GridLayoutItemWC) ?? '%%prefix%%-grid-layout-item', { ...rest, ref }, children);
485
+ });
233
486
 
234
- export const HorizontalScroll = wrap(HorizontalScrollWC, {
235
- events: {
236
- onScrollstart: 'scrollstart',
237
- onScrollend: 'scrollend',
238
- },
487
+ export const HorizontalScroll = React.forwardRef(function HorizontalScroll(props, ref) {
488
+ const { onScrollstart, onScrollend, children, ...rest } = props;
489
+ const _innerRef = React.useRef(null);
490
+ const _onScrollstartRef = React.useRef(onScrollstart);
491
+ _onScrollstartRef.current = onScrollstart;
492
+ const _onScrollendRef = React.useRef(onScrollend);
493
+ _onScrollendRef.current = onScrollend;
494
+ React.useLayoutEffect(() => {
495
+ const el = _innerRef.current;
496
+ if (!el) return;
497
+ const _onScrollstartFn = (e) => _onScrollstartRef.current?.(e);
498
+ el.addEventListener('scrollstart', _onScrollstartFn);
499
+ const _onScrollendFn = (e) => _onScrollendRef.current?.(e);
500
+ el.addEventListener('scrollend', _onScrollendFn);
501
+ return () => {
502
+ el.removeEventListener('scrollstart', _onScrollstartFn);
503
+ el.removeEventListener('scrollend', _onScrollendFn);
504
+ };
505
+ }, []);
506
+ return React.createElement(customElements.getName(HorizontalScrollWC) ?? '%%prefix%%-horizontal-scroll', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
239
507
  });
240
508
 
241
- export const Icon = wrap(IconWC);
509
+ export const Icon = React.forwardRef(function Icon(props, ref) {
510
+ const { children, ...rest } = props;
511
+ return React.createElement(customElements.getName(IconWC) ?? '%%prefix%%-icon', { ...rest, ref }, children);
512
+ });
242
513
 
243
- export const Listbox = wrap(ListboxWC);
514
+ export const Listbox = React.forwardRef(function Listbox(props, ref) {
515
+ const { children, ...rest } = props;
516
+ return React.createElement(customElements.getName(ListboxWC) ?? '%%prefix%%-listbox', { ...rest, ref }, children);
517
+ });
244
518
 
245
- export const ListboxOption = wrap(ListboxOptionWC);
519
+ export const ListboxOption = React.forwardRef(function ListboxOption(props, ref) {
520
+ const { children, ...rest } = props;
521
+ return React.createElement(customElements.getName(ListboxOptionWC) ?? '%%prefix%%-option', { ...rest, ref }, children);
522
+ });
246
523
 
247
- export const Menu = wrap(MenuWC);
524
+ export const Menu = React.forwardRef(function Menu(props, ref) {
525
+ const { children, ...rest } = props;
526
+ return React.createElement(customElements.getName(MenuWC) ?? '%%prefix%%-menu', { ...rest, ref }, children);
527
+ });
248
528
 
249
- export const MenuItem = wrap(MenuItemWC, {
250
- events: {
251
- onOnMenuClick: 'onMenuClick',
252
- onExpandedChange: 'expanded-change',
253
- },
529
+ export const MenuItem = React.forwardRef(function MenuItem(props, ref) {
530
+ const { onOnMenuClick, onExpandedChange, children, ...rest } = props;
531
+ const _innerRef = React.useRef(null);
532
+ const _onOnMenuClickRef = React.useRef(onOnMenuClick);
533
+ _onOnMenuClickRef.current = onOnMenuClick;
534
+ const _onExpandedChangeRef = React.useRef(onExpandedChange);
535
+ _onExpandedChangeRef.current = onExpandedChange;
536
+ React.useLayoutEffect(() => {
537
+ const el = _innerRef.current;
538
+ if (!el) return;
539
+ const _onOnMenuClickFn = (e) => _onOnMenuClickRef.current?.(e);
540
+ el.addEventListener('onMenuClick', _onOnMenuClickFn);
541
+ const _onExpandedChangeFn = (e) => _onExpandedChangeRef.current?.(e);
542
+ el.addEventListener('expanded-change', _onExpandedChangeFn);
543
+ return () => {
544
+ el.removeEventListener('onMenuClick', _onOnMenuClickFn);
545
+ el.removeEventListener('expanded-change', _onExpandedChangeFn);
546
+ };
547
+ }, []);
548
+ return React.createElement(customElements.getName(MenuItemWC) ?? '%%prefix%%-menu-item', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
254
549
  });
255
550
 
256
- export const Modal = wrap(ModalWC);
551
+ export const Modal = React.forwardRef(function Modal(props, ref) {
552
+ const { children, ...rest } = props;
553
+ return React.createElement(customElements.getName(ModalWC) ?? '%%prefix%%-modal', { ...rest, ref }, children);
554
+ });
257
555
 
258
- export const Multiselect = wrap(MultiselectWC, {
259
- events: {
260
- onSelectionChange: 'selectionChange',
261
- onClear: 'clear',
262
- },
556
+ export const Multiselect = React.forwardRef(function Multiselect(props, ref) {
557
+ const { onSelectionChange, onClear, children, ...rest } = props;
558
+ const _innerRef = React.useRef(null);
559
+ const _onSelectionChangeRef = React.useRef(onSelectionChange);
560
+ _onSelectionChangeRef.current = onSelectionChange;
561
+ const _onClearRef = React.useRef(onClear);
562
+ _onClearRef.current = onClear;
563
+ React.useLayoutEffect(() => {
564
+ const el = _innerRef.current;
565
+ if (!el) return;
566
+ const _onSelectionChangeFn = (e) => _onSelectionChangeRef.current?.(e);
567
+ el.addEventListener('selectionChange', _onSelectionChangeFn);
568
+ const _onClearFn = (e) => _onClearRef.current?.(e);
569
+ el.addEventListener('clear', _onClearFn);
570
+ return () => {
571
+ el.removeEventListener('selectionChange', _onSelectionChangeFn);
572
+ el.removeEventListener('clear', _onClearFn);
573
+ };
574
+ }, []);
575
+ return React.createElement(customElements.getName(MultiselectWC) ?? '%%prefix%%-multiselect', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
263
576
  });
264
577
 
265
- export const NotificationListener = wrap(NotificationListenerWC);
578
+ export const NotificationListener = React.forwardRef(function NotificationListener(props, ref) {
579
+ const { children, ...rest } = props;
580
+ return React.createElement(customElements.getName(NotificationListenerWC) ?? '%%prefix%%-notification-listener', { ...rest, ref }, children);
581
+ });
266
582
 
267
- export const NumberField = wrap(NumberFieldWC);
583
+ export const NumberField = React.forwardRef(function NumberField(props, ref) {
584
+ const { children, ...rest } = props;
585
+ return React.createElement(customElements.getName(NumberFieldWC) ?? '%%prefix%%-number-field', { ...rest, ref }, children);
586
+ });
268
587
 
269
- export const Optgroup = wrap(OptgroupWC);
588
+ export const Optgroup = React.forwardRef(function Optgroup(props, ref) {
589
+ const { children, ...rest } = props;
590
+ return React.createElement(customElements.getName(OptgroupWC) ?? '%%prefix%%-optgroup', { ...rest, ref }, children);
591
+ });
270
592
 
271
- export const Popper = wrap(PopperWC);
593
+ export const Popper = React.forwardRef(function Popper(props, ref) {
594
+ const { children, ...rest } = props;
595
+ return React.createElement(customElements.getName(PopperWC) ?? '%%prefix%%-popper', { ...rest, ref }, children);
596
+ });
272
597
 
273
- export const Progress = wrap(ProgressWC);
598
+ export const Progress = React.forwardRef(function Progress(props, ref) {
599
+ const { children, ...rest } = props;
600
+ return React.createElement(customElements.getName(ProgressWC) ?? '%%prefix%%-progress', { ...rest, ref }, children);
601
+ });
274
602
 
275
- export const ProgressRing = wrap(ProgressRingWC);
603
+ export const ProgressRing = React.forwardRef(function ProgressRing(props, ref) {
604
+ const { children, ...rest } = props;
605
+ return React.createElement(customElements.getName(ProgressRingWC) ?? '%%prefix%%-progress-ring', { ...rest, ref }, children);
606
+ });
276
607
 
277
- export const Radio = wrap(RadioWC);
608
+ export const Radio = React.forwardRef(function Radio(props, ref) {
609
+ const { children, ...rest } = props;
610
+ return React.createElement(customElements.getName(RadioWC) ?? '%%prefix%%-radio', { ...rest, ref }, children);
611
+ });
278
612
 
279
- export const RadioGroup = wrap(RadioGroupWC);
613
+ export const RadioGroup = React.forwardRef(function RadioGroup(props, ref) {
614
+ const { children, ...rest } = props;
615
+ return React.createElement(customElements.getName(RadioGroupWC) ?? '%%prefix%%-radio-group', { ...rest, ref }, children);
616
+ });
280
617
 
281
- export const Scheduler = wrap(SchedulerWC);
618
+ export const Scheduler = React.forwardRef(function Scheduler(props, ref) {
619
+ const { children, ...rest } = props;
620
+ return React.createElement(customElements.getName(SchedulerWC) ?? '%%prefix%%-scheduler', { ...rest, ref }, children);
621
+ });
282
622
 
283
- export const SchedulerCronBuilder = wrap(SchedulerCronBuilderWC);
623
+ export const SchedulerCronBuilder = React.forwardRef(function SchedulerCronBuilder(props, ref) {
624
+ const { children, ...rest } = props;
625
+ return React.createElement(customElements.getName(SchedulerCronBuilderWC) ?? '%%prefix%%-scheduler-cron-builder', { ...rest, ref }, children);
626
+ });
284
627
 
285
- export const SchedulerTimezone = wrap(SchedulerTimezoneWC);
628
+ export const SchedulerTimezone = React.forwardRef(function SchedulerTimezone(props, ref) {
629
+ const { children, ...rest } = props;
630
+ return React.createElement(customElements.getName(SchedulerTimezoneWC) ?? '%%prefix%%-scheduler-timezone', { ...rest, ref }, children);
631
+ });
286
632
 
287
- export const SearchBarCombobox = wrap(SearchBarComboboxWC, {
288
- events: {
289
- onInputdeleted: 'inputdeleted',
290
- },
633
+ export const SearchBarCombobox = React.forwardRef(function SearchBarCombobox(props, ref) {
634
+ const { onInputdeleted, children, ...rest } = props;
635
+ const _innerRef = React.useRef(null);
636
+ const _onInputdeletedRef = React.useRef(onInputdeleted);
637
+ _onInputdeletedRef.current = onInputdeleted;
638
+ React.useLayoutEffect(() => {
639
+ const el = _innerRef.current;
640
+ if (!el) return;
641
+ const _onInputdeletedFn = (e) => _onInputdeletedRef.current?.(e);
642
+ el.addEventListener('inputdeleted', _onInputdeletedFn);
643
+ return () => {
644
+ el.removeEventListener('inputdeleted', _onInputdeletedFn);
645
+ };
646
+ }, []);
647
+ return React.createElement(customElements.getName(SearchBarComboboxWC) ?? '%%prefix%%-search-bar-combobox', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
291
648
  });
292
649
 
293
- export const SearchBar = wrap(SearchBarWC, {
294
- events: {
295
- onSelectionChange: 'selectionChange',
296
- },
650
+ export const SearchBar = React.forwardRef(function SearchBar(props, ref) {
651
+ const { onSelectionChange, children, ...rest } = props;
652
+ const _innerRef = React.useRef(null);
653
+ const _onSelectionChangeRef = React.useRef(onSelectionChange);
654
+ _onSelectionChangeRef.current = onSelectionChange;
655
+ React.useLayoutEffect(() => {
656
+ const el = _innerRef.current;
657
+ if (!el) return;
658
+ const _onSelectionChangeFn = (e) => _onSelectionChangeRef.current?.(e);
659
+ el.addEventListener('selectionChange', _onSelectionChangeFn);
660
+ return () => {
661
+ el.removeEventListener('selectionChange', _onSelectionChangeFn);
662
+ };
663
+ }, []);
664
+ return React.createElement(customElements.getName(SearchBarWC) ?? '%%prefix%%-search-bar', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
297
665
  });
298
666
 
299
- export const SectionNavigator = wrap(SectionNavigatorWC, {
300
- events: {
301
- onSectionNavigatorSetState: 'section-navigator-set-state',
302
- onSectionNavigatorSetStates: 'section-navigator-set-states',
303
- onSectionNavigatorClearState: 'section-navigator-clear-state',
304
- onSectionNavigatorClearAllStates: 'section-navigator-clear-all-states',
305
- },
667
+ export const SectionNavigator = React.forwardRef(function SectionNavigator(props, ref) {
668
+ const { onSectionNavigatorSetState, onSectionNavigatorSetStates, onSectionNavigatorClearState, onSectionNavigatorClearAllStates, children, ...rest } = props;
669
+ const _innerRef = React.useRef(null);
670
+ const _onSectionNavigatorSetStateRef = React.useRef(onSectionNavigatorSetState);
671
+ _onSectionNavigatorSetStateRef.current = onSectionNavigatorSetState;
672
+ const _onSectionNavigatorSetStatesRef = React.useRef(onSectionNavigatorSetStates);
673
+ _onSectionNavigatorSetStatesRef.current = onSectionNavigatorSetStates;
674
+ const _onSectionNavigatorClearStateRef = React.useRef(onSectionNavigatorClearState);
675
+ _onSectionNavigatorClearStateRef.current = onSectionNavigatorClearState;
676
+ const _onSectionNavigatorClearAllStatesRef = React.useRef(onSectionNavigatorClearAllStates);
677
+ _onSectionNavigatorClearAllStatesRef.current = onSectionNavigatorClearAllStates;
678
+ React.useLayoutEffect(() => {
679
+ const el = _innerRef.current;
680
+ if (!el) return;
681
+ const _onSectionNavigatorSetStateFn = (e) => _onSectionNavigatorSetStateRef.current?.(e);
682
+ el.addEventListener('section-navigator-set-state', _onSectionNavigatorSetStateFn);
683
+ const _onSectionNavigatorSetStatesFn = (e) => _onSectionNavigatorSetStatesRef.current?.(e);
684
+ el.addEventListener('section-navigator-set-states', _onSectionNavigatorSetStatesFn);
685
+ const _onSectionNavigatorClearStateFn = (e) => _onSectionNavigatorClearStateRef.current?.(e);
686
+ el.addEventListener('section-navigator-clear-state', _onSectionNavigatorClearStateFn);
687
+ const _onSectionNavigatorClearAllStatesFn = (e) => _onSectionNavigatorClearAllStatesRef.current?.(e);
688
+ el.addEventListener('section-navigator-clear-all-states', _onSectionNavigatorClearAllStatesFn);
689
+ return () => {
690
+ el.removeEventListener('section-navigator-set-state', _onSectionNavigatorSetStateFn);
691
+ el.removeEventListener('section-navigator-set-states', _onSectionNavigatorSetStatesFn);
692
+ el.removeEventListener('section-navigator-clear-state', _onSectionNavigatorClearStateFn);
693
+ el.removeEventListener('section-navigator-clear-all-states', _onSectionNavigatorClearAllStatesFn);
694
+ };
695
+ }, []);
696
+ return React.createElement(customElements.getName(SectionNavigatorWC) ?? '%%prefix%%-section-navigator', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
306
697
  });
307
698
 
308
- export const SegmentedControl = wrap(SegmentedControlWC);
699
+ export const SegmentedControl = React.forwardRef(function SegmentedControl(props, ref) {
700
+ const { children, ...rest } = props;
701
+ return React.createElement(customElements.getName(SegmentedControlWC) ?? '%%prefix%%-segmented-control', { ...rest, ref }, children);
702
+ });
309
703
 
310
- export const SegmentedItem = wrap(SegmentedItemWC);
704
+ export const SegmentedItem = React.forwardRef(function SegmentedItem(props, ref) {
705
+ const { children, ...rest } = props;
706
+ return React.createElement(customElements.getName(SegmentedItemWC) ?? '%%prefix%%-segmented-item', { ...rest, ref }, children);
707
+ });
311
708
 
312
- export const Select = wrap(SelectWC);
709
+ export const Select = React.forwardRef(function Select(props, ref) {
710
+ const { children, ...rest } = props;
711
+ return React.createElement(customElements.getName(SelectWC) ?? '%%prefix%%-select', { ...rest, ref }, children);
712
+ });
313
713
 
314
- export const Skeleton = wrap(SkeletonWC);
714
+ export const Skeleton = React.forwardRef(function Skeleton(props, ref) {
715
+ const { children, ...rest } = props;
716
+ return React.createElement(customElements.getName(SkeletonWC) ?? '%%prefix%%-skeleton', { ...rest, ref }, children);
717
+ });
315
718
 
316
- export const Slider = wrap(SliderWC);
719
+ export const Slider = React.forwardRef(function Slider(props, ref) {
720
+ const { children, ...rest } = props;
721
+ return React.createElement(customElements.getName(SliderWC) ?? '%%prefix%%-slider', { ...rest, ref }, children);
722
+ });
317
723
 
318
- export const SliderLabel = wrap(SliderLabelWC);
724
+ export const SliderLabel = React.forwardRef(function SliderLabel(props, ref) {
725
+ const { children, ...rest } = props;
726
+ return React.createElement(customElements.getName(SliderLabelWC) ?? '%%prefix%%-slider-label', { ...rest, ref }, children);
727
+ });
319
728
 
320
- export const Snackbar = wrap(SnackbarWC, {
321
- events: {
322
- onAutoDismiss: 'autoDismiss',
323
- },
729
+ export const Snackbar = React.forwardRef(function Snackbar(props, ref) {
730
+ const { onAutoDismiss, children, ...rest } = props;
731
+ const _innerRef = React.useRef(null);
732
+ const _onAutoDismissRef = React.useRef(onAutoDismiss);
733
+ _onAutoDismissRef.current = onAutoDismiss;
734
+ React.useLayoutEffect(() => {
735
+ const el = _innerRef.current;
736
+ if (!el) return;
737
+ const _onAutoDismissFn = (e) => _onAutoDismissRef.current?.(e);
738
+ el.addEventListener('autoDismiss', _onAutoDismissFn);
739
+ return () => {
740
+ el.removeEventListener('autoDismiss', _onAutoDismissFn);
741
+ };
742
+ }, []);
743
+ return React.createElement(customElements.getName(SnackbarWC) ?? '%%prefix%%-snackbar', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
324
744
  });
325
745
 
326
- export const StackingIcons = wrap(StackingIconsWC);
746
+ export const StackingIcons = React.forwardRef(function StackingIcons(props, ref) {
747
+ const { children, ...rest } = props;
748
+ return React.createElement(customElements.getName(StackingIconsWC) ?? '%%prefix%%-stacking-icons', { ...rest, ref }, children);
749
+ });
327
750
 
328
- export const StatusPill = wrap(StatusPillWC);
751
+ export const StatusPill = React.forwardRef(function StatusPill(props, ref) {
752
+ const { children, ...rest } = props;
753
+ return React.createElement(customElements.getName(StatusPillWC) ?? '%%prefix%%-status-pill', { ...rest, ref }, children);
754
+ });
329
755
 
330
- export const Stepper = wrap(StepperWC, {
331
- events: {
332
- onStepClick: 'step-click',
333
- onValidationFailure: 'validation-failure',
334
- onNextStep: 'next-step',
335
- onValidationSuccess: 'validation-success',
336
- },
756
+ export const Stepper = React.forwardRef(function Stepper(props, ref) {
757
+ const { onStepClick, onValidationFailure, onNextStep, onValidationSuccess, children, ...rest } = props;
758
+ const _innerRef = React.useRef(null);
759
+ const _onStepClickRef = React.useRef(onStepClick);
760
+ _onStepClickRef.current = onStepClick;
761
+ const _onValidationFailureRef = React.useRef(onValidationFailure);
762
+ _onValidationFailureRef.current = onValidationFailure;
763
+ const _onNextStepRef = React.useRef(onNextStep);
764
+ _onNextStepRef.current = onNextStep;
765
+ const _onValidationSuccessRef = React.useRef(onValidationSuccess);
766
+ _onValidationSuccessRef.current = onValidationSuccess;
767
+ React.useLayoutEffect(() => {
768
+ const el = _innerRef.current;
769
+ if (!el) return;
770
+ const _onStepClickFn = (e) => _onStepClickRef.current?.(e);
771
+ el.addEventListener('step-click', _onStepClickFn);
772
+ const _onValidationFailureFn = (e) => _onValidationFailureRef.current?.(e);
773
+ el.addEventListener('validation-failure', _onValidationFailureFn);
774
+ const _onNextStepFn = (e) => _onNextStepRef.current?.(e);
775
+ el.addEventListener('next-step', _onNextStepFn);
776
+ const _onValidationSuccessFn = (e) => _onValidationSuccessRef.current?.(e);
777
+ el.addEventListener('validation-success', _onValidationSuccessFn);
778
+ return () => {
779
+ el.removeEventListener('step-click', _onStepClickFn);
780
+ el.removeEventListener('validation-failure', _onValidationFailureFn);
781
+ el.removeEventListener('next-step', _onNextStepFn);
782
+ el.removeEventListener('validation-success', _onValidationSuccessFn);
783
+ };
784
+ }, []);
785
+ return React.createElement(customElements.getName(StepperWC) ?? '%%prefix%%-stepper', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
337
786
  });
338
787
 
339
- export const StepperTab = wrap(StepperTabWC, {
340
- events: {
341
- onTabClicked: 'tab-clicked',
342
- },
788
+ export const StepperTab = React.forwardRef(function StepperTab(props, ref) {
789
+ const { onTabClicked, children, ...rest } = props;
790
+ const _innerRef = React.useRef(null);
791
+ const _onTabClickedRef = React.useRef(onTabClicked);
792
+ _onTabClickedRef.current = onTabClicked;
793
+ React.useLayoutEffect(() => {
794
+ const el = _innerRef.current;
795
+ if (!el) return;
796
+ const _onTabClickedFn = (e) => _onTabClickedRef.current?.(e);
797
+ el.addEventListener('tab-clicked', _onTabClickedFn);
798
+ return () => {
799
+ el.removeEventListener('tab-clicked', _onTabClickedFn);
800
+ };
801
+ }, []);
802
+ return React.createElement(customElements.getName(StepperTabWC) ?? '%%prefix%%-stepper-tab', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
343
803
  });
344
804
 
345
- export const StepperTabPanel = wrap(StepperTabPanelWC);
805
+ export const StepperTabPanel = React.forwardRef(function StepperTabPanel(props, ref) {
806
+ const { children, ...rest } = props;
807
+ return React.createElement(customElements.getName(StepperTabPanelWC) ?? '%%prefix%%-stepper-tab-panel', { ...rest, ref }, children);
808
+ });
346
809
 
347
- export const Switch = wrap(SwitchWC);
810
+ export const Switch = React.forwardRef(function Switch(props, ref) {
811
+ const { children, ...rest } = props;
812
+ return React.createElement(customElements.getName(SwitchWC) ?? '%%prefix%%-switch', { ...rest, ref }, children);
813
+ });
348
814
 
349
- export const Tab = wrap(TabWC);
815
+ export const Tab = React.forwardRef(function Tab(props, ref) {
816
+ const { children, ...rest } = props;
817
+ return React.createElement(customElements.getName(TabWC) ?? '%%prefix%%-tab', { ...rest, ref }, children);
818
+ });
350
819
 
351
- export const TabPanel = wrap(TabPanelWC);
820
+ export const TabPanel = React.forwardRef(function TabPanel(props, ref) {
821
+ const { children, ...rest } = props;
822
+ return React.createElement(customElements.getName(TabPanelWC) ?? '%%prefix%%-tab-panel', { ...rest, ref }, children);
823
+ });
352
824
 
353
- export const Tabs = wrap(TabsWC);
825
+ export const Tabs = React.forwardRef(function Tabs(props, ref) {
826
+ const { children, ...rest } = props;
827
+ return React.createElement(customElements.getName(TabsWC) ?? '%%prefix%%-tabs', { ...rest, ref }, children);
828
+ });
354
829
 
355
- export const TextArea = wrap(TextAreaWC);
830
+ export const TextArea = React.forwardRef(function TextArea(props, ref) {
831
+ const { children, ...rest } = props;
832
+ return React.createElement(customElements.getName(TextAreaWC) ?? '%%prefix%%-text-area', { ...rest, ref }, children);
833
+ });
356
834
 
357
- export const TextField = wrap(TextFieldWC);
835
+ export const TextField = React.forwardRef(function TextField(props, ref) {
836
+ const { children, ...rest } = props;
837
+ return React.createElement(customElements.getName(TextFieldWC) ?? '%%prefix%%-text-field', { ...rest, ref }, children);
838
+ });
358
839
 
359
- export const Toast = wrap(ToastWC);
840
+ export const Toast = React.forwardRef(function Toast(props, ref) {
841
+ const { children, ...rest } = props;
842
+ return React.createElement(customElements.getName(ToastWC) ?? '%%prefix%%-toast', { ...rest, ref }, children);
843
+ });
360
844
 
361
- export const Toolbar = wrap(ToolbarWC);
845
+ export const Toolbar = React.forwardRef(function Toolbar(props, ref) {
846
+ const { children, ...rest } = props;
847
+ return React.createElement(customElements.getName(ToolbarWC) ?? '%%prefix%%-toolbar', { ...rest, ref }, children);
848
+ });
362
849
 
363
- export const Tooltip = wrap(TooltipWC, {
364
- events: {
365
- onDismiss: 'dismiss',
366
- },
850
+ export const Tooltip = React.forwardRef(function Tooltip(props, ref) {
851
+ const { onDismiss, children, ...rest } = props;
852
+ const _innerRef = React.useRef(null);
853
+ const _onDismissRef = React.useRef(onDismiss);
854
+ _onDismissRef.current = onDismiss;
855
+ React.useLayoutEffect(() => {
856
+ const el = _innerRef.current;
857
+ if (!el) return;
858
+ const _onDismissFn = (e) => _onDismissRef.current?.(e);
859
+ el.addEventListener('dismiss', _onDismissFn);
860
+ return () => {
861
+ el.removeEventListener('dismiss', _onDismissFn);
862
+ };
863
+ }, []);
864
+ return React.createElement(customElements.getName(TooltipWC) ?? '%%prefix%%-tooltip', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
367
865
  });
368
866
 
369
- export const TreeView = wrap(TreeViewWC);
867
+ export const TreeView = React.forwardRef(function TreeView(props, ref) {
868
+ const { children, ...rest } = props;
869
+ return React.createElement(customElements.getName(TreeViewWC) ?? '%%prefix%%-tree-view', { ...rest, ref }, children);
870
+ });
370
871
 
371
- export const UrlInput = wrap(UrlInputWC);
872
+ export const UrlInput = React.forwardRef(function UrlInput(props, ref) {
873
+ const { children, ...rest } = props;
874
+ return React.createElement(customElements.getName(UrlInputWC) ?? '%%prefix%%-url-input', { ...rest, ref }, children);
875
+ });