@tamagui/toggle-group 1.14.7 → 1.14.9

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.
@@ -104,7 +104,7 @@ const Toggle = ToggleFrame.extractable(
104
104
  onChange: onPressedChange,
105
105
  defaultProp: defaultPressed
106
106
  });
107
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web.Theme, { forceClassName: true, name: pressed ? "active" : null, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
107
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web.Theme, { name: pressed ? "active" : null, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
108
108
  ToggleFrame,
109
109
  {
110
110
  active: !props.unstyled ? pressed : void 0,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Toggle.tsx"],
4
- "sourcesContent": ["import { ThemeableStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { GetProps, Theme, composeEventHandlers, isWeb, styled } from '@tamagui/web'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle'\n\ntype TamaguiButtonElement = HTMLButtonElement\n\ntype ToggleElement = TamaguiButtonElement\n\nconst ToggleFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'button',\n\n variants: {\n unstyled: {\n false: {\n pressTheme: true,\n backgroundColor: '$background',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'flex',\n borderColor: '$borderColor',\n borderWidth: '1px',\n margin: '-1px',\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n active: {\n true: {\n zIndex: 1,\n hoverStyle: {\n backgroundColor: '$background',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n orientation: {\n horizontal: {\n flexDirection: 'row',\n spaceDirection: 'horizontal',\n },\n vertical: {\n flexDirection: 'column',\n spaceDirection: 'vertical',\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\ntype ToggleFrameProps = GetProps<typeof ToggleFrame>\n\ntype ToggleProps = ToggleFrameProps & {\n defaultValue?: string\n disabled?: boolean\n pressed?: boolean\n defaultPressed?: boolean\n onPressedChange?(pressed: boolean): void\n}\n\nconst Toggle = ToggleFrame.extractable(\n React.forwardRef<ToggleElement, ToggleProps>((props, forwardedRef) => {\n const {\n pressed: pressedProp,\n defaultPressed = false,\n onPressedChange,\n ...buttonProps\n } = props\n\n const [pressed = false, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed,\n })\n\n return (\n <Theme forceClassName name={pressed ? 'active' : null}>\n <ToggleFrame\n active={!props.unstyled ? pressed : undefined}\n aria-pressed={pressed}\n data-state={pressed ? 'on' : 'off'}\n data-disabled={props.disabled ? '' : undefined}\n {...buttonProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n if (!props.disabled) {\n setPressed(!pressed)\n }\n })}\n // caught by onPress - no need for this\n // {...(isWeb && {\n // onKeyDown: composeEventHandlers(\n // (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n // (event) => {\n // if ([' ', 'Enter'].includes(event.key)) {\n // if (!props.disabled) {\n // setPressed(!pressed)\n // }\n // }\n // }\n // ),\n // })}\n />\n </Theme>\n )\n })\n)\nToggle.displayName = NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nexport { Toggle, ToggleFrame }\nexport type { ToggleProps }\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiGQ;AAjGR,oBAA+B;AAC/B,oCAAqC;AACrC,iBAAqE;AACrE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W,MAC/C;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,CAAC,MAAM,WAAW,UAAU;AAAA,QACpC,gBAAc;AAAA,QACd,cAAY,UAAU,OAAO;AAAA,QAC7B,iBAAe,MAAM,WAAW,KAAK;AAAA,QACpC,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,aAAS,iCAAqB,MAAM,WAAW,QAAW,CAAC,UAAU;AACnE,cAAI,CAAC,MAAM,UAAU;AACnB,uBAAW,CAAC,OAAO;AAAA,UACrB;AAAA,QACF,CAAC;AAAA;AAAA,IAcH,GACF;AAAA,EAEJ,CAAC;AACH;AACA,OAAO,cAAc;",
4
+ "sourcesContent": ["import { ThemeableStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { GetProps, Theme, composeEventHandlers, isWeb, styled } from '@tamagui/web'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle'\n\ntype TamaguiButtonElement = HTMLButtonElement\n\ntype ToggleElement = TamaguiButtonElement\n\nconst ToggleFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'button',\n\n variants: {\n unstyled: {\n false: {\n pressTheme: true,\n backgroundColor: '$background',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'flex',\n borderColor: '$borderColor',\n borderWidth: '1px',\n margin: '-1px',\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n active: {\n true: {\n zIndex: 1,\n hoverStyle: {\n backgroundColor: '$background',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n orientation: {\n horizontal: {\n flexDirection: 'row',\n spaceDirection: 'horizontal',\n },\n vertical: {\n flexDirection: 'column',\n spaceDirection: 'vertical',\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\ntype ToggleFrameProps = GetProps<typeof ToggleFrame>\n\ntype ToggleProps = ToggleFrameProps & {\n defaultValue?: string\n disabled?: boolean\n pressed?: boolean\n defaultPressed?: boolean\n onPressedChange?(pressed: boolean): void\n}\n\nconst Toggle = ToggleFrame.extractable(\n React.forwardRef<ToggleElement, ToggleProps>((props, forwardedRef) => {\n const {\n pressed: pressedProp,\n defaultPressed = false,\n onPressedChange,\n ...buttonProps\n } = props\n\n const [pressed = false, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed,\n })\n\n return (\n <Theme name={pressed ? 'active' : null}>\n <ToggleFrame\n active={!props.unstyled ? pressed : undefined}\n aria-pressed={pressed}\n data-state={pressed ? 'on' : 'off'}\n data-disabled={props.disabled ? '' : undefined}\n {...buttonProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n if (!props.disabled) {\n setPressed(!pressed)\n }\n })}\n // caught by onPress - no need for this\n // {...(isWeb && {\n // onKeyDown: composeEventHandlers(\n // (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n // (event) => {\n // if ([' ', 'Enter'].includes(event.key)) {\n // if (!props.disabled) {\n // setPressed(!pressed)\n // }\n // }\n // }\n // ),\n // })}\n />\n </Theme>\n )\n })\n)\nToggle.displayName = NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nexport { Toggle, ToggleFrame }\nexport type { ToggleProps }\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiGQ;AAjGR,oBAA+B;AAC/B,oCAAqC;AACrC,iBAAqE;AACrE,YAAuB;AAMvB,MAAM,OAAO;AAMb,MAAM,kBAAc,mBAAO,8BAAgB;AAAA,EACzC,MAAM;AAAA,EACN,KAAK;AAAA,EAEL,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,Y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AAA,QACJ,KAAK;AAAA,QACL,aAAS,iCAAqB,MAAM,WAAW,QAAW,CAAC,UAAU;AACnE,cAAI,CAAC,MAAM,UAAU;AACnB,uBAAW,CAAC,OAAO;AAAA,UACrB;AAAA,QACF,CAAC;AAAA;AAAA,IAcH,GACF;AAAA,EAEJ,CAAC;AACH;AACA,OAAO,cAAc;",
6
6
  "names": []
7
7
  }
@@ -70,7 +70,7 @@ const Toggle = ToggleFrame.extractable(
70
70
  onChange: onPressedChange,
71
71
  defaultProp: defaultPressed
72
72
  });
73
- return /* @__PURE__ */ jsx(Theme, { forceClassName: true, name: pressed ? "active" : null, children: /* @__PURE__ */ jsx(
73
+ return /* @__PURE__ */ jsx(Theme, { name: pressed ? "active" : null, children: /* @__PURE__ */ jsx(
74
74
  ToggleFrame,
75
75
  {
76
76
  active: !props.unstyled ? pressed : void 0,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Toggle.tsx"],
4
- "sourcesContent": ["import { ThemeableStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { GetProps, Theme, composeEventHandlers, isWeb, styled } from '@tamagui/web'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle'\n\ntype TamaguiButtonElement = HTMLButtonElement\n\ntype ToggleElement = TamaguiButtonElement\n\nconst ToggleFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'button',\n\n variants: {\n unstyled: {\n false: {\n pressTheme: true,\n backgroundColor: '$background',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'flex',\n borderColor: '$borderColor',\n borderWidth: '1px',\n margin: '-1px',\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n active: {\n true: {\n zIndex: 1,\n hoverStyle: {\n backgroundColor: '$background',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n orientation: {\n horizontal: {\n flexDirection: 'row',\n spaceDirection: 'horizontal',\n },\n vertical: {\n flexDirection: 'column',\n spaceDirection: 'vertical',\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\ntype ToggleFrameProps = GetProps<typeof ToggleFrame>\n\ntype ToggleProps = ToggleFrameProps & {\n defaultValue?: string\n disabled?: boolean\n pressed?: boolean\n defaultPressed?: boolean\n onPressedChange?(pressed: boolean): void\n}\n\nconst Toggle = ToggleFrame.extractable(\n React.forwardRef<ToggleElement, ToggleProps>((props, forwardedRef) => {\n const {\n pressed: pressedProp,\n defaultPressed = false,\n onPressedChange,\n ...buttonProps\n } = props\n\n const [pressed = false, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed,\n })\n\n return (\n <Theme forceClassName name={pressed ? 'active' : null}>\n <ToggleFrame\n active={!props.unstyled ? pressed : undefined}\n aria-pressed={pressed}\n data-state={pressed ? 'on' : 'off'}\n data-disabled={props.disabled ? '' : undefined}\n {...buttonProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n if (!props.disabled) {\n setPressed(!pressed)\n }\n })}\n // caught by onPress - no need for this\n // {...(isWeb && {\n // onKeyDown: composeEventHandlers(\n // (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n // (event) => {\n // if ([' ', 'Enter'].includes(event.key)) {\n // if (!props.disabled) {\n // setPressed(!pressed)\n // }\n // }\n // }\n // ),\n // })}\n />\n </Theme>\n )\n })\n)\nToggle.displayName = NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nexport { Toggle, ToggleFrame }\nexport type { ToggleProps }\n"],
5
- "mappings": "AAiGQ;AAjGR,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAmB,OAAO,sBAA6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AAM,UAAU,WAAW,MAC/C;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,CAAC,MAAM,WAAW,UAAU;AAAA,QACpC,gBAAc;AAAA,QACd,cAAY,UAAU,OAAO;AAAA,QAC7B,iBAAe,MAAM,WAAW,KAAK;AAAA,QACpC,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,SAAS,qBAAqB,MAAM,WAAW,QAAW,CAAC,UAAU;AACnE,cAAI,CAAC,MAAM,UAAU;AACnB,uBAAW,CAAC,OAAO;AAAA,UACrB;AAAA,QACF,CAAC;AAAA;AAAA,IAcH,GACF;AAAA,EAEJ,CAAC;AACH;AACA,OAAO,cAAc;",
4
+ "sourcesContent": ["import { ThemeableStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { GetProps, Theme, composeEventHandlers, isWeb, styled } from '@tamagui/web'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle'\n\ntype TamaguiButtonElement = HTMLButtonElement\n\ntype ToggleElement = TamaguiButtonElement\n\nconst ToggleFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'button',\n\n variants: {\n unstyled: {\n false: {\n pressTheme: true,\n backgroundColor: '$background',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'flex',\n borderColor: '$borderColor',\n borderWidth: '1px',\n margin: '-1px',\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n active: {\n true: {\n zIndex: 1,\n hoverStyle: {\n backgroundColor: '$background',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n orientation: {\n horizontal: {\n flexDirection: 'row',\n spaceDirection: 'horizontal',\n },\n vertical: {\n flexDirection: 'column',\n spaceDirection: 'vertical',\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\ntype ToggleFrameProps = GetProps<typeof ToggleFrame>\n\ntype ToggleProps = ToggleFrameProps & {\n defaultValue?: string\n disabled?: boolean\n pressed?: boolean\n defaultPressed?: boolean\n onPressedChange?(pressed: boolean): void\n}\n\nconst Toggle = ToggleFrame.extractable(\n React.forwardRef<ToggleElement, ToggleProps>((props, forwardedRef) => {\n const {\n pressed: pressedProp,\n defaultPressed = false,\n onPressedChange,\n ...buttonProps\n } = props\n\n const [pressed = false, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed,\n })\n\n return (\n <Theme name={pressed ? 'active' : null}>\n <ToggleFrame\n active={!props.unstyled ? pressed : undefined}\n aria-pressed={pressed}\n data-state={pressed ? 'on' : 'off'}\n data-disabled={props.disabled ? '' : undefined}\n {...buttonProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n if (!props.disabled) {\n setPressed(!pressed)\n }\n })}\n // caught by onPress - no need for this\n // {...(isWeb && {\n // onKeyDown: composeEventHandlers(\n // (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n // (event) => {\n // if ([' ', 'Enter'].includes(event.key)) {\n // if (!props.disabled) {\n // setPressed(!pressed)\n // }\n // }\n // }\n // ),\n // })}\n />\n </Theme>\n )\n })\n)\nToggle.displayName = NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nexport { Toggle, ToggleFrame }\nexport type { ToggleProps }\n"],
5
+ "mappings": "AAiGQ;AAjGR,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAmB,OAAO,sBAA6B,cAAc;AACrE,YAAY,WAAW;AAMvB,MAAM,OAAO;AAMb,MAAM,cAAc,OAAO,gBAAgB;AAAA,EACzC,MAAM;AAAA,EACN,KAAK;AAAA,EAEL,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,iBAA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QACL,SAAS,qBAAqB,MAAM,WAAW,QAAW,CAAC,UAAU;AACnE,cAAI,CAAC,MAAM,UAAU;AACnB,uBAAW,CAAC,OAAO;AAAA,UACrB;AAAA,QACF,CAAC;AAAA;AAAA,IAcH,GACF;AAAA,EAEJ,CAAC;AACH;AACA,OAAO,cAAc;",
6
6
  "names": []
7
7
  }
@@ -70,7 +70,7 @@ const Toggle = ToggleFrame.extractable(
70
70
  onChange: onPressedChange,
71
71
  defaultProp: defaultPressed
72
72
  });
73
- return /* @__PURE__ */ jsx(Theme, { forceClassName: true, name: pressed ? "active" : null, children: /* @__PURE__ */ jsx(
73
+ return /* @__PURE__ */ jsx(Theme, { name: pressed ? "active" : null, children: /* @__PURE__ */ jsx(
74
74
  ToggleFrame,
75
75
  {
76
76
  active: !props.unstyled ? pressed : void 0,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Toggle.tsx"],
4
- "sourcesContent": ["import { ThemeableStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { GetProps, Theme, composeEventHandlers, isWeb, styled } from '@tamagui/web'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle'\n\ntype TamaguiButtonElement = HTMLButtonElement\n\ntype ToggleElement = TamaguiButtonElement\n\nconst ToggleFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'button',\n\n variants: {\n unstyled: {\n false: {\n pressTheme: true,\n backgroundColor: '$background',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'flex',\n borderColor: '$borderColor',\n borderWidth: '1px',\n margin: '-1px',\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n active: {\n true: {\n zIndex: 1,\n hoverStyle: {\n backgroundColor: '$background',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n orientation: {\n horizontal: {\n flexDirection: 'row',\n spaceDirection: 'horizontal',\n },\n vertical: {\n flexDirection: 'column',\n spaceDirection: 'vertical',\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\ntype ToggleFrameProps = GetProps<typeof ToggleFrame>\n\ntype ToggleProps = ToggleFrameProps & {\n defaultValue?: string\n disabled?: boolean\n pressed?: boolean\n defaultPressed?: boolean\n onPressedChange?(pressed: boolean): void\n}\n\nconst Toggle = ToggleFrame.extractable(\n React.forwardRef<ToggleElement, ToggleProps>((props, forwardedRef) => {\n const {\n pressed: pressedProp,\n defaultPressed = false,\n onPressedChange,\n ...buttonProps\n } = props\n\n const [pressed = false, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed,\n })\n\n return (\n <Theme forceClassName name={pressed ? 'active' : null}>\n <ToggleFrame\n active={!props.unstyled ? pressed : undefined}\n aria-pressed={pressed}\n data-state={pressed ? 'on' : 'off'}\n data-disabled={props.disabled ? '' : undefined}\n {...buttonProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n if (!props.disabled) {\n setPressed(!pressed)\n }\n })}\n // caught by onPress - no need for this\n // {...(isWeb && {\n // onKeyDown: composeEventHandlers(\n // (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n // (event) => {\n // if ([' ', 'Enter'].includes(event.key)) {\n // if (!props.disabled) {\n // setPressed(!pressed)\n // }\n // }\n // }\n // ),\n // })}\n />\n </Theme>\n )\n })\n)\nToggle.displayName = NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nexport { Toggle, ToggleFrame }\nexport type { ToggleProps }\n"],
5
- "mappings": "AAiGQ;AAjGR,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAmB,OAAO,sBAA6B,cAAc;AACrE,YAAY,WA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;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,CAAC,MAAM,WAAW,UAAU;AAAA,QACpC,gBAAc;AAAA,QACd,cAAY,UAAU,OAAO;AAAA,QAC7B,iBAAe,MAAM,WAAW,KAAK;AAAA,QACpC,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,SAAS,qBAAqB,MAAM,WAAW,QAAW,CAAC,UAAU;AACnE,cAAI,CAAC,MAAM,UAAU;AACnB,uBAAW,CAAC,OAAO;AAAA,UACrB;AAAA,QACF,CAAC;AAAA;AAAA,IAcH,GACF;AAAA,EAEJ,CAAC;AACH;AACA,OAAO,cAAc;",
4
+ "sourcesContent": ["import { ThemeableStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { GetProps, Theme, composeEventHandlers, isWeb, styled } from '@tamagui/web'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle'\n\ntype TamaguiButtonElement = HTMLButtonElement\n\ntype ToggleElement = TamaguiButtonElement\n\nconst ToggleFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'button',\n\n variants: {\n unstyled: {\n false: {\n pressTheme: true,\n backgroundColor: '$background',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'flex',\n borderColor: '$borderColor',\n borderWidth: '1px',\n margin: '-1px',\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n active: {\n true: {\n zIndex: 1,\n hoverStyle: {\n backgroundColor: '$background',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n orientation: {\n horizontal: {\n flexDirection: 'row',\n spaceDirection: 'horizontal',\n },\n vertical: {\n flexDirection: 'column',\n spaceDirection: 'vertical',\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\ntype ToggleFrameProps = GetProps<typeof ToggleFrame>\n\ntype ToggleProps = ToggleFrameProps & {\n defaultValue?: string\n disabled?: boolean\n pressed?: boolean\n defaultPressed?: boolean\n onPressedChange?(pressed: boolean): void\n}\n\nconst Toggle = ToggleFrame.extractable(\n React.forwardRef<ToggleElement, ToggleProps>((props, forwardedRef) => {\n const {\n pressed: pressedProp,\n defaultPressed = false,\n onPressedChange,\n ...buttonProps\n } = props\n\n const [pressed = false, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed,\n })\n\n return (\n <Theme name={pressed ? 'active' : null}>\n <ToggleFrame\n active={!props.unstyled ? pressed : undefined}\n aria-pressed={pressed}\n data-state={pressed ? 'on' : 'off'}\n data-disabled={props.disabled ? '' : undefined}\n {...buttonProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n if (!props.disabled) {\n setPressed(!pressed)\n }\n })}\n // caught by onPress - no need for this\n // {...(isWeb && {\n // onKeyDown: composeEventHandlers(\n // (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n // (event) => {\n // if ([' ', 'Enter'].includes(event.key)) {\n // if (!props.disabled) {\n // setPressed(!pressed)\n // }\n // }\n // }\n // ),\n // })}\n />\n </Theme>\n )\n })\n)\nToggle.displayName = NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nexport { Toggle, ToggleFrame }\nexport type { ToggleProps }\n"],
5
+ "mappings": "AAiGQ;AAjGR,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAmB,OAAO,sBAA6B,cAAc;AACrE,YAAY,WAAW;AAMvB,MAAM,OAAO;AAMb,MAAM,cAAc,OAAO,gBAAgB;AAAA,EACzC,MAAM;AAAA,EACN,KAAK;AAAA,EAEL,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,iBAAiB;AAAA,QACjB,YAAY;A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M,WAAW,QAAW,CAAC,UAAU;AACnE,cAAI,CAAC,MAAM,UAAU;AACnB,uBAAW,CAAC,OAAO;AAAA,UACrB;AAAA,QACF,CAAC;AAAA;AAAA,IAcH,GACF;AAAA,EAEJ,CAAC;AACH;AACA,OAAO,cAAc;",
6
6
  "names": []
7
7
  }
@@ -69,7 +69,7 @@ const Toggle = ToggleFrame.extractable(
69
69
  onChange: onPressedChange,
70
70
  defaultProp: defaultPressed
71
71
  });
72
- return <Theme forceClassName name={pressed ? "active" : null}><ToggleFrame
72
+ return <Theme name={pressed ? "active" : null}><ToggleFrame
73
73
  active={!props.unstyled ? pressed : void 0}
74
74
  aria-pressed={pressed}
75
75
  data-state={pressed ? "on" : "off"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Toggle.tsx"],
4
- "sourcesContent": ["import { ThemeableStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { GetProps, Theme, composeEventHandlers, isWeb, styled } from '@tamagui/web'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle'\n\ntype TamaguiButtonElement = HTMLButtonElement\n\ntype ToggleElement = TamaguiButtonElement\n\nconst ToggleFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'button',\n\n variants: {\n unstyled: {\n false: {\n pressTheme: true,\n backgroundColor: '$background',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'flex',\n borderColor: '$borderColor',\n borderWidth: '1px',\n margin: '-1px',\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n active: {\n true: {\n zIndex: 1,\n hoverStyle: {\n backgroundColor: '$background',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n orientation: {\n horizontal: {\n flexDirection: 'row',\n spaceDirection: 'horizontal',\n },\n vertical: {\n flexDirection: 'column',\n spaceDirection: 'vertical',\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\ntype ToggleFrameProps = GetProps<typeof ToggleFrame>\n\ntype ToggleProps = ToggleFrameProps & {\n defaultValue?: string\n disabled?: boolean\n pressed?: boolean\n defaultPressed?: boolean\n onPressedChange?(pressed: boolean): void\n}\n\nconst Toggle = ToggleFrame.extractable(\n React.forwardRef<ToggleElement, ToggleProps>((props, forwardedRef) => {\n const {\n pressed: pressedProp,\n defaultPressed = false,\n onPressedChange,\n ...buttonProps\n } = props\n\n const [pressed = false, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed,\n })\n\n return (\n <Theme forceClassName name={pressed ? 'active' : null}>\n <ToggleFrame\n active={!props.unstyled ? pressed : undefined}\n aria-pressed={pressed}\n data-state={pressed ? 'on' : 'off'}\n data-disabled={props.disabled ? '' : undefined}\n {...buttonProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n if (!props.disabled) {\n setPressed(!pressed)\n }\n })}\n // caught by onPress - no need for this\n // {...(isWeb && {\n // onKeyDown: composeEventHandlers(\n // (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n // (event) => {\n // if ([' ', 'Enter'].includes(event.key)) {\n // if (!props.disabled) {\n // setPressed(!pressed)\n // }\n // }\n // }\n // ),\n // })}\n />\n </Theme>\n )\n })\n)\nToggle.displayName = NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nexport { Toggle, ToggleFrame }\nexport type { ToggleProps }\n"],
5
- "mappings": "AAAA,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAmB,OAAO,sBAA6B,cAAc;AACrE,YAAY,WAAW;AAMvB,MAAM,OAAO;AAMb,MAAM,cAAc,OAAO,gBAAgB;AAAA,EACzC,MAAM;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Y,UAAU,OAAO;AAAA,MAC7B,eAAe,MAAM,WAAW,KAAK;AAAA,UACjC;AAAA,MACJ,KAAK;AAAA,MACL,SAAS,qBAAqB,MAAM,WAAW,QAAW,CAAC,UAAU;AACnE,YAAI,CAAC,MAAM,UAAU;AACnB,qBAAW,CAAC,OAAO;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IAcH,EACF,EA3BC;AAAA,EA6BL,CAAC;AACH;AACA,OAAO,cAAc;",
4
+ "sourcesContent": ["import { ThemeableStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { GetProps, Theme, composeEventHandlers, isWeb, styled } from '@tamagui/web'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle'\n\ntype TamaguiButtonElement = HTMLButtonElement\n\ntype ToggleElement = TamaguiButtonElement\n\nconst ToggleFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'button',\n\n variants: {\n unstyled: {\n false: {\n pressTheme: true,\n backgroundColor: '$background',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'flex',\n borderColor: '$borderColor',\n borderWidth: '1px',\n margin: '-1px',\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n active: {\n true: {\n zIndex: 1,\n hoverStyle: {\n backgroundColor: '$background',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n orientation: {\n horizontal: {\n flexDirection: 'row',\n spaceDirection: 'horizontal',\n },\n vertical: {\n flexDirection: 'column',\n spaceDirection: 'vertical',\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\ntype ToggleFrameProps = GetProps<typeof ToggleFrame>\n\ntype ToggleProps = ToggleFrameProps & {\n defaultValue?: string\n disabled?: boolean\n pressed?: boolean\n defaultPressed?: boolean\n onPressedChange?(pressed: boolean): void\n}\n\nconst Toggle = ToggleFrame.extractable(\n React.forwardRef<ToggleElement, ToggleProps>((props, forwardedRef) => {\n const {\n pressed: pressedProp,\n defaultPressed = false,\n onPressedChange,\n ...buttonProps\n } = props\n\n const [pressed = false, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed,\n })\n\n return (\n <Theme name={pressed ? 'active' : null}>\n <ToggleFrame\n active={!props.unstyled ? pressed : undefined}\n aria-pressed={pressed}\n data-state={pressed ? 'on' : 'off'}\n data-disabled={props.disabled ? '' : undefined}\n {...buttonProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n if (!props.disabled) {\n setPressed(!pressed)\n }\n })}\n // caught by onPress - no need for this\n // {...(isWeb && {\n // onKeyDown: composeEventHandlers(\n // (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n // (event) => {\n // if ([' ', 'Enter'].includes(event.key)) {\n // if (!props.disabled) {\n // setPressed(!pressed)\n // }\n // }\n // }\n // ),\n // })}\n />\n </Theme>\n )\n })\n)\nToggle.displayName = NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nexport { Toggle, ToggleFrame }\nexport type { ToggleProps }\n"],
5
+ "mappings": "AAAA,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAmB,OAAO,sBAA6B,cAAc;AACrE,YAAY,WAAW;AAMvB,MAAM,OAAO;AAMb,MAAM,cAAc,OAAO,gBAAgB;AAAA,EACzC,MAAM;AAAA,EACN,KAAK;AAAA,EAEL,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,iBAAiB;AAAA,QACjB,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,SAAS;AAAA,QACT,aAAa;AAAA,QACb,aAAa;AAAA,QACb,QAAQ;AAAA,QACR,YAAY;AAAA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C;AAAA,EA6BL,CAAC;AACH;AACA,OAAO,cAAc;",
6
6
  "names": []
7
7
  }
@@ -69,7 +69,7 @@ const Toggle = ToggleFrame.extractable(
69
69
  onChange: onPressedChange,
70
70
  defaultProp: defaultPressed
71
71
  });
72
- return <Theme forceClassName name={pressed ? "active" : null}><ToggleFrame
72
+ return <Theme name={pressed ? "active" : null}><ToggleFrame
73
73
  active={!props.unstyled ? pressed : void 0}
74
74
  aria-pressed={pressed}
75
75
  data-state={pressed ? "on" : "off"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Toggle.tsx"],
4
- "sourcesContent": ["import { ThemeableStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { GetProps, Theme, composeEventHandlers, isWeb, styled } from '@tamagui/web'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle'\n\ntype TamaguiButtonElement = HTMLButtonElement\n\ntype ToggleElement = TamaguiButtonElement\n\nconst ToggleFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'button',\n\n variants: {\n unstyled: {\n false: {\n pressTheme: true,\n backgroundColor: '$background',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'flex',\n borderColor: '$borderColor',\n borderWidth: '1px',\n margin: '-1px',\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n active: {\n true: {\n zIndex: 1,\n hoverStyle: {\n backgroundColor: '$background',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n orientation: {\n horizontal: {\n flexDirection: 'row',\n spaceDirection: 'horizontal',\n },\n vertical: {\n flexDirection: 'column',\n spaceDirection: 'vertical',\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\ntype ToggleFrameProps = GetProps<typeof ToggleFrame>\n\ntype ToggleProps = ToggleFrameProps & {\n defaultValue?: string\n disabled?: boolean\n pressed?: boolean\n defaultPressed?: boolean\n onPressedChange?(pressed: boolean): void\n}\n\nconst Toggle = ToggleFrame.extractable(\n React.forwardRef<ToggleElement, ToggleProps>((props, forwardedRef) => {\n const {\n pressed: pressedProp,\n defaultPressed = false,\n onPressedChange,\n ...buttonProps\n } = props\n\n const [pressed = false, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed,\n })\n\n return (\n <Theme forceClassName name={pressed ? 'active' : null}>\n <ToggleFrame\n active={!props.unstyled ? pressed : undefined}\n aria-pressed={pressed}\n data-state={pressed ? 'on' : 'off'}\n data-disabled={props.disabled ? '' : undefined}\n {...buttonProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n if (!props.disabled) {\n setPressed(!pressed)\n }\n })}\n // caught by onPress - no need for this\n // {...(isWeb && {\n // onKeyDown: composeEventHandlers(\n // (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n // (event) => {\n // if ([' ', 'Enter'].includes(event.key)) {\n // if (!props.disabled) {\n // setPressed(!pressed)\n // }\n // }\n // }\n // ),\n // })}\n />\n </Theme>\n )\n })\n)\nToggle.displayName = NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nexport { Toggle, ToggleFrame }\nexport type { ToggleProps }\n"],
5
- "mappings": "AAAA,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAmB,OAAO,sBAA6B,cAAc;AACrE,YAAY,WAAW;AAMvB,MAAM,OAAO;AAMb,MAAM,cAAc,OAAO,gBAAgB;AAAA,EACzC,MAAM;AAAA,EACN,KAAK;AAAA,EAEL,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,iBAAiB;AAAA,QACjB,YAAY;AAAA,Q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UAAU;AACnE,YAAI,CAAC,MAAM,UAAU;AACnB,qBAAW,CAAC,OAAO;AAAA,QACrB;AAAA,MACF,CAAC;AAAA,IAcH,EACF,EA3BC;AAAA,EA6BL,CAAC;AACH;AACA,OAAO,cAAc;",
4
+ "sourcesContent": ["import { ThemeableStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport { GetProps, Theme, composeEventHandlers, isWeb, styled } from '@tamagui/web'\nimport * as React from 'react'\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Toggle'\n\ntype TamaguiButtonElement = HTMLButtonElement\n\ntype ToggleElement = TamaguiButtonElement\n\nconst ToggleFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'button',\n\n variants: {\n unstyled: {\n false: {\n pressTheme: true,\n backgroundColor: '$background',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'flex',\n borderColor: '$borderColor',\n borderWidth: '1px',\n margin: '-1px',\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n },\n pressStyle: {\n backgroundColor: '$backgroundPress',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n active: {\n true: {\n zIndex: 1,\n hoverStyle: {\n backgroundColor: '$background',\n },\n focusStyle: {\n borderColor: '$borderColorPress',\n backgroundColor: '$backgroundPress',\n },\n },\n },\n orientation: {\n horizontal: {\n flexDirection: 'row',\n spaceDirection: 'horizontal',\n },\n vertical: {\n flexDirection: 'column',\n spaceDirection: 'vertical',\n },\n },\n } as const,\n defaultVariants: {\n unstyled: false,\n },\n})\n\ntype ToggleFrameProps = GetProps<typeof ToggleFrame>\n\ntype ToggleProps = ToggleFrameProps & {\n defaultValue?: string\n disabled?: boolean\n pressed?: boolean\n defaultPressed?: boolean\n onPressedChange?(pressed: boolean): void\n}\n\nconst Toggle = ToggleFrame.extractable(\n React.forwardRef<ToggleElement, ToggleProps>((props, forwardedRef) => {\n const {\n pressed: pressedProp,\n defaultPressed = false,\n onPressedChange,\n ...buttonProps\n } = props\n\n const [pressed = false, setPressed] = useControllableState({\n prop: pressedProp,\n onChange: onPressedChange,\n defaultProp: defaultPressed,\n })\n\n return (\n <Theme name={pressed ? 'active' : null}>\n <ToggleFrame\n active={!props.unstyled ? pressed : undefined}\n aria-pressed={pressed}\n data-state={pressed ? 'on' : 'off'}\n data-disabled={props.disabled ? '' : undefined}\n {...buttonProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress ?? undefined, (event) => {\n if (!props.disabled) {\n setPressed(!pressed)\n }\n })}\n // caught by onPress - no need for this\n // {...(isWeb && {\n // onKeyDown: composeEventHandlers(\n // (props as React.HTMLProps<HTMLButtonElement>).onKeyDown,\n // (event) => {\n // if ([' ', 'Enter'].includes(event.key)) {\n // if (!props.disabled) {\n // setPressed(!pressed)\n // }\n // }\n // }\n // ),\n // })}\n />\n </Theme>\n )\n })\n)\nToggle.displayName = NAME\n\n/* ---------------------------------------------------------------------------------------------- */\n\nexport { Toggle, ToggleFrame }\nexport type { ToggleProps }\n"],
5
+ "mappings": "AAAA,SAAS,sBAAsB;AAC/B,SAAS,4BAA4B;AACrC,SAAmB,OAAO,sBAA6B,cAAc;AACrE,YAAY,WAAW;AAMvB,MAAM,OAAO;AAMb,MAAM,cAAc,OAAO,gBAAgB;AAAA,EACzC,MAAM;AAAA,EACN,KAAK;AAAA,EAEL,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,iBAAiB;AAAA,QACjB,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,SAAS;AAAA,QACT,aAAa;AAAA,QACb,aAAa;AAAA,QACb,QAAQ;AAAA,QACR,YAAY;AAAA,UACV,iBAAiB;AAAA,QACnB;AAAA,QACA,YAAY;AAAA,UACV,iBAAiB;AAAA,QACnB;AAAA,QACA,YAAY;AAAA,UACV,aAAa;AAAA,UACb,iBAAiB;AAA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",
3
- "version": "1.14.7",
3
+ "version": "1.14.9",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -31,23 +31,23 @@
31
31
  }
32
32
  },
33
33
  "dependencies": {
34
- "@tamagui/create-context": "1.14.7",
35
- "@tamagui/focusable": "1.14.7",
36
- "@tamagui/font-size": "1.14.7",
37
- "@tamagui/get-size": "1.14.7",
38
- "@tamagui/group": "1.14.7",
39
- "@tamagui/helpers-tamagui": "1.14.7",
40
- "@tamagui/roving-focus": "1.14.7",
41
- "@tamagui/stacks": "1.14.7",
42
- "@tamagui/use-controllable-state": "1.14.7",
43
- "@tamagui/use-direction": "1.14.7",
44
- "@tamagui/web": "1.14.7"
34
+ "@tamagui/create-context": "1.14.9",
35
+ "@tamagui/focusable": "1.14.9",
36
+ "@tamagui/font-size": "1.14.9",
37
+ "@tamagui/get-size": "1.14.9",
38
+ "@tamagui/group": "1.14.9",
39
+ "@tamagui/helpers-tamagui": "1.14.9",
40
+ "@tamagui/roving-focus": "1.14.9",
41
+ "@tamagui/stacks": "1.14.9",
42
+ "@tamagui/use-controllable-state": "1.14.9",
43
+ "@tamagui/use-direction": "1.14.9",
44
+ "@tamagui/web": "1.14.9"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": "*"
48
48
  },
49
49
  "devDependencies": {
50
- "@tamagui/build": "1.14.7",
50
+ "@tamagui/build": "1.14.9",
51
51
  "react": "^18.2.0"
52
52
  },
53
53
  "publishConfig": {
package/src/Toggle.tsx CHANGED
@@ -94,7 +94,7 @@ const Toggle = ToggleFrame.extractable(
94
94
  })
95
95
 
96
96
  return (
97
- <Theme forceClassName name={pressed ? 'active' : null}>
97
+ <Theme name={pressed ? 'active' : null}>
98
98
  <ToggleFrame
99
99
  active={!props.unstyled ? pressed : undefined}
100
100
  aria-pressed={pressed}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../src/Toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,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