@tamagui/radio-group 1.135.4-1761749240853 → 1.135.4
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/RadioGroup.native.js +102 -115
- package/dist/cjs/RadioGroup.native.js.map +6 -1
- package/dist/cjs/RadioGroupStyledContext.native.js +18 -22
- package/dist/cjs/RadioGroupStyledContext.native.js.map +6 -1
- package/dist/cjs/createRadioGroup.cjs +1 -1
- package/dist/cjs/createRadioGroup.js +1 -1
- package/dist/cjs/createRadioGroup.js.map +1 -1
- package/dist/cjs/createRadioGroup.native.js +81 -130
- package/dist/cjs/createRadioGroup.native.js.map +6 -1
- package/dist/cjs/index.native.js +21 -23
- package/dist/cjs/index.native.js.map +6 -1
- package/dist/jsx/RadioGroup.native.js +95 -128
- package/dist/jsx/RadioGroup.native.js.map +6 -1
- package/dist/jsx/RadioGroupStyledContext.native.js +9 -33
- package/dist/jsx/RadioGroupStyledContext.native.js.map +6 -1
- package/dist/jsx/createRadioGroup.native.js +74 -146
- package/dist/jsx/createRadioGroup.native.js.map +6 -1
- package/dist/jsx/index.native.js +13 -38
- package/dist/jsx/index.native.js.map +6 -1
- package/package.json +15 -16
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
16
|
var RadioGroup_exports = {};
|
|
24
17
|
__export(RadioGroup_exports, {
|
|
25
18
|
RadioGroupFrame: () => RadioGroupFrame,
|
|
@@ -27,111 +20,105 @@ __export(RadioGroup_exports, {
|
|
|
27
20
|
RadioGroupItemFrame: () => RadioGroupItemFrame
|
|
28
21
|
});
|
|
29
22
|
module.exports = __toCommonJS(RadioGroup_exports);
|
|
30
|
-
var import_core = require("@tamagui/core"),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
pressStyle: {
|
|
62
|
-
borderColor: "$borderColorFocus",
|
|
63
|
-
backgroundColor: "$backgroundFocus"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
disabled: {
|
|
68
|
-
true: {
|
|
69
|
-
pointerEvents: "none",
|
|
70
|
-
userSelect: "none",
|
|
71
|
-
cursor: "not-allowed",
|
|
72
|
-
hoverStyle: {
|
|
73
|
-
borderColor: "$borderColor",
|
|
74
|
-
backgroundColor: "$background"
|
|
75
|
-
},
|
|
76
|
-
pressStyle: {
|
|
77
|
-
borderColor: "$borderColor",
|
|
78
|
-
backgroundColor: "$background"
|
|
79
|
-
},
|
|
80
|
-
focusVisibleStyle: {
|
|
81
|
-
outlineWidth: 0
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
size: {
|
|
86
|
-
"...size": function (value, param) {
|
|
87
|
-
var {
|
|
88
|
-
props
|
|
89
|
-
} = param,
|
|
90
|
-
_props_scaleSize,
|
|
91
|
-
size = Math.floor((0, import_core.getVariableValue)((0, import_get_token.getSize)(value)) * ((_props_scaleSize = props.scaleSize) !== null && _props_scaleSize !== void 0 ? _props_scaleSize : 0.5));
|
|
92
|
-
return {
|
|
93
|
-
width: size,
|
|
94
|
-
height: size
|
|
95
|
-
};
|
|
23
|
+
var import_core = require("@tamagui/core"), import_get_token = require("@tamagui/get-token"), import_stacks = require("@tamagui/stacks"), RADIO_GROUP_ITEM_NAME = "RadioGroupItem", RadioGroupItemFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
24
|
+
name: RADIO_GROUP_ITEM_NAME,
|
|
25
|
+
tag: "button",
|
|
26
|
+
variants: {
|
|
27
|
+
unstyled: {
|
|
28
|
+
false: {
|
|
29
|
+
size: "$true",
|
|
30
|
+
borderRadius: 1e3,
|
|
31
|
+
backgroundColor: "$background",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
justifyContent: "center",
|
|
34
|
+
borderWidth: 1,
|
|
35
|
+
borderColor: "$borderColor",
|
|
36
|
+
padding: 0,
|
|
37
|
+
hoverStyle: {
|
|
38
|
+
borderColor: "$borderColorHover",
|
|
39
|
+
backgroundColor: "$backgroundHover"
|
|
40
|
+
},
|
|
41
|
+
focusStyle: {
|
|
42
|
+
borderColor: "$borderColorHover",
|
|
43
|
+
backgroundColor: "$backgroundHover"
|
|
44
|
+
},
|
|
45
|
+
focusVisibleStyle: {
|
|
46
|
+
outlineStyle: "solid",
|
|
47
|
+
outlineWidth: 2,
|
|
48
|
+
outlineColor: "$outlineColor"
|
|
49
|
+
},
|
|
50
|
+
pressStyle: {
|
|
51
|
+
borderColor: "$borderColorFocus",
|
|
52
|
+
backgroundColor: "$backgroundFocus"
|
|
96
53
|
}
|
|
97
54
|
}
|
|
98
55
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
56
|
+
disabled: {
|
|
57
|
+
true: {
|
|
58
|
+
pointerEvents: "none",
|
|
59
|
+
userSelect: "none",
|
|
60
|
+
cursor: "not-allowed",
|
|
61
|
+
hoverStyle: {
|
|
62
|
+
borderColor: "$borderColor",
|
|
63
|
+
backgroundColor: "$background"
|
|
64
|
+
},
|
|
65
|
+
pressStyle: {
|
|
66
|
+
borderColor: "$borderColor",
|
|
67
|
+
backgroundColor: "$background"
|
|
68
|
+
},
|
|
69
|
+
focusVisibleStyle: {
|
|
70
|
+
outlineWidth: 0
|
|
114
71
|
}
|
|
115
72
|
}
|
|
116
73
|
},
|
|
117
|
-
|
|
118
|
-
|
|
74
|
+
size: {
|
|
75
|
+
"...size": function(value, param) {
|
|
76
|
+
var { props } = param, _props_scaleSize, size = Math.floor((0, import_core.getVariableValue)((0, import_get_token.getSize)(value)) * ((_props_scaleSize = props.scaleSize) !== null && _props_scaleSize !== void 0 ? _props_scaleSize : 0.5));
|
|
77
|
+
return {
|
|
78
|
+
width: size,
|
|
79
|
+
height: size
|
|
80
|
+
};
|
|
81
|
+
}
|
|
119
82
|
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
83
|
+
},
|
|
84
|
+
defaultVariants: {
|
|
85
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
86
|
+
}
|
|
87
|
+
}), RADIO_GROUP_INDICATOR_NAME = "RadioGroupIndicator", RadioGroupIndicatorFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
88
|
+
name: RADIO_GROUP_INDICATOR_NAME,
|
|
89
|
+
variants: {
|
|
90
|
+
unstyled: {
|
|
91
|
+
false: {
|
|
92
|
+
width: "33%",
|
|
93
|
+
height: "33%",
|
|
94
|
+
borderRadius: 1e3,
|
|
95
|
+
backgroundColor: "$color",
|
|
96
|
+
pressTheme: !0
|
|
134
97
|
}
|
|
135
98
|
}
|
|
136
|
-
}
|
|
137
|
-
|
|
99
|
+
},
|
|
100
|
+
defaultVariants: {
|
|
101
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
102
|
+
}
|
|
103
|
+
}), RADIO_GROUP_NAME = "RadioGroup", RadioGroupFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
104
|
+
name: RADIO_GROUP_NAME,
|
|
105
|
+
variants: {
|
|
106
|
+
orientation: {
|
|
107
|
+
horizontal: {
|
|
108
|
+
flexDirection: "row",
|
|
109
|
+
spaceDirection: "horizontal"
|
|
110
|
+
},
|
|
111
|
+
vertical: {
|
|
112
|
+
flexDirection: "column",
|
|
113
|
+
spaceDirection: "vertical"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
119
|
+
0 && (module.exports = {
|
|
120
|
+
RadioGroupFrame,
|
|
121
|
+
RadioGroupIndicatorFrame,
|
|
122
|
+
RadioGroupItemFrame
|
|
123
|
+
});
|
|
124
|
+
//# sourceMapp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AM,kCAAiB,0BAAQ,KAAK,CAAC,MAAM,mBAAmB,MAAM,eAAkB,QAAQ,qBAAqB,SAAS,mBAAmB,IAAI;AACnK,eAAO;AAAA,UACH,OAAO;AAAA,UACP,QAAQ;AAAA,QACZ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,UAAU,QAAQ,IAAI,qBAAqB;AAAA,EAC/C;AACJ,CAAC,GACG,6BAA6B,uBACtB,+BAA2B,oBAAO,8BAAgB;AAAA,EACzD,MAAM;AAAA,EACN,UAAU;AAAA,IACN,UAAU;AAAA,MACN,OAAO;AAAA,QACH,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,cAAc;AAAA,QACd,iBAAiB;AAAA,QACjB,YAAY;AAAA,MAChB;AAAA,IACJ;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,UAAU,QAAQ,IAAI,qBAAqB;AAAA,EAC/C;AACJ,CAAC,GACG,mBAAmB,cACZ,sBAAkB,oBAAO,8BAAgB;AAAA,EAChD,MAAM;AAAA,EACN,UAAU;AAAA,IACN,aAAa;AAAA,MACT,YAAY;AAAA,QACR,eAAe;AAAA,QACf,gBAAgB;AAAA,MACpB;AAAA,MACA,UAAU;AAAA,QACN,eAAe;AAAA,QACf,gBAAgB;AAAA,MACpB;AAAA,IACJ;AAAA,EACJ;AACJ,CAAC;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -1,33 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
16
|
var RadioGroupStyledContext_exports = {};
|
|
24
17
|
__export(RadioGroupStyledContext_exports, {
|
|
25
18
|
RadioGroupStyledContext: () => RadioGroupStyledContext
|
|
26
19
|
});
|
|
27
20
|
module.exports = __toCommonJS(RadioGroupStyledContext_exports);
|
|
28
|
-
var import_core = require("@tamagui/core"),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
var import_core = require("@tamagui/core"), RadioGroupStyledContext = (0, import_core.createStyledContext)({
|
|
22
|
+
size: "$true",
|
|
23
|
+
scaleIcon: 1
|
|
24
|
+
}, "RadioGroup");
|
|
25
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
+
0 && (module.exports = {
|
|
27
|
+
RadioGroupStyledContext
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=RadioGroupStyledContext.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/RadioGroupStyledContext.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAoC,0BACzB,8BAA0B,iCAAoB;AAAA,EACrD,MAAM;AAAA,EACN,WAAW;AACf,GAAG,YAAY;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -34,7 +34,7 @@ __export(createRadioGroup_exports, {
|
|
|
34
34
|
createRadioGroup: () => createRadioGroup
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(createRadioGroup_exports);
|
|
37
|
-
var import_react = __toESM(require("react")
|
|
37
|
+
var import_react = __toESM(require("react")),
|
|
38
38
|
import_core = require("@tamagui/core"),
|
|
39
39
|
import_RadioGroup = require("./RadioGroup.cjs"),
|
|
40
40
|
import_radio_headless = require("@tamagui/radio-headless"),
|
|
@@ -25,7 +25,7 @@ __export(createRadioGroup_exports, {
|
|
|
25
25
|
createRadioGroup: () => createRadioGroup
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(createRadioGroup_exports);
|
|
28
|
-
var import_react = __toESM(require("react")
|
|
28
|
+
var import_react = __toESM(require("react")), import_core = require("@tamagui/core"), import_RadioGroup = require("./RadioGroup"), import_radio_headless = require("@tamagui/radio-headless"), import_roving_focus = require("@tamagui/roving-focus"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
29
|
const ensureContext = (x) => {
|
|
30
30
|
x.context || (x.context = RadioGroupContext);
|
|
31
31
|
}, RadioGroupContext = import_react.default.createContext({}), RadioGroupItemContext = import_react.default.createContext({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/createRadioGroup.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,2BAMlB,cAA4C,0BAE5C,o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ACpB,mBAAmB;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,WACE,4CAAC,sBAAsB,UAAtB,EAA+B,OAAO,eACpC,+BAAS,SACR,cAEA,4EACE;AAAA,kDAAC,qCAAiB,MAAjB,EAAuB,GAAG,uBACzB,sDAAC,yCAAqB,GAAG,YAAY,KAAW,GAAG,MAAM,GAC3D;AAAA,MACC,iBAAiB;AAAA,OACpB,GAEJ;AAAA,EAEJ,CAAC;AAED,oBAAkB,cAAc;AAEhC,QAAM,iBAAiB,UAAU;AAAA,IAC/B,CAAC,OAA4B,iBAAiB;AAC5C,YAAM,EAAE,YAAY,UAAU,GAAG,eAAe,IAAI,OAC9C,EAAE,SAAS,GAAG,iBAAiB,QAAI,kDAA2B;AAAA,QAClE,uBAAuB;AAAA,QACvB;AAAA,MACF,CAAC;AAED,aAAI,cAAc,UACT,4CAAC,aAAW,GAAG,kBAAkB,KAAK,cAAe,GAAG,gBAAgB,IAG1E;AAAA,IACT;AAAA,EACF;AAEA,iBAAe,cAAc;AAE7B,QAAM,iBAAa,kCAAqB,eAAe;AAAA,IACrD,MAAM;AAAA,IACN,WAAW;AAAA,EACb,CAAC;AACD,oBAAW,cAAc,cAElB;AACT;",
|
|
5
5
|
"names": ["React"]
|
|
6
6
|
}
|
|
@@ -1,159 +1,106 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
-
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
22
16
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
17
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
18
|
// file that has been converted to a CommonJS file using a Babel-
|
|
25
19
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
20
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}) : target, mod)),
|
|
31
|
-
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: !0
|
|
33
|
-
}), mod);
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
34
24
|
var createRadioGroup_exports = {};
|
|
35
25
|
__export(createRadioGroup_exports, {
|
|
36
26
|
createRadioGroup: () => createRadioGroup
|
|
37
27
|
});
|
|
38
28
|
module.exports = __toCommonJS(createRadioGroup_exports);
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
ensureContext = function (x) {
|
|
46
|
-
x.context || (x.context = RadioGroupContext);
|
|
47
|
-
},
|
|
48
|
-
RadioGroupContext = /* @__PURE__ */import_react.default.createContext({}),
|
|
49
|
-
RadioGroupItemContext = /* @__PURE__ */import_react.default.createContext({
|
|
50
|
-
checked: !1,
|
|
51
|
-
disabled: !1
|
|
52
|
-
});
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_core = require("@tamagui/core"), import_RadioGroup = require("./RadioGroup"), import_radio_headless = require("@tamagui/radio-headless"), import_roving_focus = require("@tamagui/roving-focus"), ensureContext = function(x) {
|
|
30
|
+
x.context || (x.context = RadioGroupContext);
|
|
31
|
+
}, RadioGroupContext = /* @__PURE__ */ import_react.default.createContext({}), RadioGroupItemContext = /* @__PURE__ */ import_react.default.createContext({
|
|
32
|
+
checked: !1,
|
|
33
|
+
disabled: !1
|
|
34
|
+
});
|
|
53
35
|
function createRadioGroup(createProps) {
|
|
54
|
-
var {
|
|
55
|
-
disableActiveTheme,
|
|
56
|
-
Frame = import_RadioGroup.RadioGroupFrame,
|
|
57
|
-
Indicator = import_RadioGroup.RadioGroupIndicatorFrame,
|
|
58
|
-
Item = import_RadioGroup.RadioGroupItemFrame
|
|
59
|
-
} = createProps;
|
|
36
|
+
var { disableActiveTheme, Frame = import_RadioGroup.RadioGroupFrame, Indicator = import_RadioGroup.RadioGroupIndicatorFrame, Item = import_RadioGroup.RadioGroupItemFrame } = createProps;
|
|
60
37
|
ensureContext(Frame), ensureContext(Indicator), ensureContext(Item);
|
|
61
|
-
var RadioGroupImp = Frame.styleable(function
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
38
|
+
var RadioGroupImp = Frame.styleable(function(props, ref) {
|
|
39
|
+
var { value, defaultValue, onValueChange, required = !1, disabled = !1, name, native, accentColor, orientation = "vertical", ...rest } = props, { providerValue, frameAttrs, rovingFocusGroupAttrs } = (0, import_radio_headless.useRadioGroup)({
|
|
40
|
+
orientation,
|
|
41
|
+
name,
|
|
42
|
+
defaultValue,
|
|
43
|
+
value,
|
|
44
|
+
onValueChange,
|
|
45
|
+
required,
|
|
46
|
+
disabled,
|
|
47
|
+
native,
|
|
48
|
+
accentColor
|
|
49
|
+
});
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupContext.Provider, {
|
|
51
|
+
value: providerValue,
|
|
52
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup, {
|
|
53
|
+
...rovingFocusGroupAttrs,
|
|
54
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RadioGroup.RadioGroupFrame, {
|
|
55
|
+
...frameAttrs,
|
|
56
|
+
ref,
|
|
72
57
|
...rest
|
|
73
|
-
} = props,
|
|
74
|
-
{
|
|
75
|
-
providerValue,
|
|
76
|
-
frameAttrs,
|
|
77
|
-
rovingFocusGroupAttrs
|
|
78
|
-
} = (0, import_radio_headless.useRadioGroup)({
|
|
79
|
-
orientation,
|
|
80
|
-
name,
|
|
81
|
-
defaultValue,
|
|
82
|
-
value,
|
|
83
|
-
onValueChange,
|
|
84
|
-
required,
|
|
85
|
-
disabled,
|
|
86
|
-
native,
|
|
87
|
-
accentColor
|
|
88
|
-
});
|
|
89
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(RadioGroupContext.Provider, {
|
|
90
|
-
value: providerValue,
|
|
91
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup, {
|
|
92
|
-
...rovingFocusGroupAttrs,
|
|
93
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_RadioGroup.RadioGroupFrame, {
|
|
94
|
-
...frameAttrs,
|
|
95
|
-
ref,
|
|
96
|
-
...rest
|
|
97
|
-
})
|
|
98
58
|
})
|
|
99
|
-
})
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
onPress,
|
|
126
|
-
onKeyDown
|
|
127
|
-
});
|
|
128
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(RadioGroupItemContext.Provider, {
|
|
129
|
-
value: providerValue,
|
|
130
|
-
children: import_core.isWeb && native ? bubbleInput : /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
131
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup.Item, {
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
}), RadioGroupItemImp = Item.styleable(function(props, ref) {
|
|
62
|
+
var {
|
|
63
|
+
value,
|
|
64
|
+
labelledBy,
|
|
65
|
+
onPress,
|
|
66
|
+
//@ts-expect-error
|
|
67
|
+
onKeyDown,
|
|
68
|
+
disabled,
|
|
69
|
+
id,
|
|
70
|
+
...rest
|
|
71
|
+
} = props, { providerValue, bubbleInput, rovingFocusGroupAttrs, frameAttrs, isFormControl, native } = (0, import_radio_headless.useRadioGroupItem)({
|
|
72
|
+
radioGroupContext: RadioGroupContext,
|
|
73
|
+
value,
|
|
74
|
+
id,
|
|
75
|
+
labelledBy,
|
|
76
|
+
disabled,
|
|
77
|
+
onPress,
|
|
78
|
+
onKeyDown
|
|
79
|
+
});
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemContext.Provider, {
|
|
81
|
+
value: providerValue,
|
|
82
|
+
children: import_core.isWeb && native ? bubbleInput : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup.Item, {
|
|
132
85
|
...rovingFocusGroupAttrs,
|
|
133
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_RadioGroup.RadioGroupItemFrame, {
|
|
86
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RadioGroup.RadioGroupItemFrame, {
|
|
134
87
|
...frameAttrs,
|
|
135
88
|
ref,
|
|
136
89
|
...rest
|
|
137
90
|
})
|
|
138
|
-
}),
|
|
139
|
-
|
|
140
|
-
|
|
91
|
+
}),
|
|
92
|
+
isFormControl && bubbleInput
|
|
93
|
+
]
|
|
94
|
+
})
|
|
141
95
|
});
|
|
96
|
+
});
|
|
142
97
|
RadioGroupItemImp.displayName = "RadioGroupItem";
|
|
143
|
-
var RadioIndicator = Indicator.styleable(function
|
|
144
|
-
var {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
{
|
|
150
|
-
checked,
|
|
151
|
-
...useIndicatorRest
|
|
152
|
-
} = (0, import_radio_headless.useRadioGroupItemIndicator)({
|
|
153
|
-
radioGroupItemContext: RadioGroupItemContext,
|
|
154
|
-
disabled
|
|
155
|
-
});
|
|
156
|
-
return forceMount || checked ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(Indicator, {
|
|
98
|
+
var RadioIndicator = Indicator.styleable(function(props, forwardedRef) {
|
|
99
|
+
var { forceMount, disabled, ...indicatorProps } = props, { checked, ...useIndicatorRest } = (0, import_radio_headless.useRadioGroupItemIndicator)({
|
|
100
|
+
radioGroupItemContext: RadioGroupItemContext,
|
|
101
|
+
disabled
|
|
102
|
+
});
|
|
103
|
+
return forceMount || checked ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Indicator, {
|
|
157
104
|
...useIndicatorRest,
|
|
158
105
|
ref: forwardedRef,
|
|
159
106
|
...indicatorProps
|
|
@@ -166,4 +113,8 @@ function createRadioGroup(createProps) {
|
|
|
166
113
|
});
|
|
167
114
|
return RadioGroup.displayName = "RadioGroup", RadioGroup;
|
|
168
115
|
}
|
|
169
|
-
|
|
116
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
117
|
+
0 && (module.exports = {
|
|
118
|
+
createRadioGroup
|
|
119
|
+
});
|
|
120
|
+
//# sourceMappingURL=createRadioGroup.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/createRadioGroup.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAkE,8BAClE,eAAkB,2BAClB,cAA4C,0BAC5C,oBAA+E,yBAM/E,wBAA6E,oCAC7E,sBAAiC,kCAN7B,gBAAgB,SAAS,GAAG;AAC5B,EAAK,EAAE,YACH,EAAE,UAAU;AAEpB,GAGI,oBAAkC,6BAAAA,QAAM,cAAc,CAAC,CAAC,GACxD,wBAAsC,6BAAAA,QAAM,cAAc;AAAA,EAC1D,SAAS;AAAA,EACT,UAAU;AACd,CAAC;AACM,SAAS,iBAAiB,aAAa;AAC1C,MAAI,EAAE,oBAAoB,QAAQ,mCAAiB,YAAY,4CAA0B,OAAO,sCAAoB,IAAI;AACxH,gBAAc,KAAK,GACnB,cAAc,SAAS,GACvB,cAAc,IAAI;AAClB,MAAI,gBAAgB,MAAM,UAAU,SAAS,OAAO,KAAK;AACrD,QAAI,EAAE,OAAO,cAAc,eAAe,WAAW,IAAO,WAAW,IAAO,MAAM,QAAQ,aAAa,cAAc,YAAY,G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