@tamagui/checkbox 2.0.0-rc.4 → 2.0.0-rc.40
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 +93 -88
- package/dist/cjs/Checkbox.native.js +93 -91
- package/dist/cjs/Checkbox.native.js.map +1 -1
- package/dist/cjs/CheckboxStyledContext.cjs +14 -12
- package/dist/cjs/CheckboxStyledContext.native.js +20 -18
- package/dist/cjs/CheckboxStyledContext.native.js.map +1 -1
- package/dist/cjs/createCheckbox.cjs +163 -153
- package/dist/cjs/createCheckbox.native.js +180 -176
- package/dist/cjs/createCheckbox.native.js.map +1 -1
- package/dist/cjs/index.cjs +15 -13
- package/dist/cjs/index.native.js +15 -13
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Checkbox.mjs +77 -74
- package/dist/esm/Checkbox.mjs.map +1 -1
- package/dist/esm/Checkbox.native.js +77 -77
- package/dist/esm/Checkbox.native.js.map +1 -1
- package/dist/esm/CheckboxStyledContext.mjs +2 -2
- package/dist/esm/CheckboxStyledContext.native.js +2 -2
- package/dist/esm/createCheckbox.mjs +119 -114
- package/dist/esm/createCheckbox.mjs.map +1 -1
- package/dist/esm/createCheckbox.native.js +134 -136
- package/dist/esm/createCheckbox.native.js.map +1 -1
- package/dist/esm/index.js +6 -8
- package/dist/esm/index.js.map +1 -6
- package/dist/jsx/Checkbox.mjs +77 -74
- package/dist/jsx/Checkbox.mjs.map +1 -1
- package/dist/jsx/Checkbox.native.js +93 -91
- package/dist/jsx/Checkbox.native.js.map +1 -1
- package/dist/jsx/CheckboxStyledContext.mjs +2 -2
- package/dist/jsx/CheckboxStyledContext.native.js +20 -18
- package/dist/jsx/CheckboxStyledContext.native.js.map +1 -1
- package/dist/jsx/createCheckbox.mjs +119 -114
- package/dist/jsx/createCheckbox.mjs.map +1 -1
- package/dist/jsx/createCheckbox.native.js +180 -176
- package/dist/jsx/createCheckbox.native.js.map +1 -1
- package/dist/jsx/index.js +6 -8
- package/dist/jsx/index.js.map +1 -6
- package/dist/jsx/index.native.js +15 -13
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +19 -22
- package/types/createCheckbox.d.ts +3 -3
- package/types/index.d.ts +3 -3
- package/dist/cjs/Checkbox.js +0 -108
- package/dist/cjs/Checkbox.js.map +0 -6
- package/dist/cjs/CheckboxStyledContext.js +0 -28
- package/dist/cjs/CheckboxStyledContext.js.map +0 -6
- package/dist/cjs/createCheckbox.js +0 -165
- package/dist/cjs/createCheckbox.js.map +0 -6
- package/dist/cjs/index.js +0 -28
- package/dist/cjs/index.js.map +0 -6
- package/dist/esm/Checkbox.js +0 -95
- package/dist/esm/Checkbox.js.map +0 -6
- package/dist/esm/CheckboxStyledContext.js +0 -12
- package/dist/esm/CheckboxStyledContext.js.map +0 -6
- package/dist/esm/createCheckbox.js +0 -158
- package/dist/esm/createCheckbox.js.map +0 -6
- package/dist/jsx/Checkbox.js +0 -95
- package/dist/jsx/Checkbox.js.map +0 -6
- package/dist/jsx/CheckboxStyledContext.js +0 -12
- package/dist/jsx/CheckboxStyledContext.js.map +0 -6
- package/dist/jsx/createCheckbox.js +0 -158
- package/dist/jsx/createCheckbox.js.map +0 -6
|
@@ -4,204 +4,208 @@ var __create = Object.create;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
8
|
-
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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, {
|
|
17
18
|
get: () => from[key],
|
|
18
19
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
20
|
});
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
22
24
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
}), mod);
|
|
34
36
|
var createCheckbox_exports = {};
|
|
35
37
|
__export(createCheckbox_exports, {
|
|
36
38
|
CheckboxContext: () => CheckboxContext,
|
|
37
39
|
createCheckbox: () => createCheckbox
|
|
38
40
|
});
|
|
39
41
|
module.exports = __toCommonJS(createCheckbox_exports);
|
|
40
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
+
var import_checkbox_headless = require("@tamagui/checkbox-headless");
|
|
44
|
+
var import_core = require("@tamagui/core");
|
|
45
|
+
var import_focusable = require("@tamagui/focusable");
|
|
46
|
+
var import_font_size = require("@tamagui/font-size");
|
|
47
|
+
var import_get_token = require("@tamagui/get-token");
|
|
48
|
+
var import_helpers_tamagui = require("@tamagui/helpers-tamagui");
|
|
49
|
+
var import_use_controllable_state = require("@tamagui/use-controllable-state");
|
|
50
|
+
var import_react = __toESM(require("react"), 1);
|
|
51
|
+
var import_Checkbox = require("./Checkbox.native.js");
|
|
52
|
+
var import_CheckboxStyledContext = require("./CheckboxStyledContext.native.js");
|
|
53
|
+
var CheckboxContext = /* @__PURE__ */import_react.default.createContext({
|
|
54
|
+
checked: false,
|
|
55
|
+
disabled: false
|
|
56
|
+
});
|
|
57
|
+
var ensureContext = function (x) {
|
|
58
|
+
if (!x.context) x.context = CheckboxContext;
|
|
59
|
+
};
|
|
58
60
|
function createCheckbox(createProps) {
|
|
59
61
|
var {
|
|
60
62
|
Frame = import_Checkbox.CheckboxFrame,
|
|
61
63
|
Indicator = import_Checkbox.CheckboxIndicatorFrame
|
|
62
64
|
} = createProps;
|
|
63
|
-
ensureContext(Frame)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
type: "checkbox",
|
|
113
|
-
defaultChecked: (0, import_checkbox_headless.isIndeterminate)(checked) ? !1 : checked,
|
|
114
|
-
tabIndex: -1,
|
|
115
|
-
ref: checkboxRef,
|
|
116
|
-
disabled: checkboxProps.disabled,
|
|
117
|
-
style: {
|
|
118
|
-
appearance: "auto",
|
|
119
|
-
accentColor: "var(--color6)",
|
|
120
|
-
...checkboxProps.style
|
|
121
|
-
}
|
|
65
|
+
ensureContext(Frame);
|
|
66
|
+
ensureContext(Indicator);
|
|
67
|
+
var FrameComponent = Frame.styleable(function Checkbox(_props, forwardedRef) {
|
|
68
|
+
var {
|
|
69
|
+
scaleSize = .45,
|
|
70
|
+
sizeAdjust = 0,
|
|
71
|
+
scaleIcon,
|
|
72
|
+
checked: checkedProp,
|
|
73
|
+
defaultChecked,
|
|
74
|
+
onCheckedChange,
|
|
75
|
+
native,
|
|
76
|
+
unstyled = false,
|
|
77
|
+
activeStyle,
|
|
78
|
+
activeTheme,
|
|
79
|
+
...props
|
|
80
|
+
} = _props;
|
|
81
|
+
var propsActive = (0, import_core.useProps)(props);
|
|
82
|
+
var styledContext = import_react.default.useContext(import_CheckboxStyledContext.CheckboxStyledContext.context);
|
|
83
|
+
var adjustedSize = 0;
|
|
84
|
+
var size = 0;
|
|
85
|
+
if (!unstyled) {
|
|
86
|
+
var _propsActive_size, _ref;
|
|
87
|
+
adjustedSize = (0, import_core.getVariableValue)((0, import_get_token.getSize)((_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", {
|
|
88
|
+
shift: sizeAdjust
|
|
89
|
+
}));
|
|
90
|
+
size = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize;
|
|
91
|
+
}
|
|
92
|
+
var [checked = false, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
93
|
+
prop: checkedProp,
|
|
94
|
+
defaultProp: defaultChecked,
|
|
95
|
+
onChange: onCheckedChange
|
|
96
|
+
});
|
|
97
|
+
var {
|
|
98
|
+
checkboxProps,
|
|
99
|
+
checkboxRef,
|
|
100
|
+
bubbleInput
|
|
101
|
+
} = (0, import_checkbox_headless.useCheckbox)(
|
|
102
|
+
// @ts-ignore
|
|
103
|
+
propsActive, [checked, setChecked], forwardedRef);
|
|
104
|
+
import_react.default.useEffect(function () {
|
|
105
|
+
if (!props.id) return;
|
|
106
|
+
if (props.disabled) return;
|
|
107
|
+
return (0, import_focusable.registerFocusable)(props.id, {
|
|
108
|
+
focusAndSelect: function () {
|
|
109
|
+
setChecked === null || setChecked === void 0 || setChecked(function (value) {
|
|
110
|
+
return !value;
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
focus: function () {}
|
|
122
114
|
});
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
115
|
+
}, [props.id, props.disabled]);
|
|
116
|
+
if ((0, import_core.shouldRenderNativePlatform)(native) === "web") return /* @__PURE__ */(0, import_jsx_runtime.jsx)("input", {
|
|
117
|
+
type: "checkbox",
|
|
118
|
+
defaultChecked: (0, import_checkbox_headless.isIndeterminate)(checked) ? false : checked,
|
|
119
|
+
tabIndex: -1,
|
|
120
|
+
ref: checkboxRef,
|
|
121
|
+
disabled: checkboxProps.disabled,
|
|
122
|
+
style: {
|
|
123
|
+
appearance: "auto",
|
|
124
|
+
accentColor: "var(--color6)",
|
|
125
|
+
...checkboxProps.style
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
var memoizedContext = (0, import_react.useMemo)(function () {
|
|
129
|
+
return {
|
|
130
|
+
checked,
|
|
131
|
+
disabled: checkboxProps.disabled
|
|
132
|
+
};
|
|
133
|
+
}, [checked, checkboxProps.disabled]);
|
|
134
|
+
var isActive = !!checked;
|
|
135
|
+
var disabled = checkboxProps.disabled;
|
|
136
|
+
var _propsActive_size1, _ref1, _ref2;
|
|
137
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(CheckboxContext.Provider, {
|
|
138
|
+
value: memoizedContext,
|
|
139
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_CheckboxStyledContext.CheckboxStyledContext.Provider, {
|
|
140
|
+
size: (_ref1 = (_propsActive_size1 = propsActive.size) !== null && _propsActive_size1 !== void 0 ? _propsActive_size1 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.size) !== null && _ref1 !== void 0 ? _ref1 : "$true",
|
|
141
|
+
scaleIcon: (_ref2 = scaleIcon !== null && scaleIcon !== void 0 ? scaleIcon : styledContext === null || styledContext === void 0 ? void 0 : styledContext.scaleIcon) !== null && _ref2 !== void 0 ? _ref2 : 1,
|
|
142
|
+
unstyled,
|
|
143
|
+
active: isActive,
|
|
144
|
+
disabled,
|
|
145
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(Frame, {
|
|
146
|
+
render: "button",
|
|
147
|
+
ref: checkboxRef,
|
|
139
148
|
unstyled,
|
|
140
|
-
|
|
149
|
+
theme: activeTheme !== null && activeTheme !== void 0 ? activeTheme : null,
|
|
150
|
+
...(import_core.isWeb && {
|
|
151
|
+
type: "button"
|
|
152
|
+
}),
|
|
153
|
+
...(!unstyled && {
|
|
154
|
+
width: size,
|
|
155
|
+
height: size,
|
|
156
|
+
size
|
|
157
|
+
}),
|
|
158
|
+
checked,
|
|
141
159
|
disabled,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
unstyled
|
|
146
|
-
|
|
147
|
-
...(import_core.isWeb && {
|
|
148
|
-
type: "button"
|
|
160
|
+
...checkboxProps,
|
|
161
|
+
...props,
|
|
162
|
+
...(isActive && {
|
|
163
|
+
...(!unstyled && !activeStyle && {
|
|
164
|
+
backgroundColor: "$backgroundActive"
|
|
149
165
|
}),
|
|
150
|
-
...
|
|
151
|
-
width: size,
|
|
152
|
-
height: size,
|
|
153
|
-
size
|
|
154
|
-
}),
|
|
155
|
-
checked,
|
|
156
|
-
disabled,
|
|
157
|
-
...checkboxProps,
|
|
158
|
-
...props,
|
|
159
|
-
...(isActive && {
|
|
160
|
-
...(!unstyled && !activeStyle && {
|
|
161
|
-
backgroundColor: "$backgroundActive"
|
|
162
|
-
}),
|
|
163
|
-
...activeStyle
|
|
164
|
-
}),
|
|
165
|
-
children: propsActive.children
|
|
166
|
-
}), bubbleInput]
|
|
167
|
-
})
|
|
168
|
-
});
|
|
169
|
-
}),
|
|
170
|
-
IndicatorComponent = Indicator.styleable(function (props, forwardedRef) {
|
|
171
|
-
var {
|
|
172
|
-
children: childrenProp,
|
|
173
|
-
forceMount,
|
|
174
|
-
disablePassStyles,
|
|
175
|
-
unstyled = !1,
|
|
176
|
-
activeStyle,
|
|
177
|
-
...indicatorProps
|
|
178
|
-
} = props,
|
|
179
|
-
styledContext = import_CheckboxStyledContext.CheckboxStyledContext.useStyledContext(),
|
|
180
|
-
{
|
|
181
|
-
active
|
|
182
|
-
} = styledContext,
|
|
183
|
-
children = childrenProp;
|
|
184
|
-
if (!unstyled) {
|
|
185
|
-
var iconSize = (typeof styledContext.size == "number" ? styledContext.size * 0.65 : (0, import_font_size.getFontSize)(styledContext.size)) * styledContext.scaleIcon,
|
|
186
|
-
theme = (0, import_core.useTheme)(),
|
|
187
|
-
getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
188
|
-
size: iconSize,
|
|
189
|
-
color: theme.color
|
|
166
|
+
...activeStyle
|
|
190
167
|
}),
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
var context = import_react.default.useContext(CheckboxContext);
|
|
197
|
-
return forceMount || (0, import_checkbox_headless.isIndeterminate)(context.checked) || context.checked === !0 ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(Indicator, {
|
|
198
|
-
pointerEvents: "none",
|
|
199
|
-
...indicatorProps,
|
|
200
|
-
...(active && activeStyle),
|
|
201
|
-
ref: forwardedRef,
|
|
202
|
-
children
|
|
203
|
-
}) : null;
|
|
168
|
+
children: propsActive.children
|
|
169
|
+
}), bubbleInput]
|
|
170
|
+
})
|
|
204
171
|
});
|
|
172
|
+
});
|
|
173
|
+
var IndicatorComponent = Indicator.styleable(function (props, forwardedRef) {
|
|
174
|
+
var {
|
|
175
|
+
children: childrenProp,
|
|
176
|
+
forceMount,
|
|
177
|
+
disablePassStyles,
|
|
178
|
+
unstyled = false,
|
|
179
|
+
activeStyle,
|
|
180
|
+
...indicatorProps
|
|
181
|
+
} = props;
|
|
182
|
+
var styledContext = import_CheckboxStyledContext.CheckboxStyledContext.useStyledContext();
|
|
183
|
+
var {
|
|
184
|
+
active
|
|
185
|
+
} = styledContext;
|
|
186
|
+
var children = childrenProp;
|
|
187
|
+
if (!unstyled) {
|
|
188
|
+
var iconSize = (typeof styledContext.size === "number" ? styledContext.size * .65 : (0, import_font_size.getFontSize)(styledContext.size)) * styledContext.scaleIcon;
|
|
189
|
+
var theme = (0, import_core.useTheme)();
|
|
190
|
+
var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
191
|
+
size: iconSize,
|
|
192
|
+
color: theme.color
|
|
193
|
+
});
|
|
194
|
+
children = import_react.default.Children.toArray(childrenProp).map(function (child) {
|
|
195
|
+
if (disablePassStyles || ! /* @__PURE__ */import_react.default.isValidElement(child)) return child;
|
|
196
|
+
return getThemedIcon(child);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
var context = import_react.default.useContext(CheckboxContext);
|
|
200
|
+
if (forceMount || (0, import_checkbox_headless.isIndeterminate)(context.checked) || context.checked === true) return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Indicator, {
|
|
201
|
+
pointerEvents: "none",
|
|
202
|
+
...indicatorProps,
|
|
203
|
+
...(active && activeStyle),
|
|
204
|
+
ref: forwardedRef,
|
|
205
|
+
children
|
|
206
|
+
});
|
|
207
|
+
return null;
|
|
208
|
+
});
|
|
205
209
|
return (0, import_core.withStaticProperties)(FrameComponent, {
|
|
206
210
|
Indicator: IndicatorComponent
|
|
207
211
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["isNodeMode","mod","__esModule","__defProp","target","value","enumerable","__toCommonJS","__copyProps","createCheckbox_exports","__export","CheckboxContext","createCheckbox","module","exports","import_jsx_runtime","require","import_checkbox_headless","import_core","import_focusable","import_font_size","import_get_token","import_helpers_tamagui","import_use_controllable_state","import_react","__toESM","import_Checkbox","import_CheckboxStyledContext","default","createContext","checked","disabled","ensureContext","x","context","createProps","Frame","CheckboxFrame","Indicator","CheckboxIndicatorFrame","FrameComponent","styleable","Checkbox","_props","forwardedRef","scaleSize","sizeAdjust","scaleIcon","checkedProp","defaultChecked","onCheckedChange","native","unstyled","activeStyle","activeTheme","props","propsActive","useProps","styledContext","useContext","CheckboxStyledContext","adjustedSize","size","_propsActive_size","_ref","getVariableValue","getSize","shift","Math","round","setChecked","useControllableState","prop","defaultProp","onChange","checkboxProps","checkboxRef","bubbleInput","useCheckbox","useEffect","id","registerFocusable","focusAndSelect","focus","shouldRenderNativePlatform","jsx","type","isIndeterminate","tabIndex","ref","style","appearance","accentColor","memoizedContext","useMemo","isActive","_propsActive_size1","_ref1","_ref2","Provider","children","jsxs","active","render","theme","isWeb","width","height","backgroundColor","IndicatorComponent","childrenProp","forceMount","disablePassStyles","indicatorProps","useStyledContext","iconSize","getFontSize","useTheme","getThemedIcon","useGetThemedIcon","color","Children","toArray","map","child","isValidElement","pointerEvents","withStaticProperties"],"sources":["../../src/createCheckbox.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,UAAA,KAAAC,GAAA,KAAAA,GAAA,CAAAC,UAAA,GAAAC,SAAA,CAAAC,MAAA;EAAAC,KAAA,EAAAJ,GAAA;EAAAK,UAAA;AAAA,KAAAF,MAAA,EAAAH,GAAA;AAIA,IAAAM,YAAA,GAAAN,GAAA,IAAAO,WAA6C,CAAAL,SAAA;EAAAE,KAAA;AAAA,IAAAJ,GAAA;AAE7C,IAAAQ,sBAOO;AACPC,QAAA,CAAAD,sBAAkC;EAClCE,eAAA,EAAAA,CAAA,KAA4BA,eAAA;EAC5BC,cAAA,EAAAA,CAAA,KAAwBA;AACxB;AACAC,MAAA,CAAAC,OAAA,GAAAP,YAAA,CAAAE,sBAAqC;AACrC,IAAAM,kBAA+B,GAAAC,OAAA;AAE/B,IAAAC,wBAAsD,GAAAD,OAAA;AACtD,IAAAE,WAAA,GAAAF,OAAA,gBAAsC;AA2I5B,IAAAG,gBAAA,GAAAH,OAAA;AAtFH,IAAAI,gBAAM,GAAAJ,OAAkB,qBAAM;AAGlC,IACDK,gBAAS,GAAAL,OAAA;AAAA,IACTM,sBAAU,GAAAN,OAAA;AACZ,IAACO,6BAAA,GAAAP,OAAA;AAED,IAAAQ,YAAM,GAAAC,OAAiB,CAAAT,OAAW;AAChC,IAAAU,eAAgB,GAAAV,OAAA;AACd,IAAAW,4BAAY,GAAAX,OAAA;AAAA,IACdL,eAAA,kBAAAa,YAAA,CAAAI,OAAA,CAAAC,aAAA;EACFC,OAAA;EAEOC,QAAS;AAId;AAMA,IAAAC,aAAc,YAAAA,CAAKC,CAAA;EACnB,KAAAA,CAAA,CAAAC,OAAA,EAAcD,CAAA,CAAAC,OA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AA,CAAA6G,oBAA+B,EAAAvF,cAAA;IAAAF,SAAA,EAAAuE;EAAA;AAAA","ignoreList":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,29 +3,31 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
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, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
21
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
20
|
-
value:
|
|
22
|
+
value: true
|
|
21
23
|
}), mod);
|
|
22
24
|
var index_exports = {};
|
|
23
25
|
__export(index_exports, {
|
|
24
26
|
Checkbox: () => Checkbox
|
|
25
27
|
});
|
|
26
28
|
module.exports = __toCommonJS(index_exports);
|
|
27
|
-
var import_Checkbox = require("./Checkbox.cjs")
|
|
28
|
-
|
|
29
|
+
var import_Checkbox = require("./Checkbox.cjs");
|
|
30
|
+
var import_createCheckbox = require("./createCheckbox.cjs");
|
|
29
31
|
__reExport(index_exports, require("./createCheckbox.cjs"), module.exports);
|
|
30
32
|
__reExport(index_exports, require("./Checkbox.cjs"), module.exports);
|
|
31
33
|
__reExport(index_exports, require("./CheckboxStyledContext.cjs"), module.exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,29 +5,31 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
23
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
22
|
-
value:
|
|
24
|
+
value: true
|
|
23
25
|
}), mod);
|
|
24
26
|
var index_exports = {};
|
|
25
27
|
__export(index_exports, {
|
|
26
28
|
Checkbox: () => Checkbox
|
|
27
29
|
});
|
|
28
30
|
module.exports = __toCommonJS(index_exports);
|
|
29
|
-
var import_Checkbox = require("./Checkbox.native.js")
|
|
30
|
-
|
|
31
|
+
var import_Checkbox = require("./Checkbox.native.js");
|
|
32
|
+
var import_createCheckbox = require("./createCheckbox.native.js");
|
|
31
33
|
__reExport(index_exports, require("./createCheckbox.native.js"), module.exports);
|
|
32
34
|
__reExport(index_exports, require("./Checkbox.native.js"), module.exports);
|
|
33
35
|
__reExport(index_exports, require("./CheckboxStyledContext.native.js"), module.exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","Checkbox","module","exports","import_Checkbox","require","import_createCheckbox","__reExport","createCheckbox","Frame","CheckboxFrame","Indicator","CheckboxIndicatorFrame"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","Checkbox","module","exports","import_Checkbox","require","import_createCheckbox","__reExport","createCheckbox","Frame","CheckboxFrame","Indicator","CheckboxIndicatorFrame"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAsD,CAAAK,aAAA;AACtD,IAAAK,eAAA,GAAAC,OAA+B;AAE/B,IAAAC,qBAAA,GAAcD,OAAA,8BAHd;AAIAE,UAAA,CAAAR,aAAA,EAAcM,OAAA,6BAJd,GAAAH,MAAA,CAAAC,OAAA;AAKAI,UAAA,CAAAR,aAAA,EAAcM,OAAA,0BAAAH,MAAA,CAAAC,OALd;AAQOI,UAAM,CAAAR,aAAW,EAAAM,OAAA,oCAAe,GAAAH,MAAA,CAAAC,OAAA;AAAA,IACrCF,QAAO,OAAAK,qBAAA,CAAAE,cAAA;EACPC,KAAA,EAAAL,eAAW,CAAAM,aAAA;EACZC,SAAA,EAAAP,eAAA,CAAAQ","ignoreList":[]}
|