@kvdbil/components 16.0.8 → 17.0.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 (107) hide show
  1. package/README.md +2 -1
  2. package/cjs/components/Accordion/index.js +8 -8
  3. package/cjs/components/Badge/index.js +5 -5
  4. package/cjs/components/Breadcrumbs/BreadcrumbsItem.js +5 -5
  5. package/cjs/components/Breadcrumbs/index.js +2 -2
  6. package/cjs/components/Button/index.js +14 -13
  7. package/cjs/components/Card/index.js +5 -5
  8. package/cjs/components/CheckBox/index.js +7 -7
  9. package/cjs/components/Chip/index.js +6 -6
  10. package/cjs/components/Dialog/index.js +1 -1
  11. package/cjs/components/ErrorMessage/index.js +2 -2
  12. package/cjs/components/Icon/index.js +4 -4
  13. package/cjs/components/Link/index.js +4 -6
  14. package/cjs/components/ListItem/index.js +3 -3
  15. package/cjs/components/MenuItem/index.js +1 -1
  16. package/cjs/components/Message/index.js +21 -10
  17. package/cjs/components/Modal/FocudTrap.js +3 -0
  18. package/cjs/components/Modal/index.js +23 -16
  19. package/cjs/components/OffCanvas/index.js +4 -4
  20. package/cjs/components/RadioButton/index.js +17 -17
  21. package/cjs/components/RegistrationPlate/index.js +3 -3
  22. package/cjs/components/Snackbar/index.js +23 -19
  23. package/cjs/components/Spinner/index.js +9 -9
  24. package/cjs/components/SpinnerThin/index.js +6 -7
  25. package/cjs/components/Stepper/index.js +10 -10
  26. package/cjs/components/StepperAccordion/index.js +18 -24
  27. package/cjs/components/Switcher/index.js +6 -6
  28. package/cjs/components/Table/index.js +9 -9
  29. package/cjs/components/Tabs/Tab.js +1 -2
  30. package/cjs/components/Tabs/Tabs.js +1 -1
  31. package/cjs/components/TextArea/index.js +12 -12
  32. package/cjs/components/Textfield/index.js +3 -3
  33. package/cjs/components/TimePicker/index.js +2 -2
  34. package/cjs/components/Toggle/index.js +6 -6
  35. package/cjs/components/ToggleArrow/index.js +2 -2
  36. package/cjs/components/ValuationRange/index.js +15 -15
  37. package/cjs/index.js +1 -1
  38. package/esm/components/Accordion/index.js +9 -9
  39. package/esm/components/Badge/index.js +7 -7
  40. package/esm/components/Breadcrumbs/BreadcrumbsItem.js +6 -6
  41. package/esm/components/Breadcrumbs/index.js +2 -2
  42. package/esm/components/Button/index.js +16 -15
  43. package/esm/components/Card/index.js +1 -1
  44. package/esm/components/CheckBox/index.js +7 -7
  45. package/esm/components/Chip/index.js +20 -20
  46. package/esm/components/Dialog/index.js +1 -1
  47. package/esm/components/ErrorMessage/index.js +2 -2
  48. package/esm/components/Icon/index.js +1 -1
  49. package/esm/components/Link/index.js +6 -8
  50. package/esm/components/ListItem/index.js +4 -4
  51. package/esm/components/MenuItem/index.js +2 -2
  52. package/esm/components/Message/index.js +21 -10
  53. package/esm/components/Modal/FocudTrap.js +3 -0
  54. package/esm/components/Modal/index.js +23 -16
  55. package/esm/components/OffCanvas/index.js +15 -11
  56. package/esm/components/RadioButton/index.js +12 -12
  57. package/esm/components/RegistrationPlate/index.js +4 -4
  58. package/esm/components/Snackbar/index.js +26 -22
  59. package/esm/components/Spinner/index.js +5 -5
  60. package/esm/components/SpinnerThin/index.js +9 -10
  61. package/esm/components/Stepper/index.js +30 -30
  62. package/esm/components/StepperAccordion/index.js +26 -32
  63. package/esm/components/Switcher/index.js +6 -6
  64. package/esm/components/Table/index.js +5 -5
  65. package/esm/components/Tabs/Tab.js +3 -4
  66. package/esm/components/Tabs/Tabs.js +1 -1
  67. package/esm/components/TextArea/index.js +16 -16
  68. package/esm/components/Textfield/index.js +16 -16
  69. package/esm/components/TimePicker/index.js +2 -2
  70. package/esm/components/Toggle/index.js +12 -12
  71. package/esm/components/ToggleArrow/index.js +3 -3
  72. package/esm/components/ValuationRange/index.js +15 -15
  73. package/esm/index.js +1 -1
  74. package/package.json +4 -5
  75. package/package.json.tmp +4 -5
  76. package/types/components/Badge/index.d.ts +2 -1
  77. package/types/components/Chip/index.d.ts +4 -4
  78. package/types/components/Modal/FocudTrap.d.ts +4 -0
  79. package/types/components/Spinner/index.d.ts +5 -2
  80. package/types/components/SpinnerThin/index.d.ts +6 -1
  81. package/types/components/Stepper/index.d.ts +8 -1
  82. package/types/components/StepperAccordion/index.d.ts +1 -1
  83. package/types/components/Switcher/index.d.ts +2 -1
  84. package/types/components/Table/index.d.ts +2 -1
  85. package/types/components/Toggle/index.d.ts +2 -1
  86. package/types/components/ValuationRange/index.d.ts +6 -1
  87. package/cjs/components/DayPicker/DayPickerNavBar.js +0 -25
  88. package/cjs/components/Icons/Arrow.js +0 -1
  89. package/cjs/components/Icons/CheckCircle.js +0 -1
  90. package/cjs/components/Icons/CheckIcon.js +0 -1
  91. package/cjs/components/Icons/Close.js +0 -1
  92. package/cjs/components/Icons/ErrorCircle.js +0 -1
  93. package/cjs/components/Icons/InfoCircle.js +0 -1
  94. package/esm/components/DayPicker/DayPickerNavBar.js +0 -25
  95. package/esm/components/Icons/Arrow.js +0 -1
  96. package/esm/components/Icons/CheckCircle.js +0 -1
  97. package/esm/components/Icons/CheckIcon.js +0 -1
  98. package/esm/components/Icons/Close.js +0 -1
  99. package/esm/components/Icons/ErrorCircle.js +0 -1
  100. package/esm/components/Icons/InfoCircle.js +0 -1
  101. package/types/components/DayPicker/DayPickerNavBar.d.ts +0 -9
  102. package/types/components/Icons/Arrow.d.ts +0 -5
  103. package/types/components/Icons/CheckCircle.d.ts +0 -5
  104. package/types/components/Icons/CheckIcon.d.ts +0 -5
  105. package/types/components/Icons/Close.d.ts +0 -5
  106. package/types/components/Icons/ErrorCircle.d.ts +0 -5
  107. package/types/components/Icons/InfoCircle.d.ts +0 -5
@@ -1,20 +1,20 @@
1
- import{jsx as i,jsxs as x}from"react/jsx-runtime";import t from"styled-components";import v from"../../icons/components/CloseIcon.js";import{getFontSize as y,getCursorType as p,getBackgroundColor as C,getColor as $,getBorderColor as k,getHoverBorderColor as z,getHoverBackgroundColor as B,getHoverColor as D,getActiveBackgroundColor as b,getActiveBorderColor as j,getActiveColor as H,getSufixHoverBackgroundColor as w}from"./styles.js";import"../../utils/utils.js";const A={small:"2px 16px",regular:"3px 16px",large:"7px 16px"},S=t.div`
1
+ import{jsx as l,jsxs as k}from"react/jsx-runtime";import a from"styled-components";import C from"../../icons/components/CloseIcon.js";import{getFontSize as $,getCursorType as b,getBackgroundColor as D,getColor as z,getBorderColor as B,getHoverBorderColor as H,getHoverBackgroundColor as j,getHoverColor as w,getActiveBackgroundColor as m,getActiveBorderColor as A,getActiveColor as F,getSufixHoverBackgroundColor as I}from"./styles.js";import"../../utils/utils.js";const P={small:"2px 16px",regular:"3px 16px",large:"7px 16px"},S=a.div`
2
2
  font-family: ${({theme:e})=>e.typography.fontBaseFamily};
3
- font-size: ${({size:e})=>y(e)};
3
+ font-size: ${({size:e})=>$(e)};
4
4
  font-weight: ${({theme:e})=>e.typography.fontBaseBoldWeight};
5
5
  line-height: 1.25;
6
6
  letter-spacing: 0.1px;
7
7
  display: inline-flex;
8
- cursor: ${p};
8
+ cursor: ${b};
9
9
  align-items: center;
10
- background: ${C};
11
- color: ${$};
10
+ background: ${D};
11
+ color: ${z};
12
12
  justify-content: center;
13
13
  border-width: 1px;
14
14
  border-style: solid;
15
- border-color: ${k};
15
+ border-color: ${B};
16
16
  border-radius: 1.293rem;
17
- padding: ${({size:e,isDeletable:l})=>l?"0 0.5rem 0 1rem":A[e]};
17
+ padding: ${({size:e,isDeletable:n})=>n?"0 0.5rem 0 1rem":P[e]};
18
18
  transition:
19
19
  color 0.3s ease,
20
20
  background-color 0.3s ease,
@@ -22,28 +22,28 @@ import{jsx as i,jsxs as x}from"react/jsx-runtime";import t from"styled-component
22
22
  box-sizing: border-box;
23
23
 
24
24
  ${e=>!e.isDisabled&&e.isClickable&&` &:hover {
25
- border-color: ${z(e)};
26
- background-color: ${B(e)};
27
- color: ${D(e)};
25
+ border-color: ${H(e)};
26
+ background-color: ${j(e)};
27
+ color: ${w(e)};
28
28
  } &:active {
29
- background-color: ${b(e)};
30
- border-color: ${j(e)};
31
- color: ${H(e)};
29
+ background-color: ${m(e)};
30
+ border-color: ${A(e)};
31
+ color: ${F(e)};
32
32
  }`}
33
- `,F=t.span`
33
+ `,T=a.span`
34
34
  display: flex;
35
35
  align-items: center;
36
36
  justify-content: center;
37
37
  text-align: center;
38
38
  line-height: 1.5;
39
- `,I=t.span`
39
+ `,W=a.span`
40
40
  margin-right: 0.625rem;
41
41
  display: flex;
42
42
  align-items: center;
43
- `,N=t.span`
43
+ `,E=a.span`
44
44
  display: flex;
45
45
  align-items: center;
46
- cursor: ${p};
46
+ cursor: ${b};
47
47
  padding: 0.5rem;
48
48
  margin-left: 0.25rem;
49
49
  margin-right: -0.25rem;
@@ -59,16 +59,16 @@ import{jsx as i,jsxs as x}from"react/jsx-runtime";import t from"styled-component
59
59
  width: 80%;
60
60
  border-radius: 50%;
61
61
  z-index: -1;
62
- background-color: ${w};
62
+ background-color: ${I};
63
63
  opacity: 0;
64
64
  }
65
65
 
66
66
  &:active:before {
67
- background-color: ${b};
67
+ background-color: ${m};
68
68
  opacity: 1;
69
69
  }
70
70
 
71
71
  &:hover:before {
72
72
  opacity: 1;
73
73
  }
74
- `,m=({color:e="primary",children:l,component:u="div",isDisabled:r,onClick:s,size:h="regular",prefix:n,onDelete:a,variant:c="solid",...f})=>{const o=!!(s&&!r),d=!!(a&&!r);return i(S,{...f,role:o?"button":void 0,onClick:o?s:void 0,tabIndex:o?0:void 0,as:o?"button":u,color:e,isDisabled:r,size:h,isClickable:o,isDeletable:d,variant:c,hasPrefix:!!n,children:x(F,{children:[n&&i(I,{className:"prefix",children:n}),l,a&&i(N,{role:"button",onClick:d?g=>{g.stopPropagation(),a?.(g)}:void 0,color:e,variant:c,isClickable:o,isDisabled:r,isDeletable:!0,size:"regular",children:i(v,{})})]})})};export{m as Chip,m as default};
74
+ `,u=({color:e="primary",children:n,component:f,isDisabled:r,onClick:d,size:h="regular",prefix:s,onDelete:c,variant:g="solid",role:x,...v})=>{const i=!!(d&&!r),t=!!(c&&!r),y=!!s,p=o=>{o.stopPropagation(),c?.(o)};return l(S,{...v,role:x??(i?"button":void 0),onClick:i?d:void 0,tabIndex:i?0:void 0,as:f??(i?"button":"div"),color:e,isDisabled:r,size:h,isClickable:i,isDeletable:t,variant:g,hasPrefix:y,"aria-disabled":r,children:k(T,{children:[s&&l(W,{className:"prefix",children:s}),n,c&&l(E,{role:"button","aria-label":"Remove","aria-disabled":r,onClick:t?p:void 0,color:e,variant:g,isClickable:i,isDisabled:r,isDeletable:!0,size:"regular",tabIndex:t?0:void 0,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&t&&(o.preventDefault(),p(o))},children:l(C,{})})]})})};export{u as Chip,u as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as d,jsx as i}from"react/jsx-runtime";import r from"styled-components";import{Modal as f}from"../Modal/index.js";import h from"../../theme.js";import{TinyTitleBold as c}from"../../typography/Heading/index.js";import"react";import"react-dom";import"react-transition-group";import"../Icons/Close.js";import"../../shared/media-queries.js";const g=r(c)`
1
+ import{jsxs as d,jsx as i}from"react/jsx-runtime";import r from"styled-components";import{Modal as f}from"../Modal/index.js";import h from"../../theme.js";import{TinyTitleBold as c}from"../../typography/Heading/index.js";import"react";import"react-dom";import"react-transition-group";import"../../icons/components/CloseIcon.js";import"../../utils/utils.js";import"../Modal/FocudTrap.js";import"../../shared/media-queries.js";const g=r(c)`
2
2
  font-weight: ${h.typography.fontAlternativeRegularWeight};
3
3
  margin: 0;
4
4
  `,w=r.div`
@@ -1,4 +1,4 @@
1
- import{jsx as n}from"react/jsx-runtime";import a from"styled-components";const i=a.div`
1
+ import{jsx as a}from"react/jsx-runtime";import i from"styled-components";const n=i.div`
2
2
  font-family: ${({theme:e})=>e.typography.fontAlternativeFamily};
3
3
  font-weight: ${({theme:e})=>e.typography.fontAlternativeRegularWeight};
4
4
  background: ${({theme:e})=>e.colors.error.lighter};
@@ -7,4 +7,4 @@ import{jsx as n}from"react/jsx-runtime";import a from"styled-components";const i
7
7
  font-size: 13px;
8
8
  padding: 10px;
9
9
  ${({centered:e})=>e&&"text-align: center;"}
10
- `,r=({children:e,centered:t,...o})=>n(i,{centered:t,...o,children:e});export{r as ErrorMessage,r as default};
10
+ `,r=({children:e,centered:t,...o})=>a(n,{centered:t,role:"alert","aria-live":"assertive",...o,children:e});export{r as ErrorMessage,r as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as c,Fragment as u,jsx as e}from"react/jsx-runtime";import{useState as x}from"react";import i from"styled-components";import{Caption as h}from"../../typography/BodyText/index.js";import{Title as b}from"../../typography/Heading/index.js";import p from"../../theme.js";import{Snackbar as k}from"../Snackbar/index.js";import"../../shared/media-queries.js";import"../Icons/CheckCircle.js";import"../Icons/Close.js";import"../Icons/ErrorCircle.js";import"../Icons/InfoCircle.js";import"react-transition-group";import"../../utils/utils.js";const w=i.div`
1
+ import{jsxs as c,Fragment as u,jsx as e}from"react/jsx-runtime";import{useState as x}from"react";import i from"styled-components";import{Caption as h}from"../../typography/BodyText/index.js";import{Title as b}from"../../typography/Heading/index.js";import p from"../../theme.js";import{Snackbar as k}from"../Snackbar/index.js";import"../../shared/media-queries.js";import"react-transition-group";import"../../utils/utils.js";import"../../icons/components/AlertIcon.js";import"../../icons/components/CheckCircleIcon.js";import"../../icons/components/CloseIcon.js";import"../../icons/components/InfoIcon.js";const w=i.div`
2
2
  margin: 0 auto;
3
3
  max-width: 700px;
4
4
  `,y=i(b)`
@@ -1,14 +1,12 @@
1
- import{jsxs as F,jsx as t,Fragment as W}from"react/jsx-runtime";import{Status as z,CaptionLink as I,Caption2 as v,Caption as U,BodyText as _,BodyLink as j}from"../../typography/BodyText/index.js";import l,{css as H}from"styled-components";import f from"../../theme.js";import{Display3 as R,Display2 as J,Display1 as K,TinyTitleBold as M,TinyTitleRegular as N,Subtitle as O,Title as P,Headline as Q}from"../../typography/Heading/index.js";import{Button as V}from"../Button/index.js";import{Link as q}from"react-router-dom";import"../../shared/media-queries.js";import"react";import"../Spinner/index.js";import"../../utils/utils.js";import"../../typography/ButtonText/index.js";import"../Button/styles.js";const h=H`
1
+ import{jsxs as F,jsx as i,Fragment as v}from"react/jsx-runtime";import{Status as I,CaptionLink as W,Caption2 as z,Caption as U,BodyText as _,BodyLink as j}from"../../typography/BodyText/index.js";import h,{css as H}from"styled-components";import f from"../../theme.js";import{Display3 as R,Display2 as J,Display1 as K,TinyTitleBold as M,TinyTitleRegular as O,Subtitle as P,Title as V,Headline as q}from"../../typography/Heading/index.js";import{Button as A}from"../Button/index.js";import{Link as E}from"react-router-dom";import"../../shared/media-queries.js";import"react";import"../Spinner/index.js";import"../../utils/utils.js";import"../../typography/ButtonText/index.js";import"../Button/styles.js";const m=H`
2
2
  text-decoration: ${({$withUnderline:n})=>n?`underline ${f.colors.info.dark}`:"none"};
3
3
 
4
4
  span {
5
5
  color: ${({$isButton:n})=>!n&&`${f.colors.info.dark}`};
6
6
  font-weight: 600;
7
7
  }
8
- `,A=l.a`
9
- ${h}
10
- `,E=l(q)`
11
- ${h}
12
- `,G=l(V)`
13
- font-family: ${({$fontFamily:n})=>`${n}, sans-serif`};
14
- `;function X(n,r){switch(r){case"BodyLink":return t(j,{as:"span",children:n});case"BodyText":return t(_,{as:"span",children:n});case"Caption":return t(U,{as:"span",children:n});case"Caption2":return t(v,{as:"span",children:n});case"CaptionLink":return t(I,{as:"span",children:n});case"Status":return t(z,{as:"span",children:n});case"Headline":return t(Q,{as:"span",children:n});case"Title":return t(P,{as:"span",children:n});case"Subtitle":return t(O,{as:"span",children:n});case"TinyTitleRegular":return t(N,{as:"span",children:n});case"TinyTitleBold":return t(M,{as:"span",children:n});case"Display1":return t(K,{as:"span",children:n});case"Display2":return t(J,{as:"span",children:n});case"Display3":return t(R,{as:"span",children:n})}}const Y=(n,r,o,e,i)=>F(W,{children:[r,o?t(G,{color:i.color,colorShade:i.colorShade,variant:i.variant,fullWidth:i.fullWidth,size:i.size,prefixIcon:i.prefixIcon,$fontFamily:i.fontFamily,isDisabled:i.isDisabled,children:n}):n&&X(n,e)]}),m=({path:n,text:r,url:o,rel:e,ariaLabel:i,typographyType:y="BodyLink",target:s,isButton:c=!1,buttonColor:b="primary",buttonColorShade:k,buttonVariant:$,fullWidth:x,buttonSize:T,withUnderline:B=!1,buttonPrefixIcon:D,children:w,fontFamily:L="Next Book",isDisabled:S=!1})=>{const a=o??n??"",d=a.startsWith("http")&&typeof window<"u"&&!a.includes(window.location.hostname),g=()=>{if(e)return e;if(s==="_blank")return d?"noopener noreferrer":"noopener"},C={color:b,colorShade:k,variant:$,fullWidth:x,size:T,prefixIcon:D,fontFamily:L,isDisabled:S},p={$isButton:c,$withUnderline:B,rel:g(),"aria-label":i},u=Y(r,w,c,y,C);return d?t(A,{href:a,target:s??"_blank",...p,"data-testid":"external-link",children:u}):t(E,{to:a,target:s??"_self",...p,"data-testid":"internal-link",children:u})};export{m as Link,m as default};
8
+ `,G=h.a`
9
+ ${m}
10
+ `,N=h(E)`
11
+ ${m}
12
+ `;function Q(n,r){switch(r){case"BodyLink":return i(j,{as:"span",children:n});case"BodyText":return i(_,{as:"span",children:n});case"Caption":return i(U,{as:"span",children:n});case"Caption2":return i(z,{as:"span",children:n});case"CaptionLink":return i(W,{as:"span",children:n});case"Status":return i(I,{as:"span",children:n});case"Headline":return i(q,{as:"span",children:n});case"Title":return i(V,{as:"span",children:n});case"Subtitle":return i(P,{as:"span",children:n});case"TinyTitleRegular":return i(O,{as:"span",children:n});case"TinyTitleBold":return i(M,{as:"span",children:n});case"Display1":return i(K,{as:"span",children:n});case"Display2":return i(J,{as:"span",children:n});case"Display3":return i(R,{as:"span",children:n})}}const X=(n,r,o,a,t)=>F(v,{children:[r,o?i(A,{as:"span",color:t.color,colorShade:t.colorShade,variant:t.variant,fullWidth:t.fullWidth,size:t.size,prefixIcon:t.prefixIcon,isDisabled:t.isDisabled,style:{display:"inline-flex",fontFamily:t.fontFamily?`${t.fontFamily}, sans-serif`:void 0},children:n}):n&&Q(n,a)]}),y=({path:n,text:r,url:o,rel:a,ariaLabel:t,typographyType:b="BodyLink",target:s,isButton:d=!1,buttonColor:k="primary",buttonColorShade:x,buttonVariant:T,fullWidth:$,buttonSize:B,withUnderline:D=!1,buttonPrefixIcon:w,children:L,fontFamily:S,isDisabled:l=!1})=>{const e=o??n??"",c=e.startsWith("http")&&typeof window<"u"&&!e.includes(window.location.hostname),g=()=>{if(a)return a;if(s==="_blank")return c?"noopener noreferrer":"noopener"},C={color:k,colorShade:x,variant:T,fullWidth:$,size:B,prefixIcon:w,fontFamily:S,isDisabled:l},p={$isButton:d,$withUnderline:D,rel:g(),"aria-label":t},u=X(r,L,d,b,C);return c?i(G,{href:e,target:s??"_blank",...p,"data-testid":"external-link",children:u}):i(N,{to:e,target:s??"_self",...p,"data-testid":"internal-link","aria-disabled":l,tabIndex:l?-1:void 0,children:u})};export{y as Link,y as default};
@@ -1,15 +1,15 @@
1
- import{jsxs as d,jsx as l}from"react/jsx-runtime";import i from"styled-components";import{BodyText as m}from"../../typography/BodyText/index.js";import{TinyTitleBold as a}from"../../typography/Heading/index.js";import"../../shared/media-queries.js";const p=i.li`
1
+ import{jsxs as d,jsx as l}from"react/jsx-runtime";import i from"styled-components";import{BodyText as m}from"../../typography/BodyText/index.js";import{TinyTitleBold as c}from"../../typography/Heading/index.js";import"../../shared/media-queries.js";const s=i.li`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  padding-bottom: 20px;
5
5
  &:last-child {
6
6
  padding-bottom: 0;
7
7
  }
8
- `,s=i.div`
8
+ `,h=i.div`
9
9
  display: flex;
10
10
  align-items: center;
11
11
  margin: 0;
12
- `,h=i(a)`
12
+ `,p=i(c)`
13
13
  margin: 0;
14
14
  `,x=i.div`
15
15
  display: flex;
@@ -21,4 +21,4 @@ import{jsxs as d,jsx as l}from"react/jsx-runtime";import i from"styled-component
21
21
  }
22
22
  `,g=i.div`
23
23
  padding-left: ${({hasIcon:t})=>t?"54px":0};
24
- `,f=({title:t,text:n,icon:e,component:r="li",children:o,...c})=>d(p,{as:r,...c,children:[d(s,{children:[e&&l(x,{children:e}),l(h,{children:t})]}),l(g,{hasIcon:!!e,children:d(m,{children:[n,o]})})]});export{f as default};
24
+ `,f=({title:t,text:n,icon:e,component:o="li",children:r,...a})=>d(s,{as:o,role:o!=="li"?"listitem":void 0,...a,children:[d(h,{children:[e&&l(x,{"aria-hidden":"true",children:e}),l(p,{as:"h4",children:t})]}),(n||r)&&l(g,{hasIcon:!!e,children:d(m,{children:[n,r]})})]});export{f as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as h,jsx as r}from"react/jsx-runtime";import t from"styled-components";import n from"../../theme.js";const o={1:{size:"2rem",lineHeight:"3rem",bottom:"2rem",fontFamily:n.typography.fontAlternativeFamily},2:{size:"1.5rem",lineHeight:"2.5rem",bottom:"1rem",fontFamily:n.typography.fontAlternativeFamily},3:{size:"1rem",lineHeight:"1.5rem",bottom:"1rem",fontFamily:n.typography.fontBaseFamily}},g=t.li`
1
+ import{jsxs as s,jsx as r}from"react/jsx-runtime";import t from"styled-components";import n from"../../theme.js";const o={1:{size:"2rem",lineHeight:"3rem",bottom:"2rem",fontFamily:n.typography.fontAlternativeFamily},2:{size:"1.5rem",lineHeight:"2.5rem",bottom:"1rem",fontFamily:n.typography.fontAlternativeFamily},3:{size:"1rem",lineHeight:"1.5rem",bottom:"1rem",fontFamily:n.typography.fontBaseFamily}},g=t.li`
2
2
  list-style-type: none;
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -35,4 +35,4 @@ import{jsxs as h,jsx as r}from"react/jsx-runtime";import t from"styled-component
35
35
  font-family: ${({theme:e})=>e.typography.fontBaseFamily};
36
36
  color: ${({theme:e})=>e.colors.text.dark};
37
37
  margin-top: ${({level:e})=>e===3?"0.25rem":0};
38
- `,f=({preamble:e,title:l,level:i,component:p="li",children:y,...s})=>{const a=!!e;return h(g,{as:p,...s,hasPreamble:a,children:[l&&r(v,{children:l}),h(c,{level:i,children:[r(d,{level:i,hasPreamble:a,children:y}),e&&r($,{level:i,children:e})]})]})};export{f as MenuItem,f as default};
38
+ `,f=({preamble:e,title:l,level:i,component:a="li",children:p,...y})=>{const h=!!e;return s(g,{as:a,role:a!=="li"?"listitem":void 0,...y,hasPreamble:h,children:[l&&r(v,{as:"h3",children:l}),s(c,{level:i,children:[r(d,{level:i,hasPreamble:h,children:p}),e&&r($,{level:i,children:e})]})]})};export{f as MenuItem,f as default};
@@ -1,9 +1,9 @@
1
- import{jsx as o,jsxs as a}from"react/jsx-runtime";import{useRef as h,useState as x}from"react";import s from"styled-components";import{TinyTitleRegular as k}from"../../typography/Heading/index.js";import y from"../../icons/components/AlertIcon.js";import b from"../../icons/components/CheckCircleIcon.js";import $ from"../../icons/components/CloseIcon.js";import v from"../../icons/components/InfoIcon.js";import w from"../../icons/components/WarningIcon.js";import"../../shared/media-queries.js";const C=(e,t,r)=>{const n=r.colors.text.dark,i=r.colors.background.light;switch(e){case"info":return{text:t?r.colors.info.dark:n,background:t?i:r.colors.info.lighter};case"success":return{text:t?r.colors.success.dark:n,background:t?i:r.colors.success.lighter};case"warning":return{text:t?r.colors.warning.dark:n,background:t?i:r.colors.warning.lighter};case"error":return{text:t?r.colors.error.dark:n,background:t?i:r.colors.error.lighter};case"text":default:return{text:t?r.colors.text.light:n,background:t?r.colors.background.dark:i}}},T=e=>{switch(e){case"success":return o(b,{});case"warning":return o(w,{});case"error":return o(y,{});case"info":case"text":default:return o(v,{})}},j=s.div`
1
+ import{jsx as o,jsxs as a}from"react/jsx-runtime";import{useRef as h,useState as x}from"react";import s from"styled-components";import{TinyTitleRegular as v}from"../../typography/Heading/index.js";import b from"../../icons/components/AlertIcon.js";import k from"../../icons/components/CheckCircleIcon.js";import y from"../../icons/components/CloseIcon.js";import $ from"../../icons/components/InfoIcon.js";import w from"../../icons/components/WarningIcon.js";import{resetButtonStyle as C}from"../../utils/utils.js";import"../../shared/media-queries.js";const T=(e,r,t)=>{const n=t.colors.text.dark,i=t.colors.background.light;switch(e){case"info":return{text:r?t.colors.info.dark:n,background:r?i:t.colors.info.lighter};case"success":return{text:r?t.colors.success.dark:n,background:r?i:t.colors.success.lighter};case"warning":return{text:r?t.colors.warning.dark:n,background:r?i:t.colors.warning.lighter};case"error":return{text:r?t.colors.error.dark:n,background:r?i:t.colors.error.lighter};case"text":default:return{text:r?t.colors.text.light:n,background:r?t.colors.background.dark:i}}},j=e=>{switch(e){case"success":return o(k,{});case"warning":return o(w,{});case"error":return o(b,{});case"info":case"text":default:return o($,{})}},D=s.div`
2
2
  ${({isDeleted:e})=>e&&`
3
3
  opacity: 0;
4
4
  transition: opacity 0.3s;
5
5
  `}
6
- `,D=s.div`
6
+ `,W=s.div`
7
7
  display: ${({fullWidth:e})=>e?"flex":"inline-flex"};
8
8
  ${({fullWidth:e})=>e&&"justify-content: space-between;"}
9
9
  align-items: center;
@@ -14,25 +14,36 @@ import{jsx as o,jsxs as a}from"react/jsx-runtime";import{useRef as h,useState as
14
14
  justify-content: center;
15
15
  `}
16
16
 
17
- ${({theme:e,messageType:t,inverted:r})=>{const{text:n,background:i}=C(t,r,e);return`
17
+ ${({theme:e,messageType:r,inverted:t})=>{const{text:n,background:i}=T(r,t,e);return`
18
18
  color: ${n};
19
19
  background-color: ${i};
20
20
  `}}
21
- `,W=s.div`
22
- display: flex;
23
21
  `,R=s.div`
22
+ display: flex;
23
+ `,S=s.div`
24
24
  padding: 0.75rem 0;
25
- `,z=s(k)`
25
+ `,z=s(v)`
26
26
  margin: 0;
27
27
  `,P=s.span`
28
28
  display: flex;
29
29
  align-items: center;
30
30
  margin-right: 1rem;
31
31
  font-size: 1.5rem;
32
- `,A=s.span`
32
+ `,A=s.button`
33
+ ${C}
33
34
  display: flex;
34
35
  align-items: center;
35
36
  margin-left: 1rem;
36
- font-size: 2.5rem;
37
- cursor: pointer;
38
- `,E=({children:e,type:t,withIcon:r=!1,isDeletable:n=!1,fullWidth:i=!1,inverted:c=!1,textCenter:d=!1,...u})=>{const l=h(null),[f,m]=x(!1),g=p=>{p.stopPropagation(),m(!0),setTimeout(()=>{l.current&&l.current.remove()},300)};return o(j,{isDeleted:f,children:a(D,{messageType:t,fullWidth:i,inverted:c,textCenter:d,role:"alert",ref:l,...u,children:[a(W,{children:[r&&o(P,{children:T(t)}),a(R,{children:[typeof e=="string"&&o(z,{children:e}),typeof e!="string"&&e]})]}),n&&o(A,{onClick:g,"aria-label":"Close",children:o($,{})})]})})};export{E as default};
37
+
38
+ &:focus-visible {
39
+ outline: revert;
40
+ }
41
+
42
+ &:hover {
43
+ cursor: pointer;
44
+ }
45
+
46
+ svg {
47
+ font-size: 2.5rem;
48
+ }
49
+ `,B=({children:e,type:r,withIcon:t=!1,isDeletable:n=!1,fullWidth:i=!1,inverted:c=!1,textCenter:d=!1,...u})=>{const l=h(null),[f,m]=x(!1),g=p=>{p.stopPropagation(),m(!0),setTimeout(()=>{l.current&&l.current.remove()},300)};return o(D,{isDeleted:f,children:a(W,{messageType:r,fullWidth:i,inverted:c,textCenter:d,role:r==="error"||r==="warning"?"alert":void 0,"aria-live":r==="error"||r==="warning"?"assertive":"polite",ref:l,...u,children:[a(R,{children:[t&&o(P,{children:j(r)}),a(S,{children:[typeof e=="string"&&o(z,{children:e}),typeof e!="string"&&e]})]}),n&&o(A,{onClick:g,"aria-label":"Close",type:"button",children:o(y,{})})]})})};export{B as default};
@@ -0,0 +1,3 @@
1
+ import{jsx as u}from"react/jsx-runtime";import{useRef as a,useEffect as m}from"react";import b from"styled-components";const p=b.div`
2
+ display: flex;
3
+ `,h=({children:s})=>{const o=a(null);return m(()=>{const d=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'],n=o.current;if(!n)return;const e=Array.from(n.querySelectorAll(d.join(","))),i=r=>{if(r.key!=="Tab")return;if(e.length===0){r.preventDefault();return}const f=e[0],c=e[e.length-1],t=e.findIndex(l=>document.activeElement===l);r.preventDefault(),r.shiftKey?t===-1||t===0?c.focus():e[t-1].focus():t===-1||t===e.length-1?f.focus():e[t+1].focus()};return n.addEventListener("keydown",i),()=>{n.removeEventListener("keydown",i)}},[]),u(p,{ref:o,children:s})};export{h as FocusTrap};
@@ -1,4 +1,4 @@
1
- import{jsx as t,jsxs as e,Fragment as x}from"react/jsx-runtime";import{useEffect as b}from"react";import{createPortal as f}from"react-dom";import{CSSTransition as y}from"react-transition-group";import o,{css as k,createGlobalStyle as d}from"styled-components";import v from"../Icons/Close.js";const s=k`
1
+ import{jsx as t,jsxs as a,Fragment as y}from"react/jsx-runtime";import{useRef as c,useEffect as v}from"react";import{createPortal as k}from"react-dom";import{CSSTransition as T}from"react-transition-group";import o,{css as E,createGlobalStyle as l}from"styled-components";import C from"../../icons/components/CloseIcon.js";import{resetButtonStyle as S}from"../../utils/utils.js";import{FocusTrap as $}from"./FocudTrap.js";const u=E`
2
2
  .backgroundTransition-enter {
3
3
  opacity: 0;
4
4
  }
@@ -16,21 +16,21 @@ import{jsx as t,jsxs as e,Fragment as x}from"react/jsx-runtime";import{useEffect
16
16
  opacity: 0;
17
17
  transition: opacity 0.25s ease-in-out;
18
18
  }
19
- `,T=o.div`
20
- ${s}
19
+ `,j=o.div`
20
+ ${u}
21
21
  position: fixed;
22
22
  width: 100%;
23
23
  height: 100%;
24
24
  top: 0;
25
25
  left: 0;
26
26
  z-index: 200;
27
- `,E=o.div`
27
+ `,z=o.div`
28
28
  z-index: -1;
29
29
  position: absolute;
30
30
  width: 100%;
31
31
  height: 100%;
32
32
  background-color: rgba(34, 34, 34, 0.3);
33
- `,C=o.div`
33
+ `,I=o.div`
34
34
  position: relative;
35
35
  max-width: 512px;
36
36
  padding: 1rem;
@@ -53,20 +53,27 @@ import{jsx as t,jsxs as e,Fragment as x}from"react/jsx-runtime";import{useEffect
53
53
  margin-right: auto;
54
54
  min-width: 355px;
55
55
  }
56
- `,S=o.div`
57
- position: absolute;
58
- top: 1rem;
59
- right: 1rem;
60
56
 
61
- :hover {
57
+ &:focus-visible {
58
+ outline: none;
59
+ }
60
+ `,L=o.button`
61
+ ${S}
62
+ display: flex;
63
+ justify-self: flex-end;
64
+
65
+ &:focus-visible {
66
+ outline: revert;
67
+ }
68
+
69
+ &:hover {
62
70
  cursor: pointer;
63
71
  }
64
72
 
65
73
  svg {
66
- width: 1rem;
67
- height: 1rem;
74
+ font-size: 1.5rem;
68
75
  }
69
- `,L=d`
76
+ `,O=l`
70
77
  body {
71
78
  overflow: hidden;
72
79
 
@@ -74,6 +81,6 @@ import{jsx as t,jsxs as e,Fragment as x}from"react/jsx-runtime";import{useEffect
74
81
  padding-right: 15px !important;
75
82
  `}
76
83
  }
77
- `,O=d`
78
- ${s}
79
- `,c=({children:m,isOpen:n,contentStyles:p,withPortal:l=!1,withCloseIcon:u=!0,onClose:i,...g})=>{b(()=>{const a=w=>{w.key==="Escape"&&n&&i()};return window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[i,n]);const h=!!(typeof window<"u"&&window.document&&window.document.createElement),r=t(y,{in:n,mountOnEnter:!0,unmountOnExit:!0,timeout:400,classNames:"backgroundTransition",children:e(x,{children:[t(O,{}),e(T,{...g,children:[t(E,{"data-testid":"background",onClick:i}),e(C,{style:p,children:[u&&t(S,{onClick:i,"data-testid":"close",children:t(v,{})}),m]}),t(L,{})]})]})});return l&&h?f(r,document.body):r};export{c as Modal,c as default};
84
+ `,P=l`
85
+ ${u}
86
+ `,m=({children:p,isOpen:e,contentStyles:f,withPortal:g=!1,withCloseIcon:x=!0,onClose:i,...b})=>{const n=c(null),r=c(null);v(()=>{const s=w=>{w.key==="Escape"&&e&&i()};return e&&(r.current=document.activeElement,window.addEventListener("keydown",s),n.current&&n.current.focus()),!e&&r.current&&r.current.focus(),()=>{window.removeEventListener("keydown",s)}},[i,e]);const h=!!(typeof window<"u"&&window.document&&window.document.createElement),d=t(T,{in:e,mountOnEnter:!0,unmountOnExit:!0,timeout:400,classNames:"backgroundTransition",children:a(y,{children:[t(P,{}),a(j,{...b,children:[t(z,{"data-testid":"background",onClick:i}),t($,{children:a(I,{style:f,role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",tabIndex:-1,ref:n,children:[x&&t(L,{onClick:i,"data-testid":"close",type:"button","aria-label":"Close dialog",children:t(C,{})}),p]})}),t(O,{})]})]})});return g&&h?k(d,document.body):d};export{m as Modal,m as default};
@@ -1,18 +1,18 @@
1
- import{jsxs as v,Fragment as c,jsx as n}from"react/jsx-runtime";import{useRef as x}from"react";import{createPortal as w}from"react-dom";import h from"styled-components";import{CSSTransition as k}from"react-transition-group";import O from"./Overlay.js";import{useOutsideClick as b}from"./useClickOutside.js";const C="offCanvasAnimation",N={timeout:{enter:300,exit:300},mountOnEnter:!0,unmountOnExit:!0},P=h.div`
2
- ${({animationName:t,animationDuration:i,width:r,from:o,backgroundColor:a,theme:e})=>`
1
+ import{jsxs as b,Fragment as h,jsx as n}from"react/jsx-runtime";import{useRef as $,useEffect as O}from"react";import{createPortal as C}from"react-dom";import g from"styled-components";import{CSSTransition as y}from"react-transition-group";import E from"./Overlay.js";import{useOutsideClick as N}from"./useClickOutside.js";import{FocusTrap as D}from"../Modal/FocudTrap.js";const P="offCanvasAnimation",S={timeout:{enter:300,exit:300},mountOnEnter:!0,unmountOnExit:!0},j=g.div`
2
+ ${({animationName:t,animationDuration:l,width:e,from:o,backgroundColor:m,theme:i})=>`
3
3
  position: fixed;
4
4
  z-index: 1001;
5
5
  width: 100%;
6
6
  height: 100%;
7
7
  top: 0;
8
8
  ${o==="left"?"left: 0;":"right: 0;"}
9
- background-color: ${a||e.colors.background.light};
10
- width: ${r};
9
+ background-color: ${m||i.colors.background.light};
10
+ width: ${e};
11
11
  box-shadow: 0 0 0.5em rgba(0, 0, 0, 0.2);
12
12
 
13
13
 
14
14
  &.${t}--right-enter {
15
- transform: translate3d(${r}, 0, 0);
15
+ transform: translate3d(${e}, 0, 0);
16
16
  }
17
17
 
18
18
  &.${t}--right-enter.${t}--right-enter-active {
@@ -25,12 +25,12 @@ import{jsxs as v,Fragment as c,jsx as n}from"react/jsx-runtime";import{useRef as
25
25
  }
26
26
 
27
27
  &.${t}--right-exit.${t}--right-exit-active {
28
- transform: translate3d(${r}, 0, 0);
28
+ transform: translate3d(${e}, 0, 0);
29
29
  transition: transform 0.2s ease-in-out;
30
30
  }
31
31
 
32
32
  &.${t}--left-enter {
33
- transform: translate3d(-${r}, 0, 0);
33
+ transform: translate3d(-${e}, 0, 0);
34
34
  }
35
35
 
36
36
  &.${t}--left-enter.${t}--left-enter-active {
@@ -43,15 +43,19 @@ import{jsxs as v,Fragment as c,jsx as n}from"react/jsx-runtime";import{useRef as
43
43
  }
44
44
 
45
45
  &.${t}--left-exit.${t}--left-exit-active {
46
- transform: translate3d(-${r}, 0, 0);
47
- transition: transform ${i}ms ease-in-out;
46
+ transform: translate3d(-${e}, 0, 0);
47
+ transition: transform ${l}ms ease-in-out;
48
+ }
49
+
50
+ &:focus-visible {
51
+ outline: none;
48
52
  }
49
53
  `}
50
- `,y=h.div`
54
+ `,F=g.div`
51
55
  position: relative;
52
56
  width: 100%;
53
57
  height: 100%;
54
58
  overflow-x: hidden;
55
59
  overflow-y: auto;
56
60
  -webkit-overflow-scrolling: touch;
57
- `,u=({animationName:t=C,animationDuration:i=300,backgroundColor:r,backgroundOverlay:o,children:a,from:e="right",isOpen:s,onClickOutside:m,width:$="375px",withPortal:g,transitionProps:p})=>{const l=x(null);b(l,()=>m?.()),o&&!m&&console.error("Please provide a clickOutside handler when using backgroundOverlay option in OffCanvas component");const f=`${t}--${e}`,d=v(c,{children:[o&&n(O,{isOpen:s}),n(c,{children:n(k,{in:s,className:`${t} ${f}`,classNames:f,...N,...p,children:n(P,{ref:l,animationName:t,animationDuration:i,backgroundColor:r,from:e,width:$,children:n(y,{className:`${t}-content`,children:a})})})})]});return g?w(d,document.body):d};export{u as OffCanvas,u as default};
61
+ `,p=({animationName:t=P,animationDuration:l=300,backgroundColor:e,backgroundOverlay:o,children:m,from:i="right",isOpen:r,onClickOutside:a,width:v="375px",withPortal:w,transitionProps:x})=>{const s=$(null),d=$(null);N(s,()=>a?.()),O(()=>{const u=k=>{k.key==="Escape"&&r&&a?.()};return r&&(d.current=document.activeElement,window.addEventListener("keydown",u),s.current&&s.current.focus()),!r&&d.current&&d.current.focus(),()=>{window.removeEventListener("keydown",u)}},[a,r]),o&&!a&&console.error("Please provide a clickOutside handler when using backgroundOverlay option in OffCanvas component");const c=`${t}--${i}`,f=b(h,{children:[o&&n(E,{isOpen:r}),n(h,{children:n(y,{in:r,className:`${t} ${c}`,classNames:c,...S,...x,children:n(D,{children:n(j,{ref:s,animationName:t,animationDuration:l,backgroundColor:e,from:i,width:v,role:"dialog","aria-modal":"true","aria-label":"Side panel",tabIndex:-1,children:n(F,{className:`${t}-content`,children:m})})})})})]});return w?C(f,document.body):f};export{p as OffCanvas,p as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as a}from"styled-components";import{generateNameHash as g}from"../../shared/helpers.js";import e from"../../theme.js";import{BodyText as $}from"../../typography/BodyText/index.js";import{BackgroundStyles as x}from"../IconButton.js";import"../../shared/media-queries.js";import"../../utils/utils.js";const f=a`
1
+ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as s}from"styled-components";import{generateNameHash as g}from"../../shared/helpers.js";import e from"../../theme.js";import{BodyText as $}from"../../typography/BodyText/index.js";import{BackgroundStyles as x}from"../IconButton.js";import"../../shared/media-queries.js";import"../../utils/utils.js";const f=s`
2
2
  .circle {
3
3
  &--outer {
4
4
  height: 24px;
@@ -11,7 +11,7 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as a}from"styled
11
11
  transform: scale(0.6);
12
12
  }
13
13
  }
14
- `,k=a`
14
+ `,k=s`
15
15
  .circle {
16
16
  &--outer {
17
17
  height: 32px;
@@ -24,7 +24,7 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as a}from"styled
24
24
  transform: scale(0.6);
25
25
  }
26
26
  }
27
- `,p={regular:f,large:k},y=a`
27
+ `,p={regular:f,large:k},y=s`
28
28
  cursor: default;
29
29
 
30
30
  .circle {
@@ -36,14 +36,14 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as a}from"styled
36
36
  border: 2px solid ${e.colors.grayscaleToned.light2};
37
37
  }
38
38
  }
39
- `,D=a`
39
+ `,D=s`
40
40
  .circle {
41
41
  &--inner {
42
42
  opacity: 1;
43
43
  background-color: ${e.colors.grayscaleToned.light2};
44
44
  }
45
45
  }
46
- `,z=(r,o,s)=>a`
46
+ `,z=(r,o,a)=>s`
47
47
  .circle {
48
48
  &--inner {
49
49
  opacity: 1;
@@ -52,10 +52,10 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as a}from"styled
52
52
 
53
53
  &--outer {
54
54
  border: 2px solid
55
- ${s?e.colors.error.dark:e.colors[r][o]};
55
+ ${a?e.colors.error.dark:e.colors[r][o]};
56
56
  }
57
57
  }
58
- `,E=i.div`
58
+ `,v=i.div`
59
59
  display: flex;
60
60
  align-items: flex-start;
61
61
  box-sizing: border-box;
@@ -79,21 +79,21 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as a}from"styled
79
79
  transition: background-color 400ms;
80
80
  ${x}
81
81
  }
82
- `,T=i.input`
82
+ `,E=i.input`
83
83
  position: absolute;
84
84
  opacity: 0;
85
85
  margin: 0;
86
86
  ${r=>!r.isDisabled&&"cursor: pointer;"}
87
87
  z-index: 1;
88
88
  ${r=>p[r.$size]};
89
- `,v=i.span`
89
+ `,N=i.span`
90
90
  display: flex;
91
91
  box-sizing: border-box;
92
92
  border-radius: 50%;
93
93
 
94
94
  border: 2px solid
95
95
  ${r=>r.$hasError?e.colors.error.dark:e.colors.grayscaleToned.dark5};
96
- `,w=i.span`
96
+ `,T=i.span`
97
97
  box-sizing: border-box;
98
98
  opacity: 0;
99
99
  margin: auto;
@@ -102,9 +102,9 @@ import{jsxs as b,jsx as c}from"react/jsx-runtime";import i,{css as a}from"styled
102
102
  position: absolute;
103
103
  top: 0;
104
104
  left: 0;
105
- `,B=i($)`
105
+ `,w=i($)`
106
106
  cursor: ${({isDisabled:r})=>r?"default":"pointer"};
107
107
  user-select: none;
108
108
  color: ${({theme:r,isDisabled:o})=>o?r.colors.text.disabled:r.colors.text.dark};
109
109
  margin-left: 0.5rem;
110
- `,m=({name:r=g("radio-button"),size:o="regular",checked:s=!1,isDisabled:l=!1,color:t="secondary",colorShade:d="mainAlt",label:n,hasError:h,...u})=>b(E,{children:[b(S,{size:o,$color:t,$colorShade:d,isChecked:s,isDisabled:l,$hasError:h,children:[c(T,{"data-validate":"checked",checked:s,type:"radio",name:r,id:r,disabled:l,"aria-label":r,"aria-checked":s,className:"circle circle--outer",$size:o,isDisabled:l,$color:t,$colorShade:d,...u}),c(v,{className:"circle circle--outer",$hasError:h,children:c(w,{className:"circle circle--inner"})})]}),n&&c(B,{as:"label",htmlFor:r,isDisabled:l,children:n})]});export{m as RadioButton,m as default};
110
+ `,m=({name:r=g("radio-button"),size:o="regular",checked:a=!1,isDisabled:l=!1,color:n="secondary",colorShade:h="mainAlt",label:d,hasError:t,...u})=>b(v,{children:[b(S,{size:o,$color:n,$colorShade:h,isChecked:a,isDisabled:l,$hasError:t,children:[c(E,{"data-validate":"checked",checked:a,type:"radio",name:r,id:r,disabled:l,"aria-label":d?void 0:r,"aria-checked":a,"aria-invalid":t||void 0,className:"circle circle--outer",$size:o,isDisabled:l,$color:n,$colorShade:h,...u}),c(N,{className:"circle circle--outer",$hasError:t,children:c(T,{className:"circle circle--inner"})})]}),d&&c(w,{as:"label",htmlFor:r,isDisabled:l,children:d})]});export{m as RadioButton,m as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as i,jsx as o}from"react/jsx-runtime";import t from"styled-components";import l from"./EuFlagIcon.js";const s=t.div`
1
+ import{jsxs as i,jsx as r}from"react/jsx-runtime";import t from"styled-components";import a from"./EuFlagIcon.js";const s=t.div`
2
2
  display: grid;
3
3
  grid-template: 100% / 16px auto;
4
4
  width: 124px;
@@ -17,7 +17,7 @@ import{jsxs as i,jsx as o}from"react/jsx-runtime";import t from"styled-component
17
17
  font-size: 11px;
18
18
  align-self: center;
19
19
  }
20
- `,a=t.div`
20
+ `,p=t.div`
21
21
  display: flex;
22
22
  justify-content: center;
23
23
  align-items: center;
@@ -30,10 +30,10 @@ import{jsxs as i,jsx as o}from"react/jsx-runtime";import t from"styled-component
30
30
  border-left: none;
31
31
  border-top-right-radius: 4px;
32
32
  border-bottom-right-radius: 4px;
33
- `,p=t.div`
33
+ `,h=t.div`
34
34
  color: ${({theme:e})=>e.colors.text.light};
35
35
  font-family: ${({theme:e})=>e.typography.fontBaseFamily};
36
36
  font-size: 10px;
37
37
  font-weight: ${({theme:e})=>e.typography.fontBaseBoldWeight};
38
38
  line-height: 1;
39
- `,h=({regNumber:e})=>i(s,{children:[i(n,{children:[o(l,{}),o(p,{children:"S"})]}),o(a,{children:(d=>{const r=d.replace(/\s+/g,"").slice(0,6);return`${r.slice(0,3)} ${r.slice(3)}`})(e)})]});export{h as default};
39
+ `,c=({regNumber:e})=>{const d=l=>{const o=l.replace(/\s+/g,"").slice(0,6);return`${o.slice(0,3)} ${o.slice(3)}`};return i(s,{role:"text","aria-label":`Registration plate: ${e}`,children:[i(n,{"aria-hidden":"true",children:[r(a,{"aria-hidden":"true"}),r(h,{children:"S"})]}),r(p,{children:d(e)})]})};export{c as default};