tamagui 1.88.7 → 1.88.9

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/native.js CHANGED
@@ -6636,7 +6636,13 @@ var require_Collapsible_native = __commonJS({
6636
6636
  name: CONTENT_NAME
6637
6637
  }), CollapsibleContent = CollapsibleContentFrame.styleable(
6638
6638
  (props, forwardedRef) => {
6639
- let { forceMount, children, __scopeCollapsible, ...contentProps } = props, context = useCollapsibleContext(__scopeCollapsible);
6639
+ let {
6640
+ forceMount,
6641
+ children,
6642
+ // @ts-expect-error
6643
+ __scopeCollapsible,
6644
+ ...contentProps
6645
+ } = props, context = useCollapsibleContext(__scopeCollapsible);
6640
6646
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, { ...contentProps, children: forceMount || context.open ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CollapsibleContentFrame, { ref: forwardedRef, ...contentProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, { children }) }) : null });
6641
6647
  }
6642
6648
  );
@@ -16090,6 +16096,7 @@ var require_Progress_native = __commonJS({
16090
16096
  }), Progress = (0, import_helpers.withStaticProperties)(
16091
16097
  ProgressFrame.styleable(function(props, forwardedRef) {
16092
16098
  let {
16099
+ // @ts-expect-error
16093
16100
  __scopeProgress,
16094
16101
  value: valueProp,
16095
16102
  max: maxProp,
@@ -16626,6 +16633,61 @@ var require_index_native60 = __commonJS({
16626
16633
  }
16627
16634
  });
16628
16635
 
16636
+ // ../use-debounce/dist/cjs/index.native.js
16637
+ var require_index_native61 = __commonJS({
16638
+ "../use-debounce/dist/cjs/index.native.js"(exports2, module2) {
16639
+ "use strict";
16640
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
16641
+ for (var name in all)
16642
+ __defProp2(target, name, { get: all[name], enumerable: !0 });
16643
+ }, __copyProps2 = (to, from, except, desc) => {
16644
+ if (from && typeof from == "object" || typeof from == "function")
16645
+ for (let key of __getOwnPropNames2(from))
16646
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
16647
+ return to;
16648
+ }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), src_exports2 = {};
16649
+ __export2(src_exports2, {
16650
+ debounce: () => debounce,
16651
+ useDebounce: () => useDebounce,
16652
+ useDebounceValue: () => useDebounceValue
16653
+ });
16654
+ module2.exports = __toCommonJS2(src_exports2);
16655
+ var import_react2 = require("react");
16656
+ function debounce(func, wait, leading) {
16657
+ let timeout, isCancelled = !1;
16658
+ function debounced() {
16659
+ isCancelled = !1;
16660
+ let args = arguments;
16661
+ leading && !timeout && func.apply(this, args), clearTimeout(timeout), timeout = setTimeout(() => {
16662
+ timeout = null, leading || isCancelled || func.apply(this, args), isCancelled = !1;
16663
+ }, wait);
16664
+ }
16665
+ return debounced.cancel = () => {
16666
+ isCancelled = !0;
16667
+ }, debounced;
16668
+ }
16669
+ var defaultOpts = { leading: !1 };
16670
+ function useDebounce(fn, wait, options = defaultOpts, mountArgs = [fn]) {
16671
+ let dbEffect = (0, import_react2.useRef)(null);
16672
+ return (0, import_react2.useEffect)(() => () => {
16673
+ var _a;
16674
+ (_a = dbEffect.current) == null || _a.cancel();
16675
+ }, []), (0, import_react2.useMemo)(() => (dbEffect.current = debounce(fn, wait, options.leading), dbEffect.current), [options.leading, ...mountArgs]);
16676
+ }
16677
+ function useDebounceValue(val, amt = 0) {
16678
+ let [state, setState] = (0, import_react2.useState)(val);
16679
+ return (0, import_react2.useEffect)(() => {
16680
+ let tm = setTimeout(() => {
16681
+ setState((prev) => prev === val ? prev : val);
16682
+ }, amt);
16683
+ return () => {
16684
+ clearTimeout(tm);
16685
+ };
16686
+ }, [val]), state;
16687
+ }
16688
+ }
16689
+ });
16690
+
16629
16691
  // ../select/dist/cjs/constants.native.js
16630
16692
  var require_constants_native4 = __commonJS({
16631
16693
  "../select/dist/cjs/constants.native.js"(exports2, module2) {
@@ -16786,10 +16848,10 @@ var require_SelectItem_native = __commonJS({
16786
16848
  size: size2,
16787
16849
  onActiveChange,
16788
16850
  initialValue
16789
- } = context, [isSelected, setSelected] = React2.useState(initialValue === value), [isActive, setActive] = React2.useState(!1);
16851
+ } = context, [isSelected, setSelected] = React2.useState(initialValue === value);
16790
16852
  React2.useEffect(() => activeIndexSubscribe((i) => {
16791
- let isActive2 = index === i;
16792
- setActive(isActive2), isActive2 && onActiveChange(value, index);
16853
+ var _a;
16854
+ index === i && (onActiveChange(value, index), (_a = listRef == null ? void 0 : listRef.current[index]) == null || _a.focus());
16793
16855
  }), [index]), React2.useEffect(() => valueSubscribe((val) => {
16794
16856
  setSelected(val === value);
16795
16857
  }), [value]);
@@ -16823,10 +16885,7 @@ var require_SelectItem_native = __commonJS({
16823
16885
  }) : {
16824
16886
  onPress: handleSelect
16825
16887
  }, [handleSelect]);
16826
- return (0, import_constants4.useIsomorphicLayoutEffect)(() => {
16827
- var _a;
16828
- isActive && ((_a = listRef == null ? void 0 : listRef.current[index]) == null || _a.focus());
16829
- }, [isActive]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
16888
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
16830
16889
  SelectItemContextProvider,
16831
16890
  {
16832
16891
  scope: __scopeSelect,
@@ -16851,7 +16910,13 @@ var require_SelectItem_native = __commonJS({
16851
16910
  hoverTheme: !0,
16852
16911
  cursor: "default",
16853
16912
  size: size2,
16854
- outlineOffset: -1
16913
+ outlineOffset: -1,
16914
+ focusStyle: {
16915
+ outlineColor: "$outlineColor",
16916
+ outlineWidth: 2,
16917
+ outlineStyle: "solid",
16918
+ outlineOffset: -2
16919
+ }
16855
16920
  },
16856
16921
  ...listItemProps,
16857
16922
  ...selectItemProps
@@ -17111,7 +17176,7 @@ var require_Select_native = __commonJS({
17111
17176
  SelectSeparator: () => SelectSeparator
17112
17177
  });
17113
17178
  module2.exports = __toCommonJS2(Select_exports);
17114
- var import_adapt = require_index_native25(), import_compose_refs = require_index_native10(), import_constants4 = require_index_native6(), import_core13 = require_index_native16(), import_get_token2 = require_index_native18(), import_helpers = require_index_native7(), import_list_item = require_index_native52(), import_portal2 = require_index_native30(), import_separator = require_index_native60(), import_sheet = require_index_native34(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native9(), React2 = __toESM2(require("react")), import_constants22 = require_constants_native4(), import_context = require_context_native(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectItemText = require_SelectItemText_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native(), import_jsx_runtime6 = require("react/jsx-runtime"), VALUE_NAME = "SelectValue", SelectValueFrame = (0, import_core13.styled)(import_text2.SizableText, {
17179
+ var import_adapt = require_index_native25(), import_compose_refs = require_index_native10(), import_constants4 = require_index_native6(), import_core13 = require_index_native16(), import_get_token2 = require_index_native18(), import_helpers = require_index_native7(), import_list_item = require_index_native52(), import_portal2 = require_index_native30(), import_separator = require_index_native60(), import_sheet = require_index_native34(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native9(), React2 = __toESM2(require("react")), import_use_debounce = require_index_native61(), import_constants22 = require_constants_native4(), import_context = require_context_native(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectItemText = require_SelectItemText_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native(), import_jsx_runtime6 = require("react/jsx-runtime"), VALUE_NAME = "SelectValue", SelectValueFrame = (0, import_core13.styled)(import_text2.SizableText, {
17115
17180
  name: VALUE_NAME,
17116
17181
  userSelect: "none"
17117
17182
  }), SelectValue = SelectValueFrame.styleable(
@@ -17306,7 +17371,14 @@ var require_Select_native = __commonJS({
17306
17371
  (0, import_constants4.useIsomorphicLayoutEffect)(() => {
17307
17372
  selectedIndexRef.current = selectedIndex, activeIndexRef.current = activeIndex;
17308
17373
  });
17309
- let shouldRenderWebNative = import_constants4.isWeb && (native === !0 || native === "web" || Array.isArray(native) && native.includes("web"));
17374
+ let shouldRenderWebNative = import_constants4.isWeb && (native === !0 || native === "web" || Array.isArray(native) && native.includes("web")), setActiveIndexDebounced = (0, import_use_debounce.useDebounce)(
17375
+ (index) => {
17376
+ setActiveIndex((prev) => prev !== index ? (typeof index == "number" && emitActiveIndex(index), index) : prev);
17377
+ },
17378
+ 1,
17379
+ {},
17380
+ []
17381
+ );
17310
17382
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
17311
17383
  import_context.SelectItemParentProvider,
17312
17384
  {
@@ -17344,9 +17416,7 @@ var require_Select_native = __commonJS({
17344
17416
  sheetBreakpoint,
17345
17417
  activeIndex,
17346
17418
  selectedIndex,
17347
- setActiveIndex: React2.useCallback((index) => {
17348
- setActiveIndex((prev) => prev !== index ? (typeof index == "number" && emitActiveIndex(index), index) : prev);
17349
- }, []),
17419
+ setActiveIndex: setActiveIndexDebounced,
17350
17420
  value,
17351
17421
  open,
17352
17422
  native,
@@ -17399,7 +17469,7 @@ var require_Select_native = __commonJS({
17399
17469
  });
17400
17470
 
17401
17471
  // ../select/dist/cjs/index.native.js
17402
- var require_index_native61 = __commonJS({
17472
+ var require_index_native62 = __commonJS({
17403
17473
  "../select/dist/cjs/index.native.js"(exports2, module2) {
17404
17474
  "use strict";
17405
17475
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = (to, from, except, desc) => {
@@ -18059,7 +18129,7 @@ var require_Slider_native = __commonJS({
18059
18129
  });
18060
18130
 
18061
18131
  // ../slider/dist/cjs/index.native.js
18062
- var require_index_native62 = __commonJS({
18132
+ var require_index_native63 = __commonJS({
18063
18133
  "../slider/dist/cjs/index.native.js"(exports2, module2) {
18064
18134
  "use strict";
18065
18135
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
@@ -18415,7 +18485,7 @@ var require_createSwitch_native = __commonJS({
18415
18485
  });
18416
18486
 
18417
18487
  // ../switch/dist/cjs/index.native.js
18418
- var require_index_native63 = __commonJS({
18488
+ var require_index_native64 = __commonJS({
18419
18489
  "../switch/dist/cjs/index.native.js"(exports2, module2) {
18420
18490
  "use strict";
18421
18491
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
@@ -18716,7 +18786,7 @@ var require_Tabs_native = __commonJS({
18716
18786
  });
18717
18787
 
18718
18788
  // ../tabs/dist/cjs/index.native.js
18719
- var require_index_native64 = __commonJS({
18789
+ var require_index_native65 = __commonJS({
18720
18790
  "../tabs/dist/cjs/index.native.js"(exports2, module2) {
18721
18791
  "use strict";
18722
18792
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = (to, from, except, desc) => {
@@ -18910,7 +18980,7 @@ var require_replaceTheme_native = __commonJS({
18910
18980
  });
18911
18981
 
18912
18982
  // ../theme/dist/cjs/index.native.js
18913
- var require_index_native65 = __commonJS({
18983
+ var require_index_native66 = __commonJS({
18914
18984
  "../theme/dist/cjs/index.native.js"(exports2, module2) {
18915
18985
  "use strict";
18916
18986
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
@@ -19297,7 +19367,7 @@ var require_ToggleGroup_native = __commonJS({
19297
19367
  });
19298
19368
 
19299
19369
  // ../toggle-group/dist/cjs/index.native.js
19300
- var require_index_native66 = __commonJS({
19370
+ var require_index_native67 = __commonJS({
19301
19371
  "../toggle-group/dist/cjs/index.native.js"(exports2, module2) {
19302
19372
  "use strict";
19303
19373
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = (to, from, except, desc) => {
@@ -19360,7 +19430,7 @@ var require_TooltipSimple_native = __commonJS({
19360
19430
  });
19361
19431
 
19362
19432
  // ../tooltip/dist/cjs/index.native.js
19363
- var require_index_native67 = __commonJS({
19433
+ var require_index_native68 = __commonJS({
19364
19434
  "../tooltip/dist/cjs/index.native.js"(exports2, module2) {
19365
19435
  "use strict";
19366
19436
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = (to, from, except, desc) => {
@@ -19375,61 +19445,6 @@ var require_index_native67 = __commonJS({
19375
19445
  }
19376
19446
  });
19377
19447
 
19378
- // ../use-debounce/dist/cjs/index.native.js
19379
- var require_index_native68 = __commonJS({
19380
- "../use-debounce/dist/cjs/index.native.js"(exports2, module2) {
19381
- "use strict";
19382
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
19383
- for (var name in all)
19384
- __defProp2(target, name, { get: all[name], enumerable: !0 });
19385
- }, __copyProps2 = (to, from, except, desc) => {
19386
- if (from && typeof from == "object" || typeof from == "function")
19387
- for (let key of __getOwnPropNames2(from))
19388
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
19389
- return to;
19390
- }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), src_exports2 = {};
19391
- __export2(src_exports2, {
19392
- debounce: () => debounce,
19393
- useDebounce: () => useDebounce,
19394
- useDebounceValue: () => useDebounceValue
19395
- });
19396
- module2.exports = __toCommonJS2(src_exports2);
19397
- var import_react2 = require("react");
19398
- function debounce(func, wait, leading) {
19399
- let timeout, isCancelled = !1;
19400
- function debounced() {
19401
- isCancelled = !1;
19402
- let args = arguments;
19403
- leading && !timeout && func.apply(this, args), clearTimeout(timeout), timeout = setTimeout(() => {
19404
- timeout = null, leading || isCancelled || func.apply(this, args), isCancelled = !1;
19405
- }, wait);
19406
- }
19407
- return debounced.cancel = () => {
19408
- isCancelled = !0;
19409
- }, debounced;
19410
- }
19411
- var defaultOpts = { leading: !1 };
19412
- function useDebounce(fn, wait, options = defaultOpts, mountArgs = [fn]) {
19413
- let dbEffect = (0, import_react2.useRef)(null);
19414
- return (0, import_react2.useEffect)(() => () => {
19415
- var _a;
19416
- (_a = dbEffect.current) == null || _a.cancel();
19417
- }, []), (0, import_react2.useMemo)(() => (dbEffect.current = debounce(fn, wait, options.leading), dbEffect.current), [options.leading, ...mountArgs]);
19418
- }
19419
- function useDebounceValue(val, amt = 0) {
19420
- let [state, setState] = (0, import_react2.useState)(val);
19421
- return (0, import_react2.useEffect)(() => {
19422
- let tm = setTimeout(() => {
19423
- setState((prev) => prev === val ? prev : val);
19424
- }, amt);
19425
- return () => {
19426
- clearTimeout(tm);
19427
- };
19428
- }, [val]), state;
19429
- }
19430
- }
19431
- });
19432
-
19433
19448
  // ../use-window-dimensions/dist/cjs/index.native.js
19434
19449
  var require_index_native69 = __commonJS({
19435
19450
  "../use-window-dimensions/dist/cjs/index.native.js"(exports2, module2) {
@@ -19649,20 +19664,20 @@ __reExport(src_exports, __toESM(require_index_native30()), module.exports);
19649
19664
  __reExport(src_exports, __toESM(require_index_native57()), module.exports);
19650
19665
  __reExport(src_exports, __toESM(require_index_native59()), module.exports);
19651
19666
  __reExport(src_exports, __toESM(require_index_native33()), module.exports);
19652
- __reExport(src_exports, __toESM(require_index_native61()), module.exports);
19667
+ __reExport(src_exports, __toESM(require_index_native62()), module.exports);
19653
19668
  __reExport(src_exports, __toESM(require_index_native60()), module.exports);
19654
19669
  __reExport(src_exports, __toESM(require_index_native38()), module.exports);
19655
19670
  __reExport(src_exports, __toESM(require_index_native34()), module.exports);
19656
- __reExport(src_exports, __toESM(require_index_native62()), module.exports);
19657
- __reExport(src_exports, __toESM(require_index_native20()), module.exports);
19658
19671
  __reExport(src_exports, __toESM(require_index_native63()), module.exports);
19672
+ __reExport(src_exports, __toESM(require_index_native20()), module.exports);
19659
19673
  __reExport(src_exports, __toESM(require_index_native64()), module.exports);
19660
- __reExport(src_exports, __toESM(require_index_native22()), module.exports);
19661
19674
  __reExport(src_exports, __toESM(require_index_native65()), module.exports);
19675
+ __reExport(src_exports, __toESM(require_index_native22()), module.exports);
19662
19676
  __reExport(src_exports, __toESM(require_index_native66()), module.exports);
19663
19677
  __reExport(src_exports, __toESM(require_index_native67()), module.exports);
19664
- __reExport(src_exports, __toESM(require_index_native9()), module.exports);
19665
19678
  __reExport(src_exports, __toESM(require_index_native68()), module.exports);
19679
+ __reExport(src_exports, __toESM(require_index_native9()), module.exports);
19680
+ __reExport(src_exports, __toESM(require_index_native61()), module.exports);
19666
19681
  __reExport(src_exports, __toESM(require_index_native()), module.exports);
19667
19682
  __reExport(src_exports, __toESM(require_index_native69()), module.exports);
19668
19683
  __reExport(src_exports, __toESM(require_index_native70()), module.exports);