@tamagui/checkbox 2.7.7 → 3.0.0-beta.1093.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.
Files changed (67) hide show
  1. package/dist/cjs/Checkbox.cjs +97 -101
  2. package/dist/cjs/Checkbox.native.cjs +128 -0
  3. package/dist/cjs/Checkbox.native.js +111 -100
  4. package/dist/cjs/Checkbox.native.js.map +1 -1
  5. package/dist/cjs/CheckboxStyledContext.cjs +17 -23
  6. package/dist/cjs/CheckboxStyledContext.native.cjs +31 -0
  7. package/dist/cjs/CheckboxStyledContext.native.js +17 -22
  8. package/dist/cjs/CheckboxStyledContext.native.js.map +1 -1
  9. package/dist/cjs/index.cjs +8 -26
  10. package/dist/cjs/index.native.cjs +21 -0
  11. package/dist/cjs/index.native.js +9 -26
  12. package/dist/cjs/index.native.js.map +1 -1
  13. package/dist/esm/Checkbox.mjs +75 -86
  14. package/dist/esm/Checkbox.mjs.map +1 -1
  15. package/dist/esm/Checkbox.native.js +90 -86
  16. package/dist/esm/Checkbox.native.js.map +1 -1
  17. package/dist/esm/CheckboxStyledContext.mjs +5 -5
  18. package/dist/esm/CheckboxStyledContext.mjs.map +1 -1
  19. package/dist/esm/CheckboxStyledContext.native.js +5 -5
  20. package/dist/esm/CheckboxStyledContext.native.js.map +1 -1
  21. package/dist/esm/index.js +3 -11
  22. package/dist/esm/index.mjs +3 -11
  23. package/dist/esm/index.native.js +3 -11
  24. package/dist/jsx/Checkbox.mjs +75 -86
  25. package/dist/jsx/Checkbox.mjs.map +1 -1
  26. package/dist/jsx/Checkbox.native.cjs +128 -0
  27. package/dist/jsx/Checkbox.native.js +111 -100
  28. package/dist/jsx/Checkbox.native.js.map +1 -1
  29. package/dist/jsx/CheckboxStyledContext.mjs +5 -5
  30. package/dist/jsx/CheckboxStyledContext.mjs.map +1 -1
  31. package/dist/jsx/CheckboxStyledContext.native.cjs +31 -0
  32. package/dist/jsx/CheckboxStyledContext.native.js +17 -22
  33. package/dist/jsx/CheckboxStyledContext.native.js.map +1 -1
  34. package/dist/jsx/index.js +3 -11
  35. package/dist/jsx/index.mjs +3 -11
  36. package/dist/jsx/index.native.cjs +21 -0
  37. package/dist/jsx/index.native.js +9 -26
  38. package/dist/jsx/index.native.js.map +1 -1
  39. package/package.json +8 -17
  40. package/src/Checkbox.tsx +188 -106
  41. package/src/CheckboxStyledContext.tsx +2 -6
  42. package/src/index.ts +0 -9
  43. package/types/Checkbox.d.ts +129 -37
  44. package/types/Checkbox.d.ts.map +1 -1
  45. package/types/CheckboxStyledContext.d.ts +2 -4
  46. package/types/CheckboxStyledContext.d.ts.map +1 -1
  47. package/types/index.d.ts +0 -320
  48. package/types/index.d.ts.map +1 -1
  49. package/dist/cjs/createCheckbox.cjs +0 -194
  50. package/dist/cjs/createCheckbox.native.js +0 -213
  51. package/dist/cjs/createCheckbox.native.js.map +0 -1
  52. package/dist/esm/createCheckbox.mjs +0 -150
  53. package/dist/esm/createCheckbox.mjs.map +0 -1
  54. package/dist/esm/createCheckbox.native.js +0 -167
  55. package/dist/esm/createCheckbox.native.js.map +0 -1
  56. package/dist/esm/index.js.map +0 -1
  57. package/dist/esm/index.mjs.map +0 -1
  58. package/dist/esm/index.native.js.map +0 -1
  59. package/dist/jsx/createCheckbox.mjs +0 -150
  60. package/dist/jsx/createCheckbox.mjs.map +0 -1
  61. package/dist/jsx/createCheckbox.native.js +0 -213
  62. package/dist/jsx/createCheckbox.native.js.map +0 -1
  63. package/dist/jsx/index.js.map +0 -1
  64. package/dist/jsx/index.mjs.map +0 -1
  65. package/src/createCheckbox.tsx +0 -280
  66. package/types/createCheckbox.d.ts +0 -196
  67. package/types/createCheckbox.d.ts.map +0 -1
@@ -1,119 +1,130 @@
1
1
  "use strict";
2
2
 
3
+ var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
6
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
12
14
  };
13
15
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
+ get: () => from[key],
19
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
+ });
21
+ }
22
+ return to;
21
23
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
+ value: mod,
26
+ enumerable: true
27
+ }) : target, mod));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
29
  var Checkbox_exports = {};
26
30
  __export(Checkbox_exports, {
27
- CheckboxFrame: () => CheckboxFrame,
28
- CheckboxIndicatorFrame: () => CheckboxIndicatorFrame
31
+ Checkbox: () => Checkbox2,
32
+ CheckboxContext: () => CheckboxContext,
33
+ CheckboxFrame: () => CheckboxFrame,
34
+ CheckboxIndicatorFrame: () => CheckboxIndicatorFrame
29
35
  });
30
36
  module.exports = __toCommonJS(Checkbox_exports);
37
+ var import_jsx_runtime = require("react/jsx-runtime");
38
+ var import_checkbox_headless = require("@tamagui/checkbox-headless");
31
39
  var import_core = require("@tamagui/core");
32
- var import_get_token = require("@tamagui/get-token");
33
- var import_stacks = require("@tamagui/stacks");
40
+ var import_focusable = require("@tamagui/focusable");
41
+ var import_use_controllable_state = require("@tamagui/use-controllable-state");
42
+ var import_react = __toESM(require("react"), 1);
34
43
  var import_CheckboxStyledContext = require("./CheckboxStyledContext.native.js");
35
- var INDICATOR_NAME = "CheckboxIndicator";
36
- var CheckboxIndicatorFrame = (0, import_core.styled)(import_stacks.YStack, {
37
- // use Checkbox for easier themes
38
- name: INDICATOR_NAME,
39
- context: import_CheckboxStyledContext.CheckboxStyledContext,
40
- variants: {
41
- unstyled: {
42
- false: {}
43
- }
44
- },
45
- defaultVariants: {
46
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
47
- }
48
- }, {
49
- accept: {
50
- activeStyle: "style"
51
- }
44
+ var CheckboxIndicatorFrame = (0, import_core.styled)(import_core.View, {
45
+ displayName: "CheckboxIndicator",
46
+ context: import_CheckboxStyledContext.CheckboxStyledContext
52
47
  });
53
- var CHECKBOX_NAME = "Checkbox";
54
- var CheckboxFrame = (0, import_core.styled)(import_stacks.YStack, {
55
- name: CHECKBOX_NAME,
56
- render: "button",
57
- context: import_CheckboxStyledContext.CheckboxStyledContext,
58
- variants: {
59
- unstyled: {
60
- false: {
61
- size: "$true",
62
- backgroundColor: "$background",
63
- alignItems: "center",
64
- justifyContent: "center",
65
- borderWidth: 1,
66
- borderColor: "$borderColor",
67
- hoverStyle: {
68
- borderColor: "$borderColorHover"
69
- },
70
- pressStyle: {
71
- backgroundColor: "$backgroundPress",
72
- borderColor: "$borderColorPress"
73
- },
74
- focusStyle: {
75
- borderColor: "$borderColorFocus"
76
- },
77
- focusVisibleStyle: {
78
- outlineStyle: "solid",
79
- outlineWidth: 2,
80
- outlineColor: "$outlineColor"
81
- }
82
- }
83
- },
84
- disabled: {
85
- true: {
86
- pointerEvents: "none",
87
- userSelect: "none",
88
- cursor: "not-allowed",
89
- hoverStyle: {
90
- borderColor: "$borderColor",
91
- backgroundColor: "$background"
92
- },
93
- pressStyle: {
94
- borderColor: "$borderColor",
95
- backgroundColor: "$background"
96
- },
97
- focusStyle: {
98
- outlineWidth: 0
99
- }
100
- }
101
- },
102
- size: {
103
- "...size": function (val) {
104
- var radiusToken = (0, import_core.getVariableValue)((0, import_get_token.getSize)(val)) / 8;
105
- return {
106
- borderRadius: radiusToken
107
- };
108
- }
109
- }
110
- },
111
- defaultVariants: {
112
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
113
- }
114
- }, {
115
- accept: {
116
- activeStyle: "style"
117
- }
48
+ var CheckboxFrame = (0, import_core.styled)(import_core.View, {
49
+ displayName: "Checkbox",
50
+ render: "button",
51
+ context: import_CheckboxStyledContext.CheckboxStyledContext,
52
+ alignItems: "center",
53
+ justifyContent: "center",
54
+ variants: { disabled: { true: {
55
+ pointerEvents: "none",
56
+ userSelect: "none"
57
+ } } }
118
58
  });
59
+ var CheckboxContext = /* @__PURE__ */ import_react.default.createContext({
60
+ checked: false,
61
+ disabled: false
62
+ });
63
+ var CheckboxComponent = (0, import_core.createStyledHOC)(CheckboxFrame, function Checkbox(propsIn, forwardedRef) {
64
+ var { checked: checkedProp, defaultChecked, onCheckedChange, native, activeStyle, activeTheme, ...props } = propsIn;
65
+ var [checked = false, setChecked] = (0, import_use_controllable_state.useControllableState)({
66
+ prop: checkedProp,
67
+ defaultProp: defaultChecked,
68
+ onChange: onCheckedChange
69
+ });
70
+ var { checkboxProps, checkboxRef, bubbleInput } = (0, import_checkbox_headless.useCheckbox)(props, [checked, setChecked], forwardedRef);
71
+ import_react.default.useEffect(function() {
72
+ if (!props.id) return;
73
+ if (props.disabled) return;
74
+ return (0, import_focusable.registerFocusable)(props.id, {
75
+ focusAndSelect: function() {
76
+ setChecked === null || setChecked === void 0 || setChecked(function(value) {
77
+ return !value;
78
+ });
79
+ },
80
+ focus: function() {}
81
+ });
82
+ }, [props.id, props.disabled]);
83
+ if ((0, import_core.shouldRenderNativePlatform)(native) === "web") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
84
+ type: "checkbox",
85
+ defaultChecked: (0, import_checkbox_headless.isIndeterminate)(checked) ? false : checked,
86
+ tabIndex: -1,
87
+ ref: checkboxRef,
88
+ disabled: checkboxProps.disabled,
89
+ style: checkboxProps.style
90
+ });
91
+ var memoizedContext = (0, import_react.useMemo)(function() {
92
+ return {
93
+ checked,
94
+ disabled: checkboxProps.disabled
95
+ };
96
+ }, [checked, checkboxProps.disabled]);
97
+ var isActive = !!checked;
98
+ var disabled = checkboxProps.disabled;
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CheckboxContext.Provider, {
100
+ value: memoizedContext,
101
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxFrame, {
102
+ render: "button",
103
+ ref: checkboxRef,
104
+ theme: activeTheme !== null && activeTheme !== void 0 ? activeTheme : null,
105
+ ...import_core.isWeb && { type: "button" },
106
+ checked,
107
+ ...checkboxProps,
108
+ style: [checkboxProps.style, isActive && activeStyle],
109
+ active: isActive,
110
+ disabled,
111
+ children: props.children
112
+ }), bubbleInput]
113
+ });
114
+ });
115
+ var CheckboxIndicator = (0, import_core.createStyledHOC)(CheckboxIndicatorFrame, function(props, forwardedRef) {
116
+ var { children, forceMount, activeStyle, ...indicatorProps } = props;
117
+ var { active } = import_CheckboxStyledContext.CheckboxStyledContext.useStyledContext();
118
+ var context = import_react.default.useContext(CheckboxContext);
119
+ if (forceMount || (0, import_checkbox_headless.isIndeterminate)(context.checked) || context.checked === true) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxIndicatorFrame, {
120
+ pointerEvents: "none",
121
+ ...indicatorProps,
122
+ style: [indicatorProps.style, active && activeStyle],
123
+ ref: forwardedRef,
124
+ children
125
+ });
126
+ return null;
127
+ });
128
+ var Checkbox2 = (0, import_core.withStaticProperties)(CheckboxComponent, { Indicator: CheckboxIndicator });
129
+
119
130
  //# sourceMappingURL=Checkbox.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","Checkbox_exports","CheckboxFrame","CheckboxIndicatorFrame","module","exports","import_core","require","import_get_token","import_stacks","import_CheckboxStyledContext","INDICATOR_NAME","styled","YStack","context","CheckboxStyledContext","variants","unstyled","false","defaultVariants","process","env","TAMAGUI_HEADLESS","accept","activeStyle","CHECKBOX_NAME","render","size","backgroundColor","alignItems","justifyContent","borderWidth","borderColor","hoverStyle","pressStyle","focusStyle","focusVisibleStyle","outlineStyle","outlineWidth","outlineColor","disabled","true","pointerEvents","userSelect","cursor"],"sources":["../../src/Checkbox.tsx"],"sourcesContent":[null],"mappings":"AAGA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAA,CAAAC,cAAe;AACxB,IAAAC,gBAAS,GAAcF,MAAA,CAAAG,wBAAA;AAEvB,IAAAC,iBAAS,GAAAJ,MAAA,CAAAK,mBAA6B;AAKtC,IAAAC,YAAM,GAAAN,MAAiB,CAAAO,SAAA,CAAAC,cAAA;AAEhB,IAAAC,QAAM,GAAAA,CAAAC,MAAA,EAAAC,GAAA,KAAyB;EACpC,SAAAC,IAAA,IAAAD,GAAA,EACAZ,SAAA,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAAA;AAAA,IAEEC,WAAM,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EAAA,IACNF,IAAA,IAAS,OAAAA,IAAA,wBAAAA,IAAA;IACT,SAAAG,GAAU,IAAAhB,iBAAA,CAAAa,IAAA,GACR,KAAAX,YAAU,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,E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AChB;QACFC,cAAA;QACFC,WAAA;QAEAC,WAAU;QACRC,UAAM;UACJD,WAAA;QAAe;QACHE,UACJ;UAERN,eAAY;UAAAI,WACV;QAAa;QACIG,UACnB;UAEAH,WAAA,EAAY;QAAA;QACGI,iBACb;UACFC,YAAA;UAEAC,YAAY;UAAAC,YACV;QAAc;MAChB;IACF;IACFC,QAEM;MAAAC,IACJ;QACEC,aAAM;QACNC,UAAO;QAAAC,MACL,eAAc;QAAAX,UAChB;UACFD,WAAA;UACFJ,eAAA;QACF;QAEAM,UAAA;UACEF,WAAU,gBAAY;UACxBJ,eAAA;QACF;QACAO,UAAA;UACEG,YAAQ;QACN;MACF;IACF;IACFX,IAAA","ignoreList":[]}
1
+ {"version":3,"file":"Checkbox.native.js","names":[],"sources":["jsx/Checkbox.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n\t// If the importer is in node compatibility mode or this is not an ESM\n\t// file that has been converted to a CommonJS file using a Babel-\n\t// compatible transform (i.e. \"__esModule\" has not been set), then set\n\t// \"default\" to the CommonJS \"module.exports\" for node compatibility.\n\tisNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\t\tvalue: mod,\n\t\tenumerable: true\n\t}) : target,\n\tmod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Checkbox_exports = {};\n__export(Checkbox_exports, {\n\tCheckbox: () => Checkbox2,\n\tCheckboxContext: () => CheckboxContext,\n\tCheckboxFrame: () => CheckboxFrame,\n\tCheckboxIndicatorFrame: () => CheckboxIndicatorFrame\n});\nmodule.exports = __toCommonJS(Checkbox_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_checkbox_headless = require(\"@tamagui/checkbox-headless\");\nvar import_core = require(\"@tamagui/core\");\nvar import_focusable = require(\"@tamagui/focusable\");\nvar import_use_controllable_state = require(\"@tamagui/use-controllable-state\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_CheckboxStyledContext = require(\"./CheckboxStyledContext\");\nvar CheckboxIndicatorFrame = (0, import_core.styled)(import_core.View, {\n\tdisplayName: \"CheckboxIndicator\",\n\tcontext: import_CheckboxStyledContext.CheckboxStyledContext\n});\nvar CheckboxFrame = (0, import_core.styled)(import_core.View, {\n\tdisplayName: \"Checkbox\",\n\trender: \"button\",\n\tcontext: import_CheckboxStyledContext.CheckboxStyledContext,\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tvariants: { disabled: { true: {\n\t\tpointerEvents: \"none\",\n\t\tuserSelect: \"none\"\n\t} } }\n});\nvar CheckboxContext = /* @__PURE__ */ import_react.default.createContext({\n\tchecked: false,\n\tdisabled: false\n});\nvar CheckboxComponent = (0, import_core.createStyledHOC)(CheckboxFrame, function Checkbox(propsIn, forwardedRef) {\n\tvar { checked: checkedProp, defaultChecked, onCheckedChange, native, activeStyle, activeTheme, ...props } = propsIn;\n\tvar [checked = false, setChecked] = (0, import_use_controllable_state.useControllableState)({\n\t\tprop: checkedProp,\n\t\tdefaultProp: defaultChecked,\n\t\tonChange: onCheckedChange\n\t});\n\tvar { checkboxProps, checkboxRef, bubbleInput } = (0, import_checkbox_headless.useCheckbox)(props, [checked, setChecked], forwardedRef);\n\timport_react.default.useEffect(function() {\n\t\tif (!props.id) return;\n\t\tif (props.disabled) return;\n\t\treturn (0, import_focusable.registerFocusable)(props.id, {\n\t\t\tfocusAndSelect: function() {\n\t\t\t\tsetChecked === null || setChecked === void 0 || setChecked(function(value) {\n\t\t\t\t\treturn !value;\n\t\t\t\t});\n\t\t\t},\n\t\t\tfocus: function() {}\n\t\t});\n\t}, [props.id, props.disabled]);\n\tif ((0, import_core.shouldRenderNativePlatform)(native) === \"web\") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"input\", {\n\t\ttype: \"checkbox\",\n\t\tdefaultChecked: (0, import_checkbox_headless.isIndeterminate)(checked) ? false : checked,\n\t\ttabIndex: -1,\n\t\tref: checkboxRef,\n\t\tdisabled: checkboxProps.disabled,\n\t\tstyle: checkboxProps.style\n\t});\n\tvar memoizedContext = (0, import_react.useMemo)(function() {\n\t\treturn {\n\t\t\tchecked,\n\t\t\tdisabled: checkboxProps.disabled\n\t\t};\n\t}, [checked, checkboxProps.disabled]);\n\tvar isActive = !!checked;\n\tvar disabled = checkboxProps.disabled;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CheckboxContext.Provider, {\n\t\tvalue: memoizedContext,\n\t\tchildren: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxFrame, {\n\t\t\trender: \"button\",\n\t\t\tref: checkboxRef,\n\t\t\ttheme: activeTheme !== null && activeTheme !== void 0 ? activeTheme : null,\n\t\t\t...import_core.isWeb && { type: \"button\" },\n\t\t\tchecked,\n\t\t\t...checkboxProps,\n\t\t\tstyle: [checkboxProps.style, isActive && activeStyle],\n\t\t\tactive: isActive,\n\t\t\tdisabled,\n\t\t\tchildren: props.children\n\t\t}), bubbleInput]\n\t});\n});\nvar CheckboxIndicator = (0, import_core.createStyledHOC)(CheckboxIndicatorFrame, function(props, forwardedRef) {\n\tvar { children, forceMount, activeStyle, ...indicatorProps } = props;\n\tvar { active } = import_CheckboxStyledContext.CheckboxStyledContext.useStyledContext();\n\tvar context = import_react.default.useContext(CheckboxContext);\n\tif (forceMount || (0, import_checkbox_headless.isIndeterminate)(context.checked) || context.checked === true) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxIndicatorFrame, {\n\t\tpointerEvents: \"none\",\n\t\t...indicatorProps,\n\t\tstyle: [indicatorProps.style, active && activeStyle],\n\t\tref: forwardedRef,\n\t\tchildren\n\t});\n\treturn null;\n});\nvar Checkbox2 = (0, import_core.withStaticProperties)(CheckboxComponent, { Indicator: CheckboxIndicator });\n//# sourceMappingURL=Checkbox.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKpG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CACpE,OAAO;CACP,YAA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I,qBAAqB,GAAG,YAAY,gBAAe,CAAE,wBAAwB,SAAS,OAAO,cAAc;CAC9G,IAAI,EAAE,UAAU,YAAY,aAAa,GAAG,mBAAmB;CAC/D,IAAI,EAAE,WAAW,6BAA6B,sBAAsB,iBAAiB;CACrF,IAAI,UAAU,aAAa,QAAQ,WAAW,eAAe;CAC7D,IAAI,eAAe,GAAG,yBAAyB,gBAAe,CAAE,QAAQ,OAAO,KAAK,QAAQ,YAAY,MAAM,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,wBAAwB;EACxL,eAAe;EACf,GAAG;EACH,OAAO,CAAC,eAAe,OAAO,UAAU,WAAW;EACnD,KAAK;EACL;CACD,CAAC;CACD,OAAO;AACR,CAAC;AACD,IAAI,aAAa,GAAG,YAAY,qBAAoB,CAAE,mBAAmB,EAAE,WAAW,kBAAkB,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { createStyledContext } from "@tamagui/core";
2
+
2
3
  const CheckboxStyledContext = createStyledContext({
3
- size: "$true",
4
- scaleIcon: 1,
5
- unstyled: process.env.TAMAGUI_HEADLESS === "1",
6
- active: false,
7
- disabled: false
4
+ size: true,
5
+ active: false,
6
+ disabled: false
8
7
  });
8
+
9
9
  export { CheckboxStyledContext };
10
10
  //# sourceMappingURL=CheckboxStyledContext.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["createStyledContext","CheckboxStyledContext","size","scaleIcon","unstyled","process","env","TAMAGUI_HEADLESS","active","disabled"],"sources":["../../src/CheckboxStyledContext.tsx"],"sourcesContent":[null],"mappings":"AACA,SAASA,mBAAA,QAA2B;AAE7B,MAAMC,qBAAA,GAAwBD,mBAAA,CAMlC;EACDE,IAAA,EAAM;EACNC,SAAA,EAAW;EACXC,QAAA,EAAUC,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;EAC3CC,MAAA,EAAQ;EACRC,QAAA,EAAU;AACZ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"CheckboxStyledContext.js","names":[],"sources":["jsx/CheckboxStyledContext.js"],"sourcesContent":["import { createStyledContext } from \"@tamagui/core\";\nconst CheckboxStyledContext = createStyledContext({\n size: true,\n active: false,\n disabled: false\n});\nexport {\n CheckboxStyledContext\n};\n//# sourceMappingURL=CheckboxStyledContext.js.map\n"],"mappings":";;;AACA,MAAM,wBAAwB,oBAAoB;CAChD,MAAM;CACN,QAAQ;CACR,UAAU;AACZ,CAAC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var CheckboxStyledContext_exports = {};
24
+ __export(CheckboxStyledContext_exports, { CheckboxStyledContext: () => CheckboxStyledContext });
25
+ module.exports = __toCommonJS(CheckboxStyledContext_exports);
26
+ var import_core = require("@tamagui/core");
27
+ var CheckboxStyledContext = (0, import_core.createStyledContext)({
28
+ size: true,
29
+ active: false,
30
+ disabled: false
31
+ });
@@ -5,34 +5,29 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
13
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
21
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
23
  var CheckboxStyledContext_exports = {};
26
- __export(CheckboxStyledContext_exports, {
27
- CheckboxStyledContext: () => CheckboxStyledContext
28
- });
24
+ __export(CheckboxStyledContext_exports, { CheckboxStyledContext: () => CheckboxStyledContext });
29
25
  module.exports = __toCommonJS(CheckboxStyledContext_exports);
30
26
  var import_core = require("@tamagui/core");
31
27
  var CheckboxStyledContext = (0, import_core.createStyledContext)({
32
- size: "$true",
33
- scaleIcon: 1,
34
- unstyled: process.env.TAMAGUI_HEADLESS === "1",
35
- active: false,
36
- disabled: false
28
+ size: true,
29
+ active: false,
30
+ disabled: false
37
31
  });
32
+
38
33
  //# sourceMappingURL=CheckboxStyledContext.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable"],"sources":["../../src/CheckboxStyledContext.tsx"],"sourcesContent":[null],"mappings":"AACA,YAAS;;AAEF,IAAAA,SAAM,GAAAC,MAAA,CAAAC,cAAwB;AAMlC,IACDC,gBAAM,GAAAF,MAAA,CAAAG,wBAAA;AAAA,IACNC,iBAAW,GAAAJ,MAAA,CAAAK,mBAAA;AAAA,IACXC,YAAU,GAAAN,MAAY,CAAAO,SAAA,CAAAC,cAAqB;AAAA,IAC3CC,QAAQ,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EACR,SAAAC,IAAU,IAAAD,GAAA,EACXZ,SAAA,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA","ignoreList":[]}
1
+ {"version":3,"file":"CheckboxStyledContext.native.js","names":[],"sources":["jsx/CheckboxStyledContext.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 CheckboxStyledContext_exports = {};\n__export(CheckboxStyledContext_exports, {\n CheckboxStyledContext: () => CheckboxStyledContext\n});\nmodule.exports = __toCommonJS(CheckboxStyledContext_exports);\nvar import_core = require(\"@tamagui/core\");\nvar CheckboxStyledContext = (0, import_core.createStyledContext)({\n size: true,\n active: false,\n disabled: false\n});\n//# sourceMappingURL=CheckboxStyledContext.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,GAAG;AACzF,IAAI,gCAAgC,CAAC;AACrC,SAAS,+BAA+B,EACtC,6BAA6B,sBAC/B,CAAC;AACD,OAAO,UAAU,aAAa,6BAA6B;AAC3D,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,yBAAyB,GAAG,YAAY,oBAAmB,CAAE;CAC/D,MAAM;CACN,QAAQ;CACR,UAAU;AACZ,CAAC"}
package/dist/jsx/index.js CHANGED
@@ -1,11 +1,3 @@
1
- import { CheckboxFrame, CheckboxIndicatorFrame } from "./Checkbox.mjs";
2
- import { createCheckbox } from "./createCheckbox.mjs";
3
- export * from "./createCheckbox.mjs";
4
- export * from "./Checkbox.mjs";
5
- export * from "./CheckboxStyledContext.mjs";
6
- const Checkbox = createCheckbox({
7
- Frame: CheckboxFrame,
8
- Indicator: CheckboxIndicatorFrame
9
- });
10
- export { Checkbox };
11
- //# sourceMappingURL=index.js.map
1
+ export * from "./Checkbox.mjs"
2
+
3
+ export * from "./CheckboxStyledContext.mjs"
@@ -1,11 +1,3 @@
1
- import { CheckboxFrame, CheckboxIndicatorFrame } from "./Checkbox.mjs";
2
- import { createCheckbox } from "./createCheckbox.mjs";
3
- export * from "./createCheckbox.mjs";
4
- export * from "./Checkbox.mjs";
5
- export * from "./CheckboxStyledContext.mjs";
6
- const Checkbox = createCheckbox({
7
- Frame: CheckboxFrame,
8
- Indicator: CheckboxIndicatorFrame
9
- });
10
- export { Checkbox };
11
- //# sourceMappingURL=index.mjs.map
1
+ export * from "./Checkbox.mjs"
2
+
3
+ export * from "./CheckboxStyledContext.mjs"
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var index_exports = {};
19
+ module.exports = __toCommonJS(index_exports);
20
+ __reExport(index_exports, require("./Checkbox.native.js"), module.exports);
21
+ __reExport(index_exports, require("./CheckboxStyledContext.native.js"), module.exports);
@@ -4,37 +4,20 @@ var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
7
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
14
+ return to;
21
15
  };
22
16
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
23
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
24
- value: true
25
- }), mod);
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
26
18
  var index_exports = {};
27
- __export(index_exports, {
28
- Checkbox: () => Checkbox
29
- });
30
19
  module.exports = __toCommonJS(index_exports);
31
- var import_Checkbox = require("./Checkbox.native.js");
32
- var import_createCheckbox = require("./createCheckbox.native.js");
33
- __reExport(index_exports, require("./createCheckbox.native.js"), module.exports);
34
20
  __reExport(index_exports, require("./Checkbox.native.js"), module.exports);
35
21
  __reExport(index_exports, require("./CheckboxStyledContext.native.js"), module.exports);
36
- var Checkbox = (0, import_createCheckbox.createCheckbox)({
37
- Frame: import_Checkbox.CheckboxFrame,
38
- Indicator: import_Checkbox.CheckboxIndicatorFrame
39
- });
22
+
40
23
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAA,CAAAC,cAAsB;AAE/B,IAAAC,gBAAc,GAAAF,MAAA,CAAAG,wBAAA;AACd,IAAAC,iBAAc,GAAAJ,MAAA,CAAAK,mBAAA;AACd,IAAAC,YAAc,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAGP,IAAAC,QAAM,GAAAA,CAAAC,MAAW,EAAAC,GAAA,KAAe;EACrC,SAAOC,IAAA,IAAAD,GAAA,EACPZ,SAAW,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AACb,CAAC","ignoreList":[]}
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(\"./Checkbox\"), module.exports);\n__reExport(index_exports, require(\"./CheckboxStyledContext\"), 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,sBAAY,GAAG,OAAO,OAAO;AAC/D,WAAW,eAAe,QAAQ,mCAAyB,GAAG,OAAO,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@tamagui/checkbox",
3
- "version": "2.7.7",
3
+ "version": "3.0.0-beta.1093.1",
4
+ "license": "MIT",
4
5
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
6
  "source": "src/index.ts",
6
7
  "files": [
@@ -35,24 +36,14 @@
35
36
  "clean:build": "tamagui-build clean:build"
36
37
  },
37
38
  "dependencies": {
38
- "@tamagui/checkbox-headless": "2.7.7",
39
- "@tamagui/compose-refs": "2.7.7",
40
- "@tamagui/constants": "2.7.7",
41
- "@tamagui/core": "2.7.7",
42
- "@tamagui/create-context": "2.7.7",
43
- "@tamagui/focusable": "2.7.7",
44
- "@tamagui/get-token": "2.7.7",
45
- "@tamagui/helpers": "2.7.7",
46
- "@tamagui/helpers-tamagui": "2.7.7",
47
- "@tamagui/label": "2.7.7",
48
- "@tamagui/stacks": "2.7.7",
49
- "@tamagui/use-controllable-state": "2.7.7",
50
- "@tamagui/font-size": "2.7.7",
51
- "@tamagui/use-previous": "2.7.7"
39
+ "@tamagui/checkbox-headless": "3.0.0-beta.1093.1",
40
+ "@tamagui/core": "3.0.0-beta.1093.1",
41
+ "@tamagui/focusable": "3.0.0-beta.1093.1",
42
+ "@tamagui/use-controllable-state": "3.0.0-beta.1093.1"
52
43
  },
53
44
  "devDependencies": {
54
- "@tamagui/build": "2.7.7",
55
- "react": ">=19"
45
+ "@tamagui/build": "3.0.0-beta.1093.1",
46
+ "react": "19.2.3"
56
47
  },
57
48
  "peerDependencies": {
58
49
  "react": ">=19"