@helsenorge/designsystem-react 4.2.4 → 4.3.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 (39) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/Panel.js +1 -1
  3. package/Panel.js.map +1 -1
  4. package/components/Checkbox/styles.module.scss +13 -0
  5. package/components/DictionaryTrigger/DictionaryTrigger.d.ts +22 -0
  6. package/components/DictionaryTrigger/DictionaryTrigger.d.ts.map +1 -0
  7. package/components/DictionaryTrigger/componentdata.json +1 -0
  8. package/components/DictionaryTrigger/index.d.ts +4 -0
  9. package/components/DictionaryTrigger/index.d.ts.map +1 -0
  10. package/components/DictionaryTrigger/index.js +2 -0
  11. package/components/DictionaryTrigger/index.js.map +1 -0
  12. package/components/DictionaryTrigger/styles.module.scss +41 -0
  13. package/components/DictionaryTrigger/styles.module.scss.d.ts +9 -0
  14. package/components/Label/componentdata.json +1 -1
  15. package/components/Panel/Panel.d.ts +3 -1
  16. package/components/Panel/Panel.d.ts.map +1 -1
  17. package/components/Panel/componentdata.json +1 -1
  18. package/components/Panel/styles.module.scss +1 -0
  19. package/components/RadioButton/styles.module.scss +13 -0
  20. package/components/Tag/styles.module.scss +0 -15
  21. package/components/Trigger/HelpSign.d.ts +5 -0
  22. package/components/Trigger/HelpSign.d.ts.map +1 -0
  23. package/components/Trigger/InfoSignStroke.d.ts +5 -0
  24. package/components/Trigger/InfoSignStroke.d.ts.map +1 -0
  25. package/components/Trigger/Trigger.d.ts +41 -0
  26. package/components/Trigger/Trigger.d.ts.map +1 -0
  27. package/components/Trigger/componentdata.json +1 -0
  28. package/components/Trigger/index.d.ts +4 -0
  29. package/components/Trigger/index.d.ts.map +1 -0
  30. package/components/Trigger/index.js +2 -0
  31. package/components/Trigger/index.js.map +1 -0
  32. package/components/Trigger/styles.module.scss +85 -0
  33. package/components/Trigger/styles.module.scss.d.ts +14 -0
  34. package/constants.d.ts +2 -0
  35. package/constants.d.ts.map +1 -1
  36. package/constants.js +1 -1
  37. package/constants.js.map +1 -1
  38. package/package.json +1 -1
  39. package/scss/_palette.scss +15 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ ## [4.3.0](https://github.com/helsenorge/designsystem/branchCompare?baseVersion=GTv4.2.4&targetVersion=GTv4.3.0) (2023-08-23)
2
+
3
+ ### Features
4
+
5
+ - trigger-komponent ([5c0ded6](https://github.com/helsenorge/designsystem/commit/5c0ded6f8d71bddb780160d2f3124fd89686730e))
6
+ - trigger/hjelpetrigger/infotrigger ([7c66b8b](https://github.com/helsenorge/designsystem/commit/7c66b8b03569cc596e1263b9d1da048654d45d50)),
7
+ closes [#301136](https://github.com/helsenorge/designsystem/issues/301136)
8
+
9
+ ### Bug Fixes
10
+
11
+ - lagt til focusable feature i panel
12
+ ([050d90f](https://github.com/helsenorge/designsystem/commit/050d90f0796718b58dd0e3965721c0df38a684c5)), closes
13
+ [#305821](https://github.com/helsenorge/designsystem/issues/305821)
14
+
15
+ ## [4.2.4](https://github.com/helsenorge/designsystem/branchCompare?baseVersion=GTv4.2.3&targetVersion=GTv4.2.4) (2023-08-03)
16
+
17
+ ### Bug Fixes
18
+
19
+ - table med block-visning inne i table med block-visning har synlige kolonneoverskrifter
20
+ ([7efd8c2](https://github.com/helsenorge/designsystem/commit/7efd8c2d409ac017d3834e812b6cd4b33e523430)), closes
21
+ [#301989](https://github.com/helsenorge/designsystem/issues/301989)
22
+
1
23
  ## [4.2.3](https://github.com/helsenorge/designsystem/branchCompare?baseVersion=GTv4.2.2&targetVersion=GTv4.2.3) (2023-08-03)
2
24
 
3
25
  ### Bug Fixes
package/Panel.js CHANGED
@@ -1,2 +1,2 @@
1
- import t from"react";import o from"classnames";import{AnalyticsId as re,IconSize as w}from"./constants.js";import{useExpand as se}from"./hooks/useExpand.js";import{useUuid as $}from"./hooks/useUuid.js";import{palette as z}from"./theme/palette.js";import{getAriaLabelAttributes as ie}from"./utils/accessibility.js";import{B as ce}from"./Badge.js";import{B as j}from"./Button.js";import{Icon as _}from"./components/Icons/Icon.js";import pe from"./components/Icons/AlertSignFill.js";import me from"./components/Icons/ArrowRight.js";import de from"./components/Icons/Calendar.js";import ue from"./components/Icons/ChevronDown.js";import _e from"./components/Icons/ChevronUp.js";import ye from"./components/Icons/Pencil.js";import fe from"./components/Icons/Watch.js";import{T as be}from"./Title.js";import e from"./components/Panel/styles.module.scss";var Ee=(a=>(a.normal="normal",a.new="new",a.error="error",a.draft="draft",a))(Ee||{}),ge=(a=>(a.fill="fill",a.white="white",a.stroke="stroke",a.line="line",a))(ge||{}),ve=(a=>(a.layout1="layout1",a.layout2="layout2",a.layout3a="layout3a",a.layout3b="layout3b",a.layout3c="layout3c",a))(ve||{});const he=({status:a,statusMessage:r})=>{const E=()=>a==="error"?{color:z.cherry500,svgIcon:pe}:{color:z.black,svgIcon:ye},s=o(e["status-message"],{[e["status-message--new"]]:a==="new"});return(a==="error"||a==="draft")&&r?t.createElement("div",{className:s,"data-testid":"display-status"},t.createElement(_,{...E(),size:w.XSmall})," ",t.createElement("span",null,r)):null},Ce=({date:a,time:r})=>a||r?t.createElement("div",{className:e["datetime-container"],"data-testid":"datetime"},a&&t.createElement("div",{className:e["datetime-container__icon"]},t.createElement(_,{svgIcon:de,size:w.XSmall}),t.createElement("span",null,a)),r&&t.createElement("div",{className:e["datetime-container__icon"]},t.createElement(_,{svgIcon:fe,size:w.XSmall}),t.createElement("span",null,r))):null,Ie=t.forwardRef(function(r,E){const{children:s,contentA:N,contentB:l,prioritiseMetaDataInContentB:d,className:W,testId:X,title:g,titleHtmlMarkup:F="h2",url:y,target:H="_self",icon:i,iconRight:B=!1,variant:c="fill",status:p="normal",statusMessage:v,buttonText:k="Se detaljer",buttonTextClose:U="Skjul detaljer",buttonAriaLabelledById:x,buttonAriaLabel:L,layout:n="layout2",containerAsButton:h=!1,date:A,time:M,noTopBorder:O,buttonOnClick:u,buttonHtmlMarkup:q="a",expanded:G=!1,onExpand:D,renderChildrenWhenClosed:J=!1}=r,[m,K]=se(G,D),C=$(),f=$(),S=v&&p==="new",b=["layout3a".toString(),"layout3b".toString(),"layout3c".toString()].includes(n),Q=o(e["panel-wrapper"],W),Y=o(e.panel,{[e["panel--fill"]]:c==="fill",[e["panel--stroke"]]:c==="stroke",[e["panel--white"]]:c==="white",[e["panel--line"]]:c==="line",[e["panel--no-top-border"]]:c==="line"&&O,[e["panel--selected"]]:m,[e["panel--new"]]:p==="new",[e["panel--draft"]]:p==="draft",[e["panel--error"]]:p==="error",[e["panel--status"]]:p&&p!=="normal",[e["panel--with-icon"]]:i,[e["panel--button"]]:h,[e["panel--clickable"]]:s||y||D||u||h}),Z=o({[e.panel__container]:n==="layout2"&&l,[e["panel__container--layout1"]]:n==="layout1"&&l,[e["panel__container--layout2"]]:n==="layout2"&&l,[e["panel__container--layout3"]]:b&&l,[e["panel__container--grow"]]:i,[e["panel__container--prioritiseMetaDataInContentB"]]:d}),P=o({[e["panel-content-a"]]:n==="layout2",[e["panel-content-a--layout3a"]]:n==="layout3a",[e["panel-content-a--layout3b"]]:n==="layout3b",[e["panel-content-a--layout3c"]]:n==="layout3c",[e["panel-content-a--non-prioritiseMetaDataInContentB"]]:!d}),V=o({[e["panel__content-right--layout1"]]:l&&n==="layout1",[e["panel__content-right--layout2"]]:l&&n==="layout2",[e["panel__content-right--layout3"]]:l&&b,[e["panel__content-right--layout3a"]]:l&&n==="layout3a",[e["panel__content-right--layout3b"]]:l&&n==="layout3b",[e["panel__content-right--layout3c"]]:l&&n==="layout3c",[e["panel__content-right--prioritiseMetaDataInContentB"]]:d}),ee=o(e["panel-content-b"],{[e["panel-content-b--layout1"]]:n==="layout1",[e["panel-content-b--layout2"]]:n==="layout2",[e["panel-content-b--layout3"]]:b,[e["panel-content-b--prioritiseMetaDataInContentB"]]:d}),te=o(e["panel__details-btn"]),ae=o(e["panel-content-a__title"],{[e["panel-content-a__title--badge"]]:S}),ne=()=>{const I=ie({label:L,id:x&&`${f} ${x}`||g&&C&&`${f} ${C}`,prefer:"label"}),R={onClick:u||(()=>K(!m)),className:h?e.panel__expand:void 0,variant:"borderless",ellipsis:!0,...I};return s?t.createElement(j,{testId:"expand","aria-expanded":m,...R},t.createElement("span",{id:f},m?U:k),t.createElement(_,{svgIcon:m?_e:ue})):t.createElement(j,{testId:"url",htmlMarkup:q,href:y,target:H,...R},t.createElement("span",{id:f},k),t.createElement(_,{svgIcon:me}))},le=o(e["panel__btn-container"],{[e["panel__btn-container--layout3"]]:b,[e["panel__btn-container--no-content-b"]]:!l,[e["panel__btn-container--padding-top"]]:N||l}),oe=()=>{if(!s||!J&&!m)return null;const I=o(e["panel-details"],{[e["panel-details--open"]]:m,[e["panel-details--line"]]:c==="line",[e["panel-details--white"]]:c==="white",[e["panel-details--with-icon"]]:i});return t.createElement("div",{className:I,"data-testid":"panel-details"},t.createElement("div",null,s))},T=t.createElement("div",{className:V},l&&t.createElement("div",{className:ee},l),(s||y||A||M||u)&&t.createElement("div",{className:le},t.createElement(Ce,{date:A,time:M}),(s||y||u)&&t.createElement("div",{className:te},ne())));return t.createElement("div",{ref:E,"data-testid":X,className:Q,"data-analyticsid":re.Panel},t.createElement("div",{className:Y},i&&!B&&t.createElement("div",{className:e.panel__icon},i),t.createElement("div",{className:Z},d&&T,t.createElement("div",{className:P},t.createElement(he,{status:p,statusMessage:v}),g&&t.createElement("div",{className:e["panel-content-a__title-container"]},t.createElement(be,{appearance:"title3",htmlMarkup:F,id:C,className:ae},g),S&&t.createElement("div",{className:e.panel__badge},t.createElement(ce,{color:"blueberry",testId:"badge-status"},v))),N),!d&&T),i&&B&&t.createElement("div",{className:e["panel__icon--right"]},i)),oe())}),Le=Ie;export{Le as P,Ee as a,ge as b,ve as c};
1
+ import t from"react";import o from"classnames";import{AnalyticsId as se,IconSize as w}from"./constants.js";import{useExpand as ie}from"./hooks/useExpand.js";import{useUuid as $}from"./hooks/useUuid.js";import{palette as z}from"./theme/palette.js";import{getAriaLabelAttributes as ce}from"./utils/accessibility.js";import{B as pe}from"./Badge.js";import{B as j}from"./Button.js";import{Icon as _}from"./components/Icons/Icon.js";import me from"./components/Icons/AlertSignFill.js";import de from"./components/Icons/ArrowRight.js";import ue from"./components/Icons/Calendar.js";import _e from"./components/Icons/ChevronDown.js";import fe from"./components/Icons/ChevronUp.js";import ye from"./components/Icons/Pencil.js";import be from"./components/Icons/Watch.js";import{T as Ee}from"./Title.js";import e from"./components/Panel/styles.module.scss";var ge=(a=>(a.normal="normal",a.new="new",a.error="error",a.draft="draft",a))(ge||{}),ve=(a=>(a.fill="fill",a.white="white",a.stroke="stroke",a.line="line",a))(ve||{}),he=(a=>(a.layout1="layout1",a.layout2="layout2",a.layout3a="layout3a",a.layout3b="layout3b",a.layout3c="layout3c",a))(he||{});const Ce=({status:a,statusMessage:r})=>{const E=()=>a==="error"?{color:z.cherry500,svgIcon:me}:{color:z.black,svgIcon:ye},s=o(e["status-message"],{[e["status-message--new"]]:a==="new"});return(a==="error"||a==="draft")&&r?t.createElement("div",{className:s,"data-testid":"display-status"},t.createElement(_,{...E(),size:w.XSmall})," ",t.createElement("span",null,r)):null},Ie=({date:a,time:r})=>a||r?t.createElement("div",{className:e["datetime-container"],"data-testid":"datetime"},a&&t.createElement("div",{className:e["datetime-container__icon"]},t.createElement(_,{svgIcon:ue,size:w.XSmall}),t.createElement("span",null,a)),r&&t.createElement("div",{className:e["datetime-container__icon"]},t.createElement(_,{svgIcon:be,size:w.XSmall}),t.createElement("span",null,r))):null,we=t.forwardRef(function(r,E){const{children:s,contentA:N,contentB:l,prioritiseMetaDataInContentB:d,className:W,testId:X,title:g,titleHtmlMarkup:F="h2",url:f,target:H="_self",icon:i,iconRight:B=!1,variant:c="fill",status:p="normal",statusMessage:v,buttonText:x="Se detaljer",buttonTextClose:U="Skjul detaljer",buttonAriaLabelledById:k,buttonAriaLabel:L,layout:n="layout2",containerAsButton:h=!1,date:A,time:M,noTopBorder:O,buttonOnClick:u,buttonHtmlMarkup:q="a",expanded:G=!1,onExpand:D,renderChildrenWhenClosed:J=!1,focusable:K=!1}=r,[m,Q]=ie(G,D),C=$(),y=$(),S=v&&p==="new",b=["layout3a".toString(),"layout3b".toString(),"layout3c".toString()].includes(n),Y=o(e["panel-wrapper"],W),Z=o(e.panel,{[e["panel--fill"]]:c==="fill",[e["panel--stroke"]]:c==="stroke",[e["panel--white"]]:c==="white",[e["panel--line"]]:c==="line",[e["panel--no-top-border"]]:c==="line"&&O,[e["panel--selected"]]:m,[e["panel--new"]]:p==="new",[e["panel--draft"]]:p==="draft",[e["panel--error"]]:p==="error",[e["panel--status"]]:p&&p!=="normal",[e["panel--with-icon"]]:i,[e["panel--button"]]:h,[e["panel--clickable"]]:s||f||D||u||h}),P=o({[e.panel__container]:n==="layout2"&&l,[e["panel__container--layout1"]]:n==="layout1"&&l,[e["panel__container--layout2"]]:n==="layout2"&&l,[e["panel__container--layout3"]]:b&&l,[e["panel__container--grow"]]:i,[e["panel__container--prioritiseMetaDataInContentB"]]:d}),V=o({[e["panel-content-a"]]:n==="layout2",[e["panel-content-a--layout3a"]]:n==="layout3a",[e["panel-content-a--layout3b"]]:n==="layout3b",[e["panel-content-a--layout3c"]]:n==="layout3c",[e["panel-content-a--non-prioritiseMetaDataInContentB"]]:!d}),ee=o({[e["panel__content-right--layout1"]]:l&&n==="layout1",[e["panel__content-right--layout2"]]:l&&n==="layout2",[e["panel__content-right--layout3"]]:l&&b,[e["panel__content-right--layout3a"]]:l&&n==="layout3a",[e["panel__content-right--layout3b"]]:l&&n==="layout3b",[e["panel__content-right--layout3c"]]:l&&n==="layout3c",[e["panel__content-right--prioritiseMetaDataInContentB"]]:d}),te=o(e["panel-content-b"],{[e["panel-content-b--layout1"]]:n==="layout1",[e["panel-content-b--layout2"]]:n==="layout2",[e["panel-content-b--layout3"]]:b,[e["panel-content-b--prioritiseMetaDataInContentB"]]:d}),ae=o(e["panel__details-btn"]),ne=o(e["panel-content-a__title"],{[e["panel-content-a__title--badge"]]:S}),le=()=>{const I=ce({label:L,id:k&&`${y} ${k}`||g&&C&&`${y} ${C}`,prefer:"label"}),R={onClick:u||(()=>Q(!m)),className:h?e.panel__expand:void 0,variant:"borderless",ellipsis:!0,...I};return s?t.createElement(j,{testId:"expand","aria-expanded":m,...R},t.createElement("span",{id:y},m?U:x),t.createElement(_,{svgIcon:m?fe:_e})):t.createElement(j,{testId:"url",htmlMarkup:q,href:f,target:H,...R},t.createElement("span",{id:y},x),t.createElement(_,{svgIcon:de}))},oe=o(e["panel__btn-container"],{[e["panel__btn-container--layout3"]]:b,[e["panel__btn-container--no-content-b"]]:!l,[e["panel__btn-container--padding-top"]]:N||l}),re=()=>{if(!s||!J&&!m)return null;const I=o(e["panel-details"],{[e["panel-details--open"]]:m,[e["panel-details--line"]]:c==="line",[e["panel-details--white"]]:c==="white",[e["panel-details--with-icon"]]:i});return t.createElement("div",{className:I,"data-testid":"panel-details"},t.createElement("div",null,s))},T=t.createElement("div",{className:ee},l&&t.createElement("div",{className:te},l),(s||f||A||M||u)&&t.createElement("div",{className:oe},t.createElement(Ie,{date:A,time:M}),(s||f||u)&&t.createElement("div",{className:ae},le())));return t.createElement("div",{tabIndex:K?-1:void 0,ref:E,"data-testid":X,className:Y,"data-analyticsid":se.Panel},t.createElement("div",{className:Z},i&&!B&&t.createElement("div",{className:e.panel__icon},i),t.createElement("div",{className:P},d&&T,t.createElement("div",{className:V},t.createElement(Ce,{status:p,statusMessage:v}),g&&t.createElement("div",{className:e["panel-content-a__title-container"]},t.createElement(Ee,{appearance:"title3",htmlMarkup:F,id:C,className:ne},g),S&&t.createElement("div",{className:e.panel__badge},t.createElement(pe,{color:"blueberry",testId:"badge-status"},v))),N),!d&&T),i&&B&&t.createElement("div",{className:e["panel__icon--right"]},i)),re())}),Oe=we;export{Oe as P,ge as a,ve as b,he as c};
2
2
  //# sourceMappingURL=Panel.js.map
package/Panel.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.js","sources":["../src/components/Panel/Panel.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 '../Icons';\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 PanelStatus {\n normal = 'normal',\n new = 'new',\n error = 'error',\n draft = 'draft',\n}\n\nexport enum PanelVariant {\n fill = 'fill',\n white = 'white',\n stroke = 'stroke',\n line = 'line',\n}\n\nexport enum PanelLayout {\n layout1 = 'layout1',\n layout2 = 'layout2',\n layout3a = 'layout3a',\n layout3b = 'layout3b',\n layout3c = 'layout3c',\n}\n\nexport interface PanelProps {\n children?: React.ReactNode;\n /** Title of the panel */\n title?: string;\n /** Changes the underlying element of the title. Default: h2*/\n titleHtmlMarkup?: TitleTags;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Displays a status on the left side: defualt normal */\n status?: keyof typeof PanelStatus;\n /** Displayed on top of the panel with a status icon */\n statusMessage?: string;\n /** Changes the visual representation of the panel. */\n variant?: keyof typeof PanelVariant;\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 /** Icon displayed in title */\n icon?: React.ReactNode;\n /** Display icon on right */\n iconRight?: boolean;\n /** Panel section A content */\n contentA?: React.ReactNode | string;\n /** Panel section B content*/\n contentB?: React.ReactNode | string;\n /** A version of panel that prioritises content-B visually and audibly */\n prioritiseMetaDataInContentB?: boolean;\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 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 /** Show close button in bottom of Panel Expand */\n /** @deprecated Has no effect anymore due to accessbility reasons. No close button is shown in expanded content. Will be removed in 2.0.0 */\n showCloseButtonInExpand?: boolean;\n /** Layout (see description) */\n layout?: keyof typeof PanelLayout;\n /** Clicking anywhere on the container will trigger a click on the panel's button */\n containerAsButton?: boolean;\n /** Displays time with icon */\n time?: string;\n /** Displays date with icon */\n date?: string;\n /** Removes top border when variant is \"line\" */\n noTopBorder?: boolean;\n /** Opens or closes the panel */\n expanded?: boolean;\n /** Called when panel is open/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}\n\nconst StatusText: React.FC<{ status?: keyof typeof PanelStatus; statusMessage?: string }> = ({ status, statusMessage }) => {\n const statusIcon = (): { color: string; svgIcon: React.FC<SvgPathProps> } => {\n if (status === PanelStatus.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 === PanelStatus.new,\n });\n\n if ((status === PanelStatus.error || status === PanelStatus.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 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 Panel = React.forwardRef(function PanelForwardedRef(props: PanelProps, ref: React.ForwardedRef<HTMLHeadingElement>) {\n const {\n children,\n contentA,\n contentB,\n prioritiseMetaDataInContentB,\n className,\n testId,\n title,\n titleHtmlMarkup = 'h2',\n url,\n target = '_self',\n icon,\n iconRight = false,\n variant = PanelVariant.fill,\n status = PanelStatus.normal,\n statusMessage,\n buttonText = 'Se detaljer',\n buttonTextClose = 'Skjul detaljer',\n buttonAriaLabelledById,\n buttonAriaLabel,\n layout = PanelLayout.layout2,\n containerAsButton = false,\n date,\n time,\n noTopBorder,\n buttonOnClick,\n buttonHtmlMarkup = 'a',\n expanded = false,\n onExpand,\n renderChildrenWhenClosed = false,\n } = props;\n\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n const titleId = useUuid();\n const buttonTextId = useUuid();\n const hasBadge = statusMessage && status === PanelStatus.new;\n const layout3 = [PanelLayout.layout3a.toString(), PanelLayout.layout3b.toString(), PanelLayout.layout3c.toString()].includes(layout);\n\n const panelWrapperClass = classNames(panelStyles['panel-wrapper'], className);\n\n const panelClasses = classNames(panelStyles.panel, {\n [panelStyles['panel--fill']]: variant === PanelVariant.fill,\n [panelStyles['panel--stroke']]: variant === PanelVariant.stroke,\n [panelStyles['panel--white']]: variant === PanelVariant.white,\n [panelStyles['panel--line']]: variant === PanelVariant.line,\n [panelStyles['panel--no-top-border']]: variant === PanelVariant.line && noTopBorder,\n [panelStyles['panel--selected']]: isExpanded,\n [panelStyles['panel--new']]: status === PanelStatus.new,\n [panelStyles['panel--draft']]: status === PanelStatus.draft,\n [panelStyles['panel--error']]: status === PanelStatus.error,\n [panelStyles['panel--status']]: status && status !== PanelStatus.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 panelContainer = classNames({\n [panelStyles['panel__container']]: layout === PanelLayout.layout2 && contentB,\n [panelStyles['panel__container--layout1']]: layout === PanelLayout.layout1 && contentB,\n [panelStyles['panel__container--layout2']]: layout === PanelLayout.layout2 && contentB,\n [panelStyles['panel__container--layout3']]: layout3 && contentB,\n [panelStyles['panel__container--grow']]: icon,\n [panelStyles['panel__container--prioritiseMetaDataInContentB']]: prioritiseMetaDataInContentB,\n });\n\n const panelContentLeftClass = classNames({\n [panelStyles['panel-content-a']]: layout === PanelLayout.layout2,\n [panelStyles['panel-content-a--layout3a']]: layout === PanelLayout.layout3a,\n [panelStyles['panel-content-a--layout3b']]: layout === PanelLayout.layout3b,\n [panelStyles['panel-content-a--layout3c']]: layout === PanelLayout.layout3c,\n [panelStyles['panel-content-a--non-prioritiseMetaDataInContentB']]: !prioritiseMetaDataInContentB,\n });\n\n const panelContentRightClass = classNames({\n [panelStyles['panel__content-right--layout1']]: contentB && layout === PanelLayout.layout1,\n [panelStyles['panel__content-right--layout2']]: contentB && layout === PanelLayout.layout2,\n [panelStyles['panel__content-right--layout3']]: contentB && layout3,\n [panelStyles['panel__content-right--layout3a']]: contentB && layout === PanelLayout.layout3a,\n [panelStyles['panel__content-right--layout3b']]: contentB && layout === PanelLayout.layout3b,\n [panelStyles['panel__content-right--layout3c']]: contentB && layout === PanelLayout.layout3c,\n [panelStyles['panel__content-right--prioritiseMetaDataInContentB']]: prioritiseMetaDataInContentB,\n });\n\n const panelContentBClass = classNames(panelStyles['panel-content-b'], {\n [panelStyles['panel-content-b--layout1']]: layout === PanelLayout.layout1,\n [panelStyles['panel-content-b--layout2']]: layout === PanelLayout.layout2,\n [panelStyles['panel-content-b--layout3']]: layout3,\n [panelStyles['panel-content-b--prioritiseMetaDataInContentB']]: prioritiseMetaDataInContentB,\n });\n\n const panelActionBtnClass = classNames(panelStyles['panel__details-btn']);\n const titleClasses = classNames(panelStyles['panel-content-a__title'], { [panelStyles['panel-content-a__title--badge']]: hasBadge });\n\n const renderDetailsButton = (): JSX.Element => {\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 btnContainerClass = classNames(panelStyles['panel__btn-container'], {\n [panelStyles['panel__btn-container--layout3']]: layout3,\n [panelStyles['panel__btn-container--no-content-b']]: !contentB,\n [panelStyles['panel__btn-container--padding-top']]: contentA || contentB,\n });\n\n const renderContent = (): JSX.Element | null => {\n if (!children) {\n return null;\n }\n if (!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 === PanelVariant.line,\n [panelStyles['panel-details--white']]: variant === PanelVariant.white,\n [panelStyles['panel-details--with-icon']]: icon,\n });\n\n return (\n <div className={panelDetailsClasses} data-testid=\"panel-details\">\n <div>{children}</div>\n </div>\n );\n };\n\n const contentBElement = (\n <div className={panelContentRightClass}>\n {contentB && <div className={panelContentBClass}>{contentB}</div>}\n {(children || url || date || time || buttonOnClick) && (\n <div className={btnContainerClass}>\n {<DateTime date={date} time={time} />}\n {(children || url || buttonOnClick) && <div className={panelActionBtnClass}>{renderDetailsButton()}</div>}\n </div>\n )}\n </div>\n );\n return (\n <div ref={ref} data-testid={testId} className={panelWrapperClass} data-analyticsid={AnalyticsId.Panel}>\n <div className={panelClasses}>\n {icon && !iconRight && <div className={panelStyles.panel__icon}>{icon}</div>}\n <div className={panelContainer}>\n {prioritiseMetaDataInContentB && contentBElement}\n <div className={panelContentLeftClass}>\n <StatusText status={status} statusMessage={statusMessage} />\n {title && (\n <div className={panelStyles['panel-content-a__title-container']}>\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 {contentA}\n </div>\n {!prioritiseMetaDataInContentB && contentBElement}\n </div>\n {icon && iconRight && <div className={panelStyles['panel__icon--right']}>{icon}</div>}\n </div>\n {renderContent()}\n </div>\n );\n});\n\nexport default Panel;\n"],"names":["PanelStatus","PanelVariant","PanelLayout","StatusText","status","statusMessage","statusIcon","palette","AlertSignFill","Pencil","statusMessageClass","classNames","panelStyles","Icon","IconSize","React","DateTime","date","time","Calendar","Watch","Panel","props","ref","children","contentA","contentB","prioritiseMetaDataInContentB","className","testId","title","titleHtmlMarkup","url","target","icon","iconRight","variant","buttonText","buttonTextClose","buttonAriaLabelledById","buttonAriaLabel","layout","containerAsButton","noTopBorder","buttonOnClick","buttonHtmlMarkup","expanded","onExpand","renderChildrenWhenClosed","isExpanded","setIsExpanded","useExpand","titleId","useUuid","buttonTextId","hasBadge","layout3","panelWrapperClass","panelClasses","panelContainer","panelContentLeftClass","panelContentRightClass","panelContentBClass","panelActionBtnClass","titleClasses","renderDetailsButton","ariaLabelAttributes","getAriaLabelAttributes","commonProps","Button","ChevronUp","ChevronDown","ArrowRight","btnContainerClass","renderContent","panelDetailsClasses","contentBElement","AnalyticsId","Title","Badge","Panel$1"],"mappings":"g1BAuBY,IAAAA,IAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,IAAM,MACNA,EAAA,MAAQ,QACRA,EAAA,MAAQ,QAJEA,IAAAA,IAAA,CAAA,CAAA,EAOAC,IAAAA,IACVA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,KAAO,OAJGA,IAAAA,IAAA,CAAA,CAAA,EAOAC,IAAAA,IACVA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,SAAW,WACXA,EAAA,SAAW,WALDA,IAAAA,IAAA,CAAA,CAAA,EAuEZ,MAAMC,GAAsF,CAAC,CAAE,OAAAC,EAAQ,cAAAC,KAAoB,CACzH,MAAMC,EAAa,IACbF,IAAW,QACN,CAAE,MAAOG,EAAQ,UAAW,QAASC,EAAc,EAGrD,CAAE,MAAOD,EAAQ,MAAO,QAASE,EAAO,EAG3CC,EAAqBC,EAAWC,EAAY,gBAAgB,EAAG,CACnE,CAACA,EAAY,qBAAqB,CAAC,EAAGR,IAAW,KAAA,CAClD,EAED,OAAKA,IAAW,SAAqBA,IAAW,UAAsBC,kBAEjE,MAAI,CAAA,UAAWK,EAAoB,cAAY,gBAAA,kBAC5CG,EAAM,CAAA,GAAGP,IAAc,KAAMQ,EAAS,MAAQ,CAAA,EAAG,IAAEC,EAAA,cAAA,OAAA,KAAMV,CAAc,CAC3E,EAIG,IACT,EAEMW,GAAuD,CAAC,CAAE,KAAAC,EAAM,KAAAC,KAChED,GAAQC,EAERH,EAAA,cAAC,OAAI,U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AsB,CACrG,CAEJ,EAGA,OAAAlD,EAAA,cAAC,OAAI,IAAAQ,EAAU,cAAaM,EAAQ,UAAW4B,EAAmB,mBAAkBoB,GAAY,KAAA,kBAC7F,MAAI,CAAA,UAAWnB,GACbxB,GAAQ,CAACC,GAAcpB,EAAA,cAAA,MAAA,CAAI,UAAWH,EAAY,WAAA,EAAcsB,CAAK,EACtEnB,EAAA,cAAC,OAAI,UAAW4C,CAAA,EACbhC,GAAgCiD,EACjC7D,EAAA,cAAC,OAAI,UAAW6C,CAAA,kBACbzD,GAAW,CAAA,OAAAC,EAAgB,cAAAC,CAA8B,CAAA,EACzDyB,mBACE,MAAI,CAAA,UAAWlB,EAAY,kCAAkC,CAAA,kBAC3DkE,GAAM,CAAA,WAAW,SAAS,WAAY/C,EAAiB,GAAIqB,EAAS,UAAWY,IAC7ElC,CACH,EACCyB,GACExC,EAAA,cAAA,MAAA,CAAI,UAAWH,EAAY,YAAA,kBACzBmE,GAAM,CAAA,MAAM,YAAY,OAAO,cAAA,EAC7B1E,CACH,CACF,CAEJ,EAEDoB,CACH,EACC,CAACE,GAAgCiD,CACpC,EACC1C,GAAQC,mBAAc,MAAI,CAAA,UAAWvB,EAAY,oBAAoB,CAAA,EAAIsB,CAAK,CACjF,EACCwC,GACH,CAAA,CAEJ,CAAC,EAEDM,GAAe3D"}
1
+ {"version":3,"file":"Panel.js","sources":["../src/components/Panel/Panel.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 '../Icons';\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 PanelStatus {\n normal = 'normal',\n new = 'new',\n error = 'error',\n draft = 'draft',\n}\n\nexport enum PanelVariant {\n fill = 'fill',\n white = 'white',\n stroke = 'stroke',\n line = 'line',\n}\n\nexport enum PanelLayout {\n layout1 = 'layout1',\n layout2 = 'layout2',\n layout3a = 'layout3a',\n layout3b = 'layout3b',\n layout3c = 'layout3c',\n}\n\nexport interface PanelProps {\n children?: React.ReactNode;\n /** Title of the panel */\n title?: string;\n /** Changes the underlying element of the title. Default: h2 */\n titleHtmlMarkup?: TitleTags;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Displays a status on the left side: defualt normal */\n status?: keyof typeof PanelStatus;\n /** Displayed on top of the panel with a status icon */\n statusMessage?: string;\n /** Changes the visual representation of the panel. */\n variant?: keyof typeof PanelVariant;\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 /** Icon displayed in title */\n icon?: React.ReactNode;\n /** Display icon on right */\n iconRight?: boolean;\n /** Panel section A content */\n contentA?: React.ReactNode | string;\n /** Panel section B content*/\n contentB?: React.ReactNode | string;\n /** A version of panel that prioritises content-B visually and audibly */\n prioritiseMetaDataInContentB?: boolean;\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 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 /** Show close button in bottom of Panel Expand */\n /** @deprecated Has no effect anymore due to accessbility reasons. No close button is shown in expanded content. Will be removed in 2.0.0 */\n showCloseButtonInExpand?: boolean;\n /** Layout (see description) */\n layout?: keyof typeof PanelLayout;\n /** Clicking anywhere on the container will trigger a click on the panel's button */\n containerAsButton?: boolean;\n /** Displays time with icon */\n time?: string;\n /** Displays date with icon */\n date?: string;\n /** Removes top border when variant is \"line\" */\n noTopBorder?: boolean;\n /** Opens or closes the panel */\n expanded?: boolean;\n /** Called when panel is open/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 /** Whether panel is focusable or not */\n focusable?: boolean;\n}\n\nconst StatusText: React.FC<{ status?: keyof typeof PanelStatus; statusMessage?: string }> = ({ status, statusMessage }) => {\n const statusIcon = (): { color: string; svgIcon: React.FC<SvgPathProps> } => {\n if (status === PanelStatus.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 === PanelStatus.new,\n });\n\n if ((status === PanelStatus.error || status === PanelStatus.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 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 Panel = React.forwardRef(function PanelForwardedRef(props: PanelProps, ref: React.ForwardedRef<HTMLHeadingElement>) {\n const {\n children,\n contentA,\n contentB,\n prioritiseMetaDataInContentB,\n className,\n testId,\n title,\n titleHtmlMarkup = 'h2',\n url,\n target = '_self',\n icon,\n iconRight = false,\n variant = PanelVariant.fill,\n status = PanelStatus.normal,\n statusMessage,\n buttonText = 'Se detaljer',\n buttonTextClose = 'Skjul detaljer',\n buttonAriaLabelledById,\n buttonAriaLabel,\n layout = PanelLayout.layout2,\n containerAsButton = false,\n date,\n time,\n noTopBorder,\n buttonOnClick,\n buttonHtmlMarkup = 'a',\n expanded = false,\n onExpand,\n renderChildrenWhenClosed = false,\n focusable = false,\n } = props;\n\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n const titleId = useUuid();\n const buttonTextId = useUuid();\n const hasBadge = statusMessage && status === PanelStatus.new;\n const layout3 = [PanelLayout.layout3a.toString(), PanelLayout.layout3b.toString(), PanelLayout.layout3c.toString()].includes(layout);\n\n const panelWrapperClass = classNames(panelStyles['panel-wrapper'], className);\n\n const panelClasses = classNames(panelStyles.panel, {\n [panelStyles['panel--fill']]: variant === PanelVariant.fill,\n [panelStyles['panel--stroke']]: variant === PanelVariant.stroke,\n [panelStyles['panel--white']]: variant === PanelVariant.white,\n [panelStyles['panel--line']]: variant === PanelVariant.line,\n [panelStyles['panel--no-top-border']]: variant === PanelVariant.line && noTopBorder,\n [panelStyles['panel--selected']]: isExpanded,\n [panelStyles['panel--new']]: status === PanelStatus.new,\n [panelStyles['panel--draft']]: status === PanelStatus.draft,\n [panelStyles['panel--error']]: status === PanelStatus.error,\n [panelStyles['panel--status']]: status && status !== PanelStatus.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 panelContainer = classNames({\n [panelStyles['panel__container']]: layout === PanelLayout.layout2 && contentB,\n [panelStyles['panel__container--layout1']]: layout === PanelLayout.layout1 && contentB,\n [panelStyles['panel__container--layout2']]: layout === PanelLayout.layout2 && contentB,\n [panelStyles['panel__container--layout3']]: layout3 && contentB,\n [panelStyles['panel__container--grow']]: icon,\n [panelStyles['panel__container--prioritiseMetaDataInContentB']]: prioritiseMetaDataInContentB,\n });\n\n const panelContentLeftClass = classNames({\n [panelStyles['panel-content-a']]: layout === PanelLayout.layout2,\n [panelStyles['panel-content-a--layout3a']]: layout === PanelLayout.layout3a,\n [panelStyles['panel-content-a--layout3b']]: layout === PanelLayout.layout3b,\n [panelStyles['panel-content-a--layout3c']]: layout === PanelLayout.layout3c,\n [panelStyles['panel-content-a--non-prioritiseMetaDataInContentB']]: !prioritiseMetaDataInContentB,\n });\n\n const panelContentRightClass = classNames({\n [panelStyles['panel__content-right--layout1']]: contentB && layout === PanelLayout.layout1,\n [panelStyles['panel__content-right--layout2']]: contentB && layout === PanelLayout.layout2,\n [panelStyles['panel__content-right--layout3']]: contentB && layout3,\n [panelStyles['panel__content-right--layout3a']]: contentB && layout === PanelLayout.layout3a,\n [panelStyles['panel__content-right--layout3b']]: contentB && layout === PanelLayout.layout3b,\n [panelStyles['panel__content-right--layout3c']]: contentB && layout === PanelLayout.layout3c,\n [panelStyles['panel__content-right--prioritiseMetaDataInContentB']]: prioritiseMetaDataInContentB,\n });\n\n const panelContentBClass = classNames(panelStyles['panel-content-b'], {\n [panelStyles['panel-content-b--layout1']]: layout === PanelLayout.layout1,\n [panelStyles['panel-content-b--layout2']]: layout === PanelLayout.layout2,\n [panelStyles['panel-content-b--layout3']]: layout3,\n [panelStyles['panel-content-b--prioritiseMetaDataInContentB']]: prioritiseMetaDataInContentB,\n });\n\n const panelActionBtnClass = classNames(panelStyles['panel__details-btn']);\n const titleClasses = classNames(panelStyles['panel-content-a__title'], { [panelStyles['panel-content-a__title--badge']]: hasBadge });\n\n const renderDetailsButton = (): JSX.Element => {\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 btnContainerClass = classNames(panelStyles['panel__btn-container'], {\n [panelStyles['panel__btn-container--layout3']]: layout3,\n [panelStyles['panel__btn-container--no-content-b']]: !contentB,\n [panelStyles['panel__btn-container--padding-top']]: contentA || contentB,\n });\n\n const renderContent = (): JSX.Element | null => {\n if (!children) {\n return null;\n }\n if (!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 === PanelVariant.line,\n [panelStyles['panel-details--white']]: variant === PanelVariant.white,\n [panelStyles['panel-details--with-icon']]: icon,\n });\n\n return (\n <div className={panelDetailsClasses} data-testid=\"panel-details\">\n <div>{children}</div>\n </div>\n );\n };\n\n const contentBElement = (\n <div className={panelContentRightClass}>\n {contentB && <div className={panelContentBClass}>{contentB}</div>}\n {(children || url || date || time || buttonOnClick) && (\n <div className={btnContainerClass}>\n {<DateTime date={date} time={time} />}\n {(children || url || buttonOnClick) && <div className={panelActionBtnClass}>{renderDetailsButton()}</div>}\n </div>\n )}\n </div>\n );\n\n return (\n <div\n // eslint-disable-next-line no-constant-condition\n tabIndex={focusable ? -1 : undefined}\n ref={ref}\n data-testid={testId}\n className={panelWrapperClass}\n data-analyticsid={AnalyticsId.Panel}\n >\n <div className={panelClasses}>\n {icon && !iconRight && <div className={panelStyles.panel__icon}>{icon}</div>}\n <div className={panelContainer}>\n {prioritiseMetaDataInContentB && contentBElement}\n <div className={panelContentLeftClass}>\n <StatusText status={status} statusMessage={statusMessage} />\n {title && (\n <div className={panelStyles['panel-content-a__title-container']}>\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 {contentA}\n </div>\n {!prioritiseMetaDataInContentB && contentBElement}\n </div>\n {icon && iconRight && <div className={panelStyles['panel__icon--right']}>{icon}</div>}\n </div>\n {renderContent()}\n </div>\n );\n});\n\nexport default Panel;\n"],"names":["PanelStatus","PanelVariant","PanelLayout","StatusText","status","statusMessage","statusIcon","palette","AlertSignFill","Pencil","statusMessageClass","classNames","panelStyles","Icon","IconSize","React","DateTime","date","time","Calendar","Watch","Panel","props","ref","children","contentA","contentB","prioritiseMetaDataInContentB","className","testId","title","titleHtmlMarkup","url","target","icon","iconRight","variant","buttonText","buttonTextClose","buttonAriaLabelledById","buttonAriaLabel","layout","containerAsButton","noTopBorder","buttonOnClick","buttonHtmlMarkup","expanded","onExpand","renderChildrenWhenClosed","focusable","isExpanded","setIsExpanded","useExpand","titleId","useUuid","buttonTextId","hasBadge","layout3","panelWrapperClass","panelClasses","panelContainer","panelContentLeftClass","panelContentRightClass","panelContentBClass","panelActionBtnClass","titleClasses","renderDetailsButton","ariaLabelAttributes","getAriaLabelAttributes","commonProps","Button","ChevronUp","ChevronDown","ArrowRight","btnContainerClass","renderContent","panelDetailsClasses","contentBElement","AnalyticsId","Title","Badge","Pan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AAI,CAAA,UAAWH,EAAY,WAAc,EAAAsB,CAAK,EACtEnB,EAAA,cAAC,OAAI,UAAW6C,CAAA,EACbjC,GAAgCkD,kBAChC,MAAI,CAAA,UAAWhB,GACd9C,EAAA,cAACZ,IAAW,OAAAC,EAAgB,cAAAC,EAA8B,EACzDyB,mBACE,MAAI,CAAA,UAAWlB,EAAY,kCAAkC,mBAC3DmE,GAAM,CAAA,WAAW,SAAS,WAAYhD,EAAiB,GAAIsB,EAAS,UAAWY,EAAA,EAC7EnC,CACH,EACC0B,GACEzC,EAAA,cAAA,MAAA,CAAI,UAAWH,EAAY,YAAA,kBACzBoE,GAAM,CAAA,MAAM,YAAY,OAAO,gBAC7B3E,CACH,CACF,CAEJ,EAEDoB,CACH,EACC,CAACE,GAAgCkD,CACpC,EACC3C,GAAQC,mBAAc,MAAI,CAAA,UAAWvB,EAAY,oBAAoB,GAAIsB,CAAK,CACjF,EACCyC,GAAc,CAAA,CAGrB,CAAC,EAEDM,GAAe5D"}
@@ -208,6 +208,13 @@ $checkbox-icon-size: 1.625rem;
208
208
  min-width: $checkbox-icon-size;
209
209
  box-shadow: 0 0 0 getSpacer(4xs);
210
210
 
211
+ // Vi overstyrer farger satt ved high-contrast mode i nettleser/os
212
+ @media (forced-colors: active) {
213
+ forced-color-adjust: none;
214
+ background-color: #000 !important;
215
+ color: #fff !important;
216
+ }
217
+
211
218
  :hover > & {
212
219
  box-shadow: 0 0 0 getSpacer(3xs);
213
220
  }
@@ -325,6 +332,12 @@ $checkbox-icon-size: 1.625rem;
325
332
  position: relative;
326
333
  top: 0.1rem;
327
334
  right: 0.05rem;
335
+
336
+ // Vi overstyrer farger satt ved high-contrast mode i nettleser/os
337
+ @media (forced-colors: active) {
338
+ forced-color-adjust: none;
339
+ fill: #fff;
340
+ }
328
341
  }
329
342
 
330
343
  &:focus {
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ interface DictionaryTriggerProps extends Pick<React.InputHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onFocus' | 'onBlur'> {
3
+ /**
4
+ * Sets the content of the trigger.
5
+ */
6
+ children: React.ReactNode;
7
+ /**
8
+ * Indicates that the trigger is in use.
9
+ */
10
+ selected?: boolean;
11
+ /**
12
+ * Classname will be applied to the button element.
13
+ */
14
+ className?: string;
15
+ /**
16
+ * Sets the data-testid attribute.
17
+ */
18
+ testId?: string;
19
+ }
20
+ declare const DictionaryTrigger: React.ForwardRefExoticComponent<DictionaryTriggerProps & React.RefAttributes<HTMLButtonElement>>;
21
+ export default DictionaryTrigger;
22
+ //# sourceMappingURL=DictionaryTrigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DictionaryTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryTrigger/DictionaryTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,UAAU,sBAAuB,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC3H;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,iBAAiB,kGAkBtB,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ {"props":{"children":{"defaultValue":null,"description":"Sets the content of the trigger.","name":"children","parent":{"fileName":"src/components/DictionaryTrigger/DictionaryTrigger.tsx","name":"DictionaryTriggerProps"},"declarations":[{"fileName":"src/components/DictionaryTrigger/DictionaryTrigger.tsx","name":"DictionaryTriggerProps"}],"required":true,"type":{"name":"ReactNode"}},"selected":{"defaultValue":{"value":"false"},"description":"Indicates that the trigger is in use.","name":"selected","parent":{"fileName":"src/components/DictionaryTrigger/DictionaryTrigger.tsx","name":"DictionaryTriggerProps"},"declarations":[{"fileName":"src/components/DictionaryTrigger/DictionaryTrigger.tsx","name":"DictionaryTriggerProps"}],"required":false,"type":{"name":"boolean"}},"className":{"defaultValue":null,"description":"Classname will be applied to the button element.","name":"className","parent":{"fileName":"src/components/DictionaryTrigger/DictionaryTrigger.tsx","name":"DictionaryTriggerProps"},"declarations":[{"fileName":"src/components/DictionaryTrigger/DictionaryTrigger.tsx","name":"DictionaryTriggerProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/DictionaryTrigger/DictionaryTrigger.tsx","name":"DictionaryTriggerProps"},"declarations":[{"fileName":"src/components/DictionaryTrigger/DictionaryTrigger.tsx","name":"DictionaryTriggerProps"}],"required":false,"type":{"name":"string"}},"onClick":{"defaultValue":null,"description":"","name":"onClick","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"DOMAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"DOMAttributes"}],"required":false,"type":{"name":"MouseEventHandler<HTMLButtonElement>"}},"onFocus":{"defaultValue":null,"description":"","name":"onFocus","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"DOMAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"DOMAttributes"}],"required":false,"type":{"name":"FocusEventHandler<HTMLButtonElement>"}},"onBlur":{"defaultValue":null,"description":"","name":"onBlur","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"DOMAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"DOMAttributes"}],"required":false,"type":{"name":"FocusEventHandler<HTMLButtonElement>"}}}}
@@ -0,0 +1,4 @@
1
+ import DictionaryTrigger from './DictionaryTrigger';
2
+ export * from './DictionaryTrigger';
3
+ export default DictionaryTrigger;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryTrigger/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import r from"react";import g from"classnames";import{AnalyticsId as m}from"../../constants.js";import d from"./styles.module.scss";const t=r.forwardRef(({children:a,selected:i=!1,className:e,testId:o,...s},n)=>{const c=g(d.dictionarytrigger,e);return r.createElement("button",{type:"button","data-testid":o,"data-analyticsid":m.DictionaryTrigger,className:c,"aria-expanded":i,ref:n,...s},a)});t.displayName="DictionaryTrigger";const u=t;export{u as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/DictionaryTrigger/DictionaryTrigger.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\ninterface DictionaryTriggerProps extends Pick<React.InputHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onFocus' | 'onBlur'> {\n /**\n * Sets the content of the trigger.\n */\n children: React.ReactNode;\n /**\n * Indicates that the trigger is in use.\n */\n selected?: boolean;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /**\n * Sets the data-testid attribute.\n */\n testId?: string;\n}\n\nconst DictionaryTrigger = React.forwardRef<HTMLButtonElement, DictionaryTriggerProps>(\n ({ children, selected = false, className, testId, ...rest }, ref) => {\n const triggerClasses = classNames(styles.dictionarytrigger, className);\n\n return (\n <button\n type=\"button\"\n data-testid={testId}\n data-analyticsid={AnalyticsId.DictionaryTrigger}\n className={triggerClasses}\n aria-expanded={selected}\n ref={ref}\n {...rest}\n >\n {children}\n </button>\n );\n }\n);\n\nDictionaryTrigger.displayName = 'DictionaryTrigger';\n\nexport default DictionaryTrigger;\n"],"names":["DictionaryTrigger","React","children","selected","className","testId","rest","ref","triggerClasses","classNames","styles","AnalyticsId","DictionaryTrigger$1"],"mappings":"oIA2BA,MAAMA,EAAoBC,EAAM,WAC9B,CAAC,CAAE,SAAAC,EAAU,SAAAC,EAAW,GAAO,UAAAC,EAAW,OAAAC,EAAQ,GAAGC,CAAK,EAAGC,IAAQ,CACnE,MAAMC,EAAiBC,EAAWC,EAAO,kBAAmBN,CAAS,EAGnE,OAAAH,EAAA,cAAC,SAAA,CACC,KAAK,SACL,cAAaI,EACb,mBAAkBM,EAAY,kBAC9B,UAAWH,EACX,gBAAeL,EACf,IAAAI,EACC,GAAGD,CAAA,EAEHJ,CAAA,CAGP,CACF,EAEAF,EAAkB,YAAc,oBAEhC,MAAAY,EAAeZ"}
@@ -0,0 +1,41 @@
1
+ @import '../../scss/palette';
2
+
3
+ .dictionarytrigger {
4
+ all: unset;
5
+ cursor: help;
6
+ line-height: initial;
7
+ padding-bottom: 6px;
8
+ margin-bottom: -6px;
9
+ background-color: transparent;
10
+
11
+ // The background svg consists of a circle with empty space to the right, making up a dotted pattern when repeated horizontally
12
+ background-image: url("data:image/svg+xml,<svg width='8' height='3' viewBox='0 0 8 3' xmlns='http://www.w3.org/2000/svg'><circle cx='1.5' cy='1.5' r='1.5' fill='%236A2ABF' /></svg>");
13
+ background-position: bottom left;
14
+ background-repeat: repeat-x;
15
+
16
+ &:hover {
17
+ background-color: rgba-to-rgb(rgba($plum600, 0.1), $white);
18
+ background-image: url("data:image/svg+xml,<svg width='8' height='3' viewBox='0 0 8 3' xmlns='http://www.w3.org/2000/svg'><circle cx='1.5' cy='1.5' r='1.5' fill='%236A2ABF' /></svg>");
19
+ }
20
+
21
+ &:focus-visible {
22
+ padding-bottom: 3px;
23
+ margin-bottom: -3px;
24
+ outline: 2px solid $black;
25
+ background-image: none;
26
+ }
27
+
28
+ &[aria-expanded='true'] {
29
+ background-color: rgba-to-rgb(rgba($plum600, 0.1), $white);
30
+ background-image: url("data:image/svg+xml,<svg width='8' height='3' viewBox='0 0 8 3' xmlns='http://www.w3.org/2000/svg'><circle cx='1.5' cy='1.5' r='1.5' fill='%236A2ABF' /></svg>");
31
+
32
+ &:hover,
33
+ &:focus-visible {
34
+ background-color: rgba-to-rgb(rgba($plum600, 0.2), $white);
35
+ }
36
+
37
+ &:focus-visible {
38
+ background-image: none;
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,9 @@
1
+ export type Styles = {
2
+ dictionarytrigger: string;
3
+ };
4
+
5
+ export type ClassNames = keyof Styles;
6
+
7
+ declare const styles: Styles;
8
+
9
+ export default styles;
@@ -1 +1 @@
1
- {"props":{"toString":{"defaultValue":{},"description":"Returns a string representation of a string.\nReturns a string representation of an object.\n@param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.","name":"toString","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Object"}],"required":false,"type":{"name":"(() => string) | ((radix?: number) => string) | (() => string)"}},"charAt":{"defaultValue":null,"description":"Returns the character at the specified index.\n@param pos The zero-based index of the desired character.","name":"charAt","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(pos: number) => string"}},"charCodeAt":{"defaultValue":null,"description":"Returns the Unicode value of the character at the specified location.\n@param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.","name":"charCodeAt","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(index: number) => number"}},"concat":{"defaultValue":null,"description":"Returns a string that contains the concatenation of two or more strings.\n@param strings The strings to append to the end of the string.","name":"concat","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(...strings: string[]) => string"}},"indexOf":{"defaultValue":null,"description":"Returns the position of the first occurrence of a substring.\n@param searchString The substring to search for in the string\n@param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.","name":"indexOf","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(searchString: string, position?: number | undefined) => number"}},"lastIndexOf":{"defaultValue":null,"description":"Returns the last occurrence of a substring in the string.\n@param searchString The substring to search for.\n@param position The index at which to begin searching. If omitted, the search begins at the end of the string.","name":"lastIndexOf","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(searchString: string, position?: number | undefined) => number"}},"localeCompare":{"defaultValue":null,"description":"Determines whether two strings are equivalent in the current locale.\nDetermines whether two strings are equivalent in the current or specified locale.\n@param that String to compare to target string\n@param that String to compare to target string\n@param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.\n@param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.","name":"localeCompare","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"{ (that: string): number; (that: string, locales?: string | string[] | undefined, options?: CollatorOptions | undefined): number; }"}},"match":{"defaultValue":null,"description":"Matches a string with a regular expression, and returns an array containing the results of that search.\nMatches a string or an object that supports being matched against, and returns an array\ncontaining the results of that search, or null if no matches are found.\n@param regexp A variable name or string literal containing the regular expression pattern and flags.\n@param matcher An object that supports being matched against.","name":"match","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","name":"String"}],"required":true,"type":{"name":"{ (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; }"}},"replace":{"defaultValue":null,"description":"Replaces text in a string, using a regular expression or search string.\nPasses a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm.\nReplaces text in a string, using an object that supports replacement within a string.\n@param searchValue A string or regular expression to search for.\n@param replaceValue A string containing the text to replace. When the {@linkcode searchValue } is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue } is replaced.\n@param searchValue A string to search for.\n@param replacer A function that returns the replacement text.\n@param searchValue An object that supports searching for and replacing matches within a string.\n@param replaceValue The replacement text.\n@param searchValue A object can search for and replace matches within a string.\n@param replacer A function that returns the replacement text.","name":"replace","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","name":"String"}],"required":true,"type":{"name":"{ (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { ...; }, replaceValue: string): string; (searchValue: { ...; }, replacer: (substring: string, ...args: any[]) => string): string; }"}},"search":{"defaultValue":null,"description":"Finds the first substring match in a regular expression search.\n@param regexp The regular expression pattern and applicable flags.\n@param searcher An object which supports searching within a string.","name":"search","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","name":"String"}],"required":true,"type":{"name":"{ (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }"}},"slice":{"defaultValue":null,"description":"Returns a section of a string.\n@param start The index to the beginning of the specified portion of stringObj.\n@param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.\nIf this value is not specified, the substring continues to the end of stringObj.","name":"slice","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(start?: number | undefined, end?: number | undefined) => string"}},"split":{"defaultValue":null,"description":"Split a string into substrings using the specified separator and return them as an array.\n@param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.\n@param limit A value used to limit the number of elements returned in the array.\n@param splitter An object that can split a string.\n@param limit A value used to limit the number of elements returned in the array.","name":"split","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","name":"String"}],"required":true,"type":{"name":"{ (separator: string | RegExp, limit?: number | undefined): string[]; (splitter: { [Symbol.split](string: string, limit?: number | undefined): string[]; }, limit?: number | undefined): string[]; }"}},"substring":{"defaultValue":null,"description":"Returns the substring at the specified location within a String object.\n@param start The zero-based index number indicating the beginning of the substring.\n@param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\nIf end is omitted, the characters from start through the end of the original string are returned.","name":"substring","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(start: number, end?: number | undefined) => string"}},"toLowerCase":{"defaultValue":null,"description":"Converts all the alphabetic characters in a string to lowercase.","name":"toLowerCase","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"toLocaleLowerCase":{"defaultValue":null,"description":"Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.","name":"toLocaleLowerCase","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(locales?: string | string[] | undefined) => string"}},"toUpperCase":{"defaultValue":null,"description":"Converts all the alphabetic characters in a string to uppercase.","name":"toUpperCase","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"toLocaleUpperCase":{"defaultValue":null,"description":"Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.","name":"toLocaleUpperCase","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(locales?: string | string[] | undefined) => string"}},"trim":{"defaultValue":null,"description":"Removes the leading and trailing white space and line terminator characters from a string.","name":"trim","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"length":{"defaultValue":null,"description":"Returns the length of a String object.","name":"length","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"number"}},"substr":{"defaultValue":null,"description":"Gets a substring beginning at the specified location and having the specified length.\n@deprecated A legacy feature for browser compatibility\n@param from The starting position of the desired substring. The index of the first character in the string is zero.\n@param length The number of characters to include in the returned substring.","name":"substr","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(from: number, length?: number | undefined) => string"}},"valueOf":{"defaultValue":{},"description":"Returns the primitive value of the specified object.","name":"valueOf","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Boolean"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Object"}],"required":false,"type":{"name":"(() => string) | (() => number) | (() => boolean) | (() => Object)"}},"codePointAt":{"defaultValue":null,"description":"Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point\nvalue of the UTF-16 encoded code point starting at the string element at position pos in\nthe String resulting from converting this object to a String.\nIf there is no element at that position, the result is undefined.\nIf a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.","name":"codePointAt","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(pos: number) => number | undefined"}},"includes":{"defaultValue":null,"description":"Returns true if searchString appears as a substring of the result of converting this\nobject to a String, at one or more positions that are\ngreater than or equal to position; otherwise, returns false.\n@param searchString search string\n@param position If position is undefined, 0 is assumed, so as to search all of the String.","name":"includes","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(searchString: string, position?: number | undefined) => boolean"}},"endsWith":{"defaultValue":null,"description":"Returns true if the sequence of elements of searchString converted to a String is the\nsame as the corresponding elements of this object (converted to a String) starting at\nendPosition – length(this). Otherwise returns false.","name":"endsWith","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(searchString: string, endPosition?: number | undefined) => boolean"}},"normalize":{"defaultValue":null,"description":"Returns the String value result of normalizing the string into the normalization form\nnamed by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.\n@param form Applicable values: \"NFC\", \"NFD\", \"NFKC\", or \"NFKD\", If not specified default\nis \"NFC\"\n@param form Applicable values: \"NFC\", \"NFD\", \"NFKC\", or \"NFKD\", If not specified default\nis \"NFC\"","name":"normalize","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"{ (form: \"NFC\" | \"NFD\" | \"NFKC\" | \"NFKD\"): string; (form?: string | undefined): string; }"}},"repeat":{"defaultValue":null,"description":"Returns a String value that is made from count copies appended together. If count is 0,\nthe empty string is returned.\n@param count number of copies to append","name":"repeat","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(count: number) => string"}},"startsWith":{"defaultValue":null,"description":"Returns true if the sequence of elements of searchString converted to a String is the\nsame as the corresponding elements of this object (converted to a String) starting at\nposition. Otherwise returns false.","name":"startsWith","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(searchString: string, position?: number | undefined) => boolean"}},"anchor":{"defaultValue":null,"description":"Returns an `<a>` HTML anchor element and sets the name attribute to the text value\n@deprecated A legacy feature for browser compatibility\n@param name","name":"anchor","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(name: string) => string"}},"big":{"defaultValue":null,"description":"Returns a `<big>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"big","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"blink":{"defaultValue":null,"description":"Returns a `<blink>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"blink","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"bold":{"defaultValue":null,"description":"Returns a `<b>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"bold","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"fixed":{"defaultValue":null,"description":"Returns a `<tt>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"fixed","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"fontcolor":{"defaultValue":null,"description":"Returns a `<font>` HTML element and sets the color attribute value\n@deprecated A legacy feature for browser compatibility","name":"fontcolor","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(color: string) => string"}},"fontsize":{"defaultValue":null,"description":"Returns a `<font>` HTML element and sets the size attribute value\n@deprecated A legacy feature for browser compatibility\n@deprecated A legacy feature for browser compatibility","name":"fontsize","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"{ (size: number): string; (size: string): string; }"}},"italics":{"defaultValue":null,"description":"Returns an `<i>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"italics","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"link":{"defaultValue":null,"description":"Returns an `<a>` HTML element and sets the href attribute value\n@deprecated A legacy feature for browser compatibility","name":"link","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(url: string) => string"}},"small":{"defaultValue":null,"description":"Returns a `<small>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"small","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"strike":{"defaultValue":null,"description":"Returns a `<strike>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"strike","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"sub":{"defaultValue":null,"description":"Returns a `<sub>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"sub","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"sup":{"defaultValue":null,"description":"Returns a `<sup>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"sup","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"padStart":{"defaultValue":null,"description":"Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.\nThe padding is applied from the start (left) of the current string.\n@param maxLength The length of the resulting string once the current string has been padded.\nIf this parameter is smaller than the current string's length, the current string will be returned as it is.\n@param fillString The string to pad the current string with.\nIf this string is too long, it will be truncated and the left-most part will be applied.\nThe default value for this parameter is \" \" (U+0020).","name":"padStart","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2017.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2017.string.d.ts","name":"String"}],"required":true,"type":{"name":"(maxLength: number, fillString?: string | undefined) => string"}},"padEnd":{"defaultValue":null,"description":"Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.\nThe padding is applied from the end (right) of the current string.\n@param maxLength The length of the resulting string once the current string has been padded.\nIf this parameter is smaller than the current string's length, the current string will be returned as it is.\n@param fillString The string to pad the current string with.\nIf this string is too long, it will be truncated and the left-most part will be applied.\nThe default value for this parameter is \" \" (U+0020).","name":"padEnd","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2017.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2017.string.d.ts","name":"String"}],"required":true,"type":{"name":"(maxLength: number, fillString?: string | undefined) => string"}},"trimEnd":{"defaultValue":null,"description":"Removes the trailing white space and line terminator characters from a string.","name":"trimEnd","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"trimStart":{"defaultValue":null,"description":"Removes the leading white space and line terminator characters from a string.","name":"trimStart","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"trimLeft":{"defaultValue":null,"description":"Removes the leading white space and line terminator characters from a string.\n@deprecated A legacy feature for browser compatibility. Use `trimStart` instead","name":"trimLeft","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"trimRight":{"defaultValue":null,"description":"Removes the trailing white space and line terminator characters from a string.\n@deprecated A legacy feature for browser compatibility. Use `trimEnd` instead","name":"trimRight","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"matchAll":{"defaultValue":null,"description":"Matches a string with a regular expression, and returns an iterable of matches\ncontaining the results of that search.\n@param regexp A variable name or string literal containing the regular expression pattern and flags.","name":"matchAll","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2020.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2020.string.d.ts","name":"String"}],"required":true,"type":{"name":"(regexp: RegExp) => IterableIterator<RegExpMatchArray>"}},"replaceAll":{"defaultValue":null,"description":"Replace all instances of a substring in a string, using a regular expression or search string.\n@param searchValue A string to search for.\n@param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\n@param searchValue A string to search for.\n@param replacer A function that returns the replacement text.","name":"replaceAll","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2021.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2021.string.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2021.string.d.ts","name":"String"}],"required":true,"type":{"name":"{ (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }"}},"at":{"defaultValue":null,"description":"Returns a new String consisting of the single UTF-16 code unit located at the specified index.\n@param index The zero-based index of the desired code unit. A negative index will count back from the last item.","name":"at","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2022.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2022.string.d.ts","name":"String"}],"required":true,"type":{"name":"(index: number) => string | undefined"}},"__@iterator@4008":{"defaultValue":null,"description":"Iterator","name":"__@iterator@4008","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.iterable.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.iterable.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.iterable.d.ts","name":"Iterable"}],"required":true,"type":{"name":"(() => IterableIterator<string>) | (() => Iterator<ReactNode, any, undefined>)"}},"toFixed":{"defaultValue":null,"description":"Returns a string representing a number in fixed-point notation.\n@param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.","name":"toFixed","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"}],"required":true,"type":{"name":"(fractionDigits?: number | undefined) => string"}},"toExponential":{"defaultValue":null,"description":"Returns a string containing a number represented in exponential notation.\n@param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.","name":"toExponential","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"}],"required":true,"type":{"name":"(fractionDigits?: number | undefined) => string"}},"toPrecision":{"defaultValue":null,"description":"Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.\n@param precision Number of significant digits. Must be in the range 1 - 21, inclusive.","name":"toPrecision","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"}],"required":true,"type":{"name":"(precision?: number | undefined) => string"}},"toLocaleString":{"defaultValue":{},"description":"Returns a date converted to a string using the current locale.\nConverts a number to a string by using the current or specified locale.\n@param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\n@param options An object that contains one or more properties that specify comparison options.\n@param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\n@param options An object that contains one or more properties that specify comparison options.","name":"toLocaleString","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Object"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Object"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2020.number.d.ts","name":"Number"}],"required":false,"type":{"name":"(() => string) | { (locales?: string | string[], options?: NumberFormatOptions): string; (locales?: LocalesArgument, options?: NumberFormatOptions | undefined): string; }"}},"type":{"defaultValue":null,"description":"","name":"type","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"ReactElement"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"ReactElement"}],"required":true,"type":{"name":"string | JSXElementConstructor<any>"}},"props":{"defaultValue":null,"description":"","name":"props","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"ReactElement"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"ReactElement"}],"required":true,"type":{"name":"any"}}}}
1
+ {"props":{"toString":{"defaultValue":{},"description":"Returns a string representation of a string.\nReturns a string representation of an object.\n@param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.","name":"toString","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Object"}],"required":false,"type":{"name":"(() => string) | ((radix?: number) => string) | (() => string)"}},"charAt":{"defaultValue":null,"description":"Returns the character at the specified index.\n@param pos The zero-based index of the desired character.","name":"charAt","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(pos: number) => string"}},"charCodeAt":{"defaultValue":null,"description":"Returns the Unicode value of the character at the specified location.\n@param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.","name":"charCodeAt","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(index: number) => number"}},"concat":{"defaultValue":null,"description":"Returns a string that contains the concatenation of two or more strings.\n@param strings The strings to append to the end of the string.","name":"concat","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(...strings: string[]) => string"}},"indexOf":{"defaultValue":null,"description":"Returns the position of the first occurrence of a substring.\n@param searchString The substring to search for in the string\n@param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.","name":"indexOf","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(searchString: string, position?: number | undefined) => number"}},"lastIndexOf":{"defaultValue":null,"description":"Returns the last occurrence of a substring in the string.\n@param searchString The substring to search for.\n@param position The index at which to begin searching. If omitted, the search begins at the end of the string.","name":"lastIndexOf","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(searchString: string, position?: number | undefined) => number"}},"localeCompare":{"defaultValue":null,"description":"Determines whether two strings are equivalent in the current locale.\nDetermines whether two strings are equivalent in the current or specified locale.\n@param that String to compare to target string\n@param that String to compare to target string\n@param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.\n@param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.","name":"localeCompare","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"{ (that: string): number; (that: string, locales?: string | string[] | undefined, options?: CollatorOptions | undefined): number; }"}},"match":{"defaultValue":null,"description":"Matches a string with a regular expression, and returns an array containing the results of that search.\nMatches a string or an object that supports being matched against, and returns an array\ncontaining the results of that search, or null if no matches are found.\n@param regexp A variable name or string literal containing the regular expression pattern and flags.\n@param matcher An object that supports being matched against.","name":"match","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","name":"String"}],"required":true,"type":{"name":"{ (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; }"}},"replace":{"defaultValue":null,"description":"Replaces text in a string, using a regular expression or search string.\nPasses a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm.\nReplaces text in a string, using an object that supports replacement within a string.\n@param searchValue A string or regular expression to search for.\n@param replaceValue A string containing the text to replace. When the {@linkcode searchValue } is a `RegExp`, all matches are replaced if the `g` flag is set (or only those matches at the beginning, if the `y` flag is also present). Otherwise, only the first match of {@linkcode searchValue } is replaced.\n@param searchValue A string to search for.\n@param replacer A function that returns the replacement text.\n@param searchValue An object that supports searching for and replacing matches within a string.\n@param replaceValue The replacement text.\n@param searchValue A object can search for and replace matches within a string.\n@param replacer A function that returns the replacement text.","name":"replace","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","name":"String"}],"required":true,"type":{"name":"{ (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { ...; }, replaceValue: string): string; (searchValue: { ...; }, replacer: (substring: string, ...args: any[]) => string): string; }"}},"search":{"defaultValue":null,"description":"Finds the first substring match in a regular expression search.\n@param regexp The regular expression pattern and applicable flags.\n@param searcher An object which supports searching within a string.","name":"search","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","name":"String"}],"required":true,"type":{"name":"{ (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }"}},"slice":{"defaultValue":null,"description":"Returns a section of a string.\n@param start The index to the beginning of the specified portion of stringObj.\n@param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.\nIf this value is not specified, the substring continues to the end of stringObj.","name":"slice","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(start?: number | undefined, end?: number | undefined) => string"}},"split":{"defaultValue":null,"description":"Split a string into substrings using the specified separator and return them as an array.\n@param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.\n@param limit A value used to limit the number of elements returned in the array.\n@param splitter An object that can split a string.\n@param limit A value used to limit the number of elements returned in the array.","name":"split","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","name":"String"}],"required":true,"type":{"name":"{ (separator: string | RegExp, limit?: number | undefined): string[]; (splitter: { [Symbol.split](string: string, limit?: number | undefined): string[]; }, limit?: number | undefined): string[]; }"}},"substring":{"defaultValue":null,"description":"Returns the substring at the specified location within a String object.\n@param start The zero-based index number indicating the beginning of the substring.\n@param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\nIf end is omitted, the characters from start through the end of the original string are returned.","name":"substring","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(start: number, end?: number | undefined) => string"}},"toLowerCase":{"defaultValue":null,"description":"Converts all the alphabetic characters in a string to lowercase.","name":"toLowerCase","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"toLocaleLowerCase":{"defaultValue":null,"description":"Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.","name":"toLocaleLowerCase","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(locales?: string | string[] | undefined) => string"}},"toUpperCase":{"defaultValue":null,"description":"Converts all the alphabetic characters in a string to uppercase.","name":"toUpperCase","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"toLocaleUpperCase":{"defaultValue":null,"description":"Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.","name":"toLocaleUpperCase","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(locales?: string | string[] | undefined) => string"}},"trim":{"defaultValue":null,"description":"Removes the leading and trailing white space and line terminator characters from a string.","name":"trim","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"length":{"defaultValue":null,"description":"Returns the length of a String object.","name":"length","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"number"}},"substr":{"defaultValue":null,"description":"Gets a substring beginning at the specified location and having the specified length.\n@deprecated A legacy feature for browser compatibility\n@param from The starting position of the desired substring. The index of the first character in the string is zero.\n@param length The number of characters to include in the returned substring.","name":"substr","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"}],"required":true,"type":{"name":"(from: number, length?: number | undefined) => string"}},"valueOf":{"defaultValue":{},"description":"Returns the primitive value of the specified object.","name":"valueOf","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Boolean"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Object"}],"required":false,"type":{"name":"(() => string) | (() => number) | (() => boolean) | (() => Object)"}},"codePointAt":{"defaultValue":null,"description":"Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point\nvalue of the UTF-16 encoded code point starting at the string element at position pos in\nthe String resulting from converting this object to a String.\nIf there is no element at that position, the result is undefined.\nIf a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.","name":"codePointAt","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(pos: number) => number | undefined"}},"includes":{"defaultValue":null,"description":"Returns true if searchString appears as a substring of the result of converting this\nobject to a String, at one or more positions that are\ngreater than or equal to position; otherwise, returns false.\n@param searchString search string\n@param position If position is undefined, 0 is assumed, so as to search all of the String.","name":"includes","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(searchString: string, position?: number | undefined) => boolean"}},"endsWith":{"defaultValue":null,"description":"Returns true if the sequence of elements of searchString converted to a String is the\nsame as the corresponding elements of this object (converted to a String) starting at\nendPosition – length(this). Otherwise returns false.","name":"endsWith","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(searchString: string, endPosition?: number | undefined) => boolean"}},"normalize":{"defaultValue":null,"description":"Returns the String value result of normalizing the string into the normalization form\nnamed by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.\n@param form Applicable values: \"NFC\", \"NFD\", \"NFKC\", or \"NFKD\", If not specified default\nis \"NFC\"\n@param form Applicable values: \"NFC\", \"NFD\", \"NFKC\", or \"NFKD\", If not specified default\nis \"NFC\"","name":"normalize","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"{ (form: \"NFC\" | \"NFD\" | \"NFKC\" | \"NFKD\"): string; (form?: string | undefined): string; }"}},"repeat":{"defaultValue":null,"description":"Returns a String value that is made from count copies appended together. If count is 0,\nthe empty string is returned.\n@param count number of copies to append","name":"repeat","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(count: number) => string"}},"startsWith":{"defaultValue":null,"description":"Returns true if the sequence of elements of searchString converted to a String is the\nsame as the corresponding elements of this object (converted to a String) starting at\nposition. Otherwise returns false.","name":"startsWith","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(searchString: string, position?: number | undefined) => boolean"}},"anchor":{"defaultValue":null,"description":"Returns an `<a>` HTML anchor element and sets the name attribute to the text value\n@deprecated A legacy feature for browser compatibility\n@param name","name":"anchor","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(name: string) => string"}},"big":{"defaultValue":null,"description":"Returns a `<big>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"big","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"blink":{"defaultValue":null,"description":"Returns a `<blink>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"blink","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"bold":{"defaultValue":null,"description":"Returns a `<b>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"bold","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"fixed":{"defaultValue":null,"description":"Returns a `<tt>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"fixed","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"fontcolor":{"defaultValue":null,"description":"Returns a `<font>` HTML element and sets the color attribute value\n@deprecated A legacy feature for browser compatibility","name":"fontcolor","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(color: string) => string"}},"fontsize":{"defaultValue":null,"description":"Returns a `<font>` HTML element and sets the size attribute value\n@deprecated A legacy feature for browser compatibility\n@deprecated A legacy feature for browser compatibility","name":"fontsize","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"{ (size: number): string; (size: string): string; }"}},"italics":{"defaultValue":null,"description":"Returns an `<i>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"italics","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"link":{"defaultValue":null,"description":"Returns an `<a>` HTML element and sets the href attribute value\n@deprecated A legacy feature for browser compatibility","name":"link","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"(url: string) => string"}},"small":{"defaultValue":null,"description":"Returns a `<small>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"small","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"strike":{"defaultValue":null,"description":"Returns a `<strike>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"strike","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"sub":{"defaultValue":null,"description":"Returns a `<sub>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"sub","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"sup":{"defaultValue":null,"description":"Returns a `<sup>` HTML element\n@deprecated A legacy feature for browser compatibility","name":"sup","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.core.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"padStart":{"defaultValue":null,"description":"Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.\nThe padding is applied from the start (left) of the current string.\n@param maxLength The length of the resulting string once the current string has been padded.\nIf this parameter is smaller than the current string's length, the current string will be returned as it is.\n@param fillString The string to pad the current string with.\nIf this string is too long, it will be truncated and the left-most part will be applied.\nThe default value for this parameter is \" \" (U+0020).","name":"padStart","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2017.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2017.string.d.ts","name":"String"}],"required":true,"type":{"name":"(maxLength: number, fillString?: string | undefined) => string"}},"padEnd":{"defaultValue":null,"description":"Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.\nThe padding is applied from the end (right) of the current string.\n@param maxLength The length of the resulting string once the current string has been padded.\nIf this parameter is smaller than the current string's length, the current string will be returned as it is.\n@param fillString The string to pad the current string with.\nIf this string is too long, it will be truncated and the left-most part will be applied.\nThe default value for this parameter is \" \" (U+0020).","name":"padEnd","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2017.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2017.string.d.ts","name":"String"}],"required":true,"type":{"name":"(maxLength: number, fillString?: string | undefined) => string"}},"trimEnd":{"defaultValue":null,"description":"Removes the trailing white space and line terminator characters from a string.","name":"trimEnd","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"trimStart":{"defaultValue":null,"description":"Removes the leading white space and line terminator characters from a string.","name":"trimStart","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"trimLeft":{"defaultValue":null,"description":"Removes the leading white space and line terminator characters from a string.\n@deprecated A legacy feature for browser compatibility. Use `trimStart` instead","name":"trimLeft","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"trimRight":{"defaultValue":null,"description":"Removes the trailing white space and line terminator characters from a string.\n@deprecated A legacy feature for browser compatibility. Use `trimEnd` instead","name":"trimRight","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2019.string.d.ts","name":"String"}],"required":true,"type":{"name":"() => string"}},"matchAll":{"defaultValue":null,"description":"Matches a string with a regular expression, and returns an iterable of matches\ncontaining the results of that search.\n@param regexp A variable name or string literal containing the regular expression pattern and flags.","name":"matchAll","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2020.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2020.string.d.ts","name":"String"}],"required":true,"type":{"name":"(regexp: RegExp) => IterableIterator<RegExpMatchArray>"}},"replaceAll":{"defaultValue":null,"description":"Replace all instances of a substring in a string, using a regular expression or search string.\n@param searchValue A string to search for.\n@param replaceValue A string containing the text to replace for every successful match of searchValue in this string.\n@param searchValue A string to search for.\n@param replacer A function that returns the replacement text.","name":"replaceAll","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2021.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2021.string.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2021.string.d.ts","name":"String"}],"required":true,"type":{"name":"{ (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }"}},"at":{"defaultValue":null,"description":"Returns a new String consisting of the single UTF-16 code unit located at the specified index.\n@param index The zero-based index of the desired code unit. A negative index will count back from the last item.","name":"at","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2022.string.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2022.string.d.ts","name":"String"}],"required":true,"type":{"name":"(index: number) => string | undefined"}},"__@iterator@4402":{"defaultValue":null,"description":"Iterator","name":"__@iterator@4402","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.iterable.d.ts","name":"String"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.iterable.d.ts","name":"String"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2015.iterable.d.ts","name":"Iterable"}],"required":true,"type":{"name":"(() => IterableIterator<string>) | (() => Iterator<ReactNode, any, undefined>)"}},"toFixed":{"defaultValue":null,"description":"Returns a string representing a number in fixed-point notation.\n@param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.","name":"toFixed","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"}],"required":true,"type":{"name":"(fractionDigits?: number | undefined) => string"}},"toExponential":{"defaultValue":null,"description":"Returns a string containing a number represented in exponential notation.\n@param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.","name":"toExponential","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"}],"required":true,"type":{"name":"(fractionDigits?: number | undefined) => string"}},"toPrecision":{"defaultValue":null,"description":"Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.\n@param precision Number of significant digits. Must be in the range 1 - 21, inclusive.","name":"toPrecision","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"}],"required":true,"type":{"name":"(precision?: number | undefined) => string"}},"toLocaleString":{"defaultValue":{},"description":"Returns a date converted to a string using the current locale.\nConverts a number to a string by using the current or specified locale.\n@param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\n@param options An object that contains one or more properties that specify comparison options.\n@param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.\n@param options An object that contains one or more properties that specify comparison options.","name":"toLocaleString","parent":{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Object"},"declarations":[{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Object"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es5.d.ts","name":"Number"},{"fileName":"designsystem/node_modules/typescript/lib/lib.es2020.number.d.ts","name":"Number"}],"required":false,"type":{"name":"(() => string) | { (locales?: string | string[], options?: NumberFormatOptions): string; (locales?: LocalesArgument, options?: NumberFormatOptions | undefined): string; }"}},"type":{"defaultValue":null,"description":"","name":"type","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"ReactElement"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"ReactElement"}],"required":true,"type":{"name":"string | JSXElementConstructor<any>"}},"props":{"defaultValue":null,"description":"","name":"props","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"ReactElement"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"ReactElement"}],"required":true,"type":{"name":"any"}}}}
@@ -25,7 +25,7 @@ export interface PanelProps {
25
25
  children?: React.ReactNode;
26
26
  /** Title of the panel */
27
27
  title?: string;
28
- /** Changes the underlying element of the title. Default: h2*/
28
+ /** Changes the underlying element of the title. Default: h2 */
29
29
  titleHtmlMarkup?: TitleTags;
30
30
  /** Adds custom classes to the element. */
31
31
  className?: string;
@@ -82,6 +82,8 @@ export interface PanelProps {
82
82
  onExpand?: (isExpanded: boolean) => void;
83
83
  /** Whether to render children when closed (in which case they are hidden with CSS). Default: false */
84
84
  renderChildrenWhenClosed?: boolean;
85
+ /** Whether panel is focusable or not */
86
+ focusable?: boolean;
85
87
  }
86
88
  declare const Panel: React.ForwardRefExoticComponent<PanelProps & React.RefAttributes<HTMLHeadingElement>>;
87
89
  export default Panel;
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/components/Panel/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAM5D,OAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAS5D,OAAc,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAI5C,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IAClC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U,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,sGAAsG;IACtG,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAiDD,QAAA,MAAM,KAAK,uFA6MT,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"props":{"title":{"defaultValue":null,"description":"Title of the panel","name":"title","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"titleHtmlMarkup":{"defaultValue":null,"description":"Changes the underlying element of the title. Default: h2","name":"titleHtmlMarkup","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"TitleTags","value":[{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"span\""}]}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"status":{"defaultValue":null,"description":"Displays a status on the left side: defualt normal","name":"status","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"normal\" | \"new\" | \"error\" | \"draft\"","value":[{"value":"\"normal\""},{"value":"\"new\""},{"value":"\"error\""},{"value":"\"draft\""}]}},"statusMessage":{"defaultValue":null,"description":"Displayed on top of the panel with a status icon","name":"statusMessage","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"variant":{"defaultValue":null,"description":"Changes the visual representation of the panel.","name":"variant","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"fill\" | \"white\" | \"stroke\" | \"line\"","value":[{"value":"\"fill\""},{"value":"\"white\""},{"value":"\"stroke\""},{"value":"\"line\""}]}},"url":{"defaultValue":null,"description":"Url to details, renders as a button with anchor tag","name":"url","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":null,"description":"target used in the button: default is _self","name":"target","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"AnchorTarget","value":[{"value":"\"_self\""},{"value":"\"_blank\""},{"value":"\"_parent\""},{"value":"\"_top\""}]}},"icon":{"defaultValue":null,"description":"Icon displayed in title","name":"icon","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"iconRight":{"defaultValue":null,"description":"Display icon on right","name":"iconRight","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"contentA":{"defaultValue":null,"description":"Panel section A content","name":"contentA","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"contentB":{"defaultValue":null,"description":"Panel section B content","name":"contentB","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"prioritiseMetaDataInContentB":{"defaultValue":null,"description":"A version of panel that prioritises content-B visually and audibly","name":"prioritiseMetaDataInContentB","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"buttonText":{"defaultValue":null,"description":"Panel button text","name":"buttonText","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonTextClose":{"defaultValue":null,"description":"Panel button close text","name":"buttonTextClose","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonHtmlMarkup":{"defaultValue":null,"description":"HTML markup for panel button. Default: a","name":"buttonHtmlMarkup","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"ButtonTags","value":[{"value":"\"button\""},{"value":"\"a\""}]}},"buttonOnClick":{"defaultValue":null,"description":"Callback when panel button is clicked","name":"buttonOnClick","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"((e?: MouseEvent<HTMLElement, MouseEvent> | FormEvent<{}> | KeyboardEvent<HTMLUListElement> | null) => void)"}},"buttonAriaLabelledById":{"defaultValue":null,"description":"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).","name":"buttonAriaLabelledById","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonAriaLabel":{"defaultValue":null,"description":"Panel button aria label","name":"buttonAriaLabel","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"showCloseButtonInExpand":{"defaultValue":null,"description":"@deprecated Has no effect anymore due to accessbility reasons. No close button is shown in expanded content. Will be removed in 2.0.0","name":"showCloseButtonInExpand","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"layout":{"defaultValue":null,"description":"Layout (see description)","name":"layout","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"layout1\" | \"layout2\" | \"layout3a\" | \"layout3b\" | \"layout3c\"","value":[{"value":"\"layout1\""},{"value":"\"layout2\""},{"value":"\"layout3a\""},{"value":"\"layout3b\""},{"value":"\"layout3c\""}]}},"containerAsButton":{"defaultValue":null,"description":"Clicking anywhere on the container will trigger a click on the panel's button","name":"containerAsButton","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"time":{"defaultValue":null,"description":"Displays time with icon","name":"time","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"date":{"defaultValue":null,"description":"Displays date with icon","name":"date","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"noTopBorder":{"defaultValue":null,"description":"Removes top border when variant is \"line\"","name":"noTopBorder","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"expanded":{"defaultValue":null,"description":"Opens or closes the panel","name":"expanded","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"onExpand":{"defaultValue":null,"description":"Called when panel is open/closed.","name":"onExpand","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"((isExpanded: boolean) => void)"}},"renderChildrenWhenClosed":{"defaultValue":null,"description":"Whether to render children when closed (in which case they are hidden with CSS). Default: false","name":"renderChildrenWhenClosed","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}}}}
1
+ {"props":{"title":{"defaultValue":null,"description":"Title of the panel","name":"title","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"titleHtmlMarkup":{"defaultValue":null,"description":"Changes the underlying element of the title. Default: h2","name":"titleHtmlMarkup","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"TitleTags","value":[{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"span\""}]}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"status":{"defaultValue":null,"description":"Displays a status on the left side: defualt normal","name":"status","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"normal\" | \"new\" | \"error\" | \"draft\"","value":[{"value":"\"normal\""},{"value":"\"new\""},{"value":"\"error\""},{"value":"\"draft\""}]}},"statusMessage":{"defaultValue":null,"description":"Displayed on top of the panel with a status icon","name":"statusMessage","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"variant":{"defaultValue":null,"description":"Changes the visual representation of the panel.","name":"variant","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"fill\" | \"white\" | \"stroke\" | \"line\"","value":[{"value":"\"fill\""},{"value":"\"white\""},{"value":"\"stroke\""},{"value":"\"line\""}]}},"url":{"defaultValue":null,"description":"Url to details, renders as a button with anchor tag","name":"url","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":null,"description":"target used in the button: default is _self","name":"target","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"AnchorTarget","value":[{"value":"\"_self\""},{"value":"\"_blank\""},{"value":"\"_parent\""},{"value":"\"_top\""}]}},"icon":{"defaultValue":null,"description":"Icon displayed in title","name":"icon","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"iconRight":{"defaultValue":null,"description":"Display icon on right","name":"iconRight","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"contentA":{"defaultValue":null,"description":"Panel section A content","name":"contentA","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"contentB":{"defaultValue":null,"description":"Panel section B content","name":"contentB","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"prioritiseMetaDataInContentB":{"defaultValue":null,"description":"A version of panel that prioritises content-B visually and audibly","name":"prioritiseMetaDataInContentB","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"buttonText":{"defaultValue":null,"description":"Panel button text","name":"buttonText","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonTextClose":{"defaultValue":null,"description":"Panel button close text","name":"buttonTextClose","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonHtmlMarkup":{"defaultValue":null,"description":"HTML markup for panel button. Default: a","name":"buttonHtmlMarkup","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"ButtonTags","value":[{"value":"\"button\""},{"value":"\"a\""}]}},"buttonOnClick":{"defaultValue":null,"description":"Callback when panel button is clicked","name":"buttonOnClick","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"((e?: MouseEvent<HTMLElement, MouseEvent> | FormEvent<{}> | KeyboardEvent<HTMLUListElement> | null) => void)"}},"buttonAriaLabelledById":{"defaultValue":null,"description":"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).","name":"buttonAriaLabelledById","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonAriaLabel":{"defaultValue":null,"description":"Panel button aria label","name":"buttonAriaLabel","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"showCloseButtonInExpand":{"defaultValue":null,"description":"@deprecated Has no effect anymore due to accessbility reasons. No close button is shown in expanded content. Will be removed in 2.0.0","name":"showCloseButtonInExpand","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"layout":{"defaultValue":null,"description":"Layout (see description)","name":"layout","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"layout1\" | \"layout2\" | \"layout3a\" | \"layout3b\" | \"layout3c\"","value":[{"value":"\"layout1\""},{"value":"\"layout2\""},{"value":"\"layout3a\""},{"value":"\"layout3b\""},{"value":"\"layout3c\""}]}},"containerAsButton":{"defaultValue":null,"description":"Clicking anywhere on the container will trigger a click on the panel's button","name":"containerAsButton","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"time":{"defaultValue":null,"description":"Displays time with icon","name":"time","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"date":{"defaultValue":null,"description":"Displays date with icon","name":"date","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"noTopBorder":{"defaultValue":null,"description":"Removes top border when variant is \"line\"","name":"noTopBorder","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"expanded":{"defaultValue":null,"description":"Opens or closes the panel","name":"expanded","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"onExpand":{"defaultValue":null,"description":"Called when panel is open/closed.","name":"onExpand","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"((isExpanded: boolean) => void)"}},"renderChildrenWhenClosed":{"defaultValue":null,"description":"Whether to render children when closed (in which case they are hidden with CSS). Default: false","name":"renderChildrenWhenClosed","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"focusable":{"defaultValue":null,"description":"Whether panel is focusable or not","name":"focusable","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}}}}
@@ -6,6 +6,7 @@
6
6
 
7
7
  .panel-wrapper {
8
8
  width: 100%;
9
+ outline: none;
9
10
  }
10
11
 
11
12
  @mixin panel-padding {
@@ -324,6 +324,12 @@
324
324
  width: 0.875rem;
325
325
  height: 0.875rem;
326
326
  border-radius: 10rem;
327
+
328
+ // Vi overstyrer farger satt ved high-contrast mode i nettleser/os
329
+ @media (forced-colors: active) {
330
+ forced-color-adjust: none;
331
+ background-color: #fff !important;
332
+ }
327
333
  }
328
334
 
329
335
  &--on-dark:checked::before {
@@ -405,6 +411,13 @@
405
411
  }
406
412
  }
407
413
  }
414
+
415
+ // Vi overstyrer farger satt ved high-contrast mode i nettleser/os
416
+ @media (forced-colors: active) {
417
+ forced-color-adjust: none;
418
+ color: #fff !important;
419
+ background-color: transparent !important;
420
+ }
408
421
  }
409
422
 
410
423
  .radiobutton-sublabel-wrapper {
@@ -4,21 +4,6 @@
4
4
  @import '../../scss/palette';
5
5
  @import '../../scss/font-settings';
6
6
 
7
- /**
8
- * Konverter en gjennomsiktig farge til en ugjennomsiktig farge ved å simulere fargen plassert
9
- * på en bakgrunnsfarge (f.eks. 50% gjennomsiktig $blueberry200 på hvit bakgrunn).
10
- *
11
- * Fra https://makandracards.com/makandra/42500-sass-how-to-convert-an-rgba-color-to-its-rgb-look-alike
12
- *
13
- * @param $rgba Farge med alpha-verdi, f.eks. rgba(black, 0.67)
14
- * @param $background Bakgrunnsfarge. Default: $white
15
- *
16
- * @returns Farge uten gjennomsiktighet
17
- */
18
- @function rgba-to-rgb($rgba, $background: $white) {
19
- @return mix(rgb(red($rgba), green($rgba), blue($rgba)), $background, alpha($rgba) * 100%);
20
- }
21
-
22
7
  .tag {
23
8
  $tag: &;
24
9
 
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SvgPathProps } from '../Icons';
3
+ declare const HelpSign: React.FC<SvgPathProps>;
4
+ export default HelpSign;
5
+ //# sourceMappingURL=HelpSign.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelpSign.d.ts","sourceRoot":"","sources":["../../../src/components/Trigger/HelpSign.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAW,YAAY,EAAE,MAAM,UAAU,CAAC;AAEjD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAkBpC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SvgPathProps } from '../Icons';
3
+ declare const InfoSignStroke: React.FC<SvgPathProps>;
4
+ export default InfoSignStroke;
5
+ //# sourceMappingURL=InfoSignStroke.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoSignStroke.d.ts","sourceRoot":"","sources":["../../../src/components/Trigger/InfoSignStroke.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAW,YAAY,EAAE,MAAM,UAAU,CAAC;AAEjD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAkB1C,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ export type TriggerVariant = 'help';
3
+ export type TriggerSize = 'medium' | 'large';
4
+ export type TriggerMode = 'onlight' | 'ondark';
5
+ export interface TriggerProps extends Pick<React.InputHTMLAttributes<HTMLButtonElement>, 'onClick' | 'aria-haspopup' | 'aria-controls'> {
6
+ /**
7
+ * Sets aria-label of the trigger. ariaLabel or ariaLabelledById MUST be set!
8
+ */
9
+ ariaLabel?: string;
10
+ /**
11
+ * Sets aria-labelledby of the trigger. ariaLabel or ariaLabelledById MUST be set!
12
+ */
13
+ ariaLabelledById?: string;
14
+ /**
15
+ * Controls the icon and color. Default: help.
16
+ */
17
+ variant?: TriggerVariant;
18
+ /**
19
+ * Changes the design based on the background the trigger is placed on. Default: onlight.
20
+ */
21
+ mode?: TriggerMode;
22
+ /**
23
+ * Size of the trigger. Default: medium.
24
+ */
25
+ size?: TriggerSize;
26
+ /**
27
+ * Indicates that the trigger is in use.
28
+ */
29
+ selected?: boolean;
30
+ /**
31
+ * Classname will be applied to the button element.
32
+ */
33
+ className?: string;
34
+ /**
35
+ * Optional test id.
36
+ */
37
+ testId?: string;
38
+ }
39
+ declare const Trigger: React.ForwardRefExoticComponent<TriggerProps & React.RefAttributes<HTMLButtonElement>>;
40
+ export default Trigger;
41
+ //# sourceMappingURL=Trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../src/components/Trigger/Trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7C,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE/C,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,EAAE,SAAS,GAAG,eAAe,GAAG,eAAe,CAAC;IACrI;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA4BD,QAAA,MAAM,OAAO,wFAmCZ,CAAC;AAIF,eAAe,OAAO,CAAC"}
@@ -0,0 +1 @@
1
+ {"props":{"ariaLabel":{"defaultValue":null,"description":"Sets aria-label of the trigger. ariaLabel or ariaLabelledById MUST be set!","name":"ariaLabel","parent":{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"},"declarations":[{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"}],"required":false,"type":{"name":"string"}},"ariaLabelledById":{"defaultValue":null,"description":"Sets aria-labelledby of the trigger. ariaLabel or ariaLabelledById MUST be set!","name":"ariaLabelledById","parent":{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"},"declarations":[{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"}],"required":false,"type":{"name":"string"}},"variant":{"defaultValue":{"value":"help"},"description":"Controls the icon and color. Default: help.","name":"variant","parent":{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"},"declarations":[{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"}],"required":false,"type":{"name":"enum","raw":"\"help\"","value":[{"value":"\"help\""}]}},"mode":{"defaultValue":{"value":"onlight"},"description":"Changes the design based on the background the trigger is placed on. Default: onlight.","name":"mode","parent":{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"},"declarations":[{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"}],"required":false,"type":{"name":"enum","raw":"TriggerMode","value":[{"value":"\"onlight\""},{"value":"\"ondark\""}]}},"size":{"defaultValue":{"value":"medium"},"description":"Size of the trigger. Default: medium.","name":"size","parent":{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"},"declarations":[{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"}],"required":false,"type":{"name":"enum","raw":"TriggerSize","value":[{"value":"\"medium\""},{"value":"\"large\""}]}},"selected":{"defaultValue":{"value":"false"},"description":"Indicates that the trigger is in use.","name":"selected","parent":{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"},"declarations":[{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"}],"required":false,"type":{"name":"boolean"}},"className":{"defaultValue":null,"description":"Classname will be applied to the button element.","name":"className","parent":{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"},"declarations":[{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test id.","name":"testId","parent":{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"},"declarations":[{"fileName":"src/components/Trigger/Trigger.tsx","name":"TriggerProps"}],"required":false,"type":{"name":"string"}},"onClick":{"defaultValue":null,"description":"","name":"onClick","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"DOMAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"DOMAttributes"}],"required":false,"type":{"name":"MouseEventHandler<HTMLButtonElement>"}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"AriaAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"AriaAttributes"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"AriaAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"AriaAttributes"}],"required":false,"type":{"name":"string"}}}}
@@ -0,0 +1,4 @@
1
+ import Trigger from './Trigger';
2
+ export * from './Trigger';
3
+ export default Trigger;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Trigger/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,eAAe,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ import e from"react";import x from"classnames";import{getIcon as y,Icon as E}from"../Icons/Icon.js";import{IconSize as n,AnalyticsId as I}from"../../constants.js";import{useHover as M}from"../../hooks/useHover.js";import{getColor as s}from"../../theme/currys/color.js";import{getAriaLabelAttributes as Z}from"../../utils/accessibility.js";import{mergeRefs as v}from"../../utils/refs.js";import c from"./styles.module.scss";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/index.js";import"../../theme/grid.js";import"../../theme/palette.js";import"../../theme/spacers.js";const $=({size:t,isHovered:o})=>y({size:t,isHovered:o,normal:e.createElement("path",{d:"M18.854 19.678c0-2.268 1.701-4.74 5.126-4.74 3.358 0 5.172 2.222 5.172 4.536 0 1.793-.952 3.064-2.268 3.992l-.976.682c-.749.521-1.134 1.27-1.134 2.154 0 .047 0 .16.023.296h-2.269a46.85 46.85 0 0 0-.01-.139 8.554 8.554 0 0 1-.036-.724c0-1.36.522-2.471 1.84-3.424l1.042-.75c.75-.544 1.066-1.201 1.066-1.974 0-1.178-.793-2.29-2.45-2.29-1.679 0-2.563 1.293-2.563 2.585 0 .34.045.772.136 1.022l-2.564-.181a3.903 3.903 0 0 1-.135-1.044Zm3.176 10.186c0-.908.726-1.678 1.656-1.678.908 0 1.656.77 1.656 1.678 0 .907-.748 1.657-1.656 1.657-.93 0-1.656-.75-1.656-1.657Z"}),normalHover:e.createElement("path",{d:"M18.854 18.178c0-2.268 1.701-4.74 5.126-4.74 3.358 0 5.172 2.223 5.172 4.536 0 1.793-.952 3.064-2.268 3.992l-.976.682c-.749.521-1.134 1.27-1.134 2.154 0 .047 0 .16.023.296h-2.269a46.85 46.85 0 0 0-.01-.139 8.554 8.554 0 0 1-.036-.724c0-1.36.522-2.471 1.838-3.424l1.044-.75c.75-.544 1.066-1.201 1.066-1.974 0-1.178-.793-2.29-2.45-2.29-1.679 0-2.563 1.293-2.563 2.585 0 .34.045.772.135 1.022l-2.563-.181a3.903 3.903 0 0 1-.135-1.044Zm3.176 11.686c0-.908.725-1.678 1.655-1.678.908 0 1.657.77 1.657 1.678 0 .907-.749 1.657-1.657 1.657-.93 0-1.655-.75-1.655-1.657Z"}),xSmall:e.createElement("path",{d:"M23.98 14.937c-3.425 0-5.127 2.473-5.127 4.741 0 .363.047.726.137 1.044l2.563.182c-.09-.25-.136-.681-.136-1.022 0-1.292.885-2.586 2.563-2.586 1.658 0 2.45 1.112 2.45 2.291 0 .772-.317 1.43-1.065 1.974l-1.043.749c-1.317.953-1.84 2.065-1.84 3.425 0 .319.024.567.047.862h2.267c-.021-.135-.021-.25-.021-.295 0-.884.385-1.633 1.133-2.154l.976-.681c1.317-.93 2.27-2.2 2.27-3.993 0-2.314-1.816-4.537-5.174-4.537m-.294 13.248c-.93 0-1.656.773-1.656 1.678a1.65 1.65 0 0 0 1.656 1.657c.907 0 1.656-.748 1.656-1.657 0-.905-.749-1.678-1.656-1.678"}),xSmallHover:e.createElement("path",{d:"M18.853 18.289c0-2.268 1.701-4.742 5.127-4.742 3.357 0 5.173 2.223 5.173 4.537 0 1.794-.953 3.065-2.27 3.994l-.976.681c-.747.52-1.133 1.27-1.133 2.154 0 .046 0 .16.022.295h-2.267a39.324 39.324 0 0 0-.01-.125 8.468 8.468 0 0 1-.037-.737c0-1.36.523-2.472 1.839-3.425l1.043-.75c.748-.543 1.065-1.201 1.065-1.973 0-1.18-.792-2.29-2.45-2.29-1.678 0-2.562 1.293-2.562 2.585 0 .341.045.772.135 1.022l-2.563-.183a3.914 3.914 0 0 1-.136-1.043Zm3.176 11.575c0-.907.726-1.679 1.656-1.679.908 0 1.657.772 1.657 1.68 0 .907-.749 1.656-1.657 1.656-.93 0-1.656-.749-1.656-1.657Z"})}),A=$,C={help:A},R={medium:n.XSmall,large:n.Small},T=(t,o,l)=>{if(t==="ondark")return"white";const r=l?800:600;if(o==="help")return s("plum",r);if(o==="info")return s("blueberry",r)},p=e.forwardRef(({ariaLabel:t,ariaLabelledById:o,variant:l="help",mode:r="onlight",size:a="medium",selected:m=!1,className:g,testId:f,...d},h)=>{const{isHovered:i,hoverRef:u}=M(),S=x(c.trigger,r==="onlight"&&c[`trigger--${l}`],c[`trigger--${r}`],c[`trigger--${a}`],g),b=Z({label:t,id:o}),H=T(r,l,i||m);return e.createElement("button",{"aria-label":t,type:"button","data-testid":f,"data-analyticsid":I.Trigger,className:S,ref:v([h,u]),"aria-expanded":m,...b,...d},e.createElement(E,{svgIcon:C[l],size:R[a],color:H,isHovered:i}))});p.displayName="Trigger";const Q=p;export{Q as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Trigger/HelpSign.tsx","../../../src/components/Trigger/Trigger.tsx"],"sourcesContent":["import React from 'react';\n\nimport { getIcon, SvgPathProps } from '../Icons';\n\nconst HelpSign: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): React.ReactElement => {\n const normal = (\n <path d=\"M18.854 19.678c0-2.268 1.701-4.74 5.126-4.74 3.358 0 5.172 2.222 5.172 4.536 0 1.793-.952 3.064-2.268 3.992l-.976.682c-.749.521-1.134 1.27-1.134 2.154 0 .047 0 .16.023.296h-2.269a46.85 46.85 0 0 0-.01-.139 8.554 8.554 0 0 1-.036-.724c0-1.36.522-2.471 1.84-3.424l1.042-.75c.75-.544 1.066-1.201 1.066-1.974 0-1.178-.793-2.29-2.45-2.29-1.679 0-2.563 1.293-2.563 2.585 0 .34.045.772.136 1.022l-2.564-.181a3.903 3.903 0 0 1-.135-1.044Zm3.176 10.186c0-.908.726-1.678 1.656-1.678.908 0 1.656.77 1.656 1.678 0 .907-.748 1.657-1.656 1.657-.93 0-1.656-.75-1.656-1.657Z\" />\n );\n\n const normalHover = (\n <path d=\"M18.854 18.178c0-2.268 1.701-4.74 5.126-4.74 3.358 0 5.172 2.223 5.172 4.536 0 1.793-.952 3.064-2.268 3.992l-.976.682c-.749.521-1.134 1.27-1.134 2.154 0 .047 0 .16.023.296h-2.269a46.85 46.85 0 0 0-.01-.139 8.554 8.554 0 0 1-.036-.724c0-1.36.522-2.471 1.838-3.424l1.044-.75c.75-.544 1.066-1.201 1.066-1.974 0-1.178-.793-2.29-2.45-2.29-1.679 0-2.563 1.293-2.563 2.585 0 .34.045.772.135 1.022l-2.563-.181a3.903 3.903 0 0 1-.135-1.044Zm3.176 11.686c0-.908.725-1.678 1.655-1.678.908 0 1.657.77 1.657 1.678 0 .907-.749 1.657-1.657 1.657-.93 0-1.655-.75-1.655-1.657Z\" />\n );\n\n const xSmall = (\n <path d=\"M23.98 14.937c-3.425 0-5.127 2.473-5.127 4.741 0 .363.047.726.137 1.044l2.563.182c-.09-.25-.136-.681-.136-1.022 0-1.292.885-2.586 2.563-2.586 1.658 0 2.45 1.112 2.45 2.291 0 .772-.317 1.43-1.065 1.974l-1.043.749c-1.317.953-1.84 2.065-1.84 3.425 0 .319.024.567.047.862h2.267c-.021-.135-.021-.25-.021-.295 0-.884.385-1.633 1.133-2.154l.976-.681c1.317-.93 2.27-2.2 2.27-3.993 0-2.314-1.816-4.537-5.174-4.537m-.294 13.248c-.93 0-1.656.773-1.656 1.678a1.65 1.65 0 0 0 1.656 1.657c.907 0 1.656-.748 1.656-1.657 0-.905-.749-1.678-1.656-1.678\" />\n );\n\n const xSmallHover = (\n <path d=\"M18.853 18.289c0-2.268 1.701-4.742 5.127-4.742 3.357 0 5.173 2.223 5.173 4.537 0 1.794-.953 3.065-2.27 3.994l-.976.681c-.747.52-1.133 1.27-1.133 2.154 0 .046 0 .16.022.295h-2.267a39.324 39.324 0 0 0-.01-.125 8.468 8.468 0 0 1-.037-.737c0-1.36.523-2.472 1.839-3.425l1.043-.75c.748-.543 1.065-1.201 1.065-1.973 0-1.18-.792-2.29-2.45-2.29-1.678 0-2.562 1.293-2.562 2.585 0 .341.045.772.135 1.022l-2.563-.183a3.914 3.914 0 0 1-.136-1.043Zm3.176 11.575c0-.907.726-1.679 1.656-1.679.908 0 1.657.772 1.657 1.68 0 .907-.749 1.656-1.657 1.656-.93 0-1.656-.749-1.656-1.657Z\" />\n );\n\n return getIcon({ size, isHovered, normal, normalHover, xSmall, xSmallHover });\n};\n\nexport default HelpSign;\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport HelpSign from './HelpSign';\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useHover } from '../../hooks/useHover';\nimport { getColor } from '../../theme/currys';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { mergeRefs } from '../../utils/refs';\nimport Icon, { SvgIcon } from '../Icons';\n\nimport styles from './styles.module.scss';\n\nexport type TriggerVariant = 'help'; // @todo Support variant='info' in later version\n\nexport type TriggerSize = 'medium' | 'large';\n\nexport type TriggerMode = 'onlight' | 'ondark';\n\nexport interface TriggerProps extends Pick<React.InputHTMLAttributes<HTMLButtonElement>, 'onClick' | 'aria-haspopup' | 'aria-controls'> {\n /**\n * Sets aria-label of the trigger. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the trigger. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /**\n * Controls the icon and color. Default: help.\n */\n variant?: TriggerVariant;\n /**\n * Changes the design based on the background the trigger is placed on. Default: onlight.\n */\n mode?: TriggerMode;\n /**\n * Size of the trigger. Default: medium.\n */\n size?: TriggerSize;\n /**\n * Indicates that the trigger is in use.\n */\n selected?: boolean;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /**\n * Optional test id.\n */\n testId?: string;\n}\n\nconst iconMap: Record<TriggerVariant, SvgIcon> = {\n help: HelpSign,\n //info: InfoSignStroke, // @todo Support variant='info' in later version\n};\n\nconst iconSizeMap: Record<TriggerSize, IconSize> = {\n medium: IconSize.XSmall,\n large: IconSize.Small,\n};\n\nconst getIconColor = (mode: TriggerMode, variant: TriggerVariant, isActive: boolean): string | undefined => {\n if (mode === 'ondark') {\n return 'white';\n }\n\n const depth = isActive ? 800 : 600;\n\n if (variant === 'help') {\n return getColor('plum', depth);\n }\n\n if (variant === 'info') {\n return getColor('blueberry', depth);\n }\n};\n\nconst Trigger = React.forwardRef<HTMLButtonElement, TriggerProps>(\n (\n { ariaLabel, ariaLabelledById, variant = 'help', mode = 'onlight', size = 'medium', selected = false, className, testId, ...rest },\n ref\n ) => {\n const { isHovered, hoverRef } = useHover<HTMLButtonElement>();\n\n const triggerClasses = classNames(\n styles.trigger,\n mode === 'onlight' && styles[`trigger--${variant}`], // variants look the same when mode=ondark\n styles[`trigger--${mode}`],\n styles[`trigger--${size}`],\n className\n );\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n\n const iconColor = getIconColor(mode, variant, isHovered || selected);\n\n return (\n <button\n aria-label={ariaLabel}\n type=\"button\"\n data-testid={testId}\n data-analyticsid={AnalyticsId.Trigger}\n className={triggerClasses}\n ref={mergeRefs([ref, hoverRef])}\n aria-expanded={selected}\n {...ariaLabelAttributes}\n {...rest}\n >\n <Icon svgIcon={iconMap[variant]} size={iconSizeMap[size]} color={iconColor} isHovered={isHovered} />\n </button>\n );\n }\n);\n\nTrigger.displayName = 'Trigger';\n\nexport default Trigger;\n"],"names":["HelpSign","size","isHovered","getIcon","React","HelpSign$1","iconMap","iconSizeMap","IconSize","getIconColor","mode","variant","isActive","depth","getColor","Trigger","ariaLabel","ariaLabelledById","selected","className","testId","rest","ref","hoverRef","useHover","triggerClasses","classNames","styles","ariaLabelAttributes","getAriaLabelAttributes","iconColor","AnalyticsId","mergeRefs","Icon","Trigger$1"],"mappings":"snBAIA,MAAMA,EAAmC,CAAC,CAAE,KAAAC,EAAM,UAAAC,KAiBzCC,EAAQ,CAAE,KAAAF,EAAM,UAAAC,EAAW,OAfhCE,EAAA,cAAC,OAAK,CAAA,EAAE,gjBAAijB,CAAA,EAejhB,YAXxCA,EAAA,cAAC,OAAK,CAAA,EAAE,ijBAAkjB,CAAA,EAWrgB,OAPrDA,EAAA,cAAC,OAAK,CAAA,EAAE,whBAAyhB,CAAA,EAOpe,YAH7DA,EAAA,cAAC,OAAK,CAAA,EAAE,qjBAAsjB,CAAA,EAGpf,EAG9EC,EAAeL,EC+BTM,EAA2C,CAC/C,KAAMN,CAER,EAEMO,EAA6C,CACjD,OAAQC,EAAS,OACjB,MAAOA,EAAS,KAClB,EAEMC,EAAe,CAACC,EAAmBC,EAAyBC,IAA0C,CAC1G,GAAIF,IAAS,SACJ,MAAA,QAGH,MAAAG,EAAQD,EAAW,IAAM,IAE/B,GAAID,IAAY,OACP,OAAAG,EAAS,OAAQD,CAAK,EAG/B,GAAIF,IAAY,OACP,OAAAG,EAAS,YAAaD,CAAK,CAEtC,EAEME,EAAUX,EAAM,WACpB,CACE,CAAE,UAAAY,EAAW,iBAAAC,EAAkB,QAAAN,EAAU,OAAQ,KAAAD,EAAO,UAAW,KAAAT,EAAO,SAAU,SAAAiB,EAAW,GAAO,UAAAC,EAAW,OAAAC,EAAQ,GAAGC,GAC5HC,IACG,CACH,KAAM,CAAE,UAAApB,EAAW,SAAAqB,CAAS,EAAIC,EAA4B,EAEtDC,EAAiBC,EACrBC,EAAO,QACPjB,IAAS,WAAaiB,EAAO,YAAYhB,GAAS,EAClDgB,EAAO,YAAYjB,GAAM,EACzBiB,EAAO,YAAY1B,GAAM,EACzBkB,CAAA,EAGIS,EAAsBC,EAAuB,CAAE,MAAOb,EAAW,GAAIC,EAAkB,EAEvFa,EAAYrB,EAAaC,EAAMC,EAAST,GAAagB,CAAQ,EAGjE,OAAAd,EAAA,cAAC,SAAA,CACC,aAAYY,EACZ,KAAK,SACL,cAAaI,EACb,mBAAkBW,EAAY,QAC9B,UAAWN,EACX,IAAKO,EAAU,CAACV,EAAKC,CAAQ,CAAC,EAC9B,gBAAeL,EACd,GAAGU,EACH,GAAGP,CAAA,EAEHjB,EAAA,cAAA6B,EAAA,CAAK,QAAS3B,EAAQK,CAAO,EAAG,KAAMJ,EAAYN,CAAI,EAAG,MAAO6B,EAAW,UAAA5B,CAAsB,CAAA,CAAA,CAGxG,CACF,EAEAa,EAAQ,YAAc,UAEtB,MAAAmB,EAAenB"}
@@ -0,0 +1,85 @@
1
+ @use 'sass:map';
2
+ @import '../../scss/palette';
3
+
4
+ .trigger {
5
+ $trigger: &;
6
+
7
+ vertical-align: text-bottom;
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ padding: 0;
12
+ border-radius: 50%;
13
+ border: 0;
14
+ outline: none;
15
+ background-color: transparent;
16
+ cursor: pointer;
17
+
18
+ &--medium {
19
+ height: 24.18px;
20
+ width: 24.18px;
21
+ }
22
+
23
+ &--large {
24
+ height: 30.61px;
25
+ width: 30.61px;
26
+ }
27
+
28
+ $variant-map: (
29
+ 'help': 'plum',
30
+ 'info': 'blueberry',
31
+ );
32
+
33
+ @each $variant, $color in $variant-map {
34
+ &--#{$variant} {
35
+ box-shadow: inset 0 0 0 1.5px map.get($palette-map, #{$color}600);
36
+
37
+ &:hover {
38
+ box-shadow: inset 0 0 0 1.5px map.get($palette-map, #{$color}800);
39
+ background-color: rgba-to-rgb(rgba(map.get($palette-map, #{$color}600), 0.1));
40
+ }
41
+
42
+ &:focus-visible {
43
+ box-shadow: inset 0 0 0 1.5px $black;
44
+ outline: 1.5px solid $black;
45
+ }
46
+
47
+ &#{$trigger}[aria-expanded='true'] {
48
+ box-shadow: inset 0 0 0 1.5px map.get($palette-map, #{$color}800);
49
+ background-color: rgba-to-rgb(rgba(map.get($palette-map, #{$color}600), 0.1));
50
+
51
+ &:hover {
52
+ background-color: rgba-to-rgb(rgba(map.get($palette-map, #{$color}600), 0.2));
53
+ }
54
+
55
+ &:focus {
56
+ background-color: rgba-to-rgb(rgba(map.get($palette-map, #{$color}600), 0.1));
57
+ }
58
+ }
59
+ }
60
+ }
61
+
62
+ &--ondark {
63
+ box-shadow: inset 0 0 0 1.5px $white;
64
+
65
+ &:hover {
66
+ background-color: rgba-to-rgb(rgba($plum50, 0.2), $plum600);
67
+ }
68
+
69
+ &:focus-visible {
70
+ outline: 1.5px solid $white;
71
+ }
72
+
73
+ &#{$trigger}[aria-expanded='true'] {
74
+ background-color: rgba-to-rgb(rgba($plum50, 0.1), $plum600);
75
+
76
+ &:hover {
77
+ background-color: rgba-to-rgb(rgba($plum50, 0.2), $plum600);
78
+ }
79
+
80
+ &:focus-visible {
81
+ background-color: rgba-to-rgb(rgba($plum50, 0.1), $plum600);
82
+ }
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,14 @@
1
+ export type Styles = {
2
+ trigger: string;
3
+ 'trigger--help': string;
4
+ 'trigger--info': string;
5
+ 'trigger--large': string;
6
+ 'trigger--medium': string;
7
+ 'trigger--ondark': string;
8
+ };
9
+
10
+ export type ClassNames = keyof Styles;
11
+
12
+ declare const styles: Styles;
13
+
14
+ export default styles;
package/constants.d.ts CHANGED
@@ -55,6 +55,7 @@ export declare enum AnalyticsId {
55
55
  Button = "button",
56
56
  Checkbox = "checkbox",
57
57
  Close = "close",
58
+ DictionaryTrigger = "dictionary-trigger",
58
59
  Dropdown = "dropdown",
59
60
  Duolist = "duolist",
60
61
  Expander = "expander",
@@ -95,6 +96,7 @@ export declare enum AnalyticsId {
95
96
  Tile = "tile",
96
97
  Title = "title",
97
98
  Tooltip = "tooltip",
99
+ Trigger = "trigger",
98
100
  Validation = "validation"
99
101
  }
100
102
  export declare enum KeyboardEventK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AW,iBAAiB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,eAAe;IACxB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,aAAa;IACpB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ"}
package/constants.js CHANGED
@@ -1,2 +1,2 @@
1
- var e=(r=>(r[r.XXSmall=24]="XXSmall",r[r.XSmall=38]="XSmall",r[r.Small=48]="Small",r[r.Medium=64]="Medium",r[r.Large=80]="Large",r[r.XLarge=130]="XLarge",r))(e||{}),o=(r=>(r[r.Modal=13e5]="Modal",r[r.ExpanderTrigger=1e4]="ExpanderTrigger",r))(o||{});const g=12;var p=(r=>(r.onwhite="onwhite",r.ongrey="ongrey",r.onblueberry="onblueberry",r.ondark="ondark",r.oninvalid="oninvalid",r))(p||{}),a=(r=>(r.normal="normal",r.bigform="bigform",r))(a||{}),u=(r=>(r.AnchorLink="anchor-link",r.Avatar="avatar",r.Badge="badge",r.Button="button",r.Checkbox="checkbox",r.Close="close",r.Dropdown="dropdown",r.Duolist="duolist",r.Expander="expander",r.ExpanderList="expander-list",r.ExpanderListExpander="expander-list-expander",r.ExpanderHierarchy="expander-hierarchy",r.ExpanderHierarchyExpander="expander-hierarchy-expander",r.FormGroup="form-group",r.FormLayout="form-layout",r.HelpBubble="help-bubble",r.HighlightBox="highlight-box",r.Icon="icon",r.Input="input",r.Label="label",r.Link="link",r.LinkList="link-list",r.List="list",r.Loader="loader",r.Logo="logo",r.Modal="modal",r.NotificationPanel="notification-panel",r.Panel="panel",r.PanelList="panel-list",r.PopMenu="pop-menu",r.PopOver="pop-over",r.Portal="portal",r.Stepper="stepper",r.RadioButton="radio-button",r.Select="select",r.Slider="slider",r.Spacer="spacer",r.StatusDot="status-dot",r.Sublabel="sublabel",r.Table="table",r.Tag="tag",r.TagList="tag-list",r.Textarea="textarea",r.Tile="tile",r.Title="title",r.Tooltip="tooltip",r.Validation="validation",r))(u||{}),l=(r=>(r.Enter="Enter",r.Escape="Escape",r.ArrowDown="ArrowDown",r.ArrowUp="ArrowUp",r.Home="Home",r.End="End",r))(l||{});export{g as AVERAGE_CHARACTER_WIDTH_PX,u as AnalyticsId,p as FormMode,a as FormVariant,e as IconSize,l as KeyboardEventKey,o as ZIndex};
1
+ var e=(r=>(r[r.XXSmall=24]="XXSmall",r[r.XSmall=38]="XSmall",r[r.Small=48]="Small",r[r.Medium=64]="Medium",r[r.Large=80]="Large",r[r.XLarge=130]="XLarge",r))(e||{}),o=(r=>(r[r.Modal=13e5]="Modal",r[r.ExpanderTrigger=1e4]="ExpanderTrigger",r))(o||{});const l=12;var p=(r=>(r.onwhite="onwhite",r.ongrey="ongrey",r.onblueberry="onblueberry",r.ondark="ondark",r.oninvalid="oninvalid",r))(p||{}),a=(r=>(r.normal="normal",r.bigform="bigform",r))(a||{}),g=(r=>(r.AnchorLink="anchor-link",r.Avatar="avatar",r.Badge="badge",r.Button="button",r.Checkbox="checkbox",r.Close="close",r.DictionaryTrigger="dictionary-trigger",r.Dropdown="dropdown",r.Duolist="duolist",r.Expander="expander",r.ExpanderList="expander-list",r.ExpanderListExpander="expander-list-expander",r.ExpanderHierarchy="expander-hierarchy",r.ExpanderHierarchyExpander="expander-hierarchy-expander",r.FormGroup="form-group",r.FormLayout="form-layout",r.HelpBubble="help-bubble",r.HighlightBox="highlight-box",r.Icon="icon",r.Input="input",r.Label="label",r.Link="link",r.LinkList="link-list",r.List="list",r.Loader="loader",r.Logo="logo",r.Modal="modal",r.NotificationPanel="notification-panel",r.Panel="panel",r.PanelList="panel-list",r.PopMenu="pop-menu",r.PopOver="pop-over",r.Portal="portal",r.Stepper="stepper",r.RadioButton="radio-button",r.Select="select",r.Slider="slider",r.Spacer="spacer",r.StatusDot="status-dot",r.Sublabel="sublabel",r.Table="table",r.Tag="tag",r.TagList="tag-list",r.Textarea="textarea",r.Tile="tile",r.Title="title",r.Tooltip="tooltip",r.Trigger="trigger",r.Validation="validation",r))(g||{}),u=(r=>(r.Enter="Enter",r.Escape="Escape",r.ArrowDown="ArrowDown",r.ArrowUp="ArrowUp",r.Home="Home",r.End="End",r))(u||{});export{l as AVERAGE_CHARACTER_WIDTH_PX,g as AnalyticsId,p as FormMode,a as FormVariant,e as IconSize,u as KeyboardEventKey,o as ZIndex};
2
2
  //# sourceMappingURL=constants.js.map
package/constants.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export enum IconSize {\n XXSmall = 24,\n XSmall = 38,\n Small = 48,\n Medium = 64,\n Large = 80,\n XLarge = 130,\n}\n\nexport enum ZIndex {\n Modal = 1300000,\n ExpanderTrigger = 10000,\n}\n\nexport const AVERAGE_CHARACTER_WIDTH_PX = 12;\n\nexport interface HTMLButtonProps {\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEncType?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n name?: string;\n type?: 'submit' | 'reset' | 'button' | string;\n value?: string | string[] | number;\n id?: string;\n}\n\nexport type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';\n\nexport interface HTMLAnchorProps {\n download?: string;\n href?: string;\n hrefLang?: string;\n media?: string;\n ping?: string;\n rel?: AnchorTarget;\n target?: string;\n referrerPolicy?:\n | ''\n | 'same-origin'\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url';\n}\n\nexport type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;\n\nexport enum FormMode {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormVariant {\n normal = 'normal',\n bigform = 'bigform',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Close = 'close',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n Expander = 'expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n ExpanderHierarchy = 'expander-hierarchy',\n ExpanderHierarchyExpander = 'expander-hierarchy-expander',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HighlightBox = 'highlight-box',\n Icon = 'icon',\n Input = 'input',\n Label = 'label',\n Link = 'link',\n LinkList = 'link-list',\n List = 'list',\n Loader = 'loader',\n Logo = 'logo',\n Modal = 'modal',\n NotificationPanel = 'notification-panel',\n Panel = 'panel',\n PanelList = 'panel-list',\n PopMenu = 'pop-menu',\n PopOver = 'pop-over',\n Portal = 'portal',\n Stepper = 'stepper',\n RadioButton = 'radio-button',\n Select = 'select',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Sublabel = 'sublabel',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Tooltip = 'tooltip',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n Home = 'Home',\n End = 'End',\n}\n"],"names":["IconSize","ZIndex","AVERAGE_CHARACTER_WIDTH_PX","FormMode","FormVariant","AnalyticsId","KeyboardEventKey"],"mappings":"AAAY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,QAAU,EAAV,EAAA,UACAA,EAAAA,EAAA,OAAS,EAAT,EAAA,SACAA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A,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,UAAY,aACZA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,IAAM,MACNA,EAAA,QAAU,WACVA,EAAA,SAAW,WACXA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,QAAU,UACVA,EAAA,WAAa,aA/CHA,IAAAA,GAAA,CAAA,CAAA,EAkDAC,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,KAAO,OACPA,EAAA,IAAM,MANIA,IAAAA,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export enum IconSize {\n XXSmall = 24,\n XSmall = 38,\n Small = 48,\n Medium = 64,\n Large = 80,\n XLarge = 130,\n}\n\nexport enum ZIndex {\n Modal = 1300000,\n ExpanderTrigger = 10000,\n}\n\nexport const AVERAGE_CHARACTER_WIDTH_PX = 12;\n\nexport interface HTMLButtonProps {\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEncType?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n name?: string;\n type?: 'submit' | 'reset' | 'button' | string;\n value?: string | string[] | number;\n id?: string;\n}\n\nexport type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';\n\nexport interface HTMLAnchorProps {\n download?: string;\n href?: string;\n hrefLang?: string;\n media?: string;\n ping?: string;\n rel?: AnchorTarget;\n target?: string;\n referrerPolicy?:\n | ''\n | 'same-origin'\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url';\n}\n\nexport type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;\n\nexport enum FormMode {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormVariant {\n normal = 'normal',\n bigform = 'bigform',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Close = 'close',\n DictionaryTrigger = 'dictionary-trigger',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n Expander = 'expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n ExpanderHierarchy = 'expander-hierarchy',\n ExpanderHierarchyExpander = 'expander-hierarchy-expander',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HighlightBox = 'highlight-box',\n Icon = 'icon',\n Input = 'input',\n Label = 'label',\n Link = 'link',\n LinkList = 'link-list',\n List = 'list',\n Loader = 'loader',\n Logo = 'logo',\n Modal = 'modal',\n NotificationPanel = 'notification-panel',\n Panel = 'panel',\n PanelList = 'panel-list',\n PopMenu = 'pop-menu',\n PopOver = 'pop-over',\n Portal = 'portal',\n Stepper = 'stepper',\n RadioButton = 'radio-button',\n Select = 'select',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Sublabel = 'sublabel',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Tooltip = 'tooltip',\n Trigger = 'trigger',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n Home = 'Home',\n End = 'End',\n}\n"],"names":["IconSize","ZIndex","AVERAGE_CHARACTER_WIDTH_PX","FormMode","FormVariant","AnalyticsId","KeyboardEventKey"],"mappings":"AAAY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,QAAU,EAAV,EAAA,UACAA,EAAAA,EAAA,OAAS,EAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,EA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,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,UAAY,aACZA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,IAAM,MACNA,EAAA,QAAU,WACVA,EAAA,SAAW,WACXA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,WAAa,aAjDHA,IAAAA,GAAA,CAAA,CAAA,EAoDAC,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,KAAO,OACPA,EAAA,IAAM,MANIA,IAAAA,GAAA,CAAA,CAAA"}
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "https://github.com/helsenorge/designsystem"
8
8
  },
9
9
  "homepage": "https://helsenorge.design",
10
- "version": "4.2.4",
10
+ "version": "4.3.1",
11
11
  "author": "Helsenorge",
12
12
  "license": "MIT",
13
13
  "peerDependencies": {
@@ -127,3 +127,18 @@ $palette-map: (
127
127
  'black': $black,
128
128
  'white': $white,
129
129
  );
130
+
131
+ /**
132
+ * Konverter en gjennomsiktig farge til en ugjennomsiktig farge ved å simulere fargen plassert
133
+ * på en bakgrunnsfarge (f.eks. 50% gjennomsiktig $blueberry200 på hvit bakgrunn).
134
+ *
135
+ * Fra https://makandracards.com/makandra/42500-sass-how-to-convert-an-rgba-color-to-its-rgb-look-alike
136
+ *
137
+ * @param $rgba Farge med alpha-verdi, f.eks. rgba(black, 0.67)
138
+ * @param $background Bakgrunnsfarge. Default: $white
139
+ *
140
+ * @returns Farge uten gjennomsiktighet
141
+ */
142
+ @function rgba-to-rgb($rgba, $background: $white) {
143
+ @return mix(rgb(red($rgba), green($rgba), blue($rgba)), $background, alpha($rgba) * 100%);
144
+ }