@tamagui/checkbox 1.113.0 → 1.113.2
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/esm/Checkbox.native.js +70 -70
- package/dist/esm/Checkbox.native.js.map +6 -1
- package/dist/esm/CheckboxStyledContext.native.js +4 -2
- package/dist/esm/CheckboxStyledContext.native.js.map +6 -1
- package/dist/esm/createCheckbox.native.js +93 -105
- package/dist/esm/createCheckbox.native.js.map +6 -1
- package/dist/esm/index.native.js +9 -7
- package/dist/esm/index.native.js.map +6 -1
- package/package.json +16 -16
|
@@ -1,80 +1,80 @@
|
|
|
1
1
|
import { getVariableValue, styled } from "@tamagui/core";
|
|
2
2
|
import { getSize } from "@tamagui/get-token";
|
|
3
3
|
import { ThemeableStack } from "@tamagui/stacks";
|
|
4
|
-
import { CheckboxStyledContext } from "./CheckboxStyledContext
|
|
5
|
-
var INDICATOR_NAME = "CheckboxIndicator",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
import { CheckboxStyledContext } from "./CheckboxStyledContext";
|
|
5
|
+
var INDICATOR_NAME = "CheckboxIndicator", CheckboxIndicatorFrame = styled(ThemeableStack, {
|
|
6
|
+
// use Checkbox for easier themes
|
|
7
|
+
name: INDICATOR_NAME,
|
|
8
|
+
context: CheckboxStyledContext,
|
|
9
|
+
variants: {
|
|
10
|
+
unstyled: {
|
|
11
|
+
false: {}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
16
|
+
}
|
|
17
|
+
}), CHECKBOX_NAME = "Checkbox", CheckboxFrame = styled(ThemeableStack, {
|
|
18
|
+
name: CHECKBOX_NAME,
|
|
19
|
+
tag: "button",
|
|
20
|
+
context: CheckboxStyledContext,
|
|
21
|
+
variants: {
|
|
22
|
+
unstyled: {
|
|
23
|
+
false: {
|
|
24
|
+
size: "$true",
|
|
25
|
+
backgroundColor: "$background",
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
justifyContent: "center",
|
|
28
|
+
pressTheme: !0,
|
|
29
|
+
focusable: !0,
|
|
30
|
+
borderWidth: 1,
|
|
31
|
+
borderColor: "$borderColor",
|
|
32
|
+
hoverStyle: {
|
|
33
|
+
borderColor: "$borderColorHover"
|
|
34
|
+
},
|
|
35
|
+
focusStyle: {
|
|
36
|
+
borderColor: "$borderColorFocus"
|
|
37
|
+
},
|
|
38
|
+
focusVisibleStyle: {
|
|
39
|
+
outlineStyle: "solid",
|
|
40
|
+
outlineWidth: 2,
|
|
41
|
+
outlineColor: "$outlineColor"
|
|
42
|
+
}
|
|
13
43
|
}
|
|
14
44
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
name: CHECKBOX_NAME,
|
|
22
|
-
tag: "button",
|
|
23
|
-
context: CheckboxStyledContext,
|
|
24
|
-
variants: {
|
|
25
|
-
unstyled: {
|
|
26
|
-
false: {
|
|
27
|
-
size: "$true",
|
|
28
|
-
backgroundColor: "$background",
|
|
29
|
-
alignItems: "center",
|
|
30
|
-
justifyContent: "center",
|
|
31
|
-
pressTheme: !0,
|
|
32
|
-
focusable: !0,
|
|
33
|
-
borderWidth: 1,
|
|
45
|
+
disabled: {
|
|
46
|
+
true: {
|
|
47
|
+
pointerEvents: "none",
|
|
48
|
+
userSelect: "none",
|
|
49
|
+
cursor: "not-allowed",
|
|
50
|
+
hoverStyle: {
|
|
34
51
|
borderColor: "$borderColor",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
outlineWidth: 2,
|
|
44
|
-
outlineColor: "$outlineColor"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
disabled: {
|
|
49
|
-
true: {
|
|
50
|
-
pointerEvents: "none",
|
|
51
|
-
userSelect: "none",
|
|
52
|
-
cursor: "not-allowed",
|
|
53
|
-
hoverStyle: {
|
|
54
|
-
borderColor: "$borderColor",
|
|
55
|
-
backgroundColor: "$background"
|
|
56
|
-
},
|
|
57
|
-
pressStyle: {
|
|
58
|
-
borderColor: "$borderColor",
|
|
59
|
-
backgroundColor: "$backgroundColor"
|
|
60
|
-
},
|
|
61
|
-
focusStyle: {
|
|
62
|
-
outlineWidth: 0
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
size: {
|
|
67
|
-
"...size": function (val) {
|
|
68
|
-
var radiusToken = getVariableValue(getSize(val)) / 8;
|
|
69
|
-
return {
|
|
70
|
-
borderRadius: radiusToken
|
|
71
|
-
};
|
|
52
|
+
backgroundColor: "$background"
|
|
53
|
+
},
|
|
54
|
+
pressStyle: {
|
|
55
|
+
borderColor: "$borderColor",
|
|
56
|
+
backgroundColor: "$backgroundColor"
|
|
57
|
+
},
|
|
58
|
+
focusStyle: {
|
|
59
|
+
outlineWidth: 0
|
|
72
60
|
}
|
|
73
61
|
}
|
|
74
62
|
},
|
|
75
|
-
|
|
76
|
-
|
|
63
|
+
size: {
|
|
64
|
+
"...size": function(val) {
|
|
65
|
+
var radiusToken = getVariableValue(getSize(val)) / 8;
|
|
66
|
+
return {
|
|
67
|
+
borderRadius: radiusToken
|
|
68
|
+
};
|
|
69
|
+
}
|
|
77
70
|
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
CheckboxFrame,
|
|
78
|
+
CheckboxIndicatorFrame
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/checkbox/src/Checkbox.tsx"],
|
|
4
|
+
"mappings": "AAGA,SAASA,kBAAkBC,cAAc;AACzC,SAASC,eAAe;AACxB,SAASC,sBAAsB;AAE/B,SAASC,6BAA6B;AAKtC,IAAMC,iBAAiB,qBAEVC,yBAAyBL,OAAOE,gBAAgB;;EAE3DI,MAAMF;EACNG,SAASJ;EACTK,UAAU;IACRC,UAAU;MACRC,OAAO,CAAC;IACV;EACF;EACAC,iBAAiB;IACfF,UAAUG,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAMMC,gBAAgB,YAETC,gBAAgBhB,OAAOE,gBAAgB;EAClDI,MAAMS;EACNE,KAAK;EAELV,SAASJ;EACTK,UAAU;IACRC,UAAU;MACRC,OAAO;QACLQ,MAAM;QACNC,iBAAiB;QACjBC,YAAY;QACZC,gBAAgB;QAChBC,YAAY;QACZC,WAAW;QACXC,aAAa;QACbC,aAAa;QAEbC,YAAY;UACVD,aAAa;QACf;QAEAE,YAAY;UACVF,aAAa;QACf;QAEAG,mBAAmB;UACjBC,cAAc;UACdC,cAAc;UACdC,cAAc;QAChB;MACF;IACF;IAEAC,UAAU;MACRC,MAAM;QACJC,eAAe;QACfC,YAAY;QACZC,QAAQ;QAERV,YAAY;UACVD,aAAa;UACbN,iBAAiB;QACnB;QAEAkB,YAAY;UACVZ,aAAa;UACbN,iBAAiB;QACnB;QAEAQ,YAAY;UACVG,cAAc;QAChB;MACF;IACF;IAEAZ,MAAM;MACJ,WAAW,SAACoB,KAAAA;AACV,YAAMC,cAAcxC,iBAAiBE,QAAQqC,GAAAA,CAAAA,IAAQ;AACrD,eAAO;UACLE,cAAcD;QAChB;MACF;IACF;EACF;EAEA5B,iBAAiB;IACfF,UAAUG,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA;",
|
|
5
|
+
"names": ["getVariableValue", "styled", "getSize", "ThemeableStack", "CheckboxStyledContext", "INDICATOR_NAME", "CheckboxIndicatorFrame", "name", "context", "variants", "unstyled", "false", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "CHECKBOX_NAME", "CheckboxFrame", "tag", "size", "backgroundColor", "alignItems", "justifyContent", "pressTheme", "focusable", "borderWidth", "borderColor", "hoverStyle", "focusStyle", "focusVisibleStyle", "outlineStyle", "outlineWidth", "outlineColor", "disabled", "true", "pointerEvents", "userSelect", "cursor", "pressStyle", "val", "radiusToken", "borderRadius"]
|
|
6
|
+
}
|
|
@@ -3,5 +3,7 @@ var CheckboxStyledContext = createStyledContext({
|
|
|
3
3
|
size: "$true",
|
|
4
4
|
scaleIcon: 1
|
|
5
5
|
});
|
|
6
|
-
export {
|
|
7
|
-
|
|
6
|
+
export {
|
|
7
|
+
CheckboxStyledContext
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=CheckboxStyledContext.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/checkbox/src/CheckboxStyledContext.tsx"],
|
|
4
|
+
"mappings": "AACA,SAASA,2BAA2B;AAE7B,IAAMC,wBAAwBD,oBAAoB;EACvDE,MAAM;EACNC,WAAW;AACb,CAAA;",
|
|
5
|
+
"names": ["createStyledContext", "CheckboxStyledContext", "size", "scaleIcon"]
|
|
6
|
+
}
|
|
@@ -7,68 +7,56 @@ import { getFontSize } from "@tamagui/font-size";
|
|
|
7
7
|
import { getSize } from "@tamagui/get-token";
|
|
8
8
|
import { useGetThemedIcon } from "@tamagui/helpers-tamagui";
|
|
9
9
|
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
10
|
-
import { CheckboxFrame, CheckboxIndicatorFrame } from "./Checkbox
|
|
11
|
-
import { CheckboxStyledContext } from "./CheckboxStyledContext
|
|
12
|
-
var CheckboxContext = /* @__PURE__ */React.createContext({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
10
|
+
import { CheckboxFrame, CheckboxIndicatorFrame } from "./Checkbox";
|
|
11
|
+
import { CheckboxStyledContext } from "./CheckboxStyledContext";
|
|
12
|
+
var CheckboxContext = /* @__PURE__ */ React.createContext({
|
|
13
|
+
checked: !1,
|
|
14
|
+
disabled: !1
|
|
15
|
+
}), ensureContext = function(x) {
|
|
16
|
+
x.context || (x.context = CheckboxContext);
|
|
17
|
+
};
|
|
19
18
|
function createCheckbox(createProps) {
|
|
20
|
-
var {
|
|
21
|
-
disableActiveTheme,
|
|
22
|
-
Frame = CheckboxFrame,
|
|
23
|
-
Indicator = CheckboxIndicatorFrame
|
|
24
|
-
} = createProps;
|
|
19
|
+
var { disableActiveTheme, Frame = CheckboxFrame, Indicator = CheckboxIndicatorFrame } = createProps;
|
|
25
20
|
ensureContext(Frame), ensureContext(Indicator);
|
|
26
|
-
var FrameComponent = Frame.styleable(function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}),
|
|
53
|
-
{
|
|
54
|
-
checkboxProps,
|
|
55
|
-
checkboxRef,
|
|
56
|
-
bubbleInput
|
|
57
|
-
} = useCheckbox(
|
|
58
|
-
// @ts-ignore
|
|
59
|
-
propsActive, [checked, setChecked], forwardedRef);
|
|
60
|
-
React.useEffect(function () {
|
|
61
|
-
if (props.id && !props.disabled) return registerFocusable(props.id, {
|
|
62
|
-
focusAndSelect: function () {
|
|
63
|
-
setChecked?.(function (value) {
|
|
21
|
+
var FrameComponent = Frame.styleable(function(_props, forwardedRef) {
|
|
22
|
+
var { scaleSize = 0.45, sizeAdjust = 0, scaleIcon, checked: checkedProp, defaultChecked, onCheckedChange, native, unstyled = !1, ...props } = _props, propsActive = useProps(props), styledContext = React.useContext(CheckboxStyledContext), adjustedSize = 0, size = 0;
|
|
23
|
+
if (!unstyled) {
|
|
24
|
+
var _propsActive_size, _ref;
|
|
25
|
+
adjustedSize = getVariableValue(getSize((_ref = (_propsActive_size = propsActive.size) !== null && _propsActive_size !== void 0 ? _propsActive_size : styledContext?.size) !== null && _ref !== void 0 ? _ref : "$true", {
|
|
26
|
+
shift: sizeAdjust
|
|
27
|
+
})), size = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize;
|
|
28
|
+
}
|
|
29
|
+
var [checked = !1, setChecked] = useControllableState({
|
|
30
|
+
prop: checkedProp,
|
|
31
|
+
defaultProp: defaultChecked,
|
|
32
|
+
onChange: onCheckedChange
|
|
33
|
+
}), { checkboxProps, checkboxRef, bubbleInput } = useCheckbox(
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
propsActive,
|
|
36
|
+
[
|
|
37
|
+
checked,
|
|
38
|
+
setChecked
|
|
39
|
+
],
|
|
40
|
+
forwardedRef
|
|
41
|
+
);
|
|
42
|
+
React.useEffect(function() {
|
|
43
|
+
if (props.id && !props.disabled)
|
|
44
|
+
return registerFocusable(props.id, {
|
|
45
|
+
focusAndSelect: function() {
|
|
46
|
+
setChecked?.(function(value) {
|
|
64
47
|
return !value;
|
|
65
48
|
});
|
|
66
49
|
},
|
|
67
|
-
focus: function
|
|
50
|
+
focus: function() {
|
|
51
|
+
}
|
|
68
52
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
53
|
+
}, [
|
|
54
|
+
props.id,
|
|
55
|
+
props.disabled
|
|
56
|
+
]);
|
|
57
|
+
var renderNative = shouldRenderNativePlatform(native);
|
|
58
|
+
if (renderNative === "web")
|
|
59
|
+
return /* @__PURE__ */ _jsx("input", {
|
|
72
60
|
type: "checkbox",
|
|
73
61
|
defaultChecked: isIndeterminate(checked) ? !1 : checked,
|
|
74
62
|
tabIndex: -1,
|
|
@@ -80,70 +68,70 @@ function createCheckbox(createProps) {
|
|
|
80
68
|
...checkboxProps.style
|
|
81
69
|
}
|
|
82
70
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
71
|
+
var _propsActive_size1, _ref1, _ref2;
|
|
72
|
+
return /* @__PURE__ */ _jsx(CheckboxContext.Provider, {
|
|
73
|
+
value: {
|
|
74
|
+
checked,
|
|
75
|
+
disabled: checkboxProps.disabled
|
|
76
|
+
},
|
|
77
|
+
children: /* @__PURE__ */ _jsxs(CheckboxStyledContext.Provider, {
|
|
78
|
+
size: (_ref1 = (_propsActive_size1 = propsActive.size) !== null && _propsActive_size1 !== void 0 ? _propsActive_size1 : styledContext?.size) !== null && _ref1 !== void 0 ? _ref1 : "$true",
|
|
79
|
+
scaleIcon: (_ref2 = scaleIcon ?? styledContext?.scaleIcon) !== null && _ref2 !== void 0 ? _ref2 : 1,
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ _jsx(Frame, {
|
|
82
|
+
...!unstyled && {
|
|
94
83
|
width: size,
|
|
95
84
|
height: size
|
|
96
|
-
}
|
|
85
|
+
},
|
|
97
86
|
tag: "button",
|
|
98
87
|
ref: checkboxRef,
|
|
99
88
|
unstyled,
|
|
100
|
-
...
|
|
89
|
+
...unstyled === !1 && {
|
|
101
90
|
size,
|
|
102
91
|
theme: checked ? "active" : null
|
|
103
|
-
}
|
|
92
|
+
},
|
|
104
93
|
// potential variant
|
|
105
94
|
checked,
|
|
106
95
|
disabled: checkboxProps.disabled,
|
|
107
96
|
...checkboxProps,
|
|
108
97
|
children: propsActive.children
|
|
109
|
-
}), bubbleInput]
|
|
110
|
-
})
|
|
111
|
-
});
|
|
112
|
-
}),
|
|
113
|
-
IndicatorComponent = Indicator.styleable(function (props, forwardedRef) {
|
|
114
|
-
var {
|
|
115
|
-
// __scopeCheckbox,
|
|
116
|
-
children: childrenProp,
|
|
117
|
-
forceMount,
|
|
118
|
-
disablePassStyles,
|
|
119
|
-
unstyled = !1,
|
|
120
|
-
...indicatorProps
|
|
121
|
-
} = props,
|
|
122
|
-
styledContext = React.useContext(CheckboxStyledContext),
|
|
123
|
-
children = childrenProp;
|
|
124
|
-
if (!unstyled) {
|
|
125
|
-
var iconSize = (typeof styledContext.size == "number" ? styledContext.size * 0.65 : getFontSize(styledContext.size)) * styledContext.scaleIcon,
|
|
126
|
-
theme = useTheme(),
|
|
127
|
-
getThemedIcon = useGetThemedIcon({
|
|
128
|
-
size: iconSize,
|
|
129
|
-
color: theme.color
|
|
130
98
|
}),
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
var context = React.useContext(CheckboxContext);
|
|
137
|
-
return forceMount || isIndeterminate(context.checked) || context.checked === !0 ? /* @__PURE__ */_jsx(Indicator, {
|
|
138
|
-
pointerEvents: "none",
|
|
139
|
-
...indicatorProps,
|
|
140
|
-
ref: forwardedRef,
|
|
141
|
-
children
|
|
142
|
-
}) : null;
|
|
99
|
+
bubbleInput
|
|
100
|
+
]
|
|
101
|
+
})
|
|
143
102
|
});
|
|
103
|
+
}), IndicatorComponent = Indicator.styleable(function(props, forwardedRef) {
|
|
104
|
+
var {
|
|
105
|
+
// __scopeCheckbox,
|
|
106
|
+
children: childrenProp,
|
|
107
|
+
forceMount,
|
|
108
|
+
disablePassStyles,
|
|
109
|
+
unstyled = !1,
|
|
110
|
+
...indicatorProps
|
|
111
|
+
} = props, styledContext = React.useContext(CheckboxStyledContext), children = childrenProp;
|
|
112
|
+
if (!unstyled) {
|
|
113
|
+
var iconSize = (typeof styledContext.size == "number" ? styledContext.size * 0.65 : getFontSize(styledContext.size)) * styledContext.scaleIcon, theme = useTheme(), getThemedIcon = useGetThemedIcon({
|
|
114
|
+
size: iconSize,
|
|
115
|
+
color: theme.color
|
|
116
|
+
}), childrens = React.Children.toArray(childrenProp);
|
|
117
|
+
children = childrens.map(function(child) {
|
|
118
|
+
return disablePassStyles || !/* @__PURE__ */ React.isValidElement(child) ? child : getThemedIcon(child);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
var context = React.useContext(CheckboxContext);
|
|
122
|
+
return forceMount || isIndeterminate(context.checked) || context.checked === !0 ? /* @__PURE__ */ _jsx(Indicator, {
|
|
123
|
+
pointerEvents: "none",
|
|
124
|
+
...indicatorProps,
|
|
125
|
+
ref: forwardedRef,
|
|
126
|
+
children
|
|
127
|
+
}) : null;
|
|
128
|
+
});
|
|
144
129
|
return withStaticProperties(FrameComponent, {
|
|
145
130
|
Indicator: IndicatorComponent
|
|
146
131
|
});
|
|
147
132
|
}
|
|
148
|
-
export {
|
|
149
|
-
|
|
133
|
+
export {
|
|
134
|
+
CheckboxContext,
|
|
135
|
+
createCheckbox
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=createCheckbox.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/checkbox/src/createCheckbox.tsx"],
|
|
4
|
+
"mappings": ";AAAA,OAAOA,WAAW;AAKlB,SAASC,yBAAyB;AAClC,SAASC,iBAAiBC,mBAAmB;AAE7C,SACEC,kBACAC,4BACAC,UACAC,UACAC,4BACK;AACP,SAASC,mBAAmB;AAC5B,SAASC,eAAe;AACxB,SAASC,wBAAwB;AACjC,SAASC,4BAA4B;AAErC,SAASC,eAAeC,8BAA8B;AACtD,SAASC,6BAA6B;AA0C/B,IAAMC,kBAAkBhB,sBAAMiB,cAGlC;EACDC,SAAS;EACTC,UAAU;AACZ,CAAA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GACR0E,gBAAgBtE,iBAAiB;QAAEkC,MAAMmC;QAAUE,OAAOT,MAAMS;MAAM,CAAA,GAEtEC,YAAYnF,MAAMoF,SAASC,QAAQT,YAAAA;AACzCF,iBAAWS,UAAUG,IAAI,SAACC,OAAAA;AACxB,eAAIT,qBAAqB,CAAC9E,sBAAMwF,eAAeD,KAAAA,IACtCA,QAEFN,cAAcM,KAAAA;MACvB,CAAA;IACF;AAEA,QAAMjE,UAAUtB,MAAM2C,WAAW3B,eAAAA;AACjC,WAAI6D,cAAc3E,gBAAgBoB,QAAQJ,OAAO,KAAKI,QAAQJ,YAAY,KAEtE,qBAACS,WAAAA;MAAU8D,eAAc;MAAQ,GAAGV;MAAgBd,KAAKlC;;SAKtD;EACT,CAAA;AAGF,SAAOvB,qBAAqBoB,gBAAgB;IAC1CD,WAAWgD;EACb,CAAA;AACF;",
|
|
5
|
+
"names": ["React", "registerFocusable", "isIndeterminate", "useCheckbox", "getVariableValue", "shouldRenderNativePlatform", "useProps", "useTheme", "withStaticProperties", "getFontSize", "getSize", "useGetThemedIcon", "useControllableState", "CheckboxFrame", "CheckboxIndicatorFrame", "CheckboxStyledContext", "CheckboxContext", "createContext", "checked", "disabled", "ensureContext", "x", "context", "createCheckbox", "createProps", "disableActiveTheme", "Frame", "Indicator", "FrameComponent", "styleable", "_props", "forwardedRef", "scaleSize", "sizeAdjust", "scaleIcon", "checkedProp", "defaultChecked", "onCheckedChange", "native", "unstyled", "props", "propsActive", "styledContext", "useContext", "adjustedSize", "size", "shift", "Math", "round", "setChecked", "prop", "defaultProp", "onChange", "checkboxProps", "checkboxRef", "bubbleInput", "useEffect", "id", "focusAndSelect", "value", "focus", "renderNative", "input", "type", "tabIndex", "ref", "style", "appearance", "accentColor", "Provider", "width", "height", "tag", "theme", "children", "IndicatorComponent", "childrenProp", "forceMount", "disablePassStyles", "indicatorProps", "iconSize", "getThemedIcon", "color", "childrens", "Children", "toArray", "map", "child", "isValidElement", "pointerEvents"]
|
|
6
|
+
}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { CheckboxFrame, CheckboxIndicatorFrame } from "./Checkbox
|
|
2
|
-
import { createCheckbox } from "./createCheckbox
|
|
3
|
-
export * from "./createCheckbox
|
|
4
|
-
export * from "./Checkbox
|
|
5
|
-
export * from "./CheckboxStyledContext
|
|
1
|
+
import { CheckboxFrame, CheckboxIndicatorFrame } from "./Checkbox";
|
|
2
|
+
import { createCheckbox } from "./createCheckbox";
|
|
3
|
+
export * from "./createCheckbox";
|
|
4
|
+
export * from "./Checkbox";
|
|
5
|
+
export * from "./CheckboxStyledContext";
|
|
6
6
|
var Checkbox = createCheckbox({
|
|
7
7
|
Frame: CheckboxFrame,
|
|
8
8
|
Indicator: CheckboxIndicatorFrame
|
|
9
9
|
});
|
|
10
|
-
export {
|
|
11
|
-
|
|
10
|
+
export {
|
|
11
|
+
Checkbox
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/checkbox/src/index.ts"],
|
|
4
|
+
"mappings": "AAAA,SAASA,eAAeC,8BAA8B;AACtD,SAASC,sBAAsB;AAE/B,cAAc;AACd,cAAc;AACd,cAAc;AAGP,IAAMC,WAAWD,eAAe;EACrCE,OAAOJ;EACPK,WAAWJ;AACb,CAAA;",
|
|
5
|
+
"names": ["CheckboxFrame", "CheckboxIndicatorFrame", "createCheckbox", "Checkbox", "Frame", "Indicator"]
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/checkbox",
|
|
3
|
-
"version": "1.113.
|
|
3
|
+
"version": "1.113.2",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
"clean:build": "tamagui-build clean:build"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@tamagui/checkbox-headless": "1.113.
|
|
28
|
-
"@tamagui/compose-refs": "1.113.
|
|
29
|
-
"@tamagui/constants": "1.113.
|
|
30
|
-
"@tamagui/core": "1.113.
|
|
31
|
-
"@tamagui/create-context": "1.113.
|
|
32
|
-
"@tamagui/focusable": "1.113.
|
|
33
|
-
"@tamagui/font-size": "1.113.
|
|
34
|
-
"@tamagui/get-token": "1.113.
|
|
35
|
-
"@tamagui/helpers": "1.113.
|
|
36
|
-
"@tamagui/helpers-tamagui": "1.113.
|
|
37
|
-
"@tamagui/label": "1.113.
|
|
38
|
-
"@tamagui/stacks": "1.113.
|
|
39
|
-
"@tamagui/use-controllable-state": "1.113.
|
|
40
|
-
"@tamagui/use-previous": "1.113.
|
|
27
|
+
"@tamagui/checkbox-headless": "1.113.2",
|
|
28
|
+
"@tamagui/compose-refs": "1.113.2",
|
|
29
|
+
"@tamagui/constants": "1.113.2",
|
|
30
|
+
"@tamagui/core": "1.113.2",
|
|
31
|
+
"@tamagui/create-context": "1.113.2",
|
|
32
|
+
"@tamagui/focusable": "1.113.2",
|
|
33
|
+
"@tamagui/font-size": "1.113.2",
|
|
34
|
+
"@tamagui/get-token": "1.113.2",
|
|
35
|
+
"@tamagui/helpers": "1.113.2",
|
|
36
|
+
"@tamagui/helpers-tamagui": "1.113.2",
|
|
37
|
+
"@tamagui/label": "1.113.2",
|
|
38
|
+
"@tamagui/stacks": "1.113.2",
|
|
39
|
+
"@tamagui/use-controllable-state": "1.113.2",
|
|
40
|
+
"@tamagui/use-previous": "1.113.2"
|
|
41
41
|
},
|
|
42
42
|
"exports": {
|
|
43
43
|
"./package.json": "./package.json",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@tamagui/build": "1.113.
|
|
53
|
+
"@tamagui/build": "1.113.2",
|
|
54
54
|
"react": "^18.2.0 || ^19.0.0"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|