@tamagui/radio-group 2.7.7 → 3.0.0-beta.643.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/RadioGroup.cjs +127 -116
- package/dist/cjs/RadioGroup.native.cjs +146 -0
- package/dist/cjs/RadioGroup.native.js +127 -117
- package/dist/cjs/RadioGroup.native.js.map +1 -1
- package/dist/cjs/index.cjs +9 -28
- package/dist/cjs/index.native.cjs +21 -0
- package/dist/cjs/index.native.js +10 -28
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/RadioGroup.mjs +105 -100
- package/dist/esm/RadioGroup.mjs.map +1 -1
- package/dist/esm/RadioGroup.native.js +105 -102
- package/dist/esm/RadioGroup.native.js.map +1 -1
- package/dist/esm/index.js +1 -12
- package/dist/esm/index.mjs +1 -12
- package/dist/esm/index.native.js +1 -12
- package/dist/jsx/RadioGroup.mjs +105 -100
- package/dist/jsx/RadioGroup.mjs.map +1 -1
- package/dist/jsx/RadioGroup.native.cjs +146 -0
- package/dist/jsx/RadioGroup.native.js +127 -117
- package/dist/jsx/RadioGroup.native.js.map +1 -1
- package/dist/jsx/index.js +1 -12
- package/dist/jsx/index.mjs +1 -12
- package/dist/jsx/index.native.cjs +21 -0
- package/dist/jsx/index.native.js +10 -28
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +5 -15
- package/src/RadioGroup.tsx +160 -89
- package/src/index.ts +0 -15
- package/types/RadioGroup.d.ts +145 -16
- package/types/RadioGroup.d.ts.map +1 -1
- package/types/index.d.ts +0 -251
- package/types/index.d.ts.map +1 -1
- package/dist/cjs/RadioGroupStyledContext.cjs +0 -32
- package/dist/cjs/RadioGroupStyledContext.native.js +0 -35
- package/dist/cjs/RadioGroupStyledContext.native.js.map +0 -1
- package/dist/cjs/createRadioGroup.cjs +0 -175
- package/dist/cjs/createRadioGroup.native.js +0 -178
- package/dist/cjs/createRadioGroup.native.js.map +0 -1
- package/dist/esm/RadioGroupStyledContext.mjs +0 -7
- package/dist/esm/RadioGroupStyledContext.mjs.map +0 -1
- package/dist/esm/RadioGroupStyledContext.native.js +0 -7
- package/dist/esm/RadioGroupStyledContext.native.js.map +0 -1
- package/dist/esm/createRadioGroup.mjs +0 -139
- package/dist/esm/createRadioGroup.mjs.map +0 -1
- package/dist/esm/createRadioGroup.native.js +0 -139
- package/dist/esm/createRadioGroup.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/RadioGroupStyledContext.mjs +0 -7
- package/dist/jsx/RadioGroupStyledContext.mjs.map +0 -1
- package/dist/jsx/RadioGroupStyledContext.native.js +0 -35
- package/dist/jsx/RadioGroupStyledContext.native.js.map +0 -1
- package/dist/jsx/createRadioGroup.mjs +0 -139
- package/dist/jsx/createRadioGroup.mjs.map +0 -1
- package/dist/jsx/createRadioGroup.native.js +0 -178
- package/dist/jsx/createRadioGroup.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/src/RadioGroupStyledContext.tsx +0 -10
- package/src/createRadioGroup.tsx +0 -191
- package/types/RadioGroupStyledContext.d.ts +0 -6
- package/types/RadioGroupStyledContext.d.ts.map +0 -1
- package/types/createRadioGroup.d.ts +0 -282
- package/types/createRadioGroup.d.ts.map +0 -1
|
@@ -1,138 +1,148 @@
|
|
|
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 RadioGroup_exports = {};
|
|
26
31
|
__export(RadioGroup_exports, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
RadioGroup: () => RadioGroup,
|
|
33
|
+
RadioGroupContext: () => RadioGroupContext,
|
|
34
|
+
RadioGroupFrame: () => RadioGroupFrame,
|
|
35
|
+
RadioGroupIndicatorFrame: () => RadioGroupIndicatorFrame,
|
|
36
|
+
RadioGroupItemContext: () => RadioGroupItemContext,
|
|
37
|
+
RadioGroupItemFrame: () => RadioGroupItemFrame
|
|
30
38
|
});
|
|
31
39
|
module.exports = __toCommonJS(RadioGroup_exports);
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
41
|
var import_core = require("@tamagui/core");
|
|
33
|
-
var
|
|
34
|
-
var
|
|
42
|
+
var import_radio_headless = require("@tamagui/radio-headless");
|
|
43
|
+
var import_roving_focus = require("@tamagui/roving-focus");
|
|
44
|
+
var import_react = __toESM(require("react"), 1);
|
|
35
45
|
var RADIO_GROUP_ITEM_NAME = "RadioGroupItem";
|
|
36
|
-
var RadioGroupItemFrame = (0, import_core.styled)(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
alignItems: "center",
|
|
46
|
-
justifyContent: "center",
|
|
47
|
-
borderWidth: 1,
|
|
48
|
-
borderColor: "$borderColor",
|
|
49
|
-
padding: 0,
|
|
50
|
-
hoverStyle: {
|
|
51
|
-
borderColor: "$borderColorHover",
|
|
52
|
-
backgroundColor: "$backgroundHover"
|
|
53
|
-
},
|
|
54
|
-
focusStyle: {
|
|
55
|
-
borderColor: "$borderColorHover",
|
|
56
|
-
backgroundColor: "$backgroundHover"
|
|
57
|
-
},
|
|
58
|
-
focusVisibleStyle: {
|
|
59
|
-
outlineStyle: "solid",
|
|
60
|
-
outlineWidth: 2,
|
|
61
|
-
outlineColor: "$outlineColor"
|
|
62
|
-
},
|
|
63
|
-
pressStyle: {
|
|
64
|
-
borderColor: "$borderColorFocus",
|
|
65
|
-
backgroundColor: "$backgroundFocus"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
disabled: {
|
|
70
|
-
true: {
|
|
71
|
-
pointerEvents: "none",
|
|
72
|
-
userSelect: "none",
|
|
73
|
-
cursor: "not-allowed",
|
|
74
|
-
hoverStyle: {
|
|
75
|
-
borderColor: "$borderColor",
|
|
76
|
-
backgroundColor: "$background"
|
|
77
|
-
},
|
|
78
|
-
pressStyle: {
|
|
79
|
-
borderColor: "$borderColor",
|
|
80
|
-
backgroundColor: "$background"
|
|
81
|
-
},
|
|
82
|
-
focusVisibleStyle: {
|
|
83
|
-
outlineWidth: 0
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
size: {
|
|
88
|
-
"...size": function (value, param) {
|
|
89
|
-
var {
|
|
90
|
-
props
|
|
91
|
-
} = param;
|
|
92
|
-
var _props_scaleSize;
|
|
93
|
-
var 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));
|
|
94
|
-
return {
|
|
95
|
-
width: size,
|
|
96
|
-
height: size
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
defaultVariants: {
|
|
102
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
103
|
-
}
|
|
46
|
+
var RadioGroupItemFrame = (0, import_core.styled)(import_core.View, {
|
|
47
|
+
displayName: RADIO_GROUP_ITEM_NAME,
|
|
48
|
+
render: "button",
|
|
49
|
+
alignItems: "center",
|
|
50
|
+
justifyContent: "center",
|
|
51
|
+
variants: { disabled: { true: {
|
|
52
|
+
pointerEvents: "none",
|
|
53
|
+
userSelect: "none"
|
|
54
|
+
} } }
|
|
104
55
|
});
|
|
105
56
|
var RADIO_GROUP_INDICATOR_NAME = "RadioGroupIndicator";
|
|
106
|
-
var RadioGroupIndicatorFrame = (0, import_core.styled)(
|
|
107
|
-
name: RADIO_GROUP_INDICATOR_NAME,
|
|
108
|
-
variants: {
|
|
109
|
-
unstyled: {
|
|
110
|
-
false: {
|
|
111
|
-
width: "33%",
|
|
112
|
-
height: "33%",
|
|
113
|
-
borderRadius: 1e3,
|
|
114
|
-
backgroundColor: "$color"
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
defaultVariants: {
|
|
119
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
120
|
-
}
|
|
121
|
-
});
|
|
57
|
+
var RadioGroupIndicatorFrame = (0, import_core.styled)(import_core.View, { displayName: RADIO_GROUP_INDICATOR_NAME });
|
|
122
58
|
var RADIO_GROUP_NAME = "RadioGroup";
|
|
123
|
-
var RadioGroupFrame = (0, import_core.styled)(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
59
|
+
var RadioGroupFrame = (0, import_core.styled)(import_core.View, {
|
|
60
|
+
displayName: RADIO_GROUP_NAME,
|
|
61
|
+
variants: { orientation: {
|
|
62
|
+
horizontal: {
|
|
63
|
+
flexDirection: "row",
|
|
64
|
+
spaceDirection: "horizontal"
|
|
65
|
+
},
|
|
66
|
+
vertical: {
|
|
67
|
+
flexDirection: "column",
|
|
68
|
+
spaceDirection: "vertical"
|
|
69
|
+
}
|
|
70
|
+
} }
|
|
71
|
+
});
|
|
72
|
+
var RadioGroupContext = /* @__PURE__ */ import_react.default.createContext({});
|
|
73
|
+
var RadioGroupItemContext = /* @__PURE__ */ import_react.default.createContext({
|
|
74
|
+
checked: false,
|
|
75
|
+
disabled: false
|
|
76
|
+
});
|
|
77
|
+
var RadioGroupComponent = (0, import_core.createStyledHOC)(RadioGroupFrame, function(props, ref) {
|
|
78
|
+
var { value, defaultValue, onValueChange, required = false, disabled = false, name, native, accentColor, orientation = "vertical", ...rest } = props;
|
|
79
|
+
var { providerValue, frameAttrs, rovingFocusGroupAttrs } = (0, import_radio_headless.useRadioGroup)({
|
|
80
|
+
orientation,
|
|
81
|
+
name,
|
|
82
|
+
defaultValue,
|
|
83
|
+
value,
|
|
84
|
+
onValueChange,
|
|
85
|
+
required,
|
|
86
|
+
disabled,
|
|
87
|
+
native,
|
|
88
|
+
accentColor
|
|
89
|
+
});
|
|
90
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupContext.Provider, {
|
|
91
|
+
value: providerValue,
|
|
92
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup, {
|
|
93
|
+
...rovingFocusGroupAttrs,
|
|
94
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupFrame, {
|
|
95
|
+
...frameAttrs,
|
|
96
|
+
ref,
|
|
97
|
+
...rest
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
});
|
|
137
101
|
});
|
|
102
|
+
var RadioGroupItem = (0, import_core.createStyledHOC)(RadioGroupItemFrame, function(props, ref) {
|
|
103
|
+
var { value, labelledBy, onPress, onKeyDown, disabled, id, ...rest } = props;
|
|
104
|
+
var { providerValue, bubbleInput, rovingFocusGroupAttrs, frameAttrs, isFormControl, native } = (0, import_radio_headless.useRadioGroupItem)({
|
|
105
|
+
radioGroupContext: RadioGroupContext,
|
|
106
|
+
value,
|
|
107
|
+
id,
|
|
108
|
+
labelledBy,
|
|
109
|
+
disabled,
|
|
110
|
+
onPress,
|
|
111
|
+
onKeyDown
|
|
112
|
+
});
|
|
113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemContext.Provider, {
|
|
114
|
+
value: providerValue,
|
|
115
|
+
children: import_core.isWeb && native ? bubbleInput : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup.Item, {
|
|
116
|
+
...rovingFocusGroupAttrs,
|
|
117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemFrame, {
|
|
118
|
+
...frameAttrs,
|
|
119
|
+
ref,
|
|
120
|
+
...rest
|
|
121
|
+
})
|
|
122
|
+
}), isFormControl && bubbleInput] })
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
126
|
+
var RadioGroupIndicator = (0, import_core.createStyledHOC)(RadioGroupIndicatorFrame, function(props, forwardedRef) {
|
|
127
|
+
var { forceMount, disabled, ...indicatorProps } = props;
|
|
128
|
+
var { checked, ...useIndicatorRest } = (0, import_radio_headless.useRadioGroupItemIndicator)({
|
|
129
|
+
radioGroupItemContext: RadioGroupItemContext,
|
|
130
|
+
disabled
|
|
131
|
+
});
|
|
132
|
+
if (forceMount || checked) {
|
|
133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupIndicatorFrame, {
|
|
134
|
+
...useIndicatorRest,
|
|
135
|
+
ref: forwardedRef,
|
|
136
|
+
...indicatorProps
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
});
|
|
141
|
+
RadioGroupIndicator.displayName = "RadioGroupIndicator";
|
|
142
|
+
var RadioGroup = (0, import_core.withStaticProperties)(RadioGroupComponent, {
|
|
143
|
+
Item: RadioGroupItem,
|
|
144
|
+
Indicator: RadioGroupIndicator
|
|
145
|
+
});
|
|
146
|
+
RadioGroup.displayName = "RadioGroup";
|
|
147
|
+
|
|
138
148
|
//# sourceMappingURL=RadioGroup.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"RadioGroup.native.js","names":[],"sources":["jsx/RadioGroup.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 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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar RadioGroup_exports = {};\n__export(RadioGroup_exports, {\n RadioGroup: () => RadioGroup,\n RadioGroupContext: () => RadioGroupContext,\n RadioGroupFrame: () => RadioGroupFrame,\n RadioGroupIndicatorFrame: () => RadioGroupIndicatorFrame,\n RadioGroupItemContext: () => RadioGroupItemContext,\n RadioGroupItemFrame: () => RadioGroupItemFrame\n});\nmodule.exports = __toCommonJS(RadioGroup_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_radio_headless = require(\"@tamagui/radio-headless\");\nvar import_roving_focus = require(\"@tamagui/roving-focus\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar RADIO_GROUP_ITEM_NAME = \"RadioGroupItem\";\nvar RadioGroupItemFrame = (0, import_core.styled)(import_core.View, {\n displayName: RADIO_GROUP_ITEM_NAME,\n render: \"button\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\",\n userSelect: \"none\"\n }\n }\n }\n});\nvar RADIO_GROUP_INDICATOR_NAME = \"RadioGroupIndicator\";\nvar RadioGroupIndicatorFrame = (0, import_core.styled)(import_core.View, {\n displayName: RADIO_GROUP_INDICATOR_NAME\n});\nvar RADIO_GROUP_NAME = \"RadioGroup\";\nvar RadioGroupFrame = (0, import_core.styled)(import_core.View, {\n displayName: RADIO_GROUP_NAME,\n variants: {\n orientation: {\n horizontal: {\n flexDirection: \"row\",\n spaceDirection: \"horizontal\"\n },\n vertical: {\n flexDirection: \"column\",\n spaceDirection: \"vertical\"\n }\n }\n }\n});\nvar RadioGroupContext = /* @__PURE__ */ import_react.default.createContext({});\nvar RadioGroupItemContext = /* @__PURE__ */ import_react.default.createContext({\n checked: false,\n disabled: false\n});\nvar RadioGroupComponent = (0, import_core.createStyledHOC)(RadioGroupFrame, function(props, ref) {\n var { value, defaultValue, onValueChange, required = false, disabled = false, name, native, accentColor, orientation = \"vertical\", ...rest } = props;\n var { providerValue, frameAttrs, rovingFocusGroupAttrs } = (0, import_radio_headless.useRadioGroup)({\n orientation,\n name,\n defaultValue,\n value,\n onValueChange,\n required,\n disabled,\n native,\n accentColor\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupContext.Provider, {\n value: providerValue,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup, {\n ...rovingFocusGroupAttrs,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupFrame, {\n ...frameAttrs,\n ref,\n ...rest\n })\n })\n });\n});\nvar RadioGroupItem = (0, import_core.createStyledHOC)(RadioGroupItemFrame, function(props, ref) {\n var { value, labelledBy, onPress, onKeyDown, disabled, id, ...rest } = props;\n var { providerValue, bubbleInput, rovingFocusGroupAttrs, frameAttrs, isFormControl, native } = (0, import_radio_headless.useRadioGroupItem)({\n radioGroupContext: RadioGroupContext,\n value,\n id,\n labelledBy,\n disabled,\n onPress,\n onKeyDown\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemContext.Provider, {\n value: providerValue,\n children: import_core.isWeb && native ? bubbleInput : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup.Item, {\n ...rovingFocusGroupAttrs,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemFrame, {\n ...frameAttrs,\n ref,\n ...rest\n })\n }),\n isFormControl && bubbleInput\n ]\n })\n });\n});\nRadioGroupItem.displayName = \"RadioGroupItem\";\nvar RadioGroupIndicator = (0, import_core.createStyledHOC)(RadioGroupIndicatorFrame, function(props, forwardedRef) {\n var { forceMount, disabled, ...indicatorProps } = props;\n var { checked, ...useIndicatorRest } = (0, import_radio_headless.useRadioGroupItemIndicator)({\n radioGroupItemContext: RadioGroupItemContext,\n disabled\n });\n if (forceMount || checked) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupIndicatorFrame, {\n ...useIndicatorRest,\n ref: forwardedRef,\n ...indicatorProps\n });\n }\n return null;\n});\nRadioGroupIndicator.displayName = \"RadioGroupIndicator\";\nvar RadioGroup = (0, import_core.withStaticProperties)(RadioGroupComponent, {\n Item: RadioGroupItem,\n Indicator: RadioGroupIndicator\n});\nRadioGroup.displayName = \"RadioGroup\";\n//# sourceMappingURL=RadioGroup.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;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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B,EACF,CAAC;CACH,CAAC;AACH,CAAC;AACD,eAAe,cAAc;AAC7B,IAAI,uBAAuB,GAAG,YAAY,iBAAiB,0BAA0B,SAAS,OAAO,cAAc;CACjH,IAAI,EAAE,YAAY,UAAU,GAAG,mBAAmB;CAClD,IAAI,EAAE,SAAS,GAAG,sBAAsB,GAAG,sBAAsB,4BAA4B;EAC3F,uBAAuB;EACvB;CACF,CAAC;CACD,IAAI,cAAc,SAAS;EACzB,OAAuB,iBAAC,GAAG,mBAAmB,KAAK,0BAA0B;GAC3E,GAAG;GACH,KAAK;GACL,GAAG;EACL,CAAC;CACH;CACA,OAAO;AACT,CAAC;AACD,oBAAoB,cAAc;AAClC,IAAI,cAAc,GAAG,YAAY,sBAAsB,qBAAqB;CAC1E,MAAM;CACN,WAAW;AACb,CAAC;AACD,WAAW,cAAc"}
|
package/dist/jsx/index.js
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { createRadioGroup } from "./createRadioGroup.mjs";
|
|
3
|
-
export * from "./createRadioGroup.mjs";
|
|
4
|
-
export * from "./RadioGroup.mjs";
|
|
5
|
-
export * from "./RadioGroupStyledContext.mjs";
|
|
6
|
-
const RadioGroup = createRadioGroup({
|
|
7
|
-
Frame: RadioGroupFrame,
|
|
8
|
-
Indicator: RadioGroupIndicatorFrame,
|
|
9
|
-
Item: RadioGroupItemFrame
|
|
10
|
-
});
|
|
11
|
-
export { RadioGroup };
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./RadioGroup.mjs"
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { createRadioGroup } from "./createRadioGroup.mjs";
|
|
3
|
-
export * from "./createRadioGroup.mjs";
|
|
4
|
-
export * from "./RadioGroup.mjs";
|
|
5
|
-
export * from "./RadioGroupStyledContext.mjs";
|
|
6
|
-
const RadioGroup = createRadioGroup({
|
|
7
|
-
Frame: RadioGroupFrame,
|
|
8
|
-
Indicator: RadioGroupIndicatorFrame,
|
|
9
|
-
Item: RadioGroupItemFrame
|
|
10
|
-
});
|
|
11
|
-
export { RadioGroup };
|
|
12
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
export * from "./RadioGroup.mjs"
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./RadioGroup.native.js"), module.exports);
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,41 +1,23 @@
|
|
|
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
|
-
RadioGroup: () => RadioGroup
|
|
29
|
-
});
|
|
30
20
|
module.exports = __toCommonJS(index_exports);
|
|
31
|
-
var import_RadioGroup = require("./RadioGroup.native.js");
|
|
32
|
-
var import_createRadioGroup = require("./createRadioGroup.native.js");
|
|
33
|
-
__reExport(index_exports, require("./createRadioGroup.native.js"), module.exports);
|
|
34
21
|
__reExport(index_exports, require("./RadioGroup.native.js"), module.exports);
|
|
35
|
-
|
|
36
|
-
var RadioGroup = (0, import_createRadioGroup.createRadioGroup)({
|
|
37
|
-
Frame: import_RadioGroup.RadioGroupFrame,
|
|
38
|
-
Indicator: import_RadioGroup.RadioGroupIndicatorFrame,
|
|
39
|
-
Item: import_RadioGroup.RadioGroupItemFrame
|
|
40
|
-
});
|
|
22
|
+
|
|
41
23
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./RadioGroup\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,wBAAc,GAAG,OAAO,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/radio-group",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.643.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -34,22 +34,12 @@
|
|
|
34
34
|
"clean:build": "tamagui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tamagui/
|
|
38
|
-
"@tamagui/
|
|
39
|
-
"@tamagui/
|
|
40
|
-
"@tamagui/create-context": "2.7.7",
|
|
41
|
-
"@tamagui/focusable": "2.7.7",
|
|
42
|
-
"@tamagui/get-token": "2.7.7",
|
|
43
|
-
"@tamagui/helpers": "2.7.7",
|
|
44
|
-
"@tamagui/label": "2.7.7",
|
|
45
|
-
"@tamagui/radio-headless": "2.7.7",
|
|
46
|
-
"@tamagui/roving-focus": "2.7.7",
|
|
47
|
-
"@tamagui/stacks": "2.7.7",
|
|
48
|
-
"@tamagui/use-controllable-state": "2.7.7",
|
|
49
|
-
"@tamagui/use-previous": "2.7.7"
|
|
37
|
+
"@tamagui/core": "3.0.0-beta.643.1",
|
|
38
|
+
"@tamagui/radio-headless": "3.0.0-beta.643.1",
|
|
39
|
+
"@tamagui/roving-focus": "3.0.0-beta.643.1"
|
|
50
40
|
},
|
|
51
41
|
"devDependencies": {
|
|
52
|
-
"@tamagui/build": "
|
|
42
|
+
"@tamagui/build": "3.0.0-beta.643.1",
|
|
53
43
|
"react": ">=19"
|
|
54
44
|
},
|
|
55
45
|
"peerDependencies": {
|