@tamagui/checkbox 2.7.7 → 3.0.0-beta.1091.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,116 +1,112 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
10
12
  };
11
13
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- 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;
19
21
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
27
  var Checkbox_exports = {};
24
28
  __export(Checkbox_exports, {
25
- CheckboxFrame: () => CheckboxFrame,
26
- CheckboxIndicatorFrame: () => CheckboxIndicatorFrame
29
+ Checkbox: () => Checkbox2,
30
+ CheckboxContext: () => CheckboxContext,
31
+ CheckboxFrame: () => CheckboxFrame,
32
+ CheckboxIndicatorFrame: () => CheckboxIndicatorFrame
27
33
  });
28
34
  module.exports = __toCommonJS(Checkbox_exports);
35
+ var import_checkbox_headless = require("@tamagui/checkbox-headless");
29
36
  var import_core = require("@tamagui/core");
30
- var import_get_token = require("@tamagui/get-token");
31
- var import_stacks = require("@tamagui/stacks");
37
+ require("@tamagui/focusable");
38
+ var import_use_controllable_state = require("@tamagui/use-controllable-state");
39
+ var import_react = __toESM(require("react"), 1);
32
40
  var import_CheckboxStyledContext = require("./CheckboxStyledContext.cjs");
33
- const INDICATOR_NAME = "CheckboxIndicator";
34
- const CheckboxIndicatorFrame = (0, import_core.styled)(import_stacks.YStack, {
35
- // use Checkbox for easier themes
36
- name: INDICATOR_NAME,
37
- context: import_CheckboxStyledContext.CheckboxStyledContext,
38
- variants: {
39
- unstyled: {
40
- false: {}
41
- }
42
- },
43
- defaultVariants: {
44
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
45
- }
46
- }, {
47
- accept: {
48
- activeStyle: "style"
49
- }
41
+ var import_jsx_runtime = require("react/jsx-runtime");
42
+ const CheckboxIndicatorFrame = (0, import_core.styled)(import_core.View, {
43
+ displayName: "CheckboxIndicator",
44
+ context: import_CheckboxStyledContext.CheckboxStyledContext
50
45
  });
51
- const CHECKBOX_NAME = "Checkbox";
52
- const CheckboxFrame = (0, import_core.styled)(import_stacks.YStack, {
53
- name: CHECKBOX_NAME,
54
- render: "button",
55
- context: import_CheckboxStyledContext.CheckboxStyledContext,
56
- variants: {
57
- unstyled: {
58
- false: {
59
- size: "$true",
60
- backgroundColor: "$background",
61
- alignItems: "center",
62
- justifyContent: "center",
63
- borderWidth: 1,
64
- borderColor: "$borderColor",
65
- hoverStyle: {
66
- borderColor: "$borderColorHover"
67
- },
68
- pressStyle: {
69
- backgroundColor: "$backgroundPress",
70
- borderColor: "$borderColorPress"
71
- },
72
- focusStyle: {
73
- borderColor: "$borderColorFocus"
74
- },
75
- focusVisibleStyle: {
76
- outlineStyle: "solid",
77
- outlineWidth: 2,
78
- outlineColor: "$outlineColor"
79
- }
80
- }
81
- },
82
- disabled: {
83
- true: {
84
- pointerEvents: "none",
85
- userSelect: "none",
86
- cursor: "not-allowed",
87
- hoverStyle: {
88
- borderColor: "$borderColor",
89
- backgroundColor: "$background"
90
- },
91
- pressStyle: {
92
- borderColor: "$borderColor",
93
- backgroundColor: "$background"
94
- },
95
- focusStyle: {
96
- outlineWidth: 0
97
- }
98
- }
99
- },
100
- size: {
101
- "...size": val => {
102
- const radiusToken = (0, import_core.getVariableValue)((0, import_get_token.getSize)(val)) / 8;
103
- return {
104
- borderRadius: radiusToken
105
- };
106
- }
107
- }
108
- },
109
- defaultVariants: {
110
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
111
- }
112
- }, {
113
- accept: {
114
- activeStyle: "style"
115
- }
116
- });
46
+ const CheckboxFrame = (0, import_core.styled)(import_core.View, {
47
+ displayName: "Checkbox",
48
+ render: "button",
49
+ context: import_CheckboxStyledContext.CheckboxStyledContext,
50
+ alignItems: "center",
51
+ justifyContent: "center",
52
+ variants: { disabled: { true: {
53
+ pointerEvents: "none",
54
+ userSelect: "none"
55
+ } } }
56
+ });
57
+ const CheckboxContext = import_react.default.createContext({
58
+ checked: false,
59
+ disabled: false
60
+ });
61
+ const CheckboxComponent = (0, import_core.createStyledHOC)(CheckboxFrame, function Checkbox(propsIn, forwardedRef) {
62
+ const { checked: checkedProp, defaultChecked, onCheckedChange, native, activeStyle, activeTheme, ...props } = propsIn;
63
+ const [checked = false, setChecked] = (0, import_use_controllable_state.useControllableState)({
64
+ prop: checkedProp,
65
+ defaultProp: defaultChecked,
66
+ onChange: onCheckedChange
67
+ });
68
+ const { checkboxProps, checkboxRef, bubbleInput } = (0, import_checkbox_headless.useCheckbox)(props, [checked, setChecked], forwardedRef);
69
+ if ((0, import_core.shouldRenderNativePlatform)(native) === "web") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
70
+ type: "checkbox",
71
+ defaultChecked: (0, import_checkbox_headless.isIndeterminate)(checked) ? false : checked,
72
+ tabIndex: -1,
73
+ ref: checkboxRef,
74
+ disabled: checkboxProps.disabled,
75
+ style: checkboxProps.style
76
+ });
77
+ const memoizedContext = (0, import_react.useMemo)(() => ({
78
+ checked,
79
+ disabled: checkboxProps.disabled
80
+ }), [checked, checkboxProps.disabled]);
81
+ const isActive = !!checked;
82
+ const disabled = checkboxProps.disabled;
83
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CheckboxContext.Provider, {
84
+ value: memoizedContext,
85
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxFrame, {
86
+ render: "button",
87
+ ref: checkboxRef,
88
+ theme: activeTheme ?? null,
89
+ ...import_core.isWeb && { type: "button" },
90
+ checked,
91
+ ...checkboxProps,
92
+ style: [checkboxProps.style, isActive && activeStyle],
93
+ active: isActive,
94
+ disabled,
95
+ children: props.children
96
+ }), bubbleInput]
97
+ });
98
+ });
99
+ const CheckboxIndicator = (0, import_core.createStyledHOC)(CheckboxIndicatorFrame, (props, forwardedRef) => {
100
+ const { children, forceMount, activeStyle, ...indicatorProps } = props;
101
+ const { active } = import_CheckboxStyledContext.CheckboxStyledContext.useStyledContext();
102
+ const context = import_react.default.useContext(CheckboxContext);
103
+ if (forceMount || (0, import_checkbox_headless.isIndeterminate)(context.checked) || context.checked === true) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxIndicatorFrame, {
104
+ pointerEvents: "none",
105
+ ...indicatorProps,
106
+ style: [indicatorProps.style, active && activeStyle],
107
+ ref: forwardedRef,
108
+ children
109
+ });
110
+ return null;
111
+ });
112
+ const Checkbox2 = (0, import_core.withStaticProperties)(CheckboxComponent, { Indicator: CheckboxIndicator });
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
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;
23
+ };
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);
29
+ var Checkbox_exports = {};
30
+ __export(Checkbox_exports, {
31
+ Checkbox: () => Checkbox2,
32
+ CheckboxContext: () => CheckboxContext,
33
+ CheckboxFrame: () => CheckboxFrame,
34
+ CheckboxIndicatorFrame: () => CheckboxIndicatorFrame
35
+ });
36
+ module.exports = __toCommonJS(Checkbox_exports);
37
+ var import_jsx_runtime = require("react/jsx-runtime");
38
+ var import_checkbox_headless = require("@tamagui/checkbox-headless");
39
+ var import_core = require("@tamagui/core");
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);
43
+ var import_CheckboxStyledContext = require("./CheckboxStyledContext.native.js");
44
+ var CheckboxIndicatorFrame = (0, import_core.styled)(import_core.View, {
45
+ displayName: "CheckboxIndicator",
46
+ context: import_CheckboxStyledContext.CheckboxStyledContext
47
+ });
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
+ } } }
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 });
@@ -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":["__toCommonJS","mod","__copyProps","__defProp","value","Checkbox_exports","__export","CheckboxFrame","CheckboxIndicatorFrame","module","exports","import_core","require","import_get_token","import_stacks","import_CheckboxStyledContext","INDICATOR_NAME","styled","YStack","name","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","...size","val","radiusToken","getVariableValue","getSize","borderRadius"],"sources":["../../src/Checkbox.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA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QACd;MAAcC,IAAA,EACd;QAAcC,aAChB;QACFC,UAAA;QACFC,MAAA;QAEAX,UAAU;UACRD,WAAM;UACJJ,eAAe;QAAA;QACHM,UACJ;UAERF,WAAA,EAAY;UAAAJ,eACG;QAAA;QACIO,UACnB;UAEAG,YAAY;QAAA;MACG;IACI;IACnBX,IAAA,EAEA;MAAY,SACV,WAAAkB,CAAcC,GAAA;QAAA,IAChBC,WAAA,OAAA1C,WAAA,CAAA2C,gBAAA,MAAAzC,gBAAA,CAAA0C,OAAA,EAAAH,GAAA;QACF;UACFI,YAAA,EAAAH;QAEA;MAAM;IAEF;EACA;EAAO5B,eACL;IAAcF,QAChB,EAAAG,OAAA,CAAAC,GAAA,CAAAC,gBAAA;EAAA;AACF;EACFC,MACF;IAEAC,WAAA;EAAiB;AAC4B","ignoreList":[]}
1
+ {"version":3,"file":"Checkbox.native.js","names":[],"sources":["cjs/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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