@pega/cosmos-react-core 10.0.0-build.4.2 → 10.0.0-build.4.21
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/lib/components/AppShell/AppHeader.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.js +44 -7
- package/lib/components/AppShell/AppHeader.js.map +1 -1
- package/lib/components/AppShell/AppHeader.styles.d.ts +6 -2
- package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppHeader.styles.js +36 -18
- package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
- package/lib/components/AppShell/AppNavigationPanel.js +1 -1
- package/lib/components/AppShell/AppNavigationPanel.js.map +1 -1
- package/lib/components/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.js +27 -9
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/AppShellContext.d.ts +1 -0
- package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellContext.js +1 -0
- package/lib/components/AppShell/AppShellContext.js.map +1 -1
- package/lib/components/AppShell/AppShellList.js +1 -1
- package/lib/components/AppShell/AppShellList.js.map +1 -1
- package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
- package/lib/components/AppShell/NavigationList.js +3 -2
- package/lib/components/AppShell/NavigationList.js.map +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
- package/lib/components/AppShell/NavigationListItemWrapper.js +87 -48
- package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
- package/lib/components/Avatar/Avatar.d.ts +1 -1
- package/lib/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/components/Avatar/Avatar.js.map +1 -1
- package/lib/components/Badges/Selection.js +1 -1
- package/lib/components/Badges/Selection.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.js +3 -6
- package/lib/components/ComboBox/ComboBox.js.map +1 -1
- package/lib/components/ComboBox/ComboBox.styles.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.styles.js +9 -1
- package/lib/components/ComboBox/ComboBox.styles.js.map +1 -1
- package/lib/components/ComboBox/ComboBoxInput.d.ts +0 -2
- package/lib/components/ComboBox/ComboBoxInput.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBoxInput.js +2 -2
- package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts +4 -6
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +96 -189
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.d.ts +190 -0
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.d.ts.map +1 -0
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.js +72 -0
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.styles.js.map +1 -0
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +0 -2
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.js.map +1 -1
- package/lib/components/Configuration/Configuration.d.ts.map +1 -1
- package/lib/components/Configuration/Configuration.js +3 -1
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
- package/lib/components/Currency/CurrencyInput.js +19 -12
- package/lib/components/Currency/CurrencyInput.js.map +1 -1
- package/lib/components/Currency/utils.d.ts +8 -0
- package/lib/components/Currency/utils.d.ts.map +1 -1
- package/lib/components/Currency/utils.js +34 -4
- package/lib/components/Currency/utils.js.map +1 -1
- package/lib/components/DateTime/DateTimeDisplay.d.ts +2 -2
- package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
- package/lib/components/DateTime/DateTimeDisplay.js +29 -4
- package/lib/components/DateTime/DateTimeDisplay.js.map +1 -1
- package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateInput.js +7 -7
- package/lib/components/DateTime/Input/DateInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateRangeInput.js +8 -2
- package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/DateTimeInput.js +8 -8
- package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/MonthInput.js +2 -2
- package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
- package/lib/components/DateTime/Input/QuarterInput.js +2 -2
- package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeInput.js +3 -3
- package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/TimeRangeInput.js +12 -4
- package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/WeekInput.js +2 -2
- package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
- package/lib/components/DateTime/Input/utils.d.ts +6 -0
- package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
- package/lib/components/DateTime/Input/utils.js +47 -0
- package/lib/components/DateTime/Input/utils.js.map +1 -1
- package/lib/components/DateTime/utils.d.ts +15 -4
- package/lib/components/DateTime/utils.d.ts.map +1 -1
- package/lib/components/DateTime/utils.js +24 -3
- package/lib/components/DateTime/utils.js.map +1 -1
- package/lib/components/Dialog/InfoDialogWrapper.d.ts +4 -0
- package/lib/components/Dialog/InfoDialogWrapper.d.ts.map +1 -0
- package/lib/components/Dialog/InfoDialogWrapper.js +13 -0
- package/lib/components/Dialog/InfoDialogWrapper.js.map +1 -0
- package/lib/components/Dialog/TouchDialog.d.ts +5 -0
- package/lib/components/Dialog/TouchDialog.d.ts.map +1 -0
- package/lib/components/Dialog/TouchDialog.js +85 -0
- package/lib/components/Dialog/TouchDialog.js.map +1 -0
- package/lib/components/Dialog/TouchDialog.styles.d.ts +7 -0
- package/lib/components/Dialog/TouchDialog.styles.d.ts.map +1 -0
- package/lib/components/Dialog/TouchDialog.styles.js +62 -0
- package/lib/components/Dialog/TouchDialog.styles.js.map +1 -0
- package/lib/components/Dialog/TouchDialog.test-ids.d.ts +2 -0
- package/lib/components/Dialog/TouchDialog.test-ids.d.ts.map +1 -0
- package/lib/components/Dialog/TouchDialog.test-ids.js +3 -0
- package/lib/components/Dialog/TouchDialog.test-ids.js.map +1 -0
- package/lib/components/Dialog/TouchDialog.types.d.ts +42 -0
- package/lib/components/Dialog/TouchDialog.types.d.ts.map +1 -0
- package/lib/components/Dialog/TouchDialog.types.js +2 -0
- package/lib/components/Dialog/TouchDialog.types.js.map +1 -0
- package/lib/components/Dialog/TouchInfoDialog.d.ts +4 -0
- package/lib/components/Dialog/TouchInfoDialog.d.ts.map +1 -0
- package/lib/components/Dialog/TouchInfoDialog.js +14 -0
- package/lib/components/Dialog/TouchInfoDialog.js.map +1 -0
- package/lib/components/Dialog/index.d.ts +4 -1
- package/lib/components/Dialog/index.d.ts.map +1 -1
- package/lib/components/Dialog/index.js +3 -1
- package/lib/components/Dialog/index.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.d.ts +12 -7
- package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/FieldGroup/FieldGroup.js +28 -25
- package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/FieldGroup/FieldGroupList.js +1 -1
- package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.d.ts +3 -1
- package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/FieldValueList/FieldValueList.js +15 -6
- package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/File/CompactList.js +1 -1
- package/lib/components/File/CompactList.js.map +1 -1
- package/lib/components/File/FileItem.d.ts +38 -0
- package/lib/components/File/FileItem.d.ts.map +1 -1
- package/lib/components/File/FileItem.js +167 -23
- package/lib/components/File/FileItem.js.map +1 -1
- package/lib/components/File/FileList.d.ts.map +1 -1
- package/lib/components/File/FileList.js +6 -2
- package/lib/components/File/FileList.js.map +1 -1
- package/lib/components/File/index.d.ts +1 -1
- package/lib/components/File/index.d.ts.map +1 -1
- package/lib/components/File/index.js.map +1 -1
- package/lib/components/File/mimeTypes.json +1 -0
- package/lib/components/FormField/FormField.d.ts +9 -1
- package/lib/components/FormField/FormField.d.ts.map +1 -1
- package/lib/components/FormField/FormField.js +26 -10
- package/lib/components/FormField/FormField.js.map +1 -1
- package/lib/components/Icon/Icon.d.ts +5 -0
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.js +44 -4
- package/lib/components/Icon/Icon.js.map +1 -1
- package/lib/components/Icon/iconNames.d.ts +1 -0
- package/lib/components/Icon/iconNames.d.ts.map +1 -1
- package/lib/components/Icon/iconNames.js +1 -0
- package/lib/components/Icon/iconNames.js.map +1 -1
- package/lib/components/Icon/icons/search-solid.icon.d.ts +1 -1
- package/lib/components/Icon/icons/search-solid.icon.js +3 -3
- package/lib/components/Icon/icons/search-solid.icon.js.map +1 -1
- package/lib/components/Icon/streamlineIconNames.d.ts +1 -0
- package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
- package/lib/components/Icon/streamlineIconNames.js +1 -0
- package/lib/components/Icon/streamlineIconNames.js.map +1 -1
- package/lib/components/Link/Link.d.ts +6 -13
- package/lib/components/Link/Link.d.ts.map +1 -1
- package/lib/components/Link/Link.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.js +1 -1
- package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
- package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -1
- package/lib/components/ListToolbar/PresetMenuPopover.js +16 -5
- package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -1
- package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
- package/lib/components/MenuButton/MenuButton.js +33 -7
- package/lib/components/MenuButton/MenuButton.js.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.styles.d.ts +25 -1
- package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
- package/lib/components/MultiStepForm/FormProgress.styles.js +168 -5
- package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts +2 -2
- package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.js +48 -22
- package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.js +2 -2
- package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.types.d.ts +5 -0
- package/lib/components/MultiStepForm/MultiStepForm.types.d.ts.map +1 -1
- package/lib/components/MultiStepForm/MultiStepForm.types.js.map +1 -1
- package/lib/components/MultiStepForm/VerticalFormProgress.d.ts +2 -2
- package/lib/components/MultiStepForm/VerticalFormProgress.d.ts.map +1 -1
- package/lib/components/MultiStepForm/VerticalFormProgress.js +45 -20
- package/lib/components/MultiStepForm/VerticalFormProgress.js.map +1 -1
- package/lib/components/MultiStepForm/useFormProgressOverflow.d.ts +1 -1
- package/lib/components/MultiStepForm/useFormProgressOverflow.d.ts.map +1 -1
- package/lib/components/MultiStepForm/useFormProgressOverflow.js +17 -9
- package/lib/components/MultiStepForm/useFormProgressOverflow.js.map +1 -1
- package/lib/components/Number/utils.js +1 -1
- package/lib/components/Number/utils.js.map +1 -1
- package/lib/components/PageTemplates/PageTemplates.js +1 -1
- package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.d.ts +1 -1
- package/lib/components/SelectionCard/SelectionCard.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.js +3 -3
- package/lib/components/SelectionCard/SelectionCard.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCardDisplay.d.ts +5 -0
- package/lib/components/SelectionCard/SelectionCardDisplay.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCardDisplay.js +4 -2
- package/lib/components/SelectionCard/SelectionCardDisplay.js.map +1 -1
- package/lib/components/SpeechToTextButton/SpeechToTextButton.js +1 -1
- package/lib/components/SpeechToTextButton/SpeechToTextButton.js.map +1 -1
- package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/SummaryList/SummaryList.js +8 -4
- package/lib/components/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.js +7 -21
- package/lib/components/TextArea/TextArea.js.map +1 -1
- package/lib/components/TextArea/TextArea.styles.d.ts +0 -1
- package/lib/components/TextArea/TextArea.styles.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.styles.js +1 -2
- package/lib/components/TextArea/TextArea.styles.js.map +1 -1
- package/lib/hooks/useI18n.d.ts +13 -9
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/i18n/default.d.ts +13 -10
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +16 -12
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +13 -9
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/styles/GlobalStyle.d.ts.map +1 -1
- package/lib/styles/GlobalStyle.js +3 -3
- package/lib/styles/GlobalStyle.js.map +1 -1
- package/lib/theme/theme.d.ts +48 -0
- package/lib/theme/theme.d.ts.map +1 -1
- package/lib/theme/themeDefinition.json +26 -0
- package/lib/theme/themeOverrides.schema.json +36 -0
- package/lib/theme/themes/aurigaDarkTheme.json +54 -61
- package/lib/theme/themes/aurigaTheme.json +49 -56
- package/lib/theme/themes/virgoTheme.json +3 -3
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/isTouchDevice.d.ts +3 -0
- package/lib/utils/isTouchDevice.d.ts.map +1 -0
- package/lib/utils/isTouchDevice.js +4 -0
- package/lib/utils/isTouchDevice.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryList.js","sourceRoot":"","sources":["../../../src/components/SummaryList/SummaryList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,IAAI,EAAE,EAAkB,MAAM,SAAS,CAAC;AAC/C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,UA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AAC,UAAU,CAAC,GACP,GACE,CACd,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, useEffect, useMemo, useRef } from 'react';\nimport type { PropsWithoutRef, Ref, RefObject } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Actions from '../Actions';\nimport type { ActionsProps } from '../Actions';\nimport Flex from '../Flex';\nimport Text from '../Text';\nimport Count from '../Badges/Count';\nimport Icon, { type IconProps } from '../Icon';\nimport Card, { CardHeader, CardContent, CardFooter, StyledCard } from '../Card';\nimport EmptyState from '../EmptyState';\nimport type { EmptyStateProps } from '../EmptyState';\nimport type {\n ForwardProps,\n ForwardRefForwardPropsComponent,\n NoChildrenProp,\n OmitStrict,\n Action,\n HeadingTag\n} from '../../types';\nimport { omitProps } from '../../styles';\nimport { useI18n, usePrevious, useRefMap } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport SummaryItem from '../SummaryItem';\nimport type { SummaryItemProps } from '../SummaryItem';\nimport Progress from '../Progress';\nimport Button from '../Button';\nimport ErrorState from '../ErrorState';\nimport type { ErrorStateProps } from '../ErrorState';\nimport { StyledCardFooter } from '../Card/CardFooter';\n\nexport interface SummaryListProps extends NoChildrenProp {\n /** Name of the utility to be used as its heading along with associated actions and aria attributes. */\n name?: string;\n /**\n * The heading tag to render the provided name as with.\n * @default 'h2'\n */\n headingTag?: HeadingTag;\n /**\n * Hides the header while still allowing 'name' prop to supply aria attributes\n * @default false\n */\n hideHeader?: boolean;\n /** Identifier for the icon within Pega icons. */\n icon?: IconProps['name'] | IconProps;\n /** Integer representing the total count of items for a list utility dataset. */\n count?: number;\n /** Top level actions for the utility. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n /** If the utility is in a state of fetching data. */\n loading?: boolean | string;\n /** An array of SummaryListItem objects to render. Pass an appropriately limited length array with a desired sort order based on design system defaults or config. */\n items: SummaryListItem[];\n /** User click initiated callback for when to show view all modal. List lengths less than the count prop will display a \"View all\" button with this function is bound to. */\n onViewAll?: (callback: Function) => void;\n /** A simple message to display when there are no items. */\n noItemsText?: EmptyStateProps['message'];\n /**\n * Indicate an error occurred while acquiring data for the list.\n * The default error state may be overridden with custom props.\n */\n error?: boolean | ErrorStateProps;\n /** ID of the item that was just deleted. Setting this triggers post-delete focus management. */\n deletedItemId?: string;\n /** Called after focus has been managed post-delete so the consumer can clear deletedItemId. */\n onDeleteFocusComplete?: () => void;\n /** Ref to the fallback element (e.g. Add button) to focus when the list becomes empty after deletion. */\n fallbackFocusRef?: RefObject<HTMLElement | null>;\n /** Ref for the SummaryList's root element. */\n ref?: Ref<HTMLElement>;\n}\n\nexport interface SummaryListItem\n extends OmitStrict<SummaryItemProps, 'actions'>,\n Pick<ActionsProps, 'contextualLabel'>,\n ForwardProps {\n /** A unique id to represent the item. */\n id: string;\n /** A set of Actions to render alongside the item. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n /** Ref for the action menu button element. */\n actionsRef?: ActionsProps['ref'];\n}\n\nexport const StyledSummaryListHeader = styled(CardHeader)(\n ({ theme }) => css`\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n }\n `\n);\n\nStyledSummaryListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListContent = styled(CardContent).withConfig(omitProps('loading'))<{\n loading?: boolean | string;\n}>(\n ({ theme, loading }) => css`\n ${loading &&\n css`\n min-height: 4rem;\n `}\n\n &:not(:last-child) > ul > li:last-child {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n\n & + ${StyledCardFooter} {\n padding-block-start: ${theme.base.spacing};\n }\n }\n `\n);\n\nStyledSummaryListContent.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListItem = styled(SummaryItem)(\n ({ theme }) => css`\n padding-block: ${theme.base.spacing};\n\n &:not(:last-child) {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n `\n);\n\nStyledSummaryListItem.defaultProps = defaultThemeProp;\n\nexport const SummaryListItems = ({ name, items }: Pick<SummaryListProps, 'items' | 'name'>) => {\n const t = useI18n();\n return (\n <ul>\n {items.map(\n ({\n id,\n actions: itemActions,\n actionsRef,\n contextualLabel,\n iconColor,\n ...restItemProps\n }) => {\n return (\n <StyledSummaryListItem\n key={id}\n {...restItemProps}\n forwardedAs='li'\n actions={\n itemActions && (\n <Actions\n ref={actionsRef}\n items={itemActions}\n contextualLabel={\n name && contextualLabel\n ? t('action_from_summarylist_heading', [contextualLabel, name])\n : contextualLabel\n }\n />\n )\n }\n />\n );\n }\n )}\n </ul>\n );\n};\n\nconst SummaryList: ForwardRefForwardPropsComponent<SummaryListProps> = forwardRef(\n function SummaryList(\n {\n icon,\n name,\n headingTag = 'h2',\n hideHeader,\n count,\n actions,\n items,\n onViewAll,\n loading,\n noItemsText,\n error,\n deletedItemId,\n onDeleteFocusComplete,\n fallbackFocusRef,\n ...restProps\n }: PropsWithoutRef<SummaryListProps>,\n ref: SummaryListProps['ref']\n ) {\n const t = useI18n();\n\n // Delete focus management\n const [actionRefMap, getActionRefCb] = useRefMap<HTMLButtonElement>();\n const prevItems = usePrevious(items);\n const hasProcessedDeleteRef = useRef(false);\n const headerActionsRef = useRef<HTMLButtonElement>(null);\n\n const processedItems = useMemo(() => {\n return items.map(item => {\n const refCb = getActionRefCb(item.id);\n return {\n ...item,\n actionsRef(el: HTMLButtonElement | null) {\n refCb(el);\n if (typeof item.actionsRef === 'function') item.actionsRef(el);\n }\n };\n });\n }, [items]);\n\n useEffect(() => {\n if (!deletedItemId) {\n hasProcessedDeleteRef.current = false;\n return;\n }\n if (hasProcessedDeleteRef.current) return;\n\n const stillPresent = items.some(item => item.id === deletedItemId);\n if (stillPresent) return;\n\n hasProcessedDeleteRef.current = true;\n\n if (items.length === 0) {\n const fallbackEl = fallbackFocusRef?.current ?? headerActionsRef.current;\n fallbackEl?.focus();\n } else {\n const prevIndex = prevItems?.findIndex(item => item.id === deletedItemId) ?? -1;\n let targetIndex = Math.min(prevIndex, items.length - 1);\n if (targetIndex < 0) targetIndex = 0;\n\n const targetId = items[targetIndex]?.id;\n if (targetId) {\n actionRefMap.get(targetId)?.focus();\n }\n }\n\n onDeleteFocusComplete?.();\n }, [deletedItemId, items]);\n\n const content = useMemo(() => {\n if (loading) {\n return (\n <Progress placement='local' message={typeof loading === 'string' ? loading : undefined} />\n );\n }\n\n if (error) {\n return <ErrorState {...(error === true ? {} : error)} />;\n }\n\n return items.length > 0 ? (\n <SummaryListItems name={name} items={processedItems} />\n ) : (\n <EmptyState message={noItemsText} />\n );\n }, [loading, items, processedItems, noItemsText, error]);\n\n return (\n <Card ref={ref} {...restProps}>\n {!hideHeader && (icon || name || typeof count === 'number' || actions) && (\n <StyledSummaryListHeader>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n {icon && (typeof icon === 'string' ? <Icon name={icon} /> : <Icon {...icon} />)}\n {name && <Text variant={headingTag}>{name}</Text>}\n {typeof count === 'number' && <Count>{count}</Count>}\n </Flex>\n {actions && <Actions ref={headerActionsRef} items={actions} contextualLabel={name} />}\n </StyledSummaryListHeader>\n )}\n\n <StyledSummaryListContent loading={loading}>{content}</StyledSummaryListContent>\n\n {!error && typeof count === 'number' && count > items.length && onViewAll && (\n <CardFooter justify='center'>\n <Button\n variant='link'\n aria-label={name ? t('view_all_noun', [name.toLowerCase()]) : t('view_all')}\n onClick={onViewAll}\n >\n {t('view_all')}\n </Button>\n </CardFooter>\n )}\n </Card>\n );\n }\n);\n\nexport default SummaryList;\n"]}
|
|
1
|
+
{"version":3,"file":"SummaryList.js","sourceRoot":"","sources":["../../../src/components/SummaryList/SummaryList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,MAA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AI,IAC7D,CAC3B,EAED,KAAC,wBAAwB,IAAC,OAAO,EAAE,OAAO,YAAG,OAAO,GAA4B,EAE/E,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,IAAI,SAAS,IAAI,CAC3E,KAAC,UAAU,IAAC,OAAO,EAAC,QAAQ,YAC1B,KAAC,MAAM,IACL,OAAO,EAAC,MAAM,gBACF,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAC3E,OAAO,EAAE,SAAS,YAEjB,CAAC,CAAC,UAAU,CAAC,GACP,GACE,CACd,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef, useEffect, useMemo, useRef } from 'react';\nimport type { PropsWithoutRef, Ref, RefObject } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Actions from '../Actions';\nimport type { ActionsProps } from '../Actions';\nimport Flex from '../Flex';\nimport Text from '../Text';\nimport Count from '../Badges/Count';\nimport Icon, { type IconProps } from '../Icon';\nimport Card, { CardHeader, CardContent, CardFooter, StyledCard } from '../Card';\nimport EmptyState from '../EmptyState';\nimport type { EmptyStateProps } from '../EmptyState';\nimport type {\n ForwardProps,\n ForwardRefForwardPropsComponent,\n NoChildrenProp,\n OmitStrict,\n Action,\n HeadingTag\n} from '../../types';\nimport { omitProps } from '../../styles';\nimport { useI18n, usePrevious, useRefMap } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport SummaryItem, { StyledSecondary } from '../SummaryItem';\nimport type { SummaryItemProps } from '../SummaryItem';\nimport Progress from '../Progress';\nimport Button from '../Button';\nimport ErrorState from '../ErrorState';\nimport type { ErrorStateProps } from '../ErrorState';\nimport { StyledCardFooter } from '../Card/CardFooter';\n\nexport interface SummaryListProps extends NoChildrenProp {\n /** Name of the utility to be used as its heading along with associated actions and aria attributes. */\n name?: string;\n /**\n * The heading tag to render the provided name as with.\n * @default 'h2'\n */\n headingTag?: HeadingTag;\n /**\n * Hides the header while still allowing 'name' prop to supply aria attributes\n * @default false\n */\n hideHeader?: boolean;\n /** Identifier for the icon within Pega icons. */\n icon?: IconProps['name'] | IconProps;\n /** Integer representing the total count of items for a list utility dataset. */\n count?: number;\n /** Top level actions for the utility. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n /** If the utility is in a state of fetching data. */\n loading?: boolean | string;\n /** An array of SummaryListItem objects to render. Pass an appropriately limited length array with a desired sort order based on design system defaults or config. */\n items: SummaryListItem[];\n /** User click initiated callback for when to show view all modal. List lengths less than the count prop will display a \"View all\" button with this function is bound to. */\n onViewAll?: (callback: Function) => void;\n /** A simple message to display when there are no items. */\n noItemsText?: EmptyStateProps['message'];\n /**\n * Indicate an error occurred while acquiring data for the list.\n * The default error state may be overridden with custom props.\n */\n error?: boolean | ErrorStateProps;\n /** ID of the item that was just deleted. Setting this triggers post-delete focus management. */\n deletedItemId?: string;\n /** Called after focus has been managed post-delete so the consumer can clear deletedItemId. */\n onDeleteFocusComplete?: () => void;\n /** Ref to the fallback element (e.g. Add button) to focus when the list becomes empty after deletion. */\n fallbackFocusRef?: RefObject<HTMLElement | null>;\n /** Ref for the SummaryList's root element. */\n ref?: Ref<HTMLElement>;\n}\n\nexport interface SummaryListItem\n extends OmitStrict<SummaryItemProps, 'actions'>,\n Pick<ActionsProps, 'contextualLabel'>,\n ForwardProps {\n /** A unique id to represent the item. */\n id: string;\n /** A set of Actions to render alongside the item. If more than one action is passed a consolidated ActionMenu will be generated. */\n actions?: Action[];\n /** Ref for the action menu button element. */\n actionsRef?: ActionsProps['ref'];\n}\n\nexport const StyledSummaryListHeader = styled(CardHeader)(\n ({ theme }) => css`\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n }\n `\n);\n\nStyledSummaryListHeader.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListContent = styled(CardContent).withConfig(omitProps('loading'))<{\n loading?: boolean | string;\n}>(\n ({ theme, loading }) => css`\n ${loading &&\n css`\n min-height: 4rem;\n `}\n\n &:not(:last-child) > ul > li:last-child {\n border-block-end: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n\n &:not(${StyledCard} ${StyledCard} > &) {\n padding-block-end: calc(${theme.base.spacing} / 2);\n\n & + ${StyledCardFooter} {\n padding-block-start: ${theme.base.spacing};\n }\n }\n `\n);\n\nStyledSummaryListContent.defaultProps = defaultThemeProp;\n\nexport const StyledSummaryListItem = styled(SummaryItem)(\n ({\n theme: {\n base: { spacing, palette },\n components: {\n 'summary-item': { 'vertical-gap': verticalGap }\n }\n }\n }) => css`\n padding-block: ${spacing};\n\n ${StyledSecondary} {\n margin-block-start: ${verticalGap};\n }\n\n &:not(:last-child) {\n border-block-end: 0.0625rem solid ${palette['border-line']};\n }\n `\n);\n\nStyledSummaryListItem.defaultProps = defaultThemeProp;\n\nexport const SummaryListItems = ({ name, items }: Pick<SummaryListProps, 'items' | 'name'>) => {\n const t = useI18n();\n return (\n <ul>\n {items.map(\n ({\n id,\n actions: itemActions,\n actionsRef,\n contextualLabel,\n iconColor,\n ...restItemProps\n }) => {\n return (\n <StyledSummaryListItem\n key={id}\n {...restItemProps}\n forwardedAs='li'\n actions={\n itemActions && (\n <Actions\n ref={actionsRef}\n items={itemActions}\n contextualLabel={\n name && contextualLabel\n ? t('action_from_summarylist_heading', [contextualLabel, name])\n : contextualLabel\n }\n />\n )\n }\n />\n );\n }\n )}\n </ul>\n );\n};\n\nconst SummaryList: ForwardRefForwardPropsComponent<SummaryListProps> = forwardRef(\n function SummaryList(\n {\n icon,\n name,\n headingTag = 'h2',\n hideHeader,\n count,\n actions,\n items,\n onViewAll,\n loading,\n noItemsText,\n error,\n deletedItemId,\n onDeleteFocusComplete,\n fallbackFocusRef,\n ...restProps\n }: PropsWithoutRef<SummaryListProps>,\n ref: SummaryListProps['ref']\n ) {\n const t = useI18n();\n\n // Delete focus management\n const [actionRefMap, getActionRefCb] = useRefMap<HTMLButtonElement>();\n const prevItems = usePrevious(items);\n const hasProcessedDeleteRef = useRef(false);\n const headerActionsRef = useRef<HTMLButtonElement>(null);\n\n const processedItems = useMemo(() => {\n return items.map(item => {\n const refCb = getActionRefCb(item.id);\n return {\n ...item,\n actionsRef(el: HTMLButtonElement | null) {\n refCb(el);\n if (typeof item.actionsRef === 'function') item.actionsRef(el);\n }\n };\n });\n }, [items]);\n\n useEffect(() => {\n if (!deletedItemId) {\n hasProcessedDeleteRef.current = false;\n return;\n }\n if (hasProcessedDeleteRef.current) return;\n\n const stillPresent = items.some(item => item.id === deletedItemId);\n if (stillPresent) return;\n\n hasProcessedDeleteRef.current = true;\n\n if (items.length === 0) {\n const fallbackEl = fallbackFocusRef?.current ?? headerActionsRef.current;\n fallbackEl?.focus();\n } else {\n const prevIndex = prevItems?.findIndex(item => item.id === deletedItemId) ?? -1;\n let targetIndex = Math.min(prevIndex, items.length - 1);\n if (targetIndex < 0) targetIndex = 0;\n\n const targetId = items[targetIndex]?.id;\n if (targetId) {\n actionRefMap.get(targetId)?.focus();\n }\n }\n\n onDeleteFocusComplete?.();\n }, [deletedItemId, items]);\n\n const content = useMemo(() => {\n if (loading) {\n return (\n <Progress placement='local' message={typeof loading === 'string' ? loading : undefined} />\n );\n }\n\n if (error) {\n return <ErrorState {...(error === true ? {} : error)} />;\n }\n\n return items.length > 0 ? (\n <SummaryListItems name={name} items={processedItems} />\n ) : (\n <EmptyState message={noItemsText} />\n );\n }, [loading, items, processedItems, noItemsText, error]);\n\n return (\n <Card ref={ref} {...restProps}>\n {!hideHeader && (icon || name || typeof count === 'number' || actions) && (\n <StyledSummaryListHeader>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n {icon && (typeof icon === 'string' ? <Icon name={icon} /> : <Icon {...icon} />)}\n {name && <Text variant={headingTag}>{name}</Text>}\n {typeof count === 'number' && <Count>{count}</Count>}\n </Flex>\n {actions && <Actions ref={headerActionsRef} items={actions} contextualLabel={name} />}\n </StyledSummaryListHeader>\n )}\n\n <StyledSummaryListContent loading={loading}>{content}</StyledSummaryListContent>\n\n {!error && typeof count === 'number' && count > items.length && onViewAll && (\n <CardFooter justify='center'>\n <Button\n variant='link'\n aria-label={name ? t('view_all_noun', [name.toLowerCase()]) : t('view_all')}\n onClick={onViewAll}\n >\n {t('view_all')}\n </Button>\n </CardFooter>\n )}\n </Card>\n );\n }\n);\n\nexport default SummaryList;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,EAAE,EAIF,kBAAkB,EAElB,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAgBvD,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;IAEnB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACjD,MAAM,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;CACjD;;;;AA+
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,EAAE,EAIF,kBAAkB,EAElB,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAgBvD,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;IAEnB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IACjD,MAAM,CAAC,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;CACjD;;;;AA+MD,wBAAyD"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useCallback, useState, useEffect, useRef
|
|
2
|
+
import { forwardRef, useCallback, useState, useEffect, useRef } from 'react';
|
|
3
3
|
import FormField from '../FormField';
|
|
4
4
|
import { StyledFormControl } from '../FormControl';
|
|
5
5
|
import { hasProp, withTestIds } from '../../utils';
|
|
6
6
|
import { useConsolidatedRef, useElement, useI18n, useLiveLog, useTestIds, useUID } from '../../hooks';
|
|
7
7
|
import Text from '../Text';
|
|
8
8
|
import VisuallyHiddenText from '../VisuallyHiddenText';
|
|
9
|
-
import StyledTextArea
|
|
9
|
+
import StyledTextArea from './TextArea.styles';
|
|
10
10
|
import { getTextAreaTestIds } from './TextArea.test-ids';
|
|
11
11
|
const warnCharCount = 30;
|
|
12
12
|
const TextArea = forwardRef(function TextArea(props, ref) {
|
|
@@ -19,7 +19,6 @@ const TextArea = forwardRef(function TextArea(props, ref) {
|
|
|
19
19
|
const [textAreaEl, setTextAreaEl] = useElement();
|
|
20
20
|
const textAreaRef = useConsolidatedRef(ref, setTextAreaEl);
|
|
21
21
|
const prevHeightRef = useRef(0);
|
|
22
|
-
const heightPxRef = useRef(0);
|
|
23
22
|
const focusTimeoutRef = useRef(NaN);
|
|
24
23
|
const { announceAssertive } = useLiveLog();
|
|
25
24
|
const controlProp = {};
|
|
@@ -54,12 +53,7 @@ const TextArea = forwardRef(function TextArea(props, ref) {
|
|
|
54
53
|
const recalculateHeight = useCallback(() => {
|
|
55
54
|
if (!textAreaRef.current)
|
|
56
55
|
return;
|
|
57
|
-
const
|
|
58
|
-
const currentHeight = parseFloat(getComputedStyle(textAreaRef.current).getPropertyValue('--textarea-height'));
|
|
59
|
-
textAreaRef.current.style.marginBlockEnd =
|
|
60
|
-
currentHeight > baseHeightPx
|
|
61
|
-
? `calc(min(${textAreaMaxHeight}, ${currentHeight}px) - ${baseHeightPx}px)`
|
|
62
|
-
: '0';
|
|
56
|
+
const scrollY = window.scrollY;
|
|
63
57
|
textAreaRef.current.style.setProperty('--textarea-height', 'auto');
|
|
64
58
|
// Remove scrollbar width to avoid interference with calculation.
|
|
65
59
|
textAreaRef.current.style.setProperty('scrollbar-width', 'none');
|
|
@@ -67,14 +61,12 @@ const TextArea = forwardRef(function TextArea(props, ref) {
|
|
|
67
61
|
const borderWidth = textAreaRef.current.offsetHeight - textAreaRef.current.clientHeight;
|
|
68
62
|
// Set height to auto then scrollHeight + borderWidth to resize TextArea to content
|
|
69
63
|
textAreaRef.current.style.setProperty('--textarea-height', `${scrollHeight + borderWidth}px`);
|
|
70
|
-
textAreaRef.current.style.removeProperty('margin-block-end');
|
|
71
64
|
textAreaRef.current.style.removeProperty('scrollbar-width');
|
|
65
|
+
// height:auto can trigger browser caret scroll-into-view; undo if it moved.
|
|
66
|
+
if (window.scrollY !== scrollY) {
|
|
67
|
+
window.scrollTo(window.scrollX, scrollY);
|
|
68
|
+
}
|
|
72
69
|
}, []);
|
|
73
|
-
useLayoutEffect(() => {
|
|
74
|
-
if (!textAreaRef.current)
|
|
75
|
-
return;
|
|
76
|
-
heightPxRef.current = textAreaRef.current.offsetHeight;
|
|
77
|
-
}, [textAreaEl]);
|
|
78
70
|
useEffect(() => {
|
|
79
71
|
if (!textAreaRef.current)
|
|
80
72
|
return;
|
|
@@ -93,12 +85,6 @@ const TextArea = forwardRef(function TextArea(props, ref) {
|
|
|
93
85
|
const observer = new ResizeObserver(entries => {
|
|
94
86
|
const currentHeight = entries[0].contentRect.height;
|
|
95
87
|
if (prevHeightRef.current === 0 && currentHeight > 0) {
|
|
96
|
-
const textareaHeight = getComputedStyle(textAreaEl)
|
|
97
|
-
.getPropertyValue('--textarea-height')
|
|
98
|
-
.trim();
|
|
99
|
-
if (!textareaHeight || textareaHeight === 'auto' || textareaHeight === 'unset') {
|
|
100
|
-
heightPxRef.current = textAreaEl.offsetHeight;
|
|
101
|
-
}
|
|
102
88
|
recalculateHeight();
|
|
103
89
|
}
|
|
104
90
|
prevHeightRef.current = currentHeight;
|
|
@@ -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,MAAM,EAAE,eAAe,EAAE,MAAM,OAAO,CA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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,UAAU,EAAE,UAAU,YAErB,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, useRef, useLayoutEffect } from 'react';\nimport type {\n FC,\n Ref,\n PropsWithoutRef,\n ChangeEvent,\n ChangeEventHandler,\n FocusEvent,\n FocusEventHandler\n} 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 {\n useConsolidatedRef,\n useElement,\n useI18n,\n useLiveLog,\n useTestIds,\n useUID\n} from '../../hooks';\nimport Text from '../Text';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\n\nimport StyledTextArea, { textAreaMaxHeight } 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\n onChange?: ChangeEventHandler<HTMLTextAreaElement>;\n onFocus?: FocusEventHandler<HTMLTextAreaElement>;\n onBlur?: FocusEventHandler<HTMLTextAreaElement>;\n}\n\nconst warnCharCount = 30;\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 suggestion,\n ...restProps\n } = props;\n const t = useI18n();\n\n const testIds = useTestIds(testId, getTextAreaTestIds);\n const [charCount, setCharCount] = useState(value?.length ?? defaultValue?.length ?? 0);\n const [focused, setFocused] = useState(false);\n const [textAreaEl, setTextAreaEl] = useElement<HTMLTextAreaElement>();\n const textAreaRef = useConsolidatedRef(ref, setTextAreaEl);\n const prevHeightRef = useRef(0);\n const heightPxRef = useRef(0);\n const focusTimeoutRef = useRef(NaN);\n const { announceAssertive } = useLiveLog();\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 (maxLength !== undefined) {\n if (e.target.value.length >= maxLength) {\n announceAssertive({ message: t('text_area_character_limit'), type: 'warning' });\n } else if (maxLength > warnCharCount) {\n const prevCharsRemaining = maxLength - charCount;\n const charsRemaining = maxLength - e.target.value.length;\n\n if (charsRemaining < warnCharCount && prevCharsRemaining >= warnCharCount) {\n announceAssertive({\n message: t('text_area_characters_remaining', [`${warnCharCount}`]),\n type: 'warning'\n });\n }\n }\n }\n\n if (!hardStop || maxLength === undefined || e.target.value.length <= maxLength) {\n onChangeProp?.(e);\n setCharCount(e.target.value.length);\n }\n },\n [onChangeProp, charCount, hardStop, maxLength, announceAssertive, t]\n );\n\n const recalculateHeight = useCallback(() => {\n if (!textAreaRef.current) return;\n\n const baseHeightPx = heightPxRef.current;\n const currentHeight = parseFloat(\n getComputedStyle(textAreaRef.current).getPropertyValue('--textarea-height')\n );\n textAreaRef.current.style.marginBlockEnd =\n currentHeight > baseHeightPx\n ? `calc(min(${textAreaMaxHeight}, ${currentHeight}px) - ${baseHeightPx}px)`\n : '0';\n\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('margin-block-end');\n\n textAreaRef.current.style.removeProperty('scrollbar-width');\n }, []);\n\n useLayoutEffect(() => {\n if (!textAreaRef.current) return;\n heightPxRef.current = textAreaRef.current.offsetHeight;\n }, [textAreaEl]);\n\n useEffect(() => {\n if (!textAreaRef.current) return;\n\n if (autoResize) {\n recalculateHeight();\n } else {\n textAreaRef.current.style.removeProperty('--textarea-height');\n }\n }, [value, autoResize, recalculateHeight]);\n\n // Recalculate height when the element becomes visible after being displayed none.\n useEffect(() => {\n if (!textAreaEl || !autoResize) return;\n\n prevHeightRef.current = textAreaEl.offsetHeight;\n\n const observer = new ResizeObserver(entries => {\n const currentHeight = entries[0].contentRect.height;\n if (prevHeightRef.current === 0 && currentHeight > 0) {\n const textareaHeight = getComputedStyle(textAreaEl)\n .getPropertyValue('--textarea-height')\n .trim();\n if (!textareaHeight || textareaHeight === 'auto' || textareaHeight === 'unset') {\n heightPxRef.current = textAreaEl.offsetHeight;\n }\n recalculateHeight();\n }\n prevHeightRef.current = currentHeight;\n });\n\n observer.observe(textAreaEl);\n return () => observer.disconnect();\n }, [autoResize, recalculateHeight, textAreaEl]);\n\n useEffect(\n () => () => {\n clearTimeout(focusTimeoutRef.current);\n },\n []\n );\n\n const TextAreaControl = (\n <StyledFormControl\n data-testid={testIds.control}\n ref={textAreaRef}\n id={id}\n aria-describedby={\n // Remove when focused to prevent each change in character count from being announced.\n !focused && displayCharCount && typeof maxLength === 'number'\n ? `${id}-charCount`\n : 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' && !!suggestion}\n {...controlProp}\n {...restProps}\n onChange={onChange}\n onFocus={(e: FocusEvent<HTMLTextAreaElement>) => {\n // Need to delay so screen readers will include the character count in announcement on initial focus.\n // Shorter delays did not seem to work.\n focusTimeoutRef.current = window.setTimeout(() => {\n setFocused(true);\n }, 250);\n\n restProps.onFocus?.(e);\n }}\n onBlur={(e: FocusEvent<HTMLTextAreaElement>) => {\n clearTimeout(focusTimeoutRef.current);\n setFocused(false);\n restProps.onBlur?.(e);\n }}\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 id={`${id}-charCount`} readOnly={readOnly} variant='secondary'>\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 suggestion={suggestion}\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,EAAE,MAAM,OAAO,CAAC;AAY7E,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,EACL,kBAAkB,EAClB,UAAU,EACV,OAAO,EACP,UAAU,EACV,UAAU,EACV,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,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;AAiCzD,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,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,GAAG,IAAI,EACf,QAAQ,EAAE,YAAY,EACtB,UAAU,EACV,GAAG,SAAS,EACb,GAAG,KAAK,CAAC;IACV,MAAM,CAAC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angeEvent,\n ChangeEventHandler,\n FocusEvent,\n FocusEventHandler\n} 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 {\n useConsolidatedRef,\n useElement,\n useI18n,\n useLiveLog,\n useTestIds,\n useUID\n} 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\n onChange?: ChangeEventHandler<HTMLTextAreaElement>;\n onFocus?: FocusEventHandler<HTMLTextAreaElement>;\n onBlur?: FocusEventHandler<HTMLTextAreaElement>;\n}\n\nconst warnCharCount = 30;\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 suggestion,\n ...restProps\n } = props;\n const t = useI18n();\n\n const testIds = useTestIds(testId, getTextAreaTestIds);\n const [charCount, setCharCount] = useState(value?.length ?? defaultValue?.length ?? 0);\n const [focused, setFocused] = useState(false);\n const [textAreaEl, setTextAreaEl] = useElement<HTMLTextAreaElement>();\n const textAreaRef = useConsolidatedRef(ref, setTextAreaEl);\n const prevHeightRef = useRef(0);\n const focusTimeoutRef = useRef(NaN);\n const { announceAssertive } = useLiveLog();\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 (maxLength !== undefined) {\n if (e.target.value.length >= maxLength) {\n announceAssertive({ message: t('text_area_character_limit'), type: 'warning' });\n } else if (maxLength > warnCharCount) {\n const prevCharsRemaining = maxLength - charCount;\n const charsRemaining = maxLength - e.target.value.length;\n\n if (charsRemaining < warnCharCount && prevCharsRemaining >= warnCharCount) {\n announceAssertive({\n message: t('text_area_characters_remaining', [`${warnCharCount}`]),\n type: 'warning'\n });\n }\n }\n }\n\n if (!hardStop || maxLength === undefined || e.target.value.length <= maxLength) {\n onChangeProp?.(e);\n setCharCount(e.target.value.length);\n }\n },\n [onChangeProp, charCount, hardStop, maxLength, announceAssertive, t]\n );\n\n const recalculateHeight = useCallback(() => {\n if (!textAreaRef.current) return;\n\n const scrollY = window.scrollY;\n\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\n // height:auto can trigger browser caret scroll-into-view; undo if it moved.\n if (window.scrollY !== scrollY) {\n window.scrollTo(window.scrollX, scrollY);\n }\n }, []);\n\n useEffect(() => {\n if (!textAreaRef.current) return;\n\n if (autoResize) {\n recalculateHeight();\n } else {\n textAreaRef.current.style.removeProperty('--textarea-height');\n }\n }, [value, autoResize, recalculateHeight]);\n\n // Recalculate height when the element becomes visible after being displayed none.\n useEffect(() => {\n if (!textAreaEl || !autoResize) return;\n\n prevHeightRef.current = textAreaEl.offsetHeight;\n\n const observer = new ResizeObserver(entries => {\n const currentHeight = entries[0].contentRect.height;\n if (prevHeightRef.current === 0 && currentHeight > 0) {\n recalculateHeight();\n }\n prevHeightRef.current = currentHeight;\n });\n\n observer.observe(textAreaEl);\n return () => observer.disconnect();\n }, [autoResize, recalculateHeight, textAreaEl]);\n\n useEffect(\n () => () => {\n clearTimeout(focusTimeoutRef.current);\n },\n []\n );\n\n const TextAreaControl = (\n <StyledFormControl\n data-testid={testIds.control}\n ref={textAreaRef}\n id={id}\n aria-describedby={\n // Remove when focused to prevent each change in character count from being announced.\n !focused && displayCharCount && typeof maxLength === 'number'\n ? `${id}-charCount`\n : 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' && !!suggestion}\n {...controlProp}\n {...restProps}\n onChange={onChange}\n onFocus={(e: FocusEvent<HTMLTextAreaElement>) => {\n // Need to delay so screen readers will include the character count in announcement on initial focus.\n // Shorter delays did not seem to work.\n focusTimeoutRef.current = window.setTimeout(() => {\n setFocused(true);\n }, 250);\n\n restProps.onFocus?.(e);\n }}\n onBlur={(e: FocusEvent<HTMLTextAreaElement>) => {\n clearTimeout(focusTimeoutRef.current);\n setFocused(false);\n restProps.onBlur?.(e);\n }}\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 id={`${id}-charCount`} readOnly={readOnly} variant='secondary'>\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 suggestion={suggestion}\n >\n {TextAreaControl}\n </FormField>\n ) : (\n TextAreaControl\n );\n});\n\nexport default withTestIds(TextArea, getTextAreaTestIds);\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const textAreaMaxHeight = "90vh";
|
|
2
1
|
declare const StyledTextArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, {
|
|
3
2
|
resizable: boolean;
|
|
4
3
|
autoResize: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.styles.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.styles.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"TextArea.styles.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.styles.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,cAAc;eAAgC,OAAO;gBAAc,OAAO;YAuB/E,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { defaultThemeProp } from '../../theme';
|
|
3
|
-
export const textAreaMaxHeight = '90vh';
|
|
4
3
|
const StyledTextArea = styled.textarea(({ resizable, autoResize }) => {
|
|
5
4
|
return css `
|
|
6
5
|
width: 100%;
|
|
@@ -19,7 +18,7 @@ const StyledTextArea = styled.textarea(({ resizable, autoResize }) => {
|
|
|
19
18
|
: css `
|
|
20
19
|
resize: none;
|
|
21
20
|
overflow: auto;
|
|
22
|
-
max-height:
|
|
21
|
+
max-height: 90vh;
|
|
23
22
|
`}
|
|
24
23
|
`;
|
|
25
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.styles.js","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,
|
|
1
|
+
{"version":3,"file":"TextArea.styles.js","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,CACpC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE;IAC5B,OAAO,GAAG,CAAA;;oBAEM,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC;iBAC7D,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,OAAO;;QAE7D,UAAU;QACZ,GAAG,CAAA;;OAEF;QACC,SAAS;QACT,CAAC,CAAC,GAAG,CAAA;;;WAGF;QACH,CAAC,CAAC,GAAG,CAAA;;;;WAIF;KACN,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/C,eAAe,cAAc,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../theme';\n\nconst StyledTextArea = styled.textarea<{ resizable: boolean; autoResize: boolean }>(\n ({ resizable, autoResize }) => {\n return css`\n width: 100%;\n min-height: ${props => props.theme.components['text-area']['min-height']};\n padding: ${props => props.theme.components['text-area'].padding};\n appearance: none;\n ${autoResize &&\n css`\n height: var(--textarea-height, auto);\n `}\n ${resizable\n ? css`\n resize: vertical;\n overflow: hidden;\n `\n : css`\n resize: none;\n overflow: auto;\n max-height: 90vh;\n `}\n `;\n }\n);\n\nStyledTextArea.defaultProps = defaultThemeProp;\n\nexport default StyledTextArea;\n"]}
|
package/lib/hooks/useI18n.d.ts
CHANGED
|
@@ -196,6 +196,7 @@ declare const useI18n: () => import("..").TranslationFunction<Readonly<{
|
|
|
196
196
|
delivered: string;
|
|
197
197
|
sent: string;
|
|
198
198
|
active: string;
|
|
199
|
+
inactive: string;
|
|
199
200
|
read_only: string;
|
|
200
201
|
information: string;
|
|
201
202
|
error: string;
|
|
@@ -333,6 +334,7 @@ declare const useI18n: () => import("..").TranslationFunction<Readonly<{
|
|
|
333
334
|
combobox_close_list_button_a11y: string;
|
|
334
335
|
multiselect_instructions: string;
|
|
335
336
|
multiselect_instructions_with_links: string;
|
|
337
|
+
multiselect_tab_to_input: string;
|
|
336
338
|
selected_items: string;
|
|
337
339
|
combobox_loading_selected_items: string;
|
|
338
340
|
composite_input_open_button_a11y: string;
|
|
@@ -522,6 +524,7 @@ declare const useI18n: () => import("..").TranslationFunction<Readonly<{
|
|
|
522
524
|
user_message: string;
|
|
523
525
|
active_cases: string;
|
|
524
526
|
active_cases_trigger: string;
|
|
527
|
+
cases_in_this_chat: string;
|
|
525
528
|
your_chats: string;
|
|
526
529
|
reset_width: string;
|
|
527
530
|
split_width: string;
|
|
@@ -1572,6 +1575,7 @@ declare const useI18n: () => import("..").TranslationFunction<Readonly<{
|
|
|
1572
1575
|
dynamicInput_format_DateTime: string;
|
|
1573
1576
|
dynamicInput_format_Date: string;
|
|
1574
1577
|
dynamicInput_format_Time: string;
|
|
1578
|
+
format: string;
|
|
1575
1579
|
zoom_level: string;
|
|
1576
1580
|
close_configuration_panel: string;
|
|
1577
1581
|
clear_object_summary: string;
|
|
@@ -1628,6 +1632,8 @@ declare const useI18n: () => import("..").TranslationFunction<Readonly<{
|
|
|
1628
1632
|
add_sort: string;
|
|
1629
1633
|
drag_to_reorder: string;
|
|
1630
1634
|
drag_to_reorder_field: string;
|
|
1635
|
+
refresh_notification_instructions: string;
|
|
1636
|
+
refresh_notification_instructions_with_toolbar_actions: string;
|
|
1631
1637
|
view_in_google_maps: string;
|
|
1632
1638
|
location_marker: string;
|
|
1633
1639
|
action_task: string;
|
|
@@ -1728,6 +1734,10 @@ declare const useI18n: () => import("..").TranslationFunction<Readonly<{
|
|
|
1728
1734
|
advanced_settings_toggle_btn: string;
|
|
1729
1735
|
color_swatch_btn_label: string;
|
|
1730
1736
|
theme_preview_title: string;
|
|
1737
|
+
theme_css_warning: string;
|
|
1738
|
+
theme_css_label: string;
|
|
1739
|
+
theme_css_modal_heading: string;
|
|
1740
|
+
theme_css_modal_heading_with_name: string;
|
|
1731
1741
|
default_font_info: string;
|
|
1732
1742
|
custom_font_family: string;
|
|
1733
1743
|
custom_font_family_error: string;
|
|
@@ -1885,20 +1895,14 @@ declare const useI18n: () => import("..").TranslationFunction<Readonly<{
|
|
|
1885
1895
|
decision_table_custom_range_2: string;
|
|
1886
1896
|
decision_table_custom_range_2_header: string;
|
|
1887
1897
|
ai_assistant: string;
|
|
1888
|
-
app_info_main_branch: string;
|
|
1889
|
-
app_info_create_branch: string;
|
|
1890
|
-
app_info_view_content: string;
|
|
1891
|
-
app_info_switch_branch: string;
|
|
1892
|
-
app_info_update_from_main: string;
|
|
1893
|
-
app_info_commit_private_changes: string;
|
|
1894
|
-
app_info_merge_to_main: string;
|
|
1895
|
-
app_info_view_branches: string;
|
|
1896
|
-
app_info_application_version: string;
|
|
1897
1898
|
app_preview_loading: string;
|
|
1898
1899
|
app_preview_ready: string;
|
|
1899
1900
|
app_preview_failed: string;
|
|
1900
1901
|
app_open_preview: string;
|
|
1901
1902
|
app_view_errors_in_preview: string;
|
|
1903
|
+
app_preview_as: string;
|
|
1904
|
+
app_preview_persona_developer: string;
|
|
1905
|
+
app_preview_persona_save_failed_reverting: string;
|
|
1902
1906
|
expression_error_incorrect_data_type: string;
|
|
1903
1907
|
expression_error_with_data_and_object_type: string;
|
|
1904
1908
|
expression_error_with_data_type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/lib/i18n/default.d.ts
CHANGED
|
@@ -192,6 +192,7 @@ declare const _default: {
|
|
|
192
192
|
delivered: string;
|
|
193
193
|
sent: string;
|
|
194
194
|
active: string;
|
|
195
|
+
inactive: string;
|
|
195
196
|
read_only: string;
|
|
196
197
|
information: string;
|
|
197
198
|
error: string;
|
|
@@ -329,6 +330,7 @@ declare const _default: {
|
|
|
329
330
|
combobox_close_list_button_a11y: string;
|
|
330
331
|
multiselect_instructions: string;
|
|
331
332
|
multiselect_instructions_with_links: string;
|
|
333
|
+
multiselect_tab_to_input: string;
|
|
332
334
|
selected_items: string;
|
|
333
335
|
combobox_loading_selected_items: string;
|
|
334
336
|
composite_input_open_button_a11y: string;
|
|
@@ -518,6 +520,7 @@ declare const _default: {
|
|
|
518
520
|
user_message: string;
|
|
519
521
|
active_cases: string;
|
|
520
522
|
active_cases_trigger: string;
|
|
523
|
+
cases_in_this_chat: string;
|
|
521
524
|
your_chats: string;
|
|
522
525
|
reset_width: string;
|
|
523
526
|
split_width: string;
|
|
@@ -1568,6 +1571,7 @@ declare const _default: {
|
|
|
1568
1571
|
dynamicInput_format_DateTime: string;
|
|
1569
1572
|
dynamicInput_format_Date: string;
|
|
1570
1573
|
dynamicInput_format_Time: string;
|
|
1574
|
+
format: string;
|
|
1571
1575
|
zoom_level: string;
|
|
1572
1576
|
close_configuration_panel: string;
|
|
1573
1577
|
clear_object_summary: string;
|
|
@@ -1625,6 +1629,8 @@ declare const _default: {
|
|
|
1625
1629
|
add_sort: string;
|
|
1626
1630
|
drag_to_reorder: string;
|
|
1627
1631
|
drag_to_reorder_field: string;
|
|
1632
|
+
refresh_notification_instructions: string;
|
|
1633
|
+
refresh_notification_instructions_with_toolbar_actions: string;
|
|
1628
1634
|
view_in_google_maps: string;
|
|
1629
1635
|
location_marker: string;
|
|
1630
1636
|
action_task: string;
|
|
@@ -1725,6 +1731,10 @@ declare const _default: {
|
|
|
1725
1731
|
advanced_settings_toggle_btn: string;
|
|
1726
1732
|
color_swatch_btn_label: string;
|
|
1727
1733
|
theme_preview_title: string;
|
|
1734
|
+
theme_css_warning: string;
|
|
1735
|
+
theme_css_label: string;
|
|
1736
|
+
theme_css_modal_heading: string;
|
|
1737
|
+
theme_css_modal_heading_with_name: string;
|
|
1728
1738
|
default_font_info: string;
|
|
1729
1739
|
custom_font_family: string;
|
|
1730
1740
|
custom_font_family_error: string;
|
|
@@ -1887,22 +1897,15 @@ declare const _default: {
|
|
|
1887
1897
|
decision_table_custom_range_2_header: string;
|
|
1888
1898
|
/** studio-dx-components: AIAssistant */
|
|
1889
1899
|
ai_assistant: string;
|
|
1890
|
-
/** studio-dx-components: AppInfo */
|
|
1891
|
-
app_info_main_branch: string;
|
|
1892
|
-
app_info_create_branch: string;
|
|
1893
|
-
app_info_view_content: string;
|
|
1894
|
-
app_info_switch_branch: string;
|
|
1895
|
-
app_info_update_from_main: string;
|
|
1896
|
-
app_info_commit_private_changes: string;
|
|
1897
|
-
app_info_merge_to_main: string;
|
|
1898
|
-
app_info_view_branches: string;
|
|
1899
|
-
app_info_application_version: string;
|
|
1900
1900
|
/** studio-dx-components: Preview */
|
|
1901
1901
|
app_preview_loading: string;
|
|
1902
1902
|
app_preview_ready: string;
|
|
1903
1903
|
app_preview_failed: string;
|
|
1904
1904
|
app_open_preview: string;
|
|
1905
1905
|
app_view_errors_in_preview: string;
|
|
1906
|
+
app_preview_as: string;
|
|
1907
|
+
app_preview_persona_developer: string;
|
|
1908
|
+
app_preview_persona_save_failed_reverting: string;
|
|
1906
1909
|
/** studio-dx-components: Expression */
|
|
1907
1910
|
expression_error_incorrect_data_type: string;
|
|
1908
1911
|
expression_error_with_data_and_object_type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/i18n/default.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../src/i18n/default.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkQxB,6CAA6C;;;;;;;;;;;;;;IAgB7C,6CAA6C;;;;;;;;IAS7C,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwGzC,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2C/B,wCAAwC;;IAGxC,oCAAoC;;;;;;;;;IAWpC,uCAAuC;;;;;;;;;;;IAavC,6CAA6C;;;;;;;IAQ7C,uCAAuC;;;;;;;;IAUvC,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAxuE3C,wBAwxEE"}
|
package/lib/i18n/default.js
CHANGED
|
@@ -202,6 +202,7 @@ export default {
|
|
|
202
202
|
delivered: 'Delivered',
|
|
203
203
|
sent: 'Sent',
|
|
204
204
|
active: 'Active',
|
|
205
|
+
inactive: 'Inactive',
|
|
205
206
|
read_only: 'Read only',
|
|
206
207
|
information: 'Information',
|
|
207
208
|
error: 'Error',
|
|
@@ -357,6 +358,7 @@ export default {
|
|
|
357
358
|
combobox_close_list_button_a11y: 'Close combobox list',
|
|
358
359
|
multiselect_instructions: 'Arrow {0} from start to review selected items',
|
|
359
360
|
multiselect_instructions_with_links: 'Shift+Tab, then arrow {0} to review selected items',
|
|
361
|
+
multiselect_tab_to_input: 'Tab to go to input',
|
|
360
362
|
selected_items: 'Selected items',
|
|
361
363
|
combobox_loading_selected_items: 'Loading selected items',
|
|
362
364
|
/* core:CompositeInput */
|
|
@@ -563,8 +565,9 @@ export default {
|
|
|
563
565
|
candidates: 'Candidates',
|
|
564
566
|
agent_message: 'Agent message',
|
|
565
567
|
user_message: 'User message',
|
|
566
|
-
active_cases: '
|
|
567
|
-
active_cases_trigger: '
|
|
568
|
+
active_cases: 'Cases',
|
|
569
|
+
active_cases_trigger: 'Cases, {0} open',
|
|
570
|
+
cases_in_this_chat: 'Cases in this chat',
|
|
568
571
|
your_chats: 'Your chats',
|
|
569
572
|
reset_width: 'Reset width',
|
|
570
573
|
split_width: 'Split width',
|
|
@@ -1665,6 +1668,8 @@ export default {
|
|
|
1665
1668
|
dynamicInput_format_DateTime: 'DateTime',
|
|
1666
1669
|
dynamicInput_format_Date: 'Date',
|
|
1667
1670
|
dynamicInput_format_Time: 'Time',
|
|
1671
|
+
/* build: CodeEditor */
|
|
1672
|
+
format: 'Format',
|
|
1668
1673
|
/* build:Workbench */
|
|
1669
1674
|
zoom_level: 'Zoom level',
|
|
1670
1675
|
close_configuration_panel: 'Close configuration panel',
|
|
@@ -1732,6 +1737,8 @@ export default {
|
|
|
1732
1737
|
add_sort: 'Add sort',
|
|
1733
1738
|
drag_to_reorder: 'Drag to reorder',
|
|
1734
1739
|
drag_to_reorder_field: 'Drag to reorder {0}',
|
|
1740
|
+
refresh_notification_instructions: 'Updates are available for {0} view. Go to its information banner to refresh data.',
|
|
1741
|
+
refresh_notification_instructions_with_toolbar_actions: 'Updates are available for {0} view. Go to its information banner or toolbar Actions menu to refresh data.',
|
|
1735
1742
|
/* lists-repeating-structures: Map */
|
|
1736
1743
|
view_in_google_maps: 'View in Google Maps',
|
|
1737
1744
|
location_marker: 'Location marker {0}',
|
|
@@ -1851,6 +1858,10 @@ export default {
|
|
|
1851
1858
|
advanced_settings_toggle_btn: '{0} advanced settings',
|
|
1852
1859
|
color_swatch_btn_label: 'Set {0} to {1}',
|
|
1853
1860
|
theme_preview_title: 'Theme Preview',
|
|
1861
|
+
theme_css_warning: 'Theme CSS provides additional customization capabilities. Review after each upgrade. Use at your own risk.',
|
|
1862
|
+
theme_css_label: 'CSS',
|
|
1863
|
+
theme_css_modal_heading: 'Theme CSS',
|
|
1864
|
+
theme_css_modal_heading_with_name: 'Theme CSS: {0}',
|
|
1854
1865
|
default_font_info: 'Selection will override app header and heading fonts',
|
|
1855
1866
|
custom_font_family: '{0} font family name',
|
|
1856
1867
|
custom_font_family_error: "Font family can't be empty",
|
|
@@ -2034,22 +2045,15 @@ export default {
|
|
|
2034
2045
|
decision_table_custom_range_2_header: 'is in custom range 2',
|
|
2035
2046
|
/** studio-dx-components: AIAssistant */
|
|
2036
2047
|
ai_assistant: 'AI assistant',
|
|
2037
|
-
/** studio-dx-components: AppInfo */
|
|
2038
|
-
app_info_main_branch: 'Main',
|
|
2039
|
-
app_info_create_branch: 'Create branch',
|
|
2040
|
-
app_info_view_content: 'View branch contents',
|
|
2041
|
-
app_info_switch_branch: 'Switch to branch',
|
|
2042
|
-
app_info_update_from_main: 'Update from Main',
|
|
2043
|
-
app_info_commit_private_changes: 'Commit private changes to branch',
|
|
2044
|
-
app_info_merge_to_main: 'Merge to Main',
|
|
2045
|
-
app_info_view_branches: 'View all branches',
|
|
2046
|
-
app_info_application_version: '{0} - v. {1}',
|
|
2047
2048
|
/** studio-dx-components: Preview */
|
|
2048
2049
|
app_preview_loading: 'Loading preview...',
|
|
2049
2050
|
app_preview_ready: 'Your preview is ready.',
|
|
2050
2051
|
app_preview_failed: 'Failed to load preview.',
|
|
2051
2052
|
app_open_preview: 'Open preview',
|
|
2052
2053
|
app_view_errors_in_preview: 'View errors',
|
|
2054
|
+
app_preview_as: 'Preview As',
|
|
2055
|
+
app_preview_persona_developer: 'Developer',
|
|
2056
|
+
app_preview_persona_save_failed_reverting: 'Failed to save persona selection. Previewing with last saved persona.',
|
|
2053
2057
|
/** studio-dx-components: Expression */
|
|
2054
2058
|
expression_error_incorrect_data_type: 'Incorrect datatype',
|
|
2055
2059
|
expression_error_with_data_and_object_type: 'Incorrect type, {0} of type {1} is required',
|