tamagui 1.79.11 → 1.79.12

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
@@ -5611,6 +5611,30 @@ var require_withStaticProperties_native = __commonJS({
5611
5611
  }
5612
5612
  });
5613
5613
 
5614
+ // ../web/dist/cjs/internalWithTheme.native.js
5615
+ var require_internalWithTheme_native = __commonJS({
5616
+ "../web/dist/cjs/internalWithTheme.native.js"(exports, module2) {
5617
+ "use strict";
5618
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
5619
+ for (var name in all)
5620
+ __defProp2(target, name, { get: all[name], enumerable: !0 });
5621
+ }, __copyProps2 = (to, from, except, desc) => {
5622
+ if (from && typeof from == "object" || typeof from == "function")
5623
+ for (let key of __getOwnPropNames2(from))
5624
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
5625
+ return to;
5626
+ }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), internalWithTheme_exports = {};
5627
+ __export2(internalWithTheme_exports, {
5628
+ internalWithTheme: () => internalWithTheme
5629
+ });
5630
+ module2.exports = __toCommonJS2(internalWithTheme_exports);
5631
+ var import_useTheme = require_useTheme_native(), import_jsx_runtime6 = require("react/jsx-runtime"), internalWithTheme = (Component, styleProvider) => (props) => {
5632
+ let { expressions, ...rest } = props, theme = (0, import_useTheme.useTheme)();
5633
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Component, { style: styleProvider(theme, props.expressions), ...rest });
5634
+ };
5635
+ }
5636
+ });
5637
+
5614
5638
  // ../web/dist/cjs/hooks/useThemeName.native.js
5615
5639
  var require_useThemeName_native = __commonJS({
5616
5640
  "../web/dist/cjs/hooks/useThemeName.native.js"(exports, module2) {
@@ -6127,6 +6151,7 @@ var require_index_native9 = __commonJS({
6127
6151
  __reExport2(src_exports2, require_themes_native(), module2.exports);
6128
6152
  __reExport2(src_exports2, require_createShallowSetState_native(), module2.exports);
6129
6153
  __reExport2(src_exports2, require_withStaticProperties_native(), module2.exports);
6154
+ __reExport2(src_exports2, require_internalWithTheme_native(), module2.exports);
6130
6155
  var import_useMedia = require_useMedia_native();
6131
6156
  __reExport2(src_exports2, require_useTheme_native(), module2.exports);
6132
6157
  __reExport2(src_exports2, require_useThemeName_native(), module2.exports);
@@ -8188,7 +8213,7 @@ var require_index_native18 = __commonJS({
8188
8213
  });
8189
8214
  module2.exports = __toCommonJS2(src_exports2);
8190
8215
  var import_get_token2 = require_index_native17(), getButtonSized2 = (val, { tokens, props }) => {
8191
- if (!val)
8216
+ if (!val || props.circular)
8192
8217
  return;
8193
8218
  if (typeof val == "number")
8194
8219
  return {
@@ -17528,61 +17553,63 @@ var require_Slider_native = __commonJS({
17528
17553
  defaultVariants: {
17529
17554
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
17530
17555
  }
17531
- }), SliderThumb = SliderThumbFrame.styleable(function(props, forwardedRef) {
17532
- let { __scopeSlider, index, size: sizeProp, ...thumbProps } = props, context = (0, import_constants.useSliderContext)(THUMB_NAME, __scopeSlider), orientation = (0, import_constants.useSliderOrientationContext)(THUMB_NAME, __scopeSlider), [thumb, setThumb] = React2.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(
17533
- forwardedRef,
17534
- (node) => setThumb(node)
17535
- ), value = context.values[index], percent = value === void 0 ? 0 : (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max), label = (0, import_helpers2.getLabel)(index, context.values.length), sizeIn = sizeProp ?? context.size ?? "$true", [size2, setSize] = React2.useState(() => (0, import_core13.getVariableValue)(getThumbSize(sizeIn).width)), thumbInBoundsOffset = size2 ? (0, import_helpers2.getThumbInBoundsOffset)(size2, percent, orientation.direction) : 0;
17536
- React2.useEffect(() => {
17537
- if (thumb)
17538
- return context.thumbs.set(thumb, index), () => {
17539
- context.thumbs.delete(thumb);
17540
- };
17541
- }, [thumb, context.thumbs, index]);
17542
- let positionalStyles = context.orientation === "horizontal" ? {
17543
- x: thumbInBoundsOffset - size2 / 2,
17544
- y: -size2 / 2,
17545
- top: "50%",
17546
- ...size2 === 0 && {
17547
- top: "auto",
17548
- bottom: "auto"
17549
- }
17550
- } : {
17551
- x: -size2 / 2,
17552
- y: size2 / 2,
17553
- left: "50%",
17554
- ...size2 === 0 && {
17555
- left: "auto",
17556
- right: "auto"
17557
- }
17558
- };
17559
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
17560
- SliderThumbFrame,
17561
- {
17562
- ref: composedRefs,
17563
- role: "slider",
17564
- "aria-label": props["aria-label"] || label,
17565
- "aria-valuemin": context.min,
17566
- "aria-valuenow": value,
17567
- "aria-valuemax": context.max,
17568
- "aria-orientation": context.orientation,
17569
- "data-orientation": context.orientation,
17570
- "data-disabled": context.disabled ? "" : void 0,
17571
- tabIndex: context.disabled ? void 0 : 0,
17572
- animateOnly: ["transform", "left", "top", "right", "bottom"],
17573
- ...positionalStyles,
17574
- [orientation.startEdge]: `${percent}%`,
17575
- size: sizeIn,
17576
- ...thumbProps,
17577
- onLayout: (e) => {
17578
- setSize(e.nativeEvent.layout[orientation.sizeProp]);
17579
- },
17580
- onFocus: (0, import_helpers.composeEventHandlers)(props.onFocus, () => {
17581
- context.valueIndexToChangeRef.current = index;
17582
- })
17583
- }
17584
- );
17585
- }), SliderComponent = React2.forwardRef(
17556
+ }), SliderThumb = React2.memo(
17557
+ SliderThumbFrame.styleable(function(props, forwardedRef) {
17558
+ let { __scopeSlider, index, size: sizeProp, ...thumbProps } = props, context = (0, import_constants.useSliderContext)(THUMB_NAME, __scopeSlider), orientation = (0, import_constants.useSliderOrientationContext)(THUMB_NAME, __scopeSlider), [thumb, setThumb] = React2.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(
17559
+ forwardedRef,
17560
+ (node) => setThumb(node)
17561
+ ), value = context.values[index], percent = value === void 0 ? 0 : (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max), label = (0, import_helpers2.getLabel)(index, context.values.length), sizeIn = sizeProp ?? context.size ?? "$true", [size2, setSize] = React2.useState(() => (0, import_core13.getVariableValue)(getThumbSize(sizeIn).width)), thumbInBoundsOffset = size2 ? (0, import_helpers2.getThumbInBoundsOffset)(size2, percent, orientation.direction) : 0;
17562
+ React2.useEffect(() => {
17563
+ if (thumb)
17564
+ return context.thumbs.set(thumb, index), () => {
17565
+ context.thumbs.delete(thumb);
17566
+ };
17567
+ }, [thumb, context.thumbs, index]);
17568
+ let positionalStyles = context.orientation === "horizontal" ? {
17569
+ x: thumbInBoundsOffset - size2 / 2,
17570
+ y: -size2 / 2,
17571
+ top: "50%",
17572
+ ...size2 === 0 && {
17573
+ top: "auto",
17574
+ bottom: "auto"
17575
+ }
17576
+ } : {
17577
+ x: -size2 / 2,
17578
+ y: size2 / 2,
17579
+ left: "50%",
17580
+ ...size2 === 0 && {
17581
+ left: "auto",
17582
+ right: "auto"
17583
+ }
17584
+ };
17585
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
17586
+ SliderThumbFrame,
17587
+ {
17588
+ ref: composedRefs,
17589
+ role: "slider",
17590
+ "aria-label": props["aria-label"] || label,
17591
+ "aria-valuemin": context.min,
17592
+ "aria-valuenow": value,
17593
+ "aria-valuemax": context.max,
17594
+ "aria-orientation": context.orientation,
17595
+ "data-orientation": context.orientation,
17596
+ "data-disabled": context.disabled ? "" : void 0,
17597
+ tabIndex: context.disabled ? void 0 : 0,
17598
+ animateOnly: ["transform", "left", "top", "right", "bottom"],
17599
+ ...positionalStyles,
17600
+ [orientation.startEdge]: `${percent}%`,
17601
+ size: sizeIn,
17602
+ ...thumbProps,
17603
+ onLayout: (e) => {
17604
+ setSize(e.nativeEvent.layout[orientation.sizeProp]);
17605
+ },
17606
+ onFocus: (0, import_helpers.composeEventHandlers)(props.onFocus, () => {
17607
+ context.valueIndexToChangeRef.current = index;
17608
+ })
17609
+ }
17610
+ );
17611
+ })
17612
+ ), SliderComponent = React2.forwardRef(
17586
17613
  (props, forwardedRef) => {
17587
17614
  let {
17588
17615
  name,