@openwebf/react-cupertino-ui 0.2.9 → 0.2.11

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/index.d.mts CHANGED
@@ -35,7 +35,11 @@ interface FlutterCupertinoTimerPickerProps {
35
35
  /**
36
36
  * change event handler
37
37
  */
38
- onChange?: (event: CustomEvent) => void;
38
+ onChange?: (event: CustomEvent<number>) => void;
39
+ /**
40
+ * HTML id attribute
41
+ */
42
+ id?: string;
39
43
  /**
40
44
  * Additional CSS styles
41
45
  */
@@ -119,11 +123,15 @@ interface FlutterCupertinoTextareaProps {
119
123
  /**
120
124
  * input event handler
121
125
  */
122
- onInput?: (event: CustomEvent) => void;
126
+ onInput?: (event: CustomEvent<string>) => void;
123
127
  /**
124
128
  * complete event handler
125
129
  */
126
130
  onComplete?: (event: Event) => void;
131
+ /**
132
+ * HTML id attribute
133
+ */
134
+ id?: string;
127
135
  /**
128
136
  * Additional CSS styles
129
137
  */
@@ -211,7 +219,11 @@ interface FlutterCupertinoTabBarProps {
211
219
  /**
212
220
  * tabchange event handler
213
221
  */
214
- onTabchange?: (event: CustomEvent) => void;
222
+ onTabchange?: (event: CustomEvent<number>) => void;
223
+ /**
224
+ * HTML id attribute
225
+ */
226
+ id?: string;
215
227
  /**
216
228
  * Additional CSS styles
217
229
  */
@@ -277,6 +289,10 @@ interface FlutterCupertinoTabBarItemProps {
277
289
  * @default undefined
278
290
  */
279
291
  path?: string;
292
+ /**
293
+ * HTML id attribute
294
+ */
295
+ id?: string;
280
296
  /**
281
297
  * Additional CSS styles
282
298
  */
@@ -315,7 +331,11 @@ interface FlutterCupertinoTabProps {
315
331
  /**
316
332
  * change event handler
317
333
  */
318
- onChange?: (event: CustomEvent) => void;
334
+ onChange?: (event: CustomEvent<number>) => void;
335
+ /**
336
+ * HTML id attribute
337
+ */
338
+ id?: string;
319
339
  /**
320
340
  * Additional CSS styles
321
341
  */
@@ -355,6 +375,10 @@ interface FlutterCupertinoTabItemProps {
355
375
  * @default undefined
356
376
  */
357
377
  title?: string;
378
+ /**
379
+ * HTML id attribute
380
+ */
381
+ id?: string;
358
382
  /**
359
383
  * Additional CSS styles
360
384
  */
@@ -413,7 +437,11 @@ interface FlutterCupertinoSwitchProps {
413
437
  /**
414
438
  * change event handler
415
439
  */
416
- onChange?: (event: CustomEvent) => void;
440
+ onChange?: (event: CustomEvent<boolean>) => void;
441
+ /**
442
+ * HTML id attribute
443
+ */
444
+ id?: string;
417
445
  /**
418
446
  * Additional CSS styles
419
447
  */
@@ -477,15 +505,19 @@ interface FlutterCupertinoSliderProps {
477
505
  /**
478
506
  * change event handler
479
507
  */
480
- onChange?: (event: CustomEvent) => void;
508
+ onChange?: (event: CustomEvent<number>) => void;
481
509
  /**
482
510
  * changestart event handler
483
511
  */
484
- onChangestart?: (event: CustomEvent) => void;
512
+ onChangestart?: (event: CustomEvent<number>) => void;
485
513
  /**
486
514
  * changeend event handler
487
515
  */
488
- onChangeend?: (event: CustomEvent) => void;
516
+ onChangeend?: (event: CustomEvent<number>) => void;
517
+ /**
518
+ * HTML id attribute
519
+ */
520
+ id?: string;
489
521
  /**
490
522
  * Additional CSS styles
491
523
  */
@@ -590,15 +622,19 @@ interface FlutterCupertinoSearchInputProps {
590
622
  /**
591
623
  * input event handler
592
624
  */
593
- onInput?: (event: CustomEvent) => void;
625
+ onInput?: (event: CustomEvent<string>) => void;
594
626
  /**
595
627
  * search event handler
596
628
  */
597
- onSearch?: (event: CustomEvent) => void;
629
+ onSearch?: (event: CustomEvent<string>) => void;
598
630
  /**
599
631
  * clear event handler
600
632
  */
601
633
  onClear?: (event: CustomEvent) => void;
634
+ /**
635
+ * HTML id attribute
636
+ */
637
+ id?: string;
602
638
  /**
603
639
  * Additional CSS styles
604
640
  */
@@ -687,7 +723,11 @@ interface FlutterCupertinoRadioProps {
687
723
  /**
688
724
  * change event handler
689
725
  */
690
- onChange?: (event: CustomEvent) => void;
726
+ onChange?: (event: CustomEvent<string>) => void;
727
+ /**
728
+ * HTML id attribute
729
+ */
730
+ id?: string;
691
731
  /**
692
732
  * Additional CSS styles
693
733
  */
@@ -736,7 +776,11 @@ interface FlutterCupertinoPickerProps {
736
776
  /**
737
777
  * change event handler
738
778
  */
739
- onChange?: (event: CustomEvent) => void;
779
+ onChange?: (event: CustomEvent<string>) => void;
780
+ /**
781
+ * HTML id attribute
782
+ */
783
+ id?: string;
740
784
  /**
741
785
  * Additional CSS styles
742
786
  */
@@ -801,6 +845,10 @@ interface FlutterCupertinoModalPopupProps {
801
845
  * close event handler
802
846
  */
803
847
  onClose?: (event: CustomEvent) => void;
848
+ /**
849
+ * HTML id attribute
850
+ */
851
+ id?: string;
804
852
  /**
805
853
  * Additional CSS styles
806
854
  */
@@ -895,11 +943,15 @@ interface FlutterCupertinoInputProps {
895
943
  /**
896
944
  * input event handler
897
945
  */
898
- onInput?: (event: CustomEvent) => void;
946
+ onInput?: (event: CustomEvent<string>) => void;
899
947
  /**
900
948
  * submit event handler
901
949
  */
902
- onSubmit?: (event: CustomEvent) => void;
950
+ onSubmit?: (event: CustomEvent<string>) => void;
951
+ /**
952
+ * HTML id attribute
953
+ */
954
+ id?: string;
903
955
  /**
904
956
  * Additional CSS styles
905
957
  */
@@ -964,6 +1016,10 @@ interface FlutterCupertinoIconProps {
964
1016
  * @default undefined
965
1017
  */
966
1018
  label?: string;
1019
+ /**
1020
+ * HTML id attribute
1021
+ */
1022
+ id?: string;
967
1023
  /**
968
1024
  * Additional CSS styles
969
1025
  */
@@ -1057,7 +1113,11 @@ interface FlutterCupertinoDatePickerProps {
1057
1113
  /**
1058
1114
  * change event handler
1059
1115
  */
1060
- onChange?: (event: CustomEvent) => void;
1116
+ onChange?: (event: CustomEvent<string>) => void;
1117
+ /**
1118
+ * HTML id attribute
1119
+ */
1120
+ id?: string;
1061
1121
  /**
1062
1122
  * Additional CSS styles
1063
1123
  */
@@ -1105,6 +1165,10 @@ interface FlutterCupertinoContextMenuProps {
1105
1165
  * @default undefined
1106
1166
  */
1107
1167
  enableHapticFeedback?: boolean;
1168
+ /**
1169
+ * HTML id attribute
1170
+ */
1171
+ id?: string;
1108
1172
  /**
1109
1173
  * Additional CSS styles
1110
1174
  */
@@ -1194,7 +1258,11 @@ interface FlutterCupertinoCheckboxProps {
1194
1258
  /**
1195
1259
  * change event handler
1196
1260
  */
1197
- onChange?: (event: CustomEvent) => void;
1261
+ onChange?: (event: CustomEvent<boolean>) => void;
1262
+ /**
1263
+ * HTML id attribute
1264
+ */
1265
+ id?: string;
1198
1266
  /**
1199
1267
  * Additional CSS styles
1200
1268
  */
@@ -1254,6 +1322,10 @@ interface FlutterCupertinoButtonProps {
1254
1322
  * click event handler
1255
1323
  */
1256
1324
  onClick?: (event: Event) => void;
1325
+ /**
1326
+ * HTML id attribute
1327
+ */
1328
+ id?: string;
1257
1329
  /**
1258
1330
  * Additional CSS styles
1259
1331
  */
@@ -1288,72 +1360,4 @@ declare const FlutterCupertinoButton: React.ForwardRefExoticComponent<FlutterCup
1288
1360
  children?: React.ReactNode;
1289
1361
  } & React.RefAttributes<FlutterCupertinoButtonElement>>;
1290
1362
 
1291
- /**
1292
- * @license
1293
- * Copyright 2018 Google LLC
1294
- * SPDX-License-Identifier: BSD-3-Clause
1295
- */
1296
-
1297
- type DistributiveOmit<T, K extends string | number | symbol> = T extends any ? (K extends keyof T ? Omit<T, K> : T) : T;
1298
- type PropsWithoutRef<T> = DistributiveOmit<T, 'ref'>;
1299
- /**
1300
- * Type of the React component wrapping the web component. This is the return
1301
- * type of `createComponent`.
1302
- */
1303
- type ReactWebComponent<I extends HTMLElement, E extends EventNames = {}> = React.ForwardRefExoticComponent<PropsWithoutRef<ComponentProps<I, E>> & React.RefAttributes<I>>;
1304
- type ElementProps<I> = Partial<Omit<I, keyof HTMLElement>>;
1305
- type ComponentProps<I, E extends EventNames = {}> = Omit<React.HTMLAttributes<I>, keyof E | keyof ElementProps<I>> & ElementProps<I>;
1306
- /**
1307
- * Type used to cast an event name with an event type when providing the
1308
- * `events` option to `createComponent` for better typing of the event handler
1309
- * prop.
1310
- *
1311
- * Example:
1312
- *
1313
- * ```ts
1314
- * const FooComponent = createComponent({
1315
- * ...
1316
- * events: {
1317
- * onfoo: 'foo' as EventName<FooEvent>,
1318
- * }
1319
- * });
1320
- * ```
1321
- *
1322
- * `onfoo` prop will have the type `(e: FooEvent) => void`.
1323
- */
1324
- type EventName<T extends Event = Event> = string & {
1325
- __eventType: T;
1326
- };
1327
- type EventNames = Record<string, EventName | string>;
1328
- interface Options<E extends EventNames = {}> {
1329
- tagName: string;
1330
- events?: E;
1331
- displayName?: string;
1332
- }
1333
- /**
1334
- * Creates a React component for a custom element. Properties are distinguished
1335
- * from attributes automatically, and events can be configured so they are added
1336
- * to the custom element as event listeners.
1337
- *
1338
- * @param options An options bag containing the parameters needed to generate a
1339
- * wrapped web component.
1340
- *
1341
- * @param options.react The React module, typically imported from the `react`
1342
- * npm package.
1343
- * @param options.tagName The custom element tag name registered via
1344
- * `customElements.define`.
1345
- * @param options.elementClass The custom element class registered via
1346
- * `customElements.define`.
1347
- * @param options.events An object listing events to which the component can
1348
- * listen. The object keys are the event property names passed in via React
1349
- * props and the object values are the names of the corresponding events
1350
- * generated by the custom element. For example, given `{onactivate:
1351
- * 'activate'}` an event function may be passed via the component's `onactivate`
1352
- * prop and will be called when the custom element fires its `activate` event.
1353
- * @param options.displayName A React component display name, used in debugging
1354
- * messages. Default value is inferred from the name of custom element class
1355
- * registered via `customElements.define`.
1356
- */
1357
- declare const createComponent: <E extends any, I extends any>({ tagName, events, displayName }: Options) => ReactWebComponent<E, I>;
1358
-
1359
- export { FlutterCupertinoButton, type FlutterCupertinoButtonElement, FlutterCupertinoCheckbox, type FlutterCupertinoCheckboxElement, FlutterCupertinoContextMenu, type FlutterCupertinoContextMenuElement, FlutterCupertinoDatePicker, type FlutterCupertinoDatePickerElement, FlutterCupertinoIcon, type FlutterCupertinoIconElement, FlutterCupertinoInput, type FlutterCupertinoInputElement, FlutterCupertinoModalPopup, type FlutterCupertinoModalPopupElement, FlutterCupertinoPicker, type FlutterCupertinoPickerElement, FlutterCupertinoRadio, type FlutterCupertinoRadioElement, FlutterCupertinoSearchInput, type FlutterCupertinoSearchInputElement, FlutterCupertinoSlider, type FlutterCupertinoSliderElement, FlutterCupertinoSwitch, type FlutterCupertinoSwitchElement, FlutterCupertinoTab, FlutterCupertinoTabBar, type FlutterCupertinoTabBarElement, FlutterCupertinoTabBarItem, type FlutterCupertinoTabBarItemElement, type FlutterCupertinoTabElement, FlutterCupertinoTabItem, type FlutterCupertinoTabItemElement, FlutterCupertinoTextarea, type FlutterCupertinoTextareaElement, FlutterCupertinoTimerPicker, type FlutterCupertinoTimerPickerElement, createComponent };
1363
+ export { FlutterCupertinoButton, type FlutterCupertinoButtonElement, FlutterCupertinoCheckbox, type FlutterCupertinoCheckboxElement, FlutterCupertinoContextMenu, type FlutterCupertinoContextMenuElement, FlutterCupertinoDatePicker, type FlutterCupertinoDatePickerElement, FlutterCupertinoIcon, type FlutterCupertinoIconElement, FlutterCupertinoInput, type FlutterCupertinoInputElement, FlutterCupertinoModalPopup, type FlutterCupertinoModalPopupElement, FlutterCupertinoPicker, type FlutterCupertinoPickerElement, FlutterCupertinoRadio, type FlutterCupertinoRadioElement, FlutterCupertinoSearchInput, type FlutterCupertinoSearchInputElement, FlutterCupertinoSlider, type FlutterCupertinoSliderElement, FlutterCupertinoSwitch, type FlutterCupertinoSwitchElement, FlutterCupertinoTab, FlutterCupertinoTabBar, type FlutterCupertinoTabBarElement, FlutterCupertinoTabBarItem, type FlutterCupertinoTabBarItemElement, type FlutterCupertinoTabElement, FlutterCupertinoTabItem, type FlutterCupertinoTabItemElement, FlutterCupertinoTextarea, type FlutterCupertinoTextareaElement, FlutterCupertinoTimerPicker, type FlutterCupertinoTimerPickerElement };
package/dist/index.d.ts CHANGED
@@ -35,7 +35,11 @@ interface FlutterCupertinoTimerPickerProps {
35
35
  /**
36
36
  * change event handler
37
37
  */
38
- onChange?: (event: CustomEvent) => void;
38
+ onChange?: (event: CustomEvent<number>) => void;
39
+ /**
40
+ * HTML id attribute
41
+ */
42
+ id?: string;
39
43
  /**
40
44
  * Additional CSS styles
41
45
  */
@@ -119,11 +123,15 @@ interface FlutterCupertinoTextareaProps {
119
123
  /**
120
124
  * input event handler
121
125
  */
122
- onInput?: (event: CustomEvent) => void;
126
+ onInput?: (event: CustomEvent<string>) => void;
123
127
  /**
124
128
  * complete event handler
125
129
  */
126
130
  onComplete?: (event: Event) => void;
131
+ /**
132
+ * HTML id attribute
133
+ */
134
+ id?: string;
127
135
  /**
128
136
  * Additional CSS styles
129
137
  */
@@ -211,7 +219,11 @@ interface FlutterCupertinoTabBarProps {
211
219
  /**
212
220
  * tabchange event handler
213
221
  */
214
- onTabchange?: (event: CustomEvent) => void;
222
+ onTabchange?: (event: CustomEvent<number>) => void;
223
+ /**
224
+ * HTML id attribute
225
+ */
226
+ id?: string;
215
227
  /**
216
228
  * Additional CSS styles
217
229
  */
@@ -277,6 +289,10 @@ interface FlutterCupertinoTabBarItemProps {
277
289
  * @default undefined
278
290
  */
279
291
  path?: string;
292
+ /**
293
+ * HTML id attribute
294
+ */
295
+ id?: string;
280
296
  /**
281
297
  * Additional CSS styles
282
298
  */
@@ -315,7 +331,11 @@ interface FlutterCupertinoTabProps {
315
331
  /**
316
332
  * change event handler
317
333
  */
318
- onChange?: (event: CustomEvent) => void;
334
+ onChange?: (event: CustomEvent<number>) => void;
335
+ /**
336
+ * HTML id attribute
337
+ */
338
+ id?: string;
319
339
  /**
320
340
  * Additional CSS styles
321
341
  */
@@ -355,6 +375,10 @@ interface FlutterCupertinoTabItemProps {
355
375
  * @default undefined
356
376
  */
357
377
  title?: string;
378
+ /**
379
+ * HTML id attribute
380
+ */
381
+ id?: string;
358
382
  /**
359
383
  * Additional CSS styles
360
384
  */
@@ -413,7 +437,11 @@ interface FlutterCupertinoSwitchProps {
413
437
  /**
414
438
  * change event handler
415
439
  */
416
- onChange?: (event: CustomEvent) => void;
440
+ onChange?: (event: CustomEvent<boolean>) => void;
441
+ /**
442
+ * HTML id attribute
443
+ */
444
+ id?: string;
417
445
  /**
418
446
  * Additional CSS styles
419
447
  */
@@ -477,15 +505,19 @@ interface FlutterCupertinoSliderProps {
477
505
  /**
478
506
  * change event handler
479
507
  */
480
- onChange?: (event: CustomEvent) => void;
508
+ onChange?: (event: CustomEvent<number>) => void;
481
509
  /**
482
510
  * changestart event handler
483
511
  */
484
- onChangestart?: (event: CustomEvent) => void;
512
+ onChangestart?: (event: CustomEvent<number>) => void;
485
513
  /**
486
514
  * changeend event handler
487
515
  */
488
- onChangeend?: (event: CustomEvent) => void;
516
+ onChangeend?: (event: CustomEvent<number>) => void;
517
+ /**
518
+ * HTML id attribute
519
+ */
520
+ id?: string;
489
521
  /**
490
522
  * Additional CSS styles
491
523
  */
@@ -590,15 +622,19 @@ interface FlutterCupertinoSearchInputProps {
590
622
  /**
591
623
  * input event handler
592
624
  */
593
- onInput?: (event: CustomEvent) => void;
625
+ onInput?: (event: CustomEvent<string>) => void;
594
626
  /**
595
627
  * search event handler
596
628
  */
597
- onSearch?: (event: CustomEvent) => void;
629
+ onSearch?: (event: CustomEvent<string>) => void;
598
630
  /**
599
631
  * clear event handler
600
632
  */
601
633
  onClear?: (event: CustomEvent) => void;
634
+ /**
635
+ * HTML id attribute
636
+ */
637
+ id?: string;
602
638
  /**
603
639
  * Additional CSS styles
604
640
  */
@@ -687,7 +723,11 @@ interface FlutterCupertinoRadioProps {
687
723
  /**
688
724
  * change event handler
689
725
  */
690
- onChange?: (event: CustomEvent) => void;
726
+ onChange?: (event: CustomEvent<string>) => void;
727
+ /**
728
+ * HTML id attribute
729
+ */
730
+ id?: string;
691
731
  /**
692
732
  * Additional CSS styles
693
733
  */
@@ -736,7 +776,11 @@ interface FlutterCupertinoPickerProps {
736
776
  /**
737
777
  * change event handler
738
778
  */
739
- onChange?: (event: CustomEvent) => void;
779
+ onChange?: (event: CustomEvent<string>) => void;
780
+ /**
781
+ * HTML id attribute
782
+ */
783
+ id?: string;
740
784
  /**
741
785
  * Additional CSS styles
742
786
  */
@@ -801,6 +845,10 @@ interface FlutterCupertinoModalPopupProps {
801
845
  * close event handler
802
846
  */
803
847
  onClose?: (event: CustomEvent) => void;
848
+ /**
849
+ * HTML id attribute
850
+ */
851
+ id?: string;
804
852
  /**
805
853
  * Additional CSS styles
806
854
  */
@@ -895,11 +943,15 @@ interface FlutterCupertinoInputProps {
895
943
  /**
896
944
  * input event handler
897
945
  */
898
- onInput?: (event: CustomEvent) => void;
946
+ onInput?: (event: CustomEvent<string>) => void;
899
947
  /**
900
948
  * submit event handler
901
949
  */
902
- onSubmit?: (event: CustomEvent) => void;
950
+ onSubmit?: (event: CustomEvent<string>) => void;
951
+ /**
952
+ * HTML id attribute
953
+ */
954
+ id?: string;
903
955
  /**
904
956
  * Additional CSS styles
905
957
  */
@@ -964,6 +1016,10 @@ interface FlutterCupertinoIconProps {
964
1016
  * @default undefined
965
1017
  */
966
1018
  label?: string;
1019
+ /**
1020
+ * HTML id attribute
1021
+ */
1022
+ id?: string;
967
1023
  /**
968
1024
  * Additional CSS styles
969
1025
  */
@@ -1057,7 +1113,11 @@ interface FlutterCupertinoDatePickerProps {
1057
1113
  /**
1058
1114
  * change event handler
1059
1115
  */
1060
- onChange?: (event: CustomEvent) => void;
1116
+ onChange?: (event: CustomEvent<string>) => void;
1117
+ /**
1118
+ * HTML id attribute
1119
+ */
1120
+ id?: string;
1061
1121
  /**
1062
1122
  * Additional CSS styles
1063
1123
  */
@@ -1105,6 +1165,10 @@ interface FlutterCupertinoContextMenuProps {
1105
1165
  * @default undefined
1106
1166
  */
1107
1167
  enableHapticFeedback?: boolean;
1168
+ /**
1169
+ * HTML id attribute
1170
+ */
1171
+ id?: string;
1108
1172
  /**
1109
1173
  * Additional CSS styles
1110
1174
  */
@@ -1194,7 +1258,11 @@ interface FlutterCupertinoCheckboxProps {
1194
1258
  /**
1195
1259
  * change event handler
1196
1260
  */
1197
- onChange?: (event: CustomEvent) => void;
1261
+ onChange?: (event: CustomEvent<boolean>) => void;
1262
+ /**
1263
+ * HTML id attribute
1264
+ */
1265
+ id?: string;
1198
1266
  /**
1199
1267
  * Additional CSS styles
1200
1268
  */
@@ -1254,6 +1322,10 @@ interface FlutterCupertinoButtonProps {
1254
1322
  * click event handler
1255
1323
  */
1256
1324
  onClick?: (event: Event) => void;
1325
+ /**
1326
+ * HTML id attribute
1327
+ */
1328
+ id?: string;
1257
1329
  /**
1258
1330
  * Additional CSS styles
1259
1331
  */
@@ -1288,72 +1360,4 @@ declare const FlutterCupertinoButton: React.ForwardRefExoticComponent<FlutterCup
1288
1360
  children?: React.ReactNode;
1289
1361
  } & React.RefAttributes<FlutterCupertinoButtonElement>>;
1290
1362
 
1291
- /**
1292
- * @license
1293
- * Copyright 2018 Google LLC
1294
- * SPDX-License-Identifier: BSD-3-Clause
1295
- */
1296
-
1297
- type DistributiveOmit<T, K extends string | number | symbol> = T extends any ? (K extends keyof T ? Omit<T, K> : T) : T;
1298
- type PropsWithoutRef<T> = DistributiveOmit<T, 'ref'>;
1299
- /**
1300
- * Type of the React component wrapping the web component. This is the return
1301
- * type of `createComponent`.
1302
- */
1303
- type ReactWebComponent<I extends HTMLElement, E extends EventNames = {}> = React.ForwardRefExoticComponent<PropsWithoutRef<ComponentProps<I, E>> & React.RefAttributes<I>>;
1304
- type ElementProps<I> = Partial<Omit<I, keyof HTMLElement>>;
1305
- type ComponentProps<I, E extends EventNames = {}> = Omit<React.HTMLAttributes<I>, keyof E | keyof ElementProps<I>> & ElementProps<I>;
1306
- /**
1307
- * Type used to cast an event name with an event type when providing the
1308
- * `events` option to `createComponent` for better typing of the event handler
1309
- * prop.
1310
- *
1311
- * Example:
1312
- *
1313
- * ```ts
1314
- * const FooComponent = createComponent({
1315
- * ...
1316
- * events: {
1317
- * onfoo: 'foo' as EventName<FooEvent>,
1318
- * }
1319
- * });
1320
- * ```
1321
- *
1322
- * `onfoo` prop will have the type `(e: FooEvent) => void`.
1323
- */
1324
- type EventName<T extends Event = Event> = string & {
1325
- __eventType: T;
1326
- };
1327
- type EventNames = Record<string, EventName | string>;
1328
- interface Options<E extends EventNames = {}> {
1329
- tagName: string;
1330
- events?: E;
1331
- displayName?: string;
1332
- }
1333
- /**
1334
- * Creates a React component for a custom element. Properties are distinguished
1335
- * from attributes automatically, and events can be configured so they are added
1336
- * to the custom element as event listeners.
1337
- *
1338
- * @param options An options bag containing the parameters needed to generate a
1339
- * wrapped web component.
1340
- *
1341
- * @param options.react The React module, typically imported from the `react`
1342
- * npm package.
1343
- * @param options.tagName The custom element tag name registered via
1344
- * `customElements.define`.
1345
- * @param options.elementClass The custom element class registered via
1346
- * `customElements.define`.
1347
- * @param options.events An object listing events to which the component can
1348
- * listen. The object keys are the event property names passed in via React
1349
- * props and the object values are the names of the corresponding events
1350
- * generated by the custom element. For example, given `{onactivate:
1351
- * 'activate'}` an event function may be passed via the component's `onactivate`
1352
- * prop and will be called when the custom element fires its `activate` event.
1353
- * @param options.displayName A React component display name, used in debugging
1354
- * messages. Default value is inferred from the name of custom element class
1355
- * registered via `customElements.define`.
1356
- */
1357
- declare const createComponent: <E extends any, I extends any>({ tagName, events, displayName }: Options) => ReactWebComponent<E, I>;
1358
-
1359
- export { FlutterCupertinoButton, type FlutterCupertinoButtonElement, FlutterCupertinoCheckbox, type FlutterCupertinoCheckboxElement, FlutterCupertinoContextMenu, type FlutterCupertinoContextMenuElement, FlutterCupertinoDatePicker, type FlutterCupertinoDatePickerElement, FlutterCupertinoIcon, type FlutterCupertinoIconElement, FlutterCupertinoInput, type FlutterCupertinoInputElement, FlutterCupertinoModalPopup, type FlutterCupertinoModalPopupElement, FlutterCupertinoPicker, type FlutterCupertinoPickerElement, FlutterCupertinoRadio, type FlutterCupertinoRadioElement, FlutterCupertinoSearchInput, type FlutterCupertinoSearchInputElement, FlutterCupertinoSlider, type FlutterCupertinoSliderElement, FlutterCupertinoSwitch, type FlutterCupertinoSwitchElement, FlutterCupertinoTab, FlutterCupertinoTabBar, type FlutterCupertinoTabBarElement, FlutterCupertinoTabBarItem, type FlutterCupertinoTabBarItemElement, type FlutterCupertinoTabElement, FlutterCupertinoTabItem, type FlutterCupertinoTabItemElement, FlutterCupertinoTextarea, type FlutterCupertinoTextareaElement, FlutterCupertinoTimerPicker, type FlutterCupertinoTimerPickerElement, createComponent };
1363
+ export { FlutterCupertinoButton, type FlutterCupertinoButtonElement, FlutterCupertinoCheckbox, type FlutterCupertinoCheckboxElement, FlutterCupertinoContextMenu, type FlutterCupertinoContextMenuElement, FlutterCupertinoDatePicker, type FlutterCupertinoDatePickerElement, FlutterCupertinoIcon, type FlutterCupertinoIconElement, FlutterCupertinoInput, type FlutterCupertinoInputElement, FlutterCupertinoModalPopup, type FlutterCupertinoModalPopupElement, FlutterCupertinoPicker, type FlutterCupertinoPickerElement, FlutterCupertinoRadio, type FlutterCupertinoRadioElement, FlutterCupertinoSearchInput, type FlutterCupertinoSearchInputElement, FlutterCupertinoSlider, type FlutterCupertinoSliderElement, FlutterCupertinoSwitch, type FlutterCupertinoSwitchElement, FlutterCupertinoTab, FlutterCupertinoTabBar, type FlutterCupertinoTabBarElement, FlutterCupertinoTabBarItem, type FlutterCupertinoTabBarItemElement, type FlutterCupertinoTabElement, FlutterCupertinoTabItem, type FlutterCupertinoTabItemElement, FlutterCupertinoTextarea, type FlutterCupertinoTextareaElement, FlutterCupertinoTimerPicker, type FlutterCupertinoTimerPickerElement };