{"version":3,"file":"ToggleButtonGroup-Cfo5t0oh.cjs","sources":["../src/components/Button/ButtonGroup.tsx","../src/components/Button/FAB.tsx","../src/components/Button/IconButton.tsx","../../../node_modules/.pnpm/@radix-ui+react-toggle@1.1.18_@types+react-dom@19.2.3_@types+react@19.2.14__@types+reac_fd006ecf7b5e060039a3c99f50bbd8e0/node_modules/@radix-ui/react-toggle/dist/index.mjs","../src/components/Button/ToggleButton.tsx","../../../node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.19_@types+react-dom@19.2.3_@types+react@19.2.14__@type_073f38c6c8221dbe51274765001e90bd/node_modules/@radix-ui/react-toggle-group/dist/index.mjs","../src/components/Button/ToggleButtonGroup.tsx"],"sourcesContent":["'use client';\nimport { forwardRef } from 'react';\nimport type { HTMLAttributes, ReactNode } from 'react';\nimport { withSx } from '../../utils/withSx';\nimport type { SxProp } from '../Layout/sx';\n\nexport type ButtonGroupOrientation = 'horizontal' | 'vertical';\nexport type ButtonGroupLayout = 'attached' | 'spaced';\n\nexport interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {\n  /** Stack direction. Default: `'horizontal'`. */\n  orientation?: ButtonGroupOrientation;\n  /** `'attached'` collapses borders; `'spaced'` leaves a small gap. Default: `'attached'`. */\n  layout?: ButtonGroupLayout;\n  /** Use pill radii on the first/last buttons. */\n  round?: boolean;\n  /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */\n  sx?: SxProp;\n  children: ReactNode;\n}\n\nexport const ButtonGroup = forwardRef<HTMLDivElement, ButtonGroupProps>(function ButtonGroup(\n  { orientation = 'horizontal', layout = 'attached', round = false, className, style, sx, children, ...rest },\n  ref,\n) {\n  const { className: classes, style: mergedStyle, styleTag } = withSx(\n    sx,\n    style,\n    'btn-group',\n    orientation === 'vertical' && 'vertical',\n    layout === 'spaced' && 'spaced',\n    round && 'round',\n    className,\n  );\n  // The responsive-sx <style> rides alongside the group, not inside it, so it never\n  // shifts the `> .btn:first-child` / `:last-child` corner rules.\n  return (\n    <>\n      {styleTag}\n      <div ref={ref} className={classes} style={mergedStyle} role=\"group\" {...rest}>\n        {children}\n      </div>\n    </>\n  );\n});\n","'use client';\nimport { forwardRef } from 'react';\nimport type { ButtonHTMLAttributes, MouseEvent as ReactMouseEvent, ReactNode } from 'react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport { withSx } from '../../utils/withSx';\nimport type { SxProp } from '../Layout/sx';\nimport { Ripples, useRipple } from './Ripple';\nimport type { ButtonColor, ButtonSize, ButtonVariant } from './Button.types';\n\nexport type FABPosition =\n  | 'static'\n  | 'bottom-right'\n  | 'bottom-left'\n  | 'top-right'\n  | 'top-left';\n\ntype FABVariant = Extract<ButtonVariant, 'solid' | 'secondary' | 'soft'>;\n\n// React's animation/drag event handlers collide with motion's own prop types.\ntype MotionIncompatible =\n  | 'onAnimationStart'\n  | 'onAnimationEnd'\n  | 'onAnimationIteration'\n  | 'onTransitionEnd'\n  | 'onDrag'\n  | 'onDragStart'\n  | 'onDragEnd'\n  | 'onDragEnter'\n  | 'onDragLeave'\n  | 'onDragOver'\n  | 'onDragExit'\n  | 'onDrop';\n\ntype BaseFABProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | MotionIncompatible> & {\n  variant?: FABVariant;\n  color?: ButtonColor;\n  size?: Exclude<ButtonSize, 'md'> | 'md';\n  position?: FABPosition;\n  disableRipple?: boolean;\n  /** Icon element. Required. */\n  icon: ReactNode;\n  /** Text label. When provided, FAB becomes the extended pill variant. */\n  label?: ReactNode;\n  /** Control mount. When false, FAB exits with a spring shrink via motion. */\n  open?: boolean;\n  /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */\n  sx?: SxProp;\n};\n\ntype FABWithLabel = BaseFABProps & { label: ReactNode; 'aria-label'?: string };\ntype FABIconOnly = BaseFABProps & { label?: undefined; 'aria-label': string };\n\nexport type FABProps = FABWithLabel | FABIconOnly;\n\n/**\n * Floating Action Button — elevated circular primary action (Material-style).\n * Provide `label` for the extended pill variant.\n *\n * Entrance and exit are animated with `motion`'s spring presets. Pair with\n * `open` + `AnimatePresence` at the call site for conditional FABs that exit\n * gracefully.\n */\nexport const FAB = forwardRef<HTMLButtonElement, FABProps>(function FAB(\n  {\n    variant = 'solid',\n    color = 'primary',\n    size,\n    position = 'static',\n    disableRipple = false,\n    icon,\n    label,\n    open = true,\n    className,\n    style,\n    sx,\n    onClick,\n    disabled,\n    ...rest\n  },\n  ref,\n) {\n  const { ripples, add, remove } = useRipple();\n  const reducedMotion = useReducedMotion();\n\n  const handleClick = (event: ReactMouseEvent<HTMLButtonElement>) => {\n    if (disabled) return;\n    if (!disableRipple) add(event);\n    onClick?.(event);\n  };\n\n  const extended = label !== undefined && label !== null;\n\n  const { className: classes, style: mergedStyle, styleTag } = withSx(\n    sx,\n    style,\n    'btn',\n    variant,\n    color !== 'primary' && color,\n    size === 'sm' || size === 'lg' ? size : null,\n    'fab',\n    extended && 'extended',\n    position !== 'static' && `fixed-${position}`,\n    className,\n  );\n\n  return (\n    <AnimatePresence>\n      {open && (\n        <motion.button\n          ref={ref}\n          type=\"button\"\n          className={classes}\n          style={mergedStyle}\n          onClick={handleClick}\n          disabled={disabled}\n          initial={reducedMotion ? false : { scale: 0, opacity: 0 }}\n          animate={{ scale: 1, opacity: 1 }}\n          exit={reducedMotion ? { opacity: 0 } : { scale: 0, opacity: 0 }}\n          transition={reducedMotion ? { duration: 0 } : { type: 'spring', stiffness: 380, damping: 26, mass: 0.9 }}\n          {...rest}\n        >\n          {styleTag}\n          <span className=\"btn-content\">\n            {icon}\n            {extended && label}\n          </span>\n          {!disableRipple && <Ripples ripples={ripples} onDone={remove} />}\n        </motion.button>\n      )}\n    </AnimatePresence>\n  );\n});\n","'use client';\nimport { forwardRef } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport { Button } from './Button';\nimport type { ButtonProps } from './Button.types';\n\nexport interface IconButtonProps extends Omit<ButtonProps, 'children' | 'icon' | 'iconPosition'> {\n  /** Icon element. Required. */\n  icon: ReactNode;\n  /** Accessible label. Required — icon-only buttons must have one. */\n  'aria-label': string;\n  /**\n   * With `asChild`: the element to render as, e.g. `<Link href=\"/edit\" />`.\n   * The icon is placed inside it.\n   */\n  children?: ReactElement;\n}\n\n/**\n * Convenience over `<Button shape=\"circle\" icon={...} aria-label=\"…\" />`.\n * Enforces `aria-label` at the type level for icon-only accessibility.\n *\n * @example\n *   <IconButton icon={<Pencil size={16} />} aria-label=\"Edit\" asChild>\n *     <Link href={`/workflows/${id}/edit`} />\n *   </IconButton>\n */\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n  { icon, shape = 'circle', variant = 'ghost', ...rest },\n  ref,\n) {\n  return <Button ref={ref} shape={shape} variant={variant} icon={icon} {...rest} />;\n});\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/toggle.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Toggle\";\nvar Toggle = /* @__PURE__ */ React.forwardRef(\n  /* @__PURE__ */ __name(function Toggle2(props, forwardedRef) {\n    const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props;\n    const [pressed, setPressed] = useControllableState({\n      prop: pressedProp,\n      onChange: onPressedChange,\n      defaultProp: defaultPressed ?? false,\n      caller: NAME\n    });\n    return /* @__PURE__ */ jsx(\n      Primitive.button,\n      {\n        type: \"button\",\n        \"aria-pressed\": pressed,\n        \"data-state\": pressed ? \"on\" : \"off\",\n        \"data-disabled\": props.disabled ? \"\" : void 0,\n        ...buttonProps,\n        ref: forwardedRef,\n        onClick: composeEventHandlers(props.onClick, () => {\n          if (!props.disabled) {\n            setPressed(!pressed);\n          }\n        })\n      }\n    );\n  }, \"Toggle\")\n);\nvar Root = Toggle;\nexport {\n  Root,\n  Toggle\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\nimport { forwardRef } from 'react';\nimport type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { Root as RadixToggle } from '@radix-ui/react-toggle';\nimport { withSx } from '../../utils/withSx';\nimport type { SxProp } from '../Layout/sx';\nimport type { ButtonColor, ButtonShape, ButtonSize, ButtonVariant } from './Button.types';\n\n// Control props are declared explicitly (rather than `extends Omit<\n// ComponentPropsWithoutRef<typeof RadixToggle>, 'asChild'>`) so the published\n// .d.ts stays self-contained and does not import `@radix-ui/react-toggle`.\nexport interface ToggleButtonProps extends ComponentPropsWithoutRef<'button'> {\n  /** Controlled pressed state. */\n  pressed?: boolean;\n  /** Uncontrolled initial pressed state. */\n  defaultPressed?: boolean;\n  /** Fires when the pressed state changes. */\n  onPressedChange?: (pressed: boolean) => void;\n  variant?: Extract<ButtonVariant, 'ghost' | 'outline' | 'soft' | 'dashed'>;\n  color?: ButtonColor;\n  size?: ButtonSize;\n  shape?: ButtonShape;\n  icon?: ReactNode;\n  children?: ReactNode;\n  /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */\n  sx?: SxProp;\n}\n\n/**\n * Accessible toggle built on Radix's `Toggle` primitive.\n * Handles `aria-pressed` / `data-state` natively; CSS hooks into both.\n */\nexport const ToggleButton = forwardRef<HTMLButtonElement, ToggleButtonProps>(function ToggleButton(\n  { variant = 'ghost', color = 'primary', size, shape, icon, className, style, sx, children, ...rest },\n  ref,\n) {\n  const { className: classes, style: mergedStyle, styleTag } = withSx(\n    sx,\n    style,\n    'btn',\n    variant,\n    color !== 'primary' && color,\n    size === 'sm' || size === 'lg' ? size : null,\n    shape && shape !== 'default' && shape,\n    className,\n  );\n\n  return (\n    <RadixToggle ref={ref} className={classes} style={mergedStyle} {...rest}>\n      {styleTag}\n      <span className=\"btn-content\">\n        {icon}\n        {children}\n      </span>\n    </RadixToggle>\n  );\n});\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/toggle-group.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Toggle } from \"@radix-ui/react-toggle\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TOGGLE_GROUP_NAME = \"ToggleGroup\";\nvar [createToggleGroupContext, createToggleGroupScope] = createContextScope(TOGGLE_GROUP_NAME, [\n  createRovingFocusGroupScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar ToggleGroup = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function ToggleGroup2(props, forwardedRef) {\n  const { type, ...toggleGroupProps } = props;\n  if (type === \"single\") {\n    const singleProps = toggleGroupProps;\n    return /* @__PURE__ */ jsx(ToggleGroupImplSingle, { role: \"radiogroup\", ...singleProps, ref: forwardedRef });\n  }\n  if (type === \"multiple\") {\n    const multipleProps = toggleGroupProps;\n    return /* @__PURE__ */ jsx(ToggleGroupImplMultiple, { role: \"toolbar\", ...multipleProps, ref: forwardedRef });\n  }\n  throw new Error(`Missing prop \\`type\\` expected on \\`${TOGGLE_GROUP_NAME}\\``);\n}, \"ToggleGroup\"));\nvar [ToggleGroupValueProvider, useToggleGroupValueContext] = createToggleGroupContext(TOGGLE_GROUP_NAME);\nvar ToggleGroupImplSingle = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function ToggleGroupImplSingle2(props, forwardedRef) {\n  const {\n    value: valueProp,\n    defaultValue,\n    onValueChange = /* @__PURE__ */ __name(() => {\n    }, \"onValueChange\"),\n    ...toggleGroupSingleProps\n  } = props;\n  const [value, setValue] = useControllableState({\n    prop: valueProp,\n    defaultProp: defaultValue ?? \"\",\n    onChange: onValueChange,\n    caller: TOGGLE_GROUP_NAME\n  });\n  return /* @__PURE__ */ jsx(\n    ToggleGroupValueProvider,\n    {\n      scope: props.__scopeToggleGroup,\n      type: \"single\",\n      value: React.useMemo(() => value ? [value] : [], [value]),\n      onItemActivate: setValue,\n      onItemDeactivate: React.useCallback(() => setValue(\"\"), [setValue]),\n      children: /* @__PURE__ */ jsx(ToggleGroupImpl, { ...toggleGroupSingleProps, ref: forwardedRef })\n    }\n  );\n}, \"ToggleGroupImplSingle\"));\nvar ToggleGroupImplMultiple = /* @__PURE__ */ React.forwardRef(/* @__PURE__ */ __name(function ToggleGroupImplMultiple2(props, forwardedRef) {\n  const {\n    value: valueProp,\n    defaultValue,\n    onValueChange = /* @__PURE__ */ __name(() => {\n    }, \"onValueChange\"),\n    ...toggleGroupMultipleProps\n  } = props;\n  const [value, setValue] = useControllableState({\n    prop: valueProp,\n    defaultProp: defaultValue ?? [],\n    onChange: onValueChange,\n    caller: TOGGLE_GROUP_NAME\n  });\n  const handleButtonActivate = React.useCallback(\n    (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),\n    [setValue]\n  );\n  const handleButtonDeactivate = React.useCallback(\n    (itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),\n    [setValue]\n  );\n  return /* @__PURE__ */ jsx(\n    ToggleGroupValueProvider,\n    {\n      scope: props.__scopeToggleGroup,\n      type: \"multiple\",\n      value,\n      onItemActivate: handleButtonActivate,\n      onItemDeactivate: handleButtonDeactivate,\n      children: /* @__PURE__ */ jsx(ToggleGroupImpl, { ...toggleGroupMultipleProps, ref: forwardedRef })\n    }\n  );\n}, \"ToggleGroupImplMultiple\"));\nvar [ToggleGroupContext, useToggleGroupContext] = createToggleGroupContext(TOGGLE_GROUP_NAME);\nvar ToggleGroupImpl = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function ToggleGroupImpl2(props, forwardedRef) {\n    const {\n      __scopeToggleGroup,\n      disabled = false,\n      rovingFocus = true,\n      orientation,\n      dir,\n      loop = true,\n      ...toggleGroupProps\n    } = props;\n    const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToggleGroup);\n    const direction = useDirection(dir);\n    const commonProps = { dir: direction, ...toggleGroupProps };\n    return /* @__PURE__ */ jsx(ToggleGroupContext, { scope: __scopeToggleGroup, rovingFocus, disabled, children: rovingFocus ? /* @__PURE__ */ jsx(\n      RovingFocusGroup.Root,\n      {\n        asChild: true,\n        ...rovingFocusGroupScope,\n        orientation,\n        dir: direction,\n        loop,\n        children: /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef })\n      }\n    ) : /* @__PURE__ */ jsx(Primitive.div, { ...commonProps, ref: forwardedRef }) });\n  }, \"ToggleGroupImpl\")\n);\nvar ITEM_NAME = \"ToggleGroupItem\";\nvar ToggleGroupItem = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function ToggleGroupItem2(props, forwardedRef) {\n    const valueContext = useToggleGroupValueContext(ITEM_NAME, props.__scopeToggleGroup);\n    const context = useToggleGroupContext(ITEM_NAME, props.__scopeToggleGroup);\n    const rovingFocusGroupScope = useRovingFocusGroupScope(props.__scopeToggleGroup);\n    const pressed = valueContext.value.includes(props.value);\n    const disabled = context.disabled || props.disabled;\n    const commonProps = { ...props, pressed, disabled };\n    const ref = React.useRef(null);\n    return context.rovingFocus ? /* @__PURE__ */ jsx(\n      RovingFocusGroup.Item,\n      {\n        asChild: true,\n        ...rovingFocusGroupScope,\n        focusable: !disabled,\n        active: pressed,\n        ref,\n        children: /* @__PURE__ */ jsx(ToggleGroupItemImpl, { ...commonProps, ref: forwardedRef })\n      }\n    ) : /* @__PURE__ */ jsx(ToggleGroupItemImpl, { ...commonProps, ref: forwardedRef });\n  }, \"ToggleGroupItem\")\n);\nvar ToggleGroupItemImpl = /* @__PURE__ */ React.forwardRef(\n  // blank line to reduce diff noise\n  /* @__PURE__ */ __name(function ToggleGroupItemImpl2(props, forwardedRef) {\n    const { __scopeToggleGroup, value, ...itemProps } = props;\n    const valueContext = useToggleGroupValueContext(ITEM_NAME, __scopeToggleGroup);\n    const singleProps = { role: \"radio\", \"aria-checked\": props.pressed, \"aria-pressed\": void 0 };\n    const typeProps = valueContext.type === \"single\" ? singleProps : void 0;\n    return /* @__PURE__ */ jsx(\n      Toggle,\n      {\n        ...typeProps,\n        ...itemProps,\n        ref: forwardedRef,\n        onPressedChange: (pressed) => {\n          if (pressed) {\n            valueContext.onItemActivate(value);\n          } else {\n            valueContext.onItemDeactivate(value);\n          }\n        }\n      }\n    );\n  }, \"ToggleGroupItemImpl\")\n);\nexport {\n  ToggleGroupItem as Item,\n  ToggleGroup as Root,\n  ToggleGroup,\n  ToggleGroupItem,\n  createToggleGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\nimport { createContext, forwardRef, useContext } from 'react';\nimport type { ButtonHTMLAttributes, ComponentPropsWithoutRef, HTMLAttributes, ReactNode } from 'react';\nimport type { Direction } from '../../utils/primitiveProps';\nimport {\n  Root as RadixToggleGroup,\n  Item as RadixToggleGroupItem,\n} from '@radix-ui/react-toggle-group';\nimport { withSx } from '../../utils/withSx';\nimport type { SxProp } from '../Layout/sx';\nimport type { ButtonColor, ButtonShape, ButtonSize, ButtonVariant } from './Button.types';\n\n// Props are declared explicitly (rather than deriving from Radix types) so the\n// published .d.ts stays self-contained — see utils/primitiveProps.ts.\ninterface GroupRootBase extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'dir'> {\n  /** Disable every item in the group. */\n  disabled?: boolean;\n  /** Reading direction. */\n  dir?: Direction;\n  /** Layout axis. Default: `horizontal`. */\n  orientation?: 'horizontal' | 'vertical';\n  /** Allow arrow-key navigation to wrap around. Default: true. */\n  loop?: boolean;\n  /** Keep at least one item pressed. */\n  rovingFocus?: boolean;\n}\n\ntype GroupSingle = GroupRootBase & {\n  type?: 'single';\n  /** Controlled pressed value. */\n  value?: string;\n  /** Uncontrolled initial pressed value. */\n  defaultValue?: string;\n  /** Fires when the pressed value changes. */\n  onValueChange?: (value: string) => void;\n};\n\ntype GroupMultiple = GroupRootBase & {\n  type: 'multiple';\n  /** Controlled set of pressed values. */\n  value?: string[];\n  /** Uncontrolled initial set of pressed values. */\n  defaultValue?: string[];\n  /** Fires when the pressed set changes. */\n  onValueChange?: (value: string[]) => void;\n};\n\ntype GroupRootProps = GroupSingle | GroupMultiple;\n\ninterface GroupItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'type'> {\n  /** Value identifying this item within the group. */\n  value: string;\n  /** Disables just this item. */\n  disabled?: boolean;\n}\n\ntype GroupVariant = Extract<ButtonVariant, 'ghost' | 'outline' | 'soft' | 'dashed'>;\n\ninterface GroupContextValue {\n  variant: GroupVariant;\n  color: ButtonColor;\n  size?: ButtonSize;\n}\n\nconst GroupContext = createContext<GroupContextValue>({ variant: 'outline', color: 'primary' });\n\nexport type ToggleButtonGroupProps = GroupRootProps & {\n  variant?: GroupVariant;\n  color?: ButtonColor;\n  size?: ButtonSize;\n  /** `attached` collapses borders, `spaced` leaves a small gap. Default: `attached`. */\n  layout?: 'attached' | 'spaced';\n  /** Pill-shaped ends. */\n  round?: boolean;\n  /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */\n  sx?: SxProp;\n};\n\nexport interface ToggleButtonGroupItemProps extends Omit<GroupItemProps, 'asChild'> {\n  icon?: ReactNode;\n  shape?: ButtonShape;\n  children?: ReactNode;\n  /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */\n  sx?: SxProp;\n}\n\n/**\n * Accessible segmented control / toolbar built on Radix's `ToggleGroup` primitive.\n * Supports single-select (`type=\"single\"`) or multi-select (`type=\"multiple\"`).\n * Items inherit styling via React context; override per-item if needed.\n */\nexport const ToggleButtonGroup = forwardRef<HTMLDivElement, ToggleButtonGroupProps>(\n  function ToggleButtonGroup(\n    {\n      variant = 'outline',\n      color = 'primary',\n      size,\n      layout = 'attached',\n      round = false,\n      className,\n      style,\n      sx,\n      children,\n      ...rest\n    },\n    ref,\n  ) {\n    const { className: classes, style: mergedStyle, styleTag } = withSx(\n      sx,\n      style,\n      'btn-group',\n      layout === 'spaced' && 'spaced',\n      round && 'round',\n      className,\n    );\n    return (\n      <GroupContext.Provider value={{ variant, color, size }}>\n        {/* Responsive sx <style> sits beside the group: as a first child it would break\n            the group's :first-child corner rules (same as ButtonGroup). */}\n        {styleTag}\n        {/* cast is internal: the public props are declared explicitly above, so\n            this never reaches the emitted .d.ts */}\n        <RadixToggleGroup\n          ref={ref}\n          className={classes}\n          style={mergedStyle}\n          {...(rest as ComponentPropsWithoutRef<typeof RadixToggleGroup>)}\n        >\n          {children}\n        </RadixToggleGroup>\n      </GroupContext.Provider>\n    );\n  },\n);\n\n/** Individual toggle item. Styling inherits from `ToggleButtonGroup` via context. */\nexport const ToggleButtonGroupItem = forwardRef<HTMLButtonElement, ToggleButtonGroupItemProps>(\n  function ToggleButtonGroupItem({ icon, shape, className, style, sx, children, ...rest }, ref) {\n    const { variant, color, size } = useContext(GroupContext);\n    const { className: classes, style: mergedStyle, styleTag } = withSx(\n      sx,\n      style,\n      'btn',\n      variant,\n      color !== 'primary' && color,\n      size === 'sm' || size === 'lg' ? size : null,\n      shape && shape !== 'default' && shape,\n      className,\n    );\n    return (\n      <RadixToggleGroupItem ref={ref} className={classes} style={mergedStyle} {...rest}>\n        {styleTag}\n        <span className=\"btn-content\">\n          {icon}\n          {children}\n        </span>\n      </RadixToggleGroupItem>\n    );\n  },\n);\n"],"names":["ButtonGroup","forwardRef","orientation","layout","round","className","style","sx","children","rest","ref","classes","mergedStyle","styleTag","withSx","jsxs","Fragment","jsx","FAB","variant","color","size","position","disableRipple","icon","label","open","onClick","disabled","ripples","add","remove","useRipple","reducedMotion","useReducedMotion","handleClick","event","extended","AnimatePresence","motion","Ripples","IconButton","shape","Button","__defProp","__name","target","value","NAME","Toggle","React","props","forwardedRef","pressedProp","defaultPressed","onPressedChange","buttonProps","pressed","setPressed","useControllableState","Primitive","composeEventHandlers","Root","ToggleButton","RadixToggle","TOGGLE_GROUP_NAME","createToggleGroupContext","createToggleGroupScope","createContextScope","createRovingFocusGroupScope","useRovingFocusGroupScope","ToggleGroup","type","toggleGroupProps","singleProps","ToggleGroupImplSingle","multipleProps","ToggleGroupImplMultiple","ToggleGroupValueProvider","useToggleGroupValueContext","valueProp","defaultValue","onValueChange","toggleGroupSingleProps","setValue","ToggleGroupImpl","toggleGroupMultipleProps","handleButtonActivate","itemValue","prevValue","handleButtonDeactivate","value2","ToggleGroupContext","useToggleGroupContext","__scopeToggleGroup","rovingFocus","dir","loop","rovingFocusGroupScope","direction","useDirection","commonProps","RovingFocusGroup.Root","ITEM_NAME","ToggleGroupItem","valueContext","context","RovingFocusGroup.Item","ToggleGroupItemImpl","itemProps","typeProps","GroupContext","createContext","ToggleButtonGroup","RadixToggleGroup","ToggleButtonGroupItem","useContext","RadixToggleGroupItem"],"mappings":"whBAqBaA,EAAcC,EAAAA,WAA6C,SACtE,CAAE,YAAAC,EAAc,aAAc,OAAAC,EAAS,WAAY,MAAAC,EAAQ,GAAO,UAAAC,EAAW,MAAAC,EAAO,GAAAC,EAAI,SAAAC,EAAU,GAAGC,CAAA,EACrGC,EACA,CACA,KAAM,CAAE,UAAWC,EAAS,MAAOC,EAAa,SAAAC,GAAaC,EAAAA,OAC3DP,EACAD,EACA,YACAJ,IAAgB,YAAc,WAC9BC,IAAW,UAAY,SACvBC,GAAS,QACTC,CAAA,EAIF,OACEU,EAAAA,KAAAC,WAAA,CACG,SAAA,CAAAH,EACDI,EAAAA,IAAC,MAAA,CAAI,IAAAP,EAAU,UAAWC,EAAS,MAAOC,EAAa,KAAK,QAAS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