@tamagui/toggle-group 2.0.0-rc.4 → 2.0.0-rc.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Toggle.cjs +129 -125
- package/dist/cjs/Toggle.native.js +132 -128
- package/dist/cjs/Toggle.native.js.map +1 -1
- package/dist/cjs/ToggleGroup.cjs +218 -202
- package/dist/cjs/ToggleGroup.native.js +232 -222
- package/dist/cjs/ToggleGroup.native.js.map +1 -1
- package/dist/cjs/context.cjs +18 -14
- package/dist/cjs/context.native.js +20 -18
- package/dist/cjs/context.native.js.map +1 -1
- package/dist/cjs/index.cjs +13 -11
- package/dist/cjs/index.native.js +13 -11
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/types.cjs +7 -5
- package/dist/cjs/types.native.js +7 -5
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/esm/Toggle.mjs +98 -96
- package/dist/esm/Toggle.mjs.map +1 -1
- package/dist/esm/Toggle.native.js +102 -100
- package/dist/esm/Toggle.native.js.map +1 -1
- package/dist/esm/ToggleGroup.mjs +182 -168
- package/dist/esm/ToggleGroup.mjs.map +1 -1
- package/dist/esm/ToggleGroup.native.js +197 -189
- package/dist/esm/ToggleGroup.native.js.map +1 -1
- package/dist/esm/context.mjs +6 -4
- package/dist/esm/context.mjs.map +1 -1
- package/dist/esm/context.native.js +6 -6
- package/dist/esm/context.native.js.map +1 -1
- package/dist/esm/index.js +3 -5
- package/dist/esm/index.js.map +1 -6
- package/dist/jsx/Toggle.mjs +98 -96
- package/dist/jsx/Toggle.mjs.map +1 -1
- package/dist/jsx/Toggle.native.js +132 -128
- package/dist/jsx/Toggle.native.js.map +1 -1
- package/dist/jsx/ToggleGroup.mjs +182 -168
- package/dist/jsx/ToggleGroup.mjs.map +1 -1
- package/dist/jsx/ToggleGroup.native.js +232 -222
- package/dist/jsx/ToggleGroup.native.js.map +1 -1
- package/dist/jsx/context.mjs +6 -4
- package/dist/jsx/context.mjs.map +1 -1
- package/dist/jsx/context.native.js +20 -18
- package/dist/jsx/context.native.js.map +1 -1
- package/dist/jsx/index.js +3 -5
- package/dist/jsx/index.js.map +1 -6
- package/dist/jsx/index.native.js +13 -11
- package/dist/jsx/types.native.js +7 -5
- package/package.json +18 -21
- package/src/Toggle.tsx +0 -1
- package/types/Toggle.d.ts.map +1 -1
- package/types/ToggleGroup.d.ts +2 -2
- package/dist/cjs/Toggle.js +0 -138
- package/dist/cjs/Toggle.js.map +0 -6
- package/dist/cjs/ToggleGroup.js +0 -196
- package/dist/cjs/ToggleGroup.js.map +0 -6
- package/dist/cjs/context.js +0 -26
- package/dist/cjs/context.js.map +0 -6
- package/dist/cjs/index.js +0 -22
- package/dist/cjs/index.js.map +0 -6
- package/dist/cjs/types.js +0 -14
- package/dist/cjs/types.js.map +0 -6
- package/dist/cjs/useToggleGroupItem.cjs +0 -27
- package/dist/cjs/useToggleGroupItem.js +0 -22
- package/dist/cjs/useToggleGroupItem.js.map +0 -6
- package/dist/cjs/useToggleGroupItem.native.js +0 -30
- package/dist/cjs/useToggleGroupItem.native.js.map +0 -1
- package/dist/esm/Toggle.js +0 -119
- package/dist/esm/Toggle.js.map +0 -6
- package/dist/esm/ToggleGroup.js +0 -182
- package/dist/esm/ToggleGroup.js.map +0 -6
- package/dist/esm/context.js +0 -10
- package/dist/esm/context.js.map +0 -6
- package/dist/esm/types.js +0 -1
- package/dist/esm/types.js.map +0 -6
- package/dist/esm/useToggleGroupItem.js +0 -6
- package/dist/esm/useToggleGroupItem.js.map +0 -6
- package/dist/esm/useToggleGroupItem.mjs +0 -4
- package/dist/esm/useToggleGroupItem.mjs.map +0 -1
- package/dist/esm/useToggleGroupItem.native.js +0 -4
- package/dist/esm/useToggleGroupItem.native.js.map +0 -1
- package/dist/jsx/Toggle.js +0 -119
- package/dist/jsx/Toggle.js.map +0 -6
- package/dist/jsx/ToggleGroup.js +0 -182
- package/dist/jsx/ToggleGroup.js.map +0 -6
- package/dist/jsx/context.js +0 -10
- package/dist/jsx/context.js.map +0 -6
- package/dist/jsx/types.js +0 -1
- package/dist/jsx/types.js.map +0 -6
- package/dist/jsx/useToggleGroupItem.js +0 -6
- package/dist/jsx/useToggleGroupItem.js.map +0 -6
- package/dist/jsx/useToggleGroupItem.mjs +0 -4
- package/dist/jsx/useToggleGroupItem.mjs.map +0 -1
- package/dist/jsx/useToggleGroupItem.native.js +0 -30
- package/dist/jsx/useToggleGroupItem.native.js.map +0 -1
- package/types/useToggleGroupItem.d.ts.map +0 -1
package/dist/jsx/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export * from "./ToggleGroup";
|
|
2
|
-
import { useToggleGroupItem } from "./context";
|
|
3
|
-
export {
|
|
4
|
-
useToggleGroupItem
|
|
5
|
-
};
|
|
1
|
+
export * from "./ToggleGroup.mjs";
|
|
2
|
+
import { useToggleGroupItem } from "./context.mjs";
|
|
3
|
+
export { useToggleGroupItem };
|
|
6
4
|
//# sourceMappingURL=index.js.map
|
package/dist/jsx/index.js.map
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": "AAAA,cAAc;AACd,SAAS,0BAA0B;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["useToggleGroupItem"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,SAASA,kBAAA,QAA0B","ignoreList":[]}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -5,21 +5,23 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
23
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
22
|
-
value:
|
|
24
|
+
value: true
|
|
23
25
|
}), mod);
|
|
24
26
|
var index_exports = {};
|
|
25
27
|
__export(index_exports, {
|
package/dist/jsx/types.native.js
CHANGED
|
@@ -5,14 +5,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
+
get: () => from[key],
|
|
11
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
+
});
|
|
13
|
+
}
|
|
12
14
|
return to;
|
|
13
15
|
};
|
|
14
16
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
15
|
-
value:
|
|
17
|
+
value: true
|
|
16
18
|
}), mod);
|
|
17
19
|
var types_exports = {};
|
|
18
20
|
module.exports = __toCommonJS(types_exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/toggle-group",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.40",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -18,15 +18,12 @@
|
|
|
18
18
|
"./package.json": "./package.json",
|
|
19
19
|
".": {
|
|
20
20
|
"types": "./types/index.d.ts",
|
|
21
|
-
"react-native":
|
|
22
|
-
|
|
23
|
-
"import": "./dist/esm/index.native.js",
|
|
24
|
-
"require": "./dist/cjs/index.native.js"
|
|
25
|
-
},
|
|
21
|
+
"react-native": "./dist/esm/index.native.js",
|
|
22
|
+
"browser": "./dist/esm/index.mjs",
|
|
26
23
|
"module": "./dist/esm/index.mjs",
|
|
27
24
|
"import": "./dist/esm/index.mjs",
|
|
28
25
|
"require": "./dist/cjs/index.cjs",
|
|
29
|
-
"default": "./dist/
|
|
26
|
+
"default": "./dist/esm/index.mjs"
|
|
30
27
|
}
|
|
31
28
|
},
|
|
32
29
|
"publishConfig": {
|
|
@@ -39,22 +36,22 @@
|
|
|
39
36
|
"clean:build": "tamagui-build clean:build"
|
|
40
37
|
},
|
|
41
38
|
"dependencies": {
|
|
42
|
-
"@tamagui/constants": "2.0.0-rc.
|
|
43
|
-
"@tamagui/create-context": "2.0.0-rc.
|
|
44
|
-
"@tamagui/focusable": "2.0.0-rc.
|
|
45
|
-
"@tamagui/
|
|
46
|
-
"@tamagui/
|
|
47
|
-
"@tamagui/helpers": "2.0.0-rc.
|
|
48
|
-
"@tamagui/
|
|
49
|
-
"@tamagui/
|
|
50
|
-
"@tamagui/
|
|
51
|
-
"@tamagui/
|
|
52
|
-
"@tamagui/use-
|
|
53
|
-
"@tamagui/
|
|
54
|
-
"@tamagui/web": "2.0.0-rc.
|
|
39
|
+
"@tamagui/constants": "2.0.0-rc.40",
|
|
40
|
+
"@tamagui/create-context": "2.0.0-rc.40",
|
|
41
|
+
"@tamagui/focusable": "2.0.0-rc.40",
|
|
42
|
+
"@tamagui/get-token": "2.0.0-rc.40",
|
|
43
|
+
"@tamagui/helpers": "2.0.0-rc.40",
|
|
44
|
+
"@tamagui/helpers-tamagui": "2.0.0-rc.40",
|
|
45
|
+
"@tamagui/roving-focus": "2.0.0-rc.40",
|
|
46
|
+
"@tamagui/sizable-context": "2.0.0-rc.40",
|
|
47
|
+
"@tamagui/stacks": "2.0.0-rc.40",
|
|
48
|
+
"@tamagui/use-controllable-state": "2.0.0-rc.40",
|
|
49
|
+
"@tamagui/use-direction": "2.0.0-rc.40",
|
|
50
|
+
"@tamagui/font-size": "2.0.0-rc.40",
|
|
51
|
+
"@tamagui/web": "2.0.0-rc.40"
|
|
55
52
|
},
|
|
56
53
|
"devDependencies": {
|
|
57
|
-
"@tamagui/build": "2.0.0-rc.
|
|
54
|
+
"@tamagui/build": "2.0.0-rc.40",
|
|
58
55
|
"react": ">=19"
|
|
59
56
|
},
|
|
60
57
|
"peerDependencies": {
|
package/src/Toggle.tsx
CHANGED
package/types/Toggle.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../src/Toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../src/Toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;EAuEvB,CAAA;AAED,KAAK,gBAAgB,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAA;AAEpD,KAAK,oBAAoB,GAAG;IAC1B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,cAAc,CAAC,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;IACtC,WAAW,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,oBAAoB,CAAA;AAEjE,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iEA8ClB,CAAA"}
|
package/types/ToggleGroup.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare const ToggleGroup: React.ForwardRefExoticComponent<ScopedProps<ToggleGro
|
|
|
28
28
|
unstyled?: boolean | undefined;
|
|
29
29
|
size?: number | import("@tamagui/web").SizeTokens | undefined;
|
|
30
30
|
defaultActiveStyle?: boolean | undefined;
|
|
31
|
-
}>, "theme" | "debug" | "style" | `$${string}` | `$${number}` | import("@tamagui/web").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "render" | "hitSlop" | "children" | "target" | "htmlFor" | "asChild" | "dangerouslySetInnerHTML" | "disabled" | "className" | "themeShallow" | "unstyled" | "id" | "group" | "untilMeasured" | "componentName" | "tabIndex" | "role" | "disableOptimization" | "forceStyle" | "disableClassName" | "animatedBy" | "onFocus" | "onBlur" | "onPointerCancel" | "onPointerDown" | "onPointerMove" | "onPointerUp" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMoveCapture" | "onPointerCancelCapture" | "onPointerDownCapture" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | keyof import("@tamagui/web").StackStyleBase | "onPress" | "onLongPress" | "onPressIn" | "onPressOut" | "onMouseEnter" | "onMouseLeave" | "onMouseDown" | "onMouseUp" | "onMouseMove" | "onMouseOver" | "onMouseOut" | "onClick" | "onDoubleClick" | "onContextMenu" | "onWheel" | "onKeyDown" | "onKeyUp" | "onChange" | "onInput" | "onBeforeInput" | "onScroll" | "onCopy" | "onCut" | "onPaste" | "onDrag" | "onDragStart" | "onDragEnd" | "onDragEnter" | "onDragLeave" | "onDragOver" | "onDrop" | "size" | "activeStyle" | "defaultActiveStyle" | keyof import("@tamagui/web").WithPseudoProps<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase & {
|
|
31
|
+
}>, "theme" | "debug" | "style" | `$${string}` | `$${number}` | import("@tamagui/web").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "render" | "hitSlop" | "children" | "target" | "htmlFor" | "asChild" | "dangerouslySetInnerHTML" | "disabled" | "className" | "themeShallow" | "unstyled" | "id" | "group" | "untilMeasured" | "componentName" | "tabIndex" | "role" | "disableOptimization" | "forceStyle" | "disableClassName" | "animatedBy" | "onFocus" | "onBlur" | "onPointerCancel" | "onPointerDown" | "onPointerMove" | "onPointerUp" | "needsOffscreenAlphaCompositing" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMoveCapture" | "onPointerCancelCapture" | "onPointerDownCapture" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | keyof import("@tamagui/web").StackStyleBase | "onPress" | "onLongPress" | "onPressIn" | "onPressOut" | "onMouseEnter" | "onMouseLeave" | "onMouseDown" | "onMouseUp" | "onMouseMove" | "onMouseOver" | "onMouseOut" | "onClick" | "onDoubleClick" | "onContextMenu" | "onWheel" | "onKeyDown" | "onKeyUp" | "onChange" | "onInput" | "onBeforeInput" | "onScroll" | "onCopy" | "onCut" | "onPaste" | "onDrag" | "onDragStart" | "onDragEnd" | "onDragEnter" | "onDragLeave" | "onDragOver" | "onDrop" | "size" | "activeStyle" | "value" | "defaultActiveStyle" | keyof import("@tamagui/web").WithPseudoProps<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase & {
|
|
32
32
|
readonly activeStyle?: Partial<import("@tamagui/web").InferStyleProps<import("@tamagui/web").TamaguiComponent<import("@tamagui/web").ViewProps, TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {}, {}>, {
|
|
33
33
|
accept: {
|
|
34
34
|
readonly activeStyle: "style";
|
|
@@ -44,7 +44,7 @@ declare const ToggleGroup: React.ForwardRefExoticComponent<ScopedProps<ToggleGro
|
|
|
44
44
|
readonly activeStyle: "style";
|
|
45
45
|
};
|
|
46
46
|
}>> | undefined;
|
|
47
|
-
}>>> | "
|
|
47
|
+
}>>> | "__scopeToggleGroup"> & Omit<import("@tamagui/web").StackNonStyleProps, "unstyled" | keyof import("@tamagui/web").StackStyleBase | "size" | "activeStyle" | "defaultActiveStyle"> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase & {
|
|
48
48
|
readonly activeStyle?: Partial<import("@tamagui/web").InferStyleProps<import("@tamagui/web").TamaguiComponent<import("@tamagui/web").ViewProps, TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {}, {}>, {
|
|
49
49
|
accept: {
|
|
50
50
|
readonly activeStyle: "style";
|
package/dist/cjs/Toggle.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
-
mod
|
|
22
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
-
var Toggle_exports = {};
|
|
24
|
-
__export(Toggle_exports, {
|
|
25
|
-
Toggle: () => Toggle,
|
|
26
|
-
ToggleFrame: () => ToggleFrame
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(Toggle_exports);
|
|
29
|
-
var import_helpers = require("@tamagui/helpers"), import_use_controllable_state = require("@tamagui/use-controllable-state"), import_web = require("@tamagui/web"), React = __toESM(require("react"), 1), import_context = require("./context"), import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
-
const NAME = "Toggle", ToggleFrame = (0, import_web.styled)(
|
|
31
|
-
import_web.View,
|
|
32
|
-
{
|
|
33
|
-
name: NAME,
|
|
34
|
-
render: "button",
|
|
35
|
-
context: import_context.context,
|
|
36
|
-
variants: {
|
|
37
|
-
unstyled: {
|
|
38
|
-
false: {
|
|
39
|
-
size: "$true",
|
|
40
|
-
alignItems: "center",
|
|
41
|
-
justifyContent: "center",
|
|
42
|
-
display: "flex",
|
|
43
|
-
backgroundColor: "$background",
|
|
44
|
-
borderColor: "$borderColor",
|
|
45
|
-
borderWidth: 1,
|
|
46
|
-
margin: -1,
|
|
47
|
-
hoverStyle: {
|
|
48
|
-
backgroundColor: "$backgroundHover",
|
|
49
|
-
borderColor: "$borderColorHover"
|
|
50
|
-
},
|
|
51
|
-
pressStyle: {
|
|
52
|
-
backgroundColor: "$backgroundPress",
|
|
53
|
-
borderColor: "$borderColorPress"
|
|
54
|
-
},
|
|
55
|
-
focusVisibleStyle: {
|
|
56
|
-
outlineColor: "$outlineColor",
|
|
57
|
-
outlineWidth: 2,
|
|
58
|
-
outlineStyle: "solid",
|
|
59
|
-
zIndex: 10
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
size: {
|
|
64
|
-
"...size": (val, { tokens }) => {
|
|
65
|
-
if (val)
|
|
66
|
-
return {
|
|
67
|
-
width: tokens.size[val],
|
|
68
|
-
height: tokens.size[val]
|
|
69
|
-
};
|
|
70
|
-
},
|
|
71
|
-
":number": (val) => ({
|
|
72
|
-
width: val,
|
|
73
|
-
height: val
|
|
74
|
-
})
|
|
75
|
-
},
|
|
76
|
-
defaultActiveStyle: {
|
|
77
|
-
true: {
|
|
78
|
-
backgroundColor: "$backgroundActive",
|
|
79
|
-
hoverStyle: {
|
|
80
|
-
backgroundColor: "$backgroundActive"
|
|
81
|
-
},
|
|
82
|
-
focusStyle: {
|
|
83
|
-
backgroundColor: "$backgroundActive",
|
|
84
|
-
borderColor: "$borderColorActive"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
defaultVariants: {
|
|
90
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
accept: {
|
|
95
|
-
activeStyle: "style"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
), Toggle = React.forwardRef(
|
|
99
|
-
function(props, forwardedRef) {
|
|
100
|
-
const {
|
|
101
|
-
active: activeProp,
|
|
102
|
-
activeStyle,
|
|
103
|
-
defaultActive = !1,
|
|
104
|
-
onActiveChange,
|
|
105
|
-
activeTheme,
|
|
106
|
-
unstyled = !1,
|
|
107
|
-
...buttonProps
|
|
108
|
-
} = props, [active = !1, setActive] = (0, import_use_controllable_state.useControllableState)({
|
|
109
|
-
prop: activeProp,
|
|
110
|
-
onChange: onActiveChange,
|
|
111
|
-
defaultProp: defaultActive
|
|
112
|
-
});
|
|
113
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
114
|
-
ToggleFrame,
|
|
115
|
-
{
|
|
116
|
-
theme: activeTheme ?? null,
|
|
117
|
-
"aria-pressed": active,
|
|
118
|
-
"data-state": active ? "on" : "off",
|
|
119
|
-
"data-disabled": props.disabled ? "" : void 0,
|
|
120
|
-
unstyled,
|
|
121
|
-
...active && !activeStyle && !unstyled && {
|
|
122
|
-
defaultActiveStyle: !0
|
|
123
|
-
},
|
|
124
|
-
...active && activeStyle && {
|
|
125
|
-
...activeStyle,
|
|
126
|
-
hoverStyle: activeStyle,
|
|
127
|
-
focusStyle: activeStyle
|
|
128
|
-
},
|
|
129
|
-
...buttonProps,
|
|
130
|
-
ref: forwardedRef,
|
|
131
|
-
onPress: (0, import_helpers.composeEventHandlers)(props.onPress ?? void 0, () => {
|
|
132
|
-
props.disabled || setActive((prev) => !prev);
|
|
133
|
-
})
|
|
134
|
-
}
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
);
|
|
138
|
-
//# sourceMappingURL=Toggle.js.map
|
package/dist/cjs/Toggle.js.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Toggle.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAqC,6BACrC,gCAAqC,4CAErC,aAA6B,yBAC7B,QAAuB,8BACvB,iBAAwB,sBAoHlB;AA9GN,MAAM,OAAO,UAEA,kBAAc;AAAA,EACzB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR;AAAA,IAEA,UAAU;AAAA,MACR,UAAU;AAAA,QACR,OAAO;AAAA,UACL,MAAM;AAAA,UACN,YAAY;AAAA,UACZ,gBAAgB;AAAA,UAChB,SAAS;AAAA,UACT,iBAAiB;AAAA,UACjB,aAAa;AAAA,UACb,aAAa;AAAA,UACb,QAAQ;AAAA,UACR,YAAY;AAAA,YACV,iBAAiB;AAAA,YACjB,aAAa;AAAA,UACf;AAAA,UACA,YAAY;AAAA,YACV,iBAAiB;AAAA,YACjB,aAAa;AAAA,UACf;AAAA,UACA,mBAAmB;AAAA,YACjB,cAAc;AAAA,YACd,cAAc;AAAA,YACd,cAAc;AAAA,YACd,QAAQ;AAAA,UACV;AAAA,QACF;AAAA,MACF;AAAA,MAEA,MAAM;AAAA,QACJ,WAAW,CAAC,KAAK,EAAE,OAAO,MAAM;AAC9B,cAAK;AACL,mBAAO;AAAA,cACL,OAAO,OAAO,KAAK,GAAG;AAAA,cACtB,QAAQ,OAAO,KAAK,GAAG;AAAA,YACzB;AAAA,QACF;AAAA,QACA,WAAW,CAAC,SAAS;AAAA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|
-
"names": []
|
|
6
|
-
}
|
package/dist/cjs/ToggleGroup.js
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
-
mod
|
|
22
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
-
var ToggleGroup_exports = {};
|
|
24
|
-
__export(ToggleGroup_exports, {
|
|
25
|
-
ToggleGroup: () => ToggleGroup
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(ToggleGroup_exports);
|
|
28
|
-
var import_constants = require("@tamagui/constants"), import_focusable = require("@tamagui/focusable"), import_helpers = require("@tamagui/helpers"), import_roving_focus = require("@tamagui/roving-focus"), import_use_controllable_state = require("@tamagui/use-controllable-state"), import_use_direction = require("@tamagui/use-direction"), import_web = require("@tamagui/web"), import_react = __toESM(require("react"), 1), import_Toggle = require("./Toggle"), import_context = require("./context"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
const TOGGLE_GROUP_NAME = "ToggleGroup", TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem", TOGGLE_GROUP_CONTEXT = "ToggleGroup", { Provider: ToggleGroupItemProvider } = (0, import_web.createStyledContext)(), { Provider: ToggleGroupContext, useStyledContext: useToggleGroupContext } = (0, import_web.createStyledContext)({}), ToggleGroupItem = import_Toggle.ToggleFrame.styleable(
|
|
30
|
-
(props, forwardedRef) => {
|
|
31
|
-
const valueContext = useToggleGroupValueContext(props.__scopeToggleGroup), context = useToggleGroupContext(props.__scopeToggleGroup), toggleContext = import_context.context.useStyledContext(props.__scopeToggleGroup), active = valueContext?.value.includes(props.value), color = props.color || toggleContext.color, disabled = context.disabled || props.disabled || !1, inner = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
32
|
-
ToggleGroupItemImpl,
|
|
33
|
-
{
|
|
34
|
-
ref: forwardedRef,
|
|
35
|
-
tabIndex: disabled ? -1 : 0,
|
|
36
|
-
...props,
|
|
37
|
-
active,
|
|
38
|
-
disabled
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupItemProvider, { scope: props.__scopeToggleGroup, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.context.Provider, { color, active, children: context.rovingFocus ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
-
import_roving_focus.RovingFocusGroup.Item,
|
|
43
|
-
{
|
|
44
|
-
asChild: "except-style",
|
|
45
|
-
__scopeRovingFocusGroup: props.__scopeToggleGroup || TOGGLE_GROUP_CONTEXT,
|
|
46
|
-
focusable: !disabled,
|
|
47
|
-
active,
|
|
48
|
-
children: inner
|
|
49
|
-
}
|
|
50
|
-
) : inner }) });
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
ToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME;
|
|
54
|
-
const ToggleGroupItemImpl = import_react.default.forwardRef((props, forwardedRef) => {
|
|
55
|
-
const { __scopeToggleGroup, value, ...itemProps } = props, valueContext = useToggleGroupValueContext(__scopeToggleGroup), singleProps = { "aria-pressed": void 0 }, typeProps = valueContext.type === "single" ? singleProps : void 0;
|
|
56
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
-
import_Toggle.Toggle,
|
|
58
|
-
{
|
|
59
|
-
...typeProps,
|
|
60
|
-
...itemProps,
|
|
61
|
-
ref: forwardedRef,
|
|
62
|
-
onActiveChange: (pressed) => {
|
|
63
|
-
pressed ? valueContext.onItemActivate(value) : valueContext.onItemDeactivate(value);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}), ToggleGroup = (0, import_helpers.withStaticProperties)(
|
|
68
|
-
import_react.default.forwardRef(
|
|
69
|
-
(props, forwardedRef) => {
|
|
70
|
-
const { type, ...toggleGroupProps } = props;
|
|
71
|
-
if (import_constants.isWeb || import_react.default.useEffect(() => {
|
|
72
|
-
if (props.id)
|
|
73
|
-
return (0, import_focusable.registerFocusable)(props.id, {
|
|
74
|
-
focus: () => {
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}, [props.id]), type === "single")
|
|
78
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupImplSingle, { ...toggleGroupProps, ref: forwardedRef });
|
|
79
|
-
if (type === "multiple")
|
|
80
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupImplMultiple, { ...toggleGroupProps, ref: forwardedRef });
|
|
81
|
-
throw new Error(`Missing prop \`type\` expected on \`${TOGGLE_GROUP_NAME}\``);
|
|
82
|
-
}
|
|
83
|
-
),
|
|
84
|
-
{
|
|
85
|
-
Item: ToggleGroupItem
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
ToggleGroup.displayName = TOGGLE_GROUP_NAME;
|
|
89
|
-
const {
|
|
90
|
-
Provider: ToggleGroupValueProvider,
|
|
91
|
-
useStyledContext: useToggleGroupValueContext
|
|
92
|
-
} = (0, import_web.createStyledContext)(), ToggleGroupImplSingle = import_react.default.forwardRef((props, forwardedRef) => {
|
|
93
|
-
const {
|
|
94
|
-
value: valueProp,
|
|
95
|
-
defaultValue,
|
|
96
|
-
onValueChange = () => {
|
|
97
|
-
},
|
|
98
|
-
disableDeactivation = !1,
|
|
99
|
-
children,
|
|
100
|
-
...toggleGroupSingleProps
|
|
101
|
-
} = props, [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
102
|
-
prop: valueProp,
|
|
103
|
-
defaultProp: defaultValue,
|
|
104
|
-
onChange: onValueChange
|
|
105
|
-
});
|
|
106
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
-
ToggleGroupValueProvider,
|
|
108
|
-
{
|
|
109
|
-
scope: props.__scopeToggleGroup,
|
|
110
|
-
type: "single",
|
|
111
|
-
value: value ? [value] : [],
|
|
112
|
-
defaultValue: value,
|
|
113
|
-
onItemActivate: setValue,
|
|
114
|
-
onItemDeactivate: import_react.default.useCallback(
|
|
115
|
-
() => disableDeactivation ? null : setValue(""),
|
|
116
|
-
[setValue, disableDeactivation]
|
|
117
|
-
),
|
|
118
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupImpl, { ...toggleGroupSingleProps, ref: forwardedRef, children })
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}), ToggleGroupImplMultiple = import_react.default.forwardRef((props, forwardedRef) => {
|
|
122
|
-
const {
|
|
123
|
-
value: valueProp,
|
|
124
|
-
defaultValue,
|
|
125
|
-
onValueChange = () => {
|
|
126
|
-
},
|
|
127
|
-
disableDeactivation,
|
|
128
|
-
children,
|
|
129
|
-
...toggleGroupMultipleProps
|
|
130
|
-
} = props, [value = [], setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
131
|
-
prop: valueProp,
|
|
132
|
-
defaultProp: defaultValue,
|
|
133
|
-
onChange: onValueChange
|
|
134
|
-
}), handleButtonActivate = import_react.default.useCallback(
|
|
135
|
-
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
|
136
|
-
[setValue]
|
|
137
|
-
), handleButtonDeactivate = import_react.default.useCallback(
|
|
138
|
-
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
|
139
|
-
[setValue]
|
|
140
|
-
);
|
|
141
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
142
|
-
ToggleGroupValueProvider,
|
|
143
|
-
{
|
|
144
|
-
scope: props.__scopeToggleGroup,
|
|
145
|
-
type: "multiple",
|
|
146
|
-
value,
|
|
147
|
-
defaultValue: value,
|
|
148
|
-
onItemActivate: handleButtonActivate,
|
|
149
|
-
onItemDeactivate: handleButtonDeactivate,
|
|
150
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupImpl, { ...toggleGroupMultipleProps, ref: forwardedRef, children })
|
|
151
|
-
}
|
|
152
|
-
);
|
|
153
|
-
}), ToggleGroupFrame = (0, import_web.styled)(import_web.View, {
|
|
154
|
-
name: TOGGLE_GROUP_NAME
|
|
155
|
-
}), ToggleGroupImpl = ToggleGroupFrame.styleable(
|
|
156
|
-
(props, forwardedRef) => {
|
|
157
|
-
const {
|
|
158
|
-
__scopeToggleGroup,
|
|
159
|
-
disabled = !1,
|
|
160
|
-
orientation = "horizontal",
|
|
161
|
-
dir,
|
|
162
|
-
rovingFocus = !0,
|
|
163
|
-
loop = !0,
|
|
164
|
-
color,
|
|
165
|
-
...toggleGroupProps
|
|
166
|
-
} = props, direction = (0, import_use_direction.useDirection)(dir), content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
167
|
-
ToggleGroupFrame,
|
|
168
|
-
{
|
|
169
|
-
role: "group",
|
|
170
|
-
ref: forwardedRef,
|
|
171
|
-
"data-disabled": disabled ? "" : void 0,
|
|
172
|
-
...toggleGroupProps
|
|
173
|
-
}
|
|
174
|
-
);
|
|
175
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
176
|
-
ToggleGroupContext,
|
|
177
|
-
{
|
|
178
|
-
scope: __scopeToggleGroup,
|
|
179
|
-
rovingFocus,
|
|
180
|
-
disabled,
|
|
181
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.context.Provider, { color, children: rovingFocus ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
182
|
-
import_roving_focus.RovingFocusGroup,
|
|
183
|
-
{
|
|
184
|
-
asChild: "except-style",
|
|
185
|
-
__scopeRovingFocusGroup: __scopeToggleGroup || TOGGLE_GROUP_CONTEXT,
|
|
186
|
-
orientation,
|
|
187
|
-
dir: direction,
|
|
188
|
-
loop,
|
|
189
|
-
children: content
|
|
190
|
-
}
|
|
191
|
-
) : content })
|
|
192
|
-
}
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
);
|
|
196
|
-
//# sourceMappingURL=ToggleGroup.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/ToggleGroup.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAsB,+BACtB,mBAAkC,+BAClC,iBAAqC,6BACrC,sBAAiC,kCACjC,gCAAqC,4CACrC,uBAA6B,mCAE7B,aAAkD,yBAClD,eAAkB,8BAGlB,gBAAoC,qBACpC,iBAAyC,sBAkCnC;AAhCN,MAAM,oBAAoB,eACpB,yBAAyB,mBACzB,uBAAuB,eAQvB,E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GAAG;AAAA,IACL,IAAI,OACE,gBAAY,mCAAa,GAAG,GAE5B,UACJ;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,KAAK;AAAA,QACL,iBAAe,WAAW,KAAK;AAAA,QAC9B,GAAG;AAAA;AAAA,IACN;AAGF,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP;AAAA,QACA;AAAA,QAEA,sDAAC,eAAAF,QAAc,UAAd,EAAuB,OACrB,wBACC;AAAA,UAAC;AAAA;AAAA,YACC,SAAQ;AAAA,YACR,yBAAyB,sBAAsB;AAAA,YAC/C;AAAA,YACA,KAAK;AAAA,YACL;AAAA,YAEC;AAAA;AAAA,QACH,IAEA,SAEJ;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;",
|
|
5
|
-
"names": ["ToggleContext", "React", "value"]
|
|
6
|
-
}
|
package/dist/cjs/context.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var context_exports = {};
|
|
16
|
-
__export(context_exports, {
|
|
17
|
-
context: () => context,
|
|
18
|
-
useToggleGroupItem: () => useToggleGroupItem
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(context_exports);
|
|
21
|
-
var import_web = require("@tamagui/web");
|
|
22
|
-
const context = (0, import_web.createStyledContext)({
|
|
23
|
-
color: "",
|
|
24
|
-
active: !1
|
|
25
|
-
}), useToggleGroupItem = () => context.useStyledContext();
|
|
26
|
-
//# sourceMappingURL=context.js.map
|
package/dist/cjs/context.js.map
DELETED
package/dist/cjs/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var index_exports = {};
|
|
16
|
-
__export(index_exports, {
|
|
17
|
-
useToggleGroupItem: () => import_context.useToggleGroupItem
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
__reExport(index_exports, require("./ToggleGroup"), module.exports);
|
|
21
|
-
var import_context = require("./context");
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
package/dist/cjs/types.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
|
-
return to;
|
|
10
|
-
};
|
|
11
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
12
|
-
var types_exports = {};
|
|
13
|
-
module.exports = __toCommonJS(types_exports);
|
|
14
|
-
//# sourceMappingURL=types.js.map
|