@tamagui/toggle-group 1.110.5 → 1.111.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/Toggle.native.js +11 -107
- package/dist/cjs/Toggle.native.js.map +2 -2
- package/dist/cjs/ToggleGroup.native.js +52 -171
- package/dist/cjs/ToggleGroup.native.js.map +2 -2
- package/dist/esm/Toggle.native.js +10 -105
- package/dist/esm/Toggle.native.js.map +2 -2
- package/dist/esm/Toggle.native.mjs +95 -0
- package/dist/esm/Toggle.native.mjs.map +1 -0
- package/dist/esm/ToggleGroup.native.js +52 -170
- package/dist/esm/ToggleGroup.native.js.map +2 -2
- package/dist/esm/ToggleGroup.native.mjs +281 -0
- package/dist/esm/ToggleGroup.native.mjs.map +1 -0
- package/dist/esm/index.native.mjs +2 -0
- package/dist/esm/index.native.mjs.map +1 -0
- package/dist/jsx/Toggle.native.js +10 -105
- package/dist/jsx/Toggle.native.js.map +2 -2
- package/dist/jsx/ToggleGroup.native.js +52 -170
- package/dist/jsx/ToggleGroup.native.js.map +2 -2
- package/package.json +15 -15
|
@@ -4,98 +4,6 @@ import { ThemeableStack } from "@tamagui/stacks";
|
|
|
4
4
|
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
5
5
|
import { styled } from "@tamagui/web";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
function _array_like_to_array(arr, len) {
|
|
8
|
-
(len == null || len > arr.length) && (len = arr.length);
|
|
9
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
10
|
-
return arr2;
|
|
11
|
-
}
|
|
12
|
-
function _array_with_holes(arr) {
|
|
13
|
-
if (Array.isArray(arr)) return arr;
|
|
14
|
-
}
|
|
15
|
-
function _define_property(obj, key, value) {
|
|
16
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
17
|
-
value,
|
|
18
|
-
enumerable: !0,
|
|
19
|
-
configurable: !0,
|
|
20
|
-
writable: !0
|
|
21
|
-
}) : obj[key] = value, obj;
|
|
22
|
-
}
|
|
23
|
-
function _iterable_to_array_limit(arr, i) {
|
|
24
|
-
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
25
|
-
if (_i != null) {
|
|
26
|
-
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
27
|
-
try {
|
|
28
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
29
|
-
;
|
|
30
|
-
} catch (err) {
|
|
31
|
-
_d = !0, _e = err;
|
|
32
|
-
} finally {
|
|
33
|
-
try {
|
|
34
|
-
!_n && _i.return != null && _i.return();
|
|
35
|
-
} finally {
|
|
36
|
-
if (_d) throw _e;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return _arr;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function _non_iterable_rest() {
|
|
43
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
44
|
-
}
|
|
45
|
-
function _object_spread(target) {
|
|
46
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
47
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
48
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
49
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
50
|
-
}))), ownKeys2.forEach(function(key) {
|
|
51
|
-
_define_property(target, key, source[key]);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
return target;
|
|
55
|
-
}
|
|
56
|
-
function ownKeys(object, enumerableOnly) {
|
|
57
|
-
var keys = Object.keys(object);
|
|
58
|
-
if (Object.getOwnPropertySymbols) {
|
|
59
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
60
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
61
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
62
|
-
})), keys.push.apply(keys, symbols);
|
|
63
|
-
}
|
|
64
|
-
return keys;
|
|
65
|
-
}
|
|
66
|
-
function _object_spread_props(target, source) {
|
|
67
|
-
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
68
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
69
|
-
}), target;
|
|
70
|
-
}
|
|
71
|
-
function _object_without_properties(source, excluded) {
|
|
72
|
-
if (source == null) return {};
|
|
73
|
-
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
74
|
-
if (Object.getOwnPropertySymbols) {
|
|
75
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
76
|
-
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
77
|
-
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
78
|
-
}
|
|
79
|
-
return target;
|
|
80
|
-
}
|
|
81
|
-
function _object_without_properties_loose(source, excluded) {
|
|
82
|
-
if (source == null) return {};
|
|
83
|
-
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
84
|
-
for (i = 0; i < sourceKeys.length; i++)
|
|
85
|
-
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
86
|
-
return target;
|
|
87
|
-
}
|
|
88
|
-
function _sliced_to_array(arr, i) {
|
|
89
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
90
|
-
}
|
|
91
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
92
|
-
if (o) {
|
|
93
|
-
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
94
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
95
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
96
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
7
|
var NAME = "Toggle", ToggleFrame = styled(ThemeableStack, {
|
|
100
8
|
name: NAME,
|
|
101
9
|
tag: "button",
|
|
@@ -153,29 +61,26 @@ var NAME = "Toggle", ToggleFrame = styled(ThemeableStack, {
|
|
|
153
61
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
154
62
|
}
|
|
155
63
|
}), Toggle = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
156
|
-
var
|
|
157
|
-
"pressed",
|
|
158
|
-
"defaultPressed",
|
|
159
|
-
"onPressedChange"
|
|
160
|
-
]), _useControllableState = _sliced_to_array(useControllableState({
|
|
64
|
+
var { pressed: pressedProp, defaultPressed = !1, onPressedChange, ...buttonProps } = props, [pressed = !1, setPressed] = useControllableState({
|
|
161
65
|
prop: pressedProp,
|
|
162
66
|
onChange: onPressedChange,
|
|
163
67
|
defaultProp: defaultPressed
|
|
164
|
-
}),
|
|
165
|
-
return /* @__PURE__ */ _jsx(ToggleFrame,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
68
|
+
}), _props_onPress;
|
|
69
|
+
return /* @__PURE__ */ _jsx(ToggleFrame, {
|
|
70
|
+
...!props.unstyled && {
|
|
71
|
+
theme: pressed ? "active" : null,
|
|
72
|
+
themeShallow: !0
|
|
73
|
+
},
|
|
169
74
|
active: props.unstyled ? void 0 : pressed,
|
|
170
75
|
"aria-pressed": pressed,
|
|
171
76
|
"data-state": pressed ? "on" : "off",
|
|
172
|
-
"data-disabled": props.disabled ? "" : void 0
|
|
173
|
-
|
|
77
|
+
"data-disabled": props.disabled ? "" : void 0,
|
|
78
|
+
...buttonProps,
|
|
174
79
|
ref: forwardedRef,
|
|
175
80
|
onPress: composeEventHandlers((_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : void 0, function() {
|
|
176
81
|
props.disabled || setPressed(!pressed);
|
|
177
82
|
})
|
|
178
|
-
})
|
|
83
|
+
});
|
|
179
84
|
});
|
|
180
85
|
export {
|
|
181
86
|
Toggle,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/ui/toggle-group/src/Toggle.tsx"],
|
|
4
|
-
"mappings": ";AAAA,SAASA,4BAA4B;AACrC,SAASC,sBAAsB;AAC/B,SAASC,4BAA4B;AAErC,SAASC,cAAc;AACvB,YAAYC,WAAW
|
|
5
|
-
"names": ["composeEventHandlers", "ThemeableStack", "useControllableState", "styled", "React", "NAME", "ToggleFrame", "name", "tag", "variants", "unstyled", "false", "pressTheme", "backgroundColor", "alignItems", "justifyContent", "display", "borderColor", "borderWidth", "margin", "hoverStyle", "pressStyle", "focusStyle", "focusVisibleStyle", "outlineColor", "outlineWidth", "outlineStyle", "active", "true", "zIndex", "orientation", "horizontal", "flexDirection", "spaceDirection", "vertical", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "Toggle", "forwardRef", "props", "forwardedRef", "
|
|
4
|
+
"mappings": ";AAAA,SAASA,4BAA4B;AACrC,SAASC,sBAAsB;AAC/B,SAASC,4BAA4B;AAErC,SAASC,cAAc;AACvB,YAAYC,WAAW;AAMvB,IAAMC,OAAO,UAMAC,cAAcH,OAAOF,gBAAgB;EAChDM,MAAMF;EACNG,KAAK;EAELC,UAAU;IACRC,UAAU;MACRC,OAAO;QACLC,YAAY;QACZC,iBAAiB;QACjBC,YAAY;QACZC,gBAAgB;QAChBC,SAAS;QACTC,aAAa;QACbC,aAAa;QACbC,QAAQ;QACRC,YAAY;UACVP,iBAAiB;QACnB;QACAQ,YAAY;UACVR,iBAAiB;QACnB;QACAS,YAAY;UACVL,aAAa;QACf;QACAM,mBAAmB;UACjBC,cAAc;UACdC,cAAc;UACdC,cAAc;QAChB;MACF;IACF;IAEAC,QAAQ;MACNC,MAAM;QACJC,QAAQ;QAERT,YAAY;UACVP,iBAAiB;QACnB;QAEAS,YAAY;UACVL,aAAa;UACbJ,iBAAiB;QACnB;MACF;IACF;IAEAiB,aAAa;MACXC,YAAY;QACVC,eAAe;QACfC,gBAAgB;MAClB;MACAC,UAAU;QACRF,eAAe;QACfC,gBAAgB;MAClB;IACF;EACF;EAEAE,iBAAiB;IACfzB,UAAU0B,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAcaC,SAASnC,sBAAMoC,WAC1B,SAAgBC,OAAOC,cAAY;AACjC,MAAM,EACJC,SAASC,aACTC,iBAAiB,IACjBC,iBACA,GAAGC,YAAAA,IACDN,OAEE,CAACE,UAAU,IAAOK,UAAAA,IAAc9C,qBAAqB;IACzD+C,MAAML;IACNM,UAAUJ;IACVK,aAAaN;EACf,CAAA,GAckCJ;AAZlC,SACE,qBAACnC,aAAAA;IACE,GAAI,CAACmC,MAAM/B,YAAY;MACtB0C,OAAOT,UAAU,WAAW;MAC5BU,cAAc;IAChB;IACA1B,QAASc,MAAM/B,WAAqB4C,SAAVX;IAC1BY,gBAAcZ;IACda,cAAYb,UAAU,OAAO;IAC7Bc,iBAAehB,MAAMiB,WAAW,KAAKJ;IACpC,GAAGP;IACJY,KAAKjB;IACLkB,SAAS5D,sBAAqByC,iBAAAA,MAAMmB,aAAO,QAAbnB,mBAAAA,SAAAA,iBAAiBa,QAAW,WAAA;AACxD,MAAKb,MAAMiB,YACTV,WAAW,CAACL,OAAAA;IAEhB,CAAA;;AAGN,CAAA;",
|
|
5
|
+
"names": ["composeEventHandlers", "ThemeableStack", "useControllableState", "styled", "React", "NAME", "ToggleFrame", "name", "tag", "variants", "unstyled", "false", "pressTheme", "backgroundColor", "alignItems", "justifyContent", "display", "borderColor", "borderWidth", "margin", "hoverStyle", "pressStyle", "focusStyle", "focusVisibleStyle", "outlineColor", "outlineWidth", "outlineStyle", "active", "true", "zIndex", "orientation", "horizontal", "flexDirection", "spaceDirection", "vertical", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "Toggle", "forwardRef", "props", "forwardedRef", "pressed", "pressedProp", "defaultPressed", "onPressedChange", "buttonProps", "setPressed", "prop", "onChange", "defaultProp", "theme", "themeShallow", "undefined", "aria-pressed", "data-state", "data-disabled", "disabled", "ref", "onPress"]
|
|
6
6
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { composeEventHandlers } from "@tamagui/helpers";
|
|
3
|
+
import { ThemeableStack } from "@tamagui/stacks";
|
|
4
|
+
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
5
|
+
import { styled } from "@tamagui/web";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
var NAME = "Toggle",
|
|
8
|
+
ToggleFrame = styled(ThemeableStack, {
|
|
9
|
+
name: NAME,
|
|
10
|
+
tag: "button",
|
|
11
|
+
variants: {
|
|
12
|
+
unstyled: {
|
|
13
|
+
false: {
|
|
14
|
+
pressTheme: !0,
|
|
15
|
+
backgroundColor: "$background",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
display: "flex",
|
|
19
|
+
borderColor: "$borderColor",
|
|
20
|
+
borderWidth: 1,
|
|
21
|
+
margin: -1,
|
|
22
|
+
hoverStyle: {
|
|
23
|
+
backgroundColor: "$backgroundHover"
|
|
24
|
+
},
|
|
25
|
+
pressStyle: {
|
|
26
|
+
backgroundColor: "$backgroundPress"
|
|
27
|
+
},
|
|
28
|
+
focusStyle: {
|
|
29
|
+
borderColor: "$borderColorFocus"
|
|
30
|
+
},
|
|
31
|
+
focusVisibleStyle: {
|
|
32
|
+
outlineColor: "$outlineColor",
|
|
33
|
+
outlineWidth: 2,
|
|
34
|
+
outlineStyle: "solid"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
active: {
|
|
39
|
+
true: {
|
|
40
|
+
zIndex: 1,
|
|
41
|
+
hoverStyle: {
|
|
42
|
+
backgroundColor: "$background"
|
|
43
|
+
},
|
|
44
|
+
focusStyle: {
|
|
45
|
+
borderColor: "$borderColor",
|
|
46
|
+
backgroundColor: "$background"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
orientation: {
|
|
51
|
+
horizontal: {
|
|
52
|
+
flexDirection: "row",
|
|
53
|
+
spaceDirection: "horizontal"
|
|
54
|
+
},
|
|
55
|
+
vertical: {
|
|
56
|
+
flexDirection: "column",
|
|
57
|
+
spaceDirection: "vertical"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
defaultVariants: {
|
|
62
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
63
|
+
}
|
|
64
|
+
}),
|
|
65
|
+
Toggle = /* @__PURE__ */React.forwardRef(function (props, forwardedRef) {
|
|
66
|
+
var {
|
|
67
|
+
pressed: pressedProp,
|
|
68
|
+
defaultPressed = !1,
|
|
69
|
+
onPressedChange,
|
|
70
|
+
...buttonProps
|
|
71
|
+
} = props,
|
|
72
|
+
[pressed = !1, setPressed] = useControllableState({
|
|
73
|
+
prop: pressedProp,
|
|
74
|
+
onChange: onPressedChange,
|
|
75
|
+
defaultProp: defaultPressed
|
|
76
|
+
}),
|
|
77
|
+
_props_onPress;
|
|
78
|
+
return /* @__PURE__ */_jsx(ToggleFrame, {
|
|
79
|
+
...(!props.unstyled && {
|
|
80
|
+
theme: pressed ? "active" : null,
|
|
81
|
+
themeShallow: !0
|
|
82
|
+
}),
|
|
83
|
+
active: props.unstyled ? void 0 : pressed,
|
|
84
|
+
"aria-pressed": pressed,
|
|
85
|
+
"data-state": pressed ? "on" : "off",
|
|
86
|
+
"data-disabled": props.disabled ? "" : void 0,
|
|
87
|
+
...buttonProps,
|
|
88
|
+
ref: forwardedRef,
|
|
89
|
+
onPress: composeEventHandlers((_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : void 0, function () {
|
|
90
|
+
props.disabled || setPressed(!pressed);
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
export { Toggle, ToggleFrame };
|
|
95
|
+
//# sourceMappingURL=Toggle.native.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jsx","_jsx","composeEventHandlers","ThemeableStack","useControllableState","styled","React","NAME","ToggleFrame","name","tag","variants","unstyled","false","pressTheme","backgroundColor","alignItems","justifyContent","display","borderColor","borderWidth","margin","hoverStyle","pressStyle","focusStyle","focusVisibleStyle","outlineColor","outlineWidth","outlineStyle","active","true","zIndex","orientation","horizontal","flexDirection","spaceDirection","vertical","defaultVariants","process","env","TAMAGUI_HEADLESS","Toggle","forwardRef","props","forwardedRef","pressed","pressedProp","defaultPressed","onPressedChange","buttonProps","setPressed","prop","onChange","defaultProp","_props_onPress","theme","themeShallow","disabled","ref","onPress"],"sources":["../../src/Toggle.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAA,IAAAC,IAAA,2BAA4B;AACrC,SAASC,oBAAA,QAAsB;AAC/B,SAASC,cAAA,yBAA4B;AAErC,SAASC,oBAAc;AACvB,SAAAC,MAAY,QAAW;AAwGjB,YAAAC,KAAA;AAlGN,IAAAC,IAAM,WAAO;EAAAC,WAMA,GAAAH,MAAc,CAAAF,cAAO;IAChCM,IAAA,EAAMF,IAAA;IACNG,GAAA,EAAK;IAELC,QAAA,EAAU;MACRC,QAAA,EAAU;QACRC,KAAA,EAAO;UACLC,UAAA,EAAY;UACZC,eAAA,EAAiB;UACjBC,UAAA,EAAY;UACZC,cAAA,EAAgB;UAChBC,OAAA,EAAS;UACTC,WAAA,EAAa;UACbC,WAAA,EAAa;UACbC,MAAA,EAAQ;UACRC,U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AYS,GAAA,EAAAd,YACf;MAAqBe,OAC5B,EAAAzD,oBAAc,EAAAoD,cAAA,GAAAX,KAAA,CAAAgB,OAAA,cAAAL,cAAA,cAAAA,cAAA;QAAAX,KAChB,CAAAc,QAAA,IAAAP,UAAA,EAAAL,OAAA;MAAA;IAC0B;EACZ;AACe,SACQJ,MACpC,EAAGjC,WACC","ignoreList":[]}
|
|
@@ -12,114 +12,8 @@ import { useDirection } from "@tamagui/use-direction";
|
|
|
12
12
|
import { createStyledContext, getVariableValue, styled, useTheme } from "@tamagui/web";
|
|
13
13
|
import React from "react";
|
|
14
14
|
import { Toggle, ToggleFrame } from "./Toggle";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
18
|
-
return arr2;
|
|
19
|
-
}
|
|
20
|
-
function _array_with_holes(arr) {
|
|
21
|
-
if (Array.isArray(arr)) return arr;
|
|
22
|
-
}
|
|
23
|
-
function _array_without_holes(arr) {
|
|
24
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
25
|
-
}
|
|
26
|
-
function _define_property(obj, key, value) {
|
|
27
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
28
|
-
value,
|
|
29
|
-
enumerable: !0,
|
|
30
|
-
configurable: !0,
|
|
31
|
-
writable: !0
|
|
32
|
-
}) : obj[key] = value, obj;
|
|
33
|
-
}
|
|
34
|
-
function _iterable_to_array(iter) {
|
|
35
|
-
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
36
|
-
}
|
|
37
|
-
function _iterable_to_array_limit(arr, i) {
|
|
38
|
-
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
39
|
-
if (_i != null) {
|
|
40
|
-
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
41
|
-
try {
|
|
42
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
43
|
-
;
|
|
44
|
-
} catch (err) {
|
|
45
|
-
_d = !0, _e = err;
|
|
46
|
-
} finally {
|
|
47
|
-
try {
|
|
48
|
-
!_n && _i.return != null && _i.return();
|
|
49
|
-
} finally {
|
|
50
|
-
if (_d) throw _e;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return _arr;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function _non_iterable_rest() {
|
|
57
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
58
|
-
}
|
|
59
|
-
function _non_iterable_spread() {
|
|
60
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
61
|
-
}
|
|
62
|
-
function _object_spread(target) {
|
|
63
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
64
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
65
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
66
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
67
|
-
}))), ownKeys2.forEach(function(key) {
|
|
68
|
-
_define_property(target, key, source[key]);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
return target;
|
|
72
|
-
}
|
|
73
|
-
function ownKeys(object, enumerableOnly) {
|
|
74
|
-
var keys = Object.keys(object);
|
|
75
|
-
if (Object.getOwnPropertySymbols) {
|
|
76
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
77
|
-
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
78
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
79
|
-
})), keys.push.apply(keys, symbols);
|
|
80
|
-
}
|
|
81
|
-
return keys;
|
|
82
|
-
}
|
|
83
|
-
function _object_spread_props(target, source) {
|
|
84
|
-
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
85
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
86
|
-
}), target;
|
|
87
|
-
}
|
|
88
|
-
function _object_without_properties(source, excluded) {
|
|
89
|
-
if (source == null) return {};
|
|
90
|
-
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
91
|
-
if (Object.getOwnPropertySymbols) {
|
|
92
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
93
|
-
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
94
|
-
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
95
|
-
}
|
|
96
|
-
return target;
|
|
97
|
-
}
|
|
98
|
-
function _object_without_properties_loose(source, excluded) {
|
|
99
|
-
if (source == null) return {};
|
|
100
|
-
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
101
|
-
for (i = 0; i < sourceKeys.length; i++)
|
|
102
|
-
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
103
|
-
return target;
|
|
104
|
-
}
|
|
105
|
-
function _sliced_to_array(arr, i) {
|
|
106
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
107
|
-
}
|
|
108
|
-
function _to_consumable_array(arr) {
|
|
109
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
110
|
-
}
|
|
111
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
112
|
-
if (o) {
|
|
113
|
-
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
114
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
115
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
116
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
var TOGGLE_GROUP_NAME = "ToggleGroup", TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem", TOGGLE_GROUP_CONTEXT = "ToggleGroup", _createStyledContext = createStyledContext(), ToggleGroupItemProvider = _createStyledContext.Provider, useToggleGroupItemContext = _createStyledContext.useStyledContext, _createStyledContext1 = createStyledContext(), ToggleGroupContext = _createStyledContext1.Provider, useToggleGroupContext = _createStyledContext1.useStyledContext, ToggleGroupItem = ToggleFrame.extractable(/* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
120
|
-
var disablePassStyles = props.disablePassStyles, rest = _object_without_properties(props, [
|
|
121
|
-
"disablePassStyles"
|
|
122
|
-
]), valueContext = useToggleGroupValueContext(props.__scopeToggleGroup), context = useToggleGroupContext(props.__scopeToggleGroup), pressed = valueContext == null ? void 0 : valueContext.value.includes(props.value), disabled = context.disabled || props.disabled || !1, groupItemProps = useGroupItem({
|
|
15
|
+
var TOGGLE_GROUP_NAME = "ToggleGroup", TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem", TOGGLE_GROUP_CONTEXT = "ToggleGroup", { Provider: ToggleGroupItemProvider, useStyledContext: useToggleGroupItemContext } = createStyledContext(), { Provider: ToggleGroupContext, useStyledContext: useToggleGroupContext } = createStyledContext(), ToggleGroupItem = ToggleFrame.extractable(/* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
16
|
+
var { disablePassStyles, ...rest } = props, valueContext = useToggleGroupValueContext(props.__scopeToggleGroup), context = useToggleGroupContext(props.__scopeToggleGroup), pressed = valueContext?.value.includes(props.value), disabled = context.disabled || props.disabled || !1, groupItemProps = useGroupItem({
|
|
123
17
|
disabled
|
|
124
18
|
}), _props_size, size = (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : context.size, sizeProps = props.unstyled ? {} : {
|
|
125
19
|
width: void 0,
|
|
@@ -130,16 +24,19 @@ var TOGGLE_GROUP_NAME = "ToggleGroup", TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem
|
|
|
130
24
|
color: theme.color
|
|
131
25
|
}), childrens = React.Children.toArray(props.children), children = childrens.map(function(child) {
|
|
132
26
|
return props.disablePassStyles || !/* @__PURE__ */ React.isValidElement(child) ? child : getThemedIcon(child);
|
|
133
|
-
}), commonProps =
|
|
27
|
+
}), commonProps = {
|
|
134
28
|
pressed,
|
|
135
|
-
disabled
|
|
136
|
-
|
|
29
|
+
disabled,
|
|
30
|
+
...sizeProps,
|
|
31
|
+
...rest,
|
|
137
32
|
children
|
|
138
|
-
}
|
|
33
|
+
}, inner = /* @__PURE__ */ _jsx(ToggleGroupItemImpl, {
|
|
34
|
+
...commonProps,
|
|
139
35
|
ref: forwardedRef,
|
|
140
36
|
focusable: !disabled,
|
|
141
|
-
disabled
|
|
142
|
-
|
|
37
|
+
disabled,
|
|
38
|
+
...groupItemProps
|
|
39
|
+
});
|
|
143
40
|
return /* @__PURE__ */ _jsx(ToggleGroupItemProvider, {
|
|
144
41
|
scope: props.__scopeToggleGroup,
|
|
145
42
|
children: context.rovingFocus ? /* @__PURE__ */ _jsx(RovingFocusGroup.Item, {
|
|
@@ -153,22 +50,19 @@ var TOGGLE_GROUP_NAME = "ToggleGroup", TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem
|
|
|
153
50
|
}));
|
|
154
51
|
ToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME;
|
|
155
52
|
var ToggleGroupItemImpl = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
156
|
-
var
|
|
157
|
-
"__scopeToggleGroup",
|
|
158
|
-
"value"
|
|
159
|
-
]), valueContext = useToggleGroupValueContext(__scopeToggleGroup), singleProps = {
|
|
53
|
+
var { __scopeToggleGroup, value, ...itemProps } = props, valueContext = useToggleGroupValueContext(__scopeToggleGroup), singleProps = {
|
|
160
54
|
"aria-pressed": void 0
|
|
161
55
|
}, typeProps = valueContext.type === "single" ? singleProps : void 0;
|
|
162
|
-
return /* @__PURE__ */ _jsx(Toggle,
|
|
56
|
+
return /* @__PURE__ */ _jsx(Toggle, {
|
|
57
|
+
...typeProps,
|
|
58
|
+
...itemProps,
|
|
163
59
|
ref: forwardedRef,
|
|
164
60
|
onPressedChange: function(pressed) {
|
|
165
61
|
pressed ? valueContext.onItemActivate(value) : valueContext.onItemDeactivate(value);
|
|
166
62
|
}
|
|
167
|
-
})
|
|
63
|
+
});
|
|
168
64
|
}), ToggleGroup = withStaticProperties(/* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
169
|
-
var
|
|
170
|
-
"type"
|
|
171
|
-
]);
|
|
65
|
+
var { type, ...toggleGroupProps } = props;
|
|
172
66
|
if (isWeb || React.useEffect(function() {
|
|
173
67
|
if (props.id)
|
|
174
68
|
return registerFocusable(props.id, {
|
|
@@ -181,33 +75,30 @@ var ToggleGroupItemImpl = /* @__PURE__ */ React.forwardRef(function(props, forwa
|
|
|
181
75
|
props.id
|
|
182
76
|
]), type === "single") {
|
|
183
77
|
var singleProps = toggleGroupProps;
|
|
184
|
-
return /* @__PURE__ */ _jsx(ToggleGroupImplSingle,
|
|
78
|
+
return /* @__PURE__ */ _jsx(ToggleGroupImplSingle, {
|
|
79
|
+
...singleProps,
|
|
185
80
|
ref: forwardedRef
|
|
186
|
-
})
|
|
81
|
+
});
|
|
187
82
|
}
|
|
188
83
|
if (type === "multiple") {
|
|
189
84
|
var multipleProps = toggleGroupProps;
|
|
190
|
-
return /* @__PURE__ */ _jsx(ToggleGroupImplMultiple,
|
|
85
|
+
return /* @__PURE__ */ _jsx(ToggleGroupImplMultiple, {
|
|
86
|
+
...multipleProps,
|
|
191
87
|
ref: forwardedRef
|
|
192
|
-
})
|
|
88
|
+
});
|
|
193
89
|
}
|
|
194
|
-
throw new Error(
|
|
90
|
+
throw new Error(`Missing prop \`type\` expected on \`${TOGGLE_GROUP_NAME}\``);
|
|
195
91
|
}), {
|
|
196
92
|
Item: ToggleGroupItem
|
|
197
93
|
});
|
|
198
94
|
ToggleGroup.displayName = TOGGLE_GROUP_NAME;
|
|
199
|
-
var
|
|
200
|
-
var
|
|
201
|
-
}
|
|
202
|
-
"value",
|
|
203
|
-
"defaultValue",
|
|
204
|
-
"onValueChange",
|
|
205
|
-
"disableDeactivation"
|
|
206
|
-
]), _useControllableState = _sliced_to_array(useControllableState({
|
|
95
|
+
var { Provider: ToggleGroupValueProvider, useStyledContext: useToggleGroupValueContext } = createStyledContext(), ToggleGroupImplSingle = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
96
|
+
var { value: valueProp, defaultValue, onValueChange = function() {
|
|
97
|
+
}, disableDeactivation = !1, ...toggleGroupSingleProps } = props, [value, setValue] = useControllableState({
|
|
207
98
|
prop: valueProp,
|
|
208
99
|
defaultProp: defaultValue,
|
|
209
100
|
onChange: onValueChange
|
|
210
|
-
})
|
|
101
|
+
});
|
|
211
102
|
return /* @__PURE__ */ _jsx(ToggleGroupValueProvider, {
|
|
212
103
|
scope: props.__scopeToggleGroup,
|
|
213
104
|
type: "single",
|
|
@@ -222,27 +113,24 @@ var _createStyledContext2 = createStyledContext(), ToggleGroupValueProvider = _c
|
|
|
222
113
|
setValue,
|
|
223
114
|
disableDeactivation
|
|
224
115
|
]),
|
|
225
|
-
children: /* @__PURE__ */ _jsx(ToggleGroupImpl,
|
|
116
|
+
children: /* @__PURE__ */ _jsx(ToggleGroupImpl, {
|
|
117
|
+
...toggleGroupSingleProps,
|
|
226
118
|
ref: forwardedRef
|
|
227
|
-
})
|
|
119
|
+
})
|
|
228
120
|
});
|
|
229
121
|
}), ToggleGroupImplMultiple = /* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
230
|
-
var
|
|
231
|
-
}
|
|
232
|
-
"value",
|
|
233
|
-
"defaultValue",
|
|
234
|
-
"onValueChange",
|
|
235
|
-
"disableDeactivation"
|
|
236
|
-
]), _useControllableState = _sliced_to_array(useControllableState({
|
|
122
|
+
var { value: valueProp, defaultValue, onValueChange = function() {
|
|
123
|
+
}, disableDeactivation, ...toggleGroupMultipleProps } = props, [value = [], setValue] = useControllableState({
|
|
237
124
|
prop: valueProp,
|
|
238
125
|
defaultProp: defaultValue,
|
|
239
126
|
onChange: onValueChange
|
|
240
|
-
}),
|
|
127
|
+
}), handleButtonActivate = React.useCallback(function(itemValue) {
|
|
241
128
|
return setValue(function() {
|
|
242
129
|
var prevValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
243
|
-
return
|
|
130
|
+
return [
|
|
131
|
+
...prevValue,
|
|
244
132
|
itemValue
|
|
245
|
-
]
|
|
133
|
+
];
|
|
246
134
|
});
|
|
247
135
|
}, [
|
|
248
136
|
setValue
|
|
@@ -263,9 +151,10 @@ var _createStyledContext2 = createStyledContext(), ToggleGroupValueProvider = _c
|
|
|
263
151
|
defaultValue: value,
|
|
264
152
|
onItemActivate: handleButtonActivate,
|
|
265
153
|
onItemDeactivate: handleButtonDeactivate,
|
|
266
|
-
children: /* @__PURE__ */ _jsx(ToggleGroupImpl,
|
|
154
|
+
children: /* @__PURE__ */ _jsx(ToggleGroupImpl, {
|
|
155
|
+
...toggleGroupMultipleProps,
|
|
267
156
|
ref: forwardedRef
|
|
268
|
-
})
|
|
157
|
+
})
|
|
269
158
|
});
|
|
270
159
|
});
|
|
271
160
|
ToggleGroup.displayName = TOGGLE_GROUP_NAME;
|
|
@@ -292,20 +181,11 @@ var ToggleGroupImplElementFrame = styled(Group, {
|
|
|
292
181
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
293
182
|
}
|
|
294
183
|
}), ToggleGroupImpl = ToggleGroupImplElementFrame.extractable(/* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
|
|
295
|
-
var
|
|
296
|
-
"__scopeToggleGroup",
|
|
297
|
-
"disabled",
|
|
298
|
-
"orientation",
|
|
299
|
-
"dir",
|
|
300
|
-
"rovingFocus",
|
|
301
|
-
"loop",
|
|
302
|
-
"unstyled",
|
|
303
|
-
"size",
|
|
304
|
-
"sizeAdjust"
|
|
305
|
-
]), direction = useDirection(dir), commonProps = _object_spread({
|
|
184
|
+
var { __scopeToggleGroup, disabled = !1, orientation = "horizontal", dir, rovingFocus = !0, loop = !0, unstyled = !1, size: sizeProp = "$true", sizeAdjust = 0, ...toggleGroupProps } = props, direction = useDirection(dir), commonProps = {
|
|
306
185
|
role: "group",
|
|
307
|
-
dir: direction
|
|
308
|
-
|
|
186
|
+
dir: direction,
|
|
187
|
+
...toggleGroupProps
|
|
188
|
+
}, adjustedSize = getVariableValue(getSize(sizeProp, {
|
|
309
189
|
shift: sizeAdjust
|
|
310
190
|
})), size = Math.round(adjustedSize * 0.45);
|
|
311
191
|
return /* @__PURE__ */ _jsx(ToggleGroupContext, {
|
|
@@ -319,21 +199,23 @@ var ToggleGroupImplElementFrame = styled(Group, {
|
|
|
319
199
|
orientation,
|
|
320
200
|
dir: direction,
|
|
321
201
|
loop,
|
|
322
|
-
children: /* @__PURE__ */ _jsx(ToggleGroupImplElementFrame,
|
|
202
|
+
children: /* @__PURE__ */ _jsx(ToggleGroupImplElementFrame, {
|
|
323
203
|
"aria-orientation": orientation,
|
|
324
204
|
orientation,
|
|
325
205
|
axis: orientation,
|
|
326
206
|
ref: forwardedRef,
|
|
327
207
|
"data-disabled": disabled ? "" : void 0,
|
|
328
|
-
unstyled
|
|
329
|
-
|
|
330
|
-
|
|
208
|
+
unstyled,
|
|
209
|
+
...commonProps
|
|
210
|
+
})
|
|
211
|
+
}) : /* @__PURE__ */ _jsx(ToggleGroupImplElementFrame, {
|
|
331
212
|
"aria-orientation": orientation,
|
|
332
213
|
ref: forwardedRef,
|
|
333
214
|
orientation,
|
|
334
215
|
"data-disabled": disabled ? "" : void 0,
|
|
335
|
-
unstyled
|
|
336
|
-
|
|
216
|
+
unstyled,
|
|
217
|
+
...commonProps
|
|
218
|
+
})
|
|
337
219
|
});
|
|
338
220
|
}));
|
|
339
221
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/code/ui/toggle-group/src/ToggleGroup.tsx"],
|
|
4
|
-
"mappings": ";AAAA,SAASA,aAAa;AACtB,SAASC,yBAAyB;AAClC,SAASC,mBAAmB;AAC5B,SAASC,eAAe;AAExB,SAASC,OAAOC,oBAAoB;AACpC,SAASC,4BAA4B;AACrC,SAASC,wBAAwB;AACjC,SAASC,wBAAwB;AACjC,SAASC,4BAA4B;AACrC,SAASC,oBAAoB;AAE7B,SAASC,qBAAqBC,kBAAkBC,QAAQC,gBAAgB;AACxE,OAAOC,WAAW;AAGlB,SAASC,QAAQC,mBAAmB
|
|
5
|
-
"names": ["isWeb", "registerFocusable", "getFontSize", "getSize", "Group", "useGroupItem", "withStaticProperties", "useGetThemedIcon", "RovingFocusGroup", "useControllableState", "useDirection", "createStyledContext", "getVariableValue", "styled", "useTheme", "React", "Toggle", "ToggleFrame", "TOGGLE_GROUP_NAME", "TOGGLE_GROUP_ITEM_NAME", "TOGGLE_GROUP_CONTEXT", "
|
|
4
|
+
"mappings": ";AAAA,SAASA,aAAa;AACtB,SAASC,yBAAyB;AAClC,SAASC,mBAAmB;AAC5B,SAASC,eAAe;AAExB,SAASC,OAAOC,oBAAoB;AACpC,SAASC,4BAA4B;AACrC,SAASC,wBAAwB;AACjC,SAASC,wBAAwB;AACjC,SAASC,4BAA4B;AACrC,SAASC,oBAAoB;AAE7B,SAASC,qBAAqBC,kBAAkBC,QAAQC,gBAAgB;AACxE,OAAOC,WAAW;AAGlB,SAASC,QAAQC,mBAAmB;AAEpC,IAAMC,oBAAoB,eAMpBC,yBAAyB,mBAEzBC,uBAA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;MAC/C4F;MACAS,KAAKI;MACLH;gBAEA,qBAACf,6BAAAA;QACCwB,oBAAkBnB;QAClBA;QACAoB,MAAMpB;QACNhD,KAAKjC;QACLsG,iBAAe5F,WAAW,KAAKM;QAC/BF;QACC,GAAGgB;;SAIR,qBAAC8C,6BAAAA;MACCwB,oBAAkBnB;MAClBhD,KAAKjC;MACLiF;MACAqB,iBAAe5F,WAAW,KAAKM;MAC/BF;MACC,GAAGgB;;;AAKd,CAAA,CAAA;",
|
|
5
|
+
"names": ["isWeb", "registerFocusable", "getFontSize", "getSize", "Group", "useGroupItem", "withStaticProperties", "useGetThemedIcon", "RovingFocusGroup", "useControllableState", "useDirection", "createStyledContext", "getVariableValue", "styled", "useTheme", "React", "Toggle", "ToggleFrame", "TOGGLE_GROUP_NAME", "TOGGLE_GROUP_ITEM_NAME", "TOGGLE_GROUP_CONTEXT", "Provider", "ToggleGroupItemProvider", "useStyledContext", "useToggleGroupItemContext", "ToggleGroupContext", "useToggleGroupContext", "ToggleGroupItem", "extractable", "forwardRef", "props", "forwardedRef", "disablePassStyles", "rest", "valueContext", "useToggleGroupValueContext", "__scopeToggleGroup", "context", "pressed", "value", "includes", "disabled", "groupItemProps", "size", "sizeProps", "unstyled", "width", "undefined", "height", "padding", "iconSize", "theme", "getThemedIcon", "color", "childrens", "Children", "toArray", "children", "map", "child", "isValidElement", "commonProps", "inner", "ToggleGroupItemImpl", "ref", "focusable", "scope", "rovingFocus", "Item", "asChild", "__scopeRovingFocusGroup", "active", "displayName", "itemProps", "singleProps", "typeProps", "type", "onPressedChange", "onItemActivate", "onItemDeactivate", "ToggleGroup", "toggleGroupProps", "useEffect", "id", "focus", "ToggleGroupImplSingle", "multipleProps", "ToggleGroupImplMultiple", "Error", "ToggleGroupValueProvider", "valueProp", "defaultValue", "onValueChange", "disableDeactivation", "toggleGroupSingleProps", "setValue", "prop", "defaultProp", "onChange", "useCallback", "ToggleGroupImpl", "toggleGroupMultipleProps", "handleButtonActivate", "itemValue", "prevValue", "handleButtonDeactivate", "filter", "ToggleGroupImplElementFrame", "name", "variants", "false", "backgroundColor", "orientation", "vertical", "flexDirection", "spaceDirection", "horizontal", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "dir", "loop", "sizeProp", "sizeAdjust", "direction", "role", "adjustedSize", "shift", "Math", "round", "aria-orientation", "axis", "data-disabled"]
|
|
6
6
|
}
|