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