@pega/cosmos-react-core 9.0.0-build.13.0 → 9.0.0-build.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/lib/components/Actions/Actions.d.ts +1 -0
  2. package/lib/components/Actions/Actions.d.ts.map +1 -1
  3. package/lib/components/Actions/Actions.js +28 -4
  4. package/lib/components/Actions/Actions.js.map +1 -1
  5. package/lib/components/AppShell/AppShell.types.d.ts +2 -0
  6. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  7. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  8. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  9. package/lib/components/AppShell/NavigationListItemWrapper.js +30 -5
  10. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  11. package/lib/components/Menu/Menu.d.ts.map +1 -1
  12. package/lib/components/Menu/Menu.js +13 -3
  13. package/lib/components/Menu/Menu.js.map +1 -1
  14. package/lib/components/Menu/Menu.styles.d.ts +2 -0
  15. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  16. package/lib/components/Menu/Menu.styles.js +58 -1
  17. package/lib/components/Menu/Menu.styles.js.map +1 -1
  18. package/lib/components/Menu/Menu.types.d.ts +3 -0
  19. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  20. package/lib/components/Menu/Menu.types.js.map +1 -1
  21. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  22. package/lib/components/MenuButton/MenuButton.js +12 -2
  23. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  24. package/lib/components/MultiStepForm/MultiStepForm.js +1 -1
  25. package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
  26. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  27. package/lib/components/PageTemplates/PageTemplates.js +11 -6
  28. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  29. package/lib/components/SpeechToTextButton/SpeechToTextButton.d.ts +13 -0
  30. package/lib/components/SpeechToTextButton/SpeechToTextButton.d.ts.map +1 -0
  31. package/lib/components/SpeechToTextButton/SpeechToTextButton.js +29 -0
  32. package/lib/components/SpeechToTextButton/SpeechToTextButton.js.map +1 -0
  33. package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.d.ts +2 -0
  34. package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.d.ts.map +1 -0
  35. package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.js +3 -0
  36. package/lib/components/SpeechToTextButton/SpeechToTextButton.test-ids.js.map +1 -0
  37. package/lib/components/SpeechToTextButton/index.d.ts +3 -0
  38. package/lib/components/SpeechToTextButton/index.d.ts.map +1 -0
  39. package/lib/components/SpeechToTextButton/index.js +2 -0
  40. package/lib/components/SpeechToTextButton/index.js.map +1 -0
  41. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  42. package/lib/components/TextArea/TextArea.js +2 -12
  43. package/lib/components/TextArea/TextArea.js.map +1 -1
  44. package/lib/hooks/index.d.ts +1 -0
  45. package/lib/hooks/index.d.ts.map +1 -1
  46. package/lib/hooks/index.js +1 -0
  47. package/lib/hooks/index.js.map +1 -1
  48. package/lib/hooks/useI18n.d.ts +11 -0
  49. package/lib/hooks/useI18n.d.ts.map +1 -1
  50. package/lib/hooks/useSpeechRecognition.d.ts +21 -0
  51. package/lib/hooks/useSpeechRecognition.d.ts.map +1 -0
  52. package/lib/hooks/useSpeechRecognition.js +121 -0
  53. package/lib/hooks/useSpeechRecognition.js.map +1 -0
  54. package/lib/i18n/default.d.ts +11 -0
  55. package/lib/i18n/default.d.ts.map +1 -1
  56. package/lib/i18n/default.js +13 -0
  57. package/lib/i18n/default.js.map +1 -1
  58. package/lib/i18n/i18n.d.ts +11 -0
  59. package/lib/i18n/i18n.d.ts.map +1 -1
  60. package/lib/index.d.ts +2 -0
  61. package/lib/index.d.ts.map +1 -1
  62. package/lib/index.js +2 -0
  63. package/lib/index.js.map +1 -1
  64. package/lib/styles/utils.d.ts.map +1 -1
  65. package/lib/styles/utils.js +8 -2
  66. package/lib/styles/utils.js.map +1 -1
  67. package/lib/theme/theme.d.ts +24 -0
  68. package/lib/theme/theme.d.ts.map +1 -1
  69. package/lib/theme/themeDefinition.json +14 -0
  70. package/lib/theme/themeOverrides.schema.json +15 -0
  71. package/lib/theme/themes/virgoTheme.json +5 -0
  72. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PageTemplates.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplates.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,cAAc,EACd,QAAQ,EACT,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQ/C,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,WAAW,EAAE,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,k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,SAAS,EAA4C,EACnE,GAAmC;IAEnC,OAAO,CACL,KAAC,UAAU,IACT,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAClB,GAAG,EAAE,GAAG,KACJ,SAAS,EACb,IAAI,EAAC,0CAA0C,GAC/C,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,oBAAoB,GAC/B,UAAU,CAAC,SAAS,oBAAoB,CACtC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,EAA8C,EACrE,GAAqC;IAErC,OAAO,CACL,KAAC,UAAU,IACT,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAClB,GAAG,EAAE,GAAG,KACJ,SAAS,EACb,IAAI,EAAC,8CAA8C,GACnD,CACH,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import type { PropsWithoutRef, ReactElement, ReactNode, Ref } from 'react';\nimport { forwardRef, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n useBreakpoint,\n useConfiguration,\n useConsolidatedRef,\n useElement,\n useI18n,\n useScrollStick,\n useTheme\n} from '../../hooks';\nimport type { ScrollStickOptions } from '../../hooks/useScrollStick';\nimport { calculateForegroundColor, readableColor } from '../../styles';\nimport { defaultThemeProp } from '../../theme';\nimport type {\n AsProp,\n BaseProps,\n ForwardRefForwardPropsComponent,\n NoChildrenProp,\n OmitStrict\n} from '../../types';\nimport { focusHeadingOrContainer, tryCatch } from '../../utils';\nimport AppShellContext from '../AppShell/AppShellContext';\nimport { StyledBanner } from '../Banner/Banner';\nimport type { BreadcrumbsProps } from '../Breadcrumbs';\nimport Breadcrumbs, { StyledBreadcrumbs } from '../Breadcrumbs';\nimport Flex from '../Flex';\nimport Grid from '../Grid';\nimport Icon from '../Icon';\nimport SummaryItem from '../SummaryItem';\nimport type { Tab, TabsProps } from '../Tabs';\nimport Tabs, { TabPanel } from '../Tabs';\nimport { StyledTabPanel } from '../Tabs/TabPanel';\nimport { StyledAllTabsWrapper, StyledTabs, StylesAllTabsButtonWrapper } from '../Tabs/Tabs.styles';\nimport Text from '../Text';\nimport { StyledMenuButton } from '../MenuButton/MenuButton';\n\nexport interface PageTemplateProps extends BaseProps, AsProp, NoChildrenProp {\n title: string;\n icon?: string;\n actions?: ReactNode;\n banners?: ReactNode;\n path?: BreadcrumbsProps['path'];\n header?: ReactNode;\n utilities?: ReactNode;\n scrollContent?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport interface TabbedPageTab extends Tab {\n content: ReactNode;\n /**\n * Determines layout spacing.\n * @default 'standard'\n */\n layout?: 'standard' | 'full-size';\n}\n\nexport interface TabbedPageProps extends OmitStrict<PageTemplateProps, 'forwardedAs'> {\n tabs: OmitStrict<TabsProps, 'tabs' | 'currentTabId'> & {\n tabs: TabbedPageTab[];\n } & (\n | { defaultTabId?: string; currentTabId?: never }\n | { defaultTabId?: never; currentTabId: string }\n );\n}\n\nexport interface DynamicLayoutPageProps extends OmitStrict<PageTemplateProps, 'scrollContent'> {\n a: ReactNode;\n}\n\nexport interface OneColumnPageProps extends PageTemplateProps {\n a: ReactNode;\n}\n\nexport interface TwoColumnPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n}\n\nexport interface ThreeColumnPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n}\n\nexport interface FourColumnPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n d: ReactNode;\n}\n\nexport interface WideNarrowPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n}\n\nexport interface NarrowWidePageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n}\n\nexport interface WideWideNarrowPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n}\n\nexport interface NarrowWideWidePageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n}\n\nexport interface NarrowWideNarrowPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n}\n\nexport interface PageLayoutProps extends PageTemplateProps {\n tabs?: ReactElement<typeof Tabs>;\n regions: ReactNode[];\n regionsRef?: Ref<HTMLDivElement>;\n cols?: string;\n padContent?: boolean;\n}\n\nexport const StyledPageIcon = styled(Flex)(({ theme }) => {\n const bgColor = theme.base.palette['brand-primary'];\n const color = tryCatch(() => readableColor(bgColor));\n return css`\n height: calc(4 * ${theme.base.spacing});\n width: calc(4 * ${theme.base.spacing});\n background: ${bgColor};\n color: ${color};\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n `;\n});\n\nStyledPageIcon.defaultProps = defaultThemeProp;\n\nexport const StyledPageHeader = styled.header(({ theme }) => {\n const appBg = theme.base.palette['app-background'];\n const appFg = theme.base.palette['app-foreground'];\n const tabsDetached = theme.components.tabs.detached;\n const color = calculateForegroundColor(appBg, appFg);\n\n return css`\n h1 {\n color: ${color};\n }\n\n h1:focus-visible {\n outline: transparent;\n box-shadow: ${theme.base.shadow.focus};\n }\n\n ${StyledBreadcrumbs} {\n margin-block-end: ${theme.base.spacing};\n }\n\n ${StyledBanner}, ${StyledTabs}, ${StylesAllTabsButtonWrapper} {\n margin-block-start: calc(2 * ${theme.base.spacing});\n }\n\n ${tabsDetached &&\n css`\n ${StyledAllTabsWrapper} {\n margin-block-start: calc(2 * ${theme.base.spacing});\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n border-end-start-radius: 0;\n\n ${StyledTabs} {\n border-radius: unset;\n border-start-end-radius: inherit;\n margin-block-start: 0;\n }\n\n ${StylesAllTabsButtonWrapper} {\n margin-block-start: 0;\n\n ${StyledMenuButton} {\n border-start-start-radius: var(--border-radius, ${theme.base['border-radius']});\n }\n }\n }\n `}\n `;\n});\n\nStyledPageHeader.defaultProps = defaultThemeProp;\n\nexport const StyledPageHeaderGrid = styled.div(({ theme }) => {\n return css`\n column-gap: calc(${theme.base.spacing} * 1.5);\n `;\n});\n\nStyledPageHeaderGrid.defaultProps = defaultThemeProp;\n\nexport const StyledRegion = styled.div<{ renderSingleRegion?: boolean }>(\n ({ renderSingleRegion }) => {\n if (renderSingleRegion) {\n return css`\n height: 100%;\n `;\n }\n }\n);\n\nStyledRegion.defaultProps = defaultThemeProp;\n\nexport const StyledRegions = styled.div<{ pad: boolean }>(({ pad, theme }) => {\n const spacing = theme.base.spacing;\n\n return css`\n flex-grow: 1;\n max-width: 100%;\n\n ${pad &&\n css`\n padding: 0 calc(2 * ${spacing}) calc(2 * ${spacing});\n `}\n [role='tabpanel'] & {\n padding: 0;\n }\n `;\n});\nStyledRegions.defaultProps = defaultThemeProp;\n\nexport const StyledContent = styled.div``;\nStyledContent.defaultProps = defaultThemeProp;\n\nexport const StyledScrollableTabPanel: typeof TabPanel = styled(TabPanel)(() => {\n return css`\n height: 100%;\n overflow: auto;\n `;\n});\n\nStyledScrollableTabPanel.defaultProps = defaultThemeProp;\n\nexport const StyledPageLayout = styled.div<{\n scrollContent: PageLayoutProps['scrollContent'];\n minContentHeight?: number;\n}>(\n ({\n theme: {\n base: {\n palette: { 'app-background': appBackground }\n }\n },\n scrollContent,\n minContentHeight\n }) => {\n const emptyContentHeight = minContentHeight ? `${minContentHeight}px` : undefined;\n\n return css`\n --content-height-in-view: ${emptyContentHeight};\n position: relative;\n min-height: inherit;\n background: ${appBackground};\n\n ${scrollContent &&\n css`\n ${StyledContent} {\n position: relative;\n }\n\n ${StyledRegions} {\n position: absolute;\n height: 100%;\n width: 100%;\n overflow: auto;\n }\n `}\n `;\n }\n);\n\nStyledPageLayout.defaultProps = defaultThemeProp;\n\nconst StyledPageLayoutWrapper = styled.div`\n height: 100%;\n`;\n\nconst StylePageTabContent = styled.div`\n ${StyledRegions} {\n padding: 0;\n }\n`;\n\nconst PageLayout: ForwardRefForwardPropsComponent<PageLayoutProps> = forwardRef(function PageLayout(\n {\n regions,\n cols = `repeat(${regions.length}, minmax(0, 1fr))`,\n title,\n icon,\n path,\n actions,\n banners,\n tabs,\n utilities,\n as,\n header,\n regionsRef,\n scrollContent = false,\n padContent = true,\n ...restProps\n }: PropsWithoutRef<PageLayoutProps>,\n ref: PageLayoutProps['ref']\n) {\n const t = useI18n();\n const [contentEl, setContentEl] = useElement<HTMLElement>();\n const isMediumOrAbove = useBreakpoint('md');\n const hasSideBySideColumns = regions.length > 1 && isMediumOrAbove;\n const { headerEl } = useContext(AppShellContext);\n const { loadedRef } = useConfiguration();\n const [panel, setPanel] = useState('content');\n const {\n components: {\n tabs: { detached: tabsDetached }\n }\n } = useTheme();\n\n const pageRef = useConsolidatedRef(ref);\n const pageTabsRef = useRef<HTMLElement>(null);\n const consolidatedRegionRef = useConsolidatedRef(regionsRef);\n const scrollStickOptions = useRef<ScrollStickOptions>({\n elements: []\n });\n\n scrollStickOptions.current.scrollContainer = scrollContent && contentEl ? contentEl : undefined;\n scrollStickOptions.current.offset = (headerEl?.offsetHeight ?? 0) + 16;\n\n useScrollStick(hasSideBySideColumns ? scrollStickOptions.current : undefined);\n\n const renderSingleRegion = regions?.length === 1;\n\n const [minContentHeight, setMinContentHeight] = useState<number | undefined>();\n\n useEffect(() => {\n if (!pageRef.current) return;\n\n if (loadedRef.current) {\n focusHeadingOrContainer(pageRef.current, title);\n } else {\n loadedRef.current = true;\n }\n }, [title]);\n\n useEffect(() => {\n if (consolidatedRegionRef.current) {\n const refElement = consolidatedRegionRef.current;\n const regionsPaddingBottomPixels = Number.parseInt(\n window.getComputedStyle(refElement).getPropertyValue('padding-bottom'),\n 10\n );\n\n const resizeObserver = new ResizeObserver(() => {\n const headerOffset = headerEl?.offsetHeight ?? 0;\n const emptyHeight =\n document.documentElement.offsetHeight -\n (headerOffset + refElement.offsetTop) -\n regionsPaddingBottomPixels;\n\n setMinContentHeight(emptyHeight);\n });\n\n resizeObserver.observe(refElement);\n\n return () => {\n resizeObserver.disconnect();\n };\n }\n }, [consolidatedRegionRef, headerEl]);\n\n const pageContent = (\n <Flex\n container\n item={{ grow: 1 }}\n as={StyledContent}\n ref={scrollContent ? setContentEl : undefined}\n >\n {renderSingleRegion && (\n <StyledRegions ref={consolidatedRegionRef} pad={padContent}>\n <Flex\n container={{\n direction: 'column',\n gap: 2\n }}\n as={StyledRegion}\n ref={(el: HTMLDivElement | null) => {\n if (el) {\n scrollStickOptions.current.elements[0] = el;\n }\n }}\n renderSingleRegion\n >\n {regions[0]}\n </Flex>\n </StyledRegions>\n )}\n\n {!renderSingleRegion && (\n <Grid\n container={{\n cols: 'minmax(0, 1fr)',\n alignItems: 'start',\n gap: 2,\n pad: [0, 2, 2]\n }}\n md={{ container: { cols } }}\n as={StyledRegions}\n ref={consolidatedRegionRef}\n >\n {regions.map((colItems, i) => {\n return (\n <Flex\n container={{\n direction: 'column',\n gap: 2\n }}\n as={StyledRegion}\n // eslint-disable-next-line react/no-array-index-key\n key={i}\n ref={(el: HTMLDivElement | null) => {\n if (el) {\n scrollStickOptions.current.elements[i] = el;\n }\n }}\n >\n {colItems}\n </Flex>\n );\n })}\n </Grid>\n )}\n </Flex>\n );\n\n const pageTabs = [\n { name: t('content'), id: 'content', content: pageContent },\n {\n name: t('chat_with_ai'),\n id: 'chat_with_ai',\n content: utilities\n }\n ];\n\n const pageHeader =\n !!path || !!icon || !!actions || !!title || !!banners || !!tabs || !!header ? (\n <Flex\n container={{ direction: 'column', pad: [1.5, 2, 0] }}\n item={{ grow: 0, shrink: 0 }}\n as={StyledPageHeader}\n >\n {path && path.length > 0 && <Breadcrumbs path={path} />}\n\n {header || (\n <SummaryItem\n as={StyledPageHeaderGrid}\n visual={\n icon && (\n <StyledPageIcon container={{ alignItems: 'center', justify: 'center' }}>\n <Icon name={icon} />\n </StyledPageIcon>\n )\n }\n primary={<Text variant='h1'>{title}</Text>}\n actions={actions}\n />\n )}\n\n {banners}\n {tabs}\n </Flex>\n ) : null;\n\n const handleTabChange = (id: string) => {\n setPanel(id);\n };\n\n if (utilities) {\n if (isMediumOrAbove || tabs) {\n return (\n <Flex container={{ gap: 2 }} as={StyledPageLayoutWrapper}>\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n alignItems: 'stretch',\n gap: 2\n }}\n item={{ grow: 1 }}\n scrollContent={scrollContent}\n as={StyledPageLayout}\n forwardedAs={as}\n ref={pageRef}\n minContentHeight={minContentHeight}\n >\n {pageHeader}\n {pageContent}\n </Flex>\n {(isMediumOrAbove || !tabs) && <div>{utilities}</div>}\n </Flex>\n );\n }\n\n return (\n <Flex\n {...restProps}\n as={StyledPageLayout}\n forwardedAs={as}\n ref={pageRef}\n container={{ direction: 'column' }}\n >\n {pageHeader}\n <Flex\n container={{ direction: 'column', pad: [2, 2, 0], gap: tabsDetached ? undefined : 2 }}\n >\n <Tabs\n tabs={pageTabs}\n onTabClick={handleTabChange}\n currentTabId={panel}\n ref={pageTabsRef}\n />\n {pageTabs.map(tab => (\n <TabPanel tabId={tab.id} currentTabId={panel} tablistRef={pageTabsRef} key={tab.id}>\n <StylePageTabContent>{tab.content}</StylePageTabContent>\n </TabPanel>\n ))}\n </Flex>\n </Flex>\n );\n }\n\n return (\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n alignItems: 'stretch',\n gap: 2\n }}\n item={{ grow: 1 }}\n scrollContent={scrollContent}\n as={StyledPageLayout}\n forwardedAs={as}\n ref={pageRef}\n minContentHeight={minContentHeight}\n >\n {pageHeader}\n {pageContent}\n </Flex>\n );\n});\n\nconst StyledTabbedPage = styled(PageLayout)<{ $layout?: TabbedPageTab['layout'] }>(({\n $layout = 'standard',\n theme: {\n base: {\n palette: { 'border-line': borderLine }\n },\n components: {\n tabs: { detached: tabsDetached }\n }\n }\n}) => {\n return css`\n gap: 0;\n\n ${tabsDetached &&\n css`\n ${StyledTabPanel} {\n border-block-end: none;\n box-shadow: 0 0.0625rem 0 ${borderLine};\n }\n `}\n\n ${$layout === 'full-size' &&\n css`\n ${StyledRegions} {\n padding: 0;\n\n ${StyledTabPanel} {\n padding-block-start: 0;\n }\n }\n `}\n `;\n});\n\nStyledTabbedPage.defaultProps = defaultThemeProp;\n\nexport const TabbedPage: ForwardRefForwardPropsComponent<TabbedPageProps> = forwardRef(\n function TabbedPage(\n { tabs: tabsProps, utilities, as, ...restProps }: PropsWithoutRef<TabbedPageProps>,\n ref: TabbedPageProps['ref']\n ) {\n const isMediumOrAbove = useBreakpoint('md');\n\n const { currentTabId } = tabsProps;\n\n const t = useI18n();\n\n const tabs = useMemo(() => {\n if (utilities && !isMediumOrAbove) {\n return {\n ...tabsProps,\n tabs: [\n ...tabsProps.tabs,\n { id: 'chat_with_ai', name: t('chat_with_ai'), content: utilities }\n ]\n };\n }\n return tabsProps;\n }, [tabsProps, utilities, isMediumOrAbove]);\n\n const [tabId, setTabId] = useState(tabs.defaultTabId || tabs.tabs[0]?.id);\n\n useEffect(() => {\n if (!currentTabId) {\n const activeTabId = tabs.defaultTabId || tabs.tabs[0]?.id;\n if (activeTabId && tabId === 'agent') setTabId(activeTabId);\n }\n }, [tabsProps, isMediumOrAbove]);\n\n const tabPanels = tabs.tabs.map(tab => {\n return (\n <Flex\n container={{ direction: 'column', gap: 2 }}\n as={TabPanel}\n tabId={tab.id}\n currentTabId={currentTabId ?? tabId}\n key={tab.id}\n >\n {tab.content}\n </Flex>\n );\n });\n\n return (\n <StyledTabbedPage\n {...restProps}\n utilities={utilities}\n tabs={\n <Tabs\n {...tabs}\n onTabClick={(id, e) => {\n if (!currentTabId) {\n setTabId(id);\n }\n tabs.onTabClick?.(id, e);\n }}\n currentTabId={currentTabId ?? tabId}\n />\n }\n regions={[<>{tabPanels}</>]}\n $layout={\n tabs.tabs.find(({ id }) => {\n const activeTabId = currentTabId ?? tabId;\n return id === activeTabId;\n })?.layout\n }\n forwardedAs={as}\n ref={ref}\n />\n );\n }\n);\n\nexport const DynamicLayoutPage: ForwardRefForwardPropsComponent<DynamicLayoutPageProps> =\n forwardRef(function DynamicLayoutPage(\n { a, ...restProps }: PropsWithoutRef<DynamicLayoutPageProps>,\n ref: DynamicLayoutPageProps['ref']\n ) {\n return <PageLayout regions={[a]} ref={ref} {...restProps} padContent={false} />;\n });\n\nexport const OneColumnPage: ForwardRefForwardPropsComponent<OneColumnPageProps> = forwardRef(\n function OneColumnPage(\n { a, ...restProps }: PropsWithoutRef<OneColumnPageProps>,\n ref: OneColumnPageProps['ref']\n ) {\n return <PageLayout regions={[a]} ref={ref} {...restProps} cols='minmax(0, 1fr)' />;\n }\n);\n\nexport const TwoColumnPage: ForwardRefForwardPropsComponent<TwoColumnPageProps> = forwardRef(\n function TwoColumnPage(\n { a, b, ...restProps }: PropsWithoutRef<TwoColumnPageProps>,\n ref: TwoColumnPageProps['ref']\n ) {\n return (\n <PageLayout regions={[a, b]} ref={ref} {...restProps} cols='repeat(2, minmax(0, 1fr))' />\n );\n }\n);\n\nexport const ThreeColumnPage: ForwardRefForwardPropsComponent<ThreeColumnPageProps> = forwardRef(\n function ThreeColumnPage(\n { a, b, c, ...restProps }: PropsWithoutRef<ThreeColumnPageProps>,\n ref: ThreeColumnPageProps['ref']\n ) {\n return (\n <PageLayout regions={[a, b, c]} ref={ref} {...restProps} cols='repeat(3, minmax(0, 1fr))' />\n );\n }\n);\n\nexport const FourColumnPage: ForwardRefForwardPropsComponent<FourColumnPageProps> = forwardRef(\n function FourColumnPage(\n { a, b, c, d, ...restProps }: PropsWithoutRef<FourColumnPageProps>,\n ref: FourColumnPageProps['ref']\n ) {\n return (\n <PageLayout\n regions={[a, b, c, d]}\n ref={ref}\n {...restProps}\n cols='repeat(4, minmax(0, 1fr))'\n />\n );\n }\n);\n\nexport const WideNarrowPage: ForwardRefForwardPropsComponent<WideNarrowPageProps> = forwardRef(\n function WideNarrowPage(\n { a, b, ...restProps }: PropsWithoutRef<WideNarrowPageProps>,\n ref: WideNarrowPageProps['ref']\n ) {\n return (\n <PageLayout regions={[a, b]} ref={ref} {...restProps} cols='minmax(0, 2fr) minmax(0, 1fr)' />\n );\n }\n);\n\nexport const NarrowWidePage: ForwardRefForwardPropsComponent<WideNarrowPageProps> = forwardRef(\n function NarrowWidePage(\n { a, b, ...restProps }: PropsWithoutRef<WideNarrowPageProps>,\n ref: NarrowWidePageProps['ref']\n ) {\n return (\n <PageLayout regions={[a, b]} ref={ref} {...restProps} cols='minmax(0, 1fr) minmax(0, 2fr)' />\n );\n }\n);\n\nexport const WideWideNarrowPage: ForwardRefForwardPropsComponent<WideWideNarrowPageProps> =\n forwardRef(function WideWideNarrowPage(\n { a, b, c, ...restProps }: PropsWithoutRef<WideWideNarrowPageProps>,\n ref: WideWideNarrowPageProps['ref']\n ) {\n return (\n <PageLayout\n regions={[a, b, c]}\n ref={ref}\n {...restProps}\n cols='repeat(2, minmax(0, 2fr)) minmax(0, 1fr)'\n />\n );\n });\n\nexport const NarrowWideWidePage: ForwardRefForwardPropsComponent<NarrowWideWidePageProps> =\n forwardRef(function NarrowWideWidePage(\n { a, b, c, ...restProps }: PropsWithoutRef<NarrowWideWidePageProps>,\n ref: NarrowWideWidePageProps['ref']\n ) {\n return (\n <PageLayout\n regions={[a, b, c]}\n ref={ref}\n {...restProps}\n cols='minmax(0, 1fr) repeat(2, minmax(0, 2fr))'\n />\n );\n });\n\nexport const NarrowWideNarrowPage: ForwardRefForwardPropsComponent<NarrowWideNarrowPageProps> =\n forwardRef(function NarrowWideNarrowPage(\n { a, b, c, ...restProps }: PropsWithoutRef<NarrowWideNarrowPageProps>,\n ref: NarrowWideNarrowPageProps['ref']\n ) {\n return (\n <PageLayout\n regions={[a, b, c]}\n ref={ref}\n {...restProps}\n cols='minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr)'\n />\n );\n });\n"]}
1
+ {"version":3,"file":"PageTemplates.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplates.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO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,CACL,KAAC,UAAU,IACT,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAClB,GAAG,EAAE,GAAG,KACJ,SAAS,EACb,IAAI,EAAC,0CAA0C,GAC/C,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,oBAAoB,GAC/B,UAAU,CAAC,SAAS,oBAAoB,CACtC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,EAA8C,EACrE,GAAqC;IAErC,OAAO,CACL,KAAC,UAAU,IACT,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAClB,GAAG,EAAE,GAAG,KACJ,SAAS,EACb,IAAI,EAAC,8CAA8C,GACnD,CACH,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import type { PropsWithoutRef, ReactElement, ReactNode, Ref } from 'react';\nimport { forwardRef, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n useBreakpoint,\n useConfiguration,\n useConsolidatedRef,\n useElement,\n useI18n,\n useScrollStick,\n useTheme\n} from '../../hooks';\nimport type { ScrollStickOptions } from '../../hooks/useScrollStick';\nimport { calculateForegroundColor } from '../../styles';\nimport { defaultThemeProp } from '../../theme';\nimport type {\n AsProp,\n BaseProps,\n ForwardRefForwardPropsComponent,\n NoChildrenProp,\n OmitStrict\n} from '../../types';\nimport { focusHeadingOrContainer } from '../../utils';\nimport AppShellContext from '../AppShell/AppShellContext';\nimport { StyledBanner } from '../Banner/Banner';\nimport type { BreadcrumbsProps } from '../Breadcrumbs';\nimport Breadcrumbs, { StyledBreadcrumbs } from '../Breadcrumbs';\nimport Flex from '../Flex';\nimport Grid from '../Grid';\nimport Icon from '../Icon';\nimport SummaryItem from '../SummaryItem';\nimport type { Tab, TabsProps } from '../Tabs';\nimport Tabs, { TabPanel } from '../Tabs';\nimport { StyledTabPanel } from '../Tabs/TabPanel';\nimport { StyledAllTabsWrapper, StyledTabs, StylesAllTabsButtonWrapper } from '../Tabs/Tabs.styles';\nimport Text from '../Text';\nimport { StyledMenuButton } from '../MenuButton/MenuButton';\n\nexport interface PageTemplateProps extends BaseProps, AsProp, NoChildrenProp {\n title: string;\n icon?: string;\n actions?: ReactNode;\n banners?: ReactNode;\n path?: BreadcrumbsProps['path'];\n header?: ReactNode;\n utilities?: ReactNode;\n scrollContent?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport interface TabbedPageTab extends Tab {\n content: ReactNode;\n /**\n * Determines layout spacing.\n * @default 'standard'\n */\n layout?: 'standard' | 'full-size';\n}\n\nexport interface TabbedPageProps extends OmitStrict<PageTemplateProps, 'forwardedAs'> {\n tabs: OmitStrict<TabsProps, 'tabs' | 'currentTabId'> & {\n tabs: TabbedPageTab[];\n } & (\n | { defaultTabId?: string; currentTabId?: never }\n | { defaultTabId?: never; currentTabId: string }\n );\n}\n\nexport interface DynamicLayoutPageProps extends OmitStrict<PageTemplateProps, 'scrollContent'> {\n a: ReactNode;\n}\n\nexport interface OneColumnPageProps extends PageTemplateProps {\n a: ReactNode;\n}\n\nexport interface TwoColumnPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n}\n\nexport interface ThreeColumnPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n}\n\nexport interface FourColumnPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n d: ReactNode;\n}\n\nexport interface WideNarrowPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n}\n\nexport interface NarrowWidePageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n}\n\nexport interface WideWideNarrowPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n}\n\nexport interface NarrowWideWidePageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n}\n\nexport interface NarrowWideNarrowPageProps extends PageTemplateProps {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n}\n\nexport interface PageLayoutProps extends PageTemplateProps {\n tabs?: ReactElement<typeof Tabs>;\n regions: ReactNode[];\n regionsRef?: Ref<HTMLDivElement>;\n cols?: string;\n padContent?: boolean;\n}\n\nexport const StyledPageIcon = styled(Flex)(({ theme }) => {\n const color = theme.components['case-view'].header['foreground-color'];\n const bgColor = theme.components['case-view'].header['background-color'];\n return css`\n height: calc(4 * ${theme.base.spacing});\n width: calc(4 * ${theme.base.spacing});\n color: ${theme.components['case-view'].icon.color !== 'auto'\n ? theme.components['case-view'].icon.color\n : color};\n background: ${theme.components['case-view'].icon.background !== 'auto'\n ? theme.components['case-view'].icon.background\n : bgColor};\n box-shadow: ${theme.components['case-view'].icon['box-shadow']};\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n `;\n});\n\nStyledPageIcon.defaultProps = defaultThemeProp;\n\nexport const StyledPageHeader = styled.header(({ theme }) => {\n const appBg = theme.base.palette['app-background'];\n const appFg = theme.base.palette['app-foreground'];\n const tabsDetached = theme.components.tabs.detached;\n const color = calculateForegroundColor(appBg, appFg);\n\n return css`\n h1 {\n color: ${color};\n }\n\n h1:focus-visible {\n outline: transparent;\n box-shadow: ${theme.base.shadow.focus};\n }\n\n ${StyledBreadcrumbs} {\n margin-block-end: ${theme.base.spacing};\n }\n\n ${StyledBanner}, ${StyledTabs}, ${StylesAllTabsButtonWrapper} {\n margin-block-start: calc(2 * ${theme.base.spacing});\n }\n\n ${tabsDetached &&\n css`\n ${StyledAllTabsWrapper} {\n margin-block-start: calc(2 * ${theme.base.spacing});\n border-radius: var(--border-radius, ${theme.base['border-radius']});\n border-end-start-radius: 0;\n\n ${StyledTabs} {\n border-radius: unset;\n border-start-end-radius: inherit;\n margin-block-start: 0;\n }\n\n ${StylesAllTabsButtonWrapper} {\n margin-block-start: 0;\n\n ${StyledMenuButton} {\n border-start-start-radius: var(--border-radius, ${theme.base['border-radius']});\n }\n }\n }\n `}\n `;\n});\n\nStyledPageHeader.defaultProps = defaultThemeProp;\n\nexport const StyledPageHeaderGrid = styled.div(({ theme }) => {\n return css`\n column-gap: calc(${theme.base.spacing} * 1.5);\n `;\n});\n\nStyledPageHeaderGrid.defaultProps = defaultThemeProp;\n\nexport const StyledRegion = styled.div<{ renderSingleRegion?: boolean }>(\n ({ renderSingleRegion }) => {\n if (renderSingleRegion) {\n return css`\n height: 100%;\n `;\n }\n }\n);\n\nStyledRegion.defaultProps = defaultThemeProp;\n\nexport const StyledRegions = styled.div<{ pad: boolean }>(({ pad, theme }) => {\n const spacing = theme.base.spacing;\n\n return css`\n flex-grow: 1;\n max-width: 100%;\n\n ${pad &&\n css`\n padding: 0 calc(2 * ${spacing}) calc(2 * ${spacing});\n `}\n [role='tabpanel'] & {\n padding: 0;\n }\n `;\n});\nStyledRegions.defaultProps = defaultThemeProp;\n\nexport const StyledContent = styled.div``;\nStyledContent.defaultProps = defaultThemeProp;\n\nexport const StyledScrollableTabPanel: typeof TabPanel = styled(TabPanel)(() => {\n return css`\n height: 100%;\n overflow: auto;\n `;\n});\n\nStyledScrollableTabPanel.defaultProps = defaultThemeProp;\n\nexport const StyledPageLayout = styled.div<{\n scrollContent: PageLayoutProps['scrollContent'];\n minContentHeight?: number;\n}>(\n ({\n theme: {\n base: {\n palette: { 'app-background': appBackground }\n }\n },\n scrollContent,\n minContentHeight\n }) => {\n const emptyContentHeight = minContentHeight ? `${minContentHeight}px` : undefined;\n\n return css`\n --content-height-in-view: ${emptyContentHeight};\n position: relative;\n min-height: inherit;\n background: ${appBackground};\n\n ${scrollContent &&\n css`\n ${StyledContent} {\n position: relative;\n }\n\n ${StyledRegions} {\n position: absolute;\n height: 100%;\n width: 100%;\n overflow: auto;\n }\n `}\n `;\n }\n);\n\nStyledPageLayout.defaultProps = defaultThemeProp;\n\nconst StyledPageLayoutWrapper = styled.div`\n height: 100%;\n`;\n\nconst StylePageTabContent = styled.div`\n ${StyledRegions} {\n padding: 0;\n }\n`;\n\nconst PageLayout: ForwardRefForwardPropsComponent<PageLayoutProps> = forwardRef(function PageLayout(\n {\n regions,\n cols = `repeat(${regions.length}, minmax(0, 1fr))`,\n title,\n icon,\n path,\n actions,\n banners,\n tabs,\n utilities,\n as,\n header,\n regionsRef,\n scrollContent = false,\n padContent = true,\n ...restProps\n }: PropsWithoutRef<PageLayoutProps>,\n ref: PageLayoutProps['ref']\n) {\n const t = useI18n();\n const [contentEl, setContentEl] = useElement<HTMLElement>();\n const isMediumOrAbove = useBreakpoint('md');\n const hasSideBySideColumns = regions.length > 1 && isMediumOrAbove;\n const { headerEl } = useContext(AppShellContext);\n const { loadedRef } = useConfiguration();\n const [panel, setPanel] = useState('content');\n const {\n components: {\n tabs: { detached: tabsDetached }\n }\n } = useTheme();\n\n const pageRef = useConsolidatedRef(ref);\n const pageTabsRef = useRef<HTMLElement>(null);\n const consolidatedRegionRef = useConsolidatedRef(regionsRef);\n const scrollStickOptions = useRef<ScrollStickOptions>({\n elements: []\n });\n\n scrollStickOptions.current.scrollContainer = scrollContent && contentEl ? contentEl : undefined;\n scrollStickOptions.current.offset = (headerEl?.offsetHeight ?? 0) + 16;\n\n useScrollStick(hasSideBySideColumns ? scrollStickOptions.current : undefined);\n\n const renderSingleRegion = regions?.length === 1;\n\n const [minContentHeight, setMinContentHeight] = useState<number | undefined>();\n\n useEffect(() => {\n if (!pageRef.current) return;\n\n if (loadedRef.current) {\n focusHeadingOrContainer(pageRef.current, title);\n } else {\n loadedRef.current = true;\n }\n }, [title]);\n\n useEffect(() => {\n if (consolidatedRegionRef.current) {\n const refElement = consolidatedRegionRef.current;\n const regionsPaddingBottomPixels = Number.parseInt(\n window.getComputedStyle(refElement).getPropertyValue('padding-bottom'),\n 10\n );\n\n const resizeObserver = new ResizeObserver(() => {\n const headerOffset = headerEl?.offsetHeight ?? 0;\n const emptyHeight =\n document.documentElement.offsetHeight -\n (headerOffset + refElement.offsetTop) -\n regionsPaddingBottomPixels;\n\n setMinContentHeight(emptyHeight);\n });\n\n resizeObserver.observe(refElement);\n\n return () => {\n resizeObserver.disconnect();\n };\n }\n }, [consolidatedRegionRef, headerEl]);\n\n const pageContent = (\n <Flex\n container\n item={{ grow: 1 }}\n as={StyledContent}\n ref={scrollContent ? setContentEl : undefined}\n >\n {renderSingleRegion && (\n <StyledRegions ref={consolidatedRegionRef} pad={padContent}>\n <Flex\n container={{\n direction: 'column',\n gap: 2\n }}\n as={StyledRegion}\n ref={(el: HTMLDivElement | null) => {\n if (el) {\n scrollStickOptions.current.elements[0] = el;\n }\n }}\n renderSingleRegion\n >\n {regions[0]}\n </Flex>\n </StyledRegions>\n )}\n\n {!renderSingleRegion && (\n <Grid\n container={{\n cols: 'minmax(0, 1fr)',\n alignItems: 'start',\n gap: 2,\n pad: [0, 2, 2]\n }}\n md={{ container: { cols } }}\n as={StyledRegions}\n ref={consolidatedRegionRef}\n >\n {regions.map((colItems, i) => {\n return (\n <Flex\n container={{\n direction: 'column',\n gap: 2\n }}\n as={StyledRegion}\n // eslint-disable-next-line react/no-array-index-key\n key={i}\n ref={(el: HTMLDivElement | null) => {\n if (el) {\n scrollStickOptions.current.elements[i] = el;\n }\n }}\n >\n {colItems}\n </Flex>\n );\n })}\n </Grid>\n )}\n </Flex>\n );\n\n const pageTabs = [\n { name: t('content'), id: 'content', content: pageContent },\n {\n name: t('chat_with_ai'),\n id: 'chat_with_ai',\n content: utilities\n }\n ];\n\n const pageHeader =\n !!path || !!icon || !!actions || !!title || !!banners || !!tabs || !!header ? (\n <Flex\n container={{ direction: 'column', pad: [1.5, 2, 0] }}\n item={{ grow: 0, shrink: 0 }}\n as={StyledPageHeader}\n >\n {path && path.length > 0 && <Breadcrumbs path={path} />}\n\n {header || (\n <SummaryItem\n as={StyledPageHeaderGrid}\n visual={\n icon && (\n <StyledPageIcon container={{ alignItems: 'center', justify: 'center' }}>\n <Icon name={icon} />\n </StyledPageIcon>\n )\n }\n primary={<Text variant='h1'>{title}</Text>}\n actions={actions}\n />\n )}\n\n {banners}\n {tabs}\n </Flex>\n ) : null;\n\n const handleTabChange = (id: string) => {\n setPanel(id);\n };\n\n if (utilities) {\n if (isMediumOrAbove || tabs) {\n return (\n <Flex container={{ gap: 2 }} as={StyledPageLayoutWrapper}>\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n alignItems: 'stretch',\n gap: 2\n }}\n item={{ grow: 1 }}\n scrollContent={scrollContent}\n as={StyledPageLayout}\n forwardedAs={as}\n ref={pageRef}\n minContentHeight={minContentHeight}\n >\n {pageHeader}\n {pageContent}\n </Flex>\n {(isMediumOrAbove || !tabs) && <div>{utilities}</div>}\n </Flex>\n );\n }\n\n return (\n <Flex\n {...restProps}\n as={StyledPageLayout}\n forwardedAs={as}\n ref={pageRef}\n container={{ direction: 'column' }}\n >\n {pageHeader}\n <Flex\n container={{ direction: 'column', pad: [2, 2, 0], gap: tabsDetached ? undefined : 2 }}\n >\n <Tabs\n tabs={pageTabs}\n onTabClick={handleTabChange}\n currentTabId={panel}\n ref={pageTabsRef}\n />\n {pageTabs.map(tab => (\n <TabPanel tabId={tab.id} currentTabId={panel} tablistRef={pageTabsRef} key={tab.id}>\n <StylePageTabContent>{tab.content}</StylePageTabContent>\n </TabPanel>\n ))}\n </Flex>\n </Flex>\n );\n }\n\n return (\n <Flex\n {...restProps}\n container={{\n direction: 'column',\n alignItems: 'stretch',\n gap: 2\n }}\n item={{ grow: 1 }}\n scrollContent={scrollContent}\n as={StyledPageLayout}\n forwardedAs={as}\n ref={pageRef}\n minContentHeight={minContentHeight}\n >\n {pageHeader}\n {pageContent}\n </Flex>\n );\n});\n\nconst StyledTabbedPage = styled(PageLayout)<{ $layout?: TabbedPageTab['layout'] }>(({\n $layout = 'standard',\n theme: {\n base: {\n palette: { 'border-line': borderLine }\n },\n components: {\n tabs: { detached: tabsDetached }\n }\n }\n}) => {\n return css`\n gap: 0;\n\n ${tabsDetached &&\n css`\n ${StyledTabPanel} {\n border-block-end: none;\n box-shadow: 0 0.0625rem 0 ${borderLine};\n }\n `}\n\n ${$layout === 'full-size' &&\n css`\n ${StyledRegions} {\n padding: 0;\n\n ${StyledTabPanel} {\n padding-block-start: 0;\n }\n }\n `}\n `;\n});\n\nStyledTabbedPage.defaultProps = defaultThemeProp;\n\nexport const TabbedPage: ForwardRefForwardPropsComponent<TabbedPageProps> = forwardRef(\n function TabbedPage(\n { tabs: tabsProps, utilities, as, ...restProps }: PropsWithoutRef<TabbedPageProps>,\n ref: TabbedPageProps['ref']\n ) {\n const isMediumOrAbove = useBreakpoint('md');\n\n const { currentTabId } = tabsProps;\n\n const t = useI18n();\n\n const tabs = useMemo(() => {\n if (utilities && !isMediumOrAbove) {\n return {\n ...tabsProps,\n tabs: [\n ...tabsProps.tabs,\n { id: 'chat_with_ai', name: t('chat_with_ai'), content: utilities }\n ]\n };\n }\n return tabsProps;\n }, [tabsProps, utilities, isMediumOrAbove]);\n\n const [tabId, setTabId] = useState(tabs.defaultTabId || tabs.tabs[0]?.id);\n\n useEffect(() => {\n if (!currentTabId) {\n const activeTabId = tabs.defaultTabId || tabs.tabs[0]?.id;\n if (activeTabId && tabId === 'agent') setTabId(activeTabId);\n }\n }, [tabsProps, isMediumOrAbove]);\n\n const tabPanels = tabs.tabs.map(tab => {\n return (\n <Flex\n container={{ direction: 'column', gap: 2 }}\n as={TabPanel}\n tabId={tab.id}\n currentTabId={currentTabId ?? tabId}\n key={tab.id}\n >\n {tab.content}\n </Flex>\n );\n });\n\n return (\n <StyledTabbedPage\n {...restProps}\n utilities={utilities}\n tabs={\n <Tabs\n {...tabs}\n onTabClick={(id, e) => {\n if (!currentTabId) {\n setTabId(id);\n }\n tabs.onTabClick?.(id, e);\n }}\n currentTabId={currentTabId ?? tabId}\n />\n }\n regions={[<>{tabPanels}</>]}\n $layout={\n tabs.tabs.find(({ id }) => {\n const activeTabId = currentTabId ?? tabId;\n return id === activeTabId;\n })?.layout\n }\n forwardedAs={as}\n ref={ref}\n />\n );\n }\n);\n\nexport const DynamicLayoutPage: ForwardRefForwardPropsComponent<DynamicLayoutPageProps> =\n forwardRef(function DynamicLayoutPage(\n { a, ...restProps }: PropsWithoutRef<DynamicLayoutPageProps>,\n ref: DynamicLayoutPageProps['ref']\n ) {\n return <PageLayout regions={[a]} ref={ref} {...restProps} padContent={false} />;\n });\n\nexport const OneColumnPage: ForwardRefForwardPropsComponent<OneColumnPageProps> = forwardRef(\n function OneColumnPage(\n { a, ...restProps }: PropsWithoutRef<OneColumnPageProps>,\n ref: OneColumnPageProps['ref']\n ) {\n return <PageLayout regions={[a]} ref={ref} {...restProps} cols='minmax(0, 1fr)' />;\n }\n);\n\nexport const TwoColumnPage: ForwardRefForwardPropsComponent<TwoColumnPageProps> = forwardRef(\n function TwoColumnPage(\n { a, b, ...restProps }: PropsWithoutRef<TwoColumnPageProps>,\n ref: TwoColumnPageProps['ref']\n ) {\n return (\n <PageLayout regions={[a, b]} ref={ref} {...restProps} cols='repeat(2, minmax(0, 1fr))' />\n );\n }\n);\n\nexport const ThreeColumnPage: ForwardRefForwardPropsComponent<ThreeColumnPageProps> = forwardRef(\n function ThreeColumnPage(\n { a, b, c, ...restProps }: PropsWithoutRef<ThreeColumnPageProps>,\n ref: ThreeColumnPageProps['ref']\n ) {\n return (\n <PageLayout regions={[a, b, c]} ref={ref} {...restProps} cols='repeat(3, minmax(0, 1fr))' />\n );\n }\n);\n\nexport const FourColumnPage: ForwardRefForwardPropsComponent<FourColumnPageProps> = forwardRef(\n function FourColumnPage(\n { a, b, c, d, ...restProps }: PropsWithoutRef<FourColumnPageProps>,\n ref: FourColumnPageProps['ref']\n ) {\n return (\n <PageLayout\n regions={[a, b, c, d]}\n ref={ref}\n {...restProps}\n cols='repeat(4, minmax(0, 1fr))'\n />\n );\n }\n);\n\nexport const WideNarrowPage: ForwardRefForwardPropsComponent<WideNarrowPageProps> = forwardRef(\n function WideNarrowPage(\n { a, b, ...restProps }: PropsWithoutRef<WideNarrowPageProps>,\n ref: WideNarrowPageProps['ref']\n ) {\n return (\n <PageLayout regions={[a, b]} ref={ref} {...restProps} cols='minmax(0, 2fr) minmax(0, 1fr)' />\n );\n }\n);\n\nexport const NarrowWidePage: ForwardRefForwardPropsComponent<WideNarrowPageProps> = forwardRef(\n function NarrowWidePage(\n { a, b, ...restProps }: PropsWithoutRef<WideNarrowPageProps>,\n ref: NarrowWidePageProps['ref']\n ) {\n return (\n <PageLayout regions={[a, b]} ref={ref} {...restProps} cols='minmax(0, 1fr) minmax(0, 2fr)' />\n );\n }\n);\n\nexport const WideWideNarrowPage: ForwardRefForwardPropsComponent<WideWideNarrowPageProps> =\n forwardRef(function WideWideNarrowPage(\n { a, b, c, ...restProps }: PropsWithoutRef<WideWideNarrowPageProps>,\n ref: WideWideNarrowPageProps['ref']\n ) {\n return (\n <PageLayout\n regions={[a, b, c]}\n ref={ref}\n {...restProps}\n cols='repeat(2, minmax(0, 2fr)) minmax(0, 1fr)'\n />\n );\n });\n\nexport const NarrowWideWidePage: ForwardRefForwardPropsComponent<NarrowWideWidePageProps> =\n forwardRef(function NarrowWideWidePage(\n { a, b, c, ...restProps }: PropsWithoutRef<NarrowWideWidePageProps>,\n ref: NarrowWideWidePageProps['ref']\n ) {\n return (\n <PageLayout\n regions={[a, b, c]}\n ref={ref}\n {...restProps}\n cols='minmax(0, 1fr) repeat(2, minmax(0, 2fr))'\n />\n );\n });\n\nexport const NarrowWideNarrowPage: ForwardRefForwardPropsComponent<NarrowWideNarrowPageProps> =\n forwardRef(function NarrowWideNarrowPage(\n { a, b, c, ...restProps }: PropsWithoutRef<NarrowWideNarrowPageProps>,\n ref: NarrowWideNarrowPageProps['ref']\n ) {\n return (\n <PageLayout\n regions={[a, b, c]}\n ref={ref}\n {...restProps}\n cols='minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr)'\n />\n );\n });\n"]}
@@ -0,0 +1,13 @@
1
+ import { type Ref } from 'react';
2
+ import type { NoChildrenProp, TestIdProp, WithAttributes } from '../../types';
3
+ export type SpeechToTextButtonProps = WithAttributes<'button', NoChildrenProp & TestIdProp & {
4
+ /** Whether voice to text is active */
5
+ active: boolean;
6
+ /** Ref to the element */
7
+ ref?: Ref<HTMLButtonElement>;
8
+ }>;
9
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<SpeechToTextButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>> & {
10
+ getTestIds: (testIdProp?: TestIdProp["testId"]) => import("../../types").TestIdsRecord<readonly []>;
11
+ };
12
+ export default _default;
13
+ //# sourceMappingURL=SpeechToTextButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpeechToTextButton.d.ts","sourceRoot":"","sources":["../../../src/components/SpeechToTextButton/SpeechToTextButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAMnE,OAAO,KAAK,EAAE,cAAc,EAAc,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAyB1F,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAClD,QAAQ,EACR,cAAc,GACZ,UAAU,GAAG;IACX,sCAAsC;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,yBAAyB;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC9B,CACJ,CAAC;;;;AAyBF,wBAA6E"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import styled, { css } from 'styled-components';
4
+ import { mix } from 'polished';
5
+ import * as micIcon from '../Icon/icons/send-solid.icon';
6
+ import * as micSolidIcon from '../Icon/icons/square-solid.icon';
7
+ import { useI18n, useTestIds } from '../../hooks';
8
+ import Button from '../Button';
9
+ import Icon, { registerIcon } from '../Icon';
10
+ import { tryCatch, withTestIds } from '../../utils';
11
+ import { defaultThemeProp } from '../../theme';
12
+ import { getSpeechToTextButtonTestIds } from './SpeechToTextButton.test-ids';
13
+ registerIcon(micIcon, micSolidIcon);
14
+ const StyledSpeechToTextButton = styled(Button)(({ theme }) => {
15
+ const activeColor = tryCatch(() => mix(0.85, theme.base.palette['primary-background'], theme.base.palette.interactive));
16
+ return css `
17
+ &[aria-pressed='true'] {
18
+ background-color: ${activeColor};
19
+ }
20
+ `;
21
+ });
22
+ StyledSpeechToTextButton.defaultProps = defaultThemeProp;
23
+ const SpeechToTextButton = forwardRef(function SpeechToTextButton({ active, testId, ...restProps }, ref) {
24
+ const t = useI18n();
25
+ const testIds = useTestIds(testId, getSpeechToTextButtonTestIds);
26
+ return (_jsx(StyledSpeechToTextButton, { ref: ref, "data-testid": testIds.root, ...restProps, label: active ? t('stop_dictation') : t('dictate'), "aria-pressed": active, variant: 'simple', icon: true, children: _jsx(Icon, { name: active ? 'mic-solid' : 'mic' }) }));
27
+ });
28
+ export default withTestIds(SpeechToTextButton, getSpeechToTextButtonTestIds);
29
+ //# sourceMappingURL=SpeechToTextButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpeechToTextButton.js","sourceRoot":"","sources":["../../../src/components/SpeechToTextButton/SpeechToTextButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAkC,MAAM,OAAO,CAAC;AACnE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC;AACzD,OAAO,KAAK,YAAY,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,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ref } from 'react';\nimport styled, { css } from 'styled-components';\nimport { mix } from 'polished';\n\nimport * as micIcon from '../Icon/icons/send-solid.icon';\nimport * as micSolidIcon from '../Icon/icons/square-solid.icon';\nimport type { NoChildrenProp, RefElement, TestIdProp, WithAttributes } from '../../types';\nimport { useI18n, useTestIds } from '../../hooks';\nimport Button from '../Button';\nimport Icon, { registerIcon } from '../Icon';\nimport { tryCatch, withTestIds } from '../../utils';\nimport { defaultThemeProp } from '../../theme';\n\nimport { getSpeechToTextButtonTestIds } from './SpeechToTextButton.test-ids';\n\nregisterIcon(micIcon, micSolidIcon);\n\nconst StyledSpeechToTextButton = styled(Button)(({ theme }) => {\n const activeColor = tryCatch(() =>\n mix(0.85, theme.base.palette['primary-background'], theme.base.palette.interactive)\n );\n\n return css`\n &[aria-pressed='true'] {\n background-color: ${activeColor};\n }\n `;\n});\n\nStyledSpeechToTextButton.defaultProps = defaultThemeProp;\n\nexport type SpeechToTextButtonProps = WithAttributes<\n 'button',\n NoChildrenProp &\n TestIdProp & {\n /** Whether voice to text is active */\n active: boolean;\n /** Ref to the element */\n ref?: Ref<HTMLButtonElement>;\n }\n>;\n\nconst SpeechToTextButton = forwardRef<\n RefElement<SpeechToTextButtonProps>,\n PropsWithoutRef<SpeechToTextButtonProps>\n>(function SpeechToTextButton({ active, testId, ...restProps }, ref) {\n const t = useI18n();\n\n const testIds = useTestIds(testId, getSpeechToTextButtonTestIds);\n\n return (\n <StyledSpeechToTextButton\n ref={ref}\n data-testid={testIds.root}\n {...restProps}\n label={active ? t('stop_dictation') : t('dictate')}\n aria-pressed={active}\n variant='simple'\n icon\n >\n <Icon name={active ? 'mic-solid' : 'mic'} />\n </StyledSpeechToTextButton>\n );\n});\n\nexport default withTestIds(SpeechToTextButton, getSpeechToTextButtonTestIds);\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const getSpeechToTextButtonTestIds: (testIdProp?: import("../..").TestIdProp["testId"]) => import("../..").TestIdsRecord<readonly []>;
2
+ //# sourceMappingURL=SpeechToTextButton.test-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpeechToTextButton.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/SpeechToTextButton/SpeechToTextButton.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,mGAAsD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createTestIds } from '../../utils';
2
+ export const getSpeechToTextButtonTestIds = createTestIds('speech-to-text-button', []);
3
+ //# sourceMappingURL=SpeechToTextButton.test-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpeechToTextButton.test-ids.js","sourceRoot":"","sources":["../../../src/components/SpeechToTextButton/SpeechToTextButton.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,4BAA4B,GAAG,aAAa,CAAC,uBAAuB,EAAE,EAAW,CAAC,CAAC","sourcesContent":["import { createTestIds } from '../../utils';\n\nexport const getSpeechToTextButtonTestIds = createTestIds('speech-to-text-button', [] as const);\n"]}
@@ -0,0 +1,3 @@
1
+ export { default } from './SpeechToTextButton';
2
+ export type { SpeechToTextButtonProps } from './SpeechToTextButton';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SpeechToTextButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './SpeechToTextButton';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SpeechToTextButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export { default } from './SpeechToTextButton';\nexport type { SpeechToTextButtonProps } from './SpeechToTextButton';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAqC,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEvF,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AASvD,MAAM,WAAW,aAAc,SAAQ,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU;IAC5F,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CACpD;;;;AAkJD,wBAAyD"}
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAqC,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAEvF,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AASvD,MAAM,WAAW,aAAc,SAAQ,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU;IAC5F,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CACpD;;;;AAuID,wBAAyD"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useCallback, useState, useEffect, useMemo } from 'react';
2
+ import { forwardRef, useCallback, useState, useEffect } from 'react';
3
3
  import FormField from '../FormField';
4
4
  import { StyledFormControl } from '../FormControl';
5
5
  import { hasProp, withTestIds } from '../../utils';
@@ -30,16 +30,6 @@ const TextArea = forwardRef(function TextArea(props, ref) {
30
30
  setCharCount(e.target.value.length);
31
31
  }
32
32
  }, [onChangeProp, hardStop, maxLength]);
33
- const ariaDescribedBy = useMemo(() => {
34
- const idString = [];
35
- if (info) {
36
- idString.push(`${id}-info`);
37
- }
38
- if (displayCharCount && typeof maxLength === 'number') {
39
- idString.push(`${id}-charCount`);
40
- }
41
- return idString.length ? idString.join(' ') : undefined;
42
- }, [info, id, displayCharCount, maxLength]);
43
33
  useEffect(() => {
44
34
  if (!textAreaRef.current)
45
35
  return;
@@ -57,7 +47,7 @@ const TextArea = forwardRef(function TextArea(props, ref) {
57
47
  textAreaRef.current.style.removeProperty('--textarea-height');
58
48
  }
59
49
  }, [value, autoResize]);
60
- const TextAreaControl = (_jsx(StyledFormControl, { "data-testid": testIds.control, ref: consolidatedRef, id: id, "aria-describedby": ariaDescribedBy, required: required, disabled: disabled, status: status, readOnly: readOnly, autoResize: autoResize, resizable: autoResize ? false : resizable, maxLength: hardStop ? maxLength : undefined, hasSuggestion: status === 'pending' && !!onResolveSuggestion, ...controlProp, ...restProps, onChange: onChange, as: StyledTextArea }));
50
+ const TextAreaControl = (_jsx(StyledFormControl, { "data-testid": testIds.control, ref: consolidatedRef, id: id, "aria-describedby": displayCharCount && typeof maxLength === 'number' ? `${id}-charCount` : undefined, required: required, disabled: disabled, status: status, readOnly: readOnly, autoResize: autoResize, resizable: autoResize ? false : resizable, maxLength: hardStop ? maxLength : undefined, hasSuggestion: status === 'pending' && !!onResolveSuggestion, ...controlProp, ...restProps, onChange: onChange, as: StyledTextArea }));
61
51
  return label || displayCharCount ? (_jsx(FormField, { testId: testIds, additionalInfo: additionalInfo, label: label, labelHidden: labelHidden, id: id, readOnly: readOnly, info: info, status: status, charLimitDisplay: displayCharCount && typeof maxLength === 'number' ? (_jsxs(Text, { id: `${id}-charCount`, readOnly: readOnly, variant: 'secondary', "aria-live": maxLength >= 0 && maxLength - charCount <= 20 ? 'polite' : 'off', children: [maxLength >= 0 ? t('x_of_y', [charCount || '0', maxLength]) : charCount, ' ', _jsx(VisuallyHiddenText, { children: t('characters_typed') })] })) : undefined, required: required, disabled: disabled, onResolveSuggestion: onResolveSuggestion, children: TextAreaControl })) : (TextAreaControl);
62
52
  });
63
53
  export default withTestIds(TextArea, getTextAreaTestIds);
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAI9E,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,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,MAAM,EAAE,OAAO,EACf,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,gBAAgB,EACd,gBAAgB,IAAI,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,CAClD,MAAC,IAAI,IACH,EAAE,EAAE,GAAG,EAAE,YAAY,EACrB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAC,WAAW,eACR,SAAS,IAAI,CAAC,IAAI,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,aAE1E,SAAS,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,IAAI,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,EAC7E,KAAC,kBAAkB,cAAE,CAAC,CAAC,kBAAkB,CAAC,GAAsB,IAC3D,CACR,CAAC,CAAC,CAAC,SAAS,EAEf,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,YAEvC,eAAe,GACN,CACb,CAAC,CAAC,CAAC,CACF,eAAe,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { forwardRef, useCallback, useState, useEffect, useMemo } from 'react';\nimport type { FC, Ref, PropsWithoutRef, ChangeEvent, ChangeEventHandler } from 'react';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';\nimport FormField from '../FormField';\nimport { StyledFormControl } from '../FormControl';\nimport type { FormControlProps } from '../FormControl';\nimport { hasProp, withTestIds } from '../../utils';\nimport { useConsolidatedRef, useI18n, useTestIds, useUID } from '../../hooks';\nimport Text from '../Text';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\n\nimport StyledTextArea from './TextArea.styles';\nimport { getTextAreaTestIds } from './TextArea.test-ids';\n\nexport interface TextAreaProps extends FormControlProps, BaseProps, NoChildrenProp, TestIdProp {\n /** Minimum length of characters that can be input. */\n minLength?: number;\n /** Maximum length of characters that can be input. */\n maxLength?: number;\n /**\n * Allows the user to resize the Text Area. This prop is ignored if autoResize is true.\n * @default false\n */\n resizable?: boolean;\n /**\n * Enables the Text Area to resize itself automatically.\n * @default true\n */\n autoResize?: boolean;\n /**\n * Display a live character count in relation to the maxLength.\n * @default false\n */\n displayCharCount?: boolean;\n /**\n * Allow or disallow a value beyond the maxLength.\n * @default true\n */\n hardStop?: boolean;\n onChange?: ChangeEventHandler<HTMLTextAreaElement>;\n}\n\nconst TextArea: FC<TextAreaProps & ForwardProps> = forwardRef(function TextArea(\n props: PropsWithoutRef<TextAreaProps>,\n ref: Ref<HTMLTextAreaElement>\n) {\n const uid = useUID();\n const {\n testId,\n additionalInfo,\n id = uid,\n value,\n defaultValue,\n required = false,\n disabled = false,\n readOnly = false,\n label,\n labelHidden,\n info,\n status,\n resizable = false,\n autoResize = true,\n maxLength,\n displayCharCount = false,\n hardStop = true,\n onChange: onChangeProp,\n onResolveSuggestion,\n ...restProps\n } = props;\n const t = useI18n();\n\n const testIds = useTestIds(testId, getTextAreaTestIds);\n const [charCount, setCharCount] = useState(0);\n const textAreaRef = useConsolidatedRef(ref);\n const consolidatedRef = useConsolidatedRef(ref, textAreaRef);\n\n const controlProp: {\n value?: string;\n defaultValue?: string;\n } = {};\n\n // Conditionally render component as controlled/uncontrolled\n if (hasProp(props, 'value')) {\n controlProp.value = value ?? '';\n } else if (hasProp(props, 'defaultValue')) {\n controlProp.defaultValue = defaultValue ?? '';\n }\n\n const onChange = useCallback(\n (e: ChangeEvent<HTMLTextAreaElement>) => {\n if (!hardStop || maxLength === undefined || e.target.value.length <= maxLength) {\n onChangeProp?.(e);\n setCharCount(e.target.value.length);\n }\n },\n [onChangeProp, hardStop, maxLength]\n );\n\n const ariaDescribedBy = useMemo(() => {\n const idString = [];\n\n if (info) {\n idString.push(`${id}-info`);\n }\n if (displayCharCount && typeof maxLength === 'number') {\n idString.push(`${id}-charCount`);\n }\n\n return idString.length ? idString.join(' ') : undefined;\n }, [info, id, displayCharCount, maxLength]);\n\n useEffect(() => {\n if (!textAreaRef.current) return;\n\n if (autoResize) {\n textAreaRef.current.style.setProperty('--textarea-height', 'auto');\n\n // Remove scrollbar width to avoid interference with calculation.\n textAreaRef.current.style.setProperty('scrollbar-width', 'none');\n\n const scrollHeight = textAreaRef.current.scrollHeight;\n const borderWidth = textAreaRef.current.offsetHeight - textAreaRef.current.clientHeight;\n // Set height to auto then scrollHeight + borderWidth to resize TextArea to content\n textAreaRef.current.style.setProperty('--textarea-height', `${scrollHeight + borderWidth}px`);\n\n textAreaRef.current.style.removeProperty('scrollbar-width');\n } else {\n textAreaRef.current.style.removeProperty('--textarea-height');\n }\n }, [value, autoResize]);\n\n const TextAreaControl = (\n <StyledFormControl\n data-testid={testIds.control}\n ref={consolidatedRef}\n id={id}\n aria-describedby={ariaDescribedBy}\n required={required}\n disabled={disabled}\n status={status}\n readOnly={readOnly}\n autoResize={autoResize}\n resizable={autoResize ? false : resizable}\n maxLength={hardStop ? maxLength : undefined}\n hasSuggestion={status === 'pending' && !!onResolveSuggestion}\n {...controlProp}\n {...restProps}\n onChange={onChange}\n as={StyledTextArea}\n />\n );\n\n return label || displayCharCount ? (\n <FormField\n testId={testIds}\n additionalInfo={additionalInfo}\n label={label}\n labelHidden={labelHidden}\n id={id}\n readOnly={readOnly}\n info={info}\n status={status}\n charLimitDisplay={\n displayCharCount && typeof maxLength === 'number' ? (\n <Text\n id={`${id}-charCount`}\n readOnly={readOnly}\n variant='secondary'\n aria-live={maxLength >= 0 && maxLength - charCount <= 20 ? 'polite' : 'off'}\n >\n {maxLength >= 0 ? t('x_of_y', [charCount || '0', maxLength]) : charCount}{' '}\n <VisuallyHiddenText>{t('characters_typed')}</VisuallyHiddenText>\n </Text>\n ) : undefined\n }\n required={required}\n disabled={disabled}\n onResolveSuggestion={onResolveSuggestion}\n >\n {TextAreaControl}\n </FormField>\n ) : (\n TextAreaControl\n );\n});\n\nexport default withTestIds(TextArea, getTextAreaTestIds);\n"]}
1
+ {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrE,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAEvD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AA8BzD,MAAM,QAAQ,GAAqC,UAAU,CAAC,SAAS,QAAQ,CAC7E,KAAqC,EACrC,GAA6B;IAE7B,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,EACJ,MAAM,EACN,cAAc,EACd,EAAE,GAAG,GAAG,EACR,KAAK,EACL,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,MAAM,EACN,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,IAAI,EACjB,SAAS,EACT,gBAAgB,GAAG,KAAK,EACxB,QAAQ,GAA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AAC,CAAC,mBAAmB,KACxD,WAAW,KACX,SAAS,EACb,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,cAAc,GAClB,CACH,CAAC;IAEF,OAAO,KAAK,IAAI,gBAAgB,CAAC,CAAC,CAAC,CACjC,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,gBAAgB,EACd,gBAAgB,IAAI,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,CAClD,MAAC,IAAI,IACH,EAAE,EAAE,GAAG,EAAE,YAAY,EACrB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAC,WAAW,eACR,SAAS,IAAI,CAAC,IAAI,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,aAE1E,SAAS,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,IAAI,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,EAC7E,KAAC,kBAAkB,cAAE,CAAC,CAAC,kBAAkB,CAAC,GAAsB,IAC3D,CACR,CAAC,CAAC,CAAC,SAAS,EAEf,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,YAEvC,eAAe,GACN,CACb,CAAC,CAAC,CAAC,CACF,eAAe,CAChB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { forwardRef, useCallback, useState, useEffect } from 'react';\nimport type { FC, Ref, PropsWithoutRef, ChangeEvent, ChangeEventHandler } from 'react';\n\nimport type { BaseProps, ForwardProps, NoChildrenProp, TestIdProp } from '../../types';\nimport FormField from '../FormField';\nimport { StyledFormControl } from '../FormControl';\nimport type { FormControlProps } from '../FormControl';\nimport { hasProp, withTestIds } from '../../utils';\nimport { useConsolidatedRef, useI18n, useTestIds, useUID } from '../../hooks';\nimport Text from '../Text';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\n\nimport StyledTextArea from './TextArea.styles';\nimport { getTextAreaTestIds } from './TextArea.test-ids';\n\nexport interface TextAreaProps extends FormControlProps, BaseProps, NoChildrenProp, TestIdProp {\n /** Minimum length of characters that can be input. */\n minLength?: number;\n /** Maximum length of characters that can be input. */\n maxLength?: number;\n /**\n * Allows the user to resize the Text Area. This prop is ignored if autoResize is true.\n * @default false\n */\n resizable?: boolean;\n /**\n * Enables the Text Area to resize itself automatically.\n * @default true\n */\n autoResize?: boolean;\n /**\n * Display a live character count in relation to the maxLength.\n * @default false\n */\n displayCharCount?: boolean;\n /**\n * Allow or disallow a value beyond the maxLength.\n * @default true\n */\n hardStop?: boolean;\n onChange?: ChangeEventHandler<HTMLTextAreaElement>;\n}\n\nconst TextArea: FC<TextAreaProps & ForwardProps> = forwardRef(function TextArea(\n props: PropsWithoutRef<TextAreaProps>,\n ref: Ref<HTMLTextAreaElement>\n) {\n const uid = useUID();\n const {\n testId,\n additionalInfo,\n id = uid,\n value,\n defaultValue,\n required = false,\n disabled = false,\n readOnly = false,\n label,\n labelHidden,\n info,\n status,\n resizable = false,\n autoResize = true,\n maxLength,\n displayCharCount = false,\n hardStop = true,\n onChange: onChangeProp,\n onResolveSuggestion,\n ...restProps\n } = props;\n const t = useI18n();\n\n const testIds = useTestIds(testId, getTextAreaTestIds);\n const [charCount, setCharCount] = useState(0);\n const textAreaRef = useConsolidatedRef(ref);\n const consolidatedRef = useConsolidatedRef(ref, textAreaRef);\n\n const controlProp: {\n value?: string;\n defaultValue?: string;\n } = {};\n\n // Conditionally render component as controlled/uncontrolled\n if (hasProp(props, 'value')) {\n controlProp.value = value ?? '';\n } else if (hasProp(props, 'defaultValue')) {\n controlProp.defaultValue = defaultValue ?? '';\n }\n\n const onChange = useCallback(\n (e: ChangeEvent<HTMLTextAreaElement>) => {\n if (!hardStop || maxLength === undefined || e.target.value.length <= maxLength) {\n onChangeProp?.(e);\n setCharCount(e.target.value.length);\n }\n },\n [onChangeProp, hardStop, maxLength]\n );\n\n useEffect(() => {\n if (!textAreaRef.current) return;\n\n if (autoResize) {\n textAreaRef.current.style.setProperty('--textarea-height', 'auto');\n\n // Remove scrollbar width to avoid interference with calculation.\n textAreaRef.current.style.setProperty('scrollbar-width', 'none');\n\n const scrollHeight = textAreaRef.current.scrollHeight;\n const borderWidth = textAreaRef.current.offsetHeight - textAreaRef.current.clientHeight;\n // Set height to auto then scrollHeight + borderWidth to resize TextArea to content\n textAreaRef.current.style.setProperty('--textarea-height', `${scrollHeight + borderWidth}px`);\n\n textAreaRef.current.style.removeProperty('scrollbar-width');\n } else {\n textAreaRef.current.style.removeProperty('--textarea-height');\n }\n }, [value, autoResize]);\n\n const TextAreaControl = (\n <StyledFormControl\n data-testid={testIds.control}\n ref={consolidatedRef}\n id={id}\n aria-describedby={\n displayCharCount && typeof maxLength === 'number' ? `${id}-charCount` : undefined\n }\n required={required}\n disabled={disabled}\n status={status}\n readOnly={readOnly}\n autoResize={autoResize}\n resizable={autoResize ? false : resizable}\n maxLength={hardStop ? maxLength : undefined}\n hasSuggestion={status === 'pending' && !!onResolveSuggestion}\n {...controlProp}\n {...restProps}\n onChange={onChange}\n as={StyledTextArea}\n />\n );\n\n return label || displayCharCount ? (\n <FormField\n testId={testIds}\n additionalInfo={additionalInfo}\n label={label}\n labelHidden={labelHidden}\n id={id}\n readOnly={readOnly}\n info={info}\n status={status}\n charLimitDisplay={\n displayCharCount && typeof maxLength === 'number' ? (\n <Text\n id={`${id}-charCount`}\n readOnly={readOnly}\n variant='secondary'\n aria-live={maxLength >= 0 && maxLength - charCount <= 20 ? 'polite' : 'off'}\n >\n {maxLength >= 0 ? t('x_of_y', [charCount || '0', maxLength]) : charCount}{' '}\n <VisuallyHiddenText>{t('characters_typed')}</VisuallyHiddenText>\n </Text>\n ) : undefined\n }\n required={required}\n disabled={disabled}\n onResolveSuggestion={onResolveSuggestion}\n >\n {TextAreaControl}\n </FormField>\n ) : (\n TextAreaControl\n );\n});\n\nexport default withTestIds(TextArea, getTextAreaTestIds);\n"]}
@@ -31,6 +31,7 @@ export { default as useRefMap } from './useRefMap';
31
31
  export { default as useSimpleStore, createSimpleStore } from './useSimpleStore';
32
32
  export type { SimpleStore } from './useSimpleStore';
33
33
  export { default as useSimpleStoreInstance } from './useSimpleStoreInstance';
34
+ export { default as useSpeechRecognition } from './useSpeechRecognition';
34
35
  export { default as useScrollStick } from './useScrollStick';
35
36
  export { default as useScrollToggle } from './useScrollToggle';
36
37
  export { default as useShortcut } from './useShortcut';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE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,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -29,6 +29,7 @@ export { default as usePrevious } from './usePrevious';
29
29
  export { default as useRefMap } from './useRefMap';
30
30
  export { default as useSimpleStore, createSimpleStore } from './useSimpleStore';
31
31
  export { default as useSimpleStoreInstance } from './useSimpleStoreInstance';
32
+ export { default as useSpeechRecognition } from './useSpeechRecognition';
32
33
  export { default as useScrollStick } from './useScrollStick';
33
34
  export { default as useScrollToggle } from './useScrollToggle';
34
35
  export { default as useShortcut } from './useShortcut';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1F,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,gBAAg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AE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { default as useAbortController } from './useAbortController';\nexport { default as useActiveDescendant, useLazyDescendant } from './useActiveDescendant';\nexport type { UseActiveDescendantConfig } from './useActiveDescendant';\nexport { default as useAfterInitialEffect } from './useAfterInitialEffect';\nexport { default as useAnimatedText } from './useAnimatedText';\nexport { default as useArrows } from './useArrows';\nexport { default as useAutoResize } from './useAutoResize';\nexport { default as useBreakpoint } from './useBreakpoint';\nexport { default as useChToPxConversionFactor } from './useChToPxConversionFactor';\nexport { default as useConfiguration } from './useConfiguration';\nexport { default as useConsolidatedRef } from './useConsolidatedRef';\nexport { default as useDirection } from './useDirection';\nexport { default as useDraggable } from './useDraggable';\nexport { default as useElement } from './useElement';\nexport { default as useEscape } from './useEscape';\nexport { default as useEvent } from './useEvent';\nexport { default as useFocusTrap } from './useFocusTrap';\nexport { default as useFocusWithin } from './useFocusWithin';\nexport { default as useI18n } from './useI18n';\nexport { default as useInputFormatter } from './useInputFormatter';\nexport { default as useItemIntersection } from './useItemIntersection';\nexport { default as useLiveLog } from './useLiveLog';\nexport { default as useLongPress } from './useLongPress';\nexport { default as useModalContext } from './useModalContext';\nexport { default as useModalManager } from './useModalManager';\nexport { default as useOS } from './useOS';\nexport { default as useOuterEvent } from './useOuterEvent';\nexport { default as usePopoverMap } from './usePopoverMap';\nexport { default as usePrevious } from './usePrevious';\nexport { default as useRefMap } from './useRefMap';\nexport { default as useSimpleStore, createSimpleStore } from './useSimpleStore';\nexport type { SimpleStore } from './useSimpleStore';\nexport { default as useSimpleStoreInstance } from './useSimpleStoreInstance';\nexport { default as useScrollStick } from './useScrollStick';\nexport { default as useScrollToggle } from './useScrollToggle';\nexport { default as useShortcut } from './useShortcut';\nexport { default as useShortcutManager } from './useShortcutManager';\nexport { default as useTestIds } from './useTestIds';\nexport { default as useTheme } from './useTheme';\nexport { default as useToaster } from './useToaster';\nexport { default as useTransitionState } from './useTransitionState';\nexport { default as useTriggerableEffect } from './useTriggerableEffect';\nexport { default as useElementFocus } from './useElementFocus';\nexport { default as useTriggerableLayoutEffect } from './useTriggerableLayoutEffect';\nexport { default as useUID } from './useUID';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AA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AAC;AACzE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { default as useAbortController } from './useAbortController';\nexport { default as useActiveDescendant, useLazyDescendant } from './useActiveDescendant';\nexport type { UseActiveDescendantConfig } from './useActiveDescendant';\nexport { default as useAfterInitialEffect } from './useAfterInitialEffect';\nexport { default as useAnimatedText } from './useAnimatedText';\nexport { default as useArrows } from './useArrows';\nexport { default as useAutoResize } from './useAutoResize';\nexport { default as useBreakpoint } from './useBreakpoint';\nexport { default as useChToPxConversionFactor } from './useChToPxConversionFactor';\nexport { default as useConfiguration } from './useConfiguration';\nexport { default as useConsolidatedRef } from './useConsolidatedRef';\nexport { default as useDirection } from './useDirection';\nexport { default as useDraggable } from './useDraggable';\nexport { default as useElement } from './useElement';\nexport { default as useEscape } from './useEscape';\nexport { default as useEvent } from './useEvent';\nexport { default as useFocusTrap } from './useFocusTrap';\nexport { default as useFocusWithin } from './useFocusWithin';\nexport { default as useI18n } from './useI18n';\nexport { default as useInputFormatter } from './useInputFormatter';\nexport { default as useItemIntersection } from './useItemIntersection';\nexport { default as useLiveLog } from './useLiveLog';\nexport { default as useLongPress } from './useLongPress';\nexport { default as useModalContext } from './useModalContext';\nexport { default as useModalManager } from './useModalManager';\nexport { default as useOS } from './useOS';\nexport { default as useOuterEvent } from './useOuterEvent';\nexport { default as usePopoverMap } from './usePopoverMap';\nexport { default as usePrevious } from './usePrevious';\nexport { default as useRefMap } from './useRefMap';\nexport { default as useSimpleStore, createSimpleStore } from './useSimpleStore';\nexport type { SimpleStore } from './useSimpleStore';\nexport { default as useSimpleStoreInstance } from './useSimpleStoreInstance';\nexport { default as useSpeechRecognition } from './useSpeechRecognition';\nexport { default as useScrollStick } from './useScrollStick';\nexport { default as useScrollToggle } from './useScrollToggle';\nexport { default as useShortcut } from './useShortcut';\nexport { default as useShortcutManager } from './useShortcutManager';\nexport { default as useTestIds } from './useTestIds';\nexport { default as useTheme } from './useTheme';\nexport { default as useToaster } from './useToaster';\nexport { default as useTransitionState } from './useTransitionState';\nexport { default as useTriggerableEffect } from './useTriggerableEffect';\nexport { default as useElementFocus } from './useElementFocus';\nexport { default as useTriggerableLayoutEffect } from './useTriggerableLayoutEffect';\nexport { default as useUID } from './useUID';\n"]}
@@ -106,6 +106,8 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
106
106
  generate: string;
107
107
  reject: string;
108
108
  modify: string;
109
+ start: string;
110
+ stop: string;
109
111
  view_all: string;
110
112
  view_less: string;
111
113
  show_more: string;
@@ -284,6 +286,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
284
286
  composite_input_open_button_a11y: string;
285
287
  composite_input_close_button_a11y: string;
286
288
  menu_selection_instructions: string;
289
+ menu_filter_instructions: string;
287
290
  menu_item_expand_arrow: string;
288
291
  menu_item_collapse_arrow: string;
289
292
  menu_item_collapse_shift_space: string;
@@ -417,6 +420,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
417
420
  finalizing_response: string;
418
421
  preparing_content: string;
419
422
  response_generated: string;
423
+ processing_speech: string;
420
424
  good_response: string;
421
425
  bad_response: string;
422
426
  share_feedback: string;
@@ -457,6 +461,13 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
457
461
  shortcut_DismissToast: string;
458
462
  configurable_layout_instructions: string;
459
463
  page_number: string;
464
+ dictate: string;
465
+ stop_dictation: string;
466
+ no_speech_detected: string;
467
+ no_microphone_found: string;
468
+ microphone_access_denied: string;
469
+ speech_recognition_error: string;
470
+ speech_recognition_not_supported: string;
460
471
  drag_handle_activate_description: string;
461
472
  drag_handle_drop_description: string;
462
473
  drag_handle_cancel_description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useI18n.d.ts","sourceRoot":"","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,21 @@
1
+ /// <reference types="dom-speech-recognition" preserve="true" />
2
+ /**
3
+ * Hook for speech-to-text conversion using the Web Speech API.
4
+ * Provides real-time voice recognition with support for interim results and automatic error handling.
5
+ */
6
+ export interface UseSpeechRecognitionProps {
7
+ /** onResult handler */
8
+ onResult: (text: string) => void;
9
+ /** onInterimResult handler */
10
+ onInterimResult?: (text: string) => void;
11
+ /** BCP 47 language tag */
12
+ langCode?: string;
13
+ }
14
+ export default function useSpeechRecognition({ onResult, onInterimResult, langCode }: UseSpeechRecognitionProps): {
15
+ supported: boolean;
16
+ active: boolean;
17
+ error: string | null;
18
+ start: () => void;
19
+ stop: () => void;
20
+ };
21
+ //# sourceMappingURL=useSpeechRecognition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSpeechRecognition.d.ts","sourceRoot":"","sources":["../../src/hooks/useSpeechRecognition.ts"],"names":[],"mappings":";AAMA;;;GAGG;AAEH,MAAM,WAAW,yBAAyB;IACxC,uBAAuB;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,8BAA8B;IAC9B,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,QAAQ,EACR,eAAe,EACf,QAAwC,EACzC,EAAE,yBAAyB,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAyJA"}