tfy-web-components 0.0.39 → 0.0.41

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 (94) hide show
  1. package/dist/{Button-jOAqbUsb.js → Button-CHzl5RaT.js} +22 -21
  2. package/dist/Button-CHzl5RaT.js.map +1 -0
  3. package/dist/{Input-CPtcHuvs.js → Input-WdhMjVoF.js} +14 -26
  4. package/dist/{Input-CPtcHuvs.js.map → Input-WdhMjVoF.js.map} +1 -1
  5. package/dist/{Modal-C4MUy9GD.js → Modal-MUzR0rK2.js} +3 -3
  6. package/dist/{Modal-C4MUy9GD.js.map → Modal-MUzR0rK2.js.map} +1 -1
  7. package/dist/{Popover-CobCCoQO.js → Popover-B3yBTSQa.js} +5 -5
  8. package/dist/{Popover-CobCCoQO.js.map → Popover-B3yBTSQa.js.map} +1 -1
  9. package/dist/{Tooltip-CLO2X6GB.js → Tooltip-D5E-qGtP.js} +217 -32
  10. package/dist/{Tooltip-CLO2X6GB.js.map → Tooltip-D5E-qGtP.js.map} +1 -1
  11. package/dist/components/atoms/Accordion.es.js +1 -1
  12. package/dist/components/atoms/Accordion.es.js.map +1 -1
  13. package/dist/components/atoms/AudioPlayer.es.js +4 -4
  14. package/dist/components/atoms/AudioPlayer.es.js.map +1 -1
  15. package/dist/components/atoms/Avatar.es.js +16 -16
  16. package/dist/components/atoms/Avatar.es.js.map +1 -1
  17. package/dist/components/atoms/Badge.es.js +37 -37
  18. package/dist/components/atoms/Badge.es.js.map +1 -1
  19. package/dist/components/atoms/Button.d.ts +2 -0
  20. package/dist/components/atoms/Button.es.js +2 -2
  21. package/dist/components/atoms/ButtonGroup.es.js +6 -6
  22. package/dist/components/atoms/ButtonGroup.es.js.map +1 -1
  23. package/dist/components/atoms/Code.d.ts +5 -0
  24. package/dist/components/atoms/Code.es.js +31 -0
  25. package/dist/components/atoms/Code.es.js.map +1 -0
  26. package/dist/components/atoms/IconButton.es.js +6 -6
  27. package/dist/components/atoms/IconButton.es.js.map +1 -1
  28. package/dist/components/atoms/Logo.es.js +1 -1
  29. package/dist/components/atoms/Logo.es.js.map +1 -1
  30. package/dist/components/atoms/Modal.es.js +1 -1
  31. package/dist/components/atoms/OutlinedRadio.es.js +1 -1
  32. package/dist/components/atoms/OutlinedRadio.es.js.map +1 -1
  33. package/dist/components/atoms/OverflowButton.es.js +4 -4
  34. package/dist/components/atoms/OverflowButton.es.js.map +1 -1
  35. package/dist/components/atoms/Progress.es.js +11 -11
  36. package/dist/components/atoms/Progress.es.js.map +1 -1
  37. package/dist/components/atoms/Skeleton.es.js +1 -8
  38. package/dist/components/atoms/Skeleton.es.js.map +1 -1
  39. package/dist/components/atoms/Spinner.es.js +4 -4
  40. package/dist/components/atoms/Spinner.es.js.map +1 -1
  41. package/dist/components/atoms/Switch.d.ts +10 -2
  42. package/dist/components/atoms/Switch.es.js +39 -16
  43. package/dist/components/atoms/Switch.es.js.map +1 -1
  44. package/dist/components/atoms/TabButton.es.js +2 -2
  45. package/dist/components/atoms/TabButton.es.js.map +1 -1
  46. package/dist/components/atoms/Tag.es.js +1 -1
  47. package/dist/components/atoms/Tag.es.js.map +1 -1
  48. package/dist/components/atoms/Tooltip.d.ts +61 -15
  49. package/dist/components/atoms/Tooltip.es.js +15 -2
  50. package/dist/components/atoms/Tooltip.es.js.map +1 -1
  51. package/dist/components/molecules/Alert.es.js +4 -4
  52. package/dist/components/molecules/Alert.es.js.map +1 -1
  53. package/dist/components/molecules/CopyField.es.js +2 -2
  54. package/dist/components/molecules/CustomDrawer.es.js +5 -5
  55. package/dist/components/molecules/CustomDrawer.es.js.map +1 -1
  56. package/dist/components/molecules/Dialog.es.js +1 -1
  57. package/dist/components/molecules/ImagesPreview.es.js +7 -7
  58. package/dist/components/molecules/ImagesPreview.es.js.map +1 -1
  59. package/dist/components/molecules/Input.es.js +2 -2
  60. package/dist/components/molecules/Markdown.es.js +4 -4
  61. package/dist/components/molecules/Markdown.es.js.map +1 -1
  62. package/dist/components/molecules/Notify.es.js +4 -4
  63. package/dist/components/molecules/Notify.es.js.map +1 -1
  64. package/dist/components/molecules/SimpleCodeEditor.es.js +7 -7
  65. package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
  66. package/dist/components/molecules/ToggleButton.es.js +13 -16
  67. package/dist/components/molecules/ToggleButton.es.js.map +1 -1
  68. package/dist/components/molecules/agent-chat/UserMessage.es.js +1 -1
  69. package/dist/components/molecules/agent-chat/UserMessage.es.js.map +1 -1
  70. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js +2 -2
  71. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js.map +1 -1
  72. package/dist/components/molecules/agent-chat.es.js +9 -9
  73. package/dist/components/molecules/agent-chat.es.js.map +1 -1
  74. package/dist/components/theme/colors.es.js +15 -1
  75. package/dist/components/theme/colors.es.js.map +1 -1
  76. package/dist/index.es.js +1 -1
  77. package/dist/markdown.css +2 -2
  78. package/dist/new-components/atoms/Checkbox.es.js +1 -1
  79. package/dist/new-components/atoms/Checkbox.es.js.map +1 -1
  80. package/dist/new-components/atoms/Chip.es.js +17 -20
  81. package/dist/new-components/atoms/Chip.es.js.map +1 -1
  82. package/dist/new-components/atoms/Popover.es.js +2 -2
  83. package/dist/new-components/atoms/Radio.es.js +2 -2
  84. package/dist/new-components/atoms/Radio.es.js.map +1 -1
  85. package/dist/new-components/atoms/SegmentedControl.es.js +2 -2
  86. package/dist/new-components/atoms/SegmentedControl.es.js.map +1 -1
  87. package/dist/new-components/atoms/Slider.es.js +3 -3
  88. package/dist/new-components/atoms/Slider.es.js.map +1 -1
  89. package/dist/new-components/atoms/Toggletip.es.js +8 -27
  90. package/dist/new-components/atoms/Toggletip.es.js.map +1 -1
  91. package/dist/style.css +1 -1
  92. package/dist/tokens.css +509 -614
  93. package/package.json +3 -2
  94. package/dist/Button-jOAqbUsb.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentedControl.es.js","sources":["../../../node_modules/@base-ui/react/toggle-group/ToggleGroupContext.mjs","../../../node_modules/@base-ui/react/toggle/Toggle.mjs","../../../node_modules/@base-ui/react/toolbar/group/ToolbarGroupContext.mjs","../../../node_modules/@base-ui/react/toggle-group/ToggleGroup.mjs","../../../src/new-components/atoms/SegmentedControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nexport const ToggleGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToggleGroupContext.displayName = \"ToggleGroupContext\";\nexport function useToggleGroupContext() {\n return React.useContext(ToggleGroupContext);\n}","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { error } from '@base-ui/utils/error';\nimport { useBaseUiId } from \"../internals/useBaseUiId.mjs\";\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\nimport { useToggleGroupContext } from \"../toggle-group/ToggleGroupContext.mjs\";\nimport { useButton } from \"../internals/use-button/useButton.mjs\";\nimport { CompositeItem } from \"../internals/composite/item/CompositeItem.mjs\";\nimport { createChangeEventDetails } from \"../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../internals/reasons.mjs\";\n\n/**\n * A two-state button that can be on or off.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Toggle](https://base-ui.com/react/components/toggle)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Toggle = /*#__PURE__*/React.forwardRef(function Toggle(componentProps, forwardedRef) {\n const {\n className,\n defaultPressed = false,\n disabled: disabledProp = false,\n form,\n // never participates in form validation\n onPressedChange,\n pressed: pressedProp,\n render,\n type,\n // cannot change button type\n value: valueProp,\n nativeButton = true,\n style,\n ...elementProps\n } = componentProps;\n\n // `|| undefined` handles cases, where value is falsy (i.e. \"\")\n const value = useBaseUiId(valueProp || undefined);\n const groupContext = useToggleGroupContext();\n const groupValue = groupContext?.value ?? [];\n const disabled = (disabledProp || groupContext?.disabled) ?? false;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (groupContext && valueProp === undefined && groupContext.isValueInitialized) {\n error('A `<Toggle>` component rendered in a `<ToggleGroup>` has no explicit `value` prop.', 'This will cause issues between the Toggle Group and Toggle values.', 'Provide the `<Toggle>` with a `value` prop matching the `<ToggleGroup>` values prop type.');\n }\n }, [groupContext, valueProp, groupContext?.isValueInitialized]);\n }\n const [pressed, setPressedState] = useControlled({\n controlled: groupContext ? value !== undefined && groupValue.indexOf(value) > -1 : pressedProp,\n default: defaultPressed,\n name: 'Toggle',\n state: 'pressed'\n });\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const state = {\n disabled,\n pressed\n };\n const refs = [buttonRef, forwardedRef];\n const props = [{\n 'aria-pressed': pressed,\n onClick(event) {\n const nextPressed = !pressed;\n const details = createChangeEventDetails(REASONS.none, event.nativeEvent);\n\n // `onPressedChange` runs before the group commits so that canceling here\n // can also veto the group value change, which shares this `details` object.\n onPressedChange?.(nextPressed, details);\n if (details.isCanceled) {\n return;\n }\n if (value) {\n groupContext?.setGroupValue?.(value, nextPressed, details);\n }\n if (details.isCanceled) {\n return;\n }\n setPressedState(nextPressed);\n }\n }, elementProps, getButtonProps];\n const element = useRenderElement('button', componentProps, {\n enabled: !groupContext,\n state,\n ref: refs,\n props\n });\n\n // A disabled toggle is natively disabled and cannot hold roving focus.\n // Toolbar reads this metadata to compute its `disabledIndices`.\n const itemMetadata = React.useMemo(() => ({\n disabled,\n focusableWhenDisabled: false\n }), [disabled]);\n if (groupContext) {\n return /*#__PURE__*/_jsx(CompositeItem, {\n tag: \"button\",\n render: render,\n className: className,\n style: style,\n metadata: itemMetadata,\n state: state,\n refs: refs,\n props: props\n });\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") Toggle.displayName = \"Toggle\";","'use client';\n\nimport * as React from 'react';\nexport const ToolbarGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToolbarGroupContext.displayName = \"ToolbarGroupContext\";\nexport function useToolbarGroupContext() {\n return React.useContext(ToolbarGroupContext);\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { EMPTY_ARRAY } from '@base-ui/utils/empty';\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\nimport { CompositeRoot } from \"../internals/composite/root/CompositeRoot.mjs\";\nimport { useToolbarRootContext } from \"../toolbar/root/ToolbarRootContext.mjs\";\nimport { useToolbarGroupContext } from \"../toolbar/group/ToolbarGroupContext.mjs\";\nimport { ToggleGroupContext } from \"./ToggleGroupContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Provides a shared state to a series of toggle buttons.\n *\n * Documentation: [Base UI Toggle Group](https://base-ui.com/react/components/toggle-group)\n */\nexport const ToggleGroup = /*#__PURE__*/React.forwardRef(function ToggleGroup(componentProps, forwardedRef) {\n const {\n defaultValue: defaultValueProp,\n disabled: disabledProp = false,\n loopFocus = true,\n onValueChange,\n orientation = 'horizontal',\n multiple = false,\n value: valueProp,\n className,\n render,\n style,\n ...elementProps\n } = componentProps;\n const toolbarContext = useToolbarRootContext(true);\n const toolbarGroupContext = useToolbarGroupContext();\n const defaultValue = defaultValueProp ?? EMPTY_ARRAY;\n // Use the raw prop to distinguish an omitted value from the empty default.\n const isValueInitialized = valueProp !== undefined || defaultValueProp !== undefined;\n const disabled = (toolbarContext?.disabled ?? false) || (toolbarGroupContext?.disabled ?? false) || disabledProp;\n const [groupValue, setValueState] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'ToggleGroup',\n state: 'value'\n });\n const setGroupValue = useStableCallback((newValue, nextPressed, eventDetails) => {\n let newGroupValue;\n if (multiple) {\n newGroupValue = groupValue.slice();\n if (nextPressed) {\n newGroupValue.push(newValue);\n } else {\n newGroupValue.splice(groupValue.indexOf(newValue), 1);\n }\n } else {\n newGroupValue = nextPressed ? [newValue] : [];\n }\n onValueChange?.(newGroupValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValueState(newGroupValue);\n });\n const state = {\n disabled,\n multiple,\n orientation\n };\n const contextValue = React.useMemo(() => ({\n disabled,\n setGroupValue,\n value: groupValue,\n isValueInitialized\n }), [disabled, setGroupValue, groupValue, isValueInitialized]);\n const defaultProps = {\n role: 'group'\n };\n const element = useRenderElement('div', componentProps, {\n enabled: Boolean(toolbarContext),\n state,\n ref: forwardedRef,\n props: [defaultProps, elementProps]\n });\n return /*#__PURE__*/_jsx(ToggleGroupContext.Provider, {\n value: contextValue,\n children: toolbarContext ? element : /*#__PURE__*/_jsx(CompositeRoot, {\n render: render,\n className: className,\n style: style,\n state: state,\n refs: [forwardedRef],\n props: [defaultProps, elementProps],\n loopFocus: loopFocus,\n enableHomeAndEndKeys: true,\n orientation: orientation\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") ToggleGroup.displayName = \"ToggleGroup\";","import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Toggle } from '@base-ui/react/toggle'\nimport { ToggleGroup } from '@base-ui/react/toggle-group'\n\nimport IconProvider, { type IconProp } from '@/components/atoms/IconProvider'\nimport { cn } from '@/lib/utils'\n\nconst segmentedControlVariants = cva(\n 'inline-flex w-fit items-center gap-space-2 bg-background-surface-raised p-space-4 inset-ring inset-ring-border-subtle',\n {\n variants: {\n size: {\n sm: 'h-7',\n md: 'h-8',\n lg: 'h-9',\n },\n roundness: {\n default: 'rounded-sm',\n pill: 'rounded-pill',\n },\n },\n defaultVariants: { size: 'md', roundness: 'default' },\n },\n)\n\nconst segmentVariants = cva(\n 'inline-flex items-center justify-center gap-space-6 text-text-secondary transition-colors focus-ring focus-visible:outline-offset-4 not-data-pressed:hover:bg-background-fill-ghost-hover data-disabled:pointer-events-none data-disabled:opacity-50',\n {\n variants: {\n size: {\n sm: 'h-5 px-space-8 text-label-sm',\n md: 'h-6 px-space-10 text-label-md',\n lg: 'h-7 px-space-12 text-label-md',\n },\n tone: {\n solid:\n 'data-pressed:bg-segmented-segment-solid-background-selected data-pressed:text-segmented-segment-solid-text-selected',\n tinted:\n 'data-pressed:bg-segmented-segment-tinted-background-selected data-pressed:text-segmented-segment-tinted-text-selected',\n brand:\n 'data-pressed:bg-segmented-segment-brand-background-selected data-pressed:text-segmented-segment-brand-text-selected',\n },\n roundness: {\n default: 'rounded-sm',\n pill: 'rounded-pill',\n },\n },\n defaultVariants: { size: 'md', tone: 'solid', roundness: 'default' },\n },\n)\n\ntype SegmentedControlContextValue = {\n size: NonNullable<VariantProps<typeof segmentedControlVariants>['size']>\n tone: NonNullable<VariantProps<typeof segmentVariants>['tone']>\n roundness: NonNullable<VariantProps<typeof segmentedControlVariants>['roundness']>\n selectOnFocusRef: React.RefObject<boolean>\n selectedValue: string | undefined\n}\n\nconst SegmentedControlContext = React.createContext<SegmentedControlContextValue | null>(null)\n\nexport type SegmentedControlProps = Omit<\n ToggleGroup.Props<string>,\n 'value' | 'defaultValue' | 'onValueChange' | 'multiple'\n> &\n VariantProps<typeof segmentedControlVariants> & {\n tone?: NonNullable<VariantProps<typeof segmentVariants>['tone']>\n value?: string\n defaultValue?: string\n onValueChange?: (value: string, eventDetails: ToggleGroup.ChangeEventDetails) => void\n }\n\nfunction SegmentedControl({\n className,\n size = 'md',\n tone = 'solid',\n roundness = 'default',\n value,\n defaultValue,\n onValueChange,\n children,\n onKeyDownCapture,\n ...props\n}: SegmentedControlProps) {\n const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue)\n const selectedValue = value ?? uncontrolledValue\n const selectOnFocusRef = React.useRef(false)\n const contextValue = React.useMemo(\n () => ({\n size: size ?? 'md',\n tone,\n roundness: roundness ?? 'default',\n selectOnFocusRef,\n selectedValue,\n }),\n [roundness, selectedValue, size, tone],\n )\n\n return (\n <SegmentedControlContext.Provider value={contextValue}>\n <ToggleGroup\n data-slot=\"segmented-control\"\n value={selectedValue == null ? [] : [selectedValue]}\n multiple={false}\n {...props}\n className={cn(segmentedControlVariants({ size, roundness }), className)}\n onValueChange={(nextValue, eventDetails) => {\n if (nextValue[0] == null) {\n eventDetails.cancel()\n return\n }\n if (value === undefined) setUncontrolledValue(nextValue[0])\n onValueChange?.(nextValue[0], eventDetails)\n }}\n onKeyDownCapture={(event) => {\n onKeyDownCapture?.(event)\n if (event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey) return\n\n selectOnFocusRef.current = ['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)\n }}\n >\n {children}\n </ToggleGroup>\n </SegmentedControlContext.Provider>\n )\n}\n\nexport type SegmentedControlItemProps = Omit<Toggle.Props<string>, 'children'> & {\n icon?: IconProp\n children?: React.ReactNode\n}\n\nfunction SegmentedControlItem({\n className,\n icon,\n children,\n 'aria-label': ariaLabel,\n onFocus,\n tabIndex,\n value,\n ...props\n}: SegmentedControlItemProps) {\n const context = React.useContext(SegmentedControlContext)\n if (!context) throw new Error('SegmentedControlItem must be used within SegmentedControl')\n\n return (\n <Toggle\n data-slot=\"segmented-control-item\"\n aria-label={ariaLabel ?? (typeof children === 'string' ? children : undefined)}\n {...props}\n value={value}\n tabIndex={tabIndex ?? (context.selectedValue == null ? undefined : context.selectedValue === value ? 0 : -1)}\n className={cn(segmentVariants(context), className)}\n onFocus={(event) => {\n onFocus?.(event)\n if (!context.selectOnFocusRef.current || event.defaultPrevented) return\n\n context.selectOnFocusRef.current = false\n const item = event.currentTarget\n queueMicrotask(() => {\n if (item.isConnected && item.getAttribute('aria-pressed') !== 'true') item.click()\n })\n }}\n >\n {icon && <IconProvider aria-hidden icon={icon} size={context.size === 'sm' ? 0.75 : 1} />}\n {children != null && <span>{children}</span>}\n </Toggle>\n )\n}\n\nexport { SegmentedControlItem, segmentedControlVariants, segmentVariants }\nexport default SegmentedControl\n"],"names":["Toggle","REASONS.none","_jsx","ToggleGroup","cn"],"mappings":";;;;;;;;;;;;;AAGO,MAAM,qBAAkC,sBA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;AAAA,MACA,UAAU,aAAa,QAAQ,iBAAiB,OAAO,SAAY,QAAQ,kBAAkB,QAAQ,IAAI;AAAA,MACzG,WAAWA,WAAG,gBAAgB,OAAO,GAAG,SAAS;AAAA,MACjD,SAAS,CAAC,UAAU;AAClB,2CAAU;AACV,YAAI,CAAC,QAAQ,iBAAiB,WAAW,MAAM,iBAAkB;AAEjE,gBAAQ,iBAAiB,UAAU;AACnC,cAAM,OAAO,MAAM;AACnB,uBAAe,MAAM;AACnB,cAAI,KAAK,eAAe,KAAK,aAAa,cAAc,MAAM,aAAa,MAAA;AAAA,QAC7E,CAAC;AAAA,MACH;AAAA,MAEC,UAAA;AAAA,QAAA,QAAQ,oBAAC,cAAA,EAAa,eAAW,MAAC,MAAY,MAAM,QAAQ,SAAS,OAAO,OAAO,EAAA,CAAG;AAAA,QACtF,YAAY,QAAQ,oBAAC,QAAA,EAAM,SAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG3C;","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"SegmentedControl.es.js","sources":["../../../node_modules/@base-ui/react/toggle-group/ToggleGroupContext.mjs","../../../node_modules/@base-ui/react/toggle/Toggle.mjs","../../../node_modules/@base-ui/react/toolbar/group/ToolbarGroupContext.mjs","../../../node_modules/@base-ui/react/toggle-group/ToggleGroup.mjs","../../../src/new-components/atoms/SegmentedControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nexport const ToggleGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToggleGroupContext.displayName = \"ToggleGroupContext\";\nexport function useToggleGroupContext() {\n return React.useContext(ToggleGroupContext);\n}","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { error } from '@base-ui/utils/error';\nimport { useBaseUiId } from \"../internals/useBaseUiId.mjs\";\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\nimport { useToggleGroupContext } from \"../toggle-group/ToggleGroupContext.mjs\";\nimport { useButton } from \"../internals/use-button/useButton.mjs\";\nimport { CompositeItem } from \"../internals/composite/item/CompositeItem.mjs\";\nimport { createChangeEventDetails } from \"../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../internals/reasons.mjs\";\n\n/**\n * A two-state button that can be on or off.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Toggle](https://base-ui.com/react/components/toggle)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Toggle = /*#__PURE__*/React.forwardRef(function Toggle(componentProps, forwardedRef) {\n const {\n className,\n defaultPressed = false,\n disabled: disabledProp = false,\n form,\n // never participates in form validation\n onPressedChange,\n pressed: pressedProp,\n render,\n type,\n // cannot change button type\n value: valueProp,\n nativeButton = true,\n style,\n ...elementProps\n } = componentProps;\n\n // `|| undefined` handles cases, where value is falsy (i.e. \"\")\n const value = useBaseUiId(valueProp || undefined);\n const groupContext = useToggleGroupContext();\n const groupValue = groupContext?.value ?? [];\n const disabled = (disabledProp || groupContext?.disabled) ?? false;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (groupContext && valueProp === undefined && groupContext.isValueInitialized) {\n error('A `<Toggle>` component rendered in a `<ToggleGroup>` has no explicit `value` prop.', 'This will cause issues between the Toggle Group and Toggle values.', 'Provide the `<Toggle>` with a `value` prop matching the `<ToggleGroup>` values prop type.');\n }\n }, [groupContext, valueProp, groupContext?.isValueInitialized]);\n }\n const [pressed, setPressedState] = useControlled({\n controlled: groupContext ? value !== undefined && groupValue.indexOf(value) > -1 : pressedProp,\n default: defaultPressed,\n name: 'Toggle',\n state: 'pressed'\n });\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const state = {\n disabled,\n pressed\n };\n const refs = [buttonRef, forwardedRef];\n const props = [{\n 'aria-pressed': pressed,\n onClick(event) {\n const nextPressed = !pressed;\n const details = createChangeEventDetails(REASONS.none, event.nativeEvent);\n\n // `onPressedChange` runs before the group commits so that canceling here\n // can also veto the group value change, which shares this `details` object.\n onPressedChange?.(nextPressed, details);\n if (details.isCanceled) {\n return;\n }\n if (value) {\n groupContext?.setGroupValue?.(value, nextPressed, details);\n }\n if (details.isCanceled) {\n return;\n }\n setPressedState(nextPressed);\n }\n }, elementProps, getButtonProps];\n const element = useRenderElement('button', componentProps, {\n enabled: !groupContext,\n state,\n ref: refs,\n props\n });\n\n // A disabled toggle is natively disabled and cannot hold roving focus.\n // Toolbar reads this metadata to compute its `disabledIndices`.\n const itemMetadata = React.useMemo(() => ({\n disabled,\n focusableWhenDisabled: false\n }), [disabled]);\n if (groupContext) {\n return /*#__PURE__*/_jsx(CompositeItem, {\n tag: \"button\",\n render: render,\n className: className,\n style: style,\n metadata: itemMetadata,\n state: state,\n refs: refs,\n props: props\n });\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") Toggle.displayName = \"Toggle\";","'use client';\n\nimport * as React from 'react';\nexport const ToolbarGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToolbarGroupContext.displayName = \"ToolbarGroupContext\";\nexport function useToolbarGroupContext() {\n return React.useContext(ToolbarGroupContext);\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { EMPTY_ARRAY } from '@base-ui/utils/empty';\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\nimport { CompositeRoot } from \"../internals/composite/root/CompositeRoot.mjs\";\nimport { useToolbarRootContext } from \"../toolbar/root/ToolbarRootContext.mjs\";\nimport { useToolbarGroupContext } from \"../toolbar/group/ToolbarGroupContext.mjs\";\nimport { ToggleGroupContext } from \"./ToggleGroupContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Provides a shared state to a series of toggle buttons.\n *\n * Documentation: [Base UI Toggle Group](https://base-ui.com/react/components/toggle-group)\n */\nexport const ToggleGroup = /*#__PURE__*/React.forwardRef(function ToggleGroup(componentProps, forwardedRef) {\n const {\n defaultValue: defaultValueProp,\n disabled: disabledProp = false,\n loopFocus = true,\n onValueChange,\n orientation = 'horizontal',\n multiple = false,\n value: valueProp,\n className,\n render,\n style,\n ...elementProps\n } = componentProps;\n const toolbarContext = useToolbarRootContext(true);\n const toolbarGroupContext = useToolbarGroupContext();\n const defaultValue = defaultValueProp ?? EMPTY_ARRAY;\n // Use the raw prop to distinguish an omitted value from the empty default.\n const isValueInitialized = valueProp !== undefined || defaultValueProp !== undefined;\n const disabled = (toolbarContext?.disabled ?? false) || (toolbarGroupContext?.disabled ?? false) || disabledProp;\n const [groupValue, setValueState] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'ToggleGroup',\n state: 'value'\n });\n const setGroupValue = useStableCallback((newValue, nextPressed, eventDetails) => {\n let newGroupValue;\n if (multiple) {\n newGroupValue = groupValue.slice();\n if (nextPressed) {\n newGroupValue.push(newValue);\n } else {\n newGroupValue.splice(groupValue.indexOf(newValue), 1);\n }\n } else {\n newGroupValue = nextPressed ? [newValue] : [];\n }\n onValueChange?.(newGroupValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValueState(newGroupValue);\n });\n const state = {\n disabled,\n multiple,\n orientation\n };\n const contextValue = React.useMemo(() => ({\n disabled,\n setGroupValue,\n value: groupValue,\n isValueInitialized\n }), [disabled, setGroupValue, groupValue, isValueInitialized]);\n const defaultProps = {\n role: 'group'\n };\n const element = useRenderElement('div', componentProps, {\n enabled: Boolean(toolbarContext),\n state,\n ref: forwardedRef,\n props: [defaultProps, elementProps]\n });\n return /*#__PURE__*/_jsx(ToggleGroupContext.Provider, {\n value: contextValue,\n children: toolbarContext ? element : /*#__PURE__*/_jsx(CompositeRoot, {\n render: render,\n className: className,\n style: style,\n state: state,\n refs: [forwardedRef],\n props: [defaultProps, elementProps],\n loopFocus: loopFocus,\n enableHomeAndEndKeys: true,\n orientation: orientation\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") ToggleGroup.displayName = \"ToggleGroup\";","import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Toggle } from '@base-ui/react/toggle'\nimport { ToggleGroup } from '@base-ui/react/toggle-group'\n\nimport IconProvider, { type IconProp } from '@/components/atoms/IconProvider'\nimport { cn } from '@/lib/utils'\n\nconst segmentedControlVariants = cva(\n 'inline-flex w-fit items-center gap-space-2 bg-background-raised p-space-4 inset-ring inset-ring-border-subtle',\n {\n variants: {\n size: {\n sm: 'h-7',\n md: 'h-8',\n lg: 'h-9',\n },\n roundness: {\n default: 'rounded-sm',\n pill: 'rounded-pill',\n },\n },\n defaultVariants: { size: 'md', roundness: 'default' },\n },\n)\n\nconst segmentVariants = cva(\n 'inline-flex items-center justify-center gap-space-6 text-text-secondary transition-colors focus-ring focus-visible:outline-offset-4 not-data-pressed:hover:bg-background-ghost-hover data-disabled:pointer-events-none data-disabled:opacity-50',\n {\n variants: {\n size: {\n sm: 'h-5 px-space-8 text-label-sm',\n md: 'h-6 px-space-10 text-label-md',\n lg: 'h-7 px-space-12 text-label-md',\n },\n tone: {\n solid:\n 'data-pressed:bg-segmented-segment-solid-background-selected data-pressed:text-segmented-segment-solid-text-selected',\n tinted:\n 'data-pressed:bg-segmented-segment-tinted-background-selected data-pressed:text-segmented-segment-tinted-text-selected',\n brand:\n 'data-pressed:bg-segmented-segment-brand-background-selected data-pressed:text-segmented-segment-brand-text-selected',\n },\n roundness: {\n default: 'rounded-sm',\n pill: 'rounded-pill',\n },\n },\n defaultVariants: { size: 'md', tone: 'solid', roundness: 'default' },\n },\n)\n\ntype SegmentedControlContextValue = {\n size: NonNullable<VariantProps<typeof segmentedControlVariants>['size']>\n tone: NonNullable<VariantProps<typeof segmentVariants>['tone']>\n roundness: NonNullable<VariantProps<typeof segmentedControlVariants>['roundness']>\n selectOnFocusRef: React.RefObject<boolean>\n selectedValue: string | undefined\n}\n\nconst SegmentedControlContext = React.createContext<SegmentedControlContextValue | null>(null)\n\nexport type SegmentedControlProps = Omit<\n ToggleGroup.Props<string>,\n 'value' | 'defaultValue' | 'onValueChange' | 'multiple'\n> &\n VariantProps<typeof segmentedControlVariants> & {\n tone?: NonNullable<VariantProps<typeof segmentVariants>['tone']>\n value?: string\n defaultValue?: string\n onValueChange?: (value: string, eventDetails: ToggleGroup.ChangeEventDetails) => void\n }\n\nfunction SegmentedControl({\n className,\n size = 'md',\n tone = 'solid',\n roundness = 'default',\n value,\n defaultValue,\n onValueChange,\n children,\n onKeyDownCapture,\n ...props\n}: SegmentedControlProps) {\n const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue)\n const selectedValue = value ?? uncontrolledValue\n const selectOnFocusRef = React.useRef(false)\n const contextValue = React.useMemo(\n () => ({\n size: size ?? 'md',\n tone,\n roundness: roundness ?? 'default',\n selectOnFocusRef,\n selectedValue,\n }),\n [roundness, selectedValue, size, tone],\n )\n\n return (\n <SegmentedControlContext.Provider value={contextValue}>\n <ToggleGroup\n data-slot=\"segmented-control\"\n value={selectedValue == null ? [] : [selectedValue]}\n multiple={false}\n {...props}\n className={cn(segmentedControlVariants({ size, roundness }), className)}\n onValueChange={(nextValue, eventDetails) => {\n if (nextValue[0] == null) {\n eventDetails.cancel()\n return\n }\n if (value === undefined) setUncontrolledValue(nextValue[0])\n onValueChange?.(nextValue[0], eventDetails)\n }}\n onKeyDownCapture={(event) => {\n onKeyDownCapture?.(event)\n if (event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey) return\n\n selectOnFocusRef.current = ['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)\n }}\n >\n {children}\n </ToggleGroup>\n </SegmentedControlContext.Provider>\n )\n}\n\nexport type SegmentedControlItemProps = Omit<Toggle.Props<string>, 'children'> & {\n icon?: IconProp\n children?: React.ReactNode\n}\n\nfunction SegmentedControlItem({\n className,\n icon,\n children,\n 'aria-label': ariaLabel,\n onFocus,\n tabIndex,\n value,\n ...props\n}: SegmentedControlItemProps) {\n const context = React.useContext(SegmentedControlContext)\n if (!context) throw new Error('SegmentedControlItem must be used within SegmentedControl')\n\n return (\n <Toggle\n data-slot=\"segmented-control-item\"\n aria-label={ariaLabel ?? (typeof children === 'string' ? children : undefined)}\n {...props}\n value={value}\n tabIndex={tabIndex ?? (context.selectedValue == null ? undefined : context.selectedValue === value ? 0 : -1)}\n className={cn(segmentVariants(context), className)}\n onFocus={(event) => {\n onFocus?.(event)\n if (!context.selectOnFocusRef.current || event.defaultPrevented) return\n\n context.selectOnFocusRef.current = false\n const item = event.currentTarget\n queueMicrotask(() => {\n if (item.isConnected && item.getAttribute('aria-pressed') !== 'true') item.click()\n })\n }}\n >\n {icon && <IconProvider aria-hidden icon={icon} size={context.size === 'sm' ? 0.75 : 1} />}\n {children != null && <span>{children}</span>}\n </Toggle>\n )\n}\n\nexport { SegmentedControlItem, segmentedControlVariants, segmentVariants }\nexport default SegmentedControl\n"],"names":["Toggle","REASONS.none","_jsx","ToggleGroup","cn"],"mappings":";;;;;;;;;;;;;AAGO,MAAM,qBAAkC,sBAAM,cAAc,MAAS;AAC5E,IAAI,QAAQ,IAAI,aAAa,aAAc,oBAAmB,cAAc;AACrE,SAAS,wBAAwB;AACtC,SAAO,MAAM,WAAW,kBAAkB;AAC5C;ACaO,MAAM,SAAsB,sBAAM,WAAW,SAASA,QAAO,gBAAgB,cAAc;AAChG,QAAM;AAAA,IACJ;AAAA,IACA,iBAAiB;AAAA,IACjB,UAAU,eAAe;AAAA,IACzB;AAAA;AAAA,IAEA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA;AAAA;AAAA,IAEA,OAAO;AAAA,IACP,eAAe;AAAA,IACf;AAAA,IACA,GAAG;AAAA,EACP,IAAM;AAGJ,QAAM,QAAQ,YAAY,aAAa,MAAS;AAChD,QAAM,eAAe,sBAAqB;AAC1C,QAAM,cAAa,6CAAc,UAAS,CAAA;AAC1C,QAAM,YAAY,iBAAgB,6CAA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AA,EAAM,SAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG3C;","x_google_ignoreList":[0,1,2,3]}
@@ -1384,10 +1384,10 @@ function Slider({
1384
1384
  {
1385
1385
  "data-slot": "slider-track",
1386
1386
  className: classNames(
1387
- "relative overflow-hidden rounded-pill bg-background-surface-input",
1387
+ "relative overflow-hidden rounded-pill bg-background-input",
1388
1388
  orientation === "horizontal" ? "h-1 w-full" : "h-full w-1"
1389
1389
  ),
1390
- children: /* @__PURE__ */ jsx(SliderIndicator, { "data-slot": "slider-range", className: "rounded-pill bg-background-fill-brand" })
1390
+ children: /* @__PURE__ */ jsx(SliderIndicator, { "data-slot": "slider-range", className: "rounded-pill bg-background-brand-bold" })
1391
1391
  }
1392
1392
  ),
1393
1393
  Array.from({ length: thumbCount }, (_, index2) => /* @__PURE__ */ jsx(
@@ -1397,7 +1397,7 @@ function Slider({
1397
1397
  "data-slot": "slider-thumb",
1398
1398
  getAriaLabel: () => (thumbLabels == null ? void 0 : thumbLabels[index2]) ?? (thumbCount > 1 ? index2 === 0 ? "Minimum" : "Maximum" : "Value"),
1399
1399
  className: classNames(
1400
- "size-3 rounded-pill border border-border-subtle bg-icon-on-solid shadow-xs outline-none after:absolute after:-inset-1.5 after:rounded-pill after:content-[''] hover:border-border-brand-bold data-dragging:border-border-brand-bold has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-border-focus",
1400
+ "size-3 rounded-pill border border-border-subtle bg-icon-on-bold shadow-xs outline-none after:absolute after:-inset-1.5 after:rounded-pill after:content-[''] hover:border-border-brand-bold data-dragging:border-border-brand-bold has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-border-focus",
1401
1401
  typeof thumbClassName === "function" ? thumbClassName(index2) : thumbClassName
1402
1402
  )
1403
1403
  },