@tamagui/checkbox 2.7.7 → 3.0.0-beta.637.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.
- package/dist/cjs/Checkbox.cjs +105 -101
- package/dist/cjs/Checkbox.native.cjs +137 -0
- package/dist/cjs/Checkbox.native.js +120 -100
- package/dist/cjs/Checkbox.native.js.map +1 -1
- package/dist/cjs/CheckboxStyledContext.cjs +18 -23
- package/dist/cjs/CheckboxStyledContext.native.cjs +32 -0
- package/dist/cjs/CheckboxStyledContext.native.js +18 -22
- package/dist/cjs/CheckboxStyledContext.native.js.map +1 -1
- package/dist/cjs/index.cjs +9 -26
- package/dist/cjs/index.native.cjs +22 -0
- package/dist/cjs/index.native.js +10 -26
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Checkbox.mjs +83 -87
- package/dist/esm/Checkbox.mjs.map +1 -1
- package/dist/esm/Checkbox.native.js +99 -87
- package/dist/esm/Checkbox.native.js.map +1 -1
- package/dist/esm/CheckboxStyledContext.mjs +5 -5
- package/dist/esm/CheckboxStyledContext.mjs.map +1 -1
- package/dist/esm/CheckboxStyledContext.native.js +5 -5
- package/dist/esm/CheckboxStyledContext.native.js.map +1 -1
- package/dist/esm/index.js +3 -11
- package/dist/esm/index.mjs +3 -11
- package/dist/esm/index.native.js +3 -11
- package/dist/jsx/Checkbox.mjs +83 -87
- package/dist/jsx/Checkbox.mjs.map +1 -1
- package/dist/jsx/Checkbox.native.cjs +137 -0
- package/dist/jsx/Checkbox.native.js +120 -100
- package/dist/jsx/Checkbox.native.js.map +1 -1
- package/dist/jsx/CheckboxStyledContext.mjs +5 -5
- package/dist/jsx/CheckboxStyledContext.mjs.map +1 -1
- package/dist/jsx/CheckboxStyledContext.native.cjs +32 -0
- package/dist/jsx/CheckboxStyledContext.native.js +18 -22
- package/dist/jsx/CheckboxStyledContext.native.js.map +1 -1
- package/dist/jsx/index.js +3 -11
- package/dist/jsx/index.mjs +3 -11
- package/dist/jsx/index.native.cjs +22 -0
- package/dist/jsx/index.native.js +10 -26
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +6 -16
- package/src/Checkbox.tsx +189 -81
- package/src/CheckboxStyledContext.tsx +2 -6
- package/src/index.ts +0 -9
- package/types/Checkbox.d.ts +446 -24
- package/types/Checkbox.d.ts.map +1 -1
- package/types/CheckboxStyledContext.d.ts +2 -4
- package/types/CheckboxStyledContext.d.ts.map +1 -1
- package/types/index.d.ts +0 -320
- package/types/index.d.ts.map +1 -1
- package/dist/cjs/createCheckbox.cjs +0 -194
- package/dist/cjs/createCheckbox.native.js +0 -213
- package/dist/cjs/createCheckbox.native.js.map +0 -1
- package/dist/esm/createCheckbox.mjs +0 -150
- package/dist/esm/createCheckbox.mjs.map +0 -1
- package/dist/esm/createCheckbox.native.js +0 -167
- package/dist/esm/createCheckbox.native.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/createCheckbox.mjs +0 -150
- package/dist/jsx/createCheckbox.mjs.map +0 -1
- package/dist/jsx/createCheckbox.native.js +0 -213
- package/dist/jsx/createCheckbox.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/src/createCheckbox.tsx +0 -280
- package/types/createCheckbox.d.ts +0 -196
- package/types/createCheckbox.d.ts.map +0 -1
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: () => from[key],
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: true
|
|
28
|
+
}) : target, mod));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var Checkbox_exports = {};
|
|
31
|
+
__export(Checkbox_exports, {
|
|
32
|
+
Checkbox: () => Checkbox2,
|
|
33
|
+
CheckboxContext: () => CheckboxContext,
|
|
34
|
+
CheckboxFrame: () => CheckboxFrame,
|
|
35
|
+
CheckboxIndicatorFrame: () => CheckboxIndicatorFrame
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(Checkbox_exports);
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
+
var import_checkbox_headless = require("@tamagui/checkbox-headless");
|
|
40
|
+
var import_core = require("@tamagui/core");
|
|
41
|
+
var import_focusable = require("@tamagui/focusable");
|
|
42
|
+
var import_use_controllable_state = require("@tamagui/use-controllable-state");
|
|
43
|
+
var import_react = __toESM(require("react"), 1);
|
|
44
|
+
var import_CheckboxStyledContext = require("./CheckboxStyledContext.native.js");
|
|
45
|
+
var CheckboxIndicatorFrame = (0, import_core.styled)(import_core.View, {
|
|
46
|
+
displayName: "CheckboxIndicator",
|
|
47
|
+
context: import_CheckboxStyledContext.CheckboxStyledContext
|
|
48
|
+
}, { accept: { activeStyle: "style" } });
|
|
49
|
+
var CheckboxFrame = (0, import_core.styled)(import_core.View, {
|
|
50
|
+
displayName: "Checkbox",
|
|
51
|
+
render: "button",
|
|
52
|
+
context: import_CheckboxStyledContext.CheckboxStyledContext,
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
justifyContent: "center",
|
|
55
|
+
variants: { disabled: { true: {
|
|
56
|
+
pointerEvents: "none",
|
|
57
|
+
userSelect: "none"
|
|
58
|
+
} } }
|
|
59
|
+
}, { accept: { activeStyle: "style" } });
|
|
60
|
+
var CheckboxContext = /* @__PURE__ */ import_react.default.createContext({
|
|
61
|
+
checked: false,
|
|
62
|
+
disabled: false
|
|
63
|
+
});
|
|
64
|
+
var CheckboxComponent = (0, import_core.createStyledHOC)(CheckboxFrame, function Checkbox(_props, forwardedRef) {
|
|
65
|
+
var { checked: checkedProp, defaultChecked, onCheckedChange, native, activeStyle, activeTheme, ...props } = _props;
|
|
66
|
+
var propsActive = (0, import_core.useProps)(props);
|
|
67
|
+
var styledContext = import_react.default.useContext(import_CheckboxStyledContext.CheckboxStyledContext.context);
|
|
68
|
+
var [checked = false, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
69
|
+
prop: checkedProp,
|
|
70
|
+
defaultProp: defaultChecked,
|
|
71
|
+
onChange: onCheckedChange
|
|
72
|
+
});
|
|
73
|
+
var { checkboxProps, checkboxRef, bubbleInput } = (0, import_checkbox_headless.useCheckbox)(propsActive, [checked, setChecked], forwardedRef);
|
|
74
|
+
import_react.default.useEffect(function() {
|
|
75
|
+
if (!props.id) return;
|
|
76
|
+
if (props.disabled) return;
|
|
77
|
+
return (0, import_focusable.registerFocusable)(props.id, {
|
|
78
|
+
focusAndSelect: function() {
|
|
79
|
+
setChecked === null || setChecked === void 0 || setChecked(function(value) {
|
|
80
|
+
return !value;
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
focus: function() {}
|
|
84
|
+
});
|
|
85
|
+
}, [props.id, props.disabled]);
|
|
86
|
+
if ((0, import_core.shouldRenderNativePlatform)(native) === "web") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
87
|
+
type: "checkbox",
|
|
88
|
+
defaultChecked: (0, import_checkbox_headless.isIndeterminate)(checked) ? false : checked,
|
|
89
|
+
tabIndex: -1,
|
|
90
|
+
ref: checkboxRef,
|
|
91
|
+
disabled: checkboxProps.disabled,
|
|
92
|
+
style: checkboxProps.style
|
|
93
|
+
});
|
|
94
|
+
var memoizedContext = (0, import_react.useMemo)(function() {
|
|
95
|
+
return {
|
|
96
|
+
checked,
|
|
97
|
+
disabled: checkboxProps.disabled
|
|
98
|
+
};
|
|
99
|
+
}, [checked, checkboxProps.disabled]);
|
|
100
|
+
var isActive = !!checked;
|
|
101
|
+
var disabled = checkboxProps.disabled;
|
|
102
|
+
var _propsActive_size, _ref;
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxContext.Provider, {
|
|
104
|
+
value: memoizedContext,
|
|
105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_CheckboxStyledContext.CheckboxStyledContext.Provider, {
|
|
106
|
+
size: (_ref = (_propsActive_size = propsActive.size) !== null && _propsActive_size !== void 0 ? _propsActive_size : styledContext === null || styledContext === void 0 ? void 0 : styledContext.size) !== null && _ref !== void 0 ? _ref : true,
|
|
107
|
+
active: isActive,
|
|
108
|
+
disabled,
|
|
109
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxFrame, {
|
|
110
|
+
render: "button",
|
|
111
|
+
ref: checkboxRef,
|
|
112
|
+
theme: activeTheme !== null && activeTheme !== void 0 ? activeTheme : null,
|
|
113
|
+
...import_core.isWeb && { type: "button" },
|
|
114
|
+
checked,
|
|
115
|
+
disabled,
|
|
116
|
+
...checkboxProps,
|
|
117
|
+
...props,
|
|
118
|
+
...isActive && activeStyle ? activeStyle : void 0,
|
|
119
|
+
children: propsActive.children
|
|
120
|
+
}), bubbleInput]
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
var CheckboxIndicator = (0, import_core.createStyledHOC)(CheckboxIndicatorFrame, function(props, forwardedRef) {
|
|
125
|
+
var { children, forceMount, activeStyle, ...indicatorProps } = props;
|
|
126
|
+
var { active } = import_CheckboxStyledContext.CheckboxStyledContext.useStyledContext();
|
|
127
|
+
var context = import_react.default.useContext(CheckboxContext);
|
|
128
|
+
if (forceMount || (0, import_checkbox_headless.isIndeterminate)(context.checked) || context.checked === true) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxIndicatorFrame, {
|
|
129
|
+
pointerEvents: "none",
|
|
130
|
+
...indicatorProps,
|
|
131
|
+
...active && activeStyle ? activeStyle : void 0,
|
|
132
|
+
ref: forwardedRef,
|
|
133
|
+
children
|
|
134
|
+
});
|
|
135
|
+
return null;
|
|
136
|
+
});
|
|
137
|
+
var Checkbox2 = (0, import_core.withStaticProperties)(CheckboxComponent, { Indicator: CheckboxIndicator });
|
|
@@ -1,119 +1,139 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
var __create = Object.create;
|
|
3
5
|
var __defProp = Object.defineProperty;
|
|
4
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
10
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
12
15
|
};
|
|
13
16
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: () => from[key],
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
21
24
|
};
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: true
|
|
28
|
+
}) : target, mod));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
30
|
var Checkbox_exports = {};
|
|
26
31
|
__export(Checkbox_exports, {
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
Checkbox: () => Checkbox2,
|
|
33
|
+
CheckboxContext: () => CheckboxContext,
|
|
34
|
+
CheckboxFrame: () => CheckboxFrame,
|
|
35
|
+
CheckboxIndicatorFrame: () => CheckboxIndicatorFrame
|
|
29
36
|
});
|
|
30
37
|
module.exports = __toCommonJS(Checkbox_exports);
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
+
var import_checkbox_headless = require("@tamagui/checkbox-headless");
|
|
31
40
|
var import_core = require("@tamagui/core");
|
|
32
|
-
var
|
|
33
|
-
var
|
|
41
|
+
var import_focusable = require("@tamagui/focusable");
|
|
42
|
+
var import_use_controllable_state = require("@tamagui/use-controllable-state");
|
|
43
|
+
var import_react = __toESM(require("react"), 1);
|
|
34
44
|
var import_CheckboxStyledContext = require("./CheckboxStyledContext.native.js");
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
var CheckboxIndicatorFrame = (0, import_core.styled)(import_core.View, {
|
|
46
|
+
displayName: "CheckboxIndicator",
|
|
47
|
+
context: import_CheckboxStyledContext.CheckboxStyledContext
|
|
48
|
+
}, { accept: { activeStyle: "style" } });
|
|
49
|
+
var CheckboxFrame = (0, import_core.styled)(import_core.View, {
|
|
50
|
+
displayName: "Checkbox",
|
|
51
|
+
render: "button",
|
|
52
|
+
context: import_CheckboxStyledContext.CheckboxStyledContext,
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
justifyContent: "center",
|
|
55
|
+
variants: { disabled: { true: {
|
|
56
|
+
pointerEvents: "none",
|
|
57
|
+
userSelect: "none"
|
|
58
|
+
} } }
|
|
59
|
+
}, { accept: { activeStyle: "style" } });
|
|
60
|
+
var CheckboxContext = /* @__PURE__ */ import_react.default.createContext({
|
|
61
|
+
checked: false,
|
|
62
|
+
disabled: false
|
|
63
|
+
});
|
|
64
|
+
var CheckboxComponent = (0, import_core.createStyledHOC)(CheckboxFrame, function Checkbox(_props, forwardedRef) {
|
|
65
|
+
var { checked: checkedProp, defaultChecked, onCheckedChange, native, activeStyle, activeTheme, ...props } = _props;
|
|
66
|
+
var propsActive = (0, import_core.useProps)(props);
|
|
67
|
+
var styledContext = import_react.default.useContext(import_CheckboxStyledContext.CheckboxStyledContext.context);
|
|
68
|
+
var [checked = false, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
69
|
+
prop: checkedProp,
|
|
70
|
+
defaultProp: defaultChecked,
|
|
71
|
+
onChange: onCheckedChange
|
|
72
|
+
});
|
|
73
|
+
var { checkboxProps, checkboxRef, bubbleInput } = (0, import_checkbox_headless.useCheckbox)(propsActive, [checked, setChecked], forwardedRef);
|
|
74
|
+
import_react.default.useEffect(function() {
|
|
75
|
+
if (!props.id) return;
|
|
76
|
+
if (props.disabled) return;
|
|
77
|
+
return (0, import_focusable.registerFocusable)(props.id, {
|
|
78
|
+
focusAndSelect: function() {
|
|
79
|
+
setChecked === null || setChecked === void 0 || setChecked(function(value) {
|
|
80
|
+
return !value;
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
focus: function() {}
|
|
84
|
+
});
|
|
85
|
+
}, [props.id, props.disabled]);
|
|
86
|
+
if ((0, import_core.shouldRenderNativePlatform)(native) === "web") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
87
|
+
type: "checkbox",
|
|
88
|
+
defaultChecked: (0, import_checkbox_headless.isIndeterminate)(checked) ? false : checked,
|
|
89
|
+
tabIndex: -1,
|
|
90
|
+
ref: checkboxRef,
|
|
91
|
+
disabled: checkboxProps.disabled,
|
|
92
|
+
style: checkboxProps.style
|
|
93
|
+
});
|
|
94
|
+
var memoizedContext = (0, import_react.useMemo)(function() {
|
|
95
|
+
return {
|
|
96
|
+
checked,
|
|
97
|
+
disabled: checkboxProps.disabled
|
|
98
|
+
};
|
|
99
|
+
}, [checked, checkboxProps.disabled]);
|
|
100
|
+
var isActive = !!checked;
|
|
101
|
+
var disabled = checkboxProps.disabled;
|
|
102
|
+
var _propsActive_size, _ref;
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxContext.Provider, {
|
|
104
|
+
value: memoizedContext,
|
|
105
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_CheckboxStyledContext.CheckboxStyledContext.Provider, {
|
|
106
|
+
size: (_ref = (_propsActive_size = propsActive.size) !== null && _propsActive_size !== void 0 ? _propsActive_size : styledContext === null || styledContext === void 0 ? void 0 : styledContext.size) !== null && _ref !== void 0 ? _ref : true,
|
|
107
|
+
active: isActive,
|
|
108
|
+
disabled,
|
|
109
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxFrame, {
|
|
110
|
+
render: "button",
|
|
111
|
+
ref: checkboxRef,
|
|
112
|
+
theme: activeTheme !== null && activeTheme !== void 0 ? activeTheme : null,
|
|
113
|
+
...import_core.isWeb && { type: "button" },
|
|
114
|
+
checked,
|
|
115
|
+
disabled,
|
|
116
|
+
...checkboxProps,
|
|
117
|
+
...props,
|
|
118
|
+
...isActive && activeStyle ? activeStyle : void 0,
|
|
119
|
+
children: propsActive.children
|
|
120
|
+
}), bubbleInput]
|
|
121
|
+
})
|
|
122
|
+
});
|
|
52
123
|
});
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
}
|
|
124
|
+
var CheckboxIndicator = (0, import_core.createStyledHOC)(CheckboxIndicatorFrame, function(props, forwardedRef) {
|
|
125
|
+
var { children, forceMount, activeStyle, ...indicatorProps } = props;
|
|
126
|
+
var { active } = import_CheckboxStyledContext.CheckboxStyledContext.useStyledContext();
|
|
127
|
+
var context = import_react.default.useContext(CheckboxContext);
|
|
128
|
+
if (forceMount || (0, import_checkbox_headless.isIndeterminate)(context.checked) || context.checked === true) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxIndicatorFrame, {
|
|
129
|
+
pointerEvents: "none",
|
|
130
|
+
...indicatorProps,
|
|
131
|
+
...active && activeStyle ? activeStyle : void 0,
|
|
132
|
+
ref: forwardedRef,
|
|
133
|
+
children
|
|
134
|
+
});
|
|
135
|
+
return null;
|
|
118
136
|
});
|
|
137
|
+
var Checkbox2 = (0, import_core.withStaticProperties)(CheckboxComponent, { Indicator: CheckboxIndicator });
|
|
138
|
+
|
|
119
139
|
//# 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,EACRnB,SAAQ,CAAAiB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gB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H,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}, { accept: { activeStyle: \"style\" } });\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}, { accept: { activeStyle: \"style\" } });\nvar CheckboxContext = /* @__PURE__ */ import_react.default.createContext({\n\tchecked: false,\n\tdisabled: false\n});\nvar CheckboxComponent = (0, import_core.createStyledHOC)(CheckboxFrame, function Checkbox(_props, forwardedRef) {\n\tvar { checked: checkedProp, defaultChecked, onCheckedChange, native, activeStyle, activeTheme, ...props } = _props;\n\tvar propsActive = (0, import_core.useProps)(props);\n\tvar styledContext = import_react.default.useContext(import_CheckboxStyledContext.CheckboxStyledContext.context);\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)(\n\t\t// @ts-ignore\n\t\tpropsActive,\n\t\t[checked, setChecked],\n\t\tforwardedRef\n\t);\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\tvar _propsActive_size, _ref;\n\treturn /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxContext.Provider, {\n\t\tvalue: memoizedContext,\n\t\tchildren: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_CheckboxStyledContext.CheckboxStyledContext.Provider, {\n\t\t\tsize: (_ref = (_propsActive_size = propsActive.size) !== null && _propsActive_size !== void 0 ? _propsActive_size : styledContext === null || styledContext === void 0 ? void 0 : styledContext.size) !== null && _ref !== void 0 ? _ref : true,\n\t\t\tactive: isActive,\n\t\t\tdisabled,\n\t\t\tchildren: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxFrame, {\n\t\t\t\trender: \"button\",\n\t\t\t\tref: checkboxRef,\n\t\t\t\ttheme: activeTheme !== null && activeTheme !== void 0 ? activeTheme : null,\n\t\t\t\t...import_core.isWeb && { type: \"button\" },\n\t\t\t\tchecked,\n\t\t\t\tdisabled,\n\t\t\t\t...checkboxProps,\n\t\t\t\t...props,\n\t\t\t\t...isActive && activeStyle ? activeStyle : void 0,\n\t\t\t\tchildren: propsActive.children\n\t\t\t}), bubbleInput]\n\t\t})\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\t...active && activeStyle ? activeStyle : void 0,\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,CA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AAmB,EAAE,WAAW,kBAAkB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createStyledContext } from "@tamagui/core";
|
|
2
|
+
|
|
2
3
|
const CheckboxStyledContext = createStyledContext({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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,"
|
|
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,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var CheckboxStyledContext_exports = {};
|
|
25
|
+
__export(CheckboxStyledContext_exports, { CheckboxStyledContext: () => CheckboxStyledContext });
|
|
26
|
+
module.exports = __toCommonJS(CheckboxStyledContext_exports);
|
|
27
|
+
var import_core = require("@tamagui/core");
|
|
28
|
+
var CheckboxStyledContext = (0, import_core.createStyledContext)({
|
|
29
|
+
size: true,
|
|
30
|
+
active: false,
|
|
31
|
+
disabled: false
|
|
32
|
+
});
|
|
@@ -1,38 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
24
|
var CheckboxStyledContext_exports = {};
|
|
26
|
-
__export(CheckboxStyledContext_exports, {
|
|
27
|
-
CheckboxStyledContext: () => CheckboxStyledContext
|
|
28
|
-
});
|
|
25
|
+
__export(CheckboxStyledContext_exports, { CheckboxStyledContext: () => CheckboxStyledContext });
|
|
29
26
|
module.exports = __toCommonJS(CheckboxStyledContext_exports);
|
|
30
27
|
var import_core = require("@tamagui/core");
|
|
31
28
|
var CheckboxStyledContext = (0, import_core.createStyledContext)({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
active: false,
|
|
36
|
-
disabled: false
|
|
29
|
+
size: true,
|
|
30
|
+
active: false,
|
|
31
|
+
disabled: false
|
|
37
32
|
});
|
|
33
|
+
|
|
38
34
|
//# sourceMappingURL=CheckboxStyledContext.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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,qBAAqB;CAC/D,MAAM;CACN,QAAQ;CACR,UAAU;AACZ,CAAC"}
|
package/dist/jsx/index.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
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"
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
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,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
module.exports = __toCommonJS(index_exports);
|
|
21
|
+
__reExport(index_exports, require("./Checkbox.native.js"), module.exports);
|
|
22
|
+
__reExport(index_exports, require("./CheckboxStyledContext.native.js"), module.exports);
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,40 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
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
8
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
21
16
|
};
|
|
22
17
|
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);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
19
|
var index_exports = {};
|
|
27
|
-
__export(index_exports, {
|
|
28
|
-
Checkbox: () => Checkbox
|
|
29
|
-
});
|
|
30
20
|
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
21
|
__reExport(index_exports, require("./Checkbox.native.js"), module.exports);
|
|
35
22
|
__reExport(index_exports, require("./CheckboxStyledContext.native.js"), module.exports);
|
|
36
|
-
|
|
37
|
-
Frame: import_Checkbox.CheckboxFrame,
|
|
38
|
-
Indicator: import_Checkbox.CheckboxIndicatorFrame
|
|
39
|
-
});
|
|
23
|
+
|
|
40
24
|
//# sourceMappingURL=index.native.js.map
|