@helsenorge/designsystem-react 12.7.0 → 13.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/AnchorLink.js +4 -4
  2. package/AnchorLink.js.map +1 -1
  3. package/Button.js +4 -4
  4. package/Button.js.map +1 -1
  5. package/CHANGELOG.md +19 -29
  6. package/Checkbox.js +4 -5
  7. package/Checkbox.js.map +1 -1
  8. package/Close.js +3 -3
  9. package/Close.js.map +1 -1
  10. package/Expander.js +2 -2
  11. package/Expander.js.map +1 -1
  12. package/FormFieldTag.js +1 -2
  13. package/FormFieldTag.js.map +1 -1
  14. package/FormGroup.js +16 -16
  15. package/FormGroup.js.map +1 -1
  16. package/HelpTriggerIcon.js +5 -3
  17. package/HelpTriggerIcon.js.map +1 -1
  18. package/HelpTriggerStandalone.js +3 -3
  19. package/HelpTriggerStandalone.js.map +1 -1
  20. package/Icon.js +2 -3
  21. package/Icon.js.map +1 -1
  22. package/Illustration.js +2 -3
  23. package/Illustration.js.map +1 -1
  24. package/InfoTeaser.js +2 -3
  25. package/InfoTeaser.js.map +1 -1
  26. package/Input.js +9 -10
  27. package/Input.js.map +1 -1
  28. package/Label.js +3 -3
  29. package/Label.js.map +1 -1
  30. package/LinkList.js +4 -4
  31. package/LinkList.js.map +1 -1
  32. package/ListEditMode.js +3 -3
  33. package/ListEditMode.js.map +1 -1
  34. package/RadioButton.js +4 -5
  35. package/RadioButton.js.map +1 -1
  36. package/Select.js +8 -10
  37. package/Select.js.map +1 -1
  38. package/Slider.js +8 -8
  39. package/Slider.js.map +1 -1
  40. package/TabList.js +2 -2
  41. package/TabList.js.map +1 -1
  42. package/Textarea.js +2 -3
  43. package/Textarea.js.map +1 -1
  44. package/__mocks__/usePseudoClasses.js +1 -1
  45. package/__mocks__/usePseudoClasses.js.map +1 -1
  46. package/components/Chip/index.js +3 -3
  47. package/components/Chip/index.js.map +1 -1
  48. package/components/Dropdown/index.js +2 -2
  49. package/components/Dropdown/index.js.map +1 -1
  50. package/components/ExpanderHierarchy/index.js +3 -3
  51. package/components/ExpanderHierarchy/index.js.map +1 -1
  52. package/components/ExpanderList/index.js +4 -5
  53. package/components/ExpanderList/index.js.map +1 -1
  54. package/components/FormFieldTag/FormFieldTag.d.ts +0 -2
  55. package/components/FormGroup/FormGroup.d.ts +2 -1
  56. package/components/HelpExpanderStandalone/index.js +3 -3
  57. package/components/HelpExpanderStandalone/index.js.map +1 -1
  58. package/components/HelpTooltip/index.js +2 -3
  59. package/components/HelpTooltip/index.js.map +1 -1
  60. package/components/HelpTriggerInline/index.js +3 -3
  61. package/components/HelpTriggerInline/index.js.map +1 -1
  62. package/components/Icons/PatientAndPerson.js +2 -2
  63. package/components/Icons/PatientAndPerson.js.map +1 -1
  64. package/components/Icons/PersonAndPatient.js +2 -2
  65. package/components/Icons/PersonAndPatient.js.map +1 -1
  66. package/components/Input/styles.module.scss +21 -22
  67. package/components/Input/styles.module.scss.d.ts +1 -1
  68. package/components/Label/Label.d.ts +2 -1
  69. package/components/Logo/index.js +6 -6
  70. package/components/Logo/index.js.map +1 -1
  71. package/components/NotificationPanel/index.js +5 -6
  72. package/components/NotificationPanel/index.js.map +1 -1
  73. package/components/PopMenu/index.js +2 -2
  74. package/components/PopMenu/index.js.map +1 -1
  75. package/components/PromoPanel/index.js +3 -3
  76. package/components/PromoPanel/index.js.map +1 -1
  77. package/components/Select/styles.module.scss +2 -2
  78. package/components/ServiceMessage/index.js +7 -8
  79. package/components/ServiceMessage/index.js.map +1 -1
  80. package/components/StickyNote/index.js +6 -8
  81. package/components/StickyNote/index.js.map +1 -1
  82. package/components/Textarea/styles.module.scss.d.ts +0 -1
  83. package/components/Tile/index.js +3 -3
  84. package/components/Tile/index.js.map +1 -1
  85. package/components/Toggle/index.js +13 -11
  86. package/components/Toggle/index.js.map +1 -1
  87. package/components/Validation/index.js +2 -3
  88. package/components/Validation/index.js.map +1 -1
  89. package/constants.d.ts +0 -1
  90. package/constants.js +0 -1
  91. package/constants.js.map +1 -1
  92. package/designsystem-react.css +1 -1
  93. package/floating-ui.react.js +38 -18
  94. package/floating-ui.react.js.map +1 -1
  95. package/hooks/useIdWithFallback.d.ts +6 -0
  96. package/hooks/useIdWithFallback.js +9 -0
  97. package/hooks/useIdWithFallback.js.map +1 -0
  98. package/index.d.ts +0 -2
  99. package/index.js +0 -4
  100. package/index.js.map +1 -1
  101. package/package.json +3 -3
  102. package/scss/_input.scss +0 -29
  103. package/scss/supernova/styles/colors.css +1 -1
  104. package/scss/supernova/styles/typography.css +51 -52
  105. package/PanelOld.js +0 -325
  106. package/PanelOld.js.map +0 -1
  107. package/__mocks__/useHover.d.ts +0 -1
  108. package/__mocks__/useHover.js +0 -6
  109. package/__mocks__/useHover.js.map +0 -1
  110. package/components/PanelListOld/PanelListOld.d.ts +0 -12
  111. package/components/PanelListOld/PanelListOld.test.d.ts +0 -1
  112. package/components/PanelListOld/index.d.ts +0 -3
  113. package/components/PanelListOld/index.js +0 -20
  114. package/components/PanelListOld/index.js.map +0 -1
  115. package/components/PanelListOld/styles.module.scss +0 -14
  116. package/components/PanelListOld/styles.module.scss.d.ts +0 -9
  117. package/components/PanelOld/PanelOld.d.ts +0 -89
  118. package/components/PanelOld/PanelOld.test.d.ts +0 -1
  119. package/components/PanelOld/index.d.ts +0 -3
  120. package/components/PanelOld/index.js +0 -9
  121. package/components/PanelOld/index.js.map +0 -1
  122. package/components/PanelOld/styles.module.scss +0 -433
  123. package/components/PanelOld/styles.module.scss.d.ts +0 -61
  124. package/hooks/useHover.d.ts +0 -10
  125. package/hooks/useHover.js +0 -9
  126. package/hooks/useHover.js.map +0 -1
  127. package/hooks/useUuid.d.ts +0 -6
  128. package/hooks/useUuid.js +0 -10
  129. package/hooks/useUuid.js.map +0 -1
package/PanelOld.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"PanelOld.js","sources":["../src/components/PanelOld/PanelOld.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnchorTarget, AnalyticsId } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { useUuid } from '../../hooks/useUuid';\nimport { palette } from '../../theme/palette';\nimport { AriaLabelAttributes, getAriaLabelAttributes } from '../../utils/accessibility';\nimport Badge from '../Badge';\nimport Button, { ButtonProps, ButtonTags } from '../Button';\nimport Icon, { IconSize, SvgPathProps } from '../Icon';\nimport AlertSignFill from '../Icons/AlertSignFill';\nimport ArrowRight from '../Icons/ArrowRight';\nimport Calendar from '../Icons/Calendar';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport Pencil from '../Icons/Pencil';\nimport Watch from '../Icons/Watch';\nimport Title, { TitleTags } from '../Title';\n\nimport panelStyles from './styles.module.scss';\n\nexport enum PanelOldStatus {\n normal = 'normal',\n new = 'new',\n error = 'error',\n draft = 'draft',\n}\n\nexport enum PanelOldVariant {\n fill = 'fill',\n white = 'white',\n stroke = 'stroke',\n line = 'line',\n}\n\nexport enum PanelOldLayout {\n layout1 = 'layout1',\n layout2 = 'layout2',\n layout3a = 'layout3a',\n layout3b = 'layout3b',\n layout3c = 'layout3c',\n}\n\nexport interface PanelOldProps {\n /** Adds custom classes to the element. */\n className?: string;\n /** Panel section A content */\n contentA?: React.ReactNode | string;\n /** Panel section B content */\n contentB?: React.ReactNode | string;\n /** Content for a container that renders above A and B regardless of layout */\n contentHeader?: React.ReactNode;\n /** Container acts as a button, clicking anywhere triggers a panel button click */\n containerAsButton?: boolean;\n /** Panel children */\n children?: React.ReactNode;\n /** Displays date with icon */\n date?: string;\n /** Expands or collapses the panel */\n expanded?: boolean;\n /** Whether the panel can be focused */\n focusable?: boolean;\n /** Icon displayed in title */\n icon?: React.ReactNode;\n /** Panel button text */\n buttonText?: string;\n /** Panel button close text */\n buttonTextClose?: string;\n /** HTML markup for panel button. Default: a */\n buttonHtmlMarkup?: ButtonTags;\n /** Callback when the panel button is clicked */\n buttonOnClick?: ButtonProps['onClick'];\n /** Panel button is aria-labelledby the text in the button itself + the element set in buttonAriaLabelledById. Default: auto-generated id for title (if title is set). */\n buttonAriaLabelledById?: string;\n /** Panel button aria label */\n buttonAriaLabel?: string;\n /** Layout of the panel */\n layout?: keyof typeof PanelOldLayout;\n /** Removes top border when variant is \"line\" */\n noTopBorder?: boolean;\n /** Called when the panel is opened/closed */\n onExpand?: (isExpanded: boolean) => void;\n /** Whether to render children when closed (in which case they are hidden with CSS). Default: false */\n renderChildrenWhenClosed?: boolean;\n /** Displays a status on the left side: default normal */\n status?: keyof typeof PanelOldStatus;\n /** Displayed on top of the panel with a status icon */\n statusMessage?: string;\n /** Sets the data-testid attribute for testing purposes */\n testId?: string;\n /** Displays time with icon */\n time?: string;\n /** Title of the panel */\n title?: string;\n /** Changes the underlying element of the title. Default: h2 */\n titleHtmlMarkup?: TitleTags;\n /** Changes the visual representation of the panel */\n variant?: keyof typeof PanelOldVariant;\n /** URL to details, renders as a button with anchor tag */\n url?: string;\n /** target used in the button: default is _self */\n target?: AnchorTarget;\n}\n\nexport interface LayoutProps\n extends Pick<PanelOldProps, 'contentA' | 'contentB' | 'contentHeader' | 'icon' | 'layout' | 'status' | 'statusMessage'> {\n ctaContainer?: React.ReactNode;\n titleElement: React.ReactNode;\n}\n\nconst StatusText: React.FC<{ status?: keyof typeof PanelOldStatus; statusMessage?: string }> = ({ status, statusMessage }) => {\n const statusIcon = (): { color: string; svgIcon: React.FC<SvgPathProps> } => {\n if (status === PanelOldStatus.error) {\n return { color: palette.cherry500, svgIcon: AlertSignFill };\n }\n\n return { color: palette.black, svgIcon: Pencil };\n };\n\n const statusMessageClass = classNames(panelStyles['status-message'], {\n [panelStyles['status-message--new']]: status === PanelOldStatus.new,\n });\n\n if ((status === PanelOldStatus.error || status === PanelOldStatus.draft) && statusMessage) {\n return (\n <div className={statusMessageClass} data-testid=\"display-status\">\n {<Icon {...statusIcon()} size={IconSize.XSmall} />} <span>{statusMessage}</span>\n </div>\n );\n }\n\n return null;\n};\n\nconst PreContainer: React.FC<{ children?: React.ReactNode }> = ({ children }) => {\n if (typeof children === 'undefined') return null;\n return <div className={panelStyles['header-container']}>{children}</div>;\n};\n\nconst DateTime: React.FC<{ date?: string; time?: string }> = ({ date, time }) => {\n if (date || time) {\n return (\n <div className={panelStyles['datetime-container']} data-testid=\"datetime\">\n {date && (\n <div className={panelStyles['datetime-container__icon']}>\n <Icon svgIcon={Calendar} size={IconSize.XSmall} />\n <span>{date}</span>\n </div>\n )}\n {time && (\n <div className={panelStyles['datetime-container__icon']}>\n <Icon svgIcon={Watch} size={IconSize.XSmall} />\n <span>{time}</span>\n </div>\n )}\n </div>\n );\n }\n\n return null;\n};\n\nconst PanelLayout1: React.FC<LayoutProps> = ({\n contentA,\n contentB,\n contentHeader,\n ctaContainer,\n icon,\n status,\n statusMessage,\n titleElement,\n}) => {\n const panelLayoutClasses = classNames(panelStyles['panel__layout-1'], {\n [panelStyles['panel__layout-1--with-icon']]: icon,\n });\n const iconClasses = classNames(panelStyles.panel__icon, panelStyles['panel__icon--layout-1'], {\n [panelStyles['panel__icon--no-content']]: !contentA && !contentB,\n });\n\n return (\n <div className={panelLayoutClasses}>\n <StatusText status={status} statusMessage={statusMessage} />\n <PreContainer>{contentHeader}</PreContainer>\n {icon && <div className={iconClasses}>{icon}</div>}\n <div className={panelStyles['panel__layout-1__content-a']}>\n {titleElement}\n {contentA}\n </div>\n {contentB && <div>{contentB}</div>}\n {ctaContainer}\n </div>\n );\n};\n\nconst PanelLayout2: React.FC<LayoutProps> = ({\n contentA,\n contentB,\n contentHeader,\n ctaContainer,\n icon,\n status,\n statusMessage,\n titleElement,\n}) => {\n const panelLayoutClasses = classNames(panelStyles['panel__layout-2'], {\n [panelStyles['panel__layout-2--with-icon']]: icon,\n });\n const iconClasses = classNames(panelStyles.panel__icon, panelStyles['panel__icon--layout-2'], {\n [panelStyles['panel__icon--no-content']]: !contentA && !contentB,\n });\n const lastColumnClass = panelStyles['panel__layout-2__last-column'];\n\n return (\n <div className={panelLayoutClasses}>\n <StatusText status={status} statusMessage={statusMessage} />\n <PreContainer>{contentHeader}</PreContainer>\n {icon && <div className={iconClasses}>{icon}</div>}\n <div className={panelStyles['panel__layout-2__content-a']}>\n {titleElement}\n {contentA}\n </div>\n {contentB && <div className={lastColumnClass}>{contentB}</div>}\n {ctaContainer && <div className={lastColumnClass}>{ctaContainer}</div>}\n </div>\n );\n};\n\nconst PanelLayout3: React.FC<LayoutProps> = ({\n contentA,\n contentB,\n contentHeader,\n ctaContainer,\n icon,\n layout,\n status,\n statusMessage,\n titleElement,\n}) => {\n const layoutClasses = classNames(panelStyles['panel__layout-3'], {\n [panelStyles['panel__layout-3--with-icon']]: icon,\n [panelStyles['panel__layout-3--a']]: layout === PanelOldLayout.layout3a,\n [panelStyles['panel__layout-3--b']]: layout === PanelOldLayout.layout3b,\n [panelStyles['panel__layout-3--c']]: layout === PanelOldLayout.layout3c,\n });\n const iconClasses = classNames(panelStyles.panel__icon, panelStyles['panel__icon--layout-3'], {\n [panelStyles['panel__icon--no-content']]: !contentA && !contentB,\n });\n\n return (\n <div className={layoutClasses}>\n <StatusText status={status} statusMessage={statusMessage} />\n <PreContainer>{contentHeader}</PreContainer>\n {icon && <div className={iconClasses}>{icon}</div>}\n <div>\n {titleElement}\n {contentA}\n </div>\n <div className={panelStyles['panel__layout-3__last-column']}>\n {contentB && <div className={panelStyles['panel__layout-3__last-column__content-b']}>{contentB}</div>}\n {ctaContainer}\n </div>\n </div>\n );\n};\n\nconst PanelOld = React.forwardRef(function PanelForwardedRef(props: PanelOldProps, ref: React.ForwardedRef<HTMLHeadingElement>) {\n const {\n buttonAriaLabel,\n buttonAriaLabelledById,\n buttonText = 'Se detaljer',\n buttonTextClose = 'Skjul detaljer',\n buttonHtmlMarkup = 'a',\n buttonOnClick,\n children,\n className,\n containerAsButton = false,\n contentA,\n contentB,\n contentHeader,\n date,\n expanded = false,\n focusable = false,\n icon,\n layout = PanelOldLayout.layout2,\n noTopBorder,\n onExpand,\n renderChildrenWhenClosed = false,\n status = PanelOldStatus.normal,\n statusMessage,\n target = '_self',\n testId,\n time,\n title,\n titleHtmlMarkup = 'h2',\n url,\n variant = PanelOldVariant.fill,\n } = props;\n\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n const titleId = useUuid();\n const buttonTextId = useUuid();\n const hasBadge = statusMessage && status === PanelOldStatus.new;\n const noContentB = typeof contentB === 'undefined';\n const layout1 = layout === 'layout1' || noContentB;\n const layout2 = !noContentB && layout === 'layout2';\n const layout3 = !noContentB && (layout === 'layout3a' || layout === 'layout3b' || layout === 'layout3c');\n const panelWrapperClasses = classNames(panelStyles['panel-wrapper'], className);\n\n const panelClasses = classNames(panelStyles.panel, {\n [panelStyles['panel--fill']]: variant === PanelOldVariant.fill,\n [panelStyles['panel--stroke']]: variant === PanelOldVariant.stroke,\n [panelStyles['panel--white']]: variant === PanelOldVariant.white,\n [panelStyles['panel--line']]: variant === PanelOldVariant.line,\n [panelStyles['panel--no-top-border']]: variant === PanelOldVariant.line && noTopBorder,\n [panelStyles['panel--selected']]: isExpanded,\n [panelStyles['panel--new']]: status === PanelOldStatus.new,\n [panelStyles['panel--draft']]: status === PanelOldStatus.draft,\n [panelStyles['panel--error']]: status === PanelOldStatus.error,\n [panelStyles['panel--status']]: status && status !== PanelOldStatus.normal,\n [panelStyles['panel--with-icon']]: icon,\n [panelStyles['panel--button']]: containerAsButton,\n [panelStyles['panel--clickable']]: children || url || onExpand || buttonOnClick || containerAsButton,\n });\n\n const renderCTAContainer = () => {\n const hasButton = children || url || buttonOnClick;\n const btnContainerClasses = classNames(panelStyles['panel__btn-container'], {\n [panelStyles['panel__btn-container--no-content-b']]: noContentB,\n [panelStyles['panel__btn-container--no-button']]: !hasButton,\n });\n\n return (\n (hasButton || date || time) && (\n <div className={btnContainerClasses}>\n {<DateTime date={date} time={time} />}\n {hasButton && <div className={panelStyles['panel__details-btn']}>{renderDetailsButton()}</div>}\n </div>\n )\n );\n };\n\n const renderDetailsButton = (): React.ReactNode => {\n const ariaLabelAttributes = getAriaLabelAttributes({\n label: buttonAriaLabel,\n id: (buttonAriaLabelledById && `${buttonTextId} ${buttonAriaLabelledById}`) || (title && titleId && `${buttonTextId} ${titleId}`),\n prefer: 'label',\n });\n\n const commonProps: Partial<ButtonProps> & AriaLabelAttributes = {\n onClick: buttonOnClick ? buttonOnClick : (): void => setIsExpanded(!isExpanded),\n className: containerAsButton ? panelStyles['panel__expand'] : undefined,\n variant: 'borderless',\n ellipsis: true,\n ...ariaLabelAttributes,\n };\n\n if (children) {\n return (\n <Button testId=\"expand\" aria-expanded={isExpanded} {...commonProps}>\n <span id={buttonTextId}>{isExpanded ? buttonTextClose : buttonText}</span>\n <Icon svgIcon={isExpanded ? ChevronUp : ChevronDown} />\n </Button>\n );\n }\n\n return (\n <Button testId=\"url\" htmlMarkup={buttonHtmlMarkup} href={url} target={target} {...commonProps}>\n <span id={buttonTextId}>{buttonText}</span>\n <Icon svgIcon={ArrowRight} />\n </Button>\n );\n };\n\n const renderContent = (): React.ReactNode | null => {\n if (!children || (!renderChildrenWhenClosed && !isExpanded)) {\n return null;\n }\n\n const panelDetailsClasses = classNames(panelStyles['panel-details'], {\n [panelStyles['panel-details--open']]: isExpanded,\n [panelStyles['panel-details--line']]: variant === PanelOldVariant.line,\n [panelStyles['panel-details--white']]: variant === PanelOldVariant.white,\n });\n\n return (\n <div className={panelDetailsClasses} data-testid=\"panel-details\">\n <div>{children}</div>\n </div>\n );\n };\n\n const renderTitle = () => {\n const titleContainerClasses = classNames(panelStyles['title-container'], {\n [panelStyles['title-container--no-content-a']]: !contentA,\n });\n const titleClasses = classNames(panelStyles['title-container__title'], {\n [panelStyles['title-container__title--badge']]: hasBadge,\n });\n\n return (\n title && (\n <div className={titleContainerClasses}>\n <Title appearance=\"title3\" htmlMarkup={titleHtmlMarkup} id={titleId} className={titleClasses}>\n {title}\n </Title>\n {hasBadge && (\n <div className={panelStyles.panel__badge}>\n <Badge color=\"blueberry\" testId=\"badge-status\">\n {statusMessage}\n </Badge>\n </div>\n )}\n </div>\n )\n );\n };\n\n const layoutProps: LayoutProps = {\n contentA: contentA,\n contentB: contentB,\n contentHeader: contentHeader,\n ctaContainer: renderCTAContainer(),\n icon: icon,\n status: status,\n statusMessage: statusMessage,\n titleElement: renderTitle(),\n };\n\n return (\n <div\n tabIndex={focusable ? -1 : undefined}\n ref={ref}\n data-testid={testId}\n className={panelWrapperClasses}\n data-analyticsid={AnalyticsId.PanelOld}\n >\n <div className={panelClasses}>\n {layout1 && <PanelLayout1 {...layoutProps} />}\n {layout2 && <PanelLayout2 {...layoutProps} />}\n {layout3 && <PanelLayout3 {...layoutProps} layout={layout} />}\n </div>\n {renderContent()}\n </div>\n );\n});\n\nexport default PanelOld;\n"],"names":["PanelOldStatus","PanelOldVariant","PanelOldLayout","React"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBO,IAAK,mCAAAA,oBAAL;AACLA,kBAAA,QAAA,IAAS;AACTA,kBAAA,KAAA,IAAM;AACNA,kBAAA,OAAA,IAAQ;AACRA,kBAAA,OAAA,IAAQ;AAJE,SAAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;AAOL,IAAK,oCAAAC,qBAAL;AACLA,mBAAA,MAAA,IAAO;AACPA,mBAAA,OAAA,IAAQ;AACRA,mBAAA,QAAA,IAAS;AACTA,mBAAA,MAAA,IAAO;AAJG,SAAAA;AAAA,GAAA,mBAAA,CAAA,CAAA;AAOL,IAAK,mCAAAC,oBAAL;AACLA,kBAAA,SAAA,IAAU;AACVA,kBAAA,SAAA,IAAU;AACVA,kBAAA,UAAA,IAAW;AACXA,kBAAA,UAAA,IAAW;AACXA,kBAAA,UAAA,IAAW;AALD,SAAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;AA2EZ,MAAM,aAAyF,CAAC,EAAE,QAAQ,oBAAoB;AAC5H,QAAM,aAAa,MAA0D;AAC3E,QAAI,WAAW,SAAsB;A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wB,GAAG;AAAA,MACrE,CAAC,YAAY,+BAA+B,CAAC,GAAG;AAAA,IAAA,CACjD;AAED,WACE,SACE,qBAAC,OAAA,EAAI,WAAW,uBACd,UAAA;AAAA,MAAA,oBAAC,OAAA,EAAM,YAAW,UAAS,YAAY,iBAAiB,IAAI,SAAS,WAAW,cAC7E,UAAA,MAAA,CACH;AAAA,MACC,YACC,oBAAC,OAAA,EAAI,WAAW,YAAY,cAC1B,UAAA,oBAAC,OAAA,EAAM,OAAM,aAAY,QAAO,gBAC7B,yBACH,EAAA,CACF;AAAA,IAAA,GAEJ;AAAA,EAGN;AAEA,QAAM,cAA2B;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc,mBAAA;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc,YAAA;AAAA,EAAY;AAG5B,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU,YAAY,KAAK;AAAA,MAC3B;AAAA,MACA,eAAa;AAAA,MACb,WAAW;AAAA,MACX,oBAAkB,YAAY;AAAA,MAE9B,UAAA;AAAA,QAAA,qBAAC,OAAA,EAAI,WAAW,cACb,UAAA;AAAA,UAAA,WAAW,oBAAC,cAAA,EAAc,GAAG,YAAA,CAAa;AAAA,UAC1C,WAAW,oBAAC,cAAA,EAAc,GAAG,YAAA,CAAa;AAAA,UAC1C,WAAW,oBAAC,cAAA,EAAc,GAAG,aAAa,OAAA,CAAgB;AAAA,QAAA,GAC7D;AAAA,QACC,cAAA;AAAA,MAAc;AAAA,IAAA;AAAA,EAAA;AAGrB,CAAC;"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- vi.mock("../hooks/useHover", () => ({
2
- useHover: vi.fn().mockImplementation((ref) => {
3
- return { hoverRef: ref || { current: void 0 }, isHovered: false };
4
- })
5
- }));
6
- //# sourceMappingURL=useHover.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useHover.js","sources":["../../src/__mocks__/useHover.ts"],"sourcesContent":["vi.mock('../hooks/useHover', () => ({\n useHover: vi.fn().mockImplementation(ref => {\n return { hoverRef: ref || { current: undefined }, isHovered: false };\n }),\n}));\n\nexport {};\n"],"names":[],"mappings":"AAAA,GAAG,KAAK,qBAAqB,OAAO;AAAA,EAClC,UAAU,GAAG,GAAA,EAAK,mBAAmB,CAAA,QAAO;AAC1C,WAAO,EAAE,UAAU,OAAO,EAAE,SAAS,OAAA,GAAa,WAAW,MAAA;AAAA,EAC/D,CAAC;AACH,EAAE;"}
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- import { PanelOldVariant } from '../PanelOld';
3
- export interface PanelListOldProps {
4
- /** Panels to render inside the PanelList */
5
- children?: React.ReactNode;
6
- /** Changes the visual representation of the panel. Default: fill */
7
- variant?: keyof typeof PanelOldVariant;
8
- /** Sets the data-testid attribute. */
9
- testId?: string;
10
- }
11
- declare const PanelListOld: React.ForwardRefExoticComponent<PanelListOldProps & React.RefAttributes<HTMLDivElement>>;
12
- export default PanelListOld;
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import { default as PanelListOld } from './PanelListOld';
2
- export * from './PanelListOld';
3
- export default PanelListOld;
@@ -1,20 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import React__default from "react";
3
- import classNames from "classnames";
4
- import { AnalyticsId } from "../../constants.js";
5
- import { b as PanelOldVariant, P as PanelOld } from "../../PanelOld.js";
6
- import styles from "./styles.module.scss";
7
- const isPanelComponent = (element) => React__default.isValidElement(element) && element.type === PanelOld;
8
- const PanelListOld = React__default.forwardRef(function BadgeForwardedRef(props, ref) {
9
- const { testId, children, variant = PanelOldVariant.fill } = props;
10
- const renderPanel = (panel, firstChild) => React__default.cloneElement(panel, {
11
- variant,
12
- noTopBorder: variant === PanelOldVariant.line && !firstChild,
13
- className: classNames(panel.props.className, variant !== PanelOldVariant.line && styles["panel-list__panel"])
14
- });
15
- return /* @__PURE__ */ jsx("div", { ref, "data-testid": testId, "data-analyticsid": AnalyticsId.PanelList, children: React__default.Children.map(children, (child, index) => isPanelComponent(child) ? renderPanel(child, index === 0) : child) });
16
- });
17
- export {
18
- PanelListOld as default
19
- };
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/PanelListOld/PanelListOld.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport PanelOld, { PanelOldProps, PanelOldVariant } from '../PanelOld';\n\nimport styles from './styles.module.scss';\n\nexport interface PanelListOldProps {\n /** Panels to render inside the PanelList */\n children?: React.ReactNode;\n /** Changes the visual representation of the panel. Default: fill */\n variant?: keyof typeof PanelOldVariant;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst isPanelComponent = (element: unknown | null | undefined): element is React.ReactElement<PanelOldProps> =>\n React.isValidElement<PanelOldProps>(element) && (element as React.ReactElement).type === PanelOld;\n\nconst PanelListOld = React.forwardRef(function BadgeForwardedRef(props: PanelListOldProps, ref: React.ForwardedRef<HTMLDivElement>) {\n const { testId, children, variant = PanelOldVariant.fill } = props;\n\n const renderPanel = (panel: React.ReactElement<PanelOldProps>, firstChild: boolean): React.ReactElement =>\n React.cloneElement(panel, {\n variant: variant,\n noTopBorder: variant === PanelOldVariant.line && !firstChild,\n className: classNames(panel.props.className, variant !== PanelOldVariant.line && styles['panel-list__panel']),\n });\n\n return (\n <div ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.PanelList}>\n {React.Children.map(children, (child, index) => (isPanelComponent(child) ? renderPanel(child, index === 0) : child))}\n </div>\n );\n});\n\nexport default PanelListOld;\n"],"names":["React"],"mappings":";;;;;;AAkBA,MAAM,mBAAmB,CAAC,YACxBA,eAAM,eAA8B,OAAO,KAAM,QAA+B,SAAS;AAE3F,MAAM,eAAeA,eAAM,WAAW,SAAS,kBAAkB,OAA0B,KAAyC;AAClI,QAAM,EAAE,QAAQ,UAAU,UAAU,gBAAgB,SAAS;AAE7D,QAAM,cAAc,CAAC,OAA0C,eAC7DA,eAAM,aAAa,OAAO;AAAA,IACxB;AAAA,IACA,aAAa,YAAY,gBAAgB,QAAQ,CAAC;AAAA,IAClD,WAAW,WAAW,MAAM,MAAM,WAAW,YAAY,gBAAgB,QAAQ,OAAO,mBAAmB,CAAC;AAAA,EAAA,CAC7G;AAEH,SACE,oBAAC,OAAA,EAAI,KAAU,eAAa,QAAQ,oBAAkB,YAAY,WAC/D,UAAAA,eAAM,SAAS,IAAI,UAAU,CAAC,OAAO,UAAW,iBAAiB,KAAK,IAAI,YAAY,OAAO,UAAU,CAAC,IAAI,KAAM,EAAA,CACrH;AAEJ,CAAC;"}
@@ -1,14 +0,0 @@
1
- @use 'sass:map';
2
- @use '../../scss/spacers' as spacers;
3
- @use '../../scss/palette' as palette;
4
- @use '../../scss/breakpoints' as breakpoints;
5
-
6
- .panel-list {
7
- &__panel:not(:last-child) {
8
- margin-bottom: spacers.getSpacer(2xs);
9
-
10
- @media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
11
- margin-bottom: spacers.getSpacer(s);
12
- }
13
- }
14
- }
@@ -1,9 +0,0 @@
1
- export type Styles = {
2
- 'panel-list__panel': string;
3
- };
4
-
5
- export type ClassNames = keyof Styles;
6
-
7
- declare const styles: Styles;
8
-
9
- export default styles;
@@ -1,89 +0,0 @@
1
- import { default as React } from 'react';
2
- import { AnchorTarget } from '../../constants';
3
- import { ButtonProps, ButtonTags } from '../Button';
4
- import { TitleTags } from '../Title';
5
- export declare enum PanelOldStatus {
6
- normal = "normal",
7
- new = "new",
8
- error = "error",
9
- draft = "draft"
10
- }
11
- export declare enum PanelOldVariant {
12
- fill = "fill",
13
- white = "white",
14
- stroke = "stroke",
15
- line = "line"
16
- }
17
- export declare enum PanelOldLayout {
18
- layout1 = "layout1",
19
- layout2 = "layout2",
20
- layout3a = "layout3a",
21
- layout3b = "layout3b",
22
- layout3c = "layout3c"
23
- }
24
- export interface PanelOldProps {
25
- /** Adds custom classes to the element. */
26
- className?: string;
27
- /** Panel section A content */
28
- contentA?: React.ReactNode | string;
29
- /** Panel section B content */
30
- contentB?: React.ReactNode | string;
31
- /** Content for a container that renders above A and B regardless of layout */
32
- contentHeader?: React.ReactNode;
33
- /** Container acts as a button, clicking anywhere triggers a panel button click */
34
- containerAsButton?: boolean;
35
- /** Panel children */
36
- children?: React.ReactNode;
37
- /** Displays date with icon */
38
- date?: string;
39
- /** Expands or collapses the panel */
40
- expanded?: boolean;
41
- /** Whether the panel can be focused */
42
- focusable?: boolean;
43
- /** Icon displayed in title */
44
- icon?: React.ReactNode;
45
- /** Panel button text */
46
- buttonText?: string;
47
- /** Panel button close text */
48
- buttonTextClose?: string;
49
- /** HTML markup for panel button. Default: a */
50
- buttonHtmlMarkup?: ButtonTags;
51
- /** Callback when the panel button is clicked */
52
- buttonOnClick?: ButtonProps['onClick'];
53
- /** Panel button is aria-labelledby the text in the button itself + the element set in buttonAriaLabelledById. Default: auto-generated id for title (if title is set). */
54
- buttonAriaLabelledById?: string;
55
- /** Panel button aria label */
56
- buttonAriaLabel?: string;
57
- /** Layout of the panel */
58
- layout?: keyof typeof PanelOldLayout;
59
- /** Removes top border when variant is "line" */
60
- noTopBorder?: boolean;
61
- /** Called when the panel is opened/closed */
62
- onExpand?: (isExpanded: boolean) => void;
63
- /** Whether to render children when closed (in which case they are hidden with CSS). Default: false */
64
- renderChildrenWhenClosed?: boolean;
65
- /** Displays a status on the left side: default normal */
66
- status?: keyof typeof PanelOldStatus;
67
- /** Displayed on top of the panel with a status icon */
68
- statusMessage?: string;
69
- /** Sets the data-testid attribute for testing purposes */
70
- testId?: string;
71
- /** Displays time with icon */
72
- time?: string;
73
- /** Title of the panel */
74
- title?: string;
75
- /** Changes the underlying element of the title. Default: h2 */
76
- titleHtmlMarkup?: TitleTags;
77
- /** Changes the visual representation of the panel */
78
- variant?: keyof typeof PanelOldVariant;
79
- /** URL to details, renders as a button with anchor tag */
80
- url?: string;
81
- /** target used in the button: default is _self */
82
- target?: AnchorTarget;
83
- }
84
- export interface LayoutProps extends Pick<PanelOldProps, 'contentA' | 'contentB' | 'contentHeader' | 'icon' | 'layout' | 'status' | 'statusMessage'> {
85
- ctaContainer?: React.ReactNode;
86
- titleElement: React.ReactNode;
87
- }
88
- declare const PanelOld: React.ForwardRefExoticComponent<PanelOldProps & React.RefAttributes<HTMLHeadingElement>>;
89
- export default PanelOld;
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import { default as PanelOld } from './PanelOld';
2
- export * from './PanelOld';
3
- export default PanelOld;
@@ -1,9 +0,0 @@
1
- import { P as PanelOld } from "../../PanelOld.js";
2
- import { c, a, b } from "../../PanelOld.js";
3
- export {
4
- c as PanelOldLayout,
5
- a as PanelOldStatus,
6
- b as PanelOldVariant,
7
- PanelOld as default
8
- };
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}