@tamagui/toggle-group 1.143.1 → 2.0.0-1767740890268

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.
Files changed (41) hide show
  1. package/dist/cjs/Toggle.cjs +16 -24
  2. package/dist/cjs/Toggle.js +16 -21
  3. package/dist/cjs/Toggle.js.map +2 -2
  4. package/dist/cjs/Toggle.native.js +18 -27
  5. package/dist/cjs/Toggle.native.js.map +1 -1
  6. package/dist/cjs/ToggleGroup.cjs +29 -41
  7. package/dist/cjs/ToggleGroup.js +31 -35
  8. package/dist/cjs/ToggleGroup.js.map +2 -2
  9. package/dist/cjs/ToggleGroup.native.js +30 -43
  10. package/dist/cjs/ToggleGroup.native.js.map +1 -1
  11. package/dist/esm/Toggle.js +16 -21
  12. package/dist/esm/Toggle.js.map +2 -2
  13. package/dist/esm/Toggle.mjs +16 -24
  14. package/dist/esm/Toggle.mjs.map +1 -1
  15. package/dist/esm/Toggle.native.js +18 -27
  16. package/dist/esm/Toggle.native.js.map +1 -1
  17. package/dist/esm/ToggleGroup.js +39 -37
  18. package/dist/esm/ToggleGroup.js.map +1 -1
  19. package/dist/esm/ToggleGroup.mjs +31 -43
  20. package/dist/esm/ToggleGroup.mjs.map +1 -1
  21. package/dist/esm/ToggleGroup.native.js +32 -45
  22. package/dist/esm/ToggleGroup.native.js.map +1 -1
  23. package/dist/jsx/Toggle.js +16 -21
  24. package/dist/jsx/Toggle.js.map +2 -2
  25. package/dist/jsx/Toggle.mjs +16 -24
  26. package/dist/jsx/Toggle.mjs.map +1 -1
  27. package/dist/jsx/Toggle.native.js +18 -27
  28. package/dist/jsx/Toggle.native.js.map +1 -1
  29. package/dist/jsx/ToggleGroup.js +39 -37
  30. package/dist/jsx/ToggleGroup.js.map +1 -1
  31. package/dist/jsx/ToggleGroup.mjs +31 -43
  32. package/dist/jsx/ToggleGroup.mjs.map +1 -1
  33. package/dist/jsx/ToggleGroup.native.js +30 -43
  34. package/dist/jsx/ToggleGroup.native.js.map +1 -1
  35. package/package.json +15 -15
  36. package/src/Toggle.tsx +20 -22
  37. package/src/ToggleGroup.tsx +93 -101
  38. package/types/Toggle.d.ts +21 -43
  39. package/types/Toggle.d.ts.map +1 -1
  40. package/types/ToggleGroup.d.ts +10 -239
  41. package/types/ToggleGroup.d.ts.map +1 -1
package/src/Toggle.tsx CHANGED
@@ -7,7 +7,6 @@ import * as React from 'react'
7
7
 
8
8
  export const context = createStyledContext({
9
9
  color: '',
10
- toggledStyle: null as null | Record<string, any>,
11
10
  })
12
11
 
13
12
  /* -------------------------------------------------------------------------------------------------
@@ -49,24 +48,24 @@ export const ToggleFrame = styled(ThemeableStack, {
49
48
  },
50
49
  },
51
50
 
51
+ color: {
52
+ '...color': () => {
53
+ return {}
54
+ },
55
+ },
56
+
52
57
  active: {
53
- true: (_, { props, context }: any) => {
54
- const toggledStyle = context?.toggledStyle
55
- return {
56
- zIndex: 1,
57
- ...(!props.unstyled &&
58
- !toggledStyle && {
59
- backgroundColor: '$background',
60
- hoverStyle: {
61
- backgroundColor: '$background',
62
- },
63
- focusStyle: {
64
- backgroundColor: '$background',
65
- borderColor: '$borderColor',
66
- },
67
- }),
68
- ...toggledStyle,
69
- }
58
+ true: {
59
+ zIndex: 1,
60
+
61
+ hoverStyle: {
62
+ backgroundColor: '$background',
63
+ },
64
+
65
+ focusStyle: {
66
+ borderColor: '$borderColor',
67
+ backgroundColor: '$background',
68
+ },
70
69
  },
71
70
  },
72
71
 
@@ -95,7 +94,6 @@ type ToggleItemExtraProps = {
95
94
  pressed?: boolean
96
95
  defaultPressed?: boolean
97
96
  onPressedChange?(pressed: boolean): void
98
- toggledStyle?: Record<string, any>
99
97
  }
100
98
 
101
99
  export type ToggleProps = ToggleFrameProps & ToggleItemExtraProps
@@ -118,10 +116,10 @@ export const Toggle = React.forwardRef<TamaguiElement, ToggleProps>(
118
116
  return (
119
117
  <ToggleFrame
120
118
  {...(!props.unstyled && {
121
- theme: pressed ? 'active' : null,
119
+ theme: pressed ? 'accent' : null,
122
120
  themeShallow: true,
123
121
  })}
124
- active={pressed}
122
+ active={!props.unstyled ? pressed : undefined}
125
123
  aria-pressed={pressed}
126
124
  data-state={pressed ? 'on' : 'off'}
127
125
  data-disabled={props.disabled ? '' : undefined}
@@ -129,7 +127,7 @@ export const Toggle = React.forwardRef<TamaguiElement, ToggleProps>(
129
127
  ref={forwardedRef}
130
128
  onPress={composeEventHandlers(props.onPress ?? undefined, () => {
131
129
  if (!props.disabled) {
132
- setPressed((prev) => !prev)
130
+ setPressed(!pressed)
133
131
  }
134
132
  })}
135
133
  />
@@ -10,11 +10,17 @@ import { RovingFocusGroup } from '@tamagui/roving-focus'
10
10
  import { useControllableState } from '@tamagui/use-controllable-state'
11
11
  import { useDirection } from '@tamagui/use-direction'
12
12
  import type { FontSizeTokens, GetProps, SizeTokens, TamaguiElement } from '@tamagui/web'
13
- import { createStyledContext, getVariableValue, styled, useTheme } from '@tamagui/web'
13
+ import {
14
+ createStyledContext,
15
+ getVariableValue,
16
+ styled,
17
+ usePropsAndStyle,
18
+ useTheme,
19
+ } from '@tamagui/web'
14
20
  import React from 'react'
15
21
 
16
22
  import type { ToggleProps } from './Toggle'
17
- import { Toggle, ToggleFrame, context as ToggleContext } from './Toggle'
23
+ import { Toggle, ToggleFrame } from './Toggle'
18
24
 
19
25
  const TOGGLE_GROUP_NAME = 'ToggleGroup'
20
26
 
@@ -43,83 +49,75 @@ type ToggleGroupItemProps = GetProps<typeof ToggleFrame> & {
43
49
  * Used to disable passing styles down to children.
44
50
  */
45
51
  disablePassStyles?: boolean
46
- toggledStyle?: Record<string, any>
47
- color?: string
48
52
  }
49
- const ToggleGroupItem = ToggleFrame.styleable<ScopedProps<ToggleGroupItemProps>>(
50
- (props, forwardedRef) => {
51
- const valueContext = useToggleGroupValueContext(props.__scopeToggleGroup)
52
- const context = useToggleGroupContext(props.__scopeToggleGroup)
53
- const toggleContext = ToggleContext.useStyledContext(props.__scopeToggleGroup)
54
- const pressed = valueContext?.value.includes(props.value)
55
- const toggledStyle = props.toggledStyle || toggleContext.toggledStyle
56
- const color = (props as any).color || toggleContext.color
57
-
58
- const { disablePassStyles, toggledStyle: _, ...rest } = props
59
- const disabled = context.disabled || props.disabled || false
60
- const groupItemProps = useGroupItem({ disabled })
61
- const size = props.size ?? context.size
62
-
63
- const sizeProps: Record<string, any> = props.unstyled
64
- ? {}
65
- : {
66
- width: undefined,
67
- height: undefined,
68
- padding: getVariableValue(size) * 0.6,
69
- }
53
+ const ToggleGroupItem = ToggleFrame.styleable<
54
+ TamaguiElement,
55
+ ScopedProps<ToggleGroupItemProps>
56
+ >((props, forwardedRef) => {
57
+ const [_, { color }] = usePropsAndStyle(props)
58
+ const { disablePassStyles, ...rest } = props
59
+ const valueContext = useToggleGroupValueContext(props.__scopeToggleGroup)
60
+ const context = useToggleGroupContext(props.__scopeToggleGroup)
61
+ const pressed = valueContext?.value.includes(props.value)
62
+ const disabled = context.disabled || props.disabled || false
63
+ const groupItemProps = useGroupItem({ disabled })
64
+ const size = props.size ?? context.size
65
+
66
+ const sizeProps: Record<string, any> = props.unstyled
67
+ ? {}
68
+ : {
69
+ width: undefined,
70
+ height: undefined,
71
+ padding: getVariableValue(size) * 0.6,
72
+ }
70
73
 
71
- const iconSize =
72
- (typeof size === 'number' ? size * 0.7 : getFontSize(size as FontSizeTokens)) * 1.2
74
+ const iconSize =
75
+ (typeof size === 'number' ? size * 0.7 : getFontSize(size as FontSizeTokens)) * 1.2
73
76
 
74
- const theme = useTheme()
75
- const toggledColor = (toggledStyle as Record<string, any>)?.color
76
- const activeColor = pressed && toggledColor ? toggledColor : color
77
- const getThemedIcon = useGetThemedIcon({
78
- size: iconSize,
79
- color: activeColor || theme.color,
80
- })
77
+ const theme = useTheme()
78
+ const getThemedIcon = useGetThemedIcon({
79
+ size: iconSize,
80
+ color: color ?? theme.color,
81
+ })
81
82
 
82
- const childrens = React.Children.toArray(props.children)
83
- const children = childrens.map((child) => {
84
- if (props.disablePassStyles || !React.isValidElement(child)) {
85
- return child
86
- }
87
- return React.cloneElement(getThemedIcon(child), { active: pressed } as any)
88
- })
83
+ const childrens = React.Children.toArray(props.children)
84
+ const children = childrens.map((child) => {
85
+ if (props.disablePassStyles || !React.isValidElement(child)) {
86
+ return child
87
+ }
88
+ return React.cloneElement(getThemedIcon(child), { active: pressed } as any)
89
+ })
89
90
 
90
- const commonProps = { pressed, disabled, ...sizeProps, ...rest, children }
91
-
92
- const inner = (
93
- <ToggleGroupItemImpl
94
- {...commonProps}
95
- ref={forwardedRef}
96
- // focusable={!disabled}
97
- tabIndex={disabled ? -1 : 0}
98
- disabled={disabled}
99
- {...groupItemProps}
100
- />
101
- )
102
-
103
- return (
104
- <ToggleGroupItemProvider scope={props.__scopeToggleGroup}>
105
- <ToggleContext.Provider color={color} toggledStyle={toggledStyle}>
106
- {context.rovingFocus ? (
107
- <RovingFocusGroup.Item
108
- asChild="except-style"
109
- __scopeRovingFocusGroup={props.__scopeToggleGroup || TOGGLE_GROUP_CONTEXT}
110
- focusable={!disabled}
111
- active={pressed}
112
- >
113
- {inner}
114
- </RovingFocusGroup.Item>
115
- ) : (
116
- inner
117
- )}
118
- </ToggleContext.Provider>
119
- </ToggleGroupItemProvider>
120
- )
121
- }
122
- )
91
+ const commonProps = { pressed, disabled, ...sizeProps, ...rest, children }
92
+
93
+ const inner = (
94
+ <ToggleGroupItemImpl
95
+ {...commonProps}
96
+ ref={forwardedRef}
97
+ // focusable={!disabled}
98
+ tabIndex={disabled ? -1 : 0}
99
+ disabled={disabled}
100
+ {...groupItemProps}
101
+ />
102
+ )
103
+
104
+ return (
105
+ <ToggleGroupItemProvider scope={props.__scopeToggleGroup}>
106
+ {context.rovingFocus ? (
107
+ <RovingFocusGroup.Item
108
+ asChild="except-style"
109
+ __scopeRovingFocusGroup={props.__scopeToggleGroup || TOGGLE_GROUP_CONTEXT}
110
+ focusable={!disabled}
111
+ active={pressed}
112
+ >
113
+ {inner}
114
+ </RovingFocusGroup.Item>
115
+ ) : (
116
+ inner
117
+ )}
118
+ </ToggleGroupItemProvider>
119
+ )
120
+ })
123
121
  ToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME
124
122
 
125
123
  /* -----------------------------------------------------------------------------------------------*/
@@ -392,8 +390,6 @@ type ToggleGroupImplProps = GetProps<typeof ToggleGroupImplElementFrame> &
392
390
  dir?: RovingFocusGroupProps['dir']
393
391
  loop?: RovingFocusGroupProps['loop']
394
392
  sizeAdjust?: number
395
- toggledStyle?: Record<string, any>
396
- color?: string
397
393
  }
398
394
 
399
395
  const ToggleGroupImpl = ToggleGroupImplElementFrame.styleable<
@@ -410,8 +406,6 @@ const ToggleGroupImpl = ToggleGroupImplElementFrame.styleable<
410
406
  unstyled = false,
411
407
  size: sizeProp = '$true',
412
408
  sizeAdjust = 0,
413
- toggledStyle,
414
- color,
415
409
  ...toggleGroupProps
416
410
  } = props
417
411
  const direction = useDirection(dir)
@@ -434,36 +428,34 @@ const ToggleGroupImpl = ToggleGroupImplElementFrame.styleable<
434
428
  disabled={disabled}
435
429
  size={size}
436
430
  >
437
- <ToggleContext.Provider color={color} toggledStyle={toggledStyle}>
438
- {rovingFocus ? (
439
- <RovingFocusGroup
440
- asChild="except-style"
441
- __scopeRovingFocusGroup={__scopeToggleGroup || TOGGLE_GROUP_CONTEXT}
442
- orientation={orientation}
443
- dir={direction}
444
- loop={loop}
445
- >
446
- <ToggleGroupImplElementFrame
447
- aria-orientation={orientation}
448
- orientation={orientation}
449
- // axis={orientation}
450
- ref={forwardedRef}
451
- data-disabled={disabled ? '' : undefined}
452
- unstyled={unstyled}
453
- {...commonProps}
454
- />
455
- </RovingFocusGroup>
456
- ) : (
431
+ {rovingFocus ? (
432
+ <RovingFocusGroup
433
+ asChild="except-style"
434
+ __scopeRovingFocusGroup={__scopeToggleGroup || TOGGLE_GROUP_CONTEXT}
435
+ orientation={orientation}
436
+ dir={direction}
437
+ loop={loop}
438
+ >
457
439
  <ToggleGroupImplElementFrame
458
440
  aria-orientation={orientation}
459
- ref={forwardedRef}
460
441
  orientation={orientation}
442
+ // axis={orientation}
443
+ ref={forwardedRef}
461
444
  data-disabled={disabled ? '' : undefined}
462
445
  unstyled={unstyled}
463
446
  {...commonProps}
464
447
  />
465
- )}
466
- </ToggleContext.Provider>
448
+ </RovingFocusGroup>
449
+ ) : (
450
+ <ToggleGroupImplElementFrame
451
+ aria-orientation={orientation}
452
+ ref={forwardedRef}
453
+ orientation={orientation}
454
+ data-disabled={disabled ? '' : undefined}
455
+ unstyled={unstyled}
456
+ {...commonProps}
457
+ />
458
+ )}
467
459
  </ToggleGroupContext>
468
460
  )
469
461
  })
package/types/Toggle.d.ts CHANGED
@@ -2,30 +2,24 @@ import type { GetProps, TamaguiElement } from '@tamagui/web';
2
2
  import * as React from 'react';
3
3
  export declare const context: import("@tamagui/web").StyledContext<{
4
4
  color: string;
5
- toggledStyle: null | Record<string, any>;
6
5
  }>;
7
6
  export declare const ToggleFrame: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
7
+ color?: import("@tamagui/web").ColorTokens | undefined;
8
8
  elevation?: number | import("@tamagui/web").SizeTokens | undefined;
9
- inset?: number | import("@tamagui/web").SizeTokens | {
10
- top?: number;
11
- bottom?: number;
12
- left?: number;
13
- right?: number;
14
- } | null | undefined;
15
9
  transparent?: boolean | undefined;
16
10
  fullscreen?: boolean | undefined;
17
11
  circular?: boolean | undefined;
12
+ backgrounded?: boolean | undefined;
13
+ radiused?: boolean | undefined;
18
14
  hoverTheme?: boolean | undefined;
19
15
  pressTheme?: boolean | undefined;
20
16
  focusTheme?: boolean | undefined;
17
+ padded?: boolean | undefined;
21
18
  elevate?: boolean | undefined;
22
19
  bordered?: number | boolean | undefined;
23
- backgrounded?: boolean | undefined;
24
- radiused?: boolean | undefined;
25
- padded?: boolean | undefined;
26
20
  chromeless?: boolean | "all" | undefined;
27
- active?: boolean | undefined;
28
21
  unstyled?: boolean | undefined;
22
+ active?: boolean | undefined;
29
23
  orientation?: "horizontal" | "vertical" | undefined;
30
24
  }, import("@tamagui/web").StaticConfigPublic>;
31
25
  type ToggleFrameProps = GetProps<typeof ToggleFrame>;
@@ -35,77 +29,61 @@ type ToggleItemExtraProps = {
35
29
  pressed?: boolean;
36
30
  defaultPressed?: boolean;
37
31
  onPressedChange?(pressed: boolean): void;
38
- toggledStyle?: Record<string, any>;
39
32
  };
40
33
  export type ToggleProps = ToggleFrameProps & ToggleItemExtraProps;
41
- export declare const Toggle: React.ForwardRefExoticComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "elevation" | keyof import("@tamagui/web").StackStyleBase | "transparent" | "fullscreen" | "circular" | "hoverTheme" | "pressTheme" | "focusTheme" | "elevate" | "bordered" | "backgrounded" | "radiused" | "padded" | "chromeless" | "active" | "unstyled" | "orientation"> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & {
34
+ export declare const Toggle: React.ForwardRefExoticComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "color" | "elevation" | keyof import("@tamagui/web").StackStyleBase | "transparent" | "fullscreen" | "circular" | "backgrounded" | "radiused" | "hoverTheme" | "pressTheme" | "focusTheme" | "padded" | "elevate" | "bordered" | "chromeless" | "unstyled" | "active" | "orientation"> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & {
35
+ color?: import("@tamagui/web").ColorTokens | undefined;
42
36
  elevation?: number | import("@tamagui/web").SizeTokens | undefined;
43
- inset?: number | import("@tamagui/web").SizeTokens | {
44
- top?: number;
45
- bottom?: number;
46
- left?: number;
47
- right?: number;
48
- } | null | undefined;
49
37
  transparent?: boolean | undefined;
50
38
  fullscreen?: boolean | undefined;
51
39
  circular?: boolean | undefined;
40
+ backgrounded?: boolean | undefined;
41
+ radiused?: boolean | undefined;
52
42
  hoverTheme?: boolean | undefined;
53
43
  pressTheme?: boolean | undefined;
54
44
  focusTheme?: boolean | undefined;
45
+ padded?: boolean | undefined;
55
46
  elevate?: boolean | undefined;
56
47
  bordered?: number | boolean | undefined;
57
- backgrounded?: boolean | undefined;
58
- radiused?: boolean | undefined;
59
- padded?: boolean | undefined;
60
48
  chromeless?: boolean | "all" | undefined;
61
- active?: boolean | undefined;
62
49
  unstyled?: boolean | undefined;
50
+ active?: boolean | undefined;
63
51
  orientation?: "horizontal" | "vertical" | undefined;
64
52
  } & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & import("@tamagui/web").WithPseudoProps<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & {
53
+ color?: import("@tamagui/web").ColorTokens | undefined;
65
54
  elevation?: number | import("@tamagui/web").SizeTokens | undefined;
66
- inset?: number | import("@tamagui/web").SizeTokens | {
67
- top?: number;
68
- bottom?: number;
69
- left?: number;
70
- right?: number;
71
- } | null | undefined;
72
55
  transparent?: boolean | undefined;
73
56
  fullscreen?: boolean | undefined;
74
57
  circular?: boolean | undefined;
58
+ backgrounded?: boolean | undefined;
59
+ radiused?: boolean | undefined;
75
60
  hoverTheme?: boolean | undefined;
76
61
  pressTheme?: boolean | undefined;
77
62
  focusTheme?: boolean | undefined;
63
+ padded?: boolean | undefined;
78
64
  elevate?: boolean | undefined;
79
65
  bordered?: number | boolean | undefined;
80
- backgrounded?: boolean | undefined;
81
- radiused?: boolean | undefined;
82
- padded?: boolean | undefined;
83
66
  chromeless?: boolean | "all" | undefined;
84
- active?: boolean | undefined;
85
67
  unstyled?: boolean | undefined;
68
+ active?: boolean | undefined;
86
69
  orientation?: "horizontal" | "vertical" | undefined;
87
70
  } & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>>> & import("@tamagui/web").WithMediaProps<import("@tamagui/web").WithThemeShorthandsAndPseudos<import("@tamagui/web").StackStyleBase, {
71
+ color?: import("@tamagui/web").ColorTokens | undefined;
88
72
  elevation?: number | import("@tamagui/web").SizeTokens | undefined;
89
- inset?: number | import("@tamagui/web").SizeTokens | {
90
- top?: number;
91
- bottom?: number;
92
- left?: number;
93
- right?: number;
94
- } | null | undefined;
95
73
  transparent?: boolean | undefined;
96
74
  fullscreen?: boolean | undefined;
97
75
  circular?: boolean | undefined;
76
+ backgrounded?: boolean | undefined;
77
+ radiused?: boolean | undefined;
98
78
  hoverTheme?: boolean | undefined;
99
79
  pressTheme?: boolean | undefined;
100
80
  focusTheme?: boolean | undefined;
81
+ padded?: boolean | undefined;
101
82
  elevate?: boolean | undefined;
102
83
  bordered?: number | boolean | undefined;
103
- backgrounded?: boolean | undefined;
104
- radiused?: boolean | undefined;
105
- padded?: boolean | undefined;
106
84
  chromeless?: boolean | "all" | undefined;
107
- active?: boolean | undefined;
108
85
  unstyled?: boolean | undefined;
86
+ active?: boolean | undefined;
109
87
  orientation?: "horizontal" | "vertical" | undefined;
110
88
  }>> & ToggleItemExtraProps & React.RefAttributes<TamaguiElement>>;
111
89
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../src/Toggle.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,eAAO,MAAM,OAAO;;kBAEI,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;EAChD,CAAA;AAQF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;6CAqEtB,CAAA;AAEF,KAAK,gBAAgB,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAA;AAEpD,KAAK,oBAAoB,GAAG;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,oBAAoB,CAAA;AAEjE,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iEAmClB,CAAA"}
1
+ {"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../src/Toggle.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,eAAO,MAAM,OAAO;;EAElB,CAAA;AAQF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;6CAqEtB,CAAA;AAEF,KAAK,gBAAgB,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAA;AAEpD,KAAK,oBAAoB,GAAG;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACzC,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,oBAAoB,CAAA;AAEjE,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iEAmClB,CAAA"}