@dxos/react-ui 0.8.4-main.f9ba587 → 0.8.4-main.fd6878d
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.
- package/dist/lib/browser/{chunk-T6YPS45E.mjs → chunk-BKNGMGOK.mjs} +85 -88
- package/dist/lib/browser/chunk-BKNGMGOK.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -2
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +3 -4
- package/dist/lib/browser/testing/index.mjs.map +3 -3
- package/dist/lib/node-esm/{chunk-TYVQJ4KW.mjs → chunk-D2HZS6F4.mjs} +85 -88
- package/dist/lib/node-esm/chunk-D2HZS6F4.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1 -2
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +3 -4
- package/dist/lib/node-esm/testing/index.mjs.map +3 -3
- package/dist/types/src/components/Avatars/Avatar.d.ts +1 -1
- package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/Button.stories.d.ts +1 -1
- package/dist/types/src/components/Buttons/Button.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/IconButton.d.ts +1 -1
- package/dist/types/src/components/Buttons/IconButton.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/IconButton.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/ToggleGroup.d.ts +1 -1
- package/dist/types/src/components/Buttons/ToggleGroup.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts.map +1 -1
- package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
- package/dist/types/src/components/DensityProvider/DensityProvider.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.d.ts +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/Dialog.d.ts +1 -1
- package/dist/types/src/components/Dialogs/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/ElevationProvider/ElevationProvider.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.d.ts +2 -2
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +2 -2
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/List.d.ts +2 -2
- package/dist/types/src/components/Lists/List.d.ts.map +1 -1
- package/dist/types/src/components/Lists/List.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/Tree.d.ts +1 -1
- package/dist/types/src/components/Lists/Tree.d.ts.map +1 -1
- package/dist/types/src/components/Lists/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/Treegrid.d.ts +1 -1
- package/dist/types/src/components/Lists/Treegrid.d.ts.map +1 -1
- package/dist/types/src/components/Lists/Treegrid.stories.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.d.ts +1 -1
- package/dist/types/src/components/Main/Main.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.d.ts +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.d.ts +1 -1
- package/dist/types/src/components/Message/Message.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +1 -1
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.d.ts +1 -1
- package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Custom.stories.d.ts +1 -1
- package/dist/types/src/playground/Custom.stories.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -14
- package/src/components/Avatars/Avatar.stories.tsx +2 -1
- package/src/components/Avatars/Avatar.tsx +3 -3
- package/src/components/Avatars/AvatarGroup.stories.tsx +2 -1
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +2 -1
- package/src/components/Breadcrumb/Breadcrumb.tsx +3 -3
- package/src/components/Buttons/Button.stories.tsx +6 -5
- package/src/components/Buttons/IconButton.stories.tsx +2 -1
- package/src/components/Buttons/IconButton.tsx +2 -1
- package/src/components/Buttons/Toggle.stories.tsx +4 -3
- package/src/components/Buttons/ToggleGroup.stories.tsx +5 -4
- package/src/components/Buttons/ToggleGroup.tsx +3 -3
- package/src/components/Clipboard/ClipboardProvider.tsx +1 -1
- package/src/components/Clipboard/CopyButton.tsx +3 -2
- package/src/components/DensityProvider/DensityProvider.tsx +1 -1
- package/src/components/Dialogs/AlertDialog.stories.tsx +2 -1
- package/src/components/Dialogs/AlertDialog.tsx +13 -13
- package/src/components/Dialogs/Dialog.stories.tsx +2 -1
- package/src/components/Dialogs/Dialog.tsx +13 -13
- package/src/components/ElevationProvider/ElevationProvider.tsx +1 -1
- package/src/components/Input/Input.stories.tsx +5 -4
- package/src/components/Input/Input.tsx +13 -13
- package/src/components/Link/Link.stories.tsx +2 -1
- package/src/components/Lists/List.stories.tsx +9 -8
- package/src/components/Lists/List.tsx +14 -18
- package/src/components/Lists/Tree.stories.tsx +2 -1
- package/src/components/Lists/Tree.tsx +4 -3
- package/src/components/Lists/TreeDropIndicator.tsx +1 -1
- package/src/components/Lists/Treegrid.stories.tsx +2 -1
- package/src/components/Lists/Treegrid.tsx +2 -2
- package/src/components/Main/Main.stories.tsx +2 -1
- package/src/components/Main/Main.tsx +7 -6
- package/src/components/Menus/ContextMenu.stories.tsx +2 -1
- package/src/components/Menus/DropdownMenu.stories.tsx +2 -1
- package/src/components/Menus/DropdownMenu.tsx +8 -8
- package/src/components/Message/Message.stories.tsx +2 -1
- package/src/components/Message/Message.tsx +1 -1
- package/src/components/Popover/Popover.stories.tsx +2 -1
- package/src/components/Popover/Popover.tsx +7 -7
- package/src/components/ScrollArea/ScrollArea.stories.tsx +2 -1
- package/src/components/ScrollArea/ScrollArea.tsx +4 -4
- package/src/components/Select/Select.stories.tsx +2 -1
- package/src/components/Select/Select.tsx +3 -4
- package/src/components/Status/Status.stories.tsx +2 -1
- package/src/components/Tag/Tag.stories.tsx +2 -1
- package/src/components/ThemeProvider/ThemeProvider.tsx +3 -2
- package/src/components/ThemeProvider/TranslationsProvider.tsx +3 -3
- package/src/components/Toast/Toast.stories.tsx +2 -1
- package/src/components/Toast/Toast.tsx +9 -9
- package/src/components/Toolbar/Toolbar.stories.tsx +10 -9
- package/src/components/Toolbar/Toolbar.tsx +2 -2
- package/src/components/Tooltip/Tooltip.stories.tsx +2 -1
- package/src/components/Tooltip/Tooltip.tsx +3 -3
- package/src/hooks/useSafeCollisionPadding.ts +1 -1
- package/src/index.ts +1 -1
- package/src/playground/Controls.stories.tsx +9 -10
- package/src/playground/Custom.stories.tsx +2 -2
- package/src/testing/decorators/withTheme.ts +8 -5
- package/src/util/index.ts +1 -1
- package/dist/lib/browser/chunk-T6YPS45E.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TYVQJ4KW.mjs.map +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/hooks/useDensityContext.ts", "../../../src/components/AnchoredOverflow/AnchoredOverflow.tsx", "../../../src/hooks/useElevationContext.ts", "../../../src/hooks/useThemeContext.ts", "../../../src/hooks/useIconHref.ts", "../../../src/hooks/useSafeArea.ts", "../../../src/hooks/useTranslationsContext.ts", "../../../src/components/ThemeProvider/TranslationsProvider.tsx", "../../../src/hooks/useVisualViewport.ts", "../../../src/components/Avatars/Avatar.tsx", "../../../src/components/Breadcrumb/Breadcrumb.tsx", "../../../src/components/Link/Link.tsx", "../../../src/components/Buttons/Button.tsx", "../../../src/components/Buttons/IconButton.tsx", "../../../src/components/Icon/Icon.tsx", "../../../src/components/Tooltip/Tooltip.tsx", "../../../src/components/Buttons/Toggle.tsx", "../../../src/components/Buttons/ToggleGroup.tsx", "../../../src/components/Clipboard/ClipboardProvider.tsx", "../../../src/components/Clipboard/CopyButton.tsx", "../../../src/components/ThemeProvider/ThemeProvider.tsx", "../../../src/util/hasIosKeyboard.ts", "../../../src/components/DensityProvider/DensityProvider.tsx", "../../../src/components/ElevationProvider/ElevationProvider.tsx", "../../../src/components/Clipboard/index.ts", "../../../src/components/Dialogs/Dialog.tsx", "../../../src/components/Dialogs/AlertDialog.tsx", "../../../src/components/Input/Input.tsx", "../../../src/components/Lists/List.tsx", "../../../src/components/Lists/ListDropIndicator.tsx", "../../../src/components/Lists/Tree.tsx", "../../../src/components/Lists/TreeDropIndicator.tsx", "../../../src/components/Lists/Treegrid.tsx", "../../../src/components/Main/Main.tsx", "../../../src/components/Main/useSwipeToDismiss.ts", "../../../src/components/Menus/ContextMenu.tsx", "../../../src/hooks/useSafeCollisionPadding.ts", "../../../src/components/Menus/DropdownMenu.tsx", "../../../src/components/Message/Message.tsx", "../../../src/components/Popover/Popover.tsx", "../../../src/components/Status/Status.tsx", "../../../src/components/ScrollArea/ScrollArea.tsx", "../../../src/components/Select/Select.tsx", "../../../src/components/Separator/Separator.tsx", "../../../src/components/Tag/Tag.tsx", "../../../src/components/Toast/Toast.tsx", "../../../src/components/Toolbar/Toolbar.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { type Density } from '@dxos/react-ui-types';\n\nimport { DensityContext } from '../components';\n\nexport const useDensityContext = (propsDensity?: Density) => {\n const { density } = useContext(DensityContext);\n return propsDensity ?? density;\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ntype AnchoredOverflowRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n};\n\nconst AnchoredOverflowRoot = forwardRef<HTMLDivElement, AnchoredOverflowRootProps>(\n ({ asChild, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n return (\n <Root\n role='none'\n {...props}\n className={tx('anchoredOverflow.root', 'overflow-anchored', {}, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Root>\n );\n },\n);\n\ntype AnchoredOverflowAnchorProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n};\n\nconst AnchoredOverflowAnchor = forwardRef<HTMLDivElement, AnchoredOverflowAnchorProps>(\n ({ asChild, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n return (\n <Root\n role='none'\n {...props}\n className={tx('anchoredOverflow.anchor', 'overflow-anchor', {}, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Root>\n );\n },\n);\n\nexport const AnchoredOverflow = {\n Root: AnchoredOverflowRoot,\n Anchor: AnchoredOverflowAnchor,\n};\n\nexport type { AnchoredOverflowRootProps, AnchoredOverflowAnchorProps };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { type Elevation } from '@dxos/react-ui-types';\n\nimport { ElevationContext } from '../components';\n\nexport const useElevationContext = (propsElevation?: Elevation) => {\n const { elevation } = useContext(ElevationContext);\n return propsElevation ?? elevation;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\n\nimport { ThemeContext } from '../components';\n\nexport const useThemeContext = () => useContext(ThemeContext) ?? raise(new Error('Missing ThemeContext'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useThemeContext } from './useThemeContext';\n\nconst ICONS_URL = '/icons.svg';\n\nexport const useIconHref = (icon?: string) => {\n const { noCache } = useThemeContext();\n const url = noCache ? `${ICONS_URL}?nocache=${new Date().getMinutes()}` : ICONS_URL;\n return icon ? `${url}#${icon}` : undefined;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback, useState } from 'react';\n\nimport { useResize } from '@dxos/react-hooks';\n\nexport type SafeAreaPadding = Record<'top' | 'right' | 'bottom' | 'left', number>;\n\nexport const initialSafeArea = { top: NaN, right: NaN, bottom: NaN, left: NaN };\n\nexport const useSafeArea = (): SafeAreaPadding => {\n const [padding, setPadding] = useState<SafeAreaPadding>(initialSafeArea);\n const handleResize = useCallback(() => {\n setPadding({\n top: parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--safe-area-top')),\n right: parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--safe-area-right')),\n bottom: parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--safe-area-bottom')),\n left: parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--safe-area-left')),\n });\n }, []);\n useResize(handleResize);\n return padding;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { TranslationsContext } from '../components/ThemeProvider/TranslationsProvider';\n\nexport const useTranslationsContext = () => useContext(TranslationsContext);\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { enUS as dtLocaleEnUs, type Locale } from 'date-fns/locale';\nimport i18Next, { type TFunction, type Resource } from 'i18next';\nimport React, { type ReactNode, useEffect, createContext, useState, Suspense, useContext } from 'react';\nimport { initReactI18next, useTranslation as useI18NextTranslation } from 'react-i18next';\n\nconst initialLng = 'en-US';\nconst initialNs = 'dxos-common';\nconst initialDtLocale = dtLocaleEnUs;\n\n// TODO(thure): `Parameters<TFunction>` causes typechecking issues because `TFunction` has so many signatures.\nexport type Label = string | [string, { ns: string; count?: number; defaultValue?: string }];\n\nexport const isLabel = (o: any): o is Label =>\n typeof o === 'string' ||\n (Array.isArray(o) &&\n o.length === 2 &&\n typeof o[0] === 'string' &&\n !!o[1] &&\n typeof o[1] === 'object' &&\n 'ns' in o[1] &&\n typeof o[1].ns === 'string');\n\nexport const toLocalizedString = (label: Label, t: TFunction) => (Array.isArray(label) ? t(...label) : label);\n\nexport const resources = {\n [initialLng]: {\n [initialNs]: {\n 'loading translations': 'Loading translations…',\n },\n },\n} as const satisfies Resource;\n\nvoid i18Next.use(initReactI18next).init({\n resources,\n lng: initialLng,\n defaultNS: initialNs,\n interpolation: {\n escapeValue: false,\n },\n});\n\nexport interface TranslationsProviderProps {\n children?: ReactNode;\n // TODO(wittjosiah): Rename to `placeholder` to match ClientProvider?\n // Placeholder => loading, fallback => error.\n fallback?: ReactNode;\n resourceExtensions?: Resource[];\n appNs?: string;\n dtLocale?: Locale;\n}\n\nexport const TranslationsContext = createContext({\n appNs: initialNs,\n dtLocale: initialDtLocale,\n});\n\nexport const useTranslation = (...args: Parameters<typeof useI18NextTranslation>) => {\n const result = useI18NextTranslation(...args);\n const { dtLocale } = useContext(TranslationsContext);\n return { ...result, dtLocale };\n};\n\nexport const TranslationsProvider = ({\n fallback,\n resourceExtensions,\n children,\n appNs,\n dtLocale,\n}: TranslationsProviderProps) => {\n const [loaded, setLoaded] = useState(false);\n useEffect(() => {\n setLoaded(false);\n if (resourceExtensions && resourceExtensions.length) {\n resourceExtensions.forEach((resource) => {\n Object.keys(resource).forEach((language) => {\n Object.keys(resource[language]).forEach((ns) => {\n i18Next.addResourceBundle(language, ns, resource[language][ns]);\n });\n });\n });\n }\n\n setLoaded(true);\n }, [resourceExtensions]);\n\n // TODO(thure): This is not ideal, but i18next was causing `Suspense` to not render the fallback even when the child was asking for namespaces yet to be added.\n // TODO(burdon): Fallbacks should only appear after a short delay, and if the displayed then be visible for 500mx to avoid startup flickering.\n return (\n <TranslationsContext.Provider value={{ appNs: appNs ?? initialNs, dtLocale: dtLocale ?? initialDtLocale }}>\n <Suspense fallback={fallback}>{loaded ? children : fallback}</Suspense>\n </TranslationsContext.Provider>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useCallback, type useEffect, useState } from 'react';\n\nimport { useResize } from '@dxos/react-hooks';\n\nexport const useVisualViewport = (deps?: Parameters<typeof useEffect>[1]) => {\n const [width, setWidth] = useState<number | null>(null);\n const [height, setHeight] = useState<number | null>(null);\n\n const handleResize = useCallback(() => {\n if (window.visualViewport) {\n setWidth(window.visualViewport.width);\n setHeight(window.visualViewport.height);\n }\n }, []);\n\n useResize(handleResize);\n\n return { width, height };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport '@dxos/lit-ui/dx-avatar.pcss';\n\nimport { createContext } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentProps, type ComponentPropsWithRef, forwardRef, type PropsWithChildren } from 'react';\n\nimport {\n type AvatarVariant,\n type AvatarStatus,\n type AvatarAnimation,\n type DxAvatar as NaturalDxAvatar,\n} from '@dxos/lit-ui';\nimport { DxAvatar } from '@dxos/lit-ui/react';\nimport { useId } from '@dxos/react-hooks';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useIconHref, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\nexport type AvatarRootProps = PropsWithChildren<Partial<AvatarContextValue>>;\n\ntype AvatarContextValue = {\n labelId: string;\n descriptionId: string;\n};\n\nconst AVATAR_NAME = 'Avatar';\nconst [AvatarProvider, useAvatarContext] = createContext<AvatarContextValue>(AVATAR_NAME);\n\nconst AvatarRoot = ({ children, labelId: propsLabelId, descriptionId: propsDescriptionId }: AvatarRootProps) => {\n const labelId = useId('avatar__label', propsLabelId);\n const descriptionId = useId('avatar__description', propsDescriptionId);\n return <AvatarProvider {...{ labelId, descriptionId }}>{children}</AvatarProvider>;\n};\n\ntype AvatarContentProps = ThemedClassName<Omit<ComponentProps<typeof DxAvatar>, 'children'>>;\n\nconst AvatarContent = forwardRef<NaturalDxAvatar, AvatarContentProps>(\n ({ icon, classNames, ...props }, forwardedRef) => {\n const href = useIconHref(icon);\n const { labelId, descriptionId } = useAvatarContext('AvatarContent');\n return (\n <DxAvatar\n {...props}\n icon={href}\n aria-labelledby={labelId}\n aria-describedby={descriptionId}\n rootClassName={mx(classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype AvatarLabelProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.span>, 'id'>> & {\n asChild?: boolean;\n srOnly?: boolean;\n};\n\nconst AvatarLabel = forwardRef<HTMLSpanElement, AvatarLabelProps>(\n ({ asChild, srOnly, classNames, ...props }, forwardedRef) => {\n const Root = asChild ? Slot : Primitive.span;\n const { tx } = useThemeContext();\n const { labelId } = useAvatarContext('AvatarLabel');\n return (\n <Root\n {...props}\n id={labelId}\n ref={forwardedRef}\n className={tx('avatar.label', 'avatar__label', { srOnly }, classNames)}\n />\n );\n },\n);\n\ntype AvatarDescriptionProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.span>, 'id'>> & {\n asChild?: boolean;\n srOnly?: boolean;\n};\n\nconst AvatarDescription = forwardRef<HTMLSpanElement, AvatarDescriptionProps>(\n ({ asChild, srOnly, classNames, ...props }, forwardedRef) => {\n const Root = asChild ? Slot : Primitive.span;\n const { tx } = useThemeContext();\n const { descriptionId } = useAvatarContext('AvatarDescription');\n return (\n <Root\n {...props}\n id={descriptionId}\n ref={forwardedRef}\n className={tx('avatar.description', 'avatar__description', { srOnly }, classNames)}\n />\n );\n },\n);\n\nexport const Avatar = {\n Root: AvatarRoot,\n Content: AvatarContent,\n Label: AvatarLabel,\n Description: AvatarDescription,\n};\n\nexport { useAvatarContext };\n\nexport type {\n AvatarStatus,\n AvatarVariant,\n AvatarAnimation,\n AvatarContentProps,\n AvatarLabelProps,\n AvatarDescriptionProps,\n NaturalDxAvatar as DxAvatar,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Dot } from '@phosphor-icons/react';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { Link, type LinkProps } from '../Link';\n\ntype BreadcrumbRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n 'aria-label': string;\n asChild?: boolean;\n};\n\nconst BreadcrumbRoot = forwardRef<HTMLDivElement, BreadcrumbRootProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n return (\n <Root\n role='navigation'\n {...props}\n className={tx('breadcrumb.root', 'breadcrumb', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype BreadcrumbListProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.ol>> & { asChild?: boolean };\n\nconst BreadcrumbList = forwardRef<HTMLOListElement, BreadcrumbListProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.ol;\n return (\n <Root\n role='list'\n {...props}\n className={tx('breadcrumb.list', 'breadcrumb__list', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype BreadcrumbListItemProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.li>> & { asChild?: boolean };\n\nconst BreadcrumbListItem = forwardRef<HTMLLIElement, BreadcrumbListItemProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.li;\n return (\n <Root\n role='listitem'\n {...props}\n className={tx('breadcrumb.listItem', 'breadcrumb__list__item', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype BreadcrumbLinkProps = LinkProps;\n\nconst BreadcrumbLink = forwardRef<HTMLAnchorElement, BreadcrumbLinkProps>(({ asChild, ...props }, forwardedRef) => {\n const Root = asChild ? Slot : Link;\n return <Root {...props} ref={forwardedRef} />;\n});\n\ntype BreadcrumbCurrentProps = ThemedClassName<ComponentPropsWithRef<'h1'>> & { asChild?: boolean };\n\nconst BreadcrumbCurrent = forwardRef<HTMLHeadingElement, BreadcrumbCurrentProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : 'h1';\n return (\n <Root\n {...props}\n aria-current='page'\n className={tx('breadcrumb.current', 'breadcrumb__item__heading--current', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype BreadcrumbSeparatorProps = ThemedClassName<ComponentPropsWithoutRef<typeof Primitive.span>>;\n\nconst BreadcrumbSeparator = ({ children, classNames, ...props }: BreadcrumbSeparatorProps) => {\n const { tx } = useThemeContext();\n return (\n <Primitive.span\n role='separator'\n aria-hidden='true'\n {...props}\n className={tx('breadcrumb.separator', 'breadcrumb__separator', {}, classNames)}\n >\n {children ?? <Dot weight='bold' />}\n </Primitive.span>\n );\n};\n\nexport const Breadcrumb = {\n Root: BreadcrumbRoot,\n List: BreadcrumbList,\n ListItem: BreadcrumbListItem,\n Link: BreadcrumbLink,\n Current: BreadcrumbCurrent,\n Separator: BreadcrumbSeparator,\n};\n\nexport type {\n BreadcrumbRootProps,\n BreadcrumbListProps,\n BreadcrumbListItemProps,\n BreadcrumbLinkProps,\n BreadcrumbCurrentProps,\n BreadcrumbSeparatorProps,\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\nexport type LinkProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.a>> &\n Partial<{\n asChild: boolean;\n variant: 'accent' | 'neutral';\n }>;\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n ({ asChild, variant, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.a;\n return <Root {...props} className={tx('link.root', 'link', { variant }, classNames)} ref={forwardedRef} />;\n },\n);\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef, memo } from 'react';\n\nimport { type Density, type Elevation } from '@dxos/react-ui-types';\n\nimport { useDensityContext, useElevationContext, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ninterface ButtonProps extends ThemedClassName<ComponentPropsWithRef<typeof Primitive.button>> {\n variant?: 'default' | 'primary' | 'outline' | 'ghost' | 'destructive';\n density?: Density;\n elevation?: Elevation;\n asChild?: boolean;\n}\n\ntype ButtonGroupContextValue = { inGroup?: boolean };\n\nconst BUTTON_GROUP_NAME = 'ButtonGroup';\nconst BUTTON_NAME = 'Button';\n\nconst [ButtonGroupProvider, useButtonGroupContext] = createContext<ButtonGroupContextValue>(BUTTON_GROUP_NAME, {\n inGroup: false,\n});\n\nconst Button = memo(\n forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n classNames,\n children,\n density: propsDensity,\n elevation: propsElevation,\n variant = 'default',\n asChild,\n ...props\n },\n ref,\n ) => {\n const { inGroup } = useButtonGroupContext(BUTTON_NAME);\n const { tx } = useThemeContext();\n const elevation = useElevationContext(propsElevation);\n const density = useDensityContext(propsDensity);\n const Root = asChild ? Slot : Primitive.button;\n return (\n <Root\n ref={ref}\n {...props}\n data-variant={variant}\n data-density={density}\n data-props={inGroup ? 'grouped' : ''}\n className={tx(\n 'button.root',\n 'button',\n {\n variant,\n inGroup,\n disabled: props.disabled,\n density,\n elevation,\n },\n classNames,\n )}\n {...(props.disabled && { disabled: true })}\n >\n {children}\n </Root>\n );\n },\n ),\n);\n\nButton.displayName = BUTTON_NAME;\n\ntype ButtonGroupProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n elevation?: Elevation;\n asChild?: boolean;\n};\n\nconst ButtonGroup = forwardRef<HTMLDivElement, ButtonGroupProps>(\n ({ children, elevation: propsElevation, classNames, asChild, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const elevation = useElevationContext(propsElevation);\n const Root = asChild ? Slot : Primitive.div;\n return (\n <Root\n role='none'\n {...props}\n className={tx('button.group', 'button-group', { elevation }, classNames)}\n ref={forwardedRef}\n >\n <ButtonGroupProvider inGroup>{children}</ButtonGroupProvider>\n </Root>\n );\n },\n);\n\nButtonGroup.displayName = BUTTON_GROUP_NAME;\n\nexport { Button, ButtonGroup, BUTTON_GROUP_NAME, useButtonGroupContext };\n\nexport type { ButtonProps, ButtonGroupProps };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef } from 'react';\n\nimport { Button, type ButtonProps } from './Button';\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { Icon, type IconProps } from '../Icon';\nimport { Tooltip, type TooltipSide } from '../Tooltip';\n\ntype IconButtonProps = Omit<ButtonProps, 'children'> &\n Pick<IconProps, 'icon' | 'size'> & {\n label: string;\n iconOnly?: boolean;\n noTooltip?: boolean;\n caretDown?: boolean;\n iconClassNames?: ThemedClassName<any>['classNames'];\n tooltipPortal?: boolean;\n tooltipSide?: TooltipSide;\n };\n\nconst IconOnlyButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ noTooltip, tooltipPortal = true, tooltipSide, ...props }, forwardedRef) => {\n if (noTooltip) {\n return <LabelledIconButton {...props} ref={forwardedRef} />;\n }\n return (\n <Tooltip.Trigger asChild content={props.label} side={tooltipSide}>\n <LabelledIconButton {...props} ref={forwardedRef} />\n </Tooltip.Trigger>\n );\n },\n);\n\nconst LabelledIconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ icon, size, iconOnly, label, classNames, iconClassNames, caretDown, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <Button {...props} classNames={tx('iconButton.root', 'iconButton', { iconOnly }, classNames)} ref={forwardedRef}>\n <Icon icon={icon} size={size} classNames={iconClassNames} />\n <span className={iconOnly ? 'sr-only' : undefined}>{label}</span>\n {caretDown && <Icon size={3} icon='ph--caret-down--bold' />}\n </Button>\n );\n },\n);\n\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>((props, forwardedRef) =>\n props.iconOnly ? (\n <IconOnlyButton {...props} ref={forwardedRef} />\n ) : (\n <LabelledIconButton {...props} ref={forwardedRef} />\n ),\n);\n\nexport { IconButton };\n\nexport type { IconButtonProps };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Primitive } from '@radix-ui/react-primitive';\nimport React, { type ComponentPropsWithRef, forwardRef, memo } from 'react';\n\nimport { type Size } from '@dxos/react-ui-types';\n\nimport { useIconHref, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\nexport type IconProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.svg>> & {\n icon: string;\n size?: Size;\n};\n\nexport const Icon = memo(\n forwardRef<SVGSVGElement, IconProps>(({ icon, classNames, size, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const href = useIconHref(icon);\n return (\n <svg {...props} className={tx('icon.root', 'icon', { size }, classNames)} ref={forwardedRef}>\n <use href={href} />\n </svg>\n );\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// This is based upon `@radix-ui/react-tooltip` fetched 17 March 2025 at https://github.com/radix-ui/primitives at commit 6e75e11.\n\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport type { Scope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope, type PopperAnchorProps } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slottable } from '@radix-ui/react-slot';\nimport { type TooltipProps } from '@radix-ui/react-tooltip';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';\nimport React, {\n type ComponentPropsWithoutRef,\n type ElementRef,\n type FC,\n type SyntheticEvent,\n forwardRef,\n type MutableRefObject,\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\n\ntype TooltipScopedProps<P = {}> = P & { __scopeTooltip?: Scope };\nconst [createTooltipContext, createTooltipScope] = createContextScope('Tooltip', [createPopperScope]);\nconst usePopperScope = createPopperScope();\n\n/* -------------------------------------------------------------------------------------------------\n * Tooltip\n * ----------------------------------------------------------------------------------------------- */\n\nconst DEFAULT_DELAY_DURATION = 700;\nconst TOOLTIP_OPEN = 'tooltip.open';\nconst TOOLTIP_NAME = 'Tooltip';\n\ntype TooltipContextValue = {\n contentId: string;\n open: boolean;\n stateAttribute: 'closed' | 'delayed-open' | 'instant-open';\n trigger: TooltipTriggerElement | null;\n onTriggerChange(trigger: TooltipTriggerElement | null): void;\n onTriggerEnter(): void;\n onTriggerLeave(): void;\n onOpen(): void;\n onClose(): void;\n onPointerInTransitChange(inTransit: boolean): void;\n isPointerInTransitRef: MutableRefObject<boolean>;\n disableHoverableContent: boolean;\n};\n\nconst [TooltipContextProvider, useTooltipContext] = createTooltipContext<TooltipContextValue>(TOOLTIP_NAME);\n\ninterface TooltipProviderProps {\n children?: ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /**\n * The duration from when the pointer enters the trigger until the tooltip gets opened. This will\n * override the prop with the same name passed to Provider.\n * @defaultValue 700\n */\n delayDuration?: number;\n /**\n * When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.\n * @defaultValue false\n */\n disableHoverableContent?: boolean;\n /**\n * How much time a user has to enter another trigger without incurring a delay again.\n * @defaultValue 300\n */\n skipDelayDuration?: number;\n}\n\nconst TooltipProvider: FC<TooltipProviderProps> = (props: TooltipScopedProps<TooltipProviderProps>) => {\n const {\n __scopeTooltip,\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n disableHoverableContent = false,\n delayDuration = DEFAULT_DELAY_DURATION,\n skipDelayDuration = 300,\n } = props;\n const isOpenDelayedRef = useRef(true);\n const isPointerInTransitRef = useRef(false);\n const skipDelayTimerRef = useRef(0);\n\n useEffect(() => {\n const skipDelayTimer = skipDelayTimerRef.current;\n return () => window.clearTimeout(skipDelayTimer);\n }, []);\n\n const popperScope = usePopperScope(__scopeTooltip);\n const [trigger, setTrigger] = useState<HTMLButtonElement | null>(null);\n const [content, setContent] = useState<string>('');\n const [side, setSide] = useState<TooltipSide | undefined>(undefined);\n const triggerRef = useRef<HTMLButtonElement | null>(trigger);\n const handleTriggerChange = useCallback((nextTrigger: HTMLButtonElement | null) => {\n setTrigger(nextTrigger);\n triggerRef.current = nextTrigger;\n setContent(nextTrigger?.getAttribute('data-tooltip-content') ?? '');\n setSide((nextTrigger?.getAttribute('data-tooltip-side') as TooltipSide | null) ?? undefined);\n }, []);\n const contentId = useId();\n const openTimerRef = useRef(0);\n const wasOpenDelayedRef = useRef(false);\n const handleOpenChange = useCallback(\n (open: boolean) => {\n if (open) {\n window.clearTimeout(skipDelayTimerRef.current);\n isOpenDelayedRef.current = false;\n // as `onChange` is called within a lifecycle method we\n // avoid dispatching via `dispatchDiscreteCustomEvent`.\n document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));\n } else {\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(() => (isOpenDelayedRef.current = true), skipDelayDuration);\n }\n onOpenChange?.(open);\n },\n [skipDelayDuration, onOpenChange],\n );\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: handleOpenChange,\n });\n const stateAttribute = useMemo(() => {\n return open ? (wasOpenDelayedRef.current ? 'delayed-open' : 'instant-open') : 'closed';\n }, [open]);\n\n const handleOpen = useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n wasOpenDelayedRef.current = false;\n setOpen(true);\n }, [setOpen]);\n\n const handleClose = useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n setOpen(false);\n }, [setOpen]);\n\n const handleDelayedOpen = useCallback(() => {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = window.setTimeout(() => {\n wasOpenDelayedRef.current = true;\n setOpen(true);\n openTimerRef.current = 0;\n }, delayDuration);\n }, [delayDuration, setOpen]);\n\n useEffect(() => {\n return () => {\n if (openTimerRef.current) {\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n };\n }, []);\n\n const { tx } = useThemeContext();\n const elevation = useElevationContext();\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <TooltipContextProvider\n scope={__scopeTooltip}\n contentId={contentId}\n open={open}\n stateAttribute={stateAttribute}\n trigger={trigger}\n onTriggerChange={handleTriggerChange}\n onTriggerEnter={useCallback(() => {\n if (isOpenDelayedRef.current) {\n handleDelayedOpen();\n } else {\n handleOpen();\n }\n }, [isOpenDelayedRef, handleDelayedOpen, handleOpen])}\n onTriggerLeave={useCallback(() => {\n if (disableHoverableContent) {\n handleClose();\n } else {\n // Clear the timer in case the pointer leaves the trigger before the tooltip is opened.\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = 0;\n }\n }, [handleClose, disableHoverableContent])}\n onOpen={handleOpen}\n onClose={handleClose}\n disableHoverableContent={disableHoverableContent}\n isPointerInTransitRef={isPointerInTransitRef}\n onPointerInTransitChange={useCallback((inTransit: boolean) => {\n isPointerInTransitRef.current = inTransit;\n }, [])}\n >\n <TooltipContent side={side} className={tx('tooltip.content', 'tooltip', { elevation })}>\n {content}\n <TooltipArrow className={tx('tooltip.arrow', 'tooltip__arrow')} />\n </TooltipContent>\n <TooltipVirtualTrigger virtualRef={triggerRef} />\n {children}\n </TooltipContextProvider>\n </PopperPrimitive.Root>\n );\n};\n\nTooltipProvider.displayName = TOOLTIP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipVirtualTrigger\n * ----------------------------------------------------------------------------------------------- */\n\nconst TooltipVirtualTrigger = ({\n virtualRef,\n __scopeTooltip,\n}: TooltipScopedProps<Pick<PopperAnchorProps, 'virtualRef'>>) => {\n const popperScope = usePopperScope(__scopeTooltip);\n return <PopperPrimitive.Anchor asChild {...popperScope} virtualRef={virtualRef} />;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipTrigger\n * ----------------------------------------------------------------------------------------------- */\n\nconst TRIGGER_NAME = 'TooltipTrigger';\n\ntype TooltipTriggerElement = ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;\ntype TooltipTriggerProps = PrimitiveButtonProps &\n Pick<TooltipProps, 'delayDuration'> & {\n content?: string;\n side?: TooltipSide;\n onInteract?: (event: SyntheticEvent) => void;\n };\n\nconst TooltipTrigger = forwardRef<TooltipTriggerElement, TooltipTriggerProps>(\n (props: TooltipScopedProps<TooltipTriggerProps>, forwardedRef) => {\n const {\n __scopeTooltip,\n onInteract,\n // TODO(thure): Pass `delayDuration` into the context.\n delayDuration: _delayDuration,\n side,\n content,\n ...triggerProps\n } = props;\n const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);\n const ref = useRef<TooltipTriggerElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = useRef(false);\n const hasPointerMoveOpenedRef = useRef(false);\n const handlePointerUp = useCallback(() => (isPointerDownRef.current = false), []);\n\n useEffect(() => {\n return () => document.removeEventListener('pointerup', handlePointerUp);\n }, [handlePointerUp]);\n\n return (\n <Primitive.button\n // We purposefully avoid adding `type=button` here because tooltip triggers are also\n // commonly anchors and the anchor `type` attribute signifies MIME type.\n aria-describedby={context.open ? context.contentId : undefined}\n data-state={context.stateAttribute}\n data-tooltip-content={content}\n data-tooltip-side={side}\n {...triggerProps}\n ref={composedRefs}\n onPointerMove={composeEventHandlers(props.onPointerMove, (event) => {\n if (event.pointerType === 'touch') {\n return;\n }\n if (!hasPointerMoveOpenedRef.current && !context.isPointerInTransitRef.current) {\n onInteract?.(event);\n if (event.defaultPrevented) {\n return;\n }\n context.onTriggerChange(ref.current);\n context.onTriggerEnter();\n hasPointerMoveOpenedRef.current = true;\n }\n })}\n onPointerLeave={composeEventHandlers(props.onPointerLeave, () => {\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n })}\n onPointerDown={composeEventHandlers(props.onPointerDown, () => {\n if (context.open) {\n context.onClose();\n }\n isPointerDownRef.current = true;\n document.addEventListener('pointerup', handlePointerUp, { once: true });\n })}\n onFocus={props.onFocus}\n onBlur={composeEventHandlers(props.onBlur, context.onClose)}\n onClick={composeEventHandlers(props.onClick, context.onClose)}\n />\n );\n },\n);\n\nTooltipTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipPortal\n * ----------------------------------------------------------------------------------------------- */\n\nconst PORTAL_NAME = 'TooltipPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createTooltipContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface TooltipPortalProps {\n children?: ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst TooltipPortal: FC<TooltipPortalProps> = (props: TooltipScopedProps<TooltipPortalProps>) => {\n const { __scopeTooltip, forceMount, children, container } = props;\n const context = useTooltipContext(PORTAL_NAME, __scopeTooltip);\n return (\n <PortalProvider scope={__scopeTooltip} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {children}\n </PortalPrimitive>\n </Presence>\n </PortalProvider>\n );\n};\n\nTooltipPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipContent\n * ----------------------------------------------------------------------------------------------- */\n\nconst CONTENT_NAME = 'TooltipContent';\n\ntype TooltipContentElement = TooltipContentImplElement;\ninterface TooltipContentProps extends TooltipContentImplProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst TooltipContent = forwardRef<TooltipContentElement, TooltipContentProps>(\n (props: TooltipScopedProps<TooltipContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);\n const { forceMount = portalContext.forceMount, side = 'top', ...contentProps } = props;\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n\n return (\n <Presence present={forceMount || context.open}>\n {context.disableHoverableContent ? (\n <TooltipContentImpl side={side} {...contentProps} ref={forwardedRef} />\n ) : (\n <TooltipContentHoverable side={side} {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n },\n);\n\ntype Point = { x: number; y: number };\ntype Polygon = Point[];\n\ntype TooltipContentHoverableElement = TooltipContentImplElement;\ninterface TooltipContentHoverableProps extends TooltipContentImplProps {}\n\nconst TooltipContentHoverable = forwardRef<TooltipContentHoverableElement, TooltipContentHoverableProps>(\n (props: TooltipScopedProps<TooltipContentHoverableProps>, forwardedRef) => {\n const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);\n const ref = useRef<TooltipContentHoverableElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [pointerGraceArea, setPointerGraceArea] = useState<Polygon | null>(null);\n\n const { trigger, onClose } = context;\n const content = ref.current;\n\n const { onPointerInTransitChange } = context;\n\n const handleRemoveGraceArea = useCallback(() => {\n setPointerGraceArea(null);\n onPointerInTransitChange(false);\n }, [onPointerInTransitChange]);\n\n const handleCreateGraceArea = useCallback(\n (event: PointerEvent, hoverTarget: HTMLElement) => {\n const currentTarget = event.currentTarget as HTMLElement;\n const exitPoint = { x: event.clientX, y: event.clientY };\n const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());\n const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);\n const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());\n const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);\n setPointerGraceArea(graceArea);\n onPointerInTransitChange(true);\n },\n [onPointerInTransitChange],\n );\n\n useEffect(() => {\n return () => handleRemoveGraceArea();\n }, [handleRemoveGraceArea]);\n\n useEffect(() => {\n if (trigger && content) {\n const handleTriggerLeave = (event: PointerEvent) => handleCreateGraceArea(event, content);\n const handleContentLeave = (event: PointerEvent) => handleCreateGraceArea(event, trigger);\n\n trigger.addEventListener('pointerleave', handleTriggerLeave);\n content.addEventListener('pointerleave', handleContentLeave);\n return () => {\n trigger.removeEventListener('pointerleave', handleTriggerLeave);\n content.removeEventListener('pointerleave', handleContentLeave);\n };\n }\n }, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);\n\n useEffect(() => {\n if (pointerGraceArea) {\n const handleTrackPointerGrace = (event: PointerEvent) => {\n const target = event.target as HTMLElement;\n const pointerPosition = { x: event.clientX, y: event.clientY };\n const hasEnteredTarget = trigger?.contains(target) || content?.contains(target);\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea);\n\n if (hasEnteredTarget) {\n handleRemoveGraceArea();\n } else if (isPointerOutsideGraceArea) {\n handleRemoveGraceArea();\n onClose();\n }\n };\n document.addEventListener('pointermove', handleTrackPointerGrace);\n return () => document.removeEventListener('pointermove', handleTrackPointerGrace);\n }\n }, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);\n\n return <TooltipContentImpl {...props} ref={composedRefs} />;\n },\n);\n\nconst [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, {\n isInside: false,\n});\n\ntype TooltipContentImplElement = ElementRef<typeof PopperPrimitive.Content>;\ntype DismissableLayerProps = ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;\ninterface TooltipContentImplProps extends Omit<PopperContentProps, 'onPlaced'> {\n /**\n * A more descriptive label for accessibility purpose\n */\n 'aria-label'?: string;\n\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];\n /**\n * Event handler called when the a `pointerdown` event happens outside of the `Tooltip`.\n * Can be prevented.\n */\n onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];\n}\n\nconst TooltipContentImpl = forwardRef<TooltipContentImplElement, TooltipContentImplProps>(\n (props: TooltipScopedProps<TooltipContentImplProps>, forwardedRef) => {\n const {\n __scopeTooltip,\n children,\n 'aria-label': ariaLabel,\n onEscapeKeyDown,\n onPointerDownOutside,\n ...contentProps\n } = props;\n const context = useTooltipContext(CONTENT_NAME, __scopeTooltip);\n const popperScope = usePopperScope(__scopeTooltip);\n const { onClose } = context;\n\n // Close this tooltip if another one opens\n useEffect(() => {\n document.addEventListener(TOOLTIP_OPEN, onClose);\n return () => document.removeEventListener(TOOLTIP_OPEN, onClose);\n }, [onClose]);\n\n // Close the tooltip if the trigger is scrolled\n useEffect(() => {\n if (context.trigger) {\n const handleScroll = (event: Event) => {\n const target = event.target as HTMLElement;\n if (target?.contains(context.trigger)) {\n onClose();\n }\n };\n window.addEventListener('scroll', handleScroll, { capture: true });\n return () => window.removeEventListener('scroll', handleScroll, { capture: true });\n }\n }, [context.trigger, onClose]);\n\n return (\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={false}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={(event) => event.preventDefault()}\n onDismiss={onClose}\n >\n <PopperPrimitive.Content\n data-state={context.stateAttribute}\n {...popperScope}\n {...contentProps}\n ref={forwardedRef}\n style={{\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-tooltip-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-tooltip-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-tooltip-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-tooltip-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-tooltip-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n >\n <Slottable>{children}</Slottable>\n <VisuallyHiddenContentContextProvider scope={__scopeTooltip} isInside={true}>\n <VisuallyHiddenPrimitive.Root id={context.contentId} role='tooltip'>\n {ariaLabel || children}\n </VisuallyHiddenPrimitive.Root>\n </VisuallyHiddenContentContextProvider>\n </PopperPrimitive.Content>\n </DismissableLayer>\n );\n },\n);\n\nTooltipContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * TooltipArrow\n * ----------------------------------------------------------------------------------------------- */\n\nconst ARROW_NAME = 'TooltipArrow';\n\ntype TooltipArrowElement = ElementRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;\ninterface TooltipArrowProps extends PopperArrowProps {}\n\nconst TooltipArrow = forwardRef<TooltipArrowElement, TooltipArrowProps>(\n (props: TooltipScopedProps<TooltipArrowProps>, forwardedRef) => {\n const { __scopeTooltip, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeTooltip);\n const visuallyHiddenContentContext = useVisuallyHiddenContentContext(ARROW_NAME, __scopeTooltip);\n // if the arrow is inside the `VisuallyHidden`, we don't want to render it all to\n // prevent issues in positioning the arrow due to the duplicate\n return visuallyHiddenContentContext.isInside ? null : (\n <PopperPrimitive.Arrow {...popperScope} {...arrowProps} ref={forwardedRef} />\n );\n },\n);\n\nTooltipArrow.displayName = ARROW_NAME;\n\n/* ----------------------------------------------------------------------------------------------- */\n\ntype TooltipSide = NonNullable<TooltipContentProps['side']>;\n\nconst getExitSideFromRect = (point: Point, rect: DOMRect): TooltipSide => {\n const top = Math.abs(rect.top - point.y);\n const bottom = Math.abs(rect.bottom - point.y);\n const right = Math.abs(rect.right - point.x);\n const left = Math.abs(rect.left - point.x);\n\n switch (Math.min(top, bottom, right, left)) {\n case left:\n return 'left';\n case right:\n return 'right';\n case top:\n return 'top';\n case bottom:\n return 'bottom';\n default:\n throw new Error('unreachable');\n }\n};\n\nconst getPaddedExitPoints = (exitPoint: Point, exitSide: TooltipSide, padding = 5) => {\n const paddedExitPoints: Point[] = [];\n switch (exitSide) {\n case 'top':\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y + padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding },\n );\n break;\n case 'bottom':\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y - padding },\n );\n break;\n case 'left':\n paddedExitPoints.push(\n { x: exitPoint.x + padding, y: exitPoint.y - padding },\n { x: exitPoint.x + padding, y: exitPoint.y + padding },\n );\n break;\n case 'right':\n paddedExitPoints.push(\n { x: exitPoint.x - padding, y: exitPoint.y - padding },\n { x: exitPoint.x - padding, y: exitPoint.y + padding },\n );\n break;\n }\n return paddedExitPoints;\n};\n\nconst getPointsFromRect = (rect: DOMRect) => {\n const { top, right, bottom, left } = rect;\n return [\n { x: left, y: top },\n { x: right, y: top },\n { x: right, y: bottom },\n { x: left, y: bottom },\n ];\n};\n\n// Determine if a point is inside of a polygon.\n// Based on https://github.com/substack/point-in-polygon\nconst isPointInPolygon = (point: Point, polygon: Polygon) => {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].y;\n\n // prettier-ignore\n const intersect = ((yi > y) !== (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n if (intersect) {\n inside = !inside;\n }\n }\n\n return inside;\n};\n\n// Returns a new array of points representing the convex hull of the given set of points.\n// https://www.nayuki.io/page/convex-hull-algorithm\nconst getHull = <P extends Point>(points: Readonly<Array<P>>): Array<P> => {\n const newPoints: Array<P> = points.slice();\n newPoints.sort((a: Point, b: Point) => {\n if (a.x < b.x) {\n return -1;\n } else if (a.x > b.x) {\n return +1;\n } else if (a.y < b.y) {\n return -1;\n } else if (a.y > b.y) {\n return +1;\n } else {\n return 0;\n }\n });\n return getHullPresorted(newPoints);\n};\n\n// Returns the convex hull, assuming that each points[i] <= points[i + 1]. Runs in O(n) time.\nconst getHullPresorted = <P extends Point>(points: Readonly<Array<P>>): Array<P> => {\n if (points.length <= 1) {\n return points.slice();\n }\n\n const upperHull: Array<P> = [];\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n while (upperHull.length >= 2) {\n const q = upperHull[upperHull.length - 1];\n const r = upperHull[upperHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) {\n upperHull.pop();\n } else {\n break;\n }\n }\n upperHull.push(p);\n }\n upperHull.pop();\n\n const lowerHull: Array<P> = [];\n for (let i = points.length - 1; i >= 0; i--) {\n const p = points[i];\n while (lowerHull.length >= 2) {\n const q = lowerHull[lowerHull.length - 1];\n const r = lowerHull[lowerHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) {\n lowerHull.pop();\n } else {\n break;\n }\n }\n lowerHull.push(p);\n }\n lowerHull.pop();\n\n if (\n upperHull.length === 1 &&\n lowerHull.length === 1 &&\n upperHull[0].x === lowerHull[0].x &&\n upperHull[0].y === lowerHull[0].y\n ) {\n return upperHull;\n } else {\n return upperHull.concat(lowerHull);\n }\n};\n\nexport const Tooltip = {\n Provider: TooltipProvider,\n Trigger: TooltipTrigger,\n};\n\nexport { createTooltipScope, useTooltipContext };\n\nexport type { TooltipProviderProps, TooltipTriggerProps, TooltipScopedProps, TooltipSide };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Toggle as TogglePrimitive, type ToggleProps as TogglePrimitiveProps } from '@radix-ui/react-toggle';\nimport React, { forwardRef } from 'react';\n\nimport { Button, type ButtonProps } from './Button';\n\ntype ToggleProps = Omit<TogglePrimitiveProps, 'asChild'> & ButtonProps;\n\nconst Toggle = forwardRef<HTMLButtonElement, ToggleProps>(\n ({ defaultPressed, pressed, onPressedChange, ...props }, forwardedRef) => {\n return (\n <TogglePrimitive {...{ defaultPressed, pressed, onPressedChange }} asChild>\n <Button {...props} ref={forwardedRef} />\n </TogglePrimitive>\n );\n },\n);\n\nexport { Toggle };\nexport type { ToggleProps };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n ToggleGroup as ToggleGroupPrimitive,\n type ToggleGroupSingleProps,\n type ToggleGroupMultipleProps,\n type ToggleGroupItemProps as ToggleGroupItemPrimitiveProps,\n ToggleGroupItem as ToggleGroupItemPrimitive,\n} from '@radix-ui/react-toggle-group';\nimport React, { forwardRef } from 'react';\n\nimport { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps } from './Button';\n\ntype ToggleGroupProps = Omit<ToggleGroupSingleProps, 'className'> | Omit<ToggleGroupMultipleProps, 'className'>;\n\nconst ToggleGroup = forwardRef<HTMLDivElement, ToggleGroupProps & ButtonGroupProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n return (\n <ToggleGroupPrimitive {...props} asChild>\n <ButtonGroup {...{ classNames, children }} ref={forwardedRef} />\n </ToggleGroupPrimitive>\n );\n },\n);\n\ntype ToggleGroupItemProps = Omit<ToggleGroupItemPrimitiveProps, 'className'> & ButtonProps;\n\nconst ToggleGroupItem = forwardRef<HTMLButtonElement, ToggleGroupItemProps>(\n ({ variant, elevation, density, classNames, children, ...props }, forwardedRef) => {\n return (\n <ToggleGroupItemPrimitive {...props} asChild>\n <Button {...{ variant, elevation, density, classNames, children }} ref={forwardedRef} />\n </ToggleGroupItemPrimitive>\n );\n },\n);\n\nexport { ToggleGroup, ToggleGroupItem };\nexport type { ToggleGroupProps, ToggleGroupItemProps };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { createContext, type PropsWithChildren, useCallback, useContext, useState } from 'react';\n\nexport type ClipboardContextValue = {\n textValue: string;\n setTextValue: (nextValue: string) => Promise<void>;\n};\n\nexport const ClipboardContext = createContext<ClipboardContextValue>({\n textValue: '',\n setTextValue: async (_) => {},\n});\n\nexport const useClipboard = () => useContext(ClipboardContext);\n\nexport const ClipboardProvider = ({ children }: PropsWithChildren<{}>) => {\n const [textValue, setInternalTextValue] = useState('');\n const setTextValue = useCallback(async (nextValue: string) => {\n await navigator.clipboard.writeText(nextValue);\n return setInternalTextValue(nextValue);\n }, []);\n return <ClipboardContext.Provider value={{ textValue, setTextValue }}>{children}</ClipboardContext.Provider>;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { useClipboard } from './ClipboardProvider';\nimport { Button, type ButtonProps, IconButton } from '../Buttons';\nimport { Icon, type IconProps } from '../Icon';\nimport { useTranslation } from '../ThemeProvider';\nimport { type TooltipScopedProps, useTooltipContext } from '../Tooltip';\n\nexport type CopyButtonProps = ButtonProps &\n Pick<IconProps, 'size'> & {\n value: string;\n };\n\nconst inactiveLabelStyles = 'invisible bs-px -mbe-px overflow-hidden';\n\nexport const CopyButton = ({ classNames, value, size = 5, ...props }: CopyButtonProps) => {\n const { t } = useTranslation('os');\n const { textValue, setTextValue } = useClipboard();\n const isCopied = textValue === value;\n return (\n <Button\n {...props}\n classNames={['inline-flex flex-col justify-center', classNames]}\n onClick={() => setTextValue(value)}\n data-testid='copy-invitation'\n >\n <div role='none' className={mx('flex gap-1 items-center', isCopied && inactiveLabelStyles)}>\n <span className='pli-1'>{t('copy label')}</span>\n <Icon icon='ph--copy--regular' size={size} />\n </div>\n <div role='none' className={mx('flex gap-1 items-center', !isCopied && inactiveLabelStyles)}>\n <span className='pli-1'>{t('copy success label')}</span>\n <Icon icon='ph--check--regular' size={size} />\n </div>\n </Button>\n );\n};\n\ntype CopyButtonIconOnlyProps = CopyButtonProps & {\n label?: string;\n};\n\nexport const CopyButtonIconOnly = ({\n __scopeTooltip,\n value,\n classNames,\n size,\n variant,\n ...props\n}: TooltipScopedProps<CopyButtonIconOnlyProps>) => {\n const { t } = useTranslation('os');\n const { textValue, setTextValue } = useClipboard();\n const isCopied = textValue === value;\n const label = isCopied ? t('copy success label') : props.label ?? t('copy label');\n const { onOpen } = useTooltipContext('CopyButton', __scopeTooltip);\n return (\n <IconButton\n iconOnly\n label={label!}\n icon='ph--copy--regular'\n size={size}\n variant={variant}\n classNames={['inline-flex flex-col justify-center', classNames]}\n onClick={() => setTextValue(value).then(onOpen)}\n data-testid='copy-invitation'\n />\n );\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { createKeyborg } from 'keyborg';\nimport React, { createContext, type PropsWithChildren, useEffect, useMemo } from 'react';\n\nimport { type Density, type Elevation, type ThemeFunction } from '@dxos/react-ui-types';\n\nimport { TranslationsProvider, type TranslationsProviderProps } from './TranslationsProvider';\nimport { type SafeAreaPadding, useSafeArea } from '../../hooks';\nimport { hasIosKeyboard } from '../../util';\nimport { DensityProvider } from '../DensityProvider';\nimport { ElevationProvider } from '../ElevationProvider';\n\nexport type ThemeMode = 'dark' | 'light';\n\nexport type ThemeContextValue = {\n tx: ThemeFunction<any>;\n themeMode: ThemeMode;\n hasIosKeyboard: boolean;\n safeAreaPadding?: SafeAreaPadding;\n noCache?: boolean;\n};\n\n/**\n * @internal\n */\nexport const ThemeContext = createContext<ThemeContextValue | undefined>(undefined);\n\nexport type ThemeProviderProps = Omit<TranslationsProviderProps, 'children'> &\n Partial<Omit<ThemeContextValue, 'safeAreaPadding'>> &\n PropsWithChildren<{\n rootDensity?: Density;\n rootElevation?: Elevation;\n }>;\n\nexport const ThemeProvider = ({\n children,\n fallback = null,\n resourceExtensions,\n appNs,\n tx = (_path, defaultClassName, _styleProps, ..._options) => defaultClassName,\n themeMode = 'dark',\n rootDensity = 'fine',\n ...rest\n}: ThemeProviderProps) => {\n useEffect(() => {\n if (document.defaultView) {\n const kb = createKeyborg(document.defaultView);\n kb.subscribe(handleInputModalityChange);\n return () => kb.unsubscribe(handleInputModalityChange);\n }\n }, []);\n\n const safeAreaPadding = useSafeArea();\n const contextValue = useMemo(\n () => ({ tx, themeMode, hasIosKeyboard: hasIosKeyboard(), safeAreaPadding, ...rest }),\n [tx, themeMode, safeAreaPadding, rest],\n );\n\n return (\n <ThemeContext.Provider value={contextValue}>\n <TranslationsProvider\n {...{\n fallback,\n resourceExtensions,\n appNs,\n }}\n >\n <ElevationProvider elevation='base'>\n <DensityProvider density={rootDensity}>{children}</DensityProvider>\n </ElevationProvider>\n </TranslationsProvider>\n </ThemeContext.Provider>\n );\n};\n\nconst handleInputModalityChange = (isUsingKeyboard: boolean) => {\n if (isUsingKeyboard) {\n document.body.setAttribute('data-is-keyboard', 'true');\n } else {\n document.body.removeAttribute('data-is-keyboard');\n }\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nexport const hasIosKeyboard = () => {\n // TODO(thure): UA sniffing is never good, however I haven’t found a better way to query for whether the on-screen keyboard will appear on `focus` outside of a click handler.\n return !!navigator.userAgent.match(/iP(ad|od|hone).+Safari/);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { createContext, type PropsWithChildren } from 'react';\n\nimport { type Density } from '@dxos/react-ui-types';\n\nexport interface DensityContextValue {\n density?: Density;\n}\n\nexport type DensityProviderProps = PropsWithChildren<{\n density?: Density;\n}>;\n\nexport const DensityContext = createContext<DensityContextValue>({ density: 'fine' });\n\nexport const DensityProvider = ({ density, children }: DensityProviderProps) => (\n <DensityContext.Provider value={{ density }}>{children}</DensityContext.Provider>\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { createContext, type PropsWithChildren } from 'react';\n\nimport { type Elevation } from '@dxos/react-ui-types';\n\nexport interface ElevationContextValue {\n elevation?: Elevation;\n}\n\nexport type ElevationProviderProps = PropsWithChildren<{\n elevation?: Elevation;\n}>;\n\nexport const ElevationContext = createContext<ElevationContextValue>({ elevation: 'base' });\n\nexport const ElevationProvider = ({ elevation, children }: ElevationProviderProps) => (\n <ElevationContext.Provider value={{ elevation }}>{children}</ElevationContext.Provider>\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ClipboardProvider } from './ClipboardProvider';\nimport { CopyButton, CopyButtonIconOnly } from './CopyButton';\n\nexport const Clipboard = {\n Button: CopyButton,\n IconButton: CopyButtonIconOnly,\n Provider: ClipboardProvider,\n};\n\nexport { useClipboard } from './ClipboardProvider';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport {\n type DialogProps as DialogRootPrimitiveProps,\n Root as DialogRootPrimitive,\n DialogTrigger as DialogTriggerPrimitive,\n type DialogTriggerProps as DialogTriggerPrimitiveProps,\n DialogPortal as DialogPortalPrimitive,\n type DialogPortalProps as DialogPortalPrimitiveProps,\n DialogOverlay as DialogOverlayPrimitive,\n type DialogOverlayProps as DialogOverlayPrimitiveProps,\n DialogTitle as DialogTitlePrimitive,\n type DialogTitleProps as DialogTitlePrimitiveProps,\n DialogDescription as DialogDescriptionPrimitive,\n type DialogDescriptionProps as DialogDescriptionPrimitiveProps,\n DialogClose as DialogClosePrimitive,\n type DialogCloseProps as DialogClosePrimitiveProps,\n DialogContent as DialogContentPrimitive,\n type DialogContentProps as DialogContentPrimitiveProps,\n} from '@radix-ui/react-dialog';\nimport React, { forwardRef, type ForwardRefExoticComponent, type FunctionComponent } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { ElevationProvider } from '../ElevationProvider';\n\ntype DialogRootProps = DialogRootPrimitiveProps;\n\nconst DialogRoot: FunctionComponent<DialogRootProps> = (props) => (\n <ElevationProvider elevation='dialog'>\n <DialogRootPrimitive {...props} />\n </ElevationProvider>\n);\n\ntype DialogTriggerProps = DialogTriggerPrimitiveProps;\n\nconst DialogTrigger: FunctionComponent<DialogTriggerProps> = DialogTriggerPrimitive;\n\ntype DialogPortalProps = DialogPortalPrimitiveProps;\n\nconst DialogPortal: FunctionComponent<DialogPortalProps> = DialogPortalPrimitive;\n\ntype DialogTitleProps = ThemedClassName<DialogTitlePrimitiveProps> & { srOnly?: boolean };\n\nconst DialogTitle: ForwardRefExoticComponent<DialogTitleProps> = forwardRef<HTMLHeadingElement, DialogTitleProps>(\n ({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DialogTitlePrimitive\n {...props}\n className={tx('dialog.title', 'dialog__title', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype DialogDescriptionProps = ThemedClassName<DialogDescriptionPrimitiveProps> & { srOnly?: boolean };\n\nconst DialogDescription: ForwardRefExoticComponent<DialogTitleProps> = forwardRef<\n HTMLParagraphElement,\n DialogDescriptionProps\n>(({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DialogDescriptionPrimitive\n {...props}\n className={tx('dialog.description', 'dialog__description', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\ntype DialogCloseProps = DialogClosePrimitiveProps;\n\nconst DialogClose: FunctionComponent<DialogCloseProps> = DialogClosePrimitive;\n\ntype OverlayLayoutContextValue = { inOverlayLayout?: boolean };\nconst DIALOG_OVERLAY_NAME = 'DialogOverlay';\nconst DIALOG_CONTENT_NAME = 'DialogContent';\nconst [OverlayLayoutProvider, useOverlayLayoutContext] = createContext<OverlayLayoutContextValue>(\n DIALOG_OVERLAY_NAME,\n {},\n);\n\ntype DialogOverlayProps = ThemedClassName<DialogOverlayPrimitiveProps & { blockAlign?: 'center' | 'start' | 'end' }>;\n\nconst DialogOverlay: ForwardRefExoticComponent<DialogOverlayProps> = forwardRef<HTMLDivElement, DialogOverlayProps>(\n ({ classNames, children, blockAlign, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n\n return (\n <DialogOverlayPrimitive\n {...props}\n className={tx('dialog.overlay', 'dialog__overlay', {}, classNames)}\n ref={forwardedRef}\n data-block-align={blockAlign}\n >\n <OverlayLayoutProvider inOverlayLayout>{children}</OverlayLayoutProvider>\n </DialogOverlayPrimitive>\n );\n },\n);\n\nDialogOverlay.displayName = DIALOG_OVERLAY_NAME;\n\ntype DialogContentProps = ThemedClassName<DialogContentPrimitiveProps> & { inOverlayLayout?: boolean };\n\nconst DialogContent: ForwardRefExoticComponent<DialogContentProps> = forwardRef<HTMLDivElement, DialogContentProps>(\n ({ classNames, children, inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);\n\n return (\n <DialogContentPrimitive\n // NOTE: Radix warning unless set to undefined.\n // https://www.radix-ui.com/primitives/docs/components/dialog#description\n aria-describedby={undefined}\n {...props}\n className={tx(\n 'dialog.content',\n 'dialog',\n { inOverlayLayout: propsInOverlayLayout || inOverlayLayout },\n classNames,\n )}\n ref={forwardedRef}\n >\n {children}\n </DialogContentPrimitive>\n );\n },\n);\n\nDialogContent.displayName = DIALOG_CONTENT_NAME;\n\nexport const Dialog = {\n Root: DialogRoot,\n Trigger: DialogTrigger,\n Portal: DialogPortal,\n Overlay: DialogOverlay,\n Content: DialogContent,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n};\n\nexport type {\n DialogRootProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n type AlertDialogProps as AlertDialogRootPrimitiveProps,\n Root as AlertDialogRootPrimitive,\n AlertDialogTrigger as AlertDialogTriggerPrimitive,\n type AlertDialogTriggerProps as AlertDialogTriggerPrimitiveProps,\n AlertDialogPortal as AlertDialogPortalPrimitive,\n type AlertDialogPortalProps as AlertDialogPortalPrimitiveProps,\n AlertDialogOverlay as AlertDialogOverlayPrimitive,\n type AlertDialogOverlayProps as AlertDialogOverlayPrimitiveProps,\n AlertDialogTitle as AlertDialogTitlePrimitive,\n type AlertDialogTitleProps as AlertDialogTitlePrimitiveProps,\n AlertDialogDescription as AlertDialogDescriptionPrimitive,\n type AlertDialogDescriptionProps as AlertDialogDescriptionPrimitiveProps,\n AlertDialogAction as AlertDialogActionPrimitive,\n type AlertDialogActionProps as AlertDialogActionPrimitiveProps,\n AlertDialogCancel as AlertDialogCancelPrimitive,\n type AlertDialogCancelProps as AlertDialogCancelPrimitiveProps,\n AlertDialogContent as AlertDialogContentPrimitive,\n type AlertDialogContentProps as AlertDialogContentPrimitiveProps,\n} from '@radix-ui/react-alert-dialog';\nimport { createContext } from '@radix-ui/react-context';\nimport React, { forwardRef, type ForwardRefExoticComponent, type FunctionComponent } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { ElevationProvider } from '../ElevationProvider';\n\ntype AlertDialogRootProps = AlertDialogRootPrimitiveProps;\n\nconst AlertDialogRoot: FunctionComponent<AlertDialogRootProps> = (props) => (\n <ElevationProvider elevation='dialog'>\n <AlertDialogRootPrimitive {...props} />\n </ElevationProvider>\n);\n\ntype AlertDialogTriggerProps = AlertDialogTriggerPrimitiveProps;\n\nconst AlertDialogTrigger: FunctionComponent<AlertDialogTriggerProps> = AlertDialogTriggerPrimitive;\n\ntype AlertDialogPortalProps = AlertDialogPortalPrimitiveProps;\n\nconst AlertDialogPortal: FunctionComponent<AlertDialogPortalProps> = AlertDialogPortalPrimitive;\n\ntype AlertDialogCancelProps = AlertDialogCancelPrimitiveProps;\n\nconst AlertDialogCancel: FunctionComponent<AlertDialogCancelProps> = AlertDialogCancelPrimitive;\n\ntype AlertDialogActionProps = AlertDialogActionPrimitiveProps;\n\nconst AlertDialogAction: FunctionComponent<AlertDialogActionProps> = AlertDialogActionPrimitive;\n\ntype AlertDialogTitleProps = ThemedClassName<AlertDialogTitlePrimitiveProps> & { srOnly?: boolean };\n\nconst AlertDialogTitle: ForwardRefExoticComponent<AlertDialogTitleProps> = forwardRef<\n HTMLHeadingElement,\n AlertDialogTitleProps\n>(({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <AlertDialogTitlePrimitive\n {...props}\n className={tx('dialog.title', 'dialog--alert__title', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\ntype AlertDialogDescriptionProps = ThemedClassName<AlertDialogDescriptionPrimitiveProps> & { srOnly?: boolean };\n\nconst AlertDialogDescription: ForwardRefExoticComponent<AlertDialogTitleProps> = forwardRef<\n HTMLParagraphElement,\n AlertDialogDescriptionProps\n>(({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <AlertDialogDescriptionPrimitive\n {...props}\n className={tx('dialog.description', 'dialog--alert__description', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\ntype OverlayLayoutContextValue = { inOverlayLayout?: boolean };\nconst ALERT_DIALOG_OVERLAY_NAME = 'AlertDialogOverlay';\nconst ALERT_DIALOG_CONTENT_NAME = 'AlertDialogContent';\nconst [OverlayLayoutProvider, useOverlayLayoutContext] = createContext<OverlayLayoutContextValue>(\n ALERT_DIALOG_OVERLAY_NAME,\n {\n inOverlayLayout: false,\n },\n);\n\ntype AlertDialogOverlayProps = ThemedClassName<AlertDialogOverlayPrimitiveProps> & {\n blockAlign?: 'center' | 'start' | 'end';\n};\n\nconst AlertDialogOverlay: ForwardRefExoticComponent<AlertDialogOverlayProps> = forwardRef<\n HTMLDivElement,\n AlertDialogOverlayProps\n>(({ classNames, children, blockAlign, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <AlertDialogOverlayPrimitive\n {...props}\n className={tx(\n 'dialog.overlay',\n 'dialog--alert__overlay',\n {},\n classNames,\n 'data-[block-align=start]:justify-center',\n 'data-[block-align=start]:items-start',\n 'data-[block-align=center]:place-content-center',\n )}\n ref={forwardedRef}\n data-block-align={blockAlign}\n >\n <OverlayLayoutProvider inOverlayLayout>{children}</OverlayLayoutProvider>\n </AlertDialogOverlayPrimitive>\n );\n});\n\nAlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;\n\ntype AlertDialogContentProps = ThemedClassName<AlertDialogContentPrimitiveProps>;\n\nconst AlertDialogContent: ForwardRefExoticComponent<AlertDialogContentProps> = forwardRef<\n HTMLDivElement,\n AlertDialogContentProps\n>(({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { inOverlayLayout } = useOverlayLayoutContext(ALERT_DIALOG_CONTENT_NAME);\n return (\n <AlertDialogContentPrimitive\n {...props}\n className={tx('dialog.content', 'dialog--alert', { inOverlayLayout }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </AlertDialogContentPrimitive>\n );\n});\n\nAlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;\n\nexport const AlertDialog = {\n Root: AlertDialogRoot,\n Trigger: AlertDialogTrigger,\n Portal: AlertDialogPortal,\n Overlay: AlertDialogOverlay,\n Content: AlertDialogContent,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Cancel: AlertDialogCancel,\n Action: AlertDialogAction,\n};\n\nexport type {\n AlertDialogRootProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n AlertDialogCancelProps,\n AlertDialogActionProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type IconWeight } from '@phosphor-icons/react';\nimport { Root as CheckboxPrimitive, type CheckboxProps as CheckboxPrimitiveProps } from '@radix-ui/react-checkbox';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { type ComponentPropsWithRef, forwardRef, type ForwardRefExoticComponent, useCallback } from 'react';\n\nimport {\n InputRoot,\n type InputRootProps,\n PinInput as PinInputPrimitive,\n type PinInputProps as PinInputPrimitiveProps,\n TextInput as TextInputPrimitive,\n type TextInputProps as TextInputPrimitiveProps,\n TextArea as TextAreaPrimitive,\n type TextAreaProps as TextAreaPrimitiveProps,\n useInputContext,\n INPUT_NAME,\n type InputScopedProps,\n Description as DescriptionPrimitive,\n DescriptionAndValidation as DescriptionAndValidationPrimitive,\n type DescriptionAndValidationProps as DescriptionAndValidationPrimitiveProps,\n type DescriptionProps as DescriptionPrimitiveProps,\n Label as LabelPrimitive,\n type LabelProps as LabelPrimitiveProps,\n Validation as ValidationPrimitive,\n type ValidationProps as ValidationPrimitiveProps,\n} from '@dxos/react-input';\nimport { mx } from '@dxos/react-ui-theme';\nimport { type Density, type Elevation, type ClassNameValue, type Size } from '@dxos/react-ui-types';\n\nimport { useDensityContext, useElevationContext, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { Icon } from '../Icon';\n\ntype InputVariant = 'default' | 'subdued';\n\ntype InputSharedProps = Partial<{ density: Density; elevation: Elevation; variant: InputVariant }>;\n\ntype LabelProps = ThemedClassName<LabelPrimitiveProps> & { srOnly?: boolean };\n\nconst Label = forwardRef<HTMLLabelElement, LabelProps>(({ srOnly, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <LabelPrimitive {...props} className={tx('input.label', 'input__label', { srOnly }, classNames)} ref={forwardedRef}>\n {children}\n </LabelPrimitive>\n );\n});\n\ntype DescriptionProps = ThemedClassName<DescriptionPrimitiveProps> & { srOnly?: boolean };\n\nconst Description = forwardRef<HTMLSpanElement, DescriptionProps>(\n ({ srOnly, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DescriptionPrimitive\n {...props}\n className={tx('input.description', 'input__description', { srOnly }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </DescriptionPrimitive>\n );\n },\n);\n\ntype ValidationProps = ThemedClassName<ValidationPrimitiveProps> & { srOnly?: boolean };\n\nconst Validation = forwardRef<HTMLSpanElement, InputScopedProps<ValidationProps>>(\n ({ __inputScope, srOnly, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { validationValence } = useInputContext(INPUT_NAME, __inputScope);\n return (\n <ValidationPrimitive\n {...props}\n className={tx(\n 'input.validation',\n `input__validation-message input__validation-message--${validationValence}`,\n { srOnly, validationValence },\n classNames,\n )}\n ref={forwardedRef}\n >\n {children}\n </ValidationPrimitive>\n );\n },\n);\n\ntype DescriptionAndValidationProps = ThemedClassName<DescriptionAndValidationPrimitiveProps> & { srOnly?: boolean };\n\nconst DescriptionAndValidation = forwardRef<HTMLParagraphElement, DescriptionAndValidationProps>(\n ({ srOnly, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DescriptionAndValidationPrimitive\n {...props}\n className={tx('input.descriptionAndValidation', 'input__description-and-validation', { srOnly }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </DescriptionAndValidationPrimitive>\n );\n },\n);\n\ntype PinInputProps = InputSharedProps &\n Omit<PinInputPrimitiveProps, 'segmentClassName' | 'inputClassName'> & {\n segmentClassName?: ClassNameValue;\n inputClassName?: ClassNameValue;\n };\n\nconst PinInput = forwardRef<HTMLInputElement, PinInputProps>(\n (\n {\n density: propsDensity,\n elevation: propsElevation,\n segmentClassName: propsSegmentClassName,\n inputClassName,\n variant,\n ...props\n },\n forwardedRef,\n ) => {\n const { hasIosKeyboard } = useThemeContext();\n const { tx } = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n\n const segmentClassName = useCallback(\n ({ focused, validationValence }: Parameters<Exclude<PinInputPrimitiveProps['segmentClassName'], undefined>>[0]) =>\n tx(\n 'input.input',\n 'input--pin-segment',\n {\n variant: 'static',\n focused,\n disabled: props.disabled,\n density,\n elevation,\n validationValence,\n },\n propsSegmentClassName,\n ),\n [tx, props.disabled, elevation, propsElevation, density],\n );\n return (\n <PinInputPrimitive\n {...{\n ...props,\n segmentClassName,\n ...(props.autoFocus && !hasIosKeyboard && { autoFocus: true }),\n }}\n inputClassName={tx('input.inputWithSegments', 'input input--pin', { disabled: props.disabled }, inputClassName)}\n ref={forwardedRef}\n />\n );\n },\n);\n\n// TODO(burdon): Implement inline icon within button: e.g., https://www.radix-ui.com/themes/playground#text-field\n\ntype TextInputProps = InputSharedProps & ThemedClassName<TextInputPrimitiveProps>;\n\nconst TextInput = forwardRef<HTMLInputElement, InputScopedProps<TextInputProps>>(\n ({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {\n const { hasIosKeyboard } = useThemeContext();\n const themeContextValue = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n const { validationValence } = useInputContext(INPUT_NAME, __inputScope);\n\n const { tx } = themeContextValue;\n\n return (\n <TextInputPrimitive\n {...props}\n className={tx(\n 'input.input',\n 'input',\n {\n variant,\n disabled: props.disabled,\n density,\n elevation,\n validationValence,\n },\n classNames,\n )}\n {...(props.autoFocus && !hasIosKeyboard && { autoFocus: true })}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype TextAreaProps = InputSharedProps & ThemedClassName<TextAreaPrimitiveProps>;\n\nconst TextArea = forwardRef<HTMLTextAreaElement, InputScopedProps<TextAreaProps>>(\n ({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {\n const { hasIosKeyboard } = useThemeContext();\n const { tx } = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n const { validationValence } = useInputContext(INPUT_NAME, __inputScope);\n\n return (\n <TextAreaPrimitive\n {...props}\n className={tx(\n 'input.input',\n 'input--text-area',\n {\n variant,\n disabled: props.disabled,\n density,\n elevation,\n validationValence,\n },\n '-mbe-labelSpacingBlock',\n classNames,\n )}\n {...(props.autoFocus && !hasIosKeyboard && { autoFocus: true })}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype CheckboxProps = ThemedClassName<Omit<CheckboxPrimitiveProps, 'children'>> & { size?: Size; weight?: IconWeight };\n\nconst Checkbox: ForwardRefExoticComponent<CheckboxProps> = forwardRef<\n HTMLButtonElement,\n InputScopedProps<CheckboxProps>\n>(\n (\n {\n __inputScope,\n checked: propsChecked,\n defaultChecked: propsDefaultChecked,\n onCheckedChange: propsOnCheckedChange,\n size,\n weight = 'bold',\n classNames,\n ...props\n },\n forwardedRef,\n ) => {\n const [checked, onCheckedChange] = useControllableState({\n prop: propsChecked,\n defaultProp: propsDefaultChecked,\n onChange: propsOnCheckedChange,\n });\n const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);\n const { tx } = useThemeContext();\n\n return (\n <CheckboxPrimitive\n {...{\n ...props,\n checked,\n onCheckedChange,\n id,\n 'aria-describedby': descriptionId,\n ...(validationValence === 'error' && {\n 'aria-invalid': 'true' as const,\n 'aria-errormessage': errorMessageId,\n }),\n className: tx('input.checkbox', 'input--checkbox', { size }, 'shrink-0', classNames),\n }}\n ref={forwardedRef}\n >\n <Icon\n icon={checked === 'indeterminate' ? 'ph--minus--regular' : 'ph--check--regular'}\n classNames={tx('input.checkboxIndicator', 'input--checkbox__indicator', { size, checked })}\n />\n </CheckboxPrimitive>\n );\n },\n);\n\ntype SwitchProps = ThemedClassName<\n Omit<ComponentPropsWithRef<'input'>, 'children' | 'onChange'> & { onCheckedChange?: (checked: boolean) => void }\n>;\n\nconst Switch = forwardRef<HTMLInputElement, InputScopedProps<SwitchProps>>(\n (\n {\n __inputScope,\n checked: propsChecked,\n defaultChecked: propsDefaultChecked,\n onCheckedChange: propsOnCheckedChange,\n classNames,\n ...props\n },\n forwardedRef,\n ) => {\n const [checked, onCheckedChange] = useControllableState({\n prop: propsChecked,\n defaultProp: propsDefaultChecked ?? false,\n onChange: propsOnCheckedChange,\n });\n\n const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);\n\n return (\n <input\n type='checkbox'\n className={mx('dx-checkbox--switch dx-focus-ring', classNames)}\n checked={checked}\n onChange={(event) => {\n onCheckedChange(event.target.checked);\n }}\n id={id}\n aria-describedby={descriptionId}\n {...props}\n {...(validationValence === 'error' && {\n 'aria-invalid': 'true' as const,\n 'aria-errormessage': errorMessageId,\n })}\n ref={forwardedRef}\n />\n );\n },\n);\n\nexport const Input = {\n Root: InputRoot,\n PinInput,\n TextInput,\n TextArea,\n Checkbox,\n Switch,\n Label,\n Description,\n Validation,\n DescriptionAndValidation,\n};\n\nexport type {\n InputVariant,\n InputRootProps,\n InputSharedProps,\n PinInputProps,\n TextInputProps,\n TextAreaProps,\n CheckboxProps,\n SwitchProps,\n LabelProps,\n DescriptionProps,\n ValidationProps,\n DescriptionAndValidationProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CaretDown, CaretRight } from '@phosphor-icons/react';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithoutRef, type FC, forwardRef, type ForwardRefExoticComponent } from 'react';\n\nimport {\n List as ListPrimitive,\n type ListProps as ListPrimitiveProps,\n type ListScopedProps,\n ListItemHeading as ListPrimitiveItemHeading,\n type ListItemHeadingProps as ListPrimitiveItemHeadingProps,\n ListItemOpenTrigger as ListPrimitiveItemOpenTrigger,\n type ListItemOpenTriggerProps as ListPrimitiveItemOpenTriggerProps,\n ListItemCollapsibleContent,\n type ListItemCollapsibleContentProps,\n ListItem as ListPrimitiveItem,\n type ListItemProps as ListPrimitiveItemProps,\n type ListItemScopedProps,\n LIST_NAME,\n LIST_ITEM_NAME,\n useListContext,\n useListItemContext,\n} from '@dxos/react-list';\nimport { type Density } from '@dxos/react-ui-types';\n\nimport { ListDropIndicator } from './ListDropIndicator';\nimport { useDensityContext, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { DensityProvider } from '../DensityProvider';\n\ntype ListProps = ThemedClassName<ListPrimitiveProps> & { density?: Density };\n\nconst List = forwardRef<HTMLOListElement, ListProps>(({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const density = useDensityContext(props.density);\n\n return (\n <DensityProvider density={density}>\n <ListPrimitive {...props} className={tx('list.root', 'list', {}, classNames)} ref={forwardedRef}>\n {children}\n </ListPrimitive>\n </DensityProvider>\n );\n});\n\ntype ListItemEndcapProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & { asChild?: boolean };\n\nconst ListItemEndcap = forwardRef<HTMLDivElement, ListItemEndcapProps>(\n ({ children, classNames, asChild, ...props }, forwardedRef) => {\n const Root = asChild ? Slot : 'div';\n const density = useDensityContext();\n const { tx } = useThemeContext();\n return (\n <Root\n {...(!asChild && { role: 'none' })}\n {...props}\n className={tx('list.item.endcap', 'list__listItem__endcap', { density }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Root>\n );\n },\n);\n\nconst MockListItemOpenTrigger = ({\n classNames,\n ...props\n}: ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'children'>>) => {\n const density = useDensityContext();\n const { tx } = useThemeContext();\n return (\n <div\n role='none'\n {...props}\n className={tx('list.item.openTrigger', 'list__listItem__openTrigger--mock', { density }, classNames)}\n />\n );\n};\n\ntype ListItemHeadingProps = ThemedClassName<ListPrimitiveItemHeadingProps>;\n\nconst ListItemHeading = forwardRef<HTMLParagraphElement, ListItemHeadingProps>(\n ({ children, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const density = useDensityContext();\n return (\n <ListPrimitiveItemHeading\n {...props}\n className={tx('list.item.heading', 'list__listItem__heading', { density }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </ListPrimitiveItemHeading>\n );\n },\n);\n\ntype ListItemOpenTriggerProps = ThemedClassName<ListPrimitiveItemOpenTriggerProps>;\n\nconst ListItemOpenTrigger = forwardRef<HTMLButtonElement, ListItemOpenTriggerProps>(\n ({ __listItemScope, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const density = useDensityContext();\n const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);\n const Icon = open ? CaretDown : CaretRight;\n return (\n <ListPrimitiveItemOpenTrigger\n {...props}\n className={tx('list.item.openTrigger', 'list__listItem__openTrigger', { density }, classNames)}\n ref={forwardedRef}\n >\n {children || (\n <Icon\n {...{\n weight: 'bold',\n className: tx('list.item.openTriggerIcon', 'list__listItem__openTrigger__icon', {}),\n }}\n />\n )}\n </ListPrimitiveItemOpenTrigger>\n );\n },\n);\n\ntype ListItemRootProps = ThemedClassName<ListPrimitiveItemProps>;\n\nconst ListItemRoot = forwardRef<HTMLLIElement, ListItemRootProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const density = useDensityContext();\n return (\n <ListPrimitiveItem\n {...props}\n className={tx('list.item.root', 'list__listItem', { density, collapsible: props.collapsible }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </ListPrimitiveItem>\n );\n },\n);\n\nexport const ListItem: {\n Root: ForwardRefExoticComponent<ListItemRootProps>;\n Endcap: ForwardRefExoticComponent<ListItemEndcapProps>;\n Heading: ForwardRefExoticComponent<ListItemHeadingProps>;\n OpenTrigger: ForwardRefExoticComponent<ListItemOpenTriggerProps>;\n CollapsibleContent: ForwardRefExoticComponent<ListItemCollapsibleContentProps>;\n MockOpenTrigger: FC<ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'children'>>>;\n DropIndicator: typeof ListDropIndicator;\n} = {\n Root: ListItemRoot,\n Endcap: ListItemEndcap,\n Heading: ListItemHeading,\n OpenTrigger: ListItemOpenTrigger,\n CollapsibleContent: ListItemCollapsibleContent,\n MockOpenTrigger: MockListItemOpenTrigger,\n DropIndicator: ListDropIndicator,\n};\n\nexport { List, useListContext, useListItemContext, LIST_NAME, LIST_ITEM_NAME };\n\nexport type {\n ListProps,\n ListScopedProps,\n ListItemRootProps,\n ListItemScopedProps,\n ListItemEndcapProps,\n ListItemHeadingProps,\n ListItemOpenTriggerProps,\n ListItemCollapsibleContentProps,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/types';\nimport React, { type CSSProperties, type HTMLAttributes } from 'react';\n\ntype Orientation = 'horizontal' | 'vertical';\n\nconst edgeToOrientationMap: Record<Edge, Orientation> = {\n top: 'horizontal',\n bottom: 'horizontal',\n left: 'vertical',\n right: 'vertical',\n};\n\nconst orientationStyles: Record<Orientation, HTMLAttributes<HTMLElement>['className']> = {\n horizontal:\n 'h-[--line-thickness] left-[calc(var(--line-inset)+var(--terminal-radius))] right-[--line-inset] before:left-[--terminal-inset]',\n vertical:\n 'w-[--line-thickness] top-[calc(var(--line-inset)+var(--terminal-radius))] bottom-[--line-inset] before:top-[--terminal-inset]',\n};\n\nconst edgeStyles: Record<Edge, HTMLAttributes<HTMLElement>['className']> = {\n top: 'top-[--line-offset] before:top-[--offset-terminal]',\n right: 'right-[--line-offset] before:right-[--offset-terminal]',\n bottom: 'bottom-[--line-offset] before:bottom-[--offset-terminal]',\n left: 'left-[--line-offset] before:left-[--offset-terminal]',\n};\n\nconst strokeSize = 2;\nconst terminalSize = 8;\nconst offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;\n\nexport type DropIndicatorProps = {\n edge: Edge;\n gap?: number;\n terminalInset?: number;\n lineInset?: number;\n};\n\n/**\n * This is a tailwind port of `@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box`\n */\nexport const ListDropIndicator = ({\n edge,\n gap = 0,\n lineInset = 0,\n terminalInset = lineInset - terminalSize,\n}: DropIndicatorProps) => {\n const orientation = edgeToOrientationMap[edge];\n\n return (\n <div\n role='none'\n style={\n {\n '--line-thickness': `${strokeSize}px`,\n '--line-offset': `calc(-0.5 * (${gap}px + ${strokeSize}px))`,\n '--line-inset': `${lineInset}px`,\n '--terminal-size': `${terminalSize}px`,\n '--terminal-radius': `${terminalSize / 2}px`,\n '--terminal-inset': `${terminalInset}px`,\n '--offset-terminal': `${offsetToAlignTerminalWithLine}px`,\n } as CSSProperties\n }\n className={`absolute z-10 pointer-events-none bg-accentSurface before:content-[''] before:w-[--terminal-size] before:h-[--terminal-size] box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accentSurface before:rounded-full ${orientationStyles[orientation]} ${edgeStyles[edge]}`}\n />\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef, type FC, forwardRef, type ForwardRefExoticComponent } from 'react';\n\nimport {\n List,\n ListItem,\n type ListItemCollapsibleContentProps,\n type ListItemHeadingProps,\n type ListItemOpenTriggerProps,\n type ListItemRootProps,\n type ListProps,\n type ListScopedProps,\n LIST_ITEM_NAME,\n useListItemContext,\n} from './List';\nimport { TreeDropIndicator } from './TreeDropIndicator';\nimport { type ThemedClassName } from '../../util';\n\ntype TreeRootProps = ListProps;\n\ntype TreeItemProps = ListItemRootProps;\n\nconst TreeRoot = forwardRef<HTMLOListElement, TreeRootProps>((props, forwardedRef) => {\n return <List {...props} ref={forwardedRef} />;\n});\n\ntype TreeBranchProps = TreeRootProps;\n\nconst TreeBranch = forwardRef<HTMLOListElement, ListScopedProps<TreeBranchProps>>(\n ({ __listScope, ...props }, forwardedRef) => {\n const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);\n return <List {...props} aria-labelledby={headingId} ref={forwardedRef} />;\n },\n);\n\nconst TreeItemRoot = forwardRef<HTMLLIElement, ListItemRootProps>((props, forwardedRef) => {\n return <ListItem.Root role='treeitem' {...props} ref={forwardedRef} />;\n});\n\ntype TreeItemHeadingProps = ListItemHeadingProps;\n\nconst TreeItemHeading = ListItem.Heading;\n\ntype TreeItemOpenTriggerProps = ListItemOpenTriggerProps;\n\nconst TreeItemOpenTrigger = ListItem.OpenTrigger;\n\nconst MockTreeItemOpenTrigger = ListItem.MockOpenTrigger;\n\ntype TreeItemBodyProps = ListItemCollapsibleContentProps;\n\nconst TreeItemBody: ForwardRefExoticComponent<TreeItemBodyProps> = ListItem.CollapsibleContent;\n\nexport const Tree = { Root: TreeRoot, Branch: TreeBranch };\nexport const TreeItem: {\n Root: ForwardRefExoticComponent<TreeItemProps>;\n Heading: ForwardRefExoticComponent<TreeItemHeadingProps>;\n Body: ForwardRefExoticComponent<TreeItemBodyProps>;\n OpenTrigger: ForwardRefExoticComponent<TreeItemOpenTriggerProps>;\n MockOpenTrigger: FC<ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'children'>>>;\n DropIndicator: typeof TreeDropIndicator;\n} = {\n Root: TreeItemRoot,\n Heading: TreeItemHeading,\n Body: TreeItemBody,\n OpenTrigger: TreeItemOpenTrigger,\n MockOpenTrigger: MockTreeItemOpenTrigger,\n DropIndicator: TreeDropIndicator,\n};\n\nexport type { TreeRootProps, TreeItemProps, TreeItemHeadingProps, TreeItemBodyProps, TreeItemOpenTriggerProps };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';\nimport React, { type HTMLAttributes, type CSSProperties } from 'react';\n\n// Tree item hitbox\n// https://github.com/atlassian/pragmatic-drag-and-drop/blob/main/packages/hitbox/constellation/index/about.mdx#tree-item\n\ntype InstructionType = Exclude<Instruction, { type: 'instruction-blocked' }>['type'];\ntype Orientation = 'sibling' | 'child';\n\nconst edgeToOrientationMap: Record<InstructionType, Orientation> = {\n 'reorder-above': 'sibling',\n 'reorder-below': 'sibling',\n 'make-child': 'child',\n reparent: 'child',\n};\n\nconst orientationStyles: Record<Orientation, HTMLAttributes<HTMLElement>['className']> = {\n // TODO(wittjosiah): Stop using left/right here.\n sibling:\n 'bs-[--line-thickness] left-[--horizontal-indent] right-0 bg-accentSurface before:left-[--negative-terminal-size]',\n child: 'is-full block-start-0 block-end-0 border-[length:--line-thickness] before:invisible',\n};\n\nconst instructionStyles: Record<InstructionType, HTMLAttributes<HTMLElement>['className']> = {\n 'reorder-above': 'block-start-[--line-offset] before:block-start-[--offset-terminal]',\n 'reorder-below': 'block-end-[--line-offset] before:block-end-[--offset-terminal]',\n 'make-child': 'border-accentSurface',\n // TODO(wittjosiah): This is not occurring in the current implementation.\n reparent: '',\n};\n\nconst strokeSize = 2;\nconst terminalSize = 8;\nconst offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;\n\nexport type DropIndicatorProps = {\n instruction: Instruction;\n gap?: number;\n};\n\nexport const TreeDropIndicator = ({ instruction, gap = 0 }: DropIndicatorProps) => {\n const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize}px))`;\n const isBlocked = instruction.type === 'instruction-blocked';\n const desiredInstruction = isBlocked ? instruction.desired : instruction;\n const orientation = edgeToOrientationMap[desiredInstruction.type];\n if (isBlocked) {\n return null;\n }\n\n return (\n <div\n style={\n {\n '--line-thickness': `${strokeSize}px`,\n '--line-offset': `${lineOffset}`,\n '--terminal-size': `${terminalSize}px`,\n '--terminal-radius': `${terminalSize / 2}px`,\n '--negative-terminal-size': `-${terminalSize}px`,\n '--offset-terminal': `${offsetToAlignTerminalWithLine}px`,\n '--horizontal-indent': `${desiredInstruction.currentLevel * desiredInstruction.indentPerLevel + 4}px`,\n } as CSSProperties\n }\n className={`absolute z-10 pointer-events-none before:is-[--terminal-size] before:bs-[--terminal-size] box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accentSurface before:rounded-full ${orientationStyles[orientation]} ${instructionStyles[desiredInstruction.type]}`}\n ></div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useArrowNavigationGroup, useFocusableGroup } from '@fluentui/react-tabster';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { type ComponentPropsWithRef, type CSSProperties, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\n// TODO(thure): A lot of the accessible affordances for this kind of thing need to be implemented per https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/treegrid_role\n\nconst TREEGRID_ROW_NAME = 'TreegridRow';\n\ntype TreegridRowScopedProps<P> = P & { __treegridRowScope?: Scope };\n\nconst [createTreegridRowContext, createTreegridRowScope] = createContextScope(TREEGRID_ROW_NAME, []);\n\ntype TreegridRowContextValue = {\n open?: boolean;\n onOpenChange?: (nextOpen: boolean) => void;\n};\n\nconst [TreegridRowProvider, useTreegridRowContext] =\n createTreegridRowContext<TreegridRowContextValue>(TREEGRID_ROW_NAME);\n\nconst PATH_SEPARATOR = '~';\nconst PARENT_OF_SEPARATOR = ' ';\n\ntype TreegridRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n gridTemplateColumns: CSSProperties['gridTemplateColumns'];\n asChild?: boolean;\n};\n\nconst TreegridRoot = forwardRef<HTMLDivElement, TreegridRootProps>(\n ({ asChild, classNames, children, style, gridTemplateColumns, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n const arrowNavigationAttrs = useArrowNavigationGroup({ axis: 'vertical', tabbable: false, circular: true });\n\n return (\n <Root\n role='treegrid'\n {...arrowNavigationAttrs}\n {...props}\n className={tx('treegrid.root', 'treegrid', {}, classNames)}\n style={{ ...style, gridTemplateColumns }}\n ref={forwardedRef}\n >\n {children}\n </Root>\n );\n },\n);\n\ntype TreegridRowProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n id: string;\n asChild?: boolean;\n parentOf?: string;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n};\n\nconst TreegridRow = forwardRef<HTMLDivElement, TreegridRowScopedProps<TreegridRowProps>>(\n (\n {\n __treegridRowScope,\n asChild,\n classNames,\n children,\n id,\n parentOf,\n open: propsOpen,\n defaultOpen,\n onOpenChange: propsOnOpenChange,\n ...props\n },\n forwardedRef,\n ) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n const pathParts = id.split(PATH_SEPARATOR);\n const level = pathParts.length - 1;\n const [open, onOpenChange] = useControllableState({\n prop: propsOpen,\n onChange: propsOnOpenChange,\n defaultProp: defaultOpen,\n });\n const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited' });\n const arrowGroupAttrs = useArrowNavigationGroup({\n axis: 'horizontal',\n tabbable: false,\n circular: false,\n memorizeCurrent: false,\n });\n\n return (\n <TreegridRowProvider open={open} onOpenChange={onOpenChange} scope={__treegridRowScope}>\n <Root\n role='row'\n aria-level={level}\n className={tx('treegrid.row', 'treegrid__row', { level }, classNames)}\n {...(parentOf && { 'aria-expanded': open, 'aria-owns': parentOf })}\n tabIndex={0}\n {...focusableGroupAttrs}\n {...props}\n id={id}\n ref={forwardedRef}\n >\n <div role='none' className='contents' {...arrowGroupAttrs}>\n {children}\n </div>\n </Root>\n </TreegridRowProvider>\n );\n },\n);\n\ntype TreegridCellProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & { indent?: boolean };\n\nconst TreegridCell = forwardRef<HTMLDivElement, TreegridCellProps>(\n ({ classNames, children, indent, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <div\n role='gridcell'\n className={tx('treegrid.cell', 'treegrid__cell', { indent }, classNames)}\n {...props}\n ref={forwardedRef}\n >\n {children}\n </div>\n );\n },\n);\n\nexport type { TreegridRootProps, TreegridRowProps };\n\nexport const Treegrid = {\n Root: TreegridRoot,\n Row: TreegridRow,\n Cell: TreegridCell,\n PARENT_OF_SEPARATOR,\n PATH_SEPARATOR,\n createTreegridRowScope,\n useTreegridRowContext,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport { Root as DialogRoot, DialogContent, DialogTitle } from '@radix-ui/react-dialog';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, {\n type ComponentPropsWithRef,\n type Dispatch,\n forwardRef,\n type PropsWithChildren,\n type SetStateAction,\n useCallback,\n useEffect,\n useRef,\n useState,\n type KeyboardEvent,\n type ComponentPropsWithoutRef,\n} from 'react';\n\nimport { log } from '@dxos/log';\nimport { useMediaQuery, useForwardedRef } from '@dxos/react-hooks';\n\nimport { useSwipeToDismiss } from './useSwipeToDismiss';\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { type Label, toLocalizedString, useTranslation } from '../ThemeProvider';\n\nconst MAIN_ROOT_NAME = 'MainRoot';\nconst NAVIGATION_SIDEBAR_NAME = 'NavigationSidebar';\nconst COMPLEMENTARY_SIDEBAR_NAME = 'ComplementarySidebar';\nconst MAIN_NAME = 'Main';\nconst GENERIC_CONSUMER_NAME = 'GenericConsumer';\n\ntype SidebarState = 'expanded' | 'collapsed' | 'closed';\n\ntype MainContextValue = {\n resizing: boolean;\n navigationSidebarState: SidebarState;\n setNavigationSidebarState: Dispatch<SetStateAction<SidebarState | undefined>>;\n complementarySidebarState: SidebarState;\n setComplementarySidebarState: Dispatch<SetStateAction<SidebarState | undefined>>;\n};\n\nconst landmarkAttr = 'data-main-landmark';\n\n/**\n * Facilitates moving focus between landmarks.\n * Ref https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/landmark_role\n */\nconst useLandmarkMover = (propsOnKeyDown: ComponentPropsWithoutRef<'div'>['onKeyDown'], landmark: string) => {\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n const target = event.target as HTMLDivElement;\n if (event.target === event.currentTarget && event.key === 'Tab' && target.hasAttribute(landmarkAttr)) {\n event.preventDefault();\n const landmarks = Array.from(document.querySelectorAll(`[${landmarkAttr}]:not([inert])`))\n .map((el) => (el.hasAttribute(landmarkAttr) ? parseInt(el.getAttribute(landmarkAttr)!) : NaN))\n .sort();\n const l = landmarks.length;\n const cursor = landmarks.indexOf(parseInt(target.getAttribute(landmarkAttr)!));\n const nextLandmark = landmarks[(cursor + l + (event.getModifierState('Shift') ? -1 : 1)) % l];\n (document.querySelector(`[${landmarkAttr}=\"${nextLandmark}\"]`) as HTMLDivElement | null)?.focus();\n }\n propsOnKeyDown?.(event);\n },\n [propsOnKeyDown],\n );\n const focusableGroupAttrs = window ? {} : { tabBehavior: 'limited', ignoreDefaultKeydown: { Tab: true } };\n\n return { onKeyDown: handleKeyDown, [landmarkAttr]: landmark, tabIndex: 0, ...focusableGroupAttrs };\n};\n\nconst [MainProvider, useMainContext] = createContext<MainContextValue>(MAIN_NAME, {\n resizing: false,\n navigationSidebarState: 'closed',\n setNavigationSidebarState: (nextState) => {\n // TODO(burdon): Standardize with other context missing errors using raise.\n log.warn('Attempt to set sidebar state without initializing `MainRoot`');\n },\n complementarySidebarState: 'closed',\n setComplementarySidebarState: (nextState) => {\n // TODO(burdon): Standardize with other context missing errors using raise.\n log.warn('Attempt to set sidebar state without initializing `MainRoot`');\n },\n});\n\nconst useSidebars = (consumerName = GENERIC_CONSUMER_NAME) => {\n const { setNavigationSidebarState, navigationSidebarState, setComplementarySidebarState, complementarySidebarState } =\n useMainContext(consumerName);\n\n return {\n navigationSidebarState,\n setNavigationSidebarState,\n toggleNavigationSidebar: useCallback(\n () => setNavigationSidebarState(navigationSidebarState === 'expanded' ? 'closed' : 'expanded'),\n [navigationSidebarState, setNavigationSidebarState],\n ),\n openNavigationSidebar: useCallback(() => setNavigationSidebarState('expanded'), []),\n collapseNavigationSidebar: useCallback(() => setNavigationSidebarState('collapsed'), []),\n closeNavigationSidebar: useCallback(() => setNavigationSidebarState('closed'), []),\n complementarySidebarState,\n setComplementarySidebarState,\n toggleComplementarySidebar: useCallback(\n () => setComplementarySidebarState(complementarySidebarState === 'expanded' ? 'closed' : 'expanded'),\n [complementarySidebarState, setComplementarySidebarState],\n ),\n openComplementarySidebar: useCallback(() => setComplementarySidebarState('expanded'), []),\n collapseComplementarySidebar: useCallback(() => setComplementarySidebarState('collapsed'), []),\n closeComplementarySidebar: useCallback(() => setComplementarySidebarState('closed'), []),\n };\n};\n\ntype MainRootProps = PropsWithChildren<{\n navigationSidebarState?: SidebarState;\n defaultNavigationSidebarState?: SidebarState;\n onNavigationSidebarStateChange?: (nextState: SidebarState) => void;\n complementarySidebarState?: SidebarState;\n defaultComplementarySidebarState?: SidebarState;\n onComplementarySidebarStateChange?: (nextState: SidebarState) => void;\n}>;\n\nconst resizeDebounce = 3000;\n\nconst MainRoot = ({\n navigationSidebarState: propsNavigationSidebarState,\n defaultNavigationSidebarState,\n onNavigationSidebarStateChange,\n complementarySidebarState: propsComplementarySidebarState,\n defaultComplementarySidebarState,\n onComplementarySidebarStateChange,\n children,\n ...props\n}: MainRootProps) => {\n const [isLg] = useMediaQuery('lg', { ssr: false });\n const [navigationSidebarState = isLg ? 'expanded' : 'collapsed', setNavigationSidebarState] =\n useControllableState<SidebarState>({\n prop: propsNavigationSidebarState,\n defaultProp: defaultNavigationSidebarState,\n onChange: onNavigationSidebarStateChange,\n });\n const [complementarySidebarState = isLg ? 'expanded' : 'collapsed', setComplementarySidebarState] =\n useControllableState<SidebarState>({\n prop: propsComplementarySidebarState,\n defaultProp: defaultComplementarySidebarState,\n onChange: onComplementarySidebarStateChange,\n });\n\n const [resizing, setResizing] = useState(false);\n const resizeInterval = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const handleResize = useCallback(() => {\n setResizing(true);\n if (resizeInterval.current) {\n clearTimeout(resizeInterval.current);\n }\n resizeInterval.current = setTimeout(() => {\n setResizing(false);\n resizeInterval.current = null;\n }, resizeDebounce);\n }, []);\n\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [handleResize]);\n\n return (\n <MainProvider\n {...props}\n {...{\n navigationSidebarState,\n setNavigationSidebarState,\n complementarySidebarState,\n setComplementarySidebarState,\n }}\n resizing={resizing}\n >\n {children}\n </MainProvider>\n );\n};\n\nMainRoot.displayName = MAIN_ROOT_NAME;\n\nconst handleOpenAutoFocus = (event: Event) => {\n !document.body.hasAttribute('data-is-keyboard') && event.preventDefault();\n};\n\ntype MainSidebarProps = ThemedClassName<ComponentPropsWithRef<typeof DialogContent>> & {\n swipeToDismiss?: boolean;\n state?: SidebarState;\n resizing?: boolean;\n onStateChange?: (nextState: SidebarState) => void;\n side: 'inline-start' | 'inline-end';\n label: Label;\n};\n\nconst MainSidebar = forwardRef<HTMLDivElement, MainSidebarProps>(\n (\n { classNames, children, swipeToDismiss, onOpenAutoFocus, state, resizing, onStateChange, side, label, ...props },\n forwardedRef,\n ) => {\n const [isLg] = useMediaQuery('lg', { ssr: false });\n const { tx } = useThemeContext();\n const { t } = useTranslation();\n const ref = useForwardedRef(forwardedRef);\n const noopRef = useRef(null);\n useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {\n onDismiss: () => onStateChange?.('closed'),\n });\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape') {\n ((event.target as HTMLDivElement).closest('[data-tabster]') as HTMLDivElement)?.focus();\n }\n props.onKeyDown?.(event);\n },\n [props.onKeyDown],\n );\n const Root = isLg ? Primitive.div : DialogContent;\n\n return (\n <DialogRoot open={state !== 'closed'} aria-label={toLocalizedString(label, t)} modal={false}>\n {!isLg && <DialogTitle className='sr-only'>{toLocalizedString(label, t)}</DialogTitle>}\n <Root\n {...(!isLg && { forceMount: true, tabIndex: -1, onOpenAutoFocus: onOpenAutoFocus ?? handleOpenAutoFocus })}\n {...props}\n data-side={side === 'inline-end' ? 'ie' : 'is'}\n data-state={state}\n data-resizing={resizing ? 'true' : 'false'}\n className={tx('main.sidebar', 'main__sidebar', {}, classNames)}\n onKeyDown={handleKeyDown}\n {...(state === 'closed' && { inert: 'true' })}\n ref={ref}\n >\n {children}\n </Root>\n </DialogRoot>\n );\n },\n);\n\ntype MainNavigationSidebarProps = Omit<MainSidebarProps, 'expanded' | 'side'>;\n\nconst MainNavigationSidebar = forwardRef<HTMLDivElement, MainNavigationSidebarProps>((props, forwardedRef) => {\n const { navigationSidebarState, setNavigationSidebarState, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);\n const mover = useLandmarkMover(props.onKeyDown, '0');\n\n return (\n <MainSidebar\n {...mover}\n {...props}\n state={navigationSidebarState}\n onStateChange={setNavigationSidebarState}\n resizing={resizing}\n side='inline-start'\n ref={forwardedRef}\n />\n );\n});\n\nMainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;\n\ntype MainComplementarySidebarProps = Omit<MainSidebarProps, 'expanded' | 'side'>;\n\nconst MainComplementarySidebar = forwardRef<HTMLDivElement, MainComplementarySidebarProps>((props, forwardedRef) => {\n const { complementarySidebarState, setComplementarySidebarState, resizing } =\n useMainContext(COMPLEMENTARY_SIDEBAR_NAME);\n const mover = useLandmarkMover(props.onKeyDown, '2');\n\n return (\n <MainSidebar\n {...mover}\n {...props}\n state={complementarySidebarState}\n onStateChange={setComplementarySidebarState}\n resizing={resizing}\n side='inline-end'\n ref={forwardedRef}\n />\n );\n});\n\nMainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;\n\ntype MainProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n bounce?: boolean;\n handlesFocus?: boolean;\n};\n\nconst MainContent = forwardRef<HTMLDivElement, MainProps>(\n ({ asChild, classNames, bounce, handlesFocus, children, role, ...props }: MainProps, forwardedRef) => {\n const { navigationSidebarState, complementarySidebarState } = useMainContext(MAIN_NAME);\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : role ? 'div' : 'main';\n\n const mover = useLandmarkMover(props.onKeyDown, '1');\n\n return (\n <Root\n role={role}\n {...(handlesFocus && { ...mover })}\n {...props}\n data-sidebar-inline-start-state={navigationSidebarState}\n data-sidebar-inline-end-state={complementarySidebarState}\n data-handles-focus={handlesFocus}\n className={tx('main.content', 'main', { bounce, handlesFocus }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Root>\n );\n },\n);\n\nMainContent.displayName = MAIN_NAME;\n\ntype MainOverlayProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.div>, 'children'>>;\n\nconst MainOverlay = forwardRef<HTMLDivElement, MainOverlayProps>(({ classNames, ...props }, forwardedRef) => {\n const [isLg] = useMediaQuery('lg', { ssr: false });\n const { navigationSidebarState, setNavigationSidebarState, complementarySidebarState, setComplementarySidebarState } =\n useMainContext(MAIN_NAME);\n const { tx } = useThemeContext();\n return (\n <div\n onClick={() => {\n setNavigationSidebarState('collapsed');\n setComplementarySidebarState('collapsed');\n }}\n {...props}\n className={tx(\n 'main.overlay',\n 'main__overlay',\n { isLg, inlineStartSidebarOpen: navigationSidebarState, inlineEndSidebarOpen: complementarySidebarState },\n classNames,\n )}\n data-state={navigationSidebarState === 'expanded' || complementarySidebarState === 'expanded' ? 'open' : 'closed'}\n aria-hidden='true'\n ref={forwardedRef}\n />\n );\n});\n\nexport const Main = {\n Root: MainRoot,\n Content: MainContent,\n Overlay: MainOverlay,\n NavigationSidebar: MainNavigationSidebar,\n ComplementarySidebar: MainComplementarySidebar,\n};\n\nexport { useMainContext, useSidebars, useLandmarkMover };\n\nexport type { MainRootProps, MainProps, MainOverlayProps, MainNavigationSidebarProps, SidebarState };\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// This implementation is based upon https://github.com/hosembafer/react-swipe-to-dismiss, commit d88deafe910a6bd1400cf8fa90459a76cf4f71d3\n\nimport { type RefObject, useCallback, useEffect, useState } from 'react';\n\nenum MotionState {\n IDLE,\n DEBOUNCING,\n FOLLOWING,\n}\n\ntype Options = Partial<{\n onDismiss: () => void;\n dismissThreshold: number;\n debounceThreshold: number;\n side: 'inline-start' | 'inline-end';\n offset: number;\n}>;\n\nexport const useSwipeToDismiss = (\n ref: RefObject<HTMLElement | null>,\n { onDismiss, dismissThreshold = 64, debounceThreshold = 8, offset = 0 /* side = 'inline-start' */ }: Options,\n) => {\n const $root = ref.current;\n // todo(thure): Implement other sides.\n // const dK = direction === 'inline-start' ? 1 : -1;\n\n const [motionState, setMotionState] = useState<MotionState>(MotionState.IDLE);\n const [gestureStartX, setGestureStartX] = useState(0);\n\n const setIdle = useCallback(() => {\n setMotionState(MotionState.IDLE);\n $root?.style.removeProperty('inset-inline-start');\n $root?.style.setProperty('transition-duration', '200ms');\n }, [$root]);\n\n const setFollowing = useCallback(() => {\n setMotionState(MotionState.FOLLOWING);\n $root?.style.setProperty('transition-duration', '0ms');\n }, [$root]);\n\n const handlePointerDown = useCallback(\n ({ screenX }: PointerEvent) => {\n if (motionState === MotionState.IDLE) {\n setMotionState(MotionState.DEBOUNCING);\n setGestureStartX(screenX);\n }\n },\n [motionState],\n );\n\n const handlePointerMove = useCallback(\n ({ screenX }: PointerEvent) => {\n if ($root) {\n const delta = Math.min(screenX - gestureStartX, 0);\n switch (motionState) {\n case MotionState.FOLLOWING:\n if (Math.abs(delta) > dismissThreshold) {\n setIdle();\n onDismiss?.();\n } else {\n $root.style.setProperty('inset-inline-start', `${offset + delta}px`);\n }\n break;\n case MotionState.DEBOUNCING:\n if (Math.abs(delta) > debounceThreshold) {\n setFollowing();\n }\n break;\n }\n }\n },\n [$root, motionState, gestureStartX],\n );\n\n const handlePointerUp = useCallback(() => {\n setIdle();\n }, [setIdle]);\n\n useEffect(() => {\n $root?.addEventListener('pointerdown', handlePointerDown);\n return () => {\n $root?.removeEventListener('pointerdown', handlePointerDown);\n };\n }, [$root, handlePointerDown]);\n\n useEffect(() => {\n $root && document.documentElement.addEventListener('pointermove', handlePointerMove);\n return () => {\n document.documentElement.removeEventListener('pointermove', handlePointerMove);\n };\n }, [$root, handlePointerMove]);\n\n useEffect(() => {\n $root && document.documentElement.addEventListener('pointerup', handlePointerUp);\n return () => {\n document.documentElement.removeEventListener('pointerup', handlePointerUp);\n };\n }, [$root, handlePointerUp]);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\nimport { useSafeCollisionPadding } from '../../hooks/useSafeCollisionPadding';\nimport { type ThemedClassName } from '../../util';\n\ntype ContextMenuRootProps = ContextMenuPrimitive.ContextMenuProps;\n\nconst ContextMenuRoot = ContextMenuPrimitive.ContextMenu;\n\ntype ContextMenuTriggerProps = ContextMenuPrimitive.ContextMenuTriggerProps;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\ntype ContextMenuPortalProps = ContextMenuPrimitive.ContextMenuPortalProps;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\ntype ContextMenuContentProps = ThemedClassName<ContextMenuPrimitive.ContextMenuContentProps> & {\n constrainBlockSize?: boolean;\n};\n\nconst ContextMenuContent = forwardRef<HTMLDivElement, ContextMenuContentProps>(\n ({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const elevation = useElevationContext();\n const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);\n return (\n <ContextMenuPrimitive.Content\n {...props}\n collisionPadding={safeCollisionPadding}\n className={tx('menu.content', 'menu', { elevation }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </ContextMenuPrimitive.Content>\n );\n },\n);\n\ntype ContextMenuViewportProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n};\n\nconst ContextMenuViewport = forwardRef<HTMLDivElement, ContextMenuViewportProps>(\n ({ classNames, asChild, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n return (\n <Root {...props} className={tx('menu.viewport', 'menu__viewport', {}, classNames)} ref={forwardedRef}>\n {children}\n </Root>\n );\n },\n);\n\ntype ContextMenuArrowProps = ThemedClassName<ContextMenuPrimitive.ContextMenuArrowProps>;\n\nconst ContextMenuArrow = forwardRef<SVGSVGElement, ContextMenuArrowProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ContextMenuPrimitive.Arrow\n {...props}\n className={tx('menu.arrow', 'menu__arrow', {}, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\ntype ContextMenuGroupProps = ContextMenuPrimitive.ContextMenuGroupProps;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\ntype ContextMenuItemIndicatorProps = ContextMenuPrimitive.ContextMenuItemIndicatorProps;\n\nconst ContextMenuItemIndicator = ContextMenuPrimitive.ItemIndicator;\n\ntype ContextMenuItemProps = ThemedClassName<ContextMenuPrimitive.ContextMenuItemProps>;\n\nconst ContextMenuItem = forwardRef<HTMLDivElement, ContextMenuItemProps>(\n ({ classNames, ...props }: ContextMenuItemProps, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ContextMenuPrimitive.Item\n {...props}\n className={tx('menu.item', 'menu__item', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype ContextMenuCheckboxItemProps = ThemedClassName<ContextMenuPrimitive.ContextMenuCheckboxItemProps>;\n\nconst ContextMenuCheckboxItem = forwardRef<HTMLDivElement, ContextMenuCheckboxItemProps>(\n ({ classNames, ...props }: ContextMenuItemProps, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ContextMenuPrimitive.CheckboxItem\n {...props}\n className={tx('menu.item', 'menu__item--checkbox', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype ContextMenuSeparatorProps = ThemedClassName<ContextMenuPrimitive.ContextMenuSeparatorProps>;\n\nconst ContextMenuSeparator = forwardRef<HTMLDivElement, ContextMenuSeparatorProps>(\n ({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ContextMenuPrimitive.Separator\n {...props}\n className={tx('menu.separator', 'menu__item', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype ContextMenuGroupLabelProps = ThemedClassName<ContextMenuPrimitive.ContextMenuLabelProps>;\n\nconst ContextMenuGroupLabel = forwardRef<HTMLDivElement, ContextMenuGroupLabelProps>(\n ({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ContextMenuPrimitive.Label\n {...props}\n className={tx('menu.groupLabel', 'menu__group__label', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nexport const ContextMenu = {\n Root: ContextMenuRoot,\n Trigger: ContextMenuTrigger,\n Portal: ContextMenuPortal,\n Content: ContextMenuContent,\n Viewport: ContextMenuViewport,\n Arrow: ContextMenuArrow,\n Group: ContextMenuGroup,\n Item: ContextMenuItem,\n CheckboxItem: ContextMenuCheckboxItem,\n ItemIndicator: ContextMenuItemIndicator,\n Separator: ContextMenuSeparator,\n GroupLabel: ContextMenuGroupLabel,\n};\n\nexport type {\n ContextMenuRootProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuViewportProps,\n ContextMenuArrowProps,\n ContextMenuGroupProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuGroupLabelProps,\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type TooltipContentProps } from '@radix-ui/react-tooltip';\nimport { useMemo } from 'react';\n\nimport { type SafeAreaPadding } from './useSafeArea';\nimport { useThemeContext } from './useThemeContext';\n\ntype PaddingProp = TooltipContentProps['collisionPadding'];\ntype PaddingRecord = Exclude<PaddingProp, number | undefined>;\n\nconst propIsNumber = (prop: PaddingProp): prop is number => Number.isFinite(prop);\nconst propsIsRecord = (prop: PaddingProp): prop is PaddingRecord => !!(prop && typeof prop === 'object');\n\nconst safePadding = (\n propsPadding: TooltipContentProps['collisionPadding'],\n safePadding: SafeAreaPadding,\n side: keyof SafeAreaPadding,\n) => {\n return (\n (propIsNumber(safePadding[side]) ? safePadding[side] : 0) +\n (propIsNumber(propsPadding) ? propsPadding : propsIsRecord(propsPadding) ? propsPadding[side] ?? 0 : 0)\n );\n};\n\nexport const useSafeCollisionPadding = (collisionPadding?: PaddingProp) => {\n const { safeAreaPadding } = useThemeContext();\n return useMemo(\n () => ({\n top: safePadding(collisionPadding, safeAreaPadding!, 'top'),\n right: safePadding(collisionPadding, safeAreaPadding!, 'right'),\n bottom: safePadding(collisionPadding, safeAreaPadding!, 'bottom'),\n left: safePadding(collisionPadding, safeAreaPadding!, 'left'),\n }),\n [collisionPadding, safeAreaPadding],\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\n// This is based upon `@radix-ui/react-dropdown-menu` fetched 25 Oct 2024 at https://github.com/radix-ui/primitives at commit 06de2d4.\n\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport type { Scope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, {\n type ReactNode,\n type FC,\n useRef,\n type ElementRef,\n useCallback,\n type ComponentPropsWithoutRef,\n forwardRef,\n type ComponentPropsWithRef,\n useEffect,\n type MutableRefObject,\n type RefObject,\n} from 'react';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\nimport { useSafeCollisionPadding } from '../../hooks/useSafeCollisionPadding';\nimport { type ThemedClassName } from '../../util';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenu\n * ----------------------------------------------------------------------------------------------- */\n\nconst DROPDOWN_MENU_NAME = 'DropdownMenu';\n\ntype ScopedProps<P> = P & { __scopeDropdownMenu?: Scope };\nconst [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [createMenuScope]);\nconst useMenuScope = createMenuScope();\n\ntype DropdownMenuContextValue = {\n triggerId: string;\n triggerRef: MutableRefObject<HTMLButtonElement | null>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DropdownMenuProvider, useDropdownMenuContext] =\n createDropdownMenuContext<DropdownMenuContextValue>(DROPDOWN_MENU_NAME);\n\ninterface DropdownMenuRootProps {\n children?: ReactNode;\n dir?: Direction;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst DropdownMenuRoot: FC<DropdownMenuRootProps> = (props: ScopedProps<DropdownMenuRootProps>) => {\n const { __scopeDropdownMenu, children, dir, open: openProp, defaultOpen, onOpenChange, modal = true } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <DropdownMenuProvider\n scope={__scopeDropdownMenu}\n triggerId={useId()}\n triggerRef={triggerRef as MutableRefObject<HTMLButtonElement | null>}\n contentId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n <MenuPrimitive.Root {...menuScope} open={open} onOpenChange={setOpen} dir={dir} modal={modal}>\n {children}\n </MenuPrimitive.Root>\n </DropdownMenuProvider>\n );\n};\n\nDropdownMenuRoot.displayName = DROPDOWN_MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuTrigger\n * ----------------------------------------------------------------------------------------------- */\n\nconst TRIGGER_NAME = 'DropdownMenuTrigger';\n\ntype DropdownMenuTriggerElement = ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DropdownMenuTriggerProps extends PrimitiveButtonProps {}\n\nconst DropdownMenuTrigger = forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n (props: ScopedProps<DropdownMenuTriggerProps>, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return (\n <MenuPrimitive.Anchor asChild {...menuScope}>\n <Primitive.button\n type='button'\n id={context.triggerId}\n aria-haspopup='menu'\n aria-expanded={context.open}\n aria-controls={context.open ? context.contentId : undefined}\n data-state={context.open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n {...triggerProps}\n ref={composeRefs(forwardedRef, context.triggerRef)}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!context.open) {\n event.preventDefault();\n }\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) {\n return;\n }\n if (['Enter', ' '].includes(event.key)) {\n context.onOpenToggle();\n }\n if (event.key === 'ArrowDown') {\n context.onOpenChange(true);\n }\n // prevent keydown from scrolling window / first focused item to execute\n // that keydown (inadvertently closing the menu)\n if (['Enter', ' ', 'ArrowDown'].includes(event.key)) {\n event.preventDefault();\n }\n })}\n />\n </MenuPrimitive.Anchor>\n );\n },\n);\n\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuVirtualTrigger\n * ----------------------------------------------------------------------------------------------- */\n\nconst VIRTUAL_TRIGGER_NAME = 'DropdownMenuVirtualTrigger';\n\ninterface DropdownMenuVirtualTriggerProps {\n virtualRef: RefObject<DropdownMenuTriggerElement>;\n}\n\nconst DropdownMenuVirtualTrigger = (props: ScopedProps<DropdownMenuVirtualTriggerProps>) => {\n const { __scopeDropdownMenu, virtualRef } = props;\n const context = useDropdownMenuContext(VIRTUAL_TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n useEffect(() => {\n if (virtualRef.current) {\n context.triggerRef.current = virtualRef.current;\n }\n });\n return <MenuPrimitive.Anchor {...menuScope} virtualRef={virtualRef} />;\n};\n\nDropdownMenuVirtualTrigger.displayName = VIRTUAL_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuPortal\n * ----------------------------------------------------------------------------------------------- */\n\nconst PORTAL_NAME = 'DropdownMenuPortal';\n\ntype MenuPortalProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface DropdownMenuPortalProps extends MenuPortalProps {}\n\nconst DropdownMenuPortal: FC<DropdownMenuPortalProps> = (props: ScopedProps<DropdownMenuPortalProps>) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\nDropdownMenuPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuViewport\n * ----------------------------------------------------------------------------------------------- */\n\ntype DropdownMenuViewportProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n};\n\nconst DropdownMenuViewport = forwardRef<HTMLDivElement, DropdownMenuViewportProps>(\n ({ classNames, asChild, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n return (\n <Root {...props} className={tx('menu.viewport', 'menu__viewport', {}, classNames)} ref={forwardedRef}>\n {children}\n </Root>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuContent\n * ----------------------------------------------------------------------------------------------- */\n\nconst CONTENT_NAME = 'DropdownMenuContent';\n\ntype DropdownMenuContentElement = ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Content>>;\ninterface DropdownMenuContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {}\n\nconst DropdownMenuContent = forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props: ScopedProps<DropdownMenuContentProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, collisionPadding = 8, ...contentProps } = props;\n const { tx } = useThemeContext();\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const elevation = useElevationContext();\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = useRef(false);\n const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);\n return (\n <MenuPrimitive.Content\n id={context.contentId}\n aria-labelledby={context.triggerId}\n {...menuScope}\n {...contentProps}\n collisionPadding={safeCollisionPadding}\n ref={forwardedRef}\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) {\n context.triggerRef.current?.focus();\n }\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent as PointerEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) {\n hasInteractedOutsideRef.current = true;\n }\n })}\n className={tx('menu.content', 'menu', { elevation }, classNames)}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-dropdown-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-dropdown-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-dropdown-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n },\n);\n\nDropdownMenuContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuGroup\n * ----------------------------------------------------------------------------------------------- */\n\nconst GROUP_NAME = 'DropdownMenuGroup';\n\ntype DropdownMenuGroupElement = ElementRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface DropdownMenuGroupProps extends MenuGroupProps {}\n\nconst DropdownMenuGroup = forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n (props: ScopedProps<DropdownMenuGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n },\n);\n\nDropdownMenuGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuLabel\n * ----------------------------------------------------------------------------------------------- */\n\nconst LABEL_NAME = 'DropdownMenuLabel';\n\ntype DropdownMenuLabelElement = ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Label>>;\ninterface DropdownMenuLabelProps extends MenuLabelProps {}\n\nconst DropdownMenuGroupLabel = forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n (props: ScopedProps<DropdownMenuLabelProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.Label\n {...menuScope}\n {...labelProps}\n className={tx('menu.groupLabel', 'menu__group__label', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuGroupLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItem\n * ----------------------------------------------------------------------------------------------- */\n\nconst ITEM_NAME = 'DropdownMenuItem';\n\ntype DropdownMenuItemElement = ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Item>>;\ninterface DropdownMenuItemProps extends MenuItemProps {}\n\nconst DropdownMenuItem = forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props: ScopedProps<DropdownMenuItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.Item\n {...menuScope}\n {...itemProps}\n className={tx('menu.item', 'menu__item', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuCheckboxItem\n * ----------------------------------------------------------------------------------------------- */\n\nconst CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';\n\ntype DropdownMenuCheckboxItemElement = ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>>;\ninterface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst DropdownMenuCheckboxItem = forwardRef<DropdownMenuCheckboxItemElement, DropdownMenuCheckboxItemProps>(\n (props: ScopedProps<DropdownMenuCheckboxItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.CheckboxItem\n {...menuScope}\n {...checkboxItemProps}\n className={tx('menu.item', 'menu__item--checkbox', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioGroup\n * ----------------------------------------------------------------------------------------------- */\n\nconst RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';\n\ntype DropdownMenuRadioGroupElement = ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst DropdownMenuRadioGroup = forwardRef<DropdownMenuRadioGroupElement, DropdownMenuRadioGroupProps>(\n (props: ScopedProps<DropdownMenuRadioGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n },\n);\n\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuRadioItem\n * ----------------------------------------------------------------------------------------------- */\n\nconst RADIO_ITEM_NAME = 'DropdownMenuRadioItem';\n\ntype DropdownMenuRadioItemElement = ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface DropdownMenuRadioItemProps extends MenuRadioItemProps {}\n\nconst DropdownMenuRadioItem = forwardRef<DropdownMenuRadioItemElement, DropdownMenuRadioItemProps>(\n (props: ScopedProps<DropdownMenuRadioItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n },\n);\n\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuItemIndicator\n * ----------------------------------------------------------------------------------------------- */\n\nconst INDICATOR_NAME = 'DropdownMenuItemIndicator';\n\ntype DropdownMenuItemIndicatorElement = ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst DropdownMenuItemIndicator = forwardRef<DropdownMenuItemIndicatorElement, DropdownMenuItemIndicatorProps>(\n (props: ScopedProps<DropdownMenuItemIndicatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n },\n);\n\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSeparator\n * ----------------------------------------------------------------------------------------------- */\n\nconst SEPARATOR_NAME = 'DropdownMenuSeparator';\n\ntype DropdownMenuSeparatorElement = ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>>;\ninterface DropdownMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst DropdownMenuSeparator = forwardRef<DropdownMenuSeparatorElement, DropdownMenuSeparatorProps>(\n (props: ScopedProps<DropdownMenuSeparatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.Separator\n {...menuScope}\n {...separatorProps}\n className={tx('menu.separator', 'menu__item', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuArrow\n * ----------------------------------------------------------------------------------------------- */\n\nconst ARROW_NAME = 'DropdownMenuArrow';\n\ntype DropdownMenuArrowElement = ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>>;\ninterface DropdownMenuArrowProps extends MenuArrowProps {}\n\nconst DropdownMenuArrow = forwardRef<DropdownMenuArrowElement, DropdownMenuArrowProps>(\n (props: ScopedProps<DropdownMenuArrowProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.Arrow\n {...menuScope}\n {...arrowProps}\n className={tx('menu.arrow', 'menu__arrow', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSub\n * ----------------------------------------------------------------------------------------------- */\n\ninterface DropdownMenuSubProps {\n children?: ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst DropdownMenuSub: FC<DropdownMenuSubProps> = (props: ScopedProps<DropdownMenuSubProps>) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSubTrigger\n * ----------------------------------------------------------------------------------------------- */\n\nconst SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';\n\ntype DropdownMenuSubTriggerElement = ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst DropdownMenuSubTrigger = forwardRef<DropdownMenuSubTriggerElement, DropdownMenuSubTriggerProps>(\n (props: ScopedProps<DropdownMenuSubTriggerProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...subTriggerProps} ref={forwardedRef} />;\n },\n);\n\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DropdownMenuSubContent\n * ----------------------------------------------------------------------------------------------- */\n\nconst SUB_CONTENT_NAME = 'DropdownMenuSubContent';\n\ntype DropdownMenuSubContentElement = ElementRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps extends MenuSubContentProps {}\n\nconst DropdownMenuSubContent = forwardRef<DropdownMenuSubContentElement, DropdownMenuSubContentProps>(\n (props: ScopedProps<DropdownMenuSubContentProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n {...subContentProps}\n ref={forwardedRef}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-dropdown-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-dropdown-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-dropdown-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n },\n);\n\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n/* ----------------------------------------------------------------------------------------------- */\n\nexport const DropdownMenu = {\n Root: DropdownMenuRoot,\n Trigger: DropdownMenuTrigger,\n VirtualTrigger: DropdownMenuVirtualTrigger,\n Portal: DropdownMenuPortal,\n Content: DropdownMenuContent,\n Viewport: DropdownMenuViewport,\n Group: DropdownMenuGroup,\n GroupLabel: DropdownMenuGroupLabel,\n Item: DropdownMenuItem,\n CheckboxItem: DropdownMenuCheckboxItem,\n RadioGroup: DropdownMenuRadioGroup,\n RadioItem: DropdownMenuRadioItem,\n ItemIndicator: DropdownMenuItemIndicator,\n Separator: DropdownMenuSeparator,\n Arrow: DropdownMenuArrow,\n Sub: DropdownMenuSub,\n SubTrigger: DropdownMenuSubTrigger,\n SubContent: DropdownMenuSubContent,\n};\n\nconst useDropdownMenuMenuScope = useMenuScope;\n\nexport { createDropdownMenuScope, useDropdownMenuContext, useDropdownMenuMenuScope };\n\nexport type {\n DropdownMenuRootProps,\n DropdownMenuTriggerProps,\n DropdownMenuVirtualTriggerProps,\n DropdownMenuPortalProps,\n DropdownMenuContentProps,\n DropdownMenuViewportProps,\n DropdownMenuGroupProps,\n DropdownMenuLabelProps,\n DropdownMenuItemProps,\n DropdownMenuCheckboxItemProps,\n DropdownMenuRadioGroupProps,\n DropdownMenuRadioItemProps,\n DropdownMenuItemIndicatorProps,\n DropdownMenuSeparatorProps,\n DropdownMenuArrowProps,\n DropdownMenuSubProps,\n DropdownMenuSubTriggerProps,\n DropdownMenuSubContentProps,\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useId } from '@dxos/react-hooks';\nimport { type MessageValence, type Elevation } from '@dxos/react-ui-types';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { Icon } from '../Icon';\n\nconst messageIcons: Record<MessageValence, string> = {\n success: 'ph--check-circle--duotone',\n info: 'ph--info--duotone',\n warning: 'ph--warning--duotone',\n error: 'ph--warning-circle--duotone',\n neutral: 'ph--info--duotone',\n};\n\ntype MessageRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n valence?: MessageValence;\n elevation?: Elevation;\n asChild?: boolean;\n titleId?: string;\n descriptionId?: string;\n};\n\ntype MessageContextValue = { titleId?: string; descriptionId: string; valence: MessageValence };\nconst MESSAGE_NAME = 'Message';\nconst [MessageProvider, useMessageContext] = createContext<MessageContextValue>(MESSAGE_NAME);\n\nconst MessageRoot = forwardRef<HTMLDivElement, MessageRootProps>(\n (\n {\n asChild,\n valence = 'neutral',\n elevation: propsElevation,\n classNames,\n titleId: propsTitleId,\n descriptionId: propsDescriptionId,\n children,\n ...props\n },\n forwardedRef,\n ) => {\n const { tx } = useThemeContext();\n const titleId = useId('message__title', propsTitleId);\n const descriptionId = useId('message__description', propsDescriptionId);\n const elevation = useElevationContext(propsElevation);\n const Root = asChild ? Slot : Primitive.div;\n return (\n <MessageProvider {...{ titleId, descriptionId, valence }}>\n <Root\n role={valence === 'neutral' ? 'paragraph' : 'alert'}\n {...props}\n className={tx('message.root', 'message', { valence, elevation }, classNames)}\n aria-labelledby={titleId}\n aria-describedby={descriptionId}\n ref={forwardedRef}\n >\n {children}\n </Root>\n </MessageProvider>\n );\n },\n);\n\nMessageRoot.displayName = MESSAGE_NAME;\n\ntype MessageTitleProps = Omit<ThemedClassName<ComponentPropsWithRef<typeof Primitive.h2>>, 'id'> & {\n asChild?: boolean;\n icon?: string;\n};\n\nconst MESSAGE_TITLE_NAME = 'MessageTitle';\n\nconst MessageTitle = forwardRef<HTMLHeadingElement, MessageTitleProps>(\n ({ asChild, classNames, children, icon, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { titleId, valence } = useMessageContext(MESSAGE_TITLE_NAME);\n const Root = asChild ? Slot : Primitive.h2;\n return (\n <Root\n {...props}\n className={tx('message.title', 'message__title', {}, classNames)}\n id={titleId}\n ref={forwardedRef}\n >\n {!icon && valence === 'neutral' ? null : (\n <Icon\n size={5}\n icon={icon ?? messageIcons[valence]}\n classNames={tx('message.icon', 'message__icon', { valence })}\n />\n )}\n <span>{children}</span>\n </Root>\n );\n },\n);\n\nMessageTitle.displayName = MESSAGE_TITLE_NAME;\n\ntype MessageContentProps = Omit<ThemedClassName<ComponentPropsWithRef<typeof Primitive.h2>>, 'id'> & {\n asChild?: boolean;\n};\n\nconst MESSAGE_BODY_NAME = 'MessageContent';\n\nconst MessageContent = forwardRef<HTMLParagraphElement, MessageContentProps>(\n ({ asChild, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { descriptionId } = useMessageContext(MESSAGE_BODY_NAME);\n const Root = asChild ? Slot : Primitive.p;\n return (\n <Root\n {...props}\n className={tx('message.content', 'message__content', {}, classNames)}\n id={descriptionId}\n ref={forwardedRef}\n >\n {children}\n </Root>\n );\n },\n);\n\nMessageContent.displayName = MESSAGE_BODY_NAME;\n\nexport const Message = { Root: MessageRoot, Title: MessageTitle, Content: MessageContent };\nexport const Callout = Message;\n\nexport type { MessageRootProps, MessageTitleProps, MessageContentProps };\n\nexport { messageIcons };\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// This is based upon `@radix-ui/react-popover` fetched 25 Oct 2024 at https://github.com/radix-ui/primitives at commit 374c7d7.\n\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { type Scope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport React, {\n type ComponentPropsWithRef,\n forwardRef,\n type ElementRef,\n type RefObject,\n type ReactNode,\n useRef,\n useCallback,\n type ComponentPropsWithoutRef,\n type FC,\n useState,\n useEffect,\n type MutableRefObject,\n} from 'react';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\nimport { useSafeCollisionPadding } from '../../hooks/useSafeCollisionPadding';\nimport { type ThemedClassName } from '../../util';\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * ----------------------------------------------------------------------------------------------- */\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [createPopperScope]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: MutableRefObject<HTMLButtonElement>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n};\n\nconst [PopoverProvider, usePopoverContext] = createPopoverContext<PopoverContextValue>(POPOVER_NAME);\n\ninterface PopoverRootProps {\n children?: ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n}\n\nconst PopoverRoot: FC<PopoverRootProps> = (props: ScopedProps<PopoverRootProps>) => {\n const { __scopePopover, children, open: openProp, defaultOpen, onOpenChange, modal = false } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [hasCustomAnchor, setHasCustomAnchor] = useState(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <PopoverProvider\n scope={__scopePopover}\n contentId={useId()}\n triggerRef={triggerRef as MutableRefObject<HTMLButtonElement>}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n >\n {children}\n </PopoverProvider>\n </PopperPrimitive.Root>\n );\n};\n\nPopoverRoot.displayName = POPOVER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * ----------------------------------------------------------------------------------------------- */\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = ElementRef<typeof PopperPrimitive.Anchor>;\ntype PopperAnchorProps = ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props: ScopedProps<PopoverAnchorProps>, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return <PopperPrimitive.Anchor {...popperScope} {...anchorProps} ref={forwardedRef} />;\n },\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * ----------------------------------------------------------------------------------------------- */\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface PopoverTriggerProps extends PrimitiveButtonProps {}\n\nconst PopoverTrigger = forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n (props: ScopedProps<PopoverTriggerProps>, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const trigger = (\n <Primitive.button\n type='button'\n aria-haspopup='dialog'\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n <PopperPrimitive.Anchor asChild {...popperScope}>\n {trigger}\n </PopperPrimitive.Anchor>\n );\n },\n);\n\nPopoverTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverVirtualTrigger\n * ----------------------------------------------------------------------------------------------- */\n\nconst VIRTUAL_TRIGGER_NAME = 'PopoverVirtualTrigger';\n\ninterface PopoverVirtualTriggerProps {\n virtualRef: RefObject<PopoverTriggerElement>;\n}\n\nconst PopoverVirtualTrigger = (props: ScopedProps<PopoverVirtualTriggerProps>) => {\n const { __scopePopover, virtualRef } = props;\n const context = usePopoverContext(VIRTUAL_TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useEffect(() => {\n if (virtualRef.current) {\n context.triggerRef.current = virtualRef.current;\n }\n });\n return <PopperPrimitive.Anchor {...popperScope} virtualRef={virtualRef} />;\n};\n\nPopoverVirtualTrigger.displayName = VIRTUAL_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * ----------------------------------------------------------------------------------------------- */\n\nconst PORTAL_NAME = 'PopoverPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createPopoverContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface PopoverPortalProps {\n children?: ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverPortal: FC<PopoverPortalProps> = (props: ScopedProps<PopoverPortalProps>) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return (\n <PortalProvider scope={__scopePopover} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {children}\n </PortalPrimitive>\n </Presence>\n </PortalProvider>\n );\n};\n\nPopoverPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * ----------------------------------------------------------------------------------------------- */\n\nconst CONTENT_NAME = 'PopoverContent';\n\ntype PopoverContentProps = ThemedClassName<PopoverContentTypeProps> & {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: boolean;\n};\n\nconst PopoverContent = forwardRef<PopoverContentTypeElement, PopoverContentProps>(\n (props: ScopedProps<PopoverContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <PopoverContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <PopoverContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n },\n);\n\nPopoverContent.displayName = CONTENT_NAME;\n\n/* ----------------------------------------------------------------------------------------------- */\n\ntype PopoverContentTypeElement = PopoverContentImplElement;\nexport interface PopoverContentTypeProps\n extends Omit<PopoverContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst PopoverContentModal = forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n useEffect(() => {\n const content = contentRef.current;\n if (content) {\n return hideOthers(content);\n }\n }, []);\n\n return (\n <RemoveScroll as={Slot} allowPinchZoom>\n <PopoverContentImpl\n {...props}\n ref={composedRefs}\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) {\n context.triggerRef.current?.focus();\n }\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false },\n )}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) => event.preventDefault(), {\n checkForDefaultPrevented: false,\n })}\n />\n </RemoveScroll>\n );\n },\n);\n\nconst PopoverContentNonModal = forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = useRef(false);\n const hasPointerDownOutsideRef = useRef(false);\n\n return (\n <PopoverContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) {\n context.triggerRef.current?.focus();\n }\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) {\n event.preventDefault();\n }\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n },\n);\n\n/* ----------------------------------------------------------------------------------------------- */\n\ntype PopoverContentImplElement = ElementRef<typeof PopperPrimitive.Content>;\ntype FocusScopeProps = ComponentPropsWithoutRef<typeof FocusScope>;\ntype DismissableLayerProps = ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = ThemedClassName<ComponentPropsWithoutRef<typeof PopperPrimitive.Content>>;\ninterface PopoverContentImplProps\n extends Omit<PopperContentProps, 'onPlaced'>,\n Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst PopoverContentImpl = forwardRef<PopoverContentImplElement, PopoverContentImplProps>(\n (props: ScopedProps<PopoverContentImplProps>, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n collisionPadding = 8,\n classNames,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { tx } = useThemeContext();\n const elevation = useElevationContext();\n const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);\n\n // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n return (\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={disableOutsidePointerEvents}\n onInteractOutside={onInteractOutside}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onDismiss={() => context.onOpenChange(false)}\n >\n <PopperPrimitive.Content\n data-state={getState(context.open)}\n role='dialog'\n id={context.contentId}\n {...popperScope}\n {...contentProps}\n collisionPadding={safeCollisionPadding}\n className={tx('popover.content', 'popover', { elevation }, classNames)}\n ref={forwardedRef}\n style={{\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-popover-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-popover-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-popover-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-popover-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-popover-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n </DismissableLayer>\n </FocusScope>\n );\n },\n);\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * ----------------------------------------------------------------------------------------------- */\n\nconst CLOSE_NAME = 'PopoverClose';\n\ntype PopoverCloseElement = ElementRef<typeof Primitive.button>;\ninterface PopoverCloseProps extends PrimitiveButtonProps {}\n\nconst PopoverClose = forwardRef<PopoverCloseElement, PopoverCloseProps>(\n (props: ScopedProps<PopoverCloseProps>, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return (\n <Primitive.button\n type='button'\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n },\n);\n\nPopoverClose.displayName = CLOSE_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * ----------------------------------------------------------------------------------------------- */\n\nconst ARROW_NAME = 'PopoverArrow';\n\ntype PopoverArrowElement = ElementRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = ThemedClassName<ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>>;\ninterface PopoverArrowProps extends PopperArrowProps {}\n\nconst PopoverArrow = forwardRef<PopoverArrowElement, PopoverArrowProps>(\n (props: ScopedProps<PopoverArrowProps>, forwardedRef) => {\n const { __scopePopover, classNames, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n const { tx } = useThemeContext();\n return (\n <PopperPrimitive.Arrow\n {...popperScope}\n {...arrowProps}\n className={tx('popover.arrow', 'popover__arrow', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nPopoverArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverViewport\n * ----------------------------------------------------------------------------------------------- */\n\ntype PopoverViewportProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n constrainInline?: boolean;\n constrainBlock?: boolean;\n};\n\nconst PopoverViewport = forwardRef<HTMLDivElement, PopoverViewportProps>(\n ({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n return (\n <Root\n {...props}\n className={tx('popover.viewport', 'popover__viewport', { constrainInline, constrainBlock }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Root>\n );\n },\n);\n\n/* ----------------------------------------------------------------------------------------------- */\n\nconst getState = (open: boolean) => (open ? 'open' : 'closed');\n\ntype PopoverContentInteractOutsideEvent = Parameters<NonNullable<PopoverContentProps['onInteractOutside']>>[0];\n\nexport const Popover = {\n Root: PopoverRoot,\n Anchor: PopoverAnchor,\n Trigger: PopoverTrigger,\n VirtualTrigger: PopoverVirtualTrigger,\n Portal: PopoverPortal,\n Content: PopoverContent,\n Close: PopoverClose,\n Arrow: PopoverArrow,\n Viewport: PopoverViewport,\n};\n\nexport { createPopoverScope };\n\nexport type {\n PopoverRootProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverVirtualTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n PopoverViewportProps,\n PopoverContentInteractOutsideEvent,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ntype StatusProps = ThemedClassName<ComponentPropsWithRef<'span'>> & {\n indeterminate?: boolean;\n variant?: 'default' | 'main-bottom';\n progress?: number;\n};\n\nconst Status = forwardRef<HTMLSpanElement, StatusProps>(\n ({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <span\n role='status'\n {...props}\n className={tx('status.root', 'status', { indeterminate, variant }, classNames)}\n ref={forwardedRef}\n >\n <span\n role='none'\n className={tx('status.bar', 'status__bar', { indeterminate, variant }, classNames)}\n {...(!indeterminate && { style: { width: `${Math.round(progress * 100)}%` } })}\n />\n {children}\n </span>\n );\n },\n);\n\nexport { Status };\n\nexport type { StatusProps };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n Root as ScrollAreaPrimitiveRoot,\n type ScrollAreaProps as ScrollAreaPrimitiveRootProps,\n Viewport as ScrollAreaPrimitiveViewport,\n type ScrollAreaViewportProps as ScrollAreaPrimitiveViewportProps,\n Scrollbar as ScrollAreaPrimitiveScrollbar,\n type ScrollAreaScrollbarProps as ScrollAreaPrimitiveScrollbarProps,\n Thumb as ScrollAreaPrimitiveThumb,\n type ScrollAreaThumbProps as ScrollAreaPrimitiveThumbProps,\n Corner as ScrollAreaPrimitiveCorner,\n type ScrollAreaCornerProps as ScrollAreaPrimitiveCornerProps,\n} from '@radix-ui/react-scroll-area';\nimport React, { forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ntype ScrollAreaVariant = 'coarse' | 'fine';\n\ntype ScrollAreaRootProps = ThemedClassName<ScrollAreaPrimitiveRootProps>;\n\n/**\n * @deprecated\n */\nconst ScrollAreaRoot = forwardRef<HTMLDivElement, ScrollAreaRootProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ScrollAreaPrimitiveRoot\n {...props}\n className={tx('scrollArea.root', 'scroll-area', {}, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\ntype ScrollAreaViewportProps = ThemedClassName<ScrollAreaPrimitiveViewportProps>;\n\nconst ScrollAreaViewport = forwardRef<HTMLDivElement, ScrollAreaViewportProps>(\n ({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ScrollAreaPrimitiveViewport\n {...props}\n className={tx('scrollArea.viewport', 'scroll-area', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype ScrollAreaScrollbarProps = ThemedClassName<ScrollAreaPrimitiveScrollbarProps> & { variant?: ScrollAreaVariant };\n\nconst ScrollAreaScrollbar = forwardRef<HTMLDivElement, ScrollAreaScrollbarProps>(\n ({ classNames, variant = 'fine', ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ScrollAreaPrimitiveScrollbar\n data-variant={variant}\n {...props}\n className={tx('scrollArea.scrollbar', 'scroll-area__scrollbar', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype ScrollAreaThumbProps = ThemedClassName<ScrollAreaPrimitiveThumbProps>;\n\nconst ScrollAreaThumb = forwardRef<HTMLDivElement, ScrollAreaThumbProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ScrollAreaPrimitiveThumb\n {...props}\n className={tx('scrollArea.thumb', 'scroll-area__thumb', {}, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\ntype ScrollAreaCornerProps = ThemedClassName<ScrollAreaPrimitiveCornerProps>;\n\nconst ScrollAreaCorner = forwardRef<HTMLDivElement, ScrollAreaCornerProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ScrollAreaPrimitiveCorner\n {...props}\n className={tx('scrollArea.corner', 'scroll-area__corner', {}, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\nexport const ScrollArea = {\n Root: ScrollAreaRoot,\n Viewport: ScrollAreaViewport,\n Scrollbar: ScrollAreaScrollbar,\n Thumb: ScrollAreaThumb,\n Corner: ScrollAreaCorner,\n};\n\nexport type {\n ScrollAreaRootProps,\n ScrollAreaViewportProps,\n ScrollAreaScrollbarProps,\n ScrollAreaThumbProps,\n ScrollAreaCornerProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CaretDown, CaretUp } from '@phosphor-icons/react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport React, { forwardRef } from 'react';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\nimport { useSafeCollisionPadding } from '../../hooks/useSafeCollisionPadding';\nimport { type ThemedClassName } from '../../util';\nimport { Button, type ButtonProps } from '../Buttons';\nimport { Icon } from '../Icon';\n\ntype SelectRootProps = SelectPrimitive.SelectProps;\n\nconst SelectRoot = SelectPrimitive.Root;\n\ntype SelectTriggerProps = SelectPrimitive.SelectTriggerProps;\n\nconst SelectTrigger = SelectPrimitive.Trigger;\n\ntype SelectValueProps = SelectPrimitive.SelectValueProps;\n\nconst SelectValue = SelectPrimitive.Value;\n\ntype SelectIconProps = SelectPrimitive.SelectIconProps;\n\nconst SelectIcon = SelectPrimitive.Icon;\n\ntype SelectPortalProps = SelectPrimitive.SelectPortalProps;\n\nconst SelectPortal = SelectPrimitive.Portal;\n\ntype SelectTriggerButtonProps = Omit<ButtonProps, 'children'> & Pick<SelectValueProps, 'placeholder' | 'children'>;\n\nconst SelectTriggerButton = forwardRef<HTMLButtonElement, SelectTriggerButtonProps>(\n ({ children, placeholder, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.Trigger asChild ref={forwardedRef}>\n <Button {...props}>\n <SelectPrimitive.Value placeholder={placeholder}>{children}</SelectPrimitive.Value>\n <span className='w-1 flex-1' />\n <SelectPrimitive.Icon asChild>\n <CaretDown className={tx('select.triggerIcon', 'select__trigger__icon', {})} weight='bold' />\n </SelectPrimitive.Icon>\n </Button>\n </SelectPrimitive.Trigger>\n );\n },\n);\n\ntype SelectContentProps = ThemedClassName<SelectPrimitive.SelectContentProps>;\n\nconst SelectContent = forwardRef<HTMLDivElement, SelectContentProps>(\n ({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const elevation = useElevationContext();\n const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);\n return (\n <SelectPrimitive.Content\n {...props}\n collisionPadding={safeCollisionPadding}\n className={tx('select.content', 'select__content', { elevation }, classNames)}\n position='popper'\n ref={forwardedRef}\n >\n {children}\n </SelectPrimitive.Content>\n );\n },\n);\n\ntype SelectScrollUpButtonProps = ThemedClassName<SelectPrimitive.SelectScrollUpButtonProps>;\n\nconst SelectScrollUpButton = forwardRef<HTMLDivElement, SelectScrollUpButtonProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.SelectScrollUpButton\n {...props}\n className={tx('select.scrollButton', 'select__scroll-button--up', {}, classNames)}\n ref={forwardedRef}\n >\n {children ?? <CaretUp weight='bold' />}\n </SelectPrimitive.SelectScrollUpButton>\n );\n },\n);\n\ntype SelectScrollDownButtonProps = ThemedClassName<SelectPrimitive.SelectScrollDownButtonProps>;\n\nconst SelectScrollDownButton = forwardRef<HTMLDivElement, SelectScrollDownButtonProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.SelectScrollDownButton\n {...props}\n className={tx('select.scrollButton', 'select__scroll-button--down', {}, classNames)}\n ref={forwardedRef}\n >\n {children ?? <CaretDown weight='bold' />}\n </SelectPrimitive.SelectScrollDownButton>\n );\n },\n);\n\ntype SelectViewportProps = ThemedClassName<SelectPrimitive.SelectViewportProps>;\n\nconst SelectViewport = forwardRef<HTMLDivElement, SelectViewportProps>(\n ({ classNames, asChild, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.SelectViewport\n {...props}\n className={tx('select.viewport', 'select__viewport', {}, classNames)}\n ref={forwardedRef}\n >\n {children}\n </SelectPrimitive.SelectViewport>\n );\n },\n);\n\ntype SelectItemProps = ThemedClassName<SelectPrimitive.SelectItemProps>;\n\nconst SelectItem = forwardRef<HTMLDivElement, SelectItemProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return <SelectPrimitive.Item {...props} className={tx('select.item', 'option', {}, classNames)} ref={forwardedRef} />;\n});\n\ntype SelectItemTextProps = SelectPrimitive.SelectItemTextProps;\n\nconst SelectItemText = SelectPrimitive.ItemText;\n\ntype SelectItemIndicatorProps = ThemedClassName<SelectPrimitive.SelectItemIndicatorProps>;\n\nconst SelectItemIndicator = forwardRef<HTMLDivElement, SelectItemIndicatorProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.ItemIndicator\n {...props}\n className={tx('select.itemIndicator', 'option__indicator', {}, classNames)}\n ref={forwardedRef}\n >\n {children}\n </SelectPrimitive.ItemIndicator>\n );\n },\n);\n\ntype SelectOptionProps = SelectItemProps;\n\nconst SelectOption = forwardRef<HTMLDivElement, SelectItemProps>(({ children, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.Item {...props} className={tx('select.item', 'option', {}, classNames)} ref={forwardedRef}>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n <span className='grow w-1' />\n {/* <SelectPrimitive.ItemIndicator className={tx('select.itemIndicator', 'option__indicator', {})}> */}\n <Icon icon='ph--check--regular' />\n {/* </SelectPrimitive.ItemIndicator> */}\n </SelectPrimitive.Item>\n );\n});\n\ntype SelectGroupProps = SelectPrimitive.SelectGroupProps;\n\nconst SelectGroup = SelectPrimitive.Group;\n\ntype SelectLabelProps = SelectPrimitive.SelectLabelProps;\n\nconst SelectLabel = SelectPrimitive.Label;\n\ntype SelectSeparatorProps = ThemedClassName<SelectPrimitive.SelectSeparatorProps>;\n\nconst SelectSeparator = forwardRef<HTMLDivElement, SelectSeparatorProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.Separator\n {...props}\n className={tx('select.separator', 'select__separator', {}, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\ntype SelectArrowProps = ThemedClassName<SelectPrimitive.SelectArrowProps>;\n\nconst SelectArrow = forwardRef<SVGSVGElement, SelectArrowProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.Arrow\n {...props}\n className={tx('select.arrow', 'select__arrow', {}, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\nexport const Select = {\n Root: SelectRoot,\n Trigger: SelectTrigger,\n TriggerButton: SelectTriggerButton,\n Value: SelectValue,\n Icon: SelectIcon,\n Portal: SelectPortal,\n Content: SelectContent,\n ScrollUpButton: SelectScrollUpButton,\n ScrollDownButton: SelectScrollDownButton,\n Viewport: SelectViewport,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n Option: SelectOption,\n Group: SelectGroup,\n Label: SelectLabel,\n Separator: SelectSeparator,\n Arrow: SelectArrow,\n};\n\nexport type {\n SelectRootProps,\n SelectTriggerProps,\n SelectTriggerButtonProps,\n SelectValueProps,\n SelectIconProps,\n SelectPortalProps,\n SelectContentProps,\n SelectScrollUpButtonProps,\n SelectScrollDownButtonProps,\n SelectViewportProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectItemIndicatorProps,\n SelectOptionProps,\n SelectGroupProps,\n SelectLabelProps,\n SelectSeparatorProps,\n SelectArrowProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\nimport {\n Separator as SeparatorPrimitive,\n type SeparatorProps as SeparatorPrimitiveProps,\n} from '@radix-ui/react-separator';\nimport React, { forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ntype SeparatorProps = ThemedClassName<SeparatorPrimitiveProps> & { subdued?: boolean };\n\nconst Separator = forwardRef<HTMLDivElement, SeparatorProps>(\n ({ classNames, orientation = 'horizontal', subdued, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SeparatorPrimitive\n orientation={orientation}\n {...props}\n className={tx('separator.root', 'separator', { orientation, subdued }, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nexport type { SeparatorProps };\n\nexport { Separator };\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { type ChromaticPalette, type MessageValence, type NeutralPalette } from '@dxos/react-ui-types';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\nexport type TagProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.span>> & {\n palette?: NeutralPalette | ChromaticPalette | MessageValence;\n asChild?: boolean;\n};\n\nexport const Tag = forwardRef<HTMLSpanElement, TagProps>(\n ({ asChild, palette = 'neutral', classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.span;\n return (\n <Root\n {...props}\n className={tx('tag.root', 'dx-tag', { palette }, classNames)}\n data-hue={palette}\n ref={forwardedRef}\n />\n );\n },\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n ToastProvider as ToastProviderPrimitive,\n type ToastProviderProps as ToastProviderPrimitiveProps,\n ToastViewport as ToastViewportPrimitive,\n type ToastViewportProps as ToastViewportPrimitiveProps,\n Root as ToastRootPrimitive,\n type ToastProps as ToastRootPrimitiveProps,\n ToastTitle as ToastTitlePrimitive,\n type ToastTitleProps as ToastTitlePrimitiveProps,\n ToastDescription as ToastDescriptionPrimitive,\n type ToastDescriptionProps as ToastDescriptionPrimitiveProps,\n ToastAction as ToastActionPrimitive,\n type ToastActionProps as ToastActionPrimitiveProps,\n ToastClose as ToastClosePrimitive,\n type ToastCloseProps as ToastClosePrimitiveProps,\n} from '@radix-ui/react-toast';\nimport React, { type ComponentPropsWithRef, forwardRef, type FunctionComponent } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { ElevationProvider } from '../ElevationProvider';\n\ntype ToastProviderProps = ToastProviderPrimitiveProps;\n\nconst ToastProvider: FunctionComponent<ToastProviderProps> = ToastProviderPrimitive;\n\ntype ToastViewportProps = ThemedClassName<ToastViewportPrimitiveProps>;\n\nconst ToastViewport = forwardRef<HTMLOListElement, ToastViewportProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ToastViewportPrimitive className={tx('toast.viewport', 'toast-viewport', {}, classNames)} ref={forwardedRef} />\n );\n});\n\ntype ToastRootProps = ThemedClassName<ToastRootPrimitiveProps>;\n\nconst ToastRoot = forwardRef<HTMLLIElement, ToastRootProps>(({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ToastRootPrimitive {...props} className={tx('toast.root', 'toast', {}, classNames)} ref={forwardedRef}>\n <ElevationProvider elevation='toast'>{children}</ElevationProvider>\n </ToastRootPrimitive>\n );\n});\n\ntype ToastBodyProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>>;\n\nconst ToastBody = forwardRef<HTMLDivElement, ToastBodyProps>(({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n return <Root {...props} className={tx('toast.body', 'toast__body', {}, classNames)} ref={forwardedRef} />;\n});\n\ntype ToastTitleProps = ThemedClassName<ToastTitlePrimitiveProps>;\n\nconst ToastTitle = forwardRef<HTMLHeadingElement, ToastTitleProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : ToastTitlePrimitive;\n return <Root {...props} className={tx('toast.title', 'toast__title', {}, classNames)} ref={forwardedRef} />;\n },\n);\n\ntype ToastDescriptionProps = ThemedClassName<ToastDescriptionPrimitiveProps>;\n\nconst ToastDescription = forwardRef<HTMLParagraphElement, ToastDescriptionProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : ToastDescriptionPrimitive;\n return (\n <Root {...props} className={tx('toast.description', 'toast__description', {}, classNames)} ref={forwardedRef} />\n );\n },\n);\n\ntype ToastActionsProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>>;\n\nconst ToastActions = forwardRef<HTMLDivElement, ToastActionsProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n return <Root {...props} className={tx('toast.actions', 'toast__actions', {}, classNames)} ref={forwardedRef} />;\n },\n);\n\ntype ToastActionProps = ToastActionPrimitiveProps;\n\nconst ToastAction: FunctionComponent<ToastActionProps> = ToastActionPrimitive;\n\ntype ToastCloseProps = ToastClosePrimitiveProps;\n\nconst ToastClose: FunctionComponent<ToastCloseProps> = ToastClosePrimitive;\n\nexport const Toast = {\n Provider: ToastProvider,\n Viewport: ToastViewport,\n Root: ToastRoot,\n Body: ToastBody,\n Title: ToastTitle,\n Description: ToastDescription,\n Actions: ToastActions,\n Action: ToastAction,\n Close: ToastClose,\n};\n\nexport type {\n ToastProviderProps,\n ToastViewportProps,\n ToastRootProps,\n ToastBodyProps,\n ToastTitleProps,\n ToastDescriptionProps,\n ToastActionsProps,\n ToastActionProps,\n ToastCloseProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport type { ToggleGroupItemProps as ToggleGroupItemPrimitiveProps } from '@radix-ui/react-toggle-group';\nimport * as ToolbarPrimitive from '@radix-ui/react-toolbar';\nimport React, { forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport {\n Button,\n ButtonGroup,\n type ButtonGroupProps,\n type ButtonProps,\n Toggle,\n type ToggleGroupItemProps,\n type ToggleProps,\n IconButton,\n type IconButtonProps,\n} from '../Buttons';\nimport { Link, type LinkProps } from '../Link';\nimport { Separator, type SeparatorProps } from '../Separator';\n\ntype ToolbarRootProps = ThemedClassName<ToolbarPrimitive.ToolbarProps> & { layoutManaged?: boolean };\n\nconst ToolbarRoot = forwardRef<HTMLDivElement, ToolbarRootProps>(\n ({ classNames, children, layoutManaged, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ToolbarPrimitive.Root\n {...props}\n className={tx('toolbar.root', 'toolbar', { layoutManaged }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </ToolbarPrimitive.Root>\n );\n },\n);\n\ntype ToolbarButtonProps = ButtonProps;\n\nconst ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>((props, forwardedRef) => {\n return (\n <ToolbarPrimitive.Button asChild>\n <Button {...props} ref={forwardedRef} />\n </ToolbarPrimitive.Button>\n );\n});\n\ntype ToolbarIconButtonProps = IconButtonProps;\n\nconst ToolbarIconButton = forwardRef<HTMLButtonElement, ToolbarIconButtonProps>((props, forwardedRef) => {\n return (\n <ToolbarPrimitive.Button asChild>\n <IconButton {...props} ref={forwardedRef} />\n </ToolbarPrimitive.Button>\n );\n});\n\ntype ToolbarToggleProps = ToggleProps;\n\nconst ToolbarToggle = forwardRef<HTMLButtonElement, ToolbarToggleProps>((props, forwardedRef) => {\n return (\n <ToolbarPrimitive.Button asChild>\n <Toggle {...props} ref={forwardedRef} />\n </ToolbarPrimitive.Button>\n );\n});\n\ntype ToolbarLinkProps = LinkProps;\n\nconst ToolbarLink = forwardRef<HTMLAnchorElement, ToolbarLinkProps>((props, forwardedRef) => {\n return (\n <ToolbarPrimitive.Link asChild>\n <Link {...props} ref={forwardedRef} />\n </ToolbarPrimitive.Link>\n );\n});\n\ntype ToolbarToggleGroupProps = (\n | Omit<ToolbarPrimitive.ToolbarToggleGroupSingleProps, 'className'>\n | Omit<ToolbarPrimitive.ToolbarToggleGroupMultipleProps, 'className'>\n) &\n ButtonGroupProps;\n\nconst ToolbarToggleGroup = forwardRef<HTMLDivElement, ToolbarToggleGroupProps>(\n ({ classNames, children, elevation, ...props }, forwardedRef) => {\n return (\n <ToolbarPrimitive.ToolbarToggleGroup {...props} asChild>\n <ButtonGroup {...{ classNames, children, elevation }} ref={forwardedRef} />\n </ToolbarPrimitive.ToolbarToggleGroup>\n );\n },\n);\n\ntype ToolbarToggleGroupItemProps = ToggleGroupItemProps;\n\nconst ToolbarToggleGroupItem = forwardRef<HTMLButtonElement, ToolbarToggleGroupItemProps>(\n ({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {\n return (\n <ToolbarPrimitive.ToolbarToggleItem {...props} asChild>\n <Button {...{ variant, density, elevation, classNames, children }} ref={forwardedRef} />\n </ToolbarPrimitive.ToolbarToggleItem>\n );\n },\n);\n\ntype ToolbarToggleGroupIconItemProps = Omit<ToggleGroupItemPrimitiveProps, 'className'> & IconButtonProps;\n\nconst ToolbarToggleGroupIconItem = forwardRef<HTMLButtonElement, ToolbarToggleGroupIconItemProps>(\n ({ variant, density, elevation, classNames, icon, label, iconOnly, ...props }, forwardedRef) => {\n return (\n <ToolbarPrimitive.ToolbarToggleItem {...props} asChild>\n <IconButton {...{ variant, density, elevation, classNames, icon, label, iconOnly }} ref={forwardedRef} />\n </ToolbarPrimitive.ToolbarToggleItem>\n );\n },\n);\n\ntype ToolbarSeparatorProps = SeparatorProps & { variant?: 'gap' | 'line' };\n\nconst ToolbarSeparator = forwardRef<HTMLDivElement, ToolbarSeparatorProps>(\n ({ variant = 'line', ...props }, forwardedRef) => {\n return variant === 'line' ? (\n <ToolbarPrimitive.Separator asChild>\n <Separator {...props} ref={forwardedRef} />\n </ToolbarPrimitive.Separator>\n ) : (\n <ToolbarPrimitive.Separator className='grow' ref={forwardedRef} />\n );\n },\n);\n\nexport const Toolbar = {\n Root: ToolbarRoot,\n Button: ToolbarButton,\n IconButton: ToolbarIconButton,\n Link: ToolbarLink,\n Toggle: ToolbarToggle,\n ToggleGroup: ToolbarToggleGroup,\n ToggleGroupItem: ToolbarToggleGroupItem,\n ToggleGroupIconItem: ToolbarToggleGroupIconItem,\n Separator: ToolbarSeparator,\n};\n\nexport type {\n ToolbarRootProps,\n ToolbarButtonProps,\n ToolbarIconButtonProps,\n ToolbarLinkProps,\n ToolbarToggleProps,\n ToolbarToggleGroupProps,\n ToolbarToggleGroupItemProps,\n ToolbarToggleGroupIconItemProps,\n Tool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iBS;MAASC;MAASJ;MAAWrB;MAAY4B;MAAMC;MAAOC;MAAYpB,KAAKN;;;;;AAG/F,CAAA;AAKF,IAAM2B,mBAAmBhC,gBAAAA,aACvB,CAAC,EAAEyB,UAAU,QAAQ,GAAGrB,MAAAA,GAASC,iBAAAA;;;AAC/B,WAAOoB,YAAY,SACjB,gBAAAjB,QAAA,cAAkByB,4BAAS;MAACnB,SAAAA;OAC1B,gBAAAN,QAAA,cAACyB,YAAAA;MAAW,GAAG7B;MAAOO,KAAKN;UAG7B,gBAAAG,QAAA,cAAkByB,4BAAS;MAACvB,WAAU;MAAOC,KAAKN;;;;;AAEtD,CAAA;AAGK,IAAM6B,UAAU;EACrBzB,MAAMV;EACNc,QAAQD;EACRI,YAAYD;EACZK,MAAMD;EACND,QAAQD;EACRkB,aAAad;EACbe,iBAAiBZ;EACjBa,qBAAqBT;EACrBK,WAAWD;AACb;;;A9CvIO,IAAMM,oBAAoB,CAACC,iBAAAA;AAChC,QAAM,EAAEC,QAAO,IAAKC,YAAWC,cAAAA;AAC/B,SAAOH,gBAAgBC;AACzB;",
|
|
6
|
-
"names": ["useContext", "Primitive", "Slot", "React", "forwardRef", "useContext", "useElevationContext", "propsElevation", "elevation", "useContext", "ElevationContext", "useContext", "raise", "useThemeContext", "useContext", "ThemeContext", "raise", "Error", "ICONS_URL", "useIconHref", "icon", "noCache", "useThemeContext", "url", "Date", "getMinutes", "undefined", "useCallback", "useState", "useResize", "initialSafeArea", "top", "NaN", "right", "bottom", "left", "useSafeArea", "padding", "setPadding", "useState", "handleResize", "useCallback", "parseFloat", "getComputedStyle", "document", "documentElement", "getPropertyValue", "useResize", "useContext", "enUS", "dtLocaleEnUs", "i18Next", "React", "useEffect", "createContext", "useState", "Suspense", "useContext", "initReactI18next", "useTranslation", "useI18NextTranslation", "initialLng", "initialNs", "initialDtLocale", "dtLocaleEnUs", "isLabel", "o", "Array", "isArray", "length", "ns", "toLocalizedString", "label", "t", "resources", "i18Next", "use", "initReactI18next", "init", "lng", "defaultNS", "interpolation", "escapeValue", "TranslationsContext", "createContext", "appNs", "dtLocale", "useTranslation", "args", "result", "useI18NextTranslation", "useContext", "TranslationsProvider", "fallback", "resourceExtensions", "children", "loaded", "setLoaded", "useState", "useEffect", "forEach", "resource", "Object", "keys", "language", "addResourceBundle", "Provider", "value", "Suspense", "useTranslationsContext", "useContext", "TranslationsContext", "useCallback", "useState", "useResize", "useVisualViewport", "deps", "width", "setWidth", "useState", "height", "setHeight", "handleResize", "useCallback", "window", "visualViewport", "useResize", "AnchoredOverflowRoot", "forwardRef", "asChild", "classNames", "children", "props", "forwardedRef", "tx", "useThemeContext", "Root", "Slot", "Primitive", "div", "React", "role", "className", "ref", "AnchoredOverflowAnchor", "AnchoredOverflow", "Anchor", "createContext", "Primitive", "Slot", "React", "forwardRef", "DxAvatar", "useId", "mx", "AVATAR_NAME", "AvatarProvider", "useAvatarContext", "createContext", "AvatarRoot", "children", "labelId", "propsLabelId", "descriptionId", "propsDescriptionId", "useId", "React", "AvatarContent", "forwardRef", "icon", "classNames", "props", "forwardedRef", "href", "useIconHref", "DxAvatar", "aria-labelledby", "aria-describedby", "rootClassName", "mx", "ref", "AvatarLabel", "asChild", "srOnly", "Root", "Slot", "Primitive", "span", "tx", "useThemeContext", "id", "className", "AvatarDescription", "Avatar", "Content", "Label", "Description", "Dot", "Primitive", "Slot", "React", "forwardRef", "Primitive", "Slot", "React", "forwardRef", "Link", "forwardRef", "asChild", "variant", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "Root", "Slot", "Primitive", "a", "React", "className", "ref", "BreadcrumbRoot", "forwardRef", "asChild", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "Root", "Slot", "Primitive", "div", "React", "role", "className", "ref", "BreadcrumbList", "ol", "BreadcrumbListItem", "li", "BreadcrumbLink", "Link", "BreadcrumbCurrent", "aria-current", "BreadcrumbSeparator", "children", "span", "aria-hidden", "Dot", "weight", "Breadcrumb", "List", "ListItem", "Current", "Separator", "createContext", "Primitive", "Slot", "React", "forwardRef", "memo", "BUTTON_GROUP_NAME", "BUTTON_NAME", "ButtonGroupProvider", "useButtonGroupContext", "createContext", "inGroup", "Button", "memo", "forwardRef", "classNames", "children", "density", "propsDensity", "elevation", "propsElevation", "variant", "asChild", "props", "ref", "tx", "useThemeContext", "useElevationContext", "useDensityContext", "Root", "Slot", "Primitive", "button", "React", "data-variant", "data-density", "data-props", "className", "disabled", "displayName", "ButtonGroup", "forwardedRef", "div", "role", "React", "forwardRef", "React", "forwardRef", "memo", "Icon", "memo", "forwardRef", "icon", "classNames", "size", "props", "forwardedRef", "tx", "useThemeContext", "href", "useIconHref", "React", "svg", "className", "ref", "use", "composeEventHandlers", "useComposedRefs", "createContextScope", "DismissableLayer", "useId", "PopperPrimitive", "createPopperScope", "Portal", "PortalPrimitive", "Presence", "Primitive", "Slottable", "useControllableState", "VisuallyHiddenPrimitive", "React", "forwardRef", "useCallback", "useEffect", "useMemo", "useRef", "useState", "createTooltipContext", "createTooltipScope", "createContextScope", "createPopperScope", "usePopperScope", "DEFAULT_DELAY_DURATION", "TOOLTIP_OPEN", "TOOLTIP_NAME", "TooltipContextProvider", "useTooltipContext", "TooltipProvider", "props", "__scopeTooltip", "children", "open", "openProp", "defaultOpen", "onOpenChange", "disableHoverableContent", "delayDuration", "skipDelayDuration", "isOpenDelayedRef", "useRef", "isPointerInTransitRef", "skipDelayTimerRef", "useEffect", "skipDelayTimer", "current", "window", "clearTimeout", "popperScope", "trigger", "setTrigger", "useState", "content", "setContent", "side", "setSide", "undefined", "triggerRef", "handleTriggerChange", "useCallback", "nextTrigger", "getAttribute", "contentId", "useId", "openTimerRef", "wasOpenDelayedRef", "handleOpenChange", "document", "dispatchEvent", "CustomEvent", "setTimeout", "setOpen", "useControllableState", "prop", "defaultProp", "onChange", "stateAttribute", "useMemo", "handleOpen", "handleClose", "handleDelayedOpen", "tx", "useThemeContext", "elevation", "useElevationContext", "React", "Root", "scope", "onTriggerChange", "onTriggerEnter", "onTriggerLeave", "onOpen", "onClose", "onPointerInTransitChange", "inTransit", "TooltipContent", "className", "TooltipArrow", "TooltipVirtualTrigger", "virtualRef", "displayName", "Anchor", "asChild", "TRIGGER_NAME", "TooltipTrigger", "forwardRef", "forwardedRef", "onInteract", "_delayDuration", "triggerProps", "context", "ref", "composedRefs", "useComposedRefs", "isPointerDownRef", "hasPointerMoveOpenedRef", "handlePointerUp", "removeEventListener", "Primitive", "button", "aria-describedby", "data-state", "data-tooltip-content", "data-tooltip-side", "onPointerMove", "composeEventHandlers", "event", "pointerType", "defaultPrevented", "onPointerLeave", "onPointerDown", "addEventListener", "once", "onFocus", "onBlur", "onClick", "PORTAL_NAME", "PortalProvider", "usePortalContext", "forceMount", "TooltipPortal", "container", "Presence", "present", "PortalPrimitive", "CONTENT_NAME", "portalContext", "contentProps", "TooltipContentImpl", "TooltipContentHoverable", "pointerGraceArea", "setPointerGraceArea", "handleRemoveGraceArea", "handleCreateGraceArea", "hoverTarget", "currentTarget", "exitPoint", "x", "clientX", "y", "clientY", "exitSide", "getExitSideFromRect", "getBoundingClientRect", "paddedExitPoints", "getPaddedExitPoints", "hoverTargetPoints", "getPointsFromRect", "graceArea", "getHull", "handleTriggerLeave", "handleContentLeave", "handleTrackPointerGrace", "target", "pointerPosition", "hasEnteredTarget", "contains", "isPointerOutsideGraceArea", "isPointInPolygon", "VisuallyHiddenContentContextProvider", "useVisuallyHiddenContentContext", "isInside", "ariaLabel", "onEscapeKeyDown", "onPointerDownOutside", "handleScroll", "capture", "DismissableLayer", "disableOutsidePointerEvents", "onFocusOutside", "preventDefault", "onDismiss", "Content", "style", "Slottable", "id", "role", "ARROW_NAME", "arrowProps", "visuallyHiddenContentContext", "Arrow", "point", "rect", "top", "Math", "abs", "bottom", "right", "left", "min", "Error", "padding", "push", "polygon", "inside", "i", "j", "length", "xi", "yi", "xj", "yj", "intersect", "points", "newPoints", "slice", "sort", "a", "b", "getHullPresorted", "upperHull", "p", "q", "r", "pop", "lowerHull", "concat", "Tooltip", "Provider", "Trigger", "IconOnlyButton", "forwardRef", "noTooltip", "tooltipPortal", "tooltipSide", "props", "forwardedRef", "React", "LabelledIconButton", "ref", "Tooltip", "Trigger", "asChild", "content", "label", "side", "icon", "size", "iconOnly", "classNames", "iconClassNames", "caretDown", "tx", "useThemeContext", "Button", "Icon", "span", "className", "undefined", "IconButton", "Toggle", "TogglePrimitive", "React", "forwardRef", "Toggle", "forwardRef", "defaultPressed", "pressed", "onPressedChange", "props", "forwardedRef", "React", "TogglePrimitive", "asChild", "Button", "ref", "ToggleGroup", "ToggleGroupPrimitive", "ToggleGroupItem", "ToggleGroupItemPrimitive", "React", "forwardRef", "ToggleGroup", "forwardRef", "classNames", "children", "props", "forwardedRef", "React", "ToggleGroupPrimitive", "asChild", "ButtonGroup", "ref", "ToggleGroupItem", "variant", "elevation", "density", "ToggleGroupItemPrimitive", "Button", "React", "createContext", "useCallback", "useContext", "useState", "ClipboardContext", "createContext", "textValue", "setTextValue", "_", "useClipboard", "useContext", "ClipboardProvider", "children", "setInternalTextValue", "useState", "useCallback", "nextValue", "navigator", "clipboard", "writeText", "React", "Provider", "value", "React", "mx", "createKeyborg", "React", "createContext", "useEffect", "useMemo", "hasIosKeyboard", "navigator", "userAgent", "match", "React", "createContext", "DensityContext", "createContext", "density", "DensityProvider", "children", "React", "Provider", "value", "React", "createContext", "ElevationContext", "createContext", "elevation", "ElevationProvider", "children", "React", "Provider", "value", "ThemeContext", "createContext", "undefined", "ThemeProvider", "children", "fallback", "resourceExtensions", "appNs", "tx", "_path", "defaultClassName", "_styleProps", "_options", "themeMode", "rootDensity", "rest", "useEffect", "document", "defaultView", "kb", "createKeyborg", "subscribe", "handleInputModalityChange", "unsubscribe", "safeAreaPadding", "useSafeArea", "contextValue", "useMemo", "hasIosKeyboard", "React", "Provider", "value", "TranslationsProvider", "ElevationProvider", "elevation", "DensityProvider", "density", "isUsingKeyboard", "body", "setAttribute", "removeAttribute", "inactiveLabelStyles", "CopyButton", "classNames", "value", "size", "props", "t", "useTranslation", "textValue", "setTextValue", "useClipboard", "isCopied", "React", "Button", "onClick", "data-testid", "div", "role", "className", "mx", "span", "Icon", "icon", "CopyButtonIconOnly", "__scopeTooltip", "variant", "label", "onOpen", "useTooltipContext", "IconButton", "iconOnly", "then", "Clipboard", "Button", "CopyButton", "IconButton", "CopyButtonIconOnly", "Provider", "ClipboardProvider", "createContext", "Root", "DialogRootPrimitive", "DialogTrigger", "DialogTriggerPrimitive", "DialogPortal", "DialogPortalPrimitive", "DialogOverlay", "DialogOverlayPrimitive", "DialogTitle", "DialogTitlePrimitive", "DialogDescription", "DialogDescriptionPrimitive", "DialogClose", "DialogClosePrimitive", "DialogContent", "DialogContentPrimitive", "React", "forwardRef", "DialogRoot", "props", "React", "ElevationProvider", "elevation", "DialogRootPrimitive", "DialogTrigger", "DialogTriggerPrimitive", "DialogPortal", "DialogPortalPrimitive", "DialogTitle", "forwardRef", "classNames", "srOnly", "forwardedRef", "tx", "useThemeContext", "DialogTitlePrimitive", "className", "ref", "DialogDescription", "DialogDescriptionPrimitive", "DialogClose", "DialogClosePrimitive", "DIALOG_OVERLAY_NAME", "DIALOG_CONTENT_NAME", "OverlayLayoutProvider", "useOverlayLayoutContext", "createContext", "DialogOverlay", "children", "blockAlign", "DialogOverlayPrimitive", "data-block-align", "inOverlayLayout", "displayName", "DialogContent", "propsInOverlayLayout", "DialogContentPrimitive", "aria-describedby", "undefined", "Dialog", "Root", "Trigger", "Portal", "Overlay", "Content", "Title", "Description", "Close", "Root", "AlertDialogRootPrimitive", "AlertDialogTrigger", "AlertDialogTriggerPrimitive", "AlertDialogPortal", "AlertDialogPortalPrimitive", "AlertDialogOverlay", "AlertDialogOverlayPrimitive", "AlertDialogTitle", "AlertDialogTitlePrimitive", "AlertDialogDescription", "AlertDialogDescriptionPrimitive", "AlertDialogAction", "AlertDialogActionPrimitive", "AlertDialogCancel", "AlertDialogCancelPrimitive", "AlertDialogContent", "AlertDialogContentPrimitive", "createContext", "React", "forwardRef", "AlertDialogRoot", "props", "React", "ElevationProvider", "elevation", "AlertDialogRootPrimitive", "AlertDialogTrigger", "AlertDialogTriggerPrimitive", "AlertDialogPortal", "AlertDialogPortalPrimitive", "AlertDialogCancel", "AlertDialogCancelPrimitive", "AlertDialogAction", "AlertDialogActionPrimitive", "AlertDialogTitle", "forwardRef", "classNames", "srOnly", "forwardedRef", "tx", "useThemeContext", "AlertDialogTitlePrimitive", "className", "ref", "AlertDialogDescription", "AlertDialogDescriptionPrimitive", "ALERT_DIALOG_OVERLAY_NAME", "ALERT_DIALOG_CONTENT_NAME", "OverlayLayoutProvider", "useOverlayLayoutContext", "createContext", "inOverlayLayout", "AlertDialogOverlay", "children", "blockAlign", "AlertDialogOverlayPrimitive", "data-block-align", "displayName", "AlertDialogContent", "AlertDialogContentPrimitive", "AlertDialog", "Root", "Trigger", "Portal", "Overlay", "Content", "Title", "Description", "Cancel", "Action", "Root", "CheckboxPrimitive", "useControllableState", "React", "forwardRef", "useCallback", "InputRoot", "PinInput", "PinInputPrimitive", "TextInput", "TextInputPrimitive", "TextArea", "TextAreaPrimitive", "useInputContext", "INPUT_NAME", "Description", "DescriptionPrimitive", "DescriptionAndValidation", "DescriptionAndValidationPrimitive", "Label", "LabelPrimitive", "Validation", "ValidationPrimitive", "mx", "Label", "forwardRef", "srOnly", "classNames", "children", "props", "forwardedRef", "tx", "useThemeContext", "React", "LabelPrimitive", "className", "ref", "Description", "DescriptionPrimitive", "Validation", "__inputScope", "validationValence", "useInputContext", "INPUT_NAME", "ValidationPrimitive", "DescriptionAndValidation", "DescriptionAndValidationPrimitive", "PinInput", "density", "propsDensity", "elevation", "propsElevation", "segmentClassName", "propsSegmentClassName", "inputClassName", "variant", "hasIosKeyboard", "useDensityContext", "useElevationContext", "useCallback", "focused", "disabled", "PinInputPrimitive", "autoFocus", "TextInput", "themeContextValue", "TextInputPrimitive", "TextArea", "TextAreaPrimitive", "Checkbox", "checked", "propsChecked", "defaultChecked", "propsDefaultChecked", "onCheckedChange", "propsOnCheckedChange", "size", "weight", "useControllableState", "prop", "defaultProp", "onChange", "id", "descriptionId", "errorMessageId", "CheckboxPrimitive", "Icon", "icon", "Switch", "input", "type", "mx", "event", "target", "aria-describedby", "Input", "Root", "InputRoot", "CaretDown", "CaretRight", "Slot", "React", "forwardRef", "List", "ListPrimitive", "ListItemHeading", "ListPrimitiveItemHeading", "ListItemOpenTrigger", "ListPrimitiveItemOpenTrigger", "ListItemCollapsibleContent", "ListItem", "ListPrimitiveItem", "LIST_NAME", "LIST_ITEM_NAME", "useListContext", "useListItemContext", "React", "edgeToOrientationMap", "top", "bottom", "left", "right", "orientationStyles", "horizontal", "vertical", "edgeStyles", "strokeSize", "terminalSize", "offsetToAlignTerminalWithLine", "ListDropIndicator", "edge", "gap", "lineInset", "terminalInset", "orientation", "React", "div", "role", "style", "className", "List", "forwardRef", "classNames", "children", "props", "forwardedRef", "tx", "useThemeContext", "density", "useDensityContext", "React", "DensityProvider", "ListPrimitive", "className", "ref", "ListItemEndcap", "asChild", "Root", "Slot", "role", "MockListItemOpenTrigger", "div", "ListItemHeading", "ListPrimitiveItemHeading", "ListItemOpenTrigger", "__listItemScope", "open", "useListItemContext", "LIST_ITEM_NAME", "Icon", "CaretDown", "CaretRight", "ListPrimitiveItemOpenTrigger", "weight", "ListItemRoot", "ListPrimitiveItem", "collapsible", "ListItem", "Endcap", "Heading", "OpenTrigger", "CollapsibleContent", "ListItemCollapsibleContent", "MockOpenTrigger", "DropIndicator", "ListDropIndicator", "React", "forwardRef", "React", "edgeToOrientationMap", "reparent", "orientationStyles", "sibling", "child", "instructionStyles", "strokeSize", "terminalSize", "offsetToAlignTerminalWithLine", "TreeDropIndicator", "instruction", "gap", "lineOffset", "isBlocked", "type", "desiredInstruction", "desired", "orientation", "React", "div", "style", "currentLevel", "indentPerLevel", "className", "TreeRoot", "forwardRef", "props", "forwardedRef", "React", "List", "ref", "TreeBranch", "__listScope", "headingId", "useListItemContext", "LIST_ITEM_NAME", "aria-labelledby", "TreeItemRoot", "ListItem", "Root", "role", "TreeItemHeading", "Heading", "TreeItemOpenTrigger", "OpenTrigger", "MockTreeItemOpenTrigger", "MockOpenTrigger", "TreeItemBody", "CollapsibleContent", "Tree", "Branch", "TreeItem", "Body", "DropIndicator", "TreeDropIndicator", "useArrowNavigationGroup", "useFocusableGroup", "createContextScope", "Primitive", "Slot", "useControllableState", "React", "forwardRef", "TREEGRID_ROW_NAME", "createTreegridRowContext", "createTreegridRowScope", "createContextScope", "TreegridRowProvider", "useTreegridRowContext", "PATH_SEPARATOR", "PARENT_OF_SEPARATOR", "TreegridRoot", "forwardRef", "asChild", "classNames", "children", "style", "gridTemplateColumns", "props", "forwardedRef", "tx", "useThemeContext", "Root", "Slot", "Primitive", "div", "arrowNavigationAttrs", "useArrowNavigationGroup", "axis", "tabbable", "circular", "React", "role", "className", "ref", "TreegridRow", "__treegridRowScope", "id", "parentOf", "open", "propsOpen", "defaultOpen", "onOpenChange", "propsOnOpenChange", "pathParts", "split", "level", "length", "useControllableState", "prop", "onChange", "defaultProp", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "arrowGroupAttrs", "memorizeCurrent", "scope", "aria-level", "tabIndex", "TreegridCell", "indent", "Treegrid", "Row", "Cell", "createContext", "Root", "DialogRoot", "DialogContent", "DialogTitle", "Primitive", "Slot", "useControllableState", "React", "forwardRef", "useCallback", "useEffect", "useRef", "useState", "log", "useMediaQuery", "useForwardedRef", "useCallback", "useEffect", "useState", "useSwipeToDismiss", "ref", "onDismiss", "dismissThreshold", "debounceThreshold", "offset", "$root", "current", "motionState", "setMotionState", "useState", "gestureStartX", "setGestureStartX", "setIdle", "useCallback", "style", "removeProperty", "setProperty", "setFollowing", "handlePointerDown", "screenX", "handlePointerMove", "delta", "Math", "min", "abs", "handlePointerUp", "useEffect", "addEventListener", "removeEventListener", "document", "documentElement", "MAIN_ROOT_NAME", "NAVIGATION_SIDEBAR_NAME", "COMPLEMENTARY_SIDEBAR_NAME", "MAIN_NAME", "GENERIC_CONSUMER_NAME", "landmarkAttr", "useLandmarkMover", "propsOnKeyDown", "landmark", "handleKeyDown", "useCallback", "event", "target", "currentTarget", "key", "hasAttribute", "preventDefault", "landmarks", "Array", "from", "document", "querySelectorAll", "map", "el", "parseInt", "getAttribute", "NaN", "sort", "l", "length", "cursor", "indexOf", "nextLandmark", "getModifierState", "querySelector", "focus", "focusableGroupAttrs", "window", "tabBehavior", "ignoreDefaultKeydown", "Tab", "onKeyDown", "tabIndex", "MainProvider", "useMainContext", "createContext", "resizing", "navigationSidebarState", "setNavigationSidebarState", "nextState", "log", "warn", "complementarySidebarState", "setComplementarySidebarState", "useSidebars", "consumerName", "toggleNavigationSidebar", "openNavigationSidebar", "collapseNavigationSidebar", "closeNavigationSidebar", "toggleComplementarySidebar", "openComplementarySidebar", "collapseComplementarySidebar", "closeComplementarySidebar", "resizeDebounce", "MainRoot", "propsNavigationSidebarState", "defaultNavigationSidebarState", "onNavigationSidebarStateChange", "propsComplementarySidebarState", "defaultComplementarySidebarState", "onComplementarySidebarStateChange", "children", "props", "isLg", "useMediaQuery", "ssr", "useControllableState", "prop", "defaultProp", "onChange", "setResizing", "useState", "resizeInterval", "useRef", "handleResize", "current", "clearTimeout", "setTimeout", "useEffect", "addEventListener", "removeEventListener", "React", "displayName", "handleOpenAutoFocus", "body", "MainSidebar", "forwardRef", "classNames", "swipeToDismiss", "onOpenAutoFocus", "state", "onStateChange", "side", "label", "forwardedRef", "tx", "useThemeContext", "t", "useTranslation", "ref", "useForwardedRef", "noopRef", "useSwipeToDismiss", "onDismiss", "closest", "Root", "Primitive", "div", "DialogContent", "DialogRoot", "open", "aria-label", "toLocalizedString", "modal", "DialogTitle", "className", "forceMount", "data-side", "data-state", "data-resizing", "inert", "MainNavigationSidebar", "mover", "MainComplementarySidebar", "MainContent", "asChild", "bounce", "handlesFocus", "role", "Slot", "data-sidebar-inline-start-state", "data-sidebar-inline-end-state", "data-handles-focus", "MainOverlay", "onClick", "inlineStartSidebarOpen", "inlineEndSidebarOpen", "aria-hidden", "Main", "Content", "Overlay", "NavigationSidebar", "ComplementarySidebar", "ContextMenuPrimitive", "Primitive", "Slot", "React", "forwardRef", "useMemo", "propIsNumber", "prop", "Number", "isFinite", "propsIsRecord", "safePadding", "propsPadding", "side", "useSafeCollisionPadding", "collisionPadding", "safeAreaPadding", "useThemeContext", "useMemo", "top", "right", "bottom", "left", "ContextMenuRoot", "ContextMenu", "ContextMenuTrigger", "Trigger", "ContextMenuPortal", "Portal", "ContextMenuContent", "forwardRef", "classNames", "children", "collisionPadding", "props", "forwardedRef", "tx", "useThemeContext", "elevation", "useElevationContext", "safeCollisionPadding", "useSafeCollisionPadding", "React", "Content", "className", "ref", "ContextMenuViewport", "asChild", "Root", "Slot", "Primitive", "div", "ContextMenuArrow", "Arrow", "ContextMenuGroup", "Group", "ContextMenuItemIndicator", "ItemIndicator", "ContextMenuItem", "Item", "ContextMenuCheckboxItem", "CheckboxItem", "ContextMenuSeparator", "Separator", "ContextMenuGroupLabel", "Label", "Viewport", "GroupLabel", "composeEventHandlers", "composeRefs", "createContextScope", "useId", "MenuPrimitive", "createMenuScope", "Primitive", "Slot", "useControllableState", "React", "useRef", "useCallback", "forwardRef", "useEffect", "DROPDOWN_MENU_NAME", "createDropdownMenuContext", "createDropdownMenuScope", "createContextScope", "createMenuScope", "useMenuScope", "DropdownMenuProvider", "useDropdownMenuContext", "DropdownMenuRoot", "props", "__scopeDropdownMenu", "children", "dir", "open", "openProp", "defaultOpen", "onOpenChange", "modal", "menuScope", "triggerRef", "useRef", "setOpen", "useControllableState", "prop", "defaultProp", "onChange", "React", "scope", "triggerId", "useId", "contentId", "onOpenToggle", "useCallback", "prevOpen", "Root", "displayName", "TRIGGER_NAME", "DropdownMenuTrigger", "forwardRef", "forwardedRef", "disabled", "triggerProps", "context", "Anchor", "asChild", "Primitive", "button", "type", "id", "aria-haspopup", "aria-expanded", "aria-controls", "undefined", "data-state", "data-disabled", "ref", "composeRefs", "onPointerDown", "composeEventHandlers", "event", "ctrlKey", "preventDefault", "onKeyDown", "includes", "key", "VIRTUAL_TRIGGER_NAME", "DropdownMenuVirtualTrigger", "virtualRef", "useEffect", "current", "PORTAL_NAME", "DropdownMenuPortal", "portalProps", "Portal", "DropdownMenuViewport", "classNames", "tx", "useThemeContext", "Slot", "div", "className", "CONTENT_NAME", "DropdownMenuContent", "collisionPadding", "contentProps", "elevation", "useElevationContext", "hasInteractedOutsideRef", "safeCollisionPadding", "useSafeCollisionPadding", "Content", "aria-labelledby", "onCloseAutoFocus", "focus", "onInteractOutside", "originalEvent", "detail", "ctrlLeftClick", "isRightClick", "style", "GROUP_NAME", "DropdownMenuGroup", "groupProps", "Group", "LABEL_NAME", "DropdownMenuGroupLabel", "labelProps", "Label", "ITEM_NAME", "DropdownMenuItem", "itemProps", "Item", "CHECKBOX_ITEM_NAME", "DropdownMenuCheckboxItem", "checkboxItemProps", "CheckboxItem", "RADIO_GROUP_NAME", "DropdownMenuRadioGroup", "radioGroupProps", "RadioGroup", "RADIO_ITEM_NAME", "DropdownMenuRadioItem", "radioItemProps", "RadioItem", "INDICATOR_NAME", "DropdownMenuItemIndicator", "itemIndicatorProps", "ItemIndicator", "SEPARATOR_NAME", "DropdownMenuSeparator", "separatorProps", "Separator", "ARROW_NAME", "DropdownMenuArrow", "arrowProps", "Arrow", "DropdownMenuSub", "Sub", "SUB_TRIGGER_NAME", "DropdownMenuSubTrigger", "subTriggerProps", "SubTrigger", "SUB_CONTENT_NAME", "DropdownMenuSubContent", "subContentProps", "SubContent", "DropdownMenu", "Trigger", "VirtualTrigger", "Viewport", "GroupLabel", "useDropdownMenuMenuScope", "createContext", "Primitive", "Slot", "React", "forwardRef", "useId", "messageIcons", "success", "info", "warning", "error", "neutral", "MESSAGE_NAME", "MessageProvider", "useMessageContext", "createContext", "MessageRoot", "forwardRef", "asChild", "valence", "elevation", "propsElevation", "classNames", "titleId", "propsTitleId", "descriptionId", "propsDescriptionId", "children", "props", "forwardedRef", "tx", "useThemeContext", "useId", "useElevationContext", "Root", "Slot", "Primitive", "div", "React", "role", "className", "aria-labelledby", "aria-describedby", "ref", "displayName", "MESSAGE_TITLE_NAME", "MessageTitle", "icon", "h2", "id", "Icon", "size", "span", "MESSAGE_BODY_NAME", "MessageContent", "p", "Message", "Title", "Content", "Callout", "composeEventHandlers", "useComposedRefs", "createContextScope", "DismissableLayer", "useFocusGuards", "FocusScope", "useId", "PopperPrimitive", "createPopperScope", "Portal", "PortalPrimitive", "Presence", "Primitive", "Slot", "useControllableState", "hideOthers", "React", "forwardRef", "useRef", "useCallback", "useState", "useEffect", "RemoveScroll", "POPOVER_NAME", "createPopoverContext", "createPopoverScope", "createContextScope", "createPopperScope", "usePopperScope", "PopoverProvider", "usePopoverContext", "PopoverRoot", "props", "__scopePopover", "children", "open", "openProp", "defaultOpen", "onOpenChange", "modal", "popperScope", "triggerRef", "useRef", "hasCustomAnchor", "setHasCustomAnchor", "useState", "setOpen", "useControllableState", "prop", "defaultProp", "onChange", "React", "Root", "scope", "contentId", "useId", "onOpenToggle", "useCallback", "prevOpen", "onCustomAnchorAdd", "onCustomAnchorRemove", "displayName", "ANCHOR_NAME", "PopoverAnchor", "forwardRef", "forwardedRef", "anchorProps", "context", "useEffect", "Anchor", "ref", "TRIGGER_NAME", "PopoverTrigger", "triggerProps", "composedTriggerRef", "useComposedRefs", "trigger", "Primitive", "button", "type", "aria-haspopup", "aria-expanded", "aria-controls", "data-state", "getState", "onClick", "composeEventHandlers", "asChild", "VIRTUAL_TRIGGER_NAME", "PopoverVirtualTrigger", "virtualRef", "current", "PORTAL_NAME", "PortalProvider", "usePortalContext", "forceMount", "undefined", "PopoverPortal", "container", "Presence", "present", "PortalPrimitive", "CONTENT_NAME", "PopoverContent", "portalContext", "contentProps", "PopoverContentModal", "PopoverContentNonModal", "contentRef", "composedRefs", "isRightClickOutsideRef", "content", "hideOthers", "RemoveScroll", "as", "Slot", "allowPinchZoom", "PopoverContentImpl", "trapFocus", "disableOutsidePointerEvents", "onCloseAutoFocus", "event", "preventDefault", "focus", "onPointerDownOutside", "originalEvent", "detail", "ctrlLeftClick", "ctrlKey", "isRightClick", "checkForDefaultPrevented", "onFocusOutside", "hasInteractedOutsideRef", "hasPointerDownOutsideRef", "defaultPrevented", "onInteractOutside", "target", "targetIsTrigger", "contains", "onOpenAutoFocus", "onEscapeKeyDown", "collisionPadding", "classNames", "tx", "useThemeContext", "elevation", "useElevationContext", "safeCollisionPadding", "useSafeCollisionPadding", "useFocusGuards", "FocusScope", "loop", "trapped", "onMountAutoFocus", "onUnmountAutoFocus", "DismissableLayer", "onDismiss", "Content", "role", "id", "className", "style", "CLOSE_NAME", "PopoverClose", "closeProps", "ARROW_NAME", "PopoverArrow", "arrowProps", "Arrow", "PopoverViewport", "constrainInline", "constrainBlock", "div", "Popover", "Trigger", "VirtualTrigger", "Portal", "Close", "Viewport", "React", "forwardRef", "Status", "forwardRef", "classNames", "children", "progress", "indeterminate", "variant", "props", "forwardedRef", "tx", "useThemeContext", "React", "span", "role", "className", "ref", "style", "width", "Math", "round", "Root", "ScrollAreaPrimitiveRoot", "Viewport", "ScrollAreaPrimitiveViewport", "Scrollbar", "ScrollAreaPrimitiveScrollbar", "Thumb", "ScrollAreaPrimitiveThumb", "Corner", "ScrollAreaPrimitiveCorner", "React", "forwardRef", "ScrollAreaRoot", "forwardRef", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "React", "ScrollAreaPrimitiveRoot", "className", "ref", "ScrollAreaViewport", "ScrollAreaPrimitiveViewport", "ScrollAreaScrollbar", "variant", "ScrollAreaPrimitiveScrollbar", "data-variant", "ScrollAreaThumb", "ScrollAreaPrimitiveThumb", "ScrollAreaCorner", "ScrollAreaPrimitiveCorner", "ScrollArea", "Root", "Viewport", "Scrollbar", "Thumb", "Corner", "CaretDown", "CaretUp", "SelectPrimitive", "React", "forwardRef", "SelectRoot", "Root", "SelectTrigger", "Trigger", "SelectValue", "Value", "SelectIcon", "Icon", "SelectPortal", "Portal", "SelectTriggerButton", "forwardRef", "children", "placeholder", "props", "forwardedRef", "tx", "useThemeContext", "React", "asChild", "ref", "Button", "span", "className", "CaretDown", "weight", "SelectContent", "classNames", "collisionPadding", "elevation", "useElevationContext", "safeCollisionPadding", "useSafeCollisionPadding", "Content", "position", "SelectScrollUpButton", "CaretUp", "SelectScrollDownButton", "SelectViewport", "SelectItem", "Item", "SelectItemText", "ItemText", "SelectItemIndicator", "ItemIndicator", "SelectOption", "icon", "SelectGroup", "Group", "SelectLabel", "Label", "SelectSeparator", "Separator", "SelectArrow", "Arrow", "Select", "TriggerButton", "ScrollUpButton", "ScrollDownButton", "Viewport", "Option", "Separator", "SeparatorPrimitive", "React", "forwardRef", "Separator", "forwardRef", "classNames", "orientation", "subdued", "props", "forwardedRef", "tx", "useThemeContext", "React", "SeparatorPrimitive", "className", "ref", "Primitive", "Slot", "React", "forwardRef", "Tag", "forwardRef", "asChild", "palette", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "Root", "Slot", "Primitive", "span", "React", "className", "data-hue", "ref", "Primitive", "Slot", "ToastProvider", "ToastProviderPrimitive", "ToastViewport", "ToastViewportPrimitive", "Root", "ToastRootPrimitive", "ToastTitle", "ToastTitlePrimitive", "ToastDescription", "ToastDescriptionPrimitive", "ToastAction", "ToastActionPrimitive", "ToastClose", "ToastClosePrimitive", "React", "forwardRef", "ToastProvider", "ToastProviderPrimitive", "ToastViewport", "forwardRef", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "React", "ToastViewportPrimitive", "className", "ref", "ToastRoot", "children", "ToastRootPrimitive", "ElevationProvider", "elevation", "ToastBody", "asChild", "Root", "Slot", "Primitive", "div", "ToastTitle", "ToastTitlePrimitive", "ToastDescription", "ToastDescriptionPrimitive", "ToastActions", "ToastAction", "ToastActionPrimitive", "ToastClose", "ToastClosePrimitive", "Toast", "Provider", "Viewport", "Body", "Title", "Description", "Actions", "Action", "Close", "ToolbarPrimitive", "React", "forwardRef", "ToolbarRoot", "forwardRef", "classNames", "children", "layoutManaged", "props", "forwardedRef", "tx", "useThemeContext", "React", "Root", "className", "ref", "ToolbarButton", "Button", "asChild", "ToolbarIconButton", "IconButton", "ToolbarToggle", "Toggle", "ToolbarLink", "Link", "ToolbarToggleGroup", "elevation", "ButtonGroup", "ToolbarToggleGroupItem", "variant", "density", "ToolbarToggleItem", "ToolbarToggleGroupIconItem", "icon", "label", "iconOnly", "ToolbarSeparator", "Separator", "Toolbar", "ToggleGroup", "ToggleGroupItem", "ToggleGroupIconItem", "useDensityContext", "propsDensity", "density", "useContext", "DensityContext"]
|
|
7
|
-
}
|