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