@tamagui/button 3.0.0-beta.669.1 → 3.0.0-beta.728.1

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.
@@ -1,4 +1,3 @@
1
-
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.native.js","names":[],"sources":["cjs/Button.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Button_exports = {};\n__export(Button_exports, {\n Button: () => Button2,\n ButtonContext: () => ButtonContext,\n ButtonFrame: () => ButtonFrame,\n ButtonIcon: () => ButtonIcon,\n ButtonText: () => ButtonText,\n useButton: () => useButton\n});\nmodule.exports = __toCommonJS(Button_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_helpers_tamagui = require(\"@tamagui/helpers-tamagui\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar import_web = require(\"@tamagui/web\");\nvar import_react = require(\"react\");\nvar buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nvar ButtonContext = (0, import_web.createStyledContext)({\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n}, {\n keys: buttonContextKeys\n});\nvar ButtonFrame = (0, import_web.styled)(import_web.View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", {\n type: \"button\"\n }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar ButtonText = (0, import_web.styled)(import_web.Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nvar ButtonIcon = function(param) {\n var { children, color, scaleIcon = 1, size } = param;\n var styledContext = ButtonContext.useStyledContext();\n var iconColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nvar buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn) {\n var { Text: _$Text = ButtonText, iconColor: iconColorOption, iconSize: iconSizeOption, textProps: textPropsOption } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext);\n var styledContext = ButtonContext.useStyledContext();\n var processedProps = (0, import_web.useProps)(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n var { children, color, disabled, ellipsis, fontFamily, fontSize, fontStyle, fontWeight, icon, iconAfter, iconSize, letterSpacing, maxFontSizeMultiplier, noTextWrap, render, scaleIcon = 1, textAlign, textProps } = processedProps;\n var frameProps = {\n ...propsIn\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = buttonInternalPropNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n delete frameProps[key];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var contextColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var iconColor = iconColorOption !== null && iconColorOption !== void 0 ? iconColorOption : contextColor;\n var resolvedIconSize = iconSize !== null && iconSize !== void 0 ? iconSize : iconSizeOption;\n var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n var [themedIcon, themedIconAfter] = [\n icon,\n iconAfter\n ].map(function(item) {\n return item ? getThemedIcon(item) : null;\n });\n var textContext = {\n color: contextColor,\n ellipsis: ellipsis !== null && ellipsis !== void 0 ? ellipsis : styledContext === null || styledContext === void 0 ? void 0 : styledContext.ellipsis,\n fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontFamily,\n fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontSize,\n fontStyle: fontStyle !== null && fontStyle !== void 0 ? fontStyle : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontStyle,\n fontWeight: fontWeight !== null && fontWeight !== void 0 ? fontWeight : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontWeight,\n letterSpacing: letterSpacing !== null && letterSpacing !== void 0 ? letterSpacing : styledContext === null || styledContext === void 0 ? void 0 : styledContext.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier !== null && maxFontSizeMultiplier !== void 0 ? maxFontSizeMultiplier : styledContext === null || styledContext === void 0 ? void 0 : styledContext.maxFontSizeMultiplier,\n textAlign: textAlign !== null && textAlign !== void 0 ? textAlign : styledContext === null || styledContext === void 0 ? void 0 : styledContext.textAlign\n };\n var wrappedChildren = (0, import_text.wrapChildrenInText)(_$Text, {\n children,\n ...textContext,\n noTextWrap,\n textProps\n }, {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : {\n size: processedProps.size\n }\n });\n var resolvedRender = render !== null && render !== void 0 ? render : isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", {\n type: \"button\",\n disabled: true\n }) : void 0;\n var props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : {\n render: resolvedRender\n },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {\n value: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ButtonContext.Provider, {\n ...textContext,\n children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ]\n })\n })\n };\n return {\n isNested,\n props\n };\n}\nvar ButtonComponent = (0, import_web.createStyledHOC)(ButtonFrame, function Button(props, ref) {\n var { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonFrame, {\n ref,\n ...buttonProps\n });\n});\nvar Button2 = (0, import_web.withStaticProperties)(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,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K;EAChB;EACA,UAA0B,iBAAC,GAAG,mBAAmB,KAAK,cAAc,qBAAqB,UAAU;GACjG,OAAO;GACP,UAA0B,iBAAC,GAAG,mBAAmB,MAAM,cAAc,UAAU;IAC7E,GAAG;IACH,UAAU;KACR;KACA;KACA;IACF;GACF,CAAC;EACH,CAAC;CACH;CACA,OAAO;EACL;EACA;CACF;AACF;AACA,IAAI,mBAAmB,GAAG,WAAW,iBAAiB,aAAa,SAAS,OAAO,OAAO,KAAK;CAC7F,IAAI,EAAE,OAAO,gBAAgB,UAAU,KAAK;CAC5C,OAAuB,iBAAC,GAAG,mBAAmB,KAAK,aAAa;EAC9D;EACA,GAAG;CACL,CAAC;AACH,CAAC;AACD,IAAI,WAAW,GAAG,WAAW,sBAAsB,iBAAiB;CAClE,OAAO,cAAc;CACrB,OAAO;CACP,MAAM;CACN,MAAM;AACR,CAAC"}
1
+ {"version":3,"file":"Button.native.js","names":[],"sources":["cjs/Button.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Button_exports = {};\n__export(Button_exports, {\n Button: () => Button2,\n ButtonContext: () => ButtonContext,\n ButtonFrame: () => ButtonFrame,\n ButtonIcon: () => ButtonIcon,\n ButtonText: () => ButtonText,\n useButton: () => useButton\n});\nmodule.exports = __toCommonJS(Button_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_helpers_tamagui = require(\"@tamagui/helpers-tamagui\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar import_web = require(\"@tamagui/web\");\nvar import_react = require(\"react\");\nvar buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nvar ButtonContext = (0, import_web.createStyledContext)({\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n}, {\n keys: buttonContextKeys\n});\nvar ButtonFrame = (0, import_web.styled)(import_web.View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", {\n type: \"button\"\n }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar ButtonText = (0, import_web.styled)(import_web.Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nvar ButtonIcon = function(param) {\n var { children, color, scaleIcon = 1, size } = param;\n var styledContext = ButtonContext.useStyledContext();\n var iconColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nvar buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn) {\n var { Text: _$Text = ButtonText, iconColor: iconColorOption, iconSize: iconSizeOption, textProps: textPropsOption } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext);\n var styledContext = ButtonContext.useStyledContext();\n var processedProps = (0, import_web.useProps)(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n var { children, color, disabled, ellipsis, fontFamily, fontSize, fontStyle, fontWeight, icon, iconAfter, iconSize, letterSpacing, maxFontSizeMultiplier, noTextWrap, render, scaleIcon = 1, textAlign, textProps } = processedProps;\n var frameProps = {\n ...propsIn\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = buttonInternalPropNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n delete frameProps[key];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var contextColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var iconColor = iconColorOption !== null && iconColorOption !== void 0 ? iconColorOption : contextColor;\n var resolvedIconSize = iconSize !== null && iconSize !== void 0 ? iconSize : iconSizeOption;\n var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n var [themedIcon, themedIconAfter] = [\n icon,\n iconAfter\n ].map(function(item) {\n return item ? getThemedIcon(item) : null;\n });\n var textContext = {\n color: contextColor,\n ellipsis: ellipsis !== null && ellipsis !== void 0 ? ellipsis : styledContext === null || styledContext === void 0 ? void 0 : styledContext.ellipsis,\n fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontFamily,\n fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontSize,\n fontStyle: fontStyle !== null && fontStyle !== void 0 ? fontStyle : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontStyle,\n fontWeight: fontWeight !== null && fontWeight !== void 0 ? fontWeight : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontWeight,\n letterSpacing: letterSpacing !== null && letterSpacing !== void 0 ? letterSpacing : styledContext === null || styledContext === void 0 ? void 0 : styledContext.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier !== null && maxFontSizeMultiplier !== void 0 ? maxFontSizeMultiplier : styledContext === null || styledContext === void 0 ? void 0 : styledContext.maxFontSizeMultiplier,\n textAlign: textAlign !== null && textAlign !== void 0 ? textAlign : styledContext === null || styledContext === void 0 ? void 0 : styledContext.textAlign\n };\n var wrappedChildren = (0, import_text.wrapChildrenInText)(_$Text, {\n children,\n ...textContext,\n noTextWrap,\n textProps\n }, {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : {\n size: processedProps.size\n }\n });\n var resolvedRender = render !== null && render !== void 0 ? render : isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", {\n type: \"button\",\n disabled: true\n }) : void 0;\n var props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : {\n render: resolvedRender\n },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {\n value: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ButtonContext.Provider, {\n ...textContext,\n children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ]\n })\n })\n };\n return {\n isNested,\n props\n };\n}\nvar ButtonComponent = (0, import_web.createStyledHOC)(ButtonFrame, function Button(props, ref) {\n var { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonFrame, {\n ref,\n ...buttonProps\n });\n});\nvar Button2 = (0, import_web.withStaticProperties)(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAA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AAK;GAClB,SAAS,KAAK;GACd,WAAW,KAAK;GAChB,SAAS,KAAK;EAChB;EACA,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,cAAc,qBAAqB,UAAU;GACjG,OAAO;GACP,UAA0B,iBAAC,GAAG,mBAAmB,KAAI,CAAE,cAAc,UAAU;IAC7E,GAAG;IACH,UAAU;KACR;KACA;KACA;IACF;GACF,CAAC;EACH,CAAC;CACH;CACA,OAAO;EACL;EACA;CACF;AACF;AACA,IAAI,mBAAmB,GAAG,WAAW,gBAAe,CAAE,aAAa,SAAS,OAAO,OAAO,KAAK;CAC7F,IAAI,EAAE,OAAO,gBAAgB,UAAU,KAAK;CAC5C,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa;EAC9D;EACA,GAAG;CACL,CAAC;AACH,CAAC;AACD,IAAI,WAAW,GAAG,WAAW,qBAAoB,CAAE,iBAAiB;CAClE,OAAO,cAAc;CACrB,OAAO;CACP,MAAM;CACN,MAAM;AACR,CAAC"}
@@ -1,4 +1,3 @@
1
-
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Button\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,oBAAU,GAAG,OAAO,OAAO"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Button\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,oBAAU,GAAG,OAAO,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":[],"sources":["esm/Button.js"],"sourcesContent":["import { useGetThemedIcon } from \"@tamagui/helpers-tamagui\";\nimport { ButtonNestingContext } from \"@tamagui/stacks\";\nimport { wrapChildrenInText } from \"@tamagui/text\";\nimport {\n createStyledContext,\n createStyledHOC,\n styled,\n Text,\n useProps,\n View,\n withStaticProperties\n} from \"@tamagui/web\";\nimport { useContext } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nconst buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nconst ButtonContext = createStyledContext(\n {\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n },\n {\n keys: buttonContextKeys\n }\n);\nconst ButtonFrame = styled(View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ jsx(\"button\", { type: \"button\" }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nconst ButtonText = styled(Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nconst ButtonIcon = ({ children, color, scaleIcon = 1, size }) => {\n const styledContext = ButtonContext.useStyledContext();\n const iconColor = color ?? styledContext?.color;\n const getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nconst buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn, {\n Text: Text2 = ButtonText,\n iconColor: iconColorOption,\n iconSize: iconSizeOption,\n textProps: textPropsOption\n} = {}) {\n const isNested = useContext(ButtonNestingContext);\n const styledContext = ButtonContext.useStyledContext();\n const processedProps = useProps(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n const {\n children,\n color,\n disabled,\n ellipsis,\n fontFamily,\n fontSize,\n fontStyle,\n fontWeight,\n icon,\n iconAfter,\n iconSize,\n letterSpacing,\n maxFontSizeMultiplier,\n noTextWrap,\n render,\n scaleIcon = 1,\n textAlign,\n textProps\n } = processedProps;\n const frameProps = { ...propsIn };\n for (const key of buttonInternalPropNames) {\n delete frameProps[key];\n }\n const contextColor = color ?? styledContext?.color;\n const iconColor = iconColorOption ?? contextColor;\n const resolvedIconSize = iconSize ?? iconSizeOption;\n const getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map((item) => {\n return item ? getThemedIcon(item) : null;\n });\n const textContext = {\n color: contextColor,\n ellipsis: ellipsis ?? styledContext?.ellipsis,\n fontFamily: fontFamily ?? styledContext?.fontFamily,\n fontSize: fontSize ?? styledContext?.fontSize,\n fontStyle: fontStyle ?? styledContext?.fontStyle,\n fontWeight: fontWeight ?? styledContext?.fontWeight,\n letterSpacing: letterSpacing ?? styledContext?.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier ?? styledContext?.maxFontSizeMultiplier,\n textAlign: textAlign ?? styledContext?.textAlign\n };\n const wrappedChildren = wrapChildrenInText(\n Text2,\n {\n children,\n ...textContext,\n noTextWrap,\n textProps\n },\n {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : { size: processedProps.size }\n }\n );\n const resolvedRender = render ?? (isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ jsx(\"button\", { type: \"button\", disabled: true }) : void 0);\n const props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : { render: resolvedRender },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ jsx(ButtonNestingContext.Provider, { value: true, children: /* @__PURE__ */ jsxs(ButtonContext.Provider, { ...textContext, children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ] }) })\n };\n return {\n isNested,\n props\n };\n}\nconst ButtonComponent = createStyledHOC(\n ButtonFrame,\n function Button(props, ref) {\n const { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ jsx(ButtonFrame, { ref, ...buttonProps });\n }\n);\nconst Button2 = withStaticProperties(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\nexport {\n Button2 as Button,\n ButtonContext,\n ButtonFrame,\n ButtonIcon,\n ButtonText,\n useButton\n};\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;;;;;;AAcA,MAAM,oBAAoB;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,gBAAgB,oBACpB;CACE,OAAO,KAAK;CACZ,UAAU,KAAK;CACf,YAAY,KAAK;CACjB,UAAU,KAAK;CACf,WAAW,KAAK;CAChB,YAAY,KAAK;CACjB,eAAe,KAAK;CACpB,uBAAuB,KAAK;CAC5B,WAAW,KAAK;AAClB,GACA,EACE,MAAM,kBACR,CACF;AACA,MAAM,cAAc,OAAO,MAAM;CAC/B,SAAS;CACT,aAAa;CACb,MAAM;CACN,QAAwB,oBAAI,UAAU,EAAE,MAAM,SAAS,CAAC;CACxD,UAAU;CACV,YAAY;CACZ,eAAe;CACf,UAAU;CACV,gBAAgB;CAChB,UAAU,EACR,UAAU,EACR,MAAM,EACJ,eAAe,OACjB,EACF,EACF;AACF,CAAC;AACD,MAAM,aAAa,OAAO,MAAM;CAC9B,SAAS;CACT,aAAa;CAEb,UAAU;CACV,YAAY;AACd,CAAC;AACD,MAAM,cAAc,EAAE,UAAU,OAAO,YAAY,GAAG,WAAW;CAC/D,MAAM,gBAAgB,cAAc,iBAAiB;CACrD,MAAM,YAAY,SAAS,eAAe;CAC1C,MAAM,gBAAgB,iBAAiB;EACrC,OAAO,cAAc,WAAW,OAAO,cAAc,WAAW,KAAK,IAAI;EACzE,MAAM,SAAS,KAAK,IAAI,KAAK,IAAI,OAAO;CAC1C,CAAC;CACD,OAAO,cAAc,QAAQ;AAC/B;AACA,MAAM,0BAA0B;CAC9B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,SAAS,UAAU,SAAS,EAC1B,MAAM,QAAQ,YACd,WAAW,iBACX,UAAU,gBACV,WAAW,oBACT,CAAC,GAAG;CACN,MAAM,WAAW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,GAAG;EACH,GAAG,YAAY;GACb,iBAAiB;GACjB,UAAU;GACV,UAAU,CAAC;EACb;EACA,GAAG,mBAAmB,KAAK,IAAI,OAAO,EAAE,QAAQ,eAAe;EAC/D,GAAG,YAAY;GAMb,MAAM;GACN,UAAU,CAAC;GACX,iBAAiB,KAAK;GACtB,UAAU,KAAK;GACf,SAAS,KAAK;GACd,WAAW,KAAK;GAChB,YAAY,KAAK;GACjB,aAAa,KAAK;GAClB,SAAS,KAAK;GACd,WAAW,KAAK;GAChB,SAAS,KAAK;EAChB;EACA,UAA0B,oBAAI,qBAAqB,UAAU;GAAE,OAAO;GAAM,UAA0B,qBAAK,cAAc,UAAU;IAAE,GAAG;IAAa,UAAU;KAC7J;KACA;KACA;IACF;GAAE,CAAC;EAAE,CAAC;CACR;CACA,OAAO;EACL;EACA;CACF;AACF;AACA,MAAM,kBAAkB,gBACtB,aACA,SAAS,OAAO,OAAO,KAAK;CAC1B,MAAM,EAAE,OAAO,gBAAgB,UAAU,KAAK;CAC9C,OAAuB,oBAAI,aAAa;EAAE;EAAK,GAAG;CAAY,CAAC;AACjE,CACF;AACA,MAAM,UAAU,qBAAqB,iBAAiB;CACpD,OAAO,cAAc;CACrB,OAAO;CACP,MAAM;CACN,MAAM;AACR,CAAC"}
1
+ {"version":3,"file":"Button.js","names":[],"sources":["esm/Button.js"],"sourcesContent":["import { useGetThemedIcon } from \"@tamagui/helpers-tamagui\";\nimport { ButtonNestingContext } from \"@tamagui/stacks\";\nimport { wrapChildrenInText } from \"@tamagui/text\";\nimport {\n createStyledContext,\n createStyledHOC,\n styled,\n Text,\n useProps,\n View,\n withStaticProperties\n} from \"@tamagui/web\";\nimport { useContext } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nconst buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nconst ButtonContext = createStyledContext(\n {\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n },\n {\n keys: buttonContextKeys\n }\n);\nconst ButtonFrame = styled(View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ jsx(\"button\", { type: \"button\" }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nconst ButtonText = styled(Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nconst ButtonIcon = ({ children, color, scaleIcon = 1, size }) => {\n const styledContext = ButtonContext.useStyledContext();\n const iconColor = color ?? styledContext?.color;\n const getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nconst buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn, {\n Text: Text2 = ButtonText,\n iconColor: iconColorOption,\n iconSize: iconSizeOption,\n textProps: textPropsOption\n} = {}) {\n const isNested = useContext(ButtonNestingContext);\n const styledContext = ButtonContext.useStyledContext();\n const processedProps = useProps(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n const {\n children,\n color,\n disabled,\n ellipsis,\n fontFamily,\n fontSize,\n fontStyle,\n fontWeight,\n icon,\n iconAfter,\n iconSize,\n letterSpacing,\n maxFontSizeMultiplier,\n noTextWrap,\n render,\n scaleIcon = 1,\n textAlign,\n textProps\n } = processedProps;\n const frameProps = { ...propsIn };\n for (const key of buttonInternalPropNames) {\n delete frameProps[key];\n }\n const contextColor = color ?? styledContext?.color;\n const iconColor = iconColorOption ?? contextColor;\n const resolvedIconSize = iconSize ?? iconSizeOption;\n const getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map((item) => {\n return item ? getThemedIcon(item) : null;\n });\n const textContext = {\n color: contextColor,\n ellipsis: ellipsis ?? styledContext?.ellipsis,\n fontFamily: fontFamily ?? styledContext?.fontFamily,\n fontSize: fontSize ?? styledContext?.fontSize,\n fontStyle: fontStyle ?? styledContext?.fontStyle,\n fontWeight: fontWeight ?? styledContext?.fontWeight,\n letterSpacing: letterSpacing ?? styledContext?.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier ?? styledContext?.maxFontSizeMultiplier,\n textAlign: textAlign ?? styledContext?.textAlign\n };\n const wrappedChildren = wrapChildrenInText(\n Text2,\n {\n children,\n ...textContext,\n noTextWrap,\n textProps\n },\n {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : { size: processedProps.size }\n }\n );\n const resolvedRender = render ?? (isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ jsx(\"button\", { type: \"button\", disabled: true }) : void 0);\n const props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : { render: resolvedRender },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ jsx(ButtonNestingContext.Provider, { value: true, children: /* @__PURE__ */ jsxs(ButtonContext.Provider, { ...textContext, children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ] }) })\n };\n return {\n isNested,\n props\n };\n}\nconst ButtonComponent = createStyledHOC(\n ButtonFrame,\n function Button(props, ref) {\n const { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ jsx(ButtonFrame, { ref, ...buttonProps });\n }\n);\nconst Button2 = withStaticProperties(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\nexport {\n Button2 as Button,\n ButtonContext,\n ButtonFrame,\n ButtonIcon,\n ButtonText,\n useButton\n};\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;;;;;;AAcA,MAAM,oBAAoB;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,gBAAgB,oBACpB;CACE,OAAO,KAAK;CACZ,UAAU,KAAK;CACf,YAAY,KAAK;CACjB,UAAU,KAAK;CACf,WAAW,KAAK;CAChB,YAAY,KAAK;CACjB,eAAe,KAAK;CACpB,uBAAuB,KAAK;CAC5B,WAAW,KAAK;AAClB,GACA,EACE,MAAM,kBACR,CACF;AACA,MAAM,cAAc,OAAO,MAAM;CAC/B,SAAS;CACT,aAAa;CACb,MAAM;CACN,QAAwB,oBAAI,UAAU,EAAE,MAAM,SAAS,CAAC;CACxD,UAAU;CACV,YAAY;CACZ,eAAe;CACf,UAAU;CACV,gBAAgB;CAChB,UAAU,EACR,UAAU,EACR,MA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AAK;CAC1B,MAAM,EAAE,OAAO,gBAAgB,UAAU,KAAK;CAC9C,OAAuB,oBAAI,aAAa;EAAE;EAAK,GAAG;CAAY,CAAC;AACjE,CACF;AACA,MAAM,UAAU,qBAAqB,iBAAiB;CACpD,OAAO,cAAc;CACrB,OAAO;CACP,MAAM;CACN,MAAM;AACR,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.native.js","names":[],"sources":["esm/Button.native.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useGetThemedIcon } from \"@tamagui/helpers-tamagui\";\nimport { ButtonNestingContext } from \"@tamagui/stacks\";\nimport { wrapChildrenInText } from \"@tamagui/text\";\nimport { createStyledContext, createStyledHOC, styled, Text, useProps, View, withStaticProperties } from \"@tamagui/web\";\nimport { useContext } from \"react\";\nvar buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nvar ButtonContext = createStyledContext({\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n}, {\n keys: buttonContextKeys\n});\nvar ButtonFrame = styled(View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ _jsx(\"button\", {\n type: \"button\"\n }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar ButtonText = styled(Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nvar ButtonIcon = function(param) {\n var { children, color, scaleIcon = 1, size } = param;\n var styledContext = ButtonContext.useStyledContext();\n var iconColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nvar buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn) {\n var { Text: _$Text = ButtonText, iconColor: iconColorOption, iconSize: iconSizeOption, textProps: textPropsOption } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var isNested = useContext(ButtonNestingContext);\n var styledContext = ButtonContext.useStyledContext();\n var processedProps = useProps(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n var { children, color, disabled, ellipsis, fontFamily, fontSize, fontStyle, fontWeight, icon, iconAfter, iconSize, letterSpacing, maxFontSizeMultiplier, noTextWrap, render, scaleIcon = 1, textAlign, textProps } = processedProps;\n var frameProps = {\n ...propsIn\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = buttonInternalPropNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n delete frameProps[key];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var contextColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var iconColor = iconColorOption !== null && iconColorOption !== void 0 ? iconColorOption : contextColor;\n var resolvedIconSize = iconSize !== null && iconSize !== void 0 ? iconSize : iconSizeOption;\n var getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n var [themedIcon, themedIconAfter] = [\n icon,\n iconAfter\n ].map(function(item) {\n return item ? getThemedIcon(item) : null;\n });\n var textContext = {\n color: contextColor,\n ellipsis: ellipsis !== null && ellipsis !== void 0 ? ellipsis : styledContext === null || styledContext === void 0 ? void 0 : styledContext.ellipsis,\n fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontFamily,\n fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontSize,\n fontStyle: fontStyle !== null && fontStyle !== void 0 ? fontStyle : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontStyle,\n fontWeight: fontWeight !== null && fontWeight !== void 0 ? fontWeight : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontWeight,\n letterSpacing: letterSpacing !== null && letterSpacing !== void 0 ? letterSpacing : styledContext === null || styledContext === void 0 ? void 0 : styledContext.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier !== null && maxFontSizeMultiplier !== void 0 ? maxFontSizeMultiplier : styledContext === null || styledContext === void 0 ? void 0 : styledContext.maxFontSizeMultiplier,\n textAlign: textAlign !== null && textAlign !== void 0 ? textAlign : styledContext === null || styledContext === void 0 ? void 0 : styledContext.textAlign\n };\n var wrappedChildren = wrapChildrenInText(_$Text, {\n children,\n ...textContext,\n noTextWrap,\n textProps\n }, {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : {\n size: processedProps.size\n }\n });\n var resolvedRender = render !== null && render !== void 0 ? render : isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ _jsx(\"button\", {\n type: \"button\",\n disabled: true\n }) : void 0;\n var props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : {\n render: resolvedRender\n },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ _jsx(ButtonNestingContext.Provider, {\n value: true,\n children: /* @__PURE__ */ _jsxs(ButtonContext.Provider, {\n ...textContext,\n children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ]\n })\n })\n };\n return {\n isNested,\n props\n };\n}\nvar ButtonComponent = createStyledHOC(ButtonFrame, function Button(props, ref) {\n var { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ _jsx(ButtonFrame, {\n ref,\n ...buttonProps\n });\n});\nvar Button2 = withStaticProperties(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\nexport {\n Button2 as Button,\n ButtonContext,\n ButtonFrame,\n ButtonIcon,\n ButtonText,\n useButton\n};\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;;;;;;AAMA,IAAI,oBAAoB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,IAAI,gBAAgB,oBAAoB;CACtC,OAAO,KAAK;CACZ,UAAU,KAAK;CACf,YAAY,KAAK;CACjB,UAAU,KAAK;CACf,WAAW,KAAK;CA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O,EACpC,QAAQ,eACV;EACA,GAAG,YAAY;GAMb,MAAM;GACN,UAAU,CAAC;GACX,iBAAiB,KAAK;GACtB,UAAU,KAAK;GACf,SAAS,KAAK;GACd,WAAW,KAAK;GAChB,YAAY,KAAK;GACjB,aAAa,KAAK;GAClB,SAAS,KAAK;GACd,WAAW,KAAK;GAChB,SAAS,KAAK;EAChB;EACA,UAA0B,oBAAK,qBAAqB,UAAU;GAC5D,OAAO;GACP,UAA0B,qBAAM,cAAc,UAAU;IACtD,GAAG;IACH,UAAU;KACR;KACA;KACA;IACF;GACF,CAAC;EACH,CAAC;CACH;CACA,OAAO;EACL;EACA;CACF;AACF;AACA,IAAI,kBAAkB,gBAAgB,aAAa,SAAS,OAAO,OAAO,KAAK;CAC7E,IAAI,EAAE,OAAO,gBAAgB,UAAU,KAAK;CAC5C,OAAuB,oBAAK,aAAa;EACvC;EACA,GAAG;CACL,CAAC;AACH,CAAC;AACD,IAAI,UAAU,qBAAqB,iBAAiB;CAClD,OAAO,cAAc;CACrB,OAAO;CACP,MAAM;CACN,MAAM;AACR,CAAC"}
1
+ {"version":3,"file":"Button.native.js","names":[],"sources":["esm/Button.native.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { useGetThemedIcon } from \"@tamagui/helpers-tamagui\";\nimport { ButtonNestingContext } from \"@tamagui/stacks\";\nimport { wrapChildrenInText } from \"@tamagui/text\";\nimport { createStyledContext, createStyledHOC, styled, Text, useProps, View, withStaticProperties } from \"@tamagui/web\";\nimport { useContext } from \"react\";\nvar buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nvar ButtonContext = createStyledContext({\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n}, {\n keys: buttonContextKeys\n});\nvar ButtonFrame = styled(View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ _jsx(\"button\", {\n type: \"button\"\n }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar ButtonText = styled(Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nvar ButtonIcon = function(param) {\n var { children, color, scaleIcon = 1, size } = param;\n var styledContext = ButtonContext.useStyledContext();\n var iconColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nvar buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn) {\n var { Text: _$Text = ButtonText, iconColor: iconColorOption, iconSize: iconSizeOption, textProps: textPropsOption } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var isNested = useContext(ButtonNestingContext);\n var styledContext = ButtonContext.useStyledContext();\n var processedProps = useProps(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n var { children, color, disabled, ellipsis, fontFamily, fontSize, fontStyle, fontWeight, icon, iconAfter, iconSize, letterSpacing, maxFontSizeMultiplier, noTextWrap, render, scaleIcon = 1, textAlign, textProps } = processedProps;\n var frameProps = {\n ...propsIn\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = buttonInternalPropNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n delete frameProps[key];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var contextColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var iconColor = iconColorOption !== null && iconColorOption !== void 0 ? iconColorOption : contextColor;\n var resolvedIconSize = iconSize !== null && iconSize !== void 0 ? iconSize : iconSizeOption;\n var getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n var [themedIcon, themedIconAfter] = [\n icon,\n iconAfter\n ].map(function(item) {\n return item ? getThemedIcon(item) : null;\n });\n var textContext = {\n color: contextColor,\n ellipsis: ellipsis !== null && ellipsis !== void 0 ? ellipsis : styledContext === null || styledContext === void 0 ? void 0 : styledContext.ellipsis,\n fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontFamily,\n fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontSize,\n fontStyle: fontStyle !== null && fontStyle !== void 0 ? fontStyle : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontStyle,\n fontWeight: fontWeight !== null && fontWeight !== void 0 ? fontWeight : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontWeight,\n letterSpacing: letterSpacing !== null && letterSpacing !== void 0 ? letterSpacing : styledContext === null || styledContext === void 0 ? void 0 : styledContext.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier !== null && maxFontSizeMultiplier !== void 0 ? maxFontSizeMultiplier : styledContext === null || styledContext === void 0 ? void 0 : styledContext.maxFontSizeMultiplier,\n textAlign: textAlign !== null && textAlign !== void 0 ? textAlign : styledContext === null || styledContext === void 0 ? void 0 : styledContext.textAlign\n };\n var wrappedChildren = wrapChildrenInText(_$Text, {\n children,\n ...textContext,\n noTextWrap,\n textProps\n }, {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : {\n size: processedProps.size\n }\n });\n var resolvedRender = render !== null && render !== void 0 ? render : isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ _jsx(\"button\", {\n type: \"button\",\n disabled: true\n }) : void 0;\n var props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : {\n render: resolvedRender\n },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ _jsx(ButtonNestingContext.Provider, {\n value: true,\n children: /* @__PURE__ */ _jsxs(ButtonContext.Provider, {\n ...textContext,\n children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ]\n })\n })\n };\n return {\n isNested,\n props\n };\n}\nvar ButtonComponent = createStyledHOC(ButtonFrame, function Button(props, ref) {\n var { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ _jsx(ButtonFrame, {\n ref,\n ...buttonProps\n });\n});\nvar Button2 = withStaticProperties(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\nexport {\n Button2 as Button,\n ButtonContext,\n ButtonFrame,\n ButtonIcon,\n ButtonText,\n useButton\n};\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;;;;;;AAMA,IAAI,oBAAoB;CACtB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,IAAI,gBAAgB,oBAAoB;CACtC,OAAO,KAAK;CACZ,UAAU,KAAK;CACf,YAAY,KAAK;CACjB,UAAU,KAAK;CACf,WAAW,KAAK;CAChB,YAAY,KAAK;CACjB,eAAe,KAAK;CACpB,uBAAuB,KAAK;CAC5B,WAAW,KAAK;AAClB,GAAG,EACD,MAAM,kBACR,CAAC;AACD,IAAI,cAAc,OAAO,MAAM;CAC7B,SAAS;CACT,aAAa;CACb,MAAM;CACN,QAAwB,oBAAK,UAAU,EACrC,MAAM,SACR,CAAC;CACD,UAAU;CACV,YAAY;CACZ,eAAe;CACf,UAAU;CACV,gBAAgB;CAChB,UAAU,EACR,UAAU,EACR,MAAM,EACJ,eAAe,OACjB,EACF,EACF;AACF,CAAC;AACD,IAAI,aAAa,OAAO,MAAM;CAC5B,SAAS;CACT,aAAa;CAEb,UAAU;CACV,YAAY;AACd,CAAC;AACD,IAAI,aAAa,SAAS,OAAO;CAC/B,IAAI,EAAE,UAAU,OAAO,YAAY,GAAG,SAAS;CAC/C,IAAI,gBAAgB,cAAc,iBAAiB;CACnD,IAAI,YAAY,UAAU,QAAQ,UAAU,KAAK,IAAI,QAAQ,kBAAkB,QAAQ,kBAAkB,KAAK,IAAI,KAAK,IAAI,cAAc;CACzI,IAAI,gBAAgB,iBAAiB;EACnC,OAAO,cAAc,WAAW,OAAO,cAAc,WAAW,KAAK,IAAI;EACzE,MAAM,SAAS,KAAK,IAAI,KAAK,IAAI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,IAAI,kBAAkB,mBAAmB,QAAQ;EAC/C;EACA,GAAG;EACH;EACA;CACF,GAAG;EACD,GAAG;EACH,GAAG,eAAe,SAAS,KAAK,IAAI,OAAO,EACzC,MAAM,eAAe,KACvB;CACF,CAAC;CACD,IAAI,iBAAiB,WAAW,QAAQ,WAAW,KAAK,IAAI,SAAS,WAAW,SAAS,eAAe,sBAAsB,UAAU,eAAe,SAAS,SAAS,MAAM,WAA2B,oBAAK,UAAU;EACvN,MAAM;EACN,UAAU;CACZ,CAAC,IAAI,KAAK;CACV,IAAI,QAAQ;EACV,GAAG;EACH,GAAG,YAAY;GACb,iBAAiB;GACjB,UAAU;GACV,UAAU,CAAC;EACb;EACA,GAAG,mBAAmB,KAAK,IAAI,OAAO,EACpC,QAAQ,eACV;EACA,GAAG,YAAY;GAMb,MAAM;GACN,UAAU,CAAC;GACX,iBAAiB,KAAK;GACtB,UAAU,KAAK;GACf,SAAS,KAAK;GACd,WAAW,KAAK;GAChB,YAAY,KAAK;GACjB,aAAa,KAAK;GAClB,SAAS,KAAK;GACd,WAAW,KAAK;GAChB,SAAS,KAAK;EAChB;EACA,UAA0B,oBAAK,qBAAqB,UAAU;GAC5D,OAAO;GACP,UAA0B,qBAAM,cAAc,UAAU;IACtD,GAAG;IACH,UAAU;KACR;KACA;KACA;IACF;GACF,CAAC;EACH,CAAC;CACH;CACA,OAAO;EACL;EACA;CACF;AACF;AACA,IAAI,kBAAkB,gBAAgB,aAAa,SAAS,OAAO,OAAO,KAAK;CAC7E,IAAI,EAAE,OAAO,gBAAgB,UAAU,KAAK;CAC5C,OAAuB,oBAAK,aAAa;EACvC;EACA,GAAG;CACL,CAAC;AACH,CAAC;AACD,IAAI,UAAU,qBAAqB,iBAAiB;CAClD,OAAO,cAAc;CACrB,OAAO;CACP,MAAM;CACN,MAAM;AACR,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":[],"sources":["jsx/Button.js"],"sourcesContent":["import { useGetThemedIcon } from \"@tamagui/helpers-tamagui\";\nimport { ButtonNestingContext } from \"@tamagui/stacks\";\nimport { wrapChildrenInText } from \"@tamagui/text\";\nimport {\n createStyledContext,\n createStyledHOC,\n styled,\n Text,\n useProps,\n View,\n withStaticProperties\n} from \"@tamagui/web\";\nimport { useContext } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nconst buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nconst ButtonContext = createStyledContext(\n {\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n },\n {\n keys: buttonContextKeys\n }\n);\nconst ButtonFrame = styled(View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ jsx(\"button\", { type: \"button\" }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nconst ButtonText = styled(Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nconst ButtonIcon = ({ children, color, scaleIcon = 1, size }) => {\n const styledContext = ButtonContext.useStyledContext();\n const iconColor = color ?? styledContext?.color;\n const getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nconst buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn, {\n Text: Text2 = ButtonText,\n iconColor: iconColorOption,\n iconSize: iconSizeOption,\n textProps: textPropsOption\n} = {}) {\n const isNested = useContext(ButtonNestingContext);\n const styledContext = ButtonContext.useStyledContext();\n const processedProps = useProps(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n const {\n children,\n color,\n disabled,\n ellipsis,\n fontFamily,\n fontSize,\n fontStyle,\n fontWeight,\n icon,\n iconAfter,\n iconSize,\n letterSpacing,\n maxFontSizeMultiplier,\n noTextWrap,\n render,\n scaleIcon = 1,\n textAlign,\n textProps\n } = processedProps;\n const frameProps = { ...propsIn };\n for (const key of buttonInternalPropNames) {\n delete frameProps[key];\n }\n const contextColor = color ?? styledContext?.color;\n const iconColor = iconColorOption ?? contextColor;\n const resolvedIconSize = iconSize ?? iconSizeOption;\n const getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map((item) => {\n return item ? getThemedIcon(item) : null;\n });\n const textContext = {\n color: contextColor,\n ellipsis: ellipsis ?? styledContext?.ellipsis,\n fontFamily: fontFamily ?? styledContext?.fontFamily,\n fontSize: fontSize ?? styledContext?.fontSize,\n fontStyle: fontStyle ?? styledContext?.fontStyle,\n fontWeight: fontWeight ?? styledContext?.fontWeight,\n letterSpacing: letterSpacing ?? styledContext?.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier ?? styledContext?.maxFontSizeMultiplier,\n textAlign: textAlign ?? styledContext?.textAlign\n };\n const wrappedChildren = wrapChildrenInText(\n Text2,\n {\n children,\n ...textContext,\n noTextWrap,\n textProps\n },\n {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : { size: processedProps.size }\n }\n );\n const resolvedRender = render ?? (isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ jsx(\"button\", { type: \"button\", disabled: true }) : void 0);\n const props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : { render: resolvedRender },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ jsx(ButtonNestingContext.Provider, { value: true, children: /* @__PURE__ */ jsxs(ButtonContext.Provider, { ...textContext, children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ] }) })\n };\n return {\n isNested,\n props\n };\n}\nconst ButtonComponent = createStyledHOC(\n ButtonFrame,\n function Button(props, ref) {\n const { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ jsx(ButtonFrame, { ref, ...buttonProps });\n }\n);\nconst Button2 = withStaticProperties(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\nexport {\n Button2 as Button,\n ButtonContext,\n ButtonFrame,\n ButtonIcon,\n ButtonText,\n useButton\n};\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;;;;;;AAcA,MAAM,oBAAoB;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,gBAAgB,oBACpB;CACE,OAAO,KAAK;CACZ,UAAU,KAAK;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AAS,KAAK;GACd,WAAW,KAAK;GAChB,YAAY,KAAK;GACjB,aAAa,KAAK;GAClB,SAAS,KAAK;GACd,WAAW,KAAK;GAChB,SAAS,KAAK;EAChB;EACA,UAA0B,oBAAI,qBAAqB,UAAU;GAAE,OAAO;GAAM,UAA0B,qBAAK,cAAc,UAAU;IAAE,GAAG;IAAa,UAAU;KAC7J;KACA;KACA;IACF;GAAE,CAAC;EAAE,CAAC;CACR;CACA,OAAO;EACL;EACA;CACF;AACF;AACA,MAAM,kBAAkB,gBACtB,aACA,SAAS,OAAO,OAAO,KAAK;CAC1B,MAAM,EAAE,OAAO,gBAAgB,UAAU,KAAK;CAC9C,OAAuB,oBAAI,aAAa;EAAE;EAAK,GAAG;CAAY,CAAC;AACjE,CACF;AACA,MAAM,UAAU,qBAAqB,iBAAiB;CACpD,OAAO,cAAc;CACrB,OAAO;CACP,MAAM;CACN,MAAM;AACR,CAAC"}
1
+ {"version":3,"file":"Button.js","names":[],"sources":["jsx/Button.js"],"sourcesContent":["import { useGetThemedIcon } from \"@tamagui/helpers-tamagui\";\nimport { ButtonNestingContext } from \"@tamagui/stacks\";\nimport { wrapChildrenInText } from \"@tamagui/text\";\nimport {\n createStyledContext,\n createStyledHOC,\n styled,\n Text,\n useProps,\n View,\n withStaticProperties\n} from \"@tamagui/web\";\nimport { useContext } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nconst buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nconst ButtonContext = createStyledContext(\n {\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n },\n {\n keys: buttonContextKeys\n }\n);\nconst ButtonFrame = styled(View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ jsx(\"button\", { type: \"button\" }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nconst ButtonText = styled(Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nconst ButtonIcon = ({ children, color, scaleIcon = 1, size }) => {\n const styledContext = ButtonContext.useStyledContext();\n const iconColor = color ?? styledContext?.color;\n const getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nconst buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn, {\n Text: Text2 = ButtonText,\n iconColor: iconColorOption,\n iconSize: iconSizeOption,\n textProps: textPropsOption\n} = {}) {\n const isNested = useContext(ButtonNestingContext);\n const styledContext = ButtonContext.useStyledContext();\n const processedProps = useProps(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n const {\n children,\n color,\n disabled,\n ellipsis,\n fontFamily,\n fontSize,\n fontStyle,\n fontWeight,\n icon,\n iconAfter,\n iconSize,\n letterSpacing,\n maxFontSizeMultiplier,\n noTextWrap,\n render,\n scaleIcon = 1,\n textAlign,\n textProps\n } = processedProps;\n const frameProps = { ...propsIn };\n for (const key of buttonInternalPropNames) {\n delete frameProps[key];\n }\n const contextColor = color ?? styledContext?.color;\n const iconColor = iconColorOption ?? contextColor;\n const resolvedIconSize = iconSize ?? iconSizeOption;\n const getThemedIcon = useGetThemedIcon({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map((item) => {\n return item ? getThemedIcon(item) : null;\n });\n const textContext = {\n color: contextColor,\n ellipsis: ellipsis ?? styledContext?.ellipsis,\n fontFamily: fontFamily ?? styledContext?.fontFamily,\n fontSize: fontSize ?? styledContext?.fontSize,\n fontStyle: fontStyle ?? styledContext?.fontStyle,\n fontWeight: fontWeight ?? styledContext?.fontWeight,\n letterSpacing: letterSpacing ?? styledContext?.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier ?? styledContext?.maxFontSizeMultiplier,\n textAlign: textAlign ?? styledContext?.textAlign\n };\n const wrappedChildren = wrapChildrenInText(\n Text2,\n {\n children,\n ...textContext,\n noTextWrap,\n textProps\n },\n {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : { size: processedProps.size }\n }\n );\n const resolvedRender = render ?? (isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ jsx(\"button\", { type: \"button\", disabled: true }) : void 0);\n const props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : { render: resolvedRender },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ jsx(ButtonNestingContext.Provider, { value: true, children: /* @__PURE__ */ jsxs(ButtonContext.Provider, { ...textContext, children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ] }) })\n };\n return {\n isNested,\n props\n };\n}\nconst ButtonComponent = createStyledHOC(\n ButtonFrame,\n function Button(props, ref) {\n const { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ jsx(ButtonFrame, { ref, ...buttonProps });\n }\n);\nconst Button2 = withStaticProperties(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\nexport {\n Button2 as Button,\n ButtonContext,\n ButtonFrame,\n ButtonIcon,\n ButtonText,\n useButton\n};\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;;;;;;AAcA,MAAM,oBAAoB;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AACA,MAAM,gBAAgB,oBACpB;CACE,OAAO,KAAK;CACZ,UAAU,KAAK;CACf,YAAY,KAAK;CACjB,UAAU,KAAK;CACf,WAAW,KAAK;CAChB,YAAY,KAAK;CACjB,eAAe,KAAK;CACpB,uBAAuB,KAAK;CAC5B,WAAW,KAAK;AAClB,GACA,EACE,MAAM,kBACR,CACF;AACA,MAAM,cAAc,OAAO,MAAM;CAC/B,SAAS;CACT,aAAa;CACb,MAAM;CACN,QAAwB,oBAAI,UAAU,EAAE,MAAM,SAAS,CAAC;CACxD,UAAU;CACV,YAAY;CACZ,eAAe;CACf,UAAU;CACV,gBAAgB;CAChB,UAAU,EACR,UAAU,EACR,MAAM,EACJ,eAAe,OACjB,EACF,EACF;AACF,CAAC;AACD,MAAM,aAAa,OAAO,MAAM;CAC9B,SAAS;CACT,aAAa;CAEb,UAAU;CACV,YAAY;AACd,CAAC;AACD,MAAM,cAAc,EAAE,UAAU,OAAO,YAAY,GAAG,WAAW;CAC/D,MAAM,gBAAgB,cAAc,iBAAiB;C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@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.native.js","names":[],"sources":["jsx/Button.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Button_exports = {};\n__export(Button_exports, {\n Button: () => Button2,\n ButtonContext: () => ButtonContext,\n ButtonFrame: () => ButtonFrame,\n ButtonIcon: () => ButtonIcon,\n ButtonText: () => ButtonText,\n useButton: () => useButton\n});\nmodule.exports = __toCommonJS(Button_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_helpers_tamagui = require(\"@tamagui/helpers-tamagui\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar import_web = require(\"@tamagui/web\");\nvar import_react = require(\"react\");\nvar buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nvar ButtonContext = (0, import_web.createStyledContext)({\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n}, {\n keys: buttonContextKeys\n});\nvar ButtonFrame = (0, import_web.styled)(import_web.View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", {\n type: \"button\"\n }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar ButtonText = (0, import_web.styled)(import_web.Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nvar ButtonIcon = function(param) {\n var { children, color, scaleIcon = 1, size } = param;\n var styledContext = ButtonContext.useStyledContext();\n var iconColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nvar buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn) {\n var { Text: _$Text = ButtonText, iconColor: iconColorOption, iconSize: iconSizeOption, textProps: textPropsOption } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext);\n var styledContext = ButtonContext.useStyledContext();\n var processedProps = (0, import_web.useProps)(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n var { children, color, disabled, ellipsis, fontFamily, fontSize, fontStyle, fontWeight, icon, iconAfter, iconSize, letterSpacing, maxFontSizeMultiplier, noTextWrap, render, scaleIcon = 1, textAlign, textProps } = processedProps;\n var frameProps = {\n ...propsIn\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = buttonInternalPropNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n delete frameProps[key];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var contextColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var iconColor = iconColorOption !== null && iconColorOption !== void 0 ? iconColorOption : contextColor;\n var resolvedIconSize = iconSize !== null && iconSize !== void 0 ? iconSize : iconSizeOption;\n var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n var [themedIcon, themedIconAfter] = [\n icon,\n iconAfter\n ].map(function(item) {\n return item ? getThemedIcon(item) : null;\n });\n var textContext = {\n color: contextColor,\n ellipsis: ellipsis !== null && ellipsis !== void 0 ? ellipsis : styledContext === null || styledContext === void 0 ? void 0 : styledContext.ellipsis,\n fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontFamily,\n fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontSize,\n fontStyle: fontStyle !== null && fontStyle !== void 0 ? fontStyle : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontStyle,\n fontWeight: fontWeight !== null && fontWeight !== void 0 ? fontWeight : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontWeight,\n letterSpacing: letterSpacing !== null && letterSpacing !== void 0 ? letterSpacing : styledContext === null || styledContext === void 0 ? void 0 : styledContext.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier !== null && maxFontSizeMultiplier !== void 0 ? maxFontSizeMultiplier : styledContext === null || styledContext === void 0 ? void 0 : styledContext.maxFontSizeMultiplier,\n textAlign: textAlign !== null && textAlign !== void 0 ? textAlign : styledContext === null || styledContext === void 0 ? void 0 : styledContext.textAlign\n };\n var wrappedChildren = (0, import_text.wrapChildrenInText)(_$Text, {\n children,\n ...textContext,\n noTextWrap,\n textProps\n }, {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : {\n size: processedProps.size\n }\n });\n var resolvedRender = render !== null && render !== void 0 ? render : isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", {\n type: \"button\",\n disabled: true\n }) : void 0;\n var props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : {\n render: resolvedRender\n },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {\n value: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ButtonContext.Provider, {\n ...textContext,\n children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ]\n })\n })\n };\n return {\n isNested,\n props\n };\n}\nvar ButtonComponent = (0, import_web.createStyledHOC)(ButtonFrame, function Button(props, ref) {\n var { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonFrame, {\n ref,\n ...buttonProps\n });\n});\nvar Button2 = (0, import_web.withStaticProperties)(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,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,WAAW,iBAAiB,aAAa,SAAS,OAAO,OAAO,KAAK;CAC7F,IAAI,EAAE,OAAO,gBAAgB,UAAU,KAAK;CAC5C,OAAuB,iBAAC,GAAG,mBAAmB,KAAK,aAAa;EAC9D;EACA,GAAG;CACL,CAAC;AACH,CAAC;AACD,IAAI,WAAW,GAAG,WAAW,sBAAsB,iBAAiB;CAClE,OAAO,cAAc;CACrB,OAAO;CACP,MAAM;CACN,MAAM;AACR,CAAC"}
1
+ {"version":3,"file":"Button.native.js","names":[],"sources":["jsx/Button.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Button_exports = {};\n__export(Button_exports, {\n Button: () => Button2,\n ButtonContext: () => ButtonContext,\n ButtonFrame: () => ButtonFrame,\n ButtonIcon: () => ButtonIcon,\n ButtonText: () => ButtonText,\n useButton: () => useButton\n});\nmodule.exports = __toCommonJS(Button_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_helpers_tamagui = require(\"@tamagui/helpers-tamagui\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar import_web = require(\"@tamagui/web\");\nvar import_react = require(\"react\");\nvar buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nvar ButtonContext = (0, import_web.createStyledContext)({\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n}, {\n keys: buttonContextKeys\n});\nvar ButtonFrame = (0, import_web.styled)(import_web.View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", {\n type: \"button\"\n }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar ButtonText = (0, import_web.styled)(import_web.Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nvar ButtonIcon = function(param) {\n var { children, color, scaleIcon = 1, size } = param;\n var styledContext = ButtonContext.useStyledContext();\n var iconColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nvar buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn) {\n var { Text: _$Text = ButtonText, iconColor: iconColorOption, iconSize: iconSizeOption, textProps: textPropsOption } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext);\n var styledContext = ButtonContext.useStyledContext();\n var processedProps = (0, import_web.useProps)(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n var { children, color, disabled, ellipsis, fontFamily, fontSize, fontStyle, fontWeight, icon, iconAfter, iconSize, letterSpacing, maxFontSizeMultiplier, noTextWrap, render, scaleIcon = 1, textAlign, textProps } = processedProps;\n var frameProps = {\n ...propsIn\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = buttonInternalPropNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n delete frameProps[key];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var contextColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var iconColor = iconColorOption !== null && iconColorOption !== void 0 ? iconColorOption : contextColor;\n var resolvedIconSize = iconSize !== null && iconSize !== void 0 ? iconSize : iconSizeOption;\n var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n var [themedIcon, themedIconAfter] = [\n icon,\n iconAfter\n ].map(function(item) {\n return item ? getThemedIcon(item) : null;\n });\n var textContext = {\n color: contextColor,\n ellipsis: ellipsis !== null && ellipsis !== void 0 ? ellipsis : styledContext === null || styledContext === void 0 ? void 0 : styledContext.ellipsis,\n fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontFamily,\n fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontSize,\n fontStyle: fontStyle !== null && fontStyle !== void 0 ? fontStyle : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontStyle,\n fontWeight: fontWeight !== null && fontWeight !== void 0 ? fontWeight : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontWeight,\n letterSpacing: letterSpacing !== null && letterSpacing !== void 0 ? letterSpacing : styledContext === null || styledContext === void 0 ? void 0 : styledContext.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier !== null && maxFontSizeMultiplier !== void 0 ? maxFontSizeMultiplier : styledContext === null || styledContext === void 0 ? void 0 : styledContext.maxFontSizeMultiplier,\n textAlign: textAlign !== null && textAlign !== void 0 ? textAlign : styledContext === null || styledContext === void 0 ? void 0 : styledContext.textAlign\n };\n var wrappedChildren = (0, import_text.wrapChildrenInText)(_$Text, {\n children,\n ...textContext,\n noTextWrap,\n textProps\n }, {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : {\n size: processedProps.size\n }\n });\n var resolvedRender = render !== null && render !== void 0 ? render : isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", {\n type: \"button\",\n disabled: true\n }) : void 0;\n var props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : {\n render: resolvedRender\n },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {\n value: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ButtonContext.Provider, {\n ...textContext,\n children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ]\n })\n })\n };\n return {\n isNested,\n props\n };\n}\nvar ButtonComponent = (0, import_web.createStyledHOC)(ButtonFrame, function Button(props, ref) {\n var { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonFrame, {\n ref,\n ...buttonProps\n });\n});\nvar Button2 = (0, import_web.withStaticProperties)(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAA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H,CAAC;CACH;CACA,OAAO;EACL;EACA;CACF;AACF;AACA,IAAI,mBAAmB,GAAG,WAAW,gBAAe,CAAE,aAAa,SAAS,OAAO,OAAO,KAAK;CAC7F,IAAI,EAAE,OAAO,gBAAgB,UAAU,KAAK;CAC5C,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa;EAC9D;EACA,GAAG;CACL,CAAC;AACH,CAAC;AACD,IAAI,WAAW,GAAG,WAAW,qBAAoB,CAAE,iBAAiB;CAClE,OAAO,cAAc;CACrB,OAAO;CACP,MAAM;CACN,MAAM;AACR,CAAC"}
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
-
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Button\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,oBAAU,GAAG,OAAO,OAAO"}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Button\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,oBAAU,GAAG,OAAO,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/button",
3
- "version": "3.0.0-beta.669.1",
3
+ "version": "3.0.0-beta.728.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -35,19 +35,19 @@
35
35
  "clean:build": "tamagui-build clean:build"
36
36
  },
37
37
  "dependencies": {
38
- "@tamagui/config-default": "3.0.0-beta.669.1",
39
- "@tamagui/core": "3.0.0-beta.669.1",
40
- "@tamagui/helpers": "3.0.0-beta.669.1",
41
- "@tamagui/helpers-tamagui": "3.0.0-beta.669.1",
42
- "@tamagui/spacer": "3.0.0-beta.669.1",
43
- "@tamagui/stacks": "3.0.0-beta.669.1",
44
- "@tamagui/text": "3.0.0-beta.669.1",
45
- "@tamagui/font-size": "3.0.0-beta.669.1",
46
- "@tamagui/web": "3.0.0-beta.669.1"
38
+ "@tamagui/config-default": "3.0.0-beta.728.1",
39
+ "@tamagui/core": "3.0.0-beta.728.1",
40
+ "@tamagui/helpers": "3.0.0-beta.728.1",
41
+ "@tamagui/helpers-tamagui": "3.0.0-beta.728.1",
42
+ "@tamagui/spacer": "3.0.0-beta.728.1",
43
+ "@tamagui/stacks": "3.0.0-beta.728.1",
44
+ "@tamagui/text": "3.0.0-beta.728.1",
45
+ "@tamagui/font-size": "3.0.0-beta.728.1",
46
+ "@tamagui/web": "3.0.0-beta.728.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@tamagui/build": "3.0.0-beta.669.1",
50
- "react": ">=19",
49
+ "@tamagui/build": "3.0.0-beta.728.1",
50
+ "react": "19.2.3",
51
51
  "vitest": "4.0.4"
52
52
  },
53
53
  "peerDependencies": {