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