@tamagui/core 1.0.1-beta.36 → 1.0.1-beta.39

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.
@@ -140,7 +140,7 @@ function createComponent(configIn, ParentComponent) {
140
140
  }
141
141
  __name(addPseudoToStyles, "addPseudoToStyles");
142
142
  const component = (0, import_react.forwardRef)((props, forwardedRef) => {
143
- var _a, _c, _d;
143
+ var _a, _d, _e;
144
144
  props = tamaguiDefaultProps && !props.asChild ? __spreadValues(__spreadValues({}, tamaguiDefaultProps), props) : props;
145
145
  const { Component, isText, isZStack } = staticConfig;
146
146
  const componentName = props.componentName || staticConfig.componentName;
@@ -184,49 +184,25 @@ function createComponent(configIn, ParentComponent) {
184
184
  hitSlop,
185
185
  asChild,
186
186
  children,
187
- pointerEvents,
188
187
  onPress,
189
188
  onPressIn,
190
189
  onPressOut,
191
190
  onHoverIn,
192
191
  onHoverOut,
193
192
  space,
194
- disabled,
193
+ disabled: disabledProp,
194
+ onMouseDown,
195
195
  onMouseEnter,
196
196
  onMouseLeave,
197
197
  hrefAttrs,
198
- onMoveShouldSetResponder,
199
- onMoveShouldSetResponderCapture,
200
- onResponderEnd,
201
- onResponderGrant,
202
- onResponderMove,
203
- onResponderReject,
204
- onResponderRelease,
205
- onResponderStart,
206
- onResponderTerminate,
207
- onResponderTerminationRequest,
208
- onScrollShouldSetResponder,
209
- onScrollShouldSetResponderCapture,
210
- onSelectionChangeShouldSetResponder,
211
- onSelectionChangeShouldSetResponderCapture,
212
- onStartShouldSetResponder,
213
- onStartShouldSetResponderCapture,
214
- onMouseDown,
215
- nativeID,
216
- accessible,
217
- accessibilityRole,
218
- collapsable,
219
- focusable,
220
198
  onClick,
221
199
  theme: _themeProp,
222
- defaultVariants,
223
- onLayout
224
- } = _b, viewPropsRest = __objRest(_b, [
200
+ defaultVariants
201
+ } = _b, nonTamaguiProps = __objRest(_b, [
225
202
  "tag",
226
203
  "hitSlop",
227
204
  "asChild",
228
205
  "children",
229
- "pointerEvents",
230
206
  "onPress",
231
207
  "onPressIn",
232
208
  "onPressOut",
@@ -234,37 +210,390 @@ function createComponent(configIn, ParentComponent) {
234
210
  "onHoverOut",
235
211
  "space",
236
212
  "disabled",
213
+ "onMouseDown",
237
214
  "onMouseEnter",
238
215
  "onMouseLeave",
239
216
  "hrefAttrs",
240
- "onMoveShouldSetResponder",
241
- "onMoveShouldSetResponderCapture",
242
- "onResponderEnd",
243
- "onResponderGrant",
244
- "onResponderMove",
245
- "onResponderReject",
246
- "onResponderRelease",
247
- "onResponderStart",
248
- "onResponderTerminate",
249
- "onResponderTerminationRequest",
250
- "onScrollShouldSetResponder",
251
- "onScrollShouldSetResponderCapture",
252
- "onSelectionChangeShouldSetResponder",
253
- "onSelectionChangeShouldSetResponderCapture",
254
- "onStartShouldSetResponder",
255
- "onStartShouldSetResponderCapture",
256
- "onMouseDown",
257
- "nativeID",
258
- "accessible",
259
- "accessibilityRole",
260
- "collapsable",
261
- "focusable",
262
217
  "onClick",
263
218
  "theme",
264
- "defaultVariants",
265
- "onLayout"
219
+ "defaultVariants"
266
220
  ]);
267
- let viewProps = viewPropsRest;
221
+ const isTaggable = !Component || typeof Component === "string";
222
+ const hasTextAncestor = import_platform.isWeb ? (0, import_react.useContext)(import_TextAncestorContext.TextAncestorContext) : false;
223
+ const element = import_platform.isWeb ? isTaggable ? tag || Component : Component : Component;
224
+ const BaseTextComponent = !import_platform.isWeb ? import_react_native.Text : element || "span";
225
+ const BaseViewComponent = !import_platform.isWeb ? import_react_native.View : element || (hasTextAncestor ? "span" : "div");
226
+ let elementType = isText ? (isAnimated ? AnimatedText || import_react_native.Text : null) || BaseTextComponent : (isAnimated ? AnimatedView || import_react_native.View : null) || BaseViewComponent;
227
+ elementType = Component || elementType;
228
+ const isStringElement = typeof elementType === "string";
229
+ const disabled = props.accessibilityState != null && props.accessibilityState.disabled === true || props.accessibilityDisabled;
230
+ let viewProps;
231
+ if (import_platform.isWeb && !staticConfig.isReactNativeWeb) {
232
+ const _c = nonTamaguiProps, {
233
+ onMoveShouldSetResponder,
234
+ onMoveShouldSetResponderCapture,
235
+ onResponderEnd,
236
+ onResponderGrant,
237
+ onResponderMove,
238
+ onResponderReject,
239
+ onResponderRelease,
240
+ onResponderStart,
241
+ onResponderTerminate,
242
+ onResponderTerminationRequest,
243
+ onScrollShouldSetResponder,
244
+ onScrollShouldSetResponderCapture,
245
+ onSelectionChangeShouldSetResponder,
246
+ onSelectionChangeShouldSetResponderCapture,
247
+ onStartShouldSetResponder,
248
+ onStartShouldSetResponderCapture,
249
+ nativeID,
250
+ accessibilityActiveDescendant,
251
+ accessibilityAtomic,
252
+ accessibilityAutoComplete,
253
+ accessibilityBusy,
254
+ accessibilityChecked,
255
+ accessibilityColumnCount,
256
+ accessibilityColumnIndex,
257
+ accessibilityColumnSpan,
258
+ accessibilityControls,
259
+ accessibilityCurrent,
260
+ accessibilityDescribedBy,
261
+ accessibilityDetails,
262
+ accessibilityDisabled,
263
+ accessibilityErrorMessage,
264
+ accessibilityExpanded,
265
+ accessibilityFlowTo,
266
+ accessibilityHasPopup,
267
+ accessibilityHidden,
268
+ accessibilityInvalid,
269
+ accessibilityKeyShortcuts,
270
+ accessibilityLabel,
271
+ accessibilityLabelledBy,
272
+ accessibilityLevel,
273
+ accessibilityLiveRegion,
274
+ accessibilityModal,
275
+ accessibilityMultiline,
276
+ accessibilityMultiSelectable,
277
+ accessibilityOrientation,
278
+ accessibilityOwns,
279
+ accessibilityPlaceholder,
280
+ accessibilityPosInSet,
281
+ accessibilityPressed,
282
+ accessibilityReadOnly,
283
+ accessibilityRequired,
284
+ accessibilityRole,
285
+ accessibilityRoleDescription,
286
+ accessibilityRowCount,
287
+ accessibilityRowIndex,
288
+ accessibilityRowSpan,
289
+ accessibilitySelected,
290
+ accessibilitySetSize,
291
+ accessibilitySort,
292
+ accessibilityValueMax,
293
+ accessibilityValueMin,
294
+ accessibilityValueNow,
295
+ accessibilityValueText,
296
+ accessible,
297
+ accessibilityState,
298
+ accessibilityValue,
299
+ collapsable,
300
+ focusable,
301
+ onLayout
302
+ } = _c, webProps = __objRest(_c, [
303
+ "onMoveShouldSetResponder",
304
+ "onMoveShouldSetResponderCapture",
305
+ "onResponderEnd",
306
+ "onResponderGrant",
307
+ "onResponderMove",
308
+ "onResponderReject",
309
+ "onResponderRelease",
310
+ "onResponderStart",
311
+ "onResponderTerminate",
312
+ "onResponderTerminationRequest",
313
+ "onScrollShouldSetResponder",
314
+ "onScrollShouldSetResponderCapture",
315
+ "onSelectionChangeShouldSetResponder",
316
+ "onSelectionChangeShouldSetResponderCapture",
317
+ "onStartShouldSetResponder",
318
+ "onStartShouldSetResponderCapture",
319
+ "nativeID",
320
+ "accessibilityActiveDescendant",
321
+ "accessibilityAtomic",
322
+ "accessibilityAutoComplete",
323
+ "accessibilityBusy",
324
+ "accessibilityChecked",
325
+ "accessibilityColumnCount",
326
+ "accessibilityColumnIndex",
327
+ "accessibilityColumnSpan",
328
+ "accessibilityControls",
329
+ "accessibilityCurrent",
330
+ "accessibilityDescribedBy",
331
+ "accessibilityDetails",
332
+ "accessibilityDisabled",
333
+ "accessibilityErrorMessage",
334
+ "accessibilityExpanded",
335
+ "accessibilityFlowTo",
336
+ "accessibilityHasPopup",
337
+ "accessibilityHidden",
338
+ "accessibilityInvalid",
339
+ "accessibilityKeyShortcuts",
340
+ "accessibilityLabel",
341
+ "accessibilityLabelledBy",
342
+ "accessibilityLevel",
343
+ "accessibilityLiveRegion",
344
+ "accessibilityModal",
345
+ "accessibilityMultiline",
346
+ "accessibilityMultiSelectable",
347
+ "accessibilityOrientation",
348
+ "accessibilityOwns",
349
+ "accessibilityPlaceholder",
350
+ "accessibilityPosInSet",
351
+ "accessibilityPressed",
352
+ "accessibilityReadOnly",
353
+ "accessibilityRequired",
354
+ "accessibilityRole",
355
+ "accessibilityRoleDescription",
356
+ "accessibilityRowCount",
357
+ "accessibilityRowIndex",
358
+ "accessibilityRowSpan",
359
+ "accessibilitySelected",
360
+ "accessibilitySetSize",
361
+ "accessibilitySort",
362
+ "accessibilityValueMax",
363
+ "accessibilityValueMin",
364
+ "accessibilityValueNow",
365
+ "accessibilityValueText",
366
+ "accessible",
367
+ "accessibilityState",
368
+ "accessibilityValue",
369
+ "collapsable",
370
+ "focusable",
371
+ "onLayout"
372
+ ]);
373
+ viewProps = webProps;
374
+ if (!viewProps.role && accessibilityRole) {
375
+ if (accessibilityRole === "none") {
376
+ viewProps.role = "presentation";
377
+ } else {
378
+ const webRole = accessibilityRoleToWebRole[accessibilityRole];
379
+ if (webRole != null) {
380
+ viewProps.role = webRole || accessibilityRole;
381
+ }
382
+ }
383
+ }
384
+ const role = viewProps.role;
385
+ if (accessibilityActiveDescendant != null) {
386
+ viewProps["aria-activedescendant"] = accessibilityActiveDescendant;
387
+ }
388
+ if (accessibilityAtomic != null) {
389
+ viewProps["aria-atomic"] = accessibilityAtomic;
390
+ }
391
+ if (accessibilityAutoComplete != null) {
392
+ viewProps["aria-autocomplete"] = accessibilityAutoComplete;
393
+ }
394
+ if (accessibilityBusy != null) {
395
+ viewProps["aria-busy"] = accessibilityBusy;
396
+ }
397
+ if (accessibilityChecked != null) {
398
+ viewProps["aria-checked"] = accessibilityChecked;
399
+ }
400
+ if (accessibilityColumnCount != null) {
401
+ viewProps["aria-colcount"] = accessibilityColumnCount;
402
+ }
403
+ if (accessibilityColumnIndex != null) {
404
+ viewProps["aria-colindex"] = accessibilityColumnIndex;
405
+ }
406
+ if (accessibilityColumnSpan != null) {
407
+ viewProps["aria-colspan"] = accessibilityColumnSpan;
408
+ }
409
+ if (accessibilityControls != null) {
410
+ viewProps["aria-controls"] = processIDRefList(accessibilityControls);
411
+ }
412
+ if (accessibilityCurrent != null) {
413
+ viewProps["aria-current"] = accessibilityCurrent;
414
+ }
415
+ if (accessibilityDescribedBy != null) {
416
+ viewProps["aria-describedby"] = processIDRefList(accessibilityDescribedBy);
417
+ }
418
+ if (accessibilityDetails != null) {
419
+ viewProps["aria-details"] = accessibilityDetails;
420
+ }
421
+ if (disabled === true) {
422
+ viewProps["aria-disabled"] = true;
423
+ if (elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") {
424
+ viewProps.disabled = true;
425
+ }
426
+ }
427
+ if (accessibilityErrorMessage != null) {
428
+ viewProps["aria-errormessage"] = accessibilityErrorMessage;
429
+ }
430
+ if (accessibilityExpanded != null) {
431
+ viewProps["aria-expanded"] = accessibilityExpanded;
432
+ }
433
+ if (accessibilityFlowTo != null) {
434
+ viewProps["aria-flowto"] = processIDRefList(accessibilityFlowTo);
435
+ }
436
+ if (accessibilityHasPopup != null) {
437
+ viewProps["aria-haspopup"] = accessibilityHasPopup;
438
+ }
439
+ if (accessibilityHidden === true) {
440
+ viewProps["aria-hidden"] = accessibilityHidden;
441
+ }
442
+ if (accessibilityInvalid != null) {
443
+ viewProps["aria-invalid"] = accessibilityInvalid;
444
+ }
445
+ if (accessibilityKeyShortcuts != null && Array.isArray(accessibilityKeyShortcuts)) {
446
+ viewProps["aria-keyshortcuts"] = accessibilityKeyShortcuts.join(" ");
447
+ }
448
+ if (accessibilityLabel != null) {
449
+ viewProps["aria-label"] = accessibilityLabel;
450
+ }
451
+ if (accessibilityLabelledBy != null) {
452
+ viewProps["aria-labelledby"] = processIDRefList(accessibilityLabelledBy);
453
+ }
454
+ if (accessibilityLevel != null) {
455
+ viewProps["aria-level"] = accessibilityLevel;
456
+ }
457
+ if (accessibilityLiveRegion != null) {
458
+ viewProps["aria-live"] = accessibilityLiveRegion === "none" ? "off" : accessibilityLiveRegion;
459
+ }
460
+ if (accessibilityModal != null) {
461
+ viewProps["aria-modal"] = accessibilityModal;
462
+ }
463
+ if (accessibilityMultiline != null) {
464
+ viewProps["aria-multiline"] = accessibilityMultiline;
465
+ }
466
+ if (accessibilityMultiSelectable != null) {
467
+ viewProps["aria-multiselectable"] = accessibilityMultiSelectable;
468
+ }
469
+ if (accessibilityOrientation != null) {
470
+ viewProps["aria-orientation"] = accessibilityOrientation;
471
+ }
472
+ if (accessibilityOwns != null) {
473
+ viewProps["aria-owns"] = processIDRefList(accessibilityOwns);
474
+ }
475
+ if (accessibilityPlaceholder != null) {
476
+ viewProps["aria-placeholder"] = accessibilityPlaceholder;
477
+ }
478
+ if (accessibilityPosInSet != null) {
479
+ viewProps["aria-posinset"] = accessibilityPosInSet;
480
+ }
481
+ if (accessibilityPressed != null) {
482
+ viewProps["aria-pressed"] = accessibilityPressed;
483
+ }
484
+ if (accessibilityReadOnly != null) {
485
+ viewProps["aria-readonly"] = accessibilityReadOnly;
486
+ if (elementType === "input" || elementType === "select" || elementType === "textarea") {
487
+ viewProps.readOnly = true;
488
+ }
489
+ }
490
+ if (accessibilityRequired != null) {
491
+ viewProps["aria-required"] = accessibilityRequired;
492
+ if (elementType === "input" || elementType === "select" || elementType === "textarea") {
493
+ viewProps.required = true;
494
+ }
495
+ }
496
+ if (accessibilityRoleDescription != null) {
497
+ viewProps["aria-roledescription"] = accessibilityRoleDescription;
498
+ }
499
+ if (accessibilityRowCount != null) {
500
+ viewProps["aria-rowcount"] = accessibilityRowCount;
501
+ }
502
+ if (accessibilityRowIndex != null) {
503
+ viewProps["aria-rowindex"] = accessibilityRowIndex;
504
+ }
505
+ if (accessibilityRowSpan != null) {
506
+ viewProps["aria-rowspan"] = accessibilityRowSpan;
507
+ }
508
+ if (accessibilitySelected != null) {
509
+ viewProps["aria-selected"] = accessibilitySelected;
510
+ }
511
+ if (accessibilitySetSize != null) {
512
+ viewProps["aria-setsize"] = accessibilitySetSize;
513
+ }
514
+ if (accessibilitySort != null) {
515
+ viewProps["aria-sort"] = accessibilitySort;
516
+ }
517
+ if (accessibilityValueMax != null) {
518
+ viewProps["aria-valuemax"] = accessibilityValueMax;
519
+ }
520
+ if (accessibilityValueMin != null) {
521
+ viewProps["aria-valuemin"] = accessibilityValueMin;
522
+ }
523
+ if (accessibilityValueNow != null) {
524
+ viewProps["aria-valuenow"] = accessibilityValueNow;
525
+ }
526
+ if (accessibilityValueText != null) {
527
+ viewProps["aria-valuetext"] = accessibilityValueText;
528
+ }
529
+ if (nativeID) {
530
+ viewProps.id = nativeID;
531
+ }
532
+ if (!asChild) {
533
+ import_rnw.rnw.useElementLayout(hostRef, onLayout);
534
+ import_rnw.rnw.useResponderEvents(hostRef, {
535
+ onMoveShouldSetResponder,
536
+ onMoveShouldSetResponderCapture,
537
+ onResponderEnd,
538
+ onResponderGrant,
539
+ onResponderMove,
540
+ onResponderReject,
541
+ onResponderRelease,
542
+ onResponderStart,
543
+ onResponderTerminate,
544
+ onResponderTerminationRequest,
545
+ onScrollShouldSetResponder,
546
+ onScrollShouldSetResponderCapture,
547
+ onSelectionChangeShouldSetResponder,
548
+ onSelectionChangeShouldSetResponderCapture,
549
+ onStartShouldSetResponder,
550
+ onStartShouldSetResponderCapture
551
+ });
552
+ }
553
+ const platformMethodsRef = import_rnw.rnw.usePlatformMethods(viewProps);
554
+ const setRef = import_rnw.rnw.useMergeRefs(hostRef, platformMethodsRef, forwardedRef);
555
+ if (!isAnimated) {
556
+ viewProps.ref = setRef;
557
+ } else {
558
+ if (forwardedRef) {
559
+ viewProps.ref = forwardedRef;
560
+ }
561
+ }
562
+ if (props.href != null && hrefAttrs != null) {
563
+ const { download, rel, target } = hrefAttrs;
564
+ if (download != null) {
565
+ viewProps.download = download;
566
+ }
567
+ if (rel != null) {
568
+ viewProps.rel = rel;
569
+ }
570
+ if (typeof target === "string") {
571
+ viewProps.target = target.charAt(0) !== "_" ? "_" + target : target;
572
+ }
573
+ }
574
+ const _focusable = focusable != null ? focusable : accessible;
575
+ if (_focusable === false) {
576
+ viewProps.tabIndex = "-1";
577
+ }
578
+ if (elementType === "a" || elementType === "button" || elementType === "input" || elementType === "select" || elementType === "textarea") {
579
+ if (_focusable === false || accessibilityDisabled === true) {
580
+ viewProps.tabIndex = "-1";
581
+ }
582
+ } else if (role === "button" || role === "checkbox" || role === "link" || role === "radio" || role === "textbox" || role === "switch") {
583
+ if (_focusable !== false) {
584
+ viewProps.tabIndex = "0";
585
+ }
586
+ } else {
587
+ if (_focusable === true) {
588
+ viewProps.tabIndex = "0";
589
+ }
590
+ }
591
+ } else {
592
+ viewProps = nonTamaguiProps;
593
+ if (forwardedRef) {
594
+ viewProps.ref = forwardedRef;
595
+ }
596
+ }
268
597
  if (process.env.NODE_ENV === "development" && !isText && import_platform.isWeb) {
269
598
  import_react.Children.toArray(props.children).forEach((item) => {
270
599
  if (typeof item === "string") {
@@ -272,7 +601,6 @@ function createComponent(configIn, ParentComponent) {
272
601
  }
273
602
  });
274
603
  }
275
- const hasTextAncestor = import_platform.isWeb ? (0, import_react.useContext)(import_TextAncestorContext.TextAncestorContext) : false;
276
604
  const internal = (0, import_react.useRef)();
277
605
  if (!internal.current) {
278
606
  internal.current = {
@@ -291,50 +619,7 @@ function createComponent(configIn, ParentComponent) {
291
619
  internal.current.isMounted = false;
292
620
  };
293
621
  }, [hasEnterStyle, props.animation]);
294
- if (nativeID) {
295
- viewProps.id = nativeID;
296
- }
297
- if (import_platform.isAndroid) {
298
- if (collapsable)
299
- viewProps.collapsable = collapsable;
300
- if (focusable)
301
- viewProps.focusable = focusable;
302
- }
303
- if (!import_platform.isWeb) {
304
- if (accessible)
305
- viewProps.accessible = accessible;
306
- if (accessibilityRole)
307
- viewProps.accessibilityRole = accessibilityRole;
308
- }
309
- if (import_platform.isWeb && !asChild) {
310
- import_rnw.rnw.useElementLayout(hostRef, onLayout);
311
- import_rnw.rnw.useResponderEvents(hostRef, {
312
- onMoveShouldSetResponder,
313
- onMoveShouldSetResponderCapture,
314
- onResponderEnd,
315
- onResponderGrant,
316
- onResponderMove,
317
- onResponderReject,
318
- onResponderRelease,
319
- onResponderStart,
320
- onResponderTerminate,
321
- onResponderTerminationRequest,
322
- onScrollShouldSetResponder,
323
- onScrollShouldSetResponderCapture,
324
- onSelectionChangeShouldSetResponder,
325
- onSelectionChangeShouldSetResponderCapture,
326
- onStartShouldSetResponder,
327
- onStartShouldSetResponderCapture
328
- });
329
- }
330
- const isTaggable = !Component || typeof Component === "string";
331
- const element = import_platform.isWeb ? isTaggable ? tag || Component : Component : Component;
332
- const BaseTextComponent = !import_platform.isWeb ? import_react_native.Text : element || "span";
333
- const BaseViewComponent = !import_platform.isWeb ? import_react_native.View : element || (hasTextAncestor ? "span" : "div");
334
- let ViewComponent = isText ? (isAnimated ? AnimatedText || import_react_native.Text : null) || BaseTextComponent : (isAnimated ? AnimatedView || import_react_native.View : null) || BaseViewComponent;
335
- ViewComponent = Component || ViewComponent;
336
622
  let styles;
337
- const isStringElement = typeof ViewComponent === "string";
338
623
  const animationStyles = state.animation ? state.animation.style : null;
339
624
  if (isStringElement && shouldAvoidClasses) {
340
625
  styles = __spreadValues(__spreadValues(__spreadValues({}, defaultNativeStyle), animationStyles ?? style), medias);
@@ -375,36 +660,6 @@ function createComponent(configIn, ParentComponent) {
375
660
  } else {
376
661
  viewProps.style = styles;
377
662
  }
378
- if (pointerEvents) {
379
- viewProps.pointerEvents = pointerEvents;
380
- }
381
- if (import_platform.isWeb) {
382
- const platformMethodsRef = import_rnw.rnw.usePlatformMethods(viewProps);
383
- const setRef = import_rnw.rnw.useMergeRefs(hostRef, platformMethodsRef, forwardedRef);
384
- if (!isAnimated) {
385
- viewProps.ref = setRef;
386
- } else {
387
- if (forwardedRef) {
388
- viewProps.ref = forwardedRef;
389
- }
390
- }
391
- if (props.href != null && hrefAttrs != null) {
392
- const { download, rel, target } = hrefAttrs;
393
- if (download != null) {
394
- viewProps.download = download;
395
- }
396
- if (rel != null) {
397
- viewProps.rel = rel;
398
- }
399
- if (typeof target === "string") {
400
- viewProps.target = target.charAt(0) !== "_" ? "_" + target : target;
401
- }
402
- }
403
- } else {
404
- if (forwardedRef) {
405
- viewProps.ref = forwardedRef;
406
- }
407
- }
408
663
  const initialPseudos = initialSplitStyles.pseudos;
409
664
  const attachPress = !!(pseudos && pseudos.pressStyle || initialPseudos && initialPseudos.pressStyle || onPress || onPressOut || onPressIn || onClick);
410
665
  const isTouch = (0, import_useIsTouchDevice.useIsTouchDevice)();
@@ -489,17 +744,10 @@ function createComponent(configIn, ParentComponent) {
489
744
  viewProps.dataSet = __spreadProps(__spreadValues({}, viewProps.dataSet), {
490
745
  className: viewProps.className
491
746
  });
492
- } else {
493
- const rnProps = import_rnw.rnw.createDOMProps(viewProps);
494
- const className = rnProps.className && rnProps.className !== viewProps.className ? `${rnProps.className} ${viewProps.className}` : viewProps.className;
495
- Object.assign(viewProps, rnProps);
496
- if (className) {
497
- viewProps.className = className;
498
- }
499
747
  }
500
748
  }
501
749
  if (asChild) {
502
- ViewComponent = import_Slot.Slot;
750
+ elementType = import_Slot.Slot;
503
751
  const onlyChild = import_react.default.Children.only(children);
504
752
  Object.assign(viewProps, onlyChild.props);
505
753
  }
@@ -523,8 +771,8 @@ function createComponent(configIn, ParentComponent) {
523
771
  }
524
772
  }
525
773
  }
526
- content = (0, import_react.createElement)(ViewComponent, viewProps, childEls);
527
- if (!import_platform.isWeb) {
774
+ content = (0, import_react.createElement)(elementType, viewProps, childEls);
775
+ if (process.env.TAMAGUI_TARGET === "native") {
528
776
  if (attachPress && events) {
529
777
  content = /* @__PURE__ */ import_react.default.createElement(import_react_native.Pressable, {
530
778
  onPressIn: events[pressInKey],
@@ -550,7 +798,7 @@ function createComponent(configIn, ParentComponent) {
550
798
  }
551
799
  if (process.env.NODE_ENV === "development") {
552
800
  if (props["debug"]) {
553
- console.log(" \xBB ", __spreadValues({ propsIn: __spreadValues({}, props), propsOut: __spreadValues({}, viewProps), state, splitStyles, animationStyles, isStringElement, classNamesIn: (_c = props.className) == null ? void 0 : _c.split(" "), classNamesOut: (_d = viewProps.className) == null ? void 0 : _d.split(" "), events, shouldAttach, ViewComponent, viewProps, styles, pseudos, content, childEls, shouldAvoidClasses, avoidClasses, animation: props.animation, style, defaultNativeStyle, initialSplitStyles }, typeof window !== "undefined" ? { theme, themeState: theme.__state, themeClassName: theme.className, staticConfig, tamaguiConfig } : null));
801
+ console.log(" \xBB ", __spreadValues({ propsIn: __spreadValues({}, props), propsOut: __spreadValues({}, viewProps), state, splitStyles, animationStyles, isStringElement, classNamesIn: (_d = props.className) == null ? void 0 : _d.split(" "), classNamesOut: (_e = viewProps.className) == null ? void 0 : _e.split(" "), events, shouldAttach, ViewComponent: elementType, viewProps, styles, pseudos, content, childEls, shouldAvoidClasses, avoidClasses, animation: props.animation, style, defaultNativeStyle, initialSplitStyles }, typeof window !== "undefined" ? { theme, themeState: theme.__state, themeClassName: theme.className, staticConfig, tamaguiConfig } : null));
554
802
  }
555
803
  }
556
804
  if (features.length) {
@@ -727,6 +975,24 @@ function AbsoluteFill(props) {
727
975
  }, props.child);
728
976
  }
729
977
  __name(AbsoluteFill, "AbsoluteFill");
978
+ function processIDRefList(idRefList) {
979
+ return Array.isArray(idRefList) ? idRefList.join(" ") : idRefList;
980
+ }
981
+ __name(processIDRefList, "processIDRefList");
982
+ const accessibilityRoleToWebRole = {
983
+ adjustable: "slider",
984
+ button: "button",
985
+ header: "heading",
986
+ image: "img",
987
+ imagebutton: null,
988
+ keyboardkey: null,
989
+ label: null,
990
+ link: "link",
991
+ none: "presentation",
992
+ search: "search",
993
+ summary: "region",
994
+ text: null
995
+ };
730
996
  // Annotate the CommonJS export names for ESM import in node:
731
997
  0 && (module.exports = {
732
998
  AbsoluteFill,