tamagui 1.74.19 → 1.74.21

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.
@@ -1647,7 +1647,7 @@ var require_createMediaStyle_native = __commonJS({
1647
1647
  if (isTheme || isGroup) {
1648
1648
  let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), mediaName = groupInfo == null ? void 0 : groupInfo.name;
1649
1649
  groupMediaKey = groupInfo == null ? void 0 : groupInfo.media, isGroup && (containerName = mediaName);
1650
- let name = (isGroup ? "group_" : "") + mediaName, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = conf.themeClassNameOnRoot ? "" : " ", pseudoSelectorName = groupInfo.pseudo ? groupPseudoToPseudoCSSMap[groupInfo.pseudo] || groupInfo.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${name}${pseudoSelector}`, nextSelector = `${presedencePrefix}${mediaSelector} ${selector.replace(
1650
+ let name = (isGroup ? "group_" : "") + mediaName, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = conf.themeClassNameOnRoot && isTheme ? "" : " ", pseudoSelectorName = groupInfo.pseudo ? groupPseudoToPseudoCSSMap[groupInfo.pseudo] || groupInfo.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${name}${pseudoSelector}`, nextSelector = `${presedencePrefix}${mediaSelector} ${selector.replace(
1651
1651
  ":root",
1652
1652
  ""
1653
1653
  )}`;
@@ -4194,7 +4194,7 @@ var require_createComponent_native = __commonJS({
4194
4194
  });
4195
4195
  staticConfig.componentName && (component.displayName = staticConfig.componentName);
4196
4196
  let res = component;
4197
- process.env.TAMAGUI_DISABLE_MEMO || (res = (0, import_react2.memo)(res)), res.staticConfig = staticConfig;
4197
+ (process.env.TAMAGUI_FORCE_MEMO || staticConfig.memo) && (res = (0, import_react2.memo)(res)), res.staticConfig = staticConfig;
4198
4198
  function extendStyledConfig(extended) {
4199
4199
  return {
4200
4200
  ...staticConfig,
@@ -12040,110 +12040,108 @@ var require_Checkbox_native = __commonJS({
12040
12040
  defaultVariants: {
12041
12041
  unstyled: !1
12042
12042
  }
12043
- }), [createCheckboxContext, createCheckboxScope] = (0, import_create_context.createContextScope)(CHECKBOX_NAME), [CheckboxProvider, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME), CheckboxComponent = CheckboxFrame.extractable(
12044
- React2.forwardRef(function(props, forwardedRef) {
12045
- let {
12046
- __scopeCheckbox,
12047
- labelledBy: ariaLabelledby,
12043
+ }), [createCheckboxContext, createCheckboxScope] = (0, import_create_context.createContextScope)(CHECKBOX_NAME), [CheckboxProvider, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME), CheckboxComponent = CheckboxFrame.styleable(function(props, forwardedRef) {
12044
+ let {
12045
+ __scopeCheckbox,
12046
+ labelledBy: ariaLabelledby,
12047
+ name,
12048
+ checked: checkedProp,
12049
+ defaultChecked,
12050
+ required,
12051
+ scaleSize = 0.45,
12052
+ sizeAdjust = 0,
12053
+ disabled,
12054
+ value = "on",
12055
+ onCheckedChange,
12056
+ native,
12057
+ scaleIcon,
12058
+ ...checkboxProps
12059
+ } = props, [button, setButton] = React2.useState(null), composedRefs = (0, import_core13.useComposedRefs)(forwardedRef, (node) => setButton(node)), hasConsumerStoppedPropagationRef = React2.useRef(!1), propsActive = (0, import_core13.useProps)(props), isFormControl = import_core13.isWeb ? button ? !!button.closest("form") : !0 : !1, [checked = !1, setChecked] = (0, import_use_controllable_state.useControllableState)({
12060
+ prop: checkedProp,
12061
+ defaultProp: defaultChecked,
12062
+ onChange: onCheckedChange
12063
+ }), styledContext = React2.useContext(CheckboxStyledContext), adjustedSize = (0, import_core13.getVariableValue)(
12064
+ (0, import_get_token2.getSize)(propsActive.size ?? (styledContext == null ? void 0 : styledContext.size) ?? "$true", {
12065
+ shift: sizeAdjust
12066
+ })
12067
+ ), size2 = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
12068
+ return React2.useEffect(() => {
12069
+ if (props.id && !disabled)
12070
+ return (0, import_focusable2.registerFocusable)(props.id, {
12071
+ focusAndSelect: () => {
12072
+ setChecked((x) => !x);
12073
+ },
12074
+ focus: () => {
12075
+ }
12076
+ });
12077
+ }, [props.id, setChecked, disabled]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CheckboxProvider, { scope: __scopeCheckbox, state: checked, disabled, children: import_core13.isWeb && native ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
12078
+ BubbleInput,
12079
+ {
12080
+ control: button,
12081
+ bubbles: !hasConsumerStoppedPropagationRef.current,
12048
12082
  name,
12049
- checked: checkedProp,
12050
- defaultChecked,
12083
+ value,
12084
+ checked,
12051
12085
  required,
12052
- scaleSize = 0.45,
12053
- sizeAdjust = 0,
12054
12086
  disabled,
12055
- value = "on",
12056
- onCheckedChange,
12057
- native,
12058
- scaleIcon,
12059
- ...checkboxProps
12060
- } = props, [button, setButton] = React2.useState(null), composedRefs = (0, import_core13.useComposedRefs)(forwardedRef, (node) => setButton(node)), hasConsumerStoppedPropagationRef = React2.useRef(!1), propsActive = (0, import_core13.useProps)(props), isFormControl = import_core13.isWeb ? button ? !!button.closest("form") : !0 : !1, [checked = !1, setChecked] = (0, import_use_controllable_state.useControllableState)({
12061
- prop: checkedProp,
12062
- defaultProp: defaultChecked,
12063
- onChange: onCheckedChange
12064
- }), styledContext = React2.useContext(CheckboxStyledContext), adjustedSize = (0, import_core13.getVariableValue)(
12065
- (0, import_get_token2.getSize)(propsActive.size ?? (styledContext == null ? void 0 : styledContext.size) ?? "$true", {
12066
- shift: sizeAdjust
12067
- })
12068
- ), size2 = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
12069
- return React2.useEffect(() => {
12070
- if (props.id && !disabled)
12071
- return (0, import_focusable2.registerFocusable)(props.id, {
12072
- focusAndSelect: () => {
12073
- setChecked((x) => !x);
12074
- },
12075
- focus: () => {
12087
+ id: props.id
12088
+ }
12089
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
12090
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
12091
+ CheckboxFrame,
12092
+ {
12093
+ width: size2,
12094
+ height: size2,
12095
+ tag: "button",
12096
+ role: "checkbox",
12097
+ "aria-labelledby": labelledBy,
12098
+ "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
12099
+ "aria-required": required,
12100
+ "data-state": getState(checked),
12101
+ "data-disabled": disabled ? "" : void 0,
12102
+ disabled,
12103
+ ...checkboxProps,
12104
+ ref: composedRefs,
12105
+ ...import_core13.isWeb && {
12106
+ type: "button",
12107
+ value,
12108
+ onKeyDown: (0, import_core13.composeEventHandlers)(
12109
+ props.onKeyDown,
12110
+ (event) => {
12111
+ event.key === "Enter" && event.preventDefault();
12112
+ }
12113
+ )
12114
+ },
12115
+ onPress: (0, import_core13.composeEventHandlers)(props.onPress, (event) => {
12116
+ setChecked(
12117
+ (prevChecked) => isIndeterminate(prevChecked) ? !0 : !prevChecked
12118
+ ), isFormControl && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
12119
+ }),
12120
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
12121
+ CheckboxStyledContext.Provider,
12122
+ {
12123
+ size: propsActive.size ?? (styledContext == null ? void 0 : styledContext.size) ?? "$true",
12124
+ scaleIcon: scaleIcon ?? (styledContext == null ? void 0 : styledContext.scaleIcon) ?? 1,
12125
+ children: propsActive.children
12076
12126
  }
12077
- });
12078
- }, [props.id, setChecked, disabled]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CheckboxProvider, { scope: __scopeCheckbox, state: checked, disabled, children: import_core13.isWeb && native ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
12127
+ )
12128
+ }
12129
+ ),
12130
+ import_core13.isWeb && isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
12079
12131
  BubbleInput,
12080
12132
  {
12133
+ isHidden: !0,
12081
12134
  control: button,
12082
12135
  bubbles: !hasConsumerStoppedPropagationRef.current,
12083
12136
  name,
12084
12137
  value,
12085
12138
  checked,
12086
12139
  required,
12087
- disabled,
12088
- id: props.id
12140
+ disabled
12089
12141
  }
12090
- ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
12091
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
12092
- CheckboxFrame,
12093
- {
12094
- width: size2,
12095
- height: size2,
12096
- tag: "button",
12097
- role: "checkbox",
12098
- "aria-labelledby": labelledBy,
12099
- "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
12100
- "aria-required": required,
12101
- "data-state": getState(checked),
12102
- "data-disabled": disabled ? "" : void 0,
12103
- disabled,
12104
- ...checkboxProps,
12105
- ref: composedRefs,
12106
- ...import_core13.isWeb && {
12107
- type: "button",
12108
- value,
12109
- onKeyDown: (0, import_core13.composeEventHandlers)(
12110
- props.onKeyDown,
12111
- (event) => {
12112
- event.key === "Enter" && event.preventDefault();
12113
- }
12114
- )
12115
- },
12116
- onPress: (0, import_core13.composeEventHandlers)(props.onPress, (event) => {
12117
- setChecked(
12118
- (prevChecked) => isIndeterminate(prevChecked) ? !0 : !prevChecked
12119
- ), isFormControl && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
12120
- }),
12121
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
12122
- CheckboxStyledContext.Provider,
12123
- {
12124
- size: propsActive.size ?? (styledContext == null ? void 0 : styledContext.size) ?? "$true",
12125
- scaleIcon: scaleIcon ?? (styledContext == null ? void 0 : styledContext.scaleIcon) ?? 1,
12126
- children: propsActive.children
12127
- }
12128
- )
12129
- }
12130
- ),
12131
- import_core13.isWeb && isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
12132
- BubbleInput,
12133
- {
12134
- isHidden: !0,
12135
- control: button,
12136
- bubbles: !hasConsumerStoppedPropagationRef.current,
12137
- name,
12138
- value,
12139
- checked,
12140
- required,
12141
- disabled
12142
- }
12143
- ) : null
12144
- ] }) });
12145
- })
12146
- ), Checkbox2 = (0, import_core13.withStaticProperties)(CheckboxComponent, {
12142
+ ) : null
12143
+ ] }) });
12144
+ }), Checkbox2 = (0, import_core13.withStaticProperties)(CheckboxComponent, {
12147
12145
  Indicator: CheckboxIndicator,
12148
12146
  Props: CheckboxStyledContext.Provider
12149
12147
  });
@@ -16370,21 +16368,17 @@ var require_SliderImpl_native = __commonJS({
16370
16368
  mod
16371
16369
  )), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), SliderImpl_exports = {};
16372
16370
  __export2(SliderImpl_exports, {
16373
- DirectionalYStack: () => DirectionalYStack2,
16374
16371
  SliderFrame: () => SliderFrame2,
16375
16372
  SliderImpl: () => SliderImpl
16376
16373
  });
16377
16374
  module2.exports = __toCommonJS2(SliderImpl_exports);
16378
- var import_core13 = require_index_native15(), import_get_token2 = require_index_native17(), import_stacks3 = require_index_native19(), React2 = __toESM2(require("react")), import_constants = require_constants_native5(), import_jsx_runtime6 = require("react/jsx-runtime"), DirectionalYStack2 = (0, import_core13.styled)(import_stacks3.YStack, {
16375
+ var import_core13 = require_index_native15(), import_get_token2 = require_index_native17(), import_stacks3 = require_index_native19(), React2 = __toESM2(require("react")), import_constants = require_constants_native5(), import_jsx_runtime6 = require("react/jsx-runtime"), SliderFrame2 = (0, import_core13.styled)(import_stacks3.YStack, {
16376
+ position: "relative",
16379
16377
  variants: {
16380
16378
  orientation: {
16381
16379
  horizontal: {},
16382
16380
  vertical: {}
16383
- }
16384
- }
16385
- }), SliderFrame2 = (0, import_core13.styled)(DirectionalYStack2, {
16386
- position: "relative",
16387
- variants: {
16381
+ },
16388
16382
  size: (val, extras) => {
16389
16383
  if (!val)
16390
16384
  return;
@@ -16885,7 +16879,6 @@ var require_index_native60 = __commonJS({
16885
16879
  return to;
16886
16880
  }, __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default")), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), src_exports2 = {};
16887
16881
  __export2(src_exports2, {
16888
- DirectionalYStack: () => import_SliderImpl.DirectionalYStack,
16889
16882
  SliderFrame: () => import_SliderImpl.SliderFrame
16890
16883
  });
16891
16884
  module2.exports = __toCommonJS2(src_exports2);
@@ -17479,31 +17472,27 @@ var require_Tabs_native = __commonJS({
17479
17472
  TabsTrigger.displayName = TRIGGER_NAME;
17480
17473
  var CONTENT_NAME = "TabsContent", TabsContentFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
17481
17474
  name: CONTENT_NAME
17482
- }), TabsContent = TabsContentFrame.extractable(
17483
- React2.forwardRef(
17484
- (props, forwardedRef) => {
17485
- let { __scopeTabs, value, forceMount, children, ...contentProps } = props, context = useTabsContext(__scopeTabs), isSelected = value === context.value, show = forceMount || isSelected, triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value);
17486
- return show ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
17487
- TabsContentFrame,
17488
- {
17489
- "data-state": isSelected ? "active" : "inactive",
17490
- "data-orientation": context.orientation,
17491
- role: "tabpanel",
17492
- "aria-labelledby": triggerId,
17493
- hidden: !show,
17494
- id: contentId,
17495
- tabIndex: 0,
17496
- ...contentProps,
17497
- ref: forwardedRef,
17498
- children
17499
- },
17500
- value
17501
- ) : null;
17502
- }
17503
- )
17504
- );
17505
- TabsContent.displayName = CONTENT_NAME;
17506
- var TABS_NAME = "Tabs", { Provider: TabsProvider, useStyledContext: useTabsContext } = (0, import_web.createStyledContext)(), TabsFrame = (0, import_web.styled)(import_stacks3.SizableStack, {
17475
+ }), TabsContent = TabsContentFrame.styleable(
17476
+ function(props, forwardedRef) {
17477
+ let { __scopeTabs, value, forceMount, children, ...contentProps } = props, context = useTabsContext(__scopeTabs), isSelected = value === context.value, show = forceMount || isSelected, triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value);
17478
+ return show ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
17479
+ TabsContentFrame,
17480
+ {
17481
+ "data-state": isSelected ? "active" : "inactive",
17482
+ "data-orientation": context.orientation,
17483
+ role: "tabpanel",
17484
+ "aria-labelledby": triggerId,
17485
+ hidden: !show,
17486
+ id: contentId,
17487
+ tabIndex: 0,
17488
+ ...contentProps,
17489
+ ref: forwardedRef,
17490
+ children
17491
+ },
17492
+ value
17493
+ ) : null;
17494
+ }
17495
+ ), TABS_NAME = "Tabs", { Provider: TabsProvider, useStyledContext: useTabsContext } = (0, import_web.createStyledContext)(), TabsFrame = (0, import_web.styled)(import_stacks3.SizableStack, {
17507
17496
  name: TABS_NAME
17508
17497
  }), Tabs = (0, import_web.withStaticProperties)(
17509
17498
  TabsFrame.extractable(