@kvdbil/components 16.0.2 → 16.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/cjs/components/Badge/index.js +1 -1
  2. package/cjs/components/Breadcrumbs/BreadcrumbsItem.js +1 -1
  3. package/cjs/components/Button/index.js +1 -1
  4. package/cjs/components/Button/styles.js +1 -1
  5. package/cjs/components/Card/index.js +8 -8
  6. package/cjs/components/CheckBox/index.js +12 -11
  7. package/cjs/components/DayPicker/index.js +3 -3
  8. package/cjs/components/ErrorMessage/index.js +2 -2
  9. package/cjs/components/FieldLabel.js +4 -4
  10. package/cjs/components/IconButton.js +15 -16
  11. package/cjs/components/RadioButton/index.js +24 -23
  12. package/cjs/components/Select/index.js +9 -9
  13. package/cjs/components/Snackbar/index.js +6 -5
  14. package/cjs/components/Spinner/index.js +1 -1
  15. package/cjs/components/Stamp/index.js +1 -1
  16. package/cjs/components/Stepper/index.js +15 -14
  17. package/cjs/components/StepperAccordion/index.js +13 -13
  18. package/cjs/components/Switcher/index.js +2 -2
  19. package/cjs/components/Tabs/Tab.js +5 -5
  20. package/cjs/components/Tabs/Tabs.js +3 -3
  21. package/cjs/components/TextArea/index.js +4 -4
  22. package/cjs/components/Toggle/index.js +6 -6
  23. package/cjs/components/ValuationRange/index.js +15 -15
  24. package/cjs/index.js +1 -1
  25. package/cjs/utils/utils.js +2 -2
  26. package/esm/components/Badge/index.js +1 -1
  27. package/esm/components/Breadcrumbs/BreadcrumbsItem.js +3 -3
  28. package/esm/components/Button/index.js +5 -5
  29. package/esm/components/Button/styles.js +23 -23
  30. package/esm/components/Card/index.js +9 -9
  31. package/esm/components/CheckBox/index.js +19 -18
  32. package/esm/components/DayPicker/index.js +3 -3
  33. package/esm/components/ErrorMessage/index.js +4 -4
  34. package/esm/components/FieldLabel.js +16 -16
  35. package/esm/components/IconButton.js +12 -13
  36. package/esm/components/RadioButton/index.js +28 -27
  37. package/esm/components/Select/index.js +4 -4
  38. package/esm/components/Snackbar/index.js +16 -15
  39. package/esm/components/Spinner/index.js +3 -3
  40. package/esm/components/Stamp/index.js +1 -1
  41. package/esm/components/Stepper/index.js +33 -32
  42. package/esm/components/StepperAccordion/index.js +21 -21
  43. package/esm/components/Switcher/index.js +4 -4
  44. package/esm/components/Tabs/Tab.js +5 -5
  45. package/esm/components/Tabs/Tabs.js +8 -8
  46. package/esm/components/TextArea/index.js +2 -2
  47. package/esm/components/Toggle/index.js +6 -6
  48. package/esm/components/ValuationRange/index.js +15 -15
  49. package/esm/index.js +1 -1
  50. package/esm/utils/utils.js +2 -2
  51. package/package.json +1 -1
  52. package/package.json.tmp +1 -1
  53. package/types/components/Button/styles.d.ts +2 -2
  54. package/types/components/Card/index.d.ts +4 -1
  55. package/types/components/CheckBox/index.d.ts +3 -2
  56. package/types/components/DayPicker/index.d.ts +3 -3
  57. package/types/components/IconButton.d.ts +5 -3
  58. package/types/components/RadioButton/index.d.ts +3 -2
  59. package/types/components/Select/index.d.ts +3 -2
  60. package/types/components/Stamp/index.d.ts +3 -2
  61. package/types/components/Stepper/index.d.ts +3 -2
  62. package/types/components/StepperAccordion/index.d.ts +2 -1
  63. package/types/components/Switcher/index.d.ts +3 -2
  64. package/types/components/Tabs/Tab.d.ts +2 -1
  65. package/types/components/Tabs/Tabs.d.ts +3 -2
  66. package/types/components/Toggle/index.d.ts +3 -2
  67. package/types/components/ValuationRange/index.d.ts +3 -2
  68. package/types/index.d.ts +1 -1
  69. package/types/utils/utils.d.ts +9 -1
@@ -1,14 +1,14 @@
1
- import{jsxs as s,jsx as i}from"react/jsx-runtime";import l from"styled-components";import n from"../../theme.js";const c=l.div``,m=l.div`
2
- background: ${({topBorder:o})=>o};
1
+ import{jsxs as n,jsx as t}from"react/jsx-runtime";import d from"styled-components";import m from"../../theme.js";const h=d.div``,g=d.div`
2
+ background: ${({theme:e,$customColor:o,$color:r="secondary",$colorShade:l})=>o||e.colors[r][l]};
3
3
  height: 0.25rem;
4
- `,p=l.div`
5
- background: ${n.colors.background.light};
4
+ `,p=d.div`
5
+ background: ${m.colors.background.light};
6
6
 
7
- ${({noFrame:o,topBorder:r,lineBorder:e,theme:d})=>!r&&(!o||e)&&`border-top: 1px solid ${d.colors.grayscaleToned.light5};`}
7
+ ${({noFrame:e,topBorder:o,lineBorder:r,theme:l})=>!o&&(!e||r)&&`border-top: 1px solid ${l.colors.grayscaleToned.light5};`}
8
8
 
9
- ${({noFrame:o,lineBorder:r,theme:e})=>(!o||r)&&`border-bottom: 1px solid ${e.colors.grayscaleToned.light5};
9
+ ${({noFrame:e,lineBorder:o,theme:r})=>(!e||o)&&`border-bottom: 1px solid ${r.colors.grayscaleToned.light5};
10
10
  `}
11
11
 
12
- ${({noFrame:o,lineBorder:r,theme:e})=>!o&&!r&&`border-right: 1px solid ${e.colors.grayscaleToned.light5};
13
- border-left: 1px solid ${e.colors.grayscaleToned.light5};`}
14
- `,t=({children:o,topBorder:r,noFrame:e=!1,lineBorder:d=!1,as:a="div"})=>s(c,{as:a,children:[r&&i(m,{topBorder:r}),i(p,{topBorder:r,noFrame:e,lineBorder:d,children:o})]});export{t as Card,t as default};
12
+ ${({noFrame:e,lineBorder:o,theme:r})=>!e&&!o&&`border-right: 1px solid ${r.colors.grayscaleToned.light5};
13
+ border-left: 1px solid ${r.colors.grayscaleToned.light5};`}
14
+ `,a=({children:e,topBorder:o,topBorderColor:r,topBorderColorShade:l="mainAlt",noFrame:i=!1,lineBorder:s=!1,as:c="div"})=>n(h,{as:c,children:[(o||r)&&t(g,{$customColor:o,$color:r,$colorShade:l}),t(p,{topBorder:o,noFrame:i,lineBorder:s,children:e})]});export{a as Card,a as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as b,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled-components";import m from"../../icons/components/CheckmarkIcon.js";import{generateNameHash as g}from"../../shared/helpers.js";import i from"../../theme.js";import{BodyText as f}from"../../typography/BodyText/index.js";import{BackgroundStyles as u}from"../IconButton.js";import"../../shared/media-queries.js";import"../../utils/utils.js";const k=r`
1
+ import{jsxs as b,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled-components";import g from"../../icons/components/CheckmarkIcon.js";import{generateNameHash as $}from"../../shared/helpers.js";import i from"../../theme.js";import{BodyText as f}from"../../typography/BodyText/index.js";import{BackgroundStyles as u}from"../IconButton.js";import"../../shared/media-queries.js";import"../../utils/utils.js";const k=r`
2
2
  width: 24px;
3
3
  height: 24px;
4
4
 
@@ -6,7 +6,7 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled
6
6
  width: 15px;
7
7
  height: 15px;
8
8
  }
9
- `,$=r`
9
+ `,y=r`
10
10
  width: 32px;
11
11
  height: 32px;
12
12
 
@@ -14,10 +14,10 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled
14
14
  width: 22px;
15
15
  height: 22px;
16
16
  }
17
- `,n={regular:k,large:$},y=r`
17
+ `,h={regular:k,large:y},v=r`
18
18
  cursor: default;
19
19
  border: 2px solid ${i.colors.grayscaleToned.light2};
20
- `,v=e=>r`
20
+ `,z=(e,o)=>r`
21
21
  svg {
22
22
  opacity: 1;
23
23
  }
@@ -25,12 +25,12 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled
25
25
  :hover {
26
26
  }
27
27
 
28
- background: ${i.colors[e].main};
29
- border: 2px solid ${i.colors[e].main};
30
- `,z=r`
28
+ background: ${i.colors[e][o]};
29
+ border: 2px solid ${i.colors[e][o]};
30
+ `,D=r`
31
31
  background: ${i.colors.grayscaleToned.light2};
32
32
  z-index: 1;
33
- `,D=r`
33
+ `,S=r`
34
34
  border: 2px solid ${i.colors.error.dark};
35
35
  `,w=a.div`
36
36
  display: flex;
@@ -47,13 +47,14 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled
47
47
  outline: none;
48
48
  cursor: pointer;
49
49
  z-index: 1;
50
- ${e=>n[e.boxSize]};
50
+ ${e=>h[e.boxSize]};
51
51
 
52
- :focus-visible {
52
+ &:hover,
53
+ &:focus {
53
54
  transition: background-color 400ms;
54
55
  ${u}
55
56
  }
56
- `,S=a.span`
57
+ `,T=a.span`
57
58
  box-sizing: border-box;
58
59
  cursor: pointer;
59
60
  display: flex;
@@ -64,21 +65,21 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled
64
65
 
65
66
  border: 2px solid ${i.colors.grayscaleToned.dark5};
66
67
 
67
- ${e=>n[e.size]};
68
+ ${e=>h[e.size]};
68
69
 
69
70
  svg {
70
71
  opacity: 0;
71
72
  color: ${({theme:e})=>e.colors.common.white};
72
73
  }
73
74
 
74
- ${e=>e.isChecked&&v(e.color)};
75
- ${e=>e.isDisabled&&y};
76
- ${e=>e.hasError&&D};
77
- ${e=>e.isChecked&&e.isDisabled&&z};
78
- `,T=a(f)`
75
+ ${e=>e.isChecked&&z(e.$color,e.$colorShade)};
76
+ ${e=>e.isDisabled&&v};
77
+ ${e=>e.hasError&&S};
78
+ ${e=>e.isChecked&&e.isDisabled&&D};
79
+ `,j=a(f)`
79
80
  flex: 1;
80
81
  cursor: ${({isDisabled:e})=>e?"default":"pointer"};
81
82
  user-select: none;
82
83
  color: ${({theme:e,isDisabled:o})=>o?e.colors.text.disabled:e.colors.text.dark};
83
84
  margin-left: 0.5rem;
84
- `,h=({name:e=g("check-box"),isDisabled:o=!1,size:t="regular",checked:l=!1,color:d="secondary",hasError:p=!1,label:c,...x})=>b(w,{children:[s(C,{...x,type:"checkbox",checked:l,"data-validate":"checked",name:e,id:e,color:d,disabled:o,isDisabled:o,boxSize:t}),s(S,{size:t,color:d,isChecked:l,isDisabled:o,hasError:p,children:s(m,{})}),c&&s(T,{as:"label",htmlFor:e,isDisabled:o,children:c})]});export{h as CheckBox,h as default};
85
+ `,p=({name:e=$("check-box"),isDisabled:o=!1,size:l="regular",checked:t=!1,color:d="secondary",colorShade:c="mainAlt",hasError:x=!1,label:n,...m})=>b(w,{children:[s(C,{...m,type:"checkbox",checked:t,"data-validate":"checked",name:e,id:e,$color:d,$colorShade:c,disabled:o,isDisabled:o,boxSize:l}),s(T,{size:l,$color:d,$colorShade:c,isChecked:t,isDisabled:o,hasError:x,children:s(g,{})}),n&&s(j,{as:"label",htmlFor:e,isDisabled:o,children:n})]});export{p as CheckBox,p as default};
@@ -1,9 +1,9 @@
1
- import{jsx as l}from"react/jsx-runtime";import{useState as p}from"react";import y from"styled-components";import t from"../../theme.js";import{DayPicker as u}from"react-day-picker";import*as c from"date-fns/locale";import{isToday as h}from"date-fns";import k from"./style.js";const g=y.div`
2
- ${k}
1
+ import{jsx as a}from"react/jsx-runtime";import{useState as p}from"react";import y from"styled-components";import e from"../../theme.js";import{DayPicker as h}from"react-day-picker";import*as m from"date-fns/locale";import{isToday as k}from"date-fns";import u from"./style.js";const g=y.div`
2
+ ${u}
3
3
 
4
4
  .rdp-chevron {
5
5
  fill: ${({theme:o})=>o.colors.text.dark};
6
6
  }
7
7
 
8
8
  font-family: ${({theme:o})=>o.typography.fontAlternativeFamily};
9
- `,D=(o,r)=>{const e=r&&h(r)?t.colors.background.light:t.colors[o].main;return{selected:{color:t.colors.text.light,background:t.colors[o].main},today:{color:e}}},m=({locale:o="sv",color:r="primary",selectedDay:e,disabledDays:s,...n})=>{const[i,d]=p(e);function f(a){a&&d(a)}return l(g,{children:l(u,{...n,mode:"single",selected:i,onSelect:f,locale:c[o]||c.enGB,modifiersStyles:D(r,i),disabled:s})})};export{m as DayPicker,m as default};
9
+ `,v=(o,r,t)=>{const l=t&&k(t)?e.colors.background.light:e.colors[o][r];return{selected:{color:e.colors.text.light,background:e.colors[o][r]},today:{color:l}}},s=({locale:o="sv",color:r="primary",colorShade:t="mainAlt",selectedDay:l,...n})=>{const[i,d]=p(l);function f(c){c&&d(c)}return a(g,{children:a(h,{...n,mode:"single",selected:i,onSelect:f,locale:m[o]||m.enGB,modifiersStyles:v(r,t,i)})})};export{s as DayPicker,s as default};
@@ -1,10 +1,10 @@
1
- import{jsx as n}from"react/jsx-runtime";import i from"styled-components";const a=i.div`
1
+ import{jsx as n}from"react/jsx-runtime";import a from"styled-components";const i=a.div`
2
2
  font-family: ${({theme:e})=>e.typography.fontAlternativeFamily};
3
3
  font-weight: ${({theme:e})=>e.typography.fontAlternativeRegularWeight};
4
- background: ${({theme:e})=>e.colors.error.main};
5
- color: white;
4
+ background: ${({theme:e})=>e.colors.error.lighter};
5
+ color: ${({theme:e})=>e.colors.text.dark};
6
6
  border-radius: 0.25rem;
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(a,{centered:t,...o,children:e});export{r as ErrorMessage,r as default};
10
+ `,r=({children:e,centered:t,...o})=>n(i,{centered:t,...o,children:e});export{r as ErrorMessage,r as default};
@@ -1,51 +1,51 @@
1
- import a,{css as t}from"styled-components";import{BodyTextStyle as i}from"../typography/BodyText/index.js";import"react/jsx-runtime";import"../shared/media-queries.js";const l=(e,o)=>t`
2
- transform: translateY(${e});
1
+ import s,{css as t}from"styled-components";import{BodyTextStyle as i}from"../typography/BodyText/index.js";import"react/jsx-runtime";import"../shared/media-queries.js";const l=(o,e)=>t`
2
+ transform: translateY(${o});
3
3
  line-height: 0.875rem;
4
4
  font-size: 0.75rem;
5
5
  transform-origin: 0 0;
6
6
  padding: 0 5px;
7
7
  left: 0.5rem;
8
- color: ${({theme:r})=>o?r.colors.error.dark:r.colors.text.dark};
9
- `,n=t`
10
- color: ${({theme:e,hasError:o})=>o?e.colors.error.dark:e.colors.text.dark};
8
+ color: ${({theme:r})=>e?r.colors.error.dark:r.colors.text.dark};
11
9
  `,c=t`
12
- color: ${({theme:e})=>e.colors.text.disabled};
10
+ color: ${({theme:o,hasError:e})=>e?o.colors.error.dark:o.colors.text.dark};
11
+ `,n=t`
12
+ color: ${({theme:o})=>o.colors.text.disabled};
13
13
  `,d=t`
14
14
  width: max-content;
15
15
  left: 0;
16
16
  right: 0;
17
17
  margin-right: auto;
18
18
  margin-left: auto;
19
- `,h=a.label`
19
+ `,h=s.label`
20
20
  ${i}
21
21
  pointer-events: none;
22
22
  position: absolute;
23
23
  max-width: calc(100% - 2rem);
24
24
  z-index: 1;
25
- top: ${({height:e})=>e?`${e}rem`:"0.75rem"};
25
+ top: ${({height:o})=>o?`calc(${o}rem - 5px)`:"12px"};
26
26
  left: calc(0.75rem + 2px);
27
27
  transition: 150ms;
28
- color: ${({theme:e})=>e.colors.text.dark};
28
+ color: ${({theme:o})=>o.colors.text.dark};
29
29
  overflow: hidden;
30
30
  white-space: nowrap;
31
31
  text-overflow: ellipsis;
32
32
  background: transparent;
33
33
 
34
- ${({theme:e,hasValue:o,isFocused:r})=>(o||r)&&`
34
+ ${({theme:o,hasValue:e,isFocused:r})=>(e||r)&&`
35
35
  span {
36
36
  display: block;
37
37
  width: 100%;
38
38
  height: 8px;
39
39
  position: absolute;
40
- top: 5px;
40
+ top: 6px;
41
41
  left: 0;
42
- background-color: ${e.colors.background.light};
42
+ background-color: ${o.colors.background.light};
43
43
  z-index: -1;
44
44
  }
45
45
  `}
46
46
 
47
- ${({hasValue:e,isFocused:o,height:r=.7,hasError:s})=>(e||o)&&l(`-${r+.4}rem`,s)}
48
- ${({centered:e,hasValue:o,isFocused:r})=>(o||r)&&e&&d}
49
- ${({isFocused:e})=>e&&n}
50
- ${({disabled:e})=>e&&c}
47
+ ${({hasValue:o,isFocused:e,height:r,hasError:a})=>(o||e)&&l(`${r?`calc(-${r}rem - 2px)`:"-18px"}`,a)}
48
+ ${({centered:o,hasValue:e,isFocused:r})=>(e||r)&&o&&d}
49
+ ${({isFocused:o})=>o&&c}
50
+ ${({disabled:o})=>o&&n}
51
51
  `;export{h as Label};
@@ -1,10 +1,9 @@
1
- import{jsxs as u,jsx as d}from"react/jsx-runtime";import n,{css as a}from"styled-components";import{resolveColorWithNeutral as b}from"../utils/utils.js";const m=a`
1
+ import{jsxs as u,jsx as b}from"react/jsx-runtime";import n,{css as a}from"styled-components";import{hexToRGB as m,resolveColorWithNeutral as f}from"../utils/utils.js";const h=a`
2
2
  background-color: transparent;
3
- `,l="400ms",f="1500ms",k="750ms",r=a`
4
- background-color: ${({theme:e,color:c})=>b(e,c).main};
5
- opacity: 0.1;
6
- ${e=>e.isDisabled&&m};
7
- `,v=n.div`
3
+ `,l="400ms",k="1500ms",v="750ms",r=a`
4
+ background-color: ${({theme:e,$color:c,$colorShade:i})=>m(f(e,c)[i],.1)};
5
+ ${e=>e.isDisabled&&h};
6
+ `,$=n.div`
8
7
  cursor: ${e=>e.isDisabled?"default":"pointer"};
9
8
  outline: none;
10
9
 
@@ -17,24 +16,24 @@ import{jsxs as u,jsx as d}from"react/jsx-runtime";import n,{css as a}from"styled
17
16
  }
18
17
  }
19
18
 
20
- :hover {
19
+ &:hover {
21
20
  .button-background {
22
21
  transition: background-color ${l};
23
22
  ${r}
24
23
  }
25
24
  }
26
25
 
27
- :focus {
26
+ &:focus {
28
27
  .button-background {
29
28
  transition: background-color ${l};
30
- animation: FocusRipple ${f} 0ms infinite alternate-reverse;
29
+ animation: FocusRipple ${k} 0ms infinite alternate-reverse;
31
30
  ${r}
32
31
  }
33
32
  }
34
33
 
35
- :active {
34
+ &:active {
36
35
  .button-background {
37
- animation: ActiveRipple ${k};
36
+ animation: ActiveRipple ${v};
38
37
  ${r}
39
38
  }
40
39
  }
@@ -62,7 +61,7 @@ import{jsxs as u,jsx as d}from"react/jsx-runtime";import n,{css as a}from"styled
62
61
  clip-path: circle(50%);
63
62
  }
64
63
  }
65
- `,h=n.div`
64
+ `,g=n.div`
66
65
  top: 0;
67
66
  left: 0;
68
67
 
@@ -72,4 +71,4 @@ import{jsxs as u,jsx as d}from"react/jsx-runtime";import n,{css as a}from"styled
72
71
 
73
72
  position: absolute;
74
73
  border-radius: 10rem;
75
- `,g=({children:e,isActive:c,isDisabled:i,onClick:t,noTabIndex:s=!1,color:p})=>u(v,{color:p,isActive:c,isDisabled:i,onClick:o=>{o.stopPropagation(),o.preventDefault(),o.persist(),!i&&typeof t=="function"&&t(o)},onKeyDown:o=>{o.key==="Enter"&&!i&&typeof t=="function"&&(o.persist(),t(o))},tabIndex:i||s?void 0:0,children:[d(h,{className:"button-background"}),e]});export{r as BackgroundStyles,g as default};
74
+ `,y=({children:e,isActive:c,isDisabled:i,onClick:t,noTabIndex:s=!1,color:p,colorShade:d="mainAlt"})=>u($,{$color:p,$colorShade:d,isActive:c,isDisabled:i,onClick:o=>{o.stopPropagation(),o.preventDefault(),o.persist(),!i&&typeof t=="function"&&t(o)},onKeyDown:o=>{o.key==="Enter"&&!i&&typeof t=="function"&&(o.persist(),t(o))},tabIndex:i||s?void 0:0,children:[b(g,{className:"button-background"}),e]});export{r as BackgroundStyles,y as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as b,jsx as l}from"react/jsx-runtime";import i,{css as s}from"styled-components";import{generateNameHash as u}from"../../shared/helpers.js";import e from"../../theme.js";import{BodyText as g}from"../../typography/BodyText/index.js";import{BackgroundStyles as x}from"../IconButton.js";import"../../shared/media-queries.js";import"../../utils/utils.js";const $=s`
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`
2
2
  .circle {
3
3
  &--outer {
4
4
  height: 24px;
@@ -11,7 +11,7 @@ import{jsxs as b,jsx as l}from"react/jsx-runtime";import i,{css as s}from"styled
11
11
  transform: scale(0.6);
12
12
  }
13
13
  }
14
- `,f=s`
14
+ `,k=a`
15
15
  .circle {
16
16
  &--outer {
17
17
  height: 32px;
@@ -24,86 +24,87 @@ import{jsxs as b,jsx as l}from"react/jsx-runtime";import i,{css as s}from"styled
24
24
  transform: scale(0.6);
25
25
  }
26
26
  }
27
- `,h={regular:$,large:f},y=s`
27
+ `,p={regular:f,large:k},y=a`
28
28
  cursor: default;
29
29
 
30
30
  .circle {
31
31
  &--inner {
32
- background-color: ${e.colors.grayscaleToned.light1};
32
+ background-color: ${e.colors.grayscaleToned.light2};
33
33
  }
34
34
 
35
35
  &--outer {
36
- border: 2px solid ${e.colors.grayscaleToned.light1};
36
+ border: 2px solid ${e.colors.grayscaleToned.light2};
37
37
  }
38
38
  }
39
- `,k=s`
39
+ `,D=a`
40
40
  .circle {
41
41
  &--inner {
42
42
  opacity: 1;
43
- background-color: ${e.colors.grayscaleToned.light1};
43
+ background-color: ${e.colors.grayscaleToned.light2};
44
44
  }
45
45
  }
46
- `,D=(r,o)=>s`
46
+ `,z=(r,o,s)=>a`
47
47
  .circle {
48
48
  &--inner {
49
49
  opacity: 1;
50
- background-color: ${e.colors[r].main};
50
+ background-color: ${e.colors[r][o]};
51
51
  }
52
52
 
53
53
  &--outer {
54
54
  border: 2px solid
55
- ${o?e.colors.error.dark:e.colors[r].main};
55
+ ${s?e.colors.error.dark:e.colors[r][o]};
56
56
  }
57
57
  }
58
- `,z=i.div`
58
+ `,E=i.div`
59
59
  display: flex;
60
- align-items: center;
60
+ align-items: flex-start;
61
61
  box-sizing: border-box;
62
- `,T=i.span`
62
+ `,S=i.span`
63
63
  cursor: pointer;
64
64
  display: flex;
65
65
  position: relative;
66
66
  align-items: center;
67
67
  justify-content: center;
68
68
 
69
- ${r=>h[r.size]};
69
+ ${r=>p[r.size]};
70
70
 
71
- ${r=>!r.isDisabled&&r.isChecked&&D(r.color,r.$hasError)};
71
+ ${r=>!r.isDisabled&&r.isChecked&&z(r.$color,r.$colorShade,r.$hasError)};
72
72
  ${r=>r.isDisabled&&y};
73
73
 
74
- ${r=>r.isChecked&&r.isDisabled&&k};
75
- `,E=i.input`
74
+ ${r=>r.isChecked&&r.isDisabled&&D};
75
+
76
+ &:hover,
77
+ &:focus {
78
+ border-radius: 50%;
79
+ transition: background-color 400ms;
80
+ ${x}
81
+ }
82
+ `,T=i.input`
76
83
  position: absolute;
77
84
  opacity: 0;
78
85
  margin: 0;
79
86
  ${r=>!r.isDisabled&&"cursor: pointer;"}
80
87
  z-index: 1;
81
- ${r=>h[r.$size]};
82
-
83
- :focus-visible {
84
- transition: background-color 400ms;
85
- ${x}
86
- }
88
+ ${r=>p[r.$size]};
87
89
  `,v=i.span`
88
90
  display: flex;
89
91
  box-sizing: border-box;
90
92
  border-radius: 50%;
91
93
 
92
94
  border: 2px solid
93
- ${r=>r.$hasError?e.colors.error.dark:e.colors.grayscaleToned.light1};
95
+ ${r=>r.$hasError?e.colors.error.dark:e.colors.grayscaleToned.dark5};
94
96
  `,w=i.span`
95
97
  box-sizing: border-box;
96
98
  opacity: 0;
97
99
  margin: auto;
98
100
  border-radius: 50%;
99
- background-color: ${e.colors.grayscaleToned.light1};
100
101
 
101
102
  position: absolute;
102
103
  top: 0;
103
104
  left: 0;
104
- `,B=i(g)`
105
+ `,B=i($)`
105
106
  cursor: ${({isDisabled:r})=>r?"default":"pointer"};
106
107
  user-select: none;
107
108
  color: ${({theme:r,isDisabled:o})=>o?r.colors.text.disabled:r.colors.text.dark};
108
109
  margin-left: 0.5rem;
109
- `,p=({name:r=u("radio-button"),size:o="regular",checked:c=!1,isDisabled:a=!1,color:t="secondary",label:d,hasError:n,...m})=>b(z,{children:[b(T,{size:o,color:t,isChecked:c,isDisabled:a,$hasError:n,children:[l(E,{"data-validate":"checked",checked:c,type:"radio",name:r,id:r,disabled:a,"aria-label":r,"aria-checked":c,className:"circle circle--outer",$size:o,isDisabled:a,color:t,...m}),l(v,{className:"circle circle--outer",$hasError:n,children:l(w,{className:"circle circle--inner"})})]}),d&&l(B,{as:"label",htmlFor:r,isDisabled:a,children:d})]});export{p as RadioButton,p as default};
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};
@@ -1,7 +1,7 @@
1
- import{jsxs as u,jsx as a,Fragment as M}from"react/jsx-runtime";import{useState as F}from"react";import N from"react-select";import m from"styled-components";import{DEFAULT_TRANSITION_MS as S}from"../../shared/constants.js";import r from"../../theme.js";import{CaptionStyle as R}from"../../typography/BodyText/index.js";import{Label as H}from"../FieldLabel.js";import"../../shared/media-queries.js";const W=m.div`
1
+ import{jsxs as u,jsx as a,Fragment as M}from"react/jsx-runtime";import{useState as F}from"react";import N from"react-select";import m from"styled-components";import{DEFAULT_TRANSITION_MS as S}from"../../shared/constants.js";import r from"../../theme.js";import{CaptionStyle as R}from"../../typography/BodyText/index.js";import{Label as A}from"../FieldLabel.js";import"../../shared/media-queries.js";const W=m.div`
2
2
  font-family: ${({theme:o})=>o.typography.fontBaseFamily};
3
3
  position: relative;
4
- `,T=o=>o&&{paddingLeft:"2.5rem"},j=o=>o&&{border:`1px solid ${r.colors.grayscaleToned.light1}`,color:r.colors.grayscaleToned.dark1,fill:r.colors.grayscaleToned.light1},A=o=>o&&{border:`2px solid ${r.colors.error.dark}`},_=m.div`
4
+ `,T=o=>o&&{paddingLeft:"2.5rem"},j=o=>o&&{border:`1px solid ${r.colors.grayscaleToned.light1}`,color:r.colors.grayscaleToned.dark1,fill:r.colors.grayscaleToned.light1},_=o=>o&&{border:`2px solid ${r.colors.error.dark}`},P=m.div`
5
5
  position: absolute;
6
6
  z-index: 1;
7
7
  top: 0.5rem;
@@ -13,7 +13,7 @@ import{jsxs as u,jsx as a,Fragment as M}from"react/jsx-runtime";import{useState
13
13
  ${o=>o.isDisabled&&` fill: ${r.colors.grayscaleToned.light1}; `}
14
14
 
15
15
  ${o=>o.isFocused&&` fill: ${o.theme.colors.text.dark}; `}
16
- `,P=m.span`
16
+ `,U=m.span`
17
17
  ${R}
18
18
  display: block;
19
19
  margin-top: 0.25rem;
@@ -36,4 +36,4 @@ import{jsxs as u,jsx as a,Fragment as M}from"react/jsx-runtime";import{useState
36
36
  transform: ${o=>o.$isMenuOpen?"rotate(-180deg)":"rotate(0deg)"};
37
37
 
38
38
  transform-origin: 50% 60%;
39
- `,U=(o,t)=>t?r.colors.error.main:o?r.colors.text.dark:r.colors.grayscaleToned.light1,Z=({selectProps:{menuIsOpen:o=!1},isFocused:t=!1,isDisabled:p})=>a(G,{$isDisabled:p,$isFocused:t,$isMenuOpen:o,$theme:r});function D({className:o,color:t="primary",forwardRef:p,hasError:s=!1,height:n,helperText:f,isDisabled:d=!1,onBlur:w=()=>null,onFocus:L=()=>null,onInputChange:v=()=>null,placeholder:C="",name:g,...i}){const[c,b]=F(!1),[I,B]=F(""),z=(e,l)=>{v(e,l),B(e)},$=({isSelected:e,isFocused:l,isDisabled:h})=>e?r.colors[t].main:h?r.colors.background.light:l?r.colors.background.gray:r.colors.background.light,E=e=>{b(!0),L(e)},O=e=>{b(!1),w(e)},x=U(c,s),y=!i.label;return u(W,{className:o,children:[!y&&i.label&&a(H,{htmlFor:g,height:n,isFocused:c,hasValue:!!(i.value||I),disabled:d,theme:r,hasError:s,children:u(M,{children:[i.label,a("span",{})]})}),i.prefix&&a(_,{isDisabled:d,isFocused:c,children:i.prefix}),a(N,{...i,id:"react-select",inputId:g,name:g,ref:p,isDisabled:d,onInputChange:z,placeholder:C,onFocus:E,onBlur:O,styles:{control:e=>({...e,borderRadius:0,color:r.colors.text.dark,fontFamily:r.typography.fontBaseFamily,fontSize:"1rem",fontWeight:400,cursor:"pointer",padding:"0.7rem 0.5rem",backgroundColor:r.colors.background.light,borderColor:x,boxShadow:"none",minHeight:"3rem","&:hover":{borderColor:"none"},...j(d),...A(s),...T(!!i.prefix)}),input:e=>({...e,height:"auto",margin:0,padding:0}),placeholder:e=>{const l={...e,fontSize:"1rem",lineHeight:"1.5rem",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",margin:0};return y?{...l,color:r.colors.text.dark,fontWeight:600}:{...l,display:c?"static":"none"}},menuList:e=>({...e,padding:"0.5rem 0",paddingBottom:"5rem",marginTop:0,border:`1px solid ${x}`,borderTop:"none",display:"flex",flexDirection:"column",gap:"0.5rem"}),menu:e=>({...e,borderRadius:0,boxShadow:"none",zIndex:5,padding:"0",marginTop:"-0.1rem"}),option:(e,{isSelected:l,isFocused:h,isDisabled:k})=>({...e,padding:"0.5rem",lineHeight:"1.5rem",fontSize:"1rem",fontWeight:400,cursor:k?"not-allowed":"pointer","&:hover":{background:$({isSelected:l,isFocused:!0,isDisabled:k})},background:$({isSelected:l,isFocused:h}),...T(!!i.prefix)}),valueContainer:e=>({...e,position:"static",padding:n?`${n-1}rem 0 `:0,height:n?"auto":"1.5rem"}),clearIndicator:e=>({...e,paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:"0.2rem"})},components:{IndicatorSeparator:()=>null,DropdownIndicator:Z,...i.components??{}}}),f&&a(P,{hasError:s,children:f})]})}export{D as Select,D as default};
39
+ `,Z=(o,t)=>t?r.colors.error.dark:o?r.colors.text.dark:r.colors.grayscaleToned.light1,q=({selectProps:{menuIsOpen:o=!1},isFocused:t=!1,isDisabled:p})=>a(G,{$isDisabled:p,$isFocused:t,$isMenuOpen:o,$theme:r});function D({className:o,color:t="primary",colorShade:p="mainAlt",forwardRef:w,hasError:s=!1,height:n,helperText:f,isDisabled:d=!1,onBlur:L=()=>null,onFocus:v=()=>null,onInputChange:C=()=>null,placeholder:I="",name:g,...i}){const[c,b]=F(!1),[B,z]=F(""),O=(e,l)=>{C(e,l),z(e)},$=({isSelected:e,isFocused:l,isDisabled:h})=>e?r.colors[t][p]:h?r.colors.background.light:l?r.colors.background.gray:r.colors.background.light,E=e=>{b(!0),v(e)},H=e=>{b(!1),L(e)},x=Z(c,s),y=!i.label;return u(W,{className:o,children:[!y&&i.label&&a(A,{htmlFor:g,height:n,isFocused:c,hasValue:!!(i.value||B),disabled:d,theme:r,hasError:s,children:u(M,{children:[i.label,a("span",{})]})}),i.prefix&&a(P,{isDisabled:d,isFocused:c,children:i.prefix}),a(N,{...i,id:"react-select",inputId:g,name:g,ref:w,isDisabled:d,onInputChange:O,placeholder:I,onFocus:E,onBlur:H,styles:{control:e=>({...e,borderRadius:0,color:r.colors.text.dark,fontFamily:r.typography.fontBaseFamily,fontSize:"1rem",fontWeight:400,cursor:"pointer",padding:"0.7rem 0.5rem",backgroundColor:r.colors.background.light,borderColor:x,boxShadow:"none",minHeight:"3rem","&:hover":{borderColor:"none"},...j(d),..._(s),...T(!!i.prefix)}),input:e=>({...e,height:"auto",margin:0,padding:0}),placeholder:e=>{const l={...e,fontSize:"1rem",lineHeight:"1.5rem",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",margin:0};return y?{...l,color:r.colors.text.dark,fontWeight:600}:{...l,display:c?"static":"none"}},menuList:e=>({...e,padding:"0.5rem 0",paddingBottom:"5rem",marginTop:0,border:`1px solid ${x}`,borderTop:"none",display:"flex",flexDirection:"column",gap:"0.5rem"}),menu:e=>({...e,borderRadius:0,boxShadow:"none",zIndex:5,padding:"0",marginTop:"-0.1rem"}),option:(e,{isSelected:l,isFocused:h,isDisabled:k})=>({...e,padding:"0.5rem",lineHeight:"1.5rem",fontSize:"1rem",fontWeight:400,cursor:k?"not-allowed":"pointer","&:hover":{background:$({isSelected:l,isFocused:!0,isDisabled:k})},background:$({isSelected:l,isFocused:h}),...T(!!i.prefix)}),valueContainer:e=>({...e,position:"static",padding:n?`${n-1}rem 0 `:0,height:n?"auto":"1.5rem"}),clearIndicator:e=>({...e,paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:"0.2rem"})},components:{IndicatorSeparator:()=>null,DropdownIndicator:q,...i.components??{}}}),f&&a(U,{hasError:s,children:f})]})}export{D as Select,D as default};
@@ -1,15 +1,15 @@
1
- import{jsx as t,jsxs as y}from"react/jsx-runtime";import{useEffect as $}from"react";import n,{css as r}from"styled-components";import b from"../Icons/CheckCircle.js";import v from"../Icons/Close.js";import k from"../Icons/ErrorCircle.js";import E from"../Icons/InfoCircle.js";import{CSSTransition as w}from"react-transition-group";import{resolveColorWithNeutral as C}from"../../utils/utils.js";const B={top:r`
1
+ import{jsx as t,jsxs as $}from"react/jsx-runtime";import{useEffect as y}from"react";import n,{css as i}from"styled-components";import v from"../Icons/CheckCircle.js";import b from"../Icons/Close.js";import k from"../Icons/ErrorCircle.js";import E from"../Icons/InfoCircle.js";import{CSSTransition as w}from"react-transition-group";import{resolveColorWithNeutral as C}from"../../utils/utils.js";const B={top:i`
2
2
  top: 0;
3
- `,bottom:r`
3
+ `,bottom:i`
4
4
  bottom: 0;
5
- `},N={right:r`
5
+ `},N={right:i`
6
6
  right: 0;
7
- `,center:r`
7
+ `,center:i`
8
8
  left: 50%;
9
9
  transform: translate(-50%, 0);
10
- `,left:r`
10
+ `,left:i`
11
11
  left: 0;
12
- `},s=200,i="anim",O=n.div`
12
+ `},c=200,o="anim",O=n.div`
13
13
  font-family: ${({theme:e})=>e.typography.fontBaseFamily};
14
14
  position: fixed;
15
15
  display: flex;
@@ -27,24 +27,25 @@ import{jsx as t,jsxs as y}from"react/jsx-runtime";import{useEffect as $}from"rea
27
27
  font-size: 0.875rem;
28
28
 
29
29
  box-shadow: ${({theme:e})=>e.elevations.elevation8};
30
- background-color: ${({theme:e,color:o})=>o!=="none"?C(e,o).main:e.colors.background.light};
31
- color: ${({theme:e,color:o})=>o!=="none"?e.colors.text.light:e.colors.text.dark};
30
+ background-color: ${({theme:e,$color:r})=>r!=="none"?C(e,r).lighter:e.colors.background.light};
31
+
32
+ color: ${({theme:e})=>e.colors.text.dark};
32
33
 
33
34
  ${e=>B[e.origin.vertical||"bottom"]}
34
35
  ${e=>N[e.origin.horizontal||"left"]}
35
36
 
36
- transition: opacity ${s}ms ease-in;
37
+ transition: opacity ${c}ms ease-in;
37
38
 
38
- &.${i}-enter {
39
+ &.${o}-enter {
39
40
  opacity: 0;
40
41
  }
41
- &.${i}-enter-active {
42
+ &.${o}-enter-active {
42
43
  opacity: 1;
43
44
  }
44
- &.${i}-exit {
45
+ &.${o}-exit {
45
46
  opacity: 1;
46
47
  }
47
- &.${i}-exit-active {
48
+ &.${o}-exit-active {
48
49
  opacity: 0;
49
50
  }
50
51
  `,g=n.div`
@@ -57,7 +58,7 @@ import{jsx as t,jsxs as y}from"react/jsx-runtime";import{useEffect as $}from"rea
57
58
  svg {
58
59
  width: 1.5rem;
59
60
  height: 1.5rem;
60
- fill: ${({theme:e,color:o})=>o!=="none"?e.colors.background.light:e.colors.background.dark};
61
+ fill: ${({theme:e})=>e.colors.text.dark};
61
62
  }
62
63
  `,S=n(g)`
63
64
  cursor: pointer;
@@ -75,4 +76,4 @@ import{jsx as t,jsxs as y}from"react/jsx-runtime";import{useEffect as $}from"rea
75
76
  }
76
77
  `,T=n.span`
77
78
  flex: 1;
78
- `,W={error:t(k,{}),success:t(b,{}),info:t(E,{}),text:""},h=({message:e,color:o="none",type:a="info",action:l,isOpen:p,origin:d={},onClose:m=()=>{},onExited:f=()=>{},autoHideDuration:c=4e3,...u})=>($(()=>{const x=setTimeout(m,c);return()=>clearTimeout(x)},[c,m]),t(w,{in:p,timeout:s,mountOnEnter:!0,unmountOnExit:!0,onExited:f,classNames:i,children:y(O,{...u,color:o,origin:d,children:[t(g,{color:o,type:a,children:W[a]}),t(T,{children:e}),l&&l,t(S,{color:o??"none",onClick:m,children:t(v,{})})]})}));export{h as Snackbar,h as default};
79
+ `,W={error:t(k,{}),success:t(v,{}),info:t(E,{}),text:""},p=({message:e,color:r="none",type:a="info",action:l,isOpen:h,origin:d={},onClose:m=()=>{},onExited:f=()=>{},autoHideDuration:s=4e3,...u})=>(y(()=>{const x=setTimeout(m,s);return()=>clearTimeout(x)},[s,m]),t(w,{in:h,timeout:c,mountOnEnter:!0,unmountOnExit:!0,onExited:f,classNames:o,children:$(O,{...u,$color:r,origin:d,children:[t(g,{type:a,children:W[a]}),t(T,{children:e}),l&&l,t(S,{onClick:m,children:t(b,{})})]})}));export{p as Snackbar,p as default};
@@ -1,4 +1,4 @@
1
- import{jsx as l}from"react/jsx-runtime";import s,{keyframes as m}from"styled-components";import d from"../../theme.js";import{neutralColorSwap as n}from"../../utils/utils.js";const u=e=>{const r={slow:"2s",default:"1s",fast:"0.5s"};return r[e]||r.default},o=e=>{const r={smaller:1,small:2,regular:3,large:4};return typeof e=="number"?e:r[e]||r.regular},f=m`
1
+ import{jsx as i}from"react/jsx-runtime";import s,{keyframes as m}from"styled-components";import d from"../../theme.js";import{neutralColorSwap as n}from"../../utils/utils.js";const u=e=>{const r={slow:"2s",default:"1s",fast:"0.5s"};return r[e]||r.default},o=e=>{const r={smaller:1,small:2,regular:3,large:4};return typeof e=="number"?e:r[e]||r.regular},f=m`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -8,7 +8,7 @@ import{jsx as l}from"react/jsx-runtime";import s,{keyframes as m}from"styled-com
8
8
  `,p=s.div`
9
9
  display: inline-block;
10
10
  border-radius: 50%;
11
- border-top: ${({theme:e,color:r,customColor:a,size:t})=>`${o(t)/10}em solid ${a??r==="neutral"?n(e).main:e.colors?.[r]?.main}`};
11
+ border-top: ${({theme:e,color:r,customColor:t,size:a})=>`${o(a)/10}em solid ${t??r==="neutral"?n(e).mainAlt:e.colors?.[r]?.mainAlt}`};
12
12
  border-bottom: ${({size:e})=>`${o(e)/10}em solid rgba(0, 0, 0, 0.1);`};
13
13
  border-right: ${({size:e})=>`${o(e)/10}em solid rgba(0, 0, 0, 0.1);`};
14
14
  border-left: ${({size:e})=>`${o(e)/10}em solid rgba(0, 0, 0, 0.1);`};
@@ -16,4 +16,4 @@ import{jsx as l}from"react/jsx-runtime";import s,{keyframes as m}from"styled-com
16
16
  height: ${({size:e})=>o(e)}em;
17
17
  animation: ${f} ${({speed:e})=>u(e)} infinite linear;
18
18
  will-change: transform;
19
- `,$=({size:e="regular",color:r="primary",speed:a="default",customColor:t,...i})=>l(p,{"aria-label":"loading",role:"status","aria-live":"polite","aria-busy":"true",...i,size:e,speed:a,color:r,customColor:t,theme:d});export{$ as default};
19
+ `,$=({size:e="regular",color:r="primary",speed:t="default",customColor:a,...l})=>i(p,{"aria-label":"loading",role:"status","aria-live":"polite","aria-busy":"true",...l,size:e,speed:t,color:r,customColor:a,theme:d});export{$ as default};