@pega/cosmos-react-core 8.0.0-build.44.2 → 8.0.0-build.44.4
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 +2 -2
- package/lib/components/AppShell/AppHeader.js.map +1 -1
- package/lib/components/AppShell/AppShell.types.d.ts +2 -0
- package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.types.js.map +1 -1
- package/lib/components/Checkbox/CheckboxCard.d.ts.map +1 -1
- package/lib/components/Checkbox/CheckboxCard.js +2 -2
- package/lib/components/Checkbox/CheckboxCard.js.map +1 -1
- package/lib/components/RadioButton/RadioButtonCard.d.ts.map +1 -1
- package/lib/components/RadioButton/RadioButtonCard.js +3 -2
- package/lib/components/RadioButton/RadioButtonCard.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAoB,MAAM,OAAO,CAAC;AAMjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAevD,QAAA,MAAM,SAAS,EAAE,iBAAiB,CAAC,cAAc,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAoB,MAAM,OAAO,CAAC;AAMjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAevD,QAAA,MAAM,SAAS,EAAE,iBAAiB,CAAC,cAAc,GAAG,YAAY,CA2G9D,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -11,7 +11,7 @@ import ContextSwitcher from './ContextSwitcher';
|
|
|
11
11
|
import { StyledAppHeader, StyledAppHeaderInfo, StyledAppHeaderSearchForm, StyledAppHeaderSpacer, StyledAppHeaderText, StyledAppHeaderOperator, StyledAppHeaderLogo } from './AppHeader.styles';
|
|
12
12
|
import AppShellContext from './AppShellContext';
|
|
13
13
|
import { getHeaderTheme } from './style-utils';
|
|
14
|
-
const AppHeader = forwardRef(function AppHeader({ appName, contextSwitcher: { contexts, onContextClick, label: contextSwitcherLabel } = {}, fullImageSrc, imageSrc, href, onClick, portalName, target, appNameHidden, operator, searchInput, searchLabel, searchPage }, ref) {
|
|
14
|
+
const AppHeader = forwardRef(function AppHeader({ appName, contextSwitcher: { contexts, onContextClick, label: contextSwitcherLabel } = {}, fullImageSrc, imageSrc, imageAltText, href, onClick, portalName, target, appNameHidden, operator, searchInput, searchLabel, searchPage }, ref) {
|
|
15
15
|
const t = useI18n();
|
|
16
16
|
const isMediumOrAbove = useBreakpoint('md');
|
|
17
17
|
const [searchContainer, setSearchContainer] = useElement();
|
|
@@ -29,7 +29,7 @@ const AppHeader = forwardRef(function AppHeader({ appName, contextSwitcher: { co
|
|
|
29
29
|
let appInfoAs = 'div';
|
|
30
30
|
if (href)
|
|
31
31
|
appInfoAs = 'a';
|
|
32
|
-
return (_jsx(ThemeOverride, { theme: headerTheme, children: _jsxs(Flex, { as: StyledAppHeader, container: { alignItems: 'center', pad: 1 }, hideTitle: !isMediumOrAbove, drawerOpen: drawerOpen, ref: ref, children: [contexts && contexts.length > 1 && onContextClick && (_jsx(ContextSwitcher, { contexts: contexts, onContextClick: onContextClick, label: contextSwitcherLabel })), _jsx(StyledAppHeaderInfo, { centerLogo: !fullImageSrc, children: _jsxs(Flex, { container: { inline: true, alignItems: 'center', gap: 1 }, as: appInfoAs, href: href, onClick: href ? onClick : undefined, target: target, children: [(fullImageSrc || imageSrc) && (_jsx(StyledAppHeaderLogo, { children: _jsx(Image, { src: fullImageSrc || imageSrc, alt: t('application_logo') }) })), _jsx(StyledAppHeaderText, { as: appNameHidden || !isMediumOrAbove ? VisuallyHiddenText : 'span', variant: 'primary', children: appName }), portalName && (_jsx(StyledAppHeaderText, { as: appNameHidden || !isMediumOrAbove ? VisuallyHiddenText : 'span', variant: 'secondary', children: portalName }))] }) }), _jsx(Flex, { item: { grow: 1 }, container: { justify: 'end' }, children: searchInput ? (_jsx(StyledAppHeaderSearchForm, { ref: setSearchContainer, role: 'search', "aria-label": searchLabel, onSubmit: e => e.preventDefault(), isMediumOrAbove: isMediumOrAbove, children: !searchPage && _jsx(SearchInput, { ...searchInput }) })) : (_jsx(StyledAppHeaderSpacer, {})) }), _jsx(AppShellOperator, { as: StyledAppHeaderOperator, actions: operator.actions, popover: { placement: 'bottom-start' }, children: operator.avatar })] }) }));
|
|
32
|
+
return (_jsx(ThemeOverride, { theme: headerTheme, children: _jsxs(Flex, { as: StyledAppHeader, container: { alignItems: 'center', pad: 1 }, hideTitle: !isMediumOrAbove, drawerOpen: drawerOpen, ref: ref, children: [contexts && contexts.length > 1 && onContextClick && (_jsx(ContextSwitcher, { contexts: contexts, onContextClick: onContextClick, label: contextSwitcherLabel })), _jsx(StyledAppHeaderInfo, { centerLogo: !fullImageSrc, children: _jsxs(Flex, { container: { inline: true, alignItems: 'center', gap: 1 }, as: appInfoAs, href: href, onClick: href ? onClick : undefined, target: target, children: [(fullImageSrc || imageSrc) && (_jsx(StyledAppHeaderLogo, { children: _jsx(Image, { src: fullImageSrc || imageSrc, alt: imageAltText ?? t('application_logo') }) })), _jsx(StyledAppHeaderText, { as: appNameHidden || !isMediumOrAbove ? VisuallyHiddenText : 'span', variant: 'primary', children: appName }), portalName && (_jsx(StyledAppHeaderText, { as: appNameHidden || !isMediumOrAbove ? VisuallyHiddenText : 'span', variant: 'secondary', children: portalName }))] }) }), _jsx(Flex, { item: { grow: 1 }, container: { justify: 'end' }, children: searchInput ? (_jsx(StyledAppHeaderSearchForm, { ref: setSearchContainer, role: 'search', "aria-label": searchLabel, onSubmit: e => e.preventDefault(), isMediumOrAbove: isMediumOrAbove, children: !searchPage && _jsx(SearchInput, { ...searchInput }) })) : (_jsx(StyledAppHeaderSpacer, {})) }), _jsx(AppShellOperator, { as: StyledAppHeaderOperator, actions: operator.actions, popover: { placement: 'bottom-start' }, children: operator.avatar })] }) }));
|
|
33
33
|
});
|
|
34
34
|
export default AppHeader;
|
|
35
35
|
//# sourceMappingURL=AppHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppHeader.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGnE,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,KAAK,MAAM,UAAU,CAAC;AAC7B,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE3E,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,gBAAgB,MAAM,YAAY,CAAC;AAC1C,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,SAAS,GAAqD,UAAU,CAAC,SAAS,SAAS,CAC/F,EACE,OAAO,EACP,eAAe,EA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,WAAW,YAElB,UAAU,GACS,CACvB,IACI,GACa,EACtB,KAAC,IAAI,IAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YACnD,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,yBAAyB,IACxB,GAAG,EAAE,kBAAkB,EACvB,IAAI,EAAC,QAAQ,gBACD,WAAW,EACvB,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,EACjC,eAAe,EAAE,eAAe,YAE/B,CAAC,UAAU,IAAI,KAAC,WAAW,OAAK,WAAW,GAAI,GACtB,CAC7B,CAAC,CAAC,CAAC,CACF,KAAC,qBAAqB,KAAG,CAC1B,GACI,EAEP,KAAC,gBAAgB,IACf,EAAE,EAAE,uBAAuB,EAC3B,OAAO,EAAE,QAAQ,CAAC,OAAO,EACzB,OAAO,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,YAErC,QAAQ,CAAC,MAAM,GACC,IACd,GACO,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC","sourcesContent":["import { forwardRef, useContext, useEffect, useMemo } from 'react';\nimport type { FunctionComponent, Ref, ElementType } from 'react';\n\nimport Flex from '../Flex';\nimport Image from '../Image';\nimport SearchInput from '../SearchInput';\nimport { useBreakpoint, useElement, useI18n, useTheme } from '../../hooks';\nimport type { ForwardProps } from '../../types';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\nimport { ThemeOverride } from '../Configuration';\n\nimport type { AppHeaderProps } from './AppShell.types';\nimport AppShellOperator from './Operator';\nimport ContextSwitcher from './ContextSwitcher';\nimport {\n StyledAppHeader,\n StyledAppHeaderInfo,\n StyledAppHeaderSearchForm,\n StyledAppHeaderSpacer,\n StyledAppHeaderText,\n StyledAppHeaderOperator,\n StyledAppHeaderLogo\n} from './AppHeader.styles';\nimport AppShellContext from './AppShellContext';\nimport { getHeaderTheme } from './style-utils';\n\nconst AppHeader: FunctionComponent<AppHeaderProps & ForwardProps> = forwardRef(function AppHeader(\n {\n appName,\n contextSwitcher: { contexts, onContextClick, label: contextSwitcherLabel } = {},\n fullImageSrc,\n imageSrc,\n imageAltText,\n href,\n onClick,\n portalName,\n target,\n appNameHidden,\n operator,\n searchInput,\n searchLabel,\n searchPage\n }: AppHeaderProps,\n ref: Ref<Element>\n) {\n const t = useI18n();\n const isMediumOrAbove = useBreakpoint('md');\n const [searchContainer, setSearchContainer] = useElement<HTMLElement>();\n const { drawerOpen, setSearchContainerEl } = useContext(AppShellContext);\n const theme = useTheme();\n const headerTheme = useMemo(() => getHeaderTheme(theme), [theme]);\n useEffect(() => {\n if (searchPage && searchContainer) {\n setSearchContainerEl(searchContainer);\n } else {\n setSearchContainerEl(null);\n }\n }, [searchPage, searchContainer, setSearchContainerEl]);\n\n let appInfoAs: ElementType = 'div';\n if (href) appInfoAs = 'a';\n return (\n <ThemeOverride theme={headerTheme}>\n <Flex\n as={StyledAppHeader}\n container={{ alignItems: 'center', pad: 1 }}\n hideTitle={!isMediumOrAbove}\n drawerOpen={drawerOpen}\n ref={ref}\n >\n {contexts && contexts.length > 1 && onContextClick && (\n <ContextSwitcher\n contexts={contexts}\n onContextClick={onContextClick}\n label={contextSwitcherLabel}\n />\n )}\n\n <StyledAppHeaderInfo centerLogo={!fullImageSrc}>\n <Flex\n container={{ inline: true, alignItems: 'center', gap: 1 }}\n as={appInfoAs}\n href={href}\n onClick={href ? onClick : undefined}\n target={target}\n >\n {(fullImageSrc || imageSrc) && (\n <StyledAppHeaderLogo>\n <Image src={fullImageSrc || imageSrc} alt={imageAltText ?? t('application_logo')} />\n </StyledAppHeaderLogo>\n )}\n <StyledAppHeaderText\n as={appNameHidden || !isMediumOrAbove ? VisuallyHiddenText : 'span'}\n variant='primary'\n >\n {appName}\n </StyledAppHeaderText>\n {portalName && (\n <StyledAppHeaderText\n as={appNameHidden || !isMediumOrAbove ? VisuallyHiddenText : 'span'}\n variant='secondary'\n >\n {portalName}\n </StyledAppHeaderText>\n )}\n </Flex>\n </StyledAppHeaderInfo>\n <Flex item={{ grow: 1 }} container={{ justify: 'end' }}>\n {searchInput ? (\n <StyledAppHeaderSearchForm\n ref={setSearchContainer}\n role='search'\n aria-label={searchLabel}\n onSubmit={e => e.preventDefault()}\n isMediumOrAbove={isMediumOrAbove}\n >\n {!searchPage && <SearchInput {...searchInput} />}\n </StyledAppHeaderSearchForm>\n ) : (\n <StyledAppHeaderSpacer />\n )}\n </Flex>\n\n <AppShellOperator\n as={StyledAppHeaderOperator}\n actions={operator.actions}\n popover={{ placement: 'bottom-start' }}\n >\n {operator.avatar}\n </AppShellOperator>\n </Flex>\n </ThemeOverride>\n );\n});\n\nexport default AppHeader;\n"]}
|
|
@@ -12,6 +12,8 @@ export interface AppInfoProps {
|
|
|
12
12
|
appNameHidden?: boolean;
|
|
13
13
|
/** The source for a small application image or logo that is rendered in the nav bar. */
|
|
14
14
|
imageSrc: ImageProps['src'];
|
|
15
|
+
/** The alt text for the image. Defaults to "Application logo" */
|
|
16
|
+
imageAltText?: string;
|
|
15
17
|
/** The source for the full size application image or logo that is rendered in the app header, if enabled. */
|
|
16
18
|
fullImageSrc?: ImageProps['src'];
|
|
17
19
|
/** URL or DOM id to navigate to. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.types.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,GAAG,EACH,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,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AM,CAAC,EAAE,OAAO,CAAC;IACjB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC5F,uEAAuE;IACvE,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,SAAU,SAAQ,eAAe;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.types.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n KeyboardEvent,\n MouseEvent,\n MouseEventHandler,\n ReactElement,\n ReactNode,\n Ref,\n RefObject\n} from 'react';\n\nimport type { AsProp, BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport type { ImageProps } from '../Image';\nimport type { ProgressProps } from '../Progress';\nimport type { SearchInputProps } from '../SearchInput';\nimport type { MenuItemProps } from '../Menu';\n\n/** AppShell props */\n\nexport interface AppInfoProps {\n /** The primary text to render in the header. */\n appName: string;\n /** If true, the appName will not be visibly displayed on screen. */\n appNameHidden?: boolean;\n /** The source for a small application image or logo that is rendered in the nav bar. */\n imageSrc: ImageProps['src'];\n /** The source for the full size application image or logo that is rendered in the app header, if enabled. */\n fullImageSrc?: ImageProps['src'];\n /** URL or DOM id to navigate to. */\n href?: string;\n /** Click handler for the header. */\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n /** The secondary text to render in the header. */\n portalName?: string;\n /** Specifies where to open the link href. */\n target?: string;\n}\n\nexport interface ContextItem extends Pick<MenuItemProps, 'id' | 'primary' | 'visual' | 'href'> {\n selected: MenuItemProps['selected'];\n}\n\ninterface ContextSwitcherOptions extends BaseProps {\n /** Application contexts available to user. */\n contexts: ContextItem[];\n /** Callback on click of item in context switcher. */\n onContextClick: (\n id: MenuItemProps['id'],\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement | HTMLDivElement>\n ) => void;\n /** Label of context being modified; i.e: \"Switch Application\", \"Switch Studio\"\n * @default 'Switch to…'\n */\n label?: string;\n}\n\nexport type ContextSwitcherProps = ContextSwitcherOptions | Record<string, never>;\n\nexport interface AppShellProps extends BaseProps, NoChildrenProp {\n /** Props related to the App Shell header. */\n appInfo: AppInfoProps;\n /** The content of the application. */\n main: ReactNode;\n /** The active user of the application. */\n operator: OperatorProps;\n /** If true, a header will render containing the logo and name of the app as well as search and operator regions. */\n appHeader?: boolean;\n /** Context switcher configuration. */\n contextSwitcher?: ContextSwitcherProps;\n /** If true, the search results page will replace the search input in the app header with its own */\n searchPage?: boolean;\n /** Props related to the Search Input. */\n searchInput?: SearchInputProps;\n /**\n * The aria-label for the search input.\n * @default 'Sitewide'\n */\n searchLabel?: string;\n /** A set of cases that will render in an expanded list within the App Shell. */\n caseTypes?: CaseTypeProps[];\n /** A set of links that will render as a flat list in the App Shell. */\n links?: LinkProps[];\n /** A set of cases that will render as a flat list in the App Shell. */\n cases?: CaseProps[];\n /** Place the main content of the application into a loading state by way of a boolean or a custom message. */\n progress?: boolean | ProgressProps['message'];\n /** A set of app utilities like notifications, recents that renders at the bottom of AppShell */\n utils?: (UtilItemProps | ReactElement)[];\n /** Banners will render above the main content if they are provided. */\n banners?: ReactNode;\n defaultExpanded?: boolean;\n /** When the navigation is collapsed menus will be shown on hover instead of on click */\n collapsedHoverMenus?: boolean;\n}\n\nexport interface CaseTypeProps {\n /** The display name of the case. */\n name: string;\n /** Click handler for the case. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport interface LinkProps extends ForwardProps {\n /** Unique id */\n id: string;\n /** The display name of the link. */\n name: string;\n /** URL or DOM id to navigate to. */\n href: string;\n /** The name of the Cosmos Icon to render as a visual. */\n icon?: string;\n /** Determines if the link represents the active page. */\n active?: boolean;\n /** A set of nested links. */\n links?: LinkProps[];\n /** Click handler for the link. */\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n}\n\nexport interface CaseProps extends ForwardProps {\n /** Unique id */\n id: string;\n /** Name of the case or some primary information like title. */\n primary: string;\n /** Additional info of a case like timestamp. */\n secondary?: string;\n /** Presents short, quickly identifiable info to a user for a collapsed nav item. */\n collapsedItemInfo?: string;\n /** A visual element identifying the case. If not passed will render case-solid icon */\n visual?: ReactNode;\n /** Determines if the case represents the active page. */\n active?: boolean;\n /** Click handler for the case . */\n onClick?: MouseEventHandler<HTMLElement>;\n /** Dismiss handler for the case. */\n onDismiss?: MouseEventHandler<HTMLElement>;\n}\n\nexport interface OperatorProps {\n /** A visual element identifying the operator. */\n avatar: ReactNode;\n /** A list of actions that will populate a menu attached to the operator. */\n actions: Pick<NavListItemProps, 'id' | 'primary' | 'href' | 'onClick' | 'visual'>[];\n /** The name of the operator. */\n name: string;\n}\n\nexport interface UtilItemProps extends Pick<NavListItemProps, 'visual' | 'actions' | 'onClick'> {\n /** The display name of an utility item. */\n name: string;\n /** Number when given displays on top-right of a given icon. */\n count?: number;\n /** View that renders on an appShell drawer onClick of an item */\n drawerView?: ReactNode;\n /** Heading for view that renders */\n drawerHeader?: string;\n /** Callback that fires on appshell drawer open */\n onDrawerOpen?: () => void;\n /** Callback that fires on appshell drawer close */\n onDrawerClose?: () => void;\n}\n\nexport interface UtilsProps {\n /** Context switcher config. */\n contextSwitcher?: ContextSwitcherProps | Record<string, never>;\n /** The active user of the application. */\n operator: AppShellProps['operator'];\n /** A set of app utilities like notifications, recents that renders at the bottom of AppShell */\n items?: (UtilItemProps | ReactElement)[];\n appHeader?: boolean;\n}\n\nexport interface NavListProps extends AsProp, BaseProps {\n items?: (NavListItemProps | ReactElement)[];\n nestedList?: boolean;\n collapsed?: boolean;\n id?: string;\n /** Whether the list is of single-select style options */\n singleSelect?: boolean;\n}\n\nexport interface NavListItemWrapperProps extends ForwardProps {\n label: string;\n tooltipLabel: string;\n content?: ReactNode;\n items?: NavListItemProps[];\n onMenuToggle?: (state: 'open' | 'close') => void;\n childElementRef: RefObject<HTMLElement>;\n}\n\nexport interface NavListItemProps extends AsProp, BaseProps, ForwardProps, NoChildrenProp {\n id?: string;\n visual?: ReactNode;\n primary: string;\n secondary?: string;\n /** Presents short, quickly identifiable info to a user for a collapsed nav item. */\n collapsedItemInfo?: string;\n href?: string;\n onClick?: MouseEventHandler<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>;\n items?: NavListItemProps[];\n collapseItems?: boolean;\n actions?: OperatorProps['actions'];\n onDismiss?: MouseEventHandler<HTMLElement>;\n forwardedRef?: Ref<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>;\n isMenuItem?: boolean;\n /** Whether the item is a single-select option */\n singleSelect?: NavListProps['singleSelect'];\n /** Whether the item is selected */\n selected?: boolean;\n}\n\nexport interface NavMenuProps extends NavListItemProps {\n forwardedRef?: Ref<HTMLButtonElement>;\n}\n\n/** AppHeader props */\n\nexport interface AppHeaderProps extends BaseProps, AppInfoProps {\n contextSwitcher?: ContextSwitcherProps | Record<string, never>;\n operator: AppShellProps['operator'];\n searchInput?: AppShellProps['searchInput'];\n searchLabel?: AppShellProps['searchLabel'];\n searchPage?: AppShellProps['searchPage'];\n}\n\n/** Drawer props */\n\nexport interface DrawerListProps {\n items: (DrawerItemProps & ForwardProps)[];\n loading?: boolean;\n viewAll?: {\n onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;\n href?: string;\n } & ForwardProps;\n newNotifications?: number;\n onItemClick?: (id: string, event: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n onItemPinToggle?: (id: string) => void;\n onDrawerOpen?: () => void;\n onDrawerClose?: () => void;\n}\n\nexport interface DrawerItemProps extends BaseProps {\n /** An id representing the item. */\n id: string;\n /** The primary text for the item. */\n primary: string;\n /** Secondary text that will be rendered as a Meta List. */\n secondary?: string[];\n /** A visual associated with the item. */\n visual?: ReactNode;\n /** A flag indicating if the item has been read. */\n unread?: boolean;\n /** A flag indicating if the item has been pinned or not. */\n pinned?: boolean;\n /** URL or DOM id to navigate to. */\n href?: string;\n /** The onClick handler for the item. */\n onClick?: (id: string, event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;\n /** The handler hat is called when a pin icon is toggled on an item. */\n onPinToggle?: (id: string) => void;\n}\n\nexport interface ListProps extends DrawerListProps {\n headingText?: string;\n emptyText: string;\n displayRecents: boolean;\n displayPins?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AppShell.types.js","sourceRoot":"","sources":["../../../src/components/AppShell/AppShell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n KeyboardEvent,\n MouseEvent,\n MouseEventHandler,\n ReactElement,\n ReactNode,\n Ref,\n RefObject\n} from 'react';\n\nimport type { AsProp, BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport type { ImageProps } from '../Image';\nimport type { ProgressProps } from '../Progress';\nimport type { SearchInputProps } from '../SearchInput';\nimport type { MenuItemProps } from '../Menu';\n\n/** AppShell props */\n\nexport interface AppInfoProps {\n /** The primary text to render in the header. */\n appName: string;\n /** If true, the appName will not be visibly displayed on screen. */\n appNameHidden?: boolean;\n /** The source for a small application image or logo that is rendered in the nav bar. */\n imageSrc: ImageProps['src'];\n /** The alt text for the image. Defaults to \"Application logo\" */\n imageAltText?: string;\n /** The source for the full size application image or logo that is rendered in the app header, if enabled. */\n fullImageSrc?: ImageProps['src'];\n /** URL or DOM id to navigate to. */\n href?: string;\n /** Click handler for the header. */\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n /** The secondary text to render in the header. */\n portalName?: string;\n /** Specifies where to open the link href. */\n target?: string;\n}\n\nexport interface ContextItem extends Pick<MenuItemProps, 'id' | 'primary' | 'visual' | 'href'> {\n selected: MenuItemProps['selected'];\n}\n\ninterface ContextSwitcherOptions extends BaseProps {\n /** Application contexts available to user. */\n contexts: ContextItem[];\n /** Callback on click of item in context switcher. */\n onContextClick: (\n id: MenuItemProps['id'],\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement | HTMLDivElement>\n ) => void;\n /** Label of context being modified; i.e: \"Switch Application\", \"Switch Studio\"\n * @default 'Switch to…'\n */\n label?: string;\n}\n\nexport type ContextSwitcherProps = ContextSwitcherOptions | Record<string, never>;\n\nexport interface AppShellProps extends BaseProps, NoChildrenProp {\n /** Props related to the App Shell header. */\n appInfo: AppInfoProps;\n /** The content of the application. */\n main: ReactNode;\n /** The active user of the application. */\n operator: OperatorProps;\n /** If true, a header will render containing the logo and name of the app as well as search and operator regions. */\n appHeader?: boolean;\n /** Context switcher configuration. */\n contextSwitcher?: ContextSwitcherProps;\n /** If true, the search results page will replace the search input in the app header with its own */\n searchPage?: boolean;\n /** Props related to the Search Input. */\n searchInput?: SearchInputProps;\n /**\n * The aria-label for the search input.\n * @default 'Sitewide'\n */\n searchLabel?: string;\n /** A set of cases that will render in an expanded list within the App Shell. */\n caseTypes?: CaseTypeProps[];\n /** A set of links that will render as a flat list in the App Shell. */\n links?: LinkProps[];\n /** A set of cases that will render as a flat list in the App Shell. */\n cases?: CaseProps[];\n /** Place the main content of the application into a loading state by way of a boolean or a custom message. */\n progress?: boolean | ProgressProps['message'];\n /** A set of app utilities like notifications, recents that renders at the bottom of AppShell */\n utils?: (UtilItemProps | ReactElement)[];\n /** Banners will render above the main content if they are provided. */\n banners?: ReactNode;\n defaultExpanded?: boolean;\n /** When the navigation is collapsed menus will be shown on hover instead of on click */\n collapsedHoverMenus?: boolean;\n}\n\nexport interface CaseTypeProps {\n /** The display name of the case. */\n name: string;\n /** Click handler for the case. */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport interface LinkProps extends ForwardProps {\n /** Unique id */\n id: string;\n /** The display name of the link. */\n name: string;\n /** URL or DOM id to navigate to. */\n href: string;\n /** The name of the Cosmos Icon to render as a visual. */\n icon?: string;\n /** Determines if the link represents the active page. */\n active?: boolean;\n /** A set of nested links. */\n links?: LinkProps[];\n /** Click handler for the link. */\n onClick?: MouseEventHandler<HTMLAnchorElement>;\n}\n\nexport interface CaseProps extends ForwardProps {\n /** Unique id */\n id: string;\n /** Name of the case or some primary information like title. */\n primary: string;\n /** Additional info of a case like timestamp. */\n secondary?: string;\n /** Presents short, quickly identifiable info to a user for a collapsed nav item. */\n collapsedItemInfo?: string;\n /** A visual element identifying the case. If not passed will render case-solid icon */\n visual?: ReactNode;\n /** Determines if the case represents the active page. */\n active?: boolean;\n /** Click handler for the case . */\n onClick?: MouseEventHandler<HTMLElement>;\n /** Dismiss handler for the case. */\n onDismiss?: MouseEventHandler<HTMLElement>;\n}\n\nexport interface OperatorProps {\n /** A visual element identifying the operator. */\n avatar: ReactNode;\n /** A list of actions that will populate a menu attached to the operator. */\n actions: Pick<NavListItemProps, 'id' | 'primary' | 'href' | 'onClick' | 'visual'>[];\n /** The name of the operator. */\n name: string;\n}\n\nexport interface UtilItemProps extends Pick<NavListItemProps, 'visual' | 'actions' | 'onClick'> {\n /** The display name of an utility item. */\n name: string;\n /** Number when given displays on top-right of a given icon. */\n count?: number;\n /** View that renders on an appShell drawer onClick of an item */\n drawerView?: ReactNode;\n /** Heading for view that renders */\n drawerHeader?: string;\n /** Callback that fires on appshell drawer open */\n onDrawerOpen?: () => void;\n /** Callback that fires on appshell drawer close */\n onDrawerClose?: () => void;\n}\n\nexport interface UtilsProps {\n /** Context switcher config. */\n contextSwitcher?: ContextSwitcherProps | Record<string, never>;\n /** The active user of the application. */\n operator: AppShellProps['operator'];\n /** A set of app utilities like notifications, recents that renders at the bottom of AppShell */\n items?: (UtilItemProps | ReactElement)[];\n appHeader?: boolean;\n}\n\nexport interface NavListProps extends AsProp, BaseProps {\n items?: (NavListItemProps | ReactElement)[];\n nestedList?: boolean;\n collapsed?: boolean;\n id?: string;\n /** Whether the list is of single-select style options */\n singleSelect?: boolean;\n}\n\nexport interface NavListItemWrapperProps extends ForwardProps {\n label: string;\n tooltipLabel: string;\n content?: ReactNode;\n items?: NavListItemProps[];\n onMenuToggle?: (state: 'open' | 'close') => void;\n childElementRef: RefObject<HTMLElement>;\n}\n\nexport interface NavListItemProps extends AsProp, BaseProps, ForwardProps, NoChildrenProp {\n id?: string;\n visual?: ReactNode;\n primary: string;\n secondary?: string;\n /** Presents short, quickly identifiable info to a user for a collapsed nav item. */\n collapsedItemInfo?: string;\n href?: string;\n onClick?: MouseEventHandler<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>;\n items?: NavListItemProps[];\n collapseItems?: boolean;\n actions?: OperatorProps['actions'];\n onDismiss?: MouseEventHandler<HTMLElement>;\n forwardedRef?: Ref<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>;\n isMenuItem?: boolean;\n /** Whether the item is a single-select option */\n singleSelect?: NavListProps['singleSelect'];\n /** Whether the item is selected */\n selected?: boolean;\n}\n\nexport interface NavMenuProps extends NavListItemProps {\n forwardedRef?: Ref<HTMLButtonElement>;\n}\n\n/** AppHeader props */\n\nexport interface AppHeaderProps extends BaseProps, AppInfoProps {\n contextSwitcher?: ContextSwitcherProps | Record<string, never>;\n operator: AppShellProps['operator'];\n searchInput?: AppShellProps['searchInput'];\n searchLabel?: AppShellProps['searchLabel'];\n searchPage?: AppShellProps['searchPage'];\n}\n\n/** Drawer props */\n\nexport interface DrawerListProps {\n items: (DrawerItemProps & ForwardProps)[];\n loading?: boolean;\n viewAll?: {\n onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;\n href?: string;\n } & ForwardProps;\n newNotifications?: number;\n onItemClick?: (id: string, event: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n onItemPinToggle?: (id: string) => void;\n onDrawerOpen?: () => void;\n onDrawerClose?: () => void;\n}\n\nexport interface DrawerItemProps extends BaseProps {\n /** An id representing the item. */\n id: string;\n /** The primary text for the item. */\n primary: string;\n /** Secondary text that will be rendered as a Meta List. */\n secondary?: string[];\n /** A visual associated with the item. */\n visual?: ReactNode;\n /** A flag indicating if the item has been read. */\n unread?: boolean;\n /** A flag indicating if the item has been pinned or not. */\n pinned?: boolean;\n /** URL or DOM id to navigate to. */\n href?: string;\n /** The onClick handler for the item. */\n onClick?: (id: string, event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;\n /** The handler hat is called when a pin icon is toggled on an item. */\n onPinToggle?: (id: string) => void;\n}\n\nexport interface ListProps extends DrawerListProps {\n headingText?: string;\n emptyText: string;\n displayRecents: boolean;\n displayPins?: boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxCard.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/CheckboxCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAK1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAkC/E,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,GACvE,UAAU,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"CheckboxCard.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/CheckboxCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAK1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAkC/E,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,GACvE,UAAU,CAAC,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;;;;AAkFjD,wBAAiE"}
|
|
@@ -25,12 +25,12 @@ const StyledSelectionCard = styled.div(({ disabled, readOnly, theme: { component
|
|
|
25
25
|
StyledSelectionCard.defaultProps = defaultThemeProp;
|
|
26
26
|
const CheckboxCard = forwardRef(function CheckboxCard(props, ref) {
|
|
27
27
|
const uid = useUID();
|
|
28
|
-
const { testId, id = uid, label, disabled, readOnly, ...restProps } = props;
|
|
28
|
+
const { testId, id = uid, label, disabled, readOnly, onChange, onClick, onKeyDown, status, checked, value, ...restProps } = props;
|
|
29
29
|
const testIds = useTestIds(testId, getCheckboxCardTestIds);
|
|
30
30
|
const contentId = `${id}-content`;
|
|
31
31
|
const inputRef = useConsolidatedRef(ref);
|
|
32
32
|
const containerRef = useRef(null);
|
|
33
|
-
return (_jsx(StyledSelectionCard, { ...restProps, as: SelectionCard, testId: testIds, label: label, heading: _jsx(Checkbox, { testId: testIds.root,
|
|
33
|
+
return (_jsx(StyledSelectionCard, { ...restProps, as: SelectionCard, testId: testIds, label: label, heading: _jsx(Checkbox, { testId: testIds.root, onChange: onChange, onClick: onClick, status: status, checked: checked, value: value, id: id, disabled: disabled, readOnly: readOnly, label: _jsx(Text, { variant: 'h4', as: 'span', children: label }), variant: 'simple', "aria-details": contentId, ref: inputRef, onKeyDown: onKeyDown }), readOnly: readOnly, disabled: disabled, onClick: (e) => {
|
|
34
34
|
const target = e.target;
|
|
35
35
|
if (readOnly || !containerRef.current?.contains(target))
|
|
36
36
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxCard.js","sourceRoot":"","sources":["../../../src/components/Checkbox/CheckboxCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,MAAM,EAAE,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AAC,YAAY,CACf,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;QACrB,CAAC,EACD,SAAS,EAAE,CAAC,CAAgB,EAAE,EAAE;YAC9B,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,YAAY,CAAC,OAAO,KAAK,gBAAgB,EAAE,EAAE,CAAC;gBACjE,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;YAC5B,CAAC;QACH,CAAC,EACD,GAAG,EAAE,YAAY,GACjB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import { forwardRef, useRef } from 'react';\nimport type { PropsWithoutRef, MouseEvent, KeyboardEvent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Checkbox, defaultThemeProp } from '@pega/cosmos-react-core';\nimport type { CheckboxProps } from '@pega/cosmos-react-core';\n\nimport type { OmitStrict, RefElement } from '../../types';\nimport SelectionCard, { focusableSelector } from '../SelectionCard/SelectionCard';\nimport Text from '../Text';\nimport { useConsolidatedRef, useTestIds, useUID } from '../../hooks';\nimport { getActiveElement, withTestIds } from '../../utils';\nimport type { SelectionCardProps } from '../SelectionCard/SelectionCard.types';\n\nimport { getCheckboxCardTestIds } from './Checkbox.test-ids';\n\nconst StyledSelectionCard = styled.div<Pick<CheckboxProps, 'disabled' | 'readOnly'>>(\n ({\n disabled,\n readOnly,\n theme: {\n components: {\n 'form-control': {\n ':hover': { 'border-color': hoverBorderColor }\n }\n }\n }\n }) => {\n return css`\n ${!disabled &&\n css`\n cursor: pointer;\n `}\n\n ${!(disabled || readOnly) &&\n css`\n :hover:not(:focus-within) {\n border-color: ${hoverBorderColor};\n }\n `}\n `;\n }\n);\n\nStyledSelectionCard.defaultProps = defaultThemeProp;\n\nexport type CheckboxCardProps = OmitStrict<SelectionCardProps, 'heading'> &\n OmitStrict<CheckboxProps, 'label' | 'variant'>;\n\nconst CheckboxCard = forwardRef<RefElement<CheckboxProps>, PropsWithoutRef<CheckboxCardProps>>(\n function CheckboxCard(props, ref) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n label,\n disabled,\n readOnly,\n onChange,\n onClick,\n onKeyDown,\n status,\n checked,\n value,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getCheckboxCardTestIds);\n const contentId = `${id}-content`;\n const inputRef = useConsolidatedRef(ref);\n const containerRef = useRef<HTMLDivElement>(null);\n\n return (\n <StyledSelectionCard\n {...restProps}\n as={SelectionCard}\n testId={testIds}\n label={label}\n heading={\n <Checkbox\n testId={testIds.root}\n onChange={onChange}\n onClick={onClick}\n status={status}\n checked={checked}\n value={value}\n id={id}\n disabled={disabled}\n readOnly={readOnly}\n label={\n <Text variant='h4' as='span'>\n {label}\n </Text>\n }\n variant='simple'\n aria-details={contentId}\n ref={inputRef}\n onKeyDown={onKeyDown}\n />\n }\n readOnly={readOnly}\n disabled={disabled}\n onClick={(e: MouseEvent<HTMLDivElement>) => {\n const target = e.target as HTMLElement;\n if (readOnly || !containerRef.current?.contains(target)) return;\n if (\n containerRef.current &&\n [...containerRef.current.querySelectorAll(focusableSelector)].includes(target)\n )\n return;\n e.preventDefault();\n inputRef.current?.click();\n (inputRef.current?.hasAttribute('data-main-focus')\n ? inputRef\n : containerRef\n ).current?.focus();\n }}\n onKeyDown={(e: KeyboardEvent) => {\n if (e.key === ' ' && containerRef.current === getActiveElement()) {\n e.preventDefault();\n inputRef.current?.click();\n }\n }}\n ref={containerRef}\n />\n );\n }\n);\n\nexport default withTestIds(CheckboxCard, getCheckboxCardTestIds);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtonCard.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButtonCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAK1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAkC/E,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAC1E,UAAU,CAAC,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"RadioButtonCard.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButtonCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,aAAa,CAAC;AAK1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAkC/E,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,GAC1E,UAAU,CAAC,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;;;;AAsFpD,wBAAuE"}
|
|
@@ -25,14 +25,15 @@ const StyledSelectionCard = styled.div(({ disabled, readOnly, theme: { component
|
|
|
25
25
|
StyledSelectionCard.defaultProps = defaultThemeProp;
|
|
26
26
|
const RadioButtonCard = forwardRef(function RadioButtonCard(prop, ref) {
|
|
27
27
|
const uid = useUID();
|
|
28
|
-
const { testId, id = uid, label, disabled, readOnly, ...restProps } = prop;
|
|
28
|
+
const { testId, id = uid, label, disabled, readOnly, onChange, onClick, onKeyDown, status, checked, value, ...restProps } = prop;
|
|
29
29
|
const testIds = useTestIds(testId, getRadioButtonCardTestIds);
|
|
30
30
|
const contentId = `${id}-content`;
|
|
31
31
|
const inputRef = useConsolidatedRef(ref);
|
|
32
32
|
const containerRef = useRef(null);
|
|
33
|
-
return (_jsx(StyledSelectionCard, { ...restProps, as: SelectionCard, testId: testIds, label: label, heading: _jsx(RadioButton, { testId: testIds.root,
|
|
33
|
+
return (_jsx(StyledSelectionCard, { ...restProps, as: SelectionCard, testId: testIds, label: label, heading: _jsx(RadioButton, { testId: testIds.root, onChange: onChange, onClick: onClick, status: status, checked: checked, value: value, id: id, disabled: disabled, readOnly: readOnly, label: _jsx(Text, { variant: 'h4', as: 'span', children: label }), variant: 'simple', "aria-details": contentId, ref: inputRef, onKeyDown: (e) => {
|
|
34
34
|
if (e.key.includes('arrow'))
|
|
35
35
|
e.preventDefault();
|
|
36
|
+
onKeyDown?.(e);
|
|
36
37
|
} }), readOnly: readOnly, disabled: disabled, onClick: (e) => {
|
|
37
38
|
const target = e.target;
|
|
38
39
|
if (readOnly || !containerRef.current?.contains(target))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtonCard.js","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButtonCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAIxE,OAAO,aAAa,EAAE,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CACpC,CAAC,EACC,QAAQ,EACR,QAAQ,EACR,KAAK,EAAE,EACL,UAAU,EAAE,EACV,cAAc,EAAE,EACd,QAAQ,EAAE,EAAE,cAAc,EAAE,gBAAgB,EAAE,EAC/C,EACF,EACF,EACF,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AC","sourcesContent":["import { forwardRef, useRef } from 'react';\nimport type { PropsWithoutRef, MouseEvent, KeyboardEvent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, RadioButton } from '@pega/cosmos-react-core';\nimport type { RadioButtonProps } from '@pega/cosmos-react-core';\n\nimport type { OmitStrict, RefElement } from '../../types';\nimport SelectionCard, { focusableSelector } from '../SelectionCard/SelectionCard';\nimport Text from '../Text';\nimport { useConsolidatedRef, useTestIds, useUID } from '../../hooks';\nimport { getActiveElement, withTestIds } from '../../utils';\nimport type { SelectionCardProps } from '../SelectionCard/SelectionCard.types';\n\nimport { getRadioButtonCardTestIds } from './RadioButton.test-ids';\n\nconst StyledSelectionCard = styled.div<Pick<RadioButtonProps, 'disabled' | 'readOnly'>>(\n ({\n disabled,\n readOnly,\n theme: {\n components: {\n 'form-control': {\n ':hover': { 'border-color': hoverBorderColor }\n }\n }\n }\n }) => {\n return css`\n ${!disabled &&\n css`\n cursor: pointer;\n `}\n\n ${!(disabled || readOnly) &&\n css`\n :hover:not(:focus-within) {\n border-color: ${hoverBorderColor};\n }\n `}\n `;\n }\n);\n\nStyledSelectionCard.defaultProps = defaultThemeProp;\n\nexport type RadioButtonCardProps = OmitStrict<SelectionCardProps, 'heading'> &\n OmitStrict<RadioButtonProps, 'label' | 'variant'>;\n\nconst RadioButtonCard = forwardRef<\n RefElement<RadioButtonProps>,\n PropsWithoutRef<RadioButtonCardProps>\n>(function RadioButtonCard(prop, ref) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n label,\n disabled,\n readOnly,\n onChange,\n onClick,\n onKeyDown,\n status,\n checked,\n value,\n ...restProps\n } = prop;\n\n const testIds = useTestIds(testId, getRadioButtonCardTestIds);\n const contentId = `${id}-content`;\n const inputRef = useConsolidatedRef(ref);\n const containerRef = useRef<HTMLDivElement>(null);\n\n return (\n <StyledSelectionCard\n {...restProps}\n as={SelectionCard}\n testId={testIds}\n label={label}\n heading={\n <RadioButton\n testId={testIds.root}\n onChange={onChange}\n onClick={onClick}\n status={status}\n checked={checked}\n value={value}\n id={id}\n disabled={disabled}\n readOnly={readOnly}\n label={\n <Text variant='h4' as='span'>\n {label}\n </Text>\n }\n variant='simple'\n aria-details={contentId}\n ref={inputRef}\n onKeyDown={(e: KeyboardEvent) => {\n if (e.key.includes('arrow')) e.preventDefault();\n onKeyDown?.(e);\n }}\n />\n }\n readOnly={readOnly}\n disabled={disabled}\n onClick={(e: MouseEvent<HTMLDivElement>) => {\n const target = e.target as HTMLElement;\n if (readOnly || !containerRef.current?.contains(target)) return;\n if (\n containerRef.current &&\n [...containerRef.current.querySelectorAll(focusableSelector)].includes(target)\n )\n return;\n e.preventDefault();\n inputRef.current?.click();\n (inputRef.current?.hasAttribute('data-main-focus')\n ? inputRef\n : containerRef\n ).current?.focus();\n }}\n onKeyDown={(e: KeyboardEvent) => {\n if (e.key === ' ' && containerRef.current === getActiveElement()) {\n e.preventDefault();\n inputRef.current?.click();\n }\n }}\n ref={containerRef}\n />\n );\n});\n\nexport default withTestIds(RadioButtonCard, getRadioButtonCardTestIds);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-core",
|
|
3
|
-
"version": "8.0.0-build.44.
|
|
3
|
+
"version": "8.0.0-build.44.4",
|
|
4
4
|
"description": "Cosmos is a visual design system and UI component collection. Its goal is to empower application developers in their pursuit to create engaging and rewarding user experiences.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|