@openwebf/react-cupertino-ui 0.2.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/index.d.mts +1245 -0
- package/dist/index.d.ts +1245 -0
- package/dist/index.js +782 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +737 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +31 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,737 @@
|
|
|
1
|
+
// src/lib/src/timer-picker.tsx
|
|
2
|
+
import { createWebFComponent } from "@openwebf/react-core-ui";
|
|
3
|
+
var FlutterCupertinoTimerPicker = createWebFComponent({
|
|
4
|
+
tagName: "flutter-cupertino-timer-picker",
|
|
5
|
+
displayName: "FlutterCupertinoTimerPicker",
|
|
6
|
+
// Map props to attributes
|
|
7
|
+
attributeProps: [
|
|
8
|
+
"mode",
|
|
9
|
+
"initialTimerDuration",
|
|
10
|
+
"minuteInterval",
|
|
11
|
+
"secondInterval",
|
|
12
|
+
"backgroundColor",
|
|
13
|
+
"height"
|
|
14
|
+
],
|
|
15
|
+
// Convert prop names to attribute names if needed
|
|
16
|
+
attributeMap: {
|
|
17
|
+
initialTimerDuration: "initial-timer-duration",
|
|
18
|
+
minuteInterval: "minute-interval",
|
|
19
|
+
secondInterval: "second-interval",
|
|
20
|
+
backgroundColor: "background-color"
|
|
21
|
+
},
|
|
22
|
+
// Event handlers
|
|
23
|
+
events: [
|
|
24
|
+
{
|
|
25
|
+
propName: "onChange",
|
|
26
|
+
eventName: "change",
|
|
27
|
+
handler: (callback) => (event) => {
|
|
28
|
+
callback(event);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
// Default prop values
|
|
33
|
+
defaultProps: {
|
|
34
|
+
// Add default values here
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// src/lib/src/textarea.tsx
|
|
39
|
+
import { createWebFComponent as createWebFComponent2 } from "@openwebf/react-core-ui";
|
|
40
|
+
var FlutterCupertinoTextarea = createWebFComponent2({
|
|
41
|
+
tagName: "flutter-cupertino-textarea",
|
|
42
|
+
displayName: "FlutterCupertinoTextarea",
|
|
43
|
+
// Map props to attributes
|
|
44
|
+
attributeProps: [
|
|
45
|
+
"val",
|
|
46
|
+
"placeholder",
|
|
47
|
+
"disabled",
|
|
48
|
+
"readonly",
|
|
49
|
+
"maxLength",
|
|
50
|
+
"rows",
|
|
51
|
+
"showCount",
|
|
52
|
+
"autoSize",
|
|
53
|
+
"transparent"
|
|
54
|
+
],
|
|
55
|
+
// Convert prop names to attribute names if needed
|
|
56
|
+
attributeMap: {
|
|
57
|
+
maxLength: "max-length",
|
|
58
|
+
showCount: "show-count",
|
|
59
|
+
autoSize: "auto-size"
|
|
60
|
+
},
|
|
61
|
+
// Event handlers
|
|
62
|
+
events: [
|
|
63
|
+
{
|
|
64
|
+
propName: "onInput",
|
|
65
|
+
eventName: "input",
|
|
66
|
+
handler: (callback) => (event) => {
|
|
67
|
+
callback(event);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
propName: "onComplete",
|
|
72
|
+
eventName: "complete",
|
|
73
|
+
handler: (callback) => (event) => {
|
|
74
|
+
callback(event);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
// Default prop values
|
|
79
|
+
defaultProps: {
|
|
80
|
+
// Add default values here
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// src/lib/src/tab_bar.tsx
|
|
85
|
+
import { createWebFComponent as createWebFComponent3 } from "@openwebf/react-core-ui";
|
|
86
|
+
var FlutterCupertinoTabBar = createWebFComponent3({
|
|
87
|
+
tagName: "flutter-cupertino-tab-bar",
|
|
88
|
+
displayName: "FlutterCupertinoTabBar",
|
|
89
|
+
// Map props to attributes
|
|
90
|
+
attributeProps: [
|
|
91
|
+
"currentIndex",
|
|
92
|
+
"backgroundColor",
|
|
93
|
+
"activeColor",
|
|
94
|
+
"inactiveColor",
|
|
95
|
+
"iconSize",
|
|
96
|
+
"height"
|
|
97
|
+
],
|
|
98
|
+
// Convert prop names to attribute names if needed
|
|
99
|
+
attributeMap: {
|
|
100
|
+
currentIndex: "current-index",
|
|
101
|
+
backgroundColor: "background-color",
|
|
102
|
+
activeColor: "active-color",
|
|
103
|
+
inactiveColor: "inactive-color",
|
|
104
|
+
iconSize: "icon-size"
|
|
105
|
+
},
|
|
106
|
+
// Event handlers
|
|
107
|
+
events: [
|
|
108
|
+
{
|
|
109
|
+
propName: "onTabchange",
|
|
110
|
+
eventName: "tabchange",
|
|
111
|
+
handler: (callback) => (event) => {
|
|
112
|
+
callback(event);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
// Default prop values
|
|
117
|
+
defaultProps: {
|
|
118
|
+
// Add default values here
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
var FlutterCupertinoTabBarItem = createWebFComponent3({
|
|
122
|
+
tagName: "flutter-cupertino-tab-bar-item",
|
|
123
|
+
displayName: "FlutterCupertinoTabBarItem",
|
|
124
|
+
// Map props to attributes
|
|
125
|
+
attributeProps: [
|
|
126
|
+
"title",
|
|
127
|
+
"icon",
|
|
128
|
+
"path"
|
|
129
|
+
],
|
|
130
|
+
// Convert prop names to attribute names if needed
|
|
131
|
+
attributeMap: {},
|
|
132
|
+
// Default prop values
|
|
133
|
+
defaultProps: {
|
|
134
|
+
// Add default values here
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
// src/lib/src/tab.tsx
|
|
139
|
+
import { createWebFComponent as createWebFComponent4 } from "@openwebf/react-core-ui";
|
|
140
|
+
var FlutterCupertinoTab = createWebFComponent4({
|
|
141
|
+
tagName: "flutter-cupertino-tab",
|
|
142
|
+
displayName: "FlutterCupertinoTab",
|
|
143
|
+
// Map props to attributes
|
|
144
|
+
attributeProps: [],
|
|
145
|
+
// Convert prop names to attribute names if needed
|
|
146
|
+
attributeMap: {},
|
|
147
|
+
// Event handlers
|
|
148
|
+
events: [
|
|
149
|
+
{
|
|
150
|
+
propName: "onChange",
|
|
151
|
+
eventName: "change",
|
|
152
|
+
handler: (callback) => (event) => {
|
|
153
|
+
callback(event);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
// Default prop values
|
|
158
|
+
defaultProps: {
|
|
159
|
+
// Add default values here
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
var FlutterCupertinoTabItem = createWebFComponent4({
|
|
163
|
+
tagName: "flutter-cupertino-tab-item",
|
|
164
|
+
displayName: "FlutterCupertinoTabItem",
|
|
165
|
+
// Map props to attributes
|
|
166
|
+
attributeProps: [
|
|
167
|
+
"title"
|
|
168
|
+
],
|
|
169
|
+
// Convert prop names to attribute names if needed
|
|
170
|
+
attributeMap: {},
|
|
171
|
+
// Default prop values
|
|
172
|
+
defaultProps: {
|
|
173
|
+
// Add default values here
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
// src/lib/src/switch.tsx
|
|
178
|
+
import { createWebFComponent as createWebFComponent5 } from "@openwebf/react-core-ui";
|
|
179
|
+
var FlutterCupertinoSwitch = createWebFComponent5({
|
|
180
|
+
tagName: "flutter-cupertino-switch",
|
|
181
|
+
displayName: "FlutterCupertinoSwitch",
|
|
182
|
+
// Map props to attributes
|
|
183
|
+
attributeProps: [
|
|
184
|
+
"checked",
|
|
185
|
+
"disabled",
|
|
186
|
+
"activeColor",
|
|
187
|
+
"inactiveColor"
|
|
188
|
+
],
|
|
189
|
+
// Convert prop names to attribute names if needed
|
|
190
|
+
attributeMap: {
|
|
191
|
+
activeColor: "active-color",
|
|
192
|
+
inactiveColor: "inactive-color"
|
|
193
|
+
},
|
|
194
|
+
// Event handlers
|
|
195
|
+
events: [
|
|
196
|
+
{
|
|
197
|
+
propName: "onChange",
|
|
198
|
+
eventName: "change",
|
|
199
|
+
handler: (callback) => (event) => {
|
|
200
|
+
callback(event);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
// Default prop values
|
|
205
|
+
defaultProps: {
|
|
206
|
+
// Add default values here
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
// src/lib/src/slider.tsx
|
|
211
|
+
import { createWebFComponent as createWebFComponent6 } from "@openwebf/react-core-ui";
|
|
212
|
+
var FlutterCupertinoSlider = createWebFComponent6({
|
|
213
|
+
tagName: "flutter-cupertino-slider",
|
|
214
|
+
displayName: "FlutterCupertinoSlider",
|
|
215
|
+
// Map props to attributes
|
|
216
|
+
attributeProps: [
|
|
217
|
+
"val",
|
|
218
|
+
"min",
|
|
219
|
+
"max",
|
|
220
|
+
"step",
|
|
221
|
+
"disabled"
|
|
222
|
+
],
|
|
223
|
+
// Convert prop names to attribute names if needed
|
|
224
|
+
attributeMap: {},
|
|
225
|
+
// Event handlers
|
|
226
|
+
events: [
|
|
227
|
+
{
|
|
228
|
+
propName: "onChange",
|
|
229
|
+
eventName: "change",
|
|
230
|
+
handler: (callback) => (event) => {
|
|
231
|
+
callback(event);
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
propName: "onChangestart",
|
|
236
|
+
eventName: "changestart",
|
|
237
|
+
handler: (callback) => (event) => {
|
|
238
|
+
callback(event);
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
propName: "onChangeend",
|
|
243
|
+
eventName: "changeend",
|
|
244
|
+
handler: (callback) => (event) => {
|
|
245
|
+
callback(event);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
// Default prop values
|
|
250
|
+
defaultProps: {
|
|
251
|
+
// Add default values here
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
// src/lib/src/search-input.tsx
|
|
256
|
+
import { createWebFComponent as createWebFComponent7 } from "@openwebf/react-core-ui";
|
|
257
|
+
var FlutterCupertinoSearchInput = createWebFComponent7({
|
|
258
|
+
tagName: "flutter-cupertino-search-input",
|
|
259
|
+
displayName: "FlutterCupertinoSearchInput",
|
|
260
|
+
// Map props to attributes
|
|
261
|
+
attributeProps: [
|
|
262
|
+
"val",
|
|
263
|
+
"placeholder",
|
|
264
|
+
"disabled",
|
|
265
|
+
"type",
|
|
266
|
+
"prefixIcon",
|
|
267
|
+
"suffixIcon",
|
|
268
|
+
"suffixModel",
|
|
269
|
+
"itemColor",
|
|
270
|
+
"itemSize",
|
|
271
|
+
"autofocus"
|
|
272
|
+
],
|
|
273
|
+
// Convert prop names to attribute names if needed
|
|
274
|
+
attributeMap: {
|
|
275
|
+
prefixIcon: "prefix-icon",
|
|
276
|
+
suffixIcon: "suffix-icon",
|
|
277
|
+
suffixModel: "suffix-model",
|
|
278
|
+
itemColor: "item-color",
|
|
279
|
+
itemSize: "item-size"
|
|
280
|
+
},
|
|
281
|
+
// Event handlers
|
|
282
|
+
events: [
|
|
283
|
+
{
|
|
284
|
+
propName: "onInput",
|
|
285
|
+
eventName: "input",
|
|
286
|
+
handler: (callback) => (event) => {
|
|
287
|
+
callback(event);
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
propName: "onSearch",
|
|
292
|
+
eventName: "search",
|
|
293
|
+
handler: (callback) => (event) => {
|
|
294
|
+
callback(event);
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
propName: "onClear",
|
|
299
|
+
eventName: "clear",
|
|
300
|
+
handler: (callback) => (event) => {
|
|
301
|
+
callback(event);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
// Default prop values
|
|
306
|
+
defaultProps: {
|
|
307
|
+
// Add default values here
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
// src/lib/src/radio.tsx
|
|
312
|
+
import { createWebFComponent as createWebFComponent8 } from "@openwebf/react-core-ui";
|
|
313
|
+
var FlutterCupertinoRadio = createWebFComponent8({
|
|
314
|
+
tagName: "flutter-cupertino-radio",
|
|
315
|
+
displayName: "FlutterCupertinoRadio",
|
|
316
|
+
// Map props to attributes
|
|
317
|
+
attributeProps: [
|
|
318
|
+
"val",
|
|
319
|
+
"groupValue",
|
|
320
|
+
"useCheckmarkStyle",
|
|
321
|
+
"disabled",
|
|
322
|
+
"activeColor",
|
|
323
|
+
"focusColor"
|
|
324
|
+
],
|
|
325
|
+
// Convert prop names to attribute names if needed
|
|
326
|
+
attributeMap: {
|
|
327
|
+
groupValue: "group-value",
|
|
328
|
+
useCheckmarkStyle: "use-checkmark-style",
|
|
329
|
+
activeColor: "active-color",
|
|
330
|
+
focusColor: "focus-color"
|
|
331
|
+
},
|
|
332
|
+
// Event handlers
|
|
333
|
+
events: [
|
|
334
|
+
{
|
|
335
|
+
propName: "onChange",
|
|
336
|
+
eventName: "change",
|
|
337
|
+
handler: (callback) => (event) => {
|
|
338
|
+
callback(event);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
// Default prop values
|
|
343
|
+
defaultProps: {
|
|
344
|
+
// Add default values here
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
// src/lib/src/picker.tsx
|
|
349
|
+
import { createWebFComponent as createWebFComponent9 } from "@openwebf/react-core-ui";
|
|
350
|
+
var FlutterCupertinoPicker = createWebFComponent9({
|
|
351
|
+
tagName: "flutter-cupertino-picker",
|
|
352
|
+
displayName: "FlutterCupertinoPicker",
|
|
353
|
+
// Map props to attributes
|
|
354
|
+
attributeProps: [
|
|
355
|
+
"height",
|
|
356
|
+
"itemHeight"
|
|
357
|
+
],
|
|
358
|
+
// Convert prop names to attribute names if needed
|
|
359
|
+
attributeMap: {
|
|
360
|
+
itemHeight: "item-height"
|
|
361
|
+
},
|
|
362
|
+
// Event handlers
|
|
363
|
+
events: [
|
|
364
|
+
{
|
|
365
|
+
propName: "onChange",
|
|
366
|
+
eventName: "change",
|
|
367
|
+
handler: (callback) => (event) => {
|
|
368
|
+
callback(event);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
// Default prop values
|
|
373
|
+
defaultProps: {
|
|
374
|
+
// Add default values here
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
// src/lib/src/modal-popup.tsx
|
|
379
|
+
import { createWebFComponent as createWebFComponent10 } from "@openwebf/react-core-ui";
|
|
380
|
+
var FlutterCupertinoModalPopup = createWebFComponent10({
|
|
381
|
+
tagName: "flutter-cupertino-modal-popup",
|
|
382
|
+
displayName: "FlutterCupertinoModalPopup",
|
|
383
|
+
// Map props to attributes
|
|
384
|
+
attributeProps: [
|
|
385
|
+
"visible",
|
|
386
|
+
"height",
|
|
387
|
+
"surfacePainted",
|
|
388
|
+
"maskClosable",
|
|
389
|
+
"backgroundOpacity"
|
|
390
|
+
],
|
|
391
|
+
// Convert prop names to attribute names if needed
|
|
392
|
+
attributeMap: {
|
|
393
|
+
surfacePainted: "surface-painted",
|
|
394
|
+
maskClosable: "mask-closable",
|
|
395
|
+
backgroundOpacity: "background-opacity"
|
|
396
|
+
},
|
|
397
|
+
// Event handlers
|
|
398
|
+
events: [
|
|
399
|
+
{
|
|
400
|
+
propName: "onClose",
|
|
401
|
+
eventName: "close",
|
|
402
|
+
handler: (callback) => (event) => {
|
|
403
|
+
callback(event);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
// Default prop values
|
|
408
|
+
defaultProps: {
|
|
409
|
+
// Add default values here
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
// src/lib/src/input.tsx
|
|
414
|
+
import { createWebFComponent as createWebFComponent11 } from "@openwebf/react-core-ui";
|
|
415
|
+
var FlutterCupertinoInput = createWebFComponent11({
|
|
416
|
+
tagName: "flutter-cupertino-input",
|
|
417
|
+
displayName: "FlutterCupertinoInput",
|
|
418
|
+
// Map props to attributes
|
|
419
|
+
attributeProps: [
|
|
420
|
+
"val",
|
|
421
|
+
"placeholder",
|
|
422
|
+
"type",
|
|
423
|
+
"disabled",
|
|
424
|
+
"autofocus",
|
|
425
|
+
"clearable",
|
|
426
|
+
"maxlength",
|
|
427
|
+
"readonly"
|
|
428
|
+
],
|
|
429
|
+
// Convert prop names to attribute names if needed
|
|
430
|
+
attributeMap: {},
|
|
431
|
+
// Event handlers
|
|
432
|
+
events: [
|
|
433
|
+
{
|
|
434
|
+
propName: "onInput",
|
|
435
|
+
eventName: "input",
|
|
436
|
+
handler: (callback) => (event) => {
|
|
437
|
+
callback(event);
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
propName: "onSubmit",
|
|
442
|
+
eventName: "submit",
|
|
443
|
+
handler: (callback) => (event) => {
|
|
444
|
+
callback(event);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
],
|
|
448
|
+
// Default prop values
|
|
449
|
+
defaultProps: {
|
|
450
|
+
// Add default values here
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
// src/lib/src/icon.tsx
|
|
455
|
+
import { createWebFComponent as createWebFComponent12 } from "@openwebf/react-core-ui";
|
|
456
|
+
var FlutterCupertinoIcon = createWebFComponent12({
|
|
457
|
+
tagName: "flutter-cupertino-icon",
|
|
458
|
+
displayName: "FlutterCupertinoIcon",
|
|
459
|
+
// Map props to attributes
|
|
460
|
+
attributeProps: [
|
|
461
|
+
"type",
|
|
462
|
+
"label"
|
|
463
|
+
],
|
|
464
|
+
// Convert prop names to attribute names if needed
|
|
465
|
+
attributeMap: {},
|
|
466
|
+
// Default prop values
|
|
467
|
+
defaultProps: {
|
|
468
|
+
// Add default values here
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
// src/lib/src/date-picker.tsx
|
|
473
|
+
import { createWebFComponent as createWebFComponent13 } from "@openwebf/react-core-ui";
|
|
474
|
+
var FlutterCupertinoDatePicker = createWebFComponent13({
|
|
475
|
+
tagName: "flutter-cupertino-date-picker",
|
|
476
|
+
displayName: "FlutterCupertinoDatePicker",
|
|
477
|
+
// Map props to attributes
|
|
478
|
+
attributeProps: [
|
|
479
|
+
"mode",
|
|
480
|
+
"minimumDate",
|
|
481
|
+
"maximumDate",
|
|
482
|
+
"minuteInterval",
|
|
483
|
+
"value",
|
|
484
|
+
"minimumYear",
|
|
485
|
+
"maximumYear",
|
|
486
|
+
"showDayOfWeek",
|
|
487
|
+
"dateOrder",
|
|
488
|
+
"height",
|
|
489
|
+
"use24H"
|
|
490
|
+
],
|
|
491
|
+
// Convert prop names to attribute names if needed
|
|
492
|
+
attributeMap: {
|
|
493
|
+
minimumDate: "minimum-date",
|
|
494
|
+
maximumDate: "maximum-date",
|
|
495
|
+
minuteInterval: "minute-interval",
|
|
496
|
+
minimumYear: "minimum-year",
|
|
497
|
+
maximumYear: "maximum-year",
|
|
498
|
+
showDayOfWeek: "show-day-of-week",
|
|
499
|
+
dateOrder: "date-order",
|
|
500
|
+
use24H: "use-24-h"
|
|
501
|
+
},
|
|
502
|
+
// Event handlers
|
|
503
|
+
events: [
|
|
504
|
+
{
|
|
505
|
+
propName: "onChange",
|
|
506
|
+
eventName: "change",
|
|
507
|
+
handler: (callback) => (event) => {
|
|
508
|
+
callback(event);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
// Default prop values
|
|
513
|
+
defaultProps: {
|
|
514
|
+
// Add default values here
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
|
|
518
|
+
// src/lib/src/context-menu.tsx
|
|
519
|
+
import { createWebFComponent as createWebFComponent14 } from "@openwebf/react-core-ui";
|
|
520
|
+
var FlutterCupertinoContextMenu = createWebFComponent14({
|
|
521
|
+
tagName: "flutter-cupertino-context-menu",
|
|
522
|
+
displayName: "FlutterCupertinoContextMenu",
|
|
523
|
+
// Map props to attributes
|
|
524
|
+
attributeProps: [
|
|
525
|
+
"enableHapticFeedback"
|
|
526
|
+
],
|
|
527
|
+
// Convert prop names to attribute names if needed
|
|
528
|
+
attributeMap: {
|
|
529
|
+
enableHapticFeedback: "enable-haptic-feedback"
|
|
530
|
+
},
|
|
531
|
+
// Event handlers
|
|
532
|
+
events: [],
|
|
533
|
+
// Default prop values
|
|
534
|
+
defaultProps: {
|
|
535
|
+
// Add default values here
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
// src/lib/src/checkbox.tsx
|
|
540
|
+
import { createWebFComponent as createWebFComponent15 } from "@openwebf/react-core-ui";
|
|
541
|
+
var FlutterCupertinoCheckbox = createWebFComponent15({
|
|
542
|
+
tagName: "flutter-cupertino-checkbox",
|
|
543
|
+
displayName: "FlutterCupertinoCheckbox",
|
|
544
|
+
// Map props to attributes
|
|
545
|
+
attributeProps: [
|
|
546
|
+
"val",
|
|
547
|
+
"disabled",
|
|
548
|
+
"activeColor",
|
|
549
|
+
"checkColor",
|
|
550
|
+
"focusColor",
|
|
551
|
+
"fillColorSelected",
|
|
552
|
+
"fillColorDisabled"
|
|
553
|
+
],
|
|
554
|
+
// Convert prop names to attribute names if needed
|
|
555
|
+
attributeMap: {
|
|
556
|
+
activeColor: "active-color",
|
|
557
|
+
checkColor: "check-color",
|
|
558
|
+
focusColor: "focus-color",
|
|
559
|
+
fillColorSelected: "fill-color-selected",
|
|
560
|
+
fillColorDisabled: "fill-color-disabled"
|
|
561
|
+
},
|
|
562
|
+
// Event handlers
|
|
563
|
+
events: [
|
|
564
|
+
{
|
|
565
|
+
propName: "onChange",
|
|
566
|
+
eventName: "change",
|
|
567
|
+
handler: (callback) => (event) => {
|
|
568
|
+
callback(event);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
// Default prop values
|
|
573
|
+
defaultProps: {
|
|
574
|
+
// Add default values here
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
|
|
578
|
+
// src/lib/src/button.tsx
|
|
579
|
+
import { createWebFComponent as createWebFComponent16 } from "@openwebf/react-core-ui";
|
|
580
|
+
var FlutterCupertinoButton = createWebFComponent16({
|
|
581
|
+
tagName: "flutter-cupertino-button",
|
|
582
|
+
displayName: "FlutterCupertinoButton",
|
|
583
|
+
// Map props to attributes
|
|
584
|
+
attributeProps: [
|
|
585
|
+
"variant",
|
|
586
|
+
"size",
|
|
587
|
+
"disabled",
|
|
588
|
+
"pressedOpacity"
|
|
589
|
+
],
|
|
590
|
+
// Convert prop names to attribute names if needed
|
|
591
|
+
attributeMap: {
|
|
592
|
+
pressedOpacity: "pressed-opacity"
|
|
593
|
+
},
|
|
594
|
+
// Event handlers
|
|
595
|
+
events: [
|
|
596
|
+
{
|
|
597
|
+
propName: "onClick",
|
|
598
|
+
eventName: "click",
|
|
599
|
+
handler: (callback) => (event) => {
|
|
600
|
+
callback(event);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
],
|
|
604
|
+
// Default prop values
|
|
605
|
+
defaultProps: {
|
|
606
|
+
// Add default values here
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
// src/utils/createComponent.ts
|
|
611
|
+
import { forwardRef, useLayoutEffect, createElement, useCallback, useRef } from "react";
|
|
612
|
+
var NODE_MODE = false;
|
|
613
|
+
var reservedReactProperties = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]);
|
|
614
|
+
var listenedEvents = /* @__PURE__ */ new WeakMap();
|
|
615
|
+
var addOrUpdateEventListener = (node, event, listener) => {
|
|
616
|
+
let events = listenedEvents.get(node);
|
|
617
|
+
if (events === void 0) {
|
|
618
|
+
listenedEvents.set(node, events = /* @__PURE__ */ new Map());
|
|
619
|
+
}
|
|
620
|
+
let handler = events.get(event);
|
|
621
|
+
if (listener !== void 0) {
|
|
622
|
+
if (handler === void 0) {
|
|
623
|
+
events.set(event, handler = { handleEvent: listener });
|
|
624
|
+
node.addEventListener(event, handler);
|
|
625
|
+
} else {
|
|
626
|
+
handler.handleEvent = listener;
|
|
627
|
+
}
|
|
628
|
+
} else if (handler !== void 0) {
|
|
629
|
+
events.delete(event);
|
|
630
|
+
node.removeEventListener(event, handler);
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
var setProperty = (node, name, value, old, events) => {
|
|
634
|
+
const event = events?.[name];
|
|
635
|
+
if (event !== void 0) {
|
|
636
|
+
if (value !== old) {
|
|
637
|
+
addOrUpdateEventListener(node, event, value);
|
|
638
|
+
}
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
node[name] = value;
|
|
642
|
+
if ((value === void 0 || value === null) && name in HTMLElement.prototype) {
|
|
643
|
+
node.removeAttribute(name);
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
var createComponent = ({
|
|
647
|
+
tagName,
|
|
648
|
+
events,
|
|
649
|
+
displayName
|
|
650
|
+
}) => {
|
|
651
|
+
const eventProps = new Set(Object.keys(events ?? {}));
|
|
652
|
+
const ReactComponent = forwardRef((props, ref) => {
|
|
653
|
+
const prevElemPropsRef = useRef(/* @__PURE__ */ new Map());
|
|
654
|
+
const elementRef = useRef(null);
|
|
655
|
+
const reactProps = {};
|
|
656
|
+
const elementProps = {};
|
|
657
|
+
for (const [k, v] of Object.entries(props)) {
|
|
658
|
+
if (reservedReactProperties.has(k)) {
|
|
659
|
+
reactProps[k === "className" ? "class" : k] = v;
|
|
660
|
+
continue;
|
|
661
|
+
}
|
|
662
|
+
if (eventProps.has(k)) {
|
|
663
|
+
elementProps[k] = v;
|
|
664
|
+
continue;
|
|
665
|
+
}
|
|
666
|
+
reactProps[k] = v;
|
|
667
|
+
}
|
|
668
|
+
useLayoutEffect(() => {
|
|
669
|
+
if (elementRef.current === null) {
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
const newElemProps = /* @__PURE__ */ new Map();
|
|
673
|
+
for (const key in elementProps) {
|
|
674
|
+
setProperty(elementRef.current, key, props[key], prevElemPropsRef.current.get(key), events);
|
|
675
|
+
prevElemPropsRef.current.delete(key);
|
|
676
|
+
newElemProps.set(key, props[key]);
|
|
677
|
+
}
|
|
678
|
+
for (const [key, value] of prevElemPropsRef.current) {
|
|
679
|
+
setProperty(elementRef.current, key, void 0, value, events);
|
|
680
|
+
}
|
|
681
|
+
prevElemPropsRef.current = newElemProps;
|
|
682
|
+
});
|
|
683
|
+
useLayoutEffect(() => {
|
|
684
|
+
elementRef.current?.removeAttribute("defer-hydration");
|
|
685
|
+
}, []);
|
|
686
|
+
if (NODE_MODE) {
|
|
687
|
+
if ((createElement.name === "litPatchedCreateElement" || globalThis.litSsrReactEnabled) && Object.keys(elementProps).length) {
|
|
688
|
+
reactProps["_$litProps$"] = elementProps;
|
|
689
|
+
}
|
|
690
|
+
} else {
|
|
691
|
+
reactProps["suppressHydrationWarning"] = true;
|
|
692
|
+
}
|
|
693
|
+
return createElement(tagName, {
|
|
694
|
+
...reactProps,
|
|
695
|
+
ref: useCallback(
|
|
696
|
+
(node) => {
|
|
697
|
+
elementRef.current = node;
|
|
698
|
+
if (typeof ref === "function") {
|
|
699
|
+
ref(node);
|
|
700
|
+
} else if (ref !== null) {
|
|
701
|
+
ref.current = node;
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
[ref]
|
|
705
|
+
)
|
|
706
|
+
});
|
|
707
|
+
});
|
|
708
|
+
ReactComponent.displayName = displayName;
|
|
709
|
+
return ReactComponent;
|
|
710
|
+
};
|
|
711
|
+
export {
|
|
712
|
+
FlutterCupertinoButton,
|
|
713
|
+
FlutterCupertinoCheckbox,
|
|
714
|
+
FlutterCupertinoContextMenu,
|
|
715
|
+
FlutterCupertinoDatePicker,
|
|
716
|
+
FlutterCupertinoIcon,
|
|
717
|
+
FlutterCupertinoInput,
|
|
718
|
+
FlutterCupertinoModalPopup,
|
|
719
|
+
FlutterCupertinoPicker,
|
|
720
|
+
FlutterCupertinoRadio,
|
|
721
|
+
FlutterCupertinoSearchInput,
|
|
722
|
+
FlutterCupertinoSlider,
|
|
723
|
+
FlutterCupertinoSwitch,
|
|
724
|
+
FlutterCupertinoTab,
|
|
725
|
+
FlutterCupertinoTabBar,
|
|
726
|
+
FlutterCupertinoTabBarItem,
|
|
727
|
+
FlutterCupertinoTabItem,
|
|
728
|
+
FlutterCupertinoTextarea,
|
|
729
|
+
FlutterCupertinoTimerPicker,
|
|
730
|
+
createComponent
|
|
731
|
+
};
|
|
732
|
+
/**
|
|
733
|
+
* @license
|
|
734
|
+
* Copyright 2018 Google LLC
|
|
735
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
736
|
+
*/
|
|
737
|
+
//# sourceMappingURL=index.mjs.map
|