@tamagui/toggle-group 1.70.0 → 1.71.0

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.
@@ -1,16 +1,16 @@
1
- import { Scope, createContextScope } from '@tamagui/create-context'
2
1
  import { registerFocusable } from '@tamagui/focusable'
3
2
  import { getFontSize } from '@tamagui/font-size'
4
3
  import { getSize } from '@tamagui/get-token'
5
4
  import { Group, GroupProps, useGroupItem } from '@tamagui/group'
6
5
  import { useGetThemedIcon } from '@tamagui/helpers-tamagui'
7
- import { RovingFocusGroup, createRovingFocusGroupScope } from '@tamagui/roving-focus'
6
+ import { RovingFocusGroup } from '@tamagui/roving-focus'
8
7
  import { useControllableState } from '@tamagui/use-controllable-state'
9
8
  import { useDirection } from '@tamagui/use-direction'
10
9
  import {
11
10
  FontSizeTokens,
12
11
  GetProps,
13
12
  SizeTokens,
13
+ createStyledContext,
14
14
  getVariableValue,
15
15
  isWeb,
16
16
  styled,
@@ -22,23 +22,21 @@ import React from 'react'
22
22
  import { Toggle, ToggleFrame, ToggleProps } from './Toggle'
23
23
 
24
24
  const TOGGLE_GROUP_NAME = 'ToggleGroup'
25
- const [createToggleGroupContext, createToggleGroupScope] = createContextScope(
26
- TOGGLE_GROUP_NAME,
27
- [createRovingFocusGroupScope]
28
- )
29
25
  /* -------------------------------------------------------------------------------------------------
30
26
  * ToggleGroupItem
31
27
  * -----------------------------------------------------------------------------------------------*/
32
28
 
33
29
  const TOGGLE_GROUP_ITEM_NAME = 'ToggleGroupItem'
34
30
 
31
+ const TOGGLE_GROUP_CONTEXT = 'ToggleGroup'
32
+
35
33
  type ToggleGroupItemContextValue = { disabled?: boolean }
36
34
 
37
- const [createToggleGroupItemContext, createToggleGroupItemScope] =
38
- createContextScope(TOGGLE_GROUP_ITEM_NAME)
39
- const [ToggleGroupItemProvider, useToggleGroupItemContext] =
40
- createToggleGroupContext<ToggleGroupItemContextValue>(TOGGLE_GROUP_NAME)
41
- const useToggleGroupItemScope = createToggleGroupItemScope()
35
+ const { Provider: ToggleGroupItemProvider, useStyledContext: useToggleGroupItemContext } =
36
+ createStyledContext<ToggleGroupItemContextValue>()
37
+
38
+ const { Provider: ToggleGroupContext, useStyledContext: useToggleGroupContext } =
39
+ createStyledContext<ToggleGroupContextValue>()
42
40
 
43
41
  type ToggleGroupItemElement = ToggleGroupItemImplElement
44
42
 
@@ -55,16 +53,9 @@ type ToggleGroupItemProps = GetProps<typeof ToggleFrame> & {
55
53
  const ToggleGroupItem = ToggleFrame.extractable(
56
54
  React.forwardRef<ToggleGroupItemElement, ToggleGroupItemProps>(
57
55
  (props: ScopedProps<ToggleGroupItemProps>, forwardedRef) => {
58
- const valueContext = useToggleGroupValueContext(
59
- TOGGLE_GROUP_ITEM_NAME,
60
- props.__scopeToggleGroup
61
- )
62
- const context = useToggleGroupContext(
63
- TOGGLE_GROUP_ITEM_NAME,
64
- props.__scopeToggleGroup
65
- )
66
- const __scopeToggleGroup = props.__scopeToggleGroup
67
- const rovingFocusGroupScope = useRovingFocusGroupScope(props.__scopeToggleGroup)
56
+ const { __scopeToggleGroup, ...rest } = props
57
+ const valueContext = useToggleGroupValueContext(__scopeToggleGroup)
58
+ const context = useToggleGroupContext(__scopeToggleGroup)
68
59
  const pressed = valueContext.value.includes(props.value)
69
60
  const disabled = context.disabled || props.disabled || false
70
61
  const ref = React.useRef<HTMLDivElement>(null)
@@ -109,7 +100,7 @@ const ToggleGroupItem = ToggleFrame.extractable(
109
100
  {context.rovingFocus ? (
110
101
  <RovingFocusGroup.Item
111
102
  asChild="except-style"
112
- {...rovingFocusGroupScope}
103
+ __scopeRovingFocusGroup={__scopeToggleGroup || TOGGLE_GROUP_CONTEXT}
113
104
  focusable={!disabled}
114
105
  active={pressed}
115
106
  >
@@ -120,6 +111,7 @@ const ToggleGroupItem = ToggleFrame.extractable(
120
111
  ref={ref}
121
112
  >
122
113
  <ToggleGroupItemImpl
114
+ __scopeToggleGroup={__scopeToggleGroup}
123
115
  {...commonProps}
124
116
  ref={forwardedRef}
125
117
  {...groupItemProps}
@@ -133,7 +125,11 @@ const ToggleGroupItem = ToggleFrame.extractable(
133
125
  disabled={disabled}
134
126
  ref={ref}
135
127
  >
136
- <ToggleGroupItemImpl {...commonProps} ref={forwardedRef} />
128
+ <ToggleGroupItemImpl
129
+ __scopeToggleGroup={__scopeToggleGroup}
130
+ {...commonProps}
131
+ ref={forwardedRef}
132
+ />
137
133
  </ToggleFrame>
138
134
  )}
139
135
  </ToggleGroupItemProvider>
@@ -158,13 +154,10 @@ type ToggleGroupItemImplProps = Omit<
158
154
  }
159
155
 
160
156
  const ToggleGroupItemImpl = ToggleFrame.extractable(
161
- React.forwardRef<ToggleGroupItemImplElement, ToggleGroupItemImplProps>(
157
+ React.forwardRef<ToggleGroupItemImplElement, ScopedProps<ToggleGroupItemImplProps>>(
162
158
  (props: ScopedProps<ToggleGroupItemImplProps>, forwardedRef) => {
163
159
  const { __scopeToggleGroup, value, ...itemProps } = props
164
- const valueContext = useToggleGroupValueContext(
165
- TOGGLE_GROUP_ITEM_NAME,
166
- __scopeToggleGroup
167
- )
160
+ const valueContext = useToggleGroupValueContext(__scopeToggleGroup)
168
161
  const singleProps = {
169
162
  'aria-pressed': undefined,
170
163
  }
@@ -194,9 +187,7 @@ const ToggleGroupItemImpl = ToggleFrame.extractable(
194
187
  * ToggleGroup
195
188
  * -----------------------------------------------------------------------------------------------*/
196
189
 
197
- type ScopedProps<P> = P & { __scopeToggleGroup?: Scope }
198
-
199
- const useRovingFocusGroupScope = createRovingFocusGroupScope()
190
+ type ScopedProps<P> = P & { __scopeToggleGroup?: string }
200
191
 
201
192
  type ToggleGroupElement = ToggleGroupImplSingleElement | ToggleGroupImplMultipleElement
202
193
  interface ToggleGroupSingleProps extends ToggleGroupImplSingleProps {
@@ -209,33 +200,35 @@ interface ToggleGroupMultipleProps extends ToggleGroupImplMultipleProps {
209
200
  type ToggleGroupProps = ToggleGroupSingleProps | ToggleGroupMultipleProps
210
201
 
211
202
  const ToggleGroup = withStaticProperties(
212
- React.forwardRef<ToggleGroupElement, ToggleGroupProps>((props, forwardedRef) => {
213
- const { type, ...toggleGroupProps } = props
214
-
215
- if (!isWeb) {
216
- // eslint-disable-next-line react-hooks/rules-of-hooks
217
- React.useEffect(() => {
218
- if (!props.id) return
219
- return registerFocusable(props.id, {
220
- // TODO: would be nice to focus on the first child later - could be done with reforest
221
- // for now leaving it empty
222
- focus: () => {},
223
- })
224
- }, [props.id])
225
- }
203
+ React.forwardRef<ToggleGroupElement, ScopedProps<ToggleGroupProps>>(
204
+ (props, forwardedRef) => {
205
+ const { type, ...toggleGroupProps } = props
206
+
207
+ if (!isWeb) {
208
+ // eslint-disable-next-line react-hooks/rules-of-hooks
209
+ React.useEffect(() => {
210
+ if (!props.id) return
211
+ return registerFocusable(props.id, {
212
+ // TODO: would be nice to focus on the first child later - could be done with reforest
213
+ // for now leaving it empty
214
+ focus: () => {},
215
+ })
216
+ }, [props.id])
217
+ }
226
218
 
227
- if (type === 'single') {
228
- const singleProps = toggleGroupProps as ToggleGroupImplSingleProps
229
- return <ToggleGroupImplSingle {...singleProps} ref={forwardedRef} />
230
- }
219
+ if (type === 'single') {
220
+ const singleProps = toggleGroupProps as ToggleGroupImplSingleProps
221
+ return <ToggleGroupImplSingle {...singleProps} ref={forwardedRef} />
222
+ }
231
223
 
232
- if (type === 'multiple') {
233
- const multipleProps = toggleGroupProps as ToggleGroupImplMultipleProps
234
- return <ToggleGroupImplMultiple {...multipleProps} ref={forwardedRef} />
235
- }
224
+ if (type === 'multiple') {
225
+ const multipleProps = toggleGroupProps as ToggleGroupImplMultipleProps
226
+ return <ToggleGroupImplMultiple {...multipleProps} ref={forwardedRef} />
227
+ }
236
228
 
237
- throw new Error(`Missing prop \`type\` expected on \`${TOGGLE_GROUP_NAME}\``)
238
- }),
229
+ throw new Error(`Missing prop \`type\` expected on \`${TOGGLE_GROUP_NAME}\``)
230
+ }
231
+ ),
239
232
  {
240
233
  Item: ToggleGroupItem,
241
234
  }
@@ -253,8 +246,10 @@ type ToggleGroupValueContextValue = {
253
246
  onItemDeactivate(value: string): void
254
247
  }
255
248
 
256
- const [ToggleGroupValueProvider, useToggleGroupValueContext] =
257
- createToggleGroupContext<ToggleGroupValueContextValue>(TOGGLE_GROUP_NAME)
249
+ const {
250
+ Provider: ToggleGroupValueProvider,
251
+ useStyledContext: useToggleGroupValueContext,
252
+ } = createStyledContext<ToggleGroupValueContextValue>()
258
253
 
259
254
  type ToggleGroupImplSingleElement = ToggleGroupImplElement
260
255
  interface ToggleGroupImplSingleProps extends ToggleGroupImplProps {
@@ -279,7 +274,7 @@ interface ToggleGroupImplSingleProps extends ToggleGroupImplProps {
279
274
 
280
275
  const ToggleGroupImplSingle = React.forwardRef<
281
276
  ToggleGroupImplSingleElement,
282
- ToggleGroupImplSingleProps
277
+ ScopedProps<ToggleGroupImplSingleProps>
283
278
  >((props: ScopedProps<ToggleGroupImplSingleProps>, forwardedRef) => {
284
279
  const {
285
280
  value: valueProp,
@@ -381,9 +376,6 @@ type ToggleGroupContextValue = {
381
376
  size: SizeTokens
382
377
  }
383
378
 
384
- const [ToggleGroupContext, useToggleGroupContext] =
385
- createToggleGroupContext<ToggleGroupContextValue>(TOGGLE_GROUP_NAME)
386
-
387
379
  type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup>
388
380
  type TamaguiElement = HTMLElement
389
381
  type ToggleGroupImplElement = TamaguiElement
@@ -438,7 +430,6 @@ const ToggleGroupImpl = ToggleGroupImplElementFrame.extractable(
438
430
  sizeAdjust = 0,
439
431
  ...toggleGroupProps
440
432
  } = props
441
- const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToggleGroup)
442
433
  const direction = useDirection(dir)
443
434
  const commonProps: ToggleGroupImplProps = {
444
435
  role: 'group',
@@ -462,7 +453,7 @@ const ToggleGroupImpl = ToggleGroupImplElementFrame.extractable(
462
453
  {rovingFocus ? (
463
454
  <RovingFocusGroup
464
455
  asChild="except-style"
465
- {...rovingFocusGroupScope}
456
+ __scopeRovingFocusGroup={__scopeToggleGroup || TOGGLE_GROUP_CONTEXT}
466
457
  orientation={orientation}
467
458
  dir={direction}
468
459
  loop={loop}
@@ -493,7 +484,7 @@ const ToggleGroupImpl = ToggleGroupImplElementFrame.extractable(
493
484
  )
494
485
  )
495
486
 
496
- export { ToggleGroup, createToggleGroupScope }
487
+ export { ToggleGroup }
497
488
  export type {
498
489
  ToggleGroupItemProps,
499
490
  ToggleGroupMultipleProps,
@@ -1,10 +1,8 @@
1
- import { Scope } from '@tamagui/create-context';
2
1
  import { GroupProps } from '@tamagui/group';
3
2
  import { RovingFocusGroup } from '@tamagui/roving-focus';
4
3
  import { GetProps, SizeTokens } from '@tamagui/web';
5
4
  import React from 'react';
6
5
  import { ToggleFrame } from './Toggle';
7
- declare const createToggleGroupScope: import("@tamagui/create-context").CreateScope;
8
6
  type ToggleGroupItemProps = GetProps<typeof ToggleFrame> & {
9
7
  value: string;
10
8
  id?: string;
@@ -22,7 +20,11 @@ interface ToggleGroupMultipleProps extends ToggleGroupImplMultipleProps {
22
20
  type: 'multiple';
23
21
  }
24
22
  type ToggleGroupProps = ToggleGroupSingleProps | ToggleGroupMultipleProps;
25
- declare const ToggleGroup: React.ForwardRefExoticComponent<(Omit<ToggleGroupSingleProps, "ref"> | Omit<ToggleGroupMultipleProps, "ref">) & React.RefAttributes<HTMLElement>> & {
23
+ declare const ToggleGroup: React.ForwardRefExoticComponent<(Omit<ToggleGroupSingleProps & {
24
+ __scopeToggleGroup?: string | undefined;
25
+ }, "ref"> | Omit<ToggleGroupMultipleProps & {
26
+ __scopeToggleGroup?: string | undefined;
27
+ }, "ref">) & React.RefAttributes<HTMLElement>> & {
26
28
  Item: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps, "display" | "children" | "onLayout" | keyof import("react-native").GestureResponderHandlers | "style"> & import("@tamagui/web").ExtendBaseStackProps & import("@tamagui/web").TamaguiComponentPropsBase & {
27
29
  style?: import("@tamagui/web").StyleProp<import("react-native").ViewStyle | React.CSSProperties | (React.CSSProperties & import("react-native").ViewStyle)>;
28
30
  } & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStylePropsBase> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStylePropsBase>> & import("@tamagui/core").RNViewProps & Omit<{
@@ -201,7 +203,7 @@ declare const ToggleGroupImplElementFrame: import("@tamagui/web").TamaguiCompone
201
203
  disablePassBorderRadius?: (boolean | "bottom" | "end" | "start" | "top") | undefined;
202
204
  forceUseItem?: boolean | undefined;
203
205
  } & {
204
- __scopeGroup?: Scope;
206
+ __scopeGroup?: import("@tamagui/create-context").Scope;
205
207
  } & React.RefAttributes<import("@tamagui/web").TamaguiElement> & Omit<import("@tamagui/web").StackProps, "style" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-labelledby" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-live" | "aria-modal" | "accessibilityLiveRegion" | "accessibilityLabelledBy" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "elevation" | keyof {
206
208
  columnGap?: import("@tamagui/web").SpaceValue | undefined;
207
209
  contain?: import("csstype").Property.Contain | undefined;
@@ -312,7 +314,7 @@ declare const ToggleGroupImplElementFrame: import("@tamagui/web").TamaguiCompone
312
314
  disablePassBorderRadius?: (boolean | "bottom" | "end" | "start" | "top") | undefined;
313
315
  forceUseItem?: boolean | undefined;
314
316
  } & {
315
- __scopeGroup?: Scope;
317
+ __scopeGroup?: import("@tamagui/create-context").Scope;
316
318
  } & React.RefAttributes<import("@tamagui/web").TamaguiElement> & Omit<import("@tamagui/web").StackProps, "style" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-labelledby" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-live" | "aria-modal" | "accessibilityLiveRegion" | "accessibilityLabelledBy" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "elevation" | keyof {
317
319
  columnGap?: import("@tamagui/web").SpaceValue | undefined;
318
320
  contain?: import("csstype").Property.Contain | undefined;
@@ -423,7 +425,7 @@ declare const ToggleGroupImplElementFrame: import("@tamagui/web").TamaguiCompone
423
425
  disablePassBorderRadius?: (boolean | "bottom" | "end" | "start" | "top") | undefined;
424
426
  forceUseItem?: boolean | undefined;
425
427
  } & {
426
- __scopeGroup?: Scope;
428
+ __scopeGroup?: import("@tamagui/create-context").Scope;
427
429
  } & React.RefAttributes<import("@tamagui/web").TamaguiElement> & Omit<import("@tamagui/web").StackProps, "style" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-labelledby" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-live" | "aria-modal" | "accessibilityLiveRegion" | "accessibilityLabelledBy" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "elevation" | keyof {
428
430
  columnGap?: import("@tamagui/web").SpaceValue | undefined;
429
431
  contain?: import("csstype").Property.Contain | undefined;
@@ -534,7 +536,7 @@ declare const ToggleGroupImplElementFrame: import("@tamagui/web").TamaguiCompone
534
536
  disablePassBorderRadius?: (boolean | "bottom" | "end" | "start" | "top") | undefined;
535
537
  forceUseItem?: boolean | undefined;
536
538
  } & {
537
- __scopeGroup?: Scope;
539
+ __scopeGroup?: import("@tamagui/create-context").Scope;
538
540
  } & React.RefAttributes<import("@tamagui/web").TamaguiElement> & Omit<import("@tamagui/web").StackProps, "style" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-labelledby" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-live" | "aria-modal" | "accessibilityLiveRegion" | "accessibilityLabelledBy" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "elevation" | keyof {
539
541
  columnGap?: import("@tamagui/web").SpaceValue | undefined;
540
542
  contain?: import("csstype").Property.Contain | undefined;
@@ -579,7 +581,7 @@ declare const ToggleGroupImplElementFrame: import("@tamagui/web").TamaguiCompone
579
581
  }, {
580
582
  displayName: string | undefined;
581
583
  Item: (props: import("@tamagui/group").GroupItemProps & {
582
- __scopeGroup?: Scope;
584
+ __scopeGroup?: import("@tamagui/create-context").Scope;
583
585
  }) => any;
584
586
  }>;
585
587
  type ToggleGroupImplProps = GetProps<typeof ToggleGroupImplElementFrame> & GroupProps & {
@@ -588,6 +590,6 @@ type ToggleGroupImplProps = GetProps<typeof ToggleGroupImplElementFrame> & Group
588
590
  loop?: RovingFocusGroupProps['loop'];
589
591
  sizeAdjust?: number;
590
592
  };
591
- export { ToggleGroup, createToggleGroupScope };
593
+ export { ToggleGroup };
592
594
  export type { ToggleGroupItemProps, ToggleGroupMultipleProps, ToggleGroupProps, ToggleGroupSingleProps, };
593
595
  //# sourceMappingURL=ToggleGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroup.d.ts","sourceRoot":"","sources":["../src/ToggleGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAsB,MAAM,yBAAyB,CAAA;AAInE,OAAO,EAAS,UAAU,EAAgB,MAAM,gBAAgB,CAAA;AAEhE,OAAO,EAAE,gBAAgB,EAA+B,MAAM,uBAAuB,CAAA;AAGrF,OAAO,EAEL,QAAQ,EACR,UAAU,EAMX,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAU,WAAW,EAAe,MAAM,UAAU,CAAA;AAG3D,QAAA,MAAiC,sBAAsB,+CAGtD,CAAA;AAiBD,KAAK,oBAAoB,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,GAAG;IACzD,KAAK,EAAE,MAAM,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