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