@kvdbil/components 15.1.4 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ColorCard.js +7 -7
- package/cjs/components/Accordion/index.js +10 -10
- package/cjs/components/Breadcrumbs/BreadcrumbsItem.js +4 -4
- package/cjs/components/Button/index.js +18 -16
- package/cjs/components/Button/styles.js +1 -1
- package/cjs/components/Card/index.js +6 -6
- package/cjs/components/CheckBox/index.js +9 -9
- package/cjs/components/Chip/index.js +4 -3
- package/cjs/components/Chip/styles.js +1 -1
- package/cjs/components/DayPicker/DayPickerNavBar.js +8 -8
- package/cjs/components/DayPicker/style.js +9 -9
- package/cjs/components/EditRow/index.js +3 -3
- package/cjs/components/FieldLabel.js +2 -2
- package/cjs/components/Icon/index.js +3 -3
- package/cjs/components/IconButton.js +10 -10
- package/cjs/components/Logo/LogoEn.js +1 -1
- package/cjs/components/Logo/LogoSv.js +1 -1
- package/cjs/components/NotificationButton/index.js +3 -3
- package/cjs/components/RadioButton/index.js +6 -6
- package/cjs/components/Select/index.js +10 -10
- package/cjs/components/Snackbar/index.js +17 -17
- package/cjs/components/Spinner/index.js +9 -9
- package/cjs/components/SpinnerThin/index.js +5 -5
- package/cjs/components/Switcher/index.js +9 -6
- package/cjs/components/Table/index.js +6 -6
- package/cjs/components/Tabs/Tab.js +2 -1
- package/cjs/components/Tabs/Tabs.js +2 -2
- package/cjs/components/Tabs/index.js +1 -1
- package/cjs/components/TextArea/index.js +15 -15
- package/cjs/components/Textfield/index.js +7 -7
- package/cjs/components/TimePicker/index.js +2 -2
- package/cjs/components/Toggle/index.js +2 -2
- package/cjs/index.js +1 -1
- package/cjs/theme.js +1 -1
- package/cjs/typography/BodyText/index.js +25 -19
- package/cjs/utils/utils.js +2 -2
- package/esm/ColorCard.js +7 -7
- package/esm/components/Accordion/index.js +10 -10
- package/esm/components/Breadcrumbs/BreadcrumbsItem.js +6 -6
- package/esm/components/Button/index.js +17 -15
- package/esm/components/Button/styles.js +30 -30
- package/esm/components/Card/index.js +8 -8
- package/esm/components/CheckBox/index.js +9 -9
- package/esm/components/Chip/index.js +13 -12
- package/esm/components/Chip/styles.js +1 -1
- package/esm/components/DayPicker/DayPickerNavBar.js +9 -9
- package/esm/components/DayPicker/style.js +9 -9
- package/esm/components/EditRow/index.js +3 -3
- package/esm/components/FieldLabel.js +14 -14
- package/esm/components/Icon/index.js +4 -4
- package/esm/components/IconButton.js +14 -14
- package/esm/components/Logo/LogoEn.js +1 -1
- package/esm/components/Logo/LogoSv.js +1 -1
- package/esm/components/NotificationButton/index.js +1 -1
- package/esm/components/RadioButton/index.js +16 -16
- package/esm/components/Select/index.js +9 -9
- package/esm/components/Snackbar/index.js +19 -19
- package/esm/components/Spinner/index.js +5 -5
- package/esm/components/SpinnerThin/index.js +4 -4
- package/esm/components/Switcher/index.js +7 -4
- package/esm/components/Table/index.js +9 -9
- package/esm/components/Tabs/Tab.js +4 -3
- package/esm/components/Tabs/Tabs.js +6 -6
- package/esm/components/Tabs/index.js +1 -1
- package/esm/components/TextArea/index.js +25 -25
- package/esm/components/Textfield/index.js +19 -19
- package/esm/components/TimePicker/index.js +2 -2
- package/esm/components/Toggle/index.js +4 -4
- package/esm/index.js +1 -1
- package/esm/theme.js +1 -1
- package/esm/typography/BodyText/index.js +33 -27
- package/esm/utils/utils.js +2 -2
- package/package.json +2 -2
- package/package.json.tmp +2 -2
- package/types/Types.d.ts +6 -4
- package/types/components/Button/index.d.ts +2 -2
- package/types/components/Button/styles.d.ts +12 -6
- package/types/components/Chip/index.d.ts +2 -2
- package/types/components/Chip/styles.d.ts +4 -4
- package/types/components/IconButton.d.ts +3 -3
- package/types/components/Spinner/index.d.ts +6 -6
- package/types/components/Switcher/index.d.ts +1 -1
- package/types/components/Tabs/Tabs.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/theme.d.ts +79 -55
- package/types/typography/BodyText/index.d.ts +2 -0
- package/types/utils/utils.d.ts +79 -0
|
@@ -55,7 +55,7 @@ import{css as o}from"styled-components";var r=o`
|
|
|
55
55
|
background-position: center;
|
|
56
56
|
background-size: 50%;
|
|
57
57
|
background-repeat: no-repeat;
|
|
58
|
-
color: ${({theme:e})=>e.colors.
|
|
58
|
+
color: ${({theme:e})=>e.colors.grayscaleToned.light1};
|
|
59
59
|
cursor: pointer;
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -100,11 +100,11 @@ import{css as o}from"styled-components";var r=o`
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.DayPicker-Weekday {
|
|
103
|
-
color: ${({theme:e})=>e.colors.
|
|
103
|
+
color: ${({theme:e})=>e.colors.grayscaleToned.light1};
|
|
104
104
|
width: 35px;
|
|
105
105
|
display: table-cell;
|
|
106
106
|
padding: 0.5em;
|
|
107
|
-
color: ${({theme:e})=>e.colors.
|
|
107
|
+
color: ${({theme:e})=>e.colors.grayscaleToned.light1};
|
|
108
108
|
text-align: center;
|
|
109
109
|
font-size: 0.875em;
|
|
110
110
|
}
|
|
@@ -150,8 +150,8 @@ import{css as o}from"styled-components";var r=o`
|
|
|
150
150
|
display: table-cell;
|
|
151
151
|
padding: 0.5em;
|
|
152
152
|
min-width: 1em;
|
|
153
|
-
border-right: 1px solid ${({theme:e})=>e.colors.
|
|
154
|
-
color: ${({theme:e})=>e.colors.
|
|
153
|
+
border-right: 1px solid ${({theme:e})=>e.colors.grayscaleToned.light5};
|
|
154
|
+
color: ${({theme:e})=>e.colors.grayscaleToned.light5};
|
|
155
155
|
vertical-align: middle;
|
|
156
156
|
text-align: right;
|
|
157
157
|
font-size: 0.75em;
|
|
@@ -179,7 +179,7 @@ import{css as o}from"styled-components";var r=o`
|
|
|
179
179
|
/* Default modifiers */
|
|
180
180
|
|
|
181
181
|
.DayPicker-Day--outside {
|
|
182
|
-
color: ${({theme:e})=>e.colors.
|
|
182
|
+
color: ${({theme:e})=>e.colors.grayscaleToned.light2} !important;
|
|
183
183
|
cursor: default;
|
|
184
184
|
}
|
|
185
185
|
|
|
@@ -199,7 +199,7 @@ import{css as o}from"styled-components";var r=o`
|
|
|
199
199
|
/* Example modifiers */
|
|
200
200
|
|
|
201
201
|
.DayPicker-Day--sunday {
|
|
202
|
-
background-color: ${({theme:e})=>e.colors.
|
|
202
|
+
background-color: ${({theme:e})=>e.colors.grayscaleToned.light6};
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
.DayPicker-Day--selected.DayPicker-Day--today {
|
|
@@ -207,7 +207,7 @@ import{css as o}from"styled-components";var r=o`
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
.DayPicker-Day--sunday:not(.DayPicker-Day--today) {
|
|
210
|
-
color: ${({theme:e})=>e.colors.
|
|
210
|
+
color: ${({theme:e})=>e.colors.grayscaleToned.light5};
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
.DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(
|
|
@@ -216,7 +216,7 @@ import{css as o}from"styled-components";var r=o`
|
|
|
216
216
|
position: relative;
|
|
217
217
|
|
|
218
218
|
background-color: ${({theme:e})=>e.colors.info.main};
|
|
219
|
-
color: ${({theme:e})=>e.colors.
|
|
219
|
+
color: ${({theme:e})=>e.colors.grayscaleToned.light6};
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
.DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as m,Fragment as Q,jsx as t}from"react/jsx-runtime";import{useState as s,useEffect as R}from"react";import i from"styled-components";import v from"../../theme.js";import{BodyLink as U,BodyText as V}from"../../typography/BodyText/index.js";import{Button as f}from"../Button/index.js";import{Chip as W}from"../Chip/index.js";import{TextField as X}from"../Textfield/index.js";import"../../shared/media-queries.js";import"../Spinner/index.js";import"../../typography/ButtonText/index.js";import"../Button/styles.js";import"../../icons/components/CloseIcon.js";import"../Chip/styles.js";import"../FieldLabel.js";import"../../shared/helpers.js";const Y=i.div`
|
|
1
|
+
import{jsxs as m,Fragment as Q,jsx as t}from"react/jsx-runtime";import{useState as s,useEffect as R}from"react";import i from"styled-components";import v from"../../theme.js";import{BodyLink as U,BodyText as V}from"../../typography/BodyText/index.js";import{Button as f}from"../Button/index.js";import{Chip as W}from"../Chip/index.js";import{TextField as X}from"../Textfield/index.js";import"../../shared/media-queries.js";import"../Spinner/index.js";import"../../utils/utils.js";import"../../typography/ButtonText/index.js";import"../Button/styles.js";import"../../icons/components/CloseIcon.js";import"../Chip/styles.js";import"../FieldLabel.js";import"../../shared/helpers.js";const Y=i.div`
|
|
2
2
|
display: flex;
|
|
3
|
-
border-bottom: 1px solid ${v.colors.
|
|
3
|
+
border-bottom: 1px solid ${v.colors.grayscaleToned.light5};
|
|
4
4
|
`,Z=i.form`
|
|
5
5
|
flex: 1;
|
|
6
6
|
flex-direction: column;
|
|
@@ -31,4 +31,4 @@ import{jsxs as m,Fragment as Q,jsx as t}from"react/jsx-runtime";import{useState
|
|
|
31
31
|
flex-wrap: wrap;
|
|
32
32
|
`,ee=i(W)`
|
|
33
33
|
margin: 0.5rem;
|
|
34
|
-
`,re=({value:p,label:d,onChange:w,onEdit:u,options:
|
|
34
|
+
`,re=({value:p,label:d,onChange:w,onEdit:u,options:T=[],inputProps:j={},isClearable:E=!1,isEditionDisabled:k=!1,editText:D,saveText:F,cancelText:S,noValueText:B,formatterFunc:h,isSingleSelect:I,color:c="secondary",isInitialEditing:$})=>{const[r,o]=s(p),[H,J]=s(p),[l,x]=s(!!$),a=typeof r=="string",K=h&&a?h?.(r):r,L=a?K:r.join(", "),g=r.length>0;R(()=>u?.(l),[u,l]);const b=()=>{l?o(H):J(r),x(e=>!e)},N=e=>{e.preventDefault(),w?.(r),x(!1)},O=e=>{if(typeof r!="object")throw new Error("Cannot toggle chip on other than array");if(I){if(r.includes(e)&&E){o([]);return}o([e]);return}if(r.includes(e)){const n=r.filter(P=>P!==e);o(n);return}o(n=>[...n,e])};return m(Y,{children:[!l&&m(Q,{children:[t(y,{children:d}),g&&t(C,{children:L}),!g&&t(G,{children:B}),t(f,{variant:"flat",color:c,onClick:b,isDisabled:k,children:D})]}),l&&m(Z,{onSubmit:N,children:[t(y,{children:d}),a&&t(_,{...j,autoFocus:!0,value:r,label:d,onChange:e=>o(e.target.value)}),!a&&t(M,{children:T.map(e=>t(ee,{color:c,onClick:n=>{n.preventDefault(),O(e)},variant:r.includes(e)?"solid":"outline",children:e},e))}),m(q,{children:[t(A,{type:"button",variant:"flat",color:"neutral",onClick:b,children:S}),t(z,{type:"submit",color:c,children:F})]})]})]})};export{re as default};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
transform: translateY(${
|
|
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});
|
|
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:
|
|
8
|
+
color: ${({theme:r})=>o?r.colors.error.dark:r.colors.text.dark};
|
|
9
9
|
`,n=t`
|
|
10
|
-
color: ${({theme:
|
|
10
|
+
color: ${({theme:e,hasError:o})=>o?e.colors.error.dark:e.colors.text.dark};
|
|
11
11
|
`,c=t`
|
|
12
|
-
color: ${({theme:
|
|
12
|
+
color: ${({theme:e})=>e.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=
|
|
19
|
+
`,h=a.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:
|
|
25
|
+
top: ${({height:e})=>e?`${e}rem`:"0.75rem"};
|
|
26
26
|
left: calc(0.75rem + 2px);
|
|
27
27
|
transition: 150ms;
|
|
28
|
-
color: ${({theme:
|
|
28
|
+
color: ${({theme:e})=>e.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:
|
|
34
|
+
${({theme:e,hasValue:o,isFocused:r})=>(o||r)&&`
|
|
35
35
|
span {
|
|
36
36
|
display: block;
|
|
37
37
|
width: 100%;
|
|
@@ -39,13 +39,13 @@ import s,{css as t}from"styled-components";import{BodyTextStyle as i}from"../typ
|
|
|
39
39
|
position: absolute;
|
|
40
40
|
top: 5px;
|
|
41
41
|
left: 0;
|
|
42
|
-
background-color: ${
|
|
42
|
+
background-color: ${e.colors.background.light};
|
|
43
43
|
z-index: -1;
|
|
44
44
|
}
|
|
45
45
|
`}
|
|
46
46
|
|
|
47
|
-
${({hasValue:
|
|
48
|
-
${({centered:
|
|
49
|
-
${({isFocused:
|
|
50
|
-
${({disabled:
|
|
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}
|
|
51
51
|
`;export{h as Label};
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
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`
|
|
2
2
|
margin: 0 auto;
|
|
3
3
|
max-width: 700px;
|
|
4
|
-
`,y=i(
|
|
4
|
+
`,y=i(b)`
|
|
5
5
|
margin: 0.5rem;
|
|
6
6
|
`,O=i.ul`
|
|
7
7
|
display: flex;
|
|
@@ -16,11 +16,11 @@ import{jsxs as c,Fragment as u,jsx as e}from"react/jsx-runtime";import{useState
|
|
|
16
16
|
align-items: center;
|
|
17
17
|
width: calc(25% - 2px - 1.5rem);
|
|
18
18
|
padding: 0 0.25rem;
|
|
19
|
-
border: 1px solid ${
|
|
19
|
+
border: 1px solid ${({theme:r})=>r.colors.grayscaleToned.dark5};
|
|
20
20
|
border-radius: 3px;
|
|
21
21
|
margin: 0.5rem;
|
|
22
22
|
cursor: pointer;
|
|
23
|
-
`,C=i(
|
|
23
|
+
`,C=i(h)`
|
|
24
24
|
overflow-wrap: break-word;
|
|
25
25
|
word-wrap: break-word;
|
|
26
26
|
word-break: break-word;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{jsxs as u,jsx as d}from"react/jsx-runtime";import n,{css as a}from"styled-components";const
|
|
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`
|
|
2
2
|
background-color: transparent;
|
|
3
|
-
`,
|
|
4
|
-
background-color: ${({theme:e,color:
|
|
3
|
+
`,l="400ms",f="1500ms",k="750ms",r=a`
|
|
4
|
+
background-color: ${({theme:e,color:c})=>b(e,c).main};
|
|
5
5
|
opacity: 0.1;
|
|
6
|
-
${e=>e.isDisabled&&
|
|
7
|
-
`,
|
|
6
|
+
${e=>e.isDisabled&&m};
|
|
7
|
+
`,v=n.div`
|
|
8
8
|
cursor: ${e=>e.isDisabled?"default":"pointer"};
|
|
9
9
|
outline: none;
|
|
10
10
|
|
|
@@ -19,23 +19,23 @@ import{jsxs as u,jsx as d}from"react/jsx-runtime";import n,{css as a}from"styled
|
|
|
19
19
|
|
|
20
20
|
:hover {
|
|
21
21
|
.button-background {
|
|
22
|
-
transition: background-color ${
|
|
23
|
-
${
|
|
22
|
+
transition: background-color ${l};
|
|
23
|
+
${r}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
:focus {
|
|
28
28
|
.button-background {
|
|
29
|
-
transition: background-color ${
|
|
30
|
-
animation: FocusRipple ${
|
|
31
|
-
${
|
|
29
|
+
transition: background-color ${l};
|
|
30
|
+
animation: FocusRipple ${f} 0ms infinite alternate-reverse;
|
|
31
|
+
${r}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
:active {
|
|
36
36
|
.button-background {
|
|
37
|
-
animation: ActiveRipple ${
|
|
38
|
-
${
|
|
37
|
+
animation: ActiveRipple ${k};
|
|
38
|
+
${r}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -62,7 +62,7 @@ import{jsxs as u,jsx as d}from"react/jsx-runtime";import n,{css as a}from"styled
|
|
|
62
62
|
clip-path: circle(50%);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
`,
|
|
65
|
+
`,h=n.div`
|
|
66
66
|
top: 0;
|
|
67
67
|
left: 0;
|
|
68
68
|
|
|
@@ -72,4 +72,4 @@ import{jsxs as u,jsx as d}from"react/jsx-runtime";import n,{css as a}from"styled
|
|
|
72
72
|
|
|
73
73
|
position: absolute;
|
|
74
74
|
border-radius: 10rem;
|
|
75
|
-
`,
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as H,jsx as C}from"react/jsx-runtime";import o from"../../theme.js";const
|
|
1
|
+
import{jsxs as H,jsx as C}from"react/jsx-runtime";import o from"../../theme.js";const t=({color:l=o.colors.text.dark})=>H("svg",{viewBox:"0 0 622 223",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"kvdlogo-en",children:[C("title",{id:"kvdlogo-en",children:"kvdcars.com"}),C("path",{d:"M563.63 130.23C561.82 127.17 559.53 124.57 556.81 122.52C554.18 120.54 551.29 118.87 548.23 117.57C545.36 116.35 542.64 115.15 540.14 113.99C537.8 112.9 535.83 111.71 534.29 110.44C533.08 109.44 532.52 108.24 532.52 106.67C532.52 105.1 533 103.96 534.02 103.11C535.07 102.24 536.56 101.77 538.46 101.73L561.94 109.52V87.83L560.57 87.35C556.81 86.02 553.15 84.93 549.69 84.12C546.16 83.29 542.26 82.86 538.12 82.86C533.98 82.86 530.19 83.43 526.85 84.55C523.47 85.69 520.55 87.34 518.16 89.44C515.76 91.56 513.88 94.13 512.56 97.09C511.24 100.04 510.58 103.34 510.58 106.9C510.58 111.77 511.52 115.84 513.38 118.99C515.2 122.07 517.48 124.61 520.18 126.56C522.79 128.44 525.66 130 528.73 131.18C531.61 132.3 534.3 133.42 536.71 134.52C539.01 135.57 540.96 136.75 542.49 138.01C543.7 139.01 544.26 140.31 544.26 142.11C544.26 144.1 543.67 145.47 542.4 146.43C541.05 147.45 539.09 147.99 536.59 148.04L511.34 139.22V161.63L512.59 162.16C515.97 163.59 519.84 164.8 524.09 165.77C528.38 166.75 532.95 167.24 537.67 167.24C541.8 167.24 545.64 166.67 549.08 165.55C552.56 164.42 555.62 162.77 558.18 160.64C560.78 158.48 562.82 155.81 564.26 152.7C565.69 149.6 566.42 146.03 566.42 142.1C566.44 137.37 565.49 133.38 563.63 130.23Z",fill:l}),C("path",{d:"M124.01 84.33H99.02L77.58 114.92V56.04H55.16V166.56H77.58V132.24L101.06 166.56H127.94L96.57 123.5L124.01 84.33Z",fill:l}),C("path",{d:"M235.3 144.12C224.78 144.12 216.25 135.59 216.25 125.07C216.25 114.55 224.78 106.02 235.3 106.02C245.83 106.02 254.35 114.55 254.35 125.07C254.35 135.59 245.82 144.12 235.3 144.12ZM255.53 88.9C249.48 85.46 242.49 83.5 235.04 83.5C212.11 83.5 193.52 102.09 193.52 125.02C193.52 147.95 212.11 166.54 235.04 166.54C242.49 166.54 249.49 164.58 255.53 161.14V166.56H277.95V56.04H255.53V88.9Z",fill:l}),C("path",{d:"M175.62 84.33L161.08 131.23L146.54 84.33H124.32L149.81 166.56H150.13H172.04H172.35L197.84 84.33H175.62Z",fill:l}),C("path",{d:"M411.58 144.12C401.06 144.12 392.53 135.59 392.53 125.07C392.53 114.55 401.06 106.02 411.58 106.02C422.1 106.02 430.63 114.55 430.63 125.07C430.63 135.59 422.11 144.12 411.58 144.12ZM411.31 83.5C388.38 83.5 369.79 102.08 369.79 125.01C369.79 147.94 388.38 166.53 411.31 166.53C418.86 166.53 425.94 164.52 432.04 161V166.55H454.46V84.33H432.04V89.03C425.94 85.52 418.86 83.5 411.31 83.5Z",fill:l}),C("path",{d:"M342.97 130.89C340.51 138.56 333.32 144.12 324.83 144.12C314.3 144.12 305.78 135.59 305.78 125.07C305.78 114.55 314.31 106.02 324.83 106.02C333.59 106.02 340.95 111.94 343.18 120H366.04C363.56 99.44 346.06 83.5 324.84 83.5C301.91 83.5 283.33 102.09 283.33 125.01C283.33 147.94 301.9 166.52 324.84 166.52C345.77 166.52 363.08 151.02 365.93 130.88H342.97V130.89Z",fill:l}),C("path",{d:"M505.29 83.5C498.52 83.5 492.15 85.14 486.5 88.01V84.33H464.08V166.55H486.5V161.92V125.07H486.51C486.51 114.55 495.04 106.02 505.56 106.02C505.95 106.02 506.34 106.06 506.72 106.08V83.55C506.25 83.53 505.77 83.5 505.29 83.5Z",fill:l})]});export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as H,jsx as C}from"react/jsx-runtime";import
|
|
1
|
+
import{jsxs as H,jsx as C}from"react/jsx-runtime";import t from"../../theme.js";const o=({color:l=t.colors.text.dark})=>H("svg",{viewBox:"0 0 492 223",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"kvdlogo-sv",children:[C("title",{id:"kvdlogo-sv",children:"kvd.se"}),C("path",{d:"M124.94 84.11H99.78L78.2 114.91V55.63H55.63V166.89H78.2V132.34L101.83 166.89H128.89L97.32 123.54L124.94 84.11Z",fill:l}),C("path",{d:"M393.79 87.26C389.7 87.26 385.88 86.1 382.64 84.1H382.51V166.88H405.08V84.1H404.95C401.69 86.1 397.87 87.26 393.79 87.26Z",fill:l}),C("path",{d:"M436.21 55.59H413.64V166.89H436.21V55.59Z",fill:l}),C("path",{d:"M393.79 49.9C384.96 49.9 377.77 57.09 377.77 65.92C377.77 74.75 384.95 81.94 393.79 81.94C402.63 81.94 409.81 74.76 409.81 65.92C409.8 57.09 402.62 49.9 393.79 49.9ZM393.79 72.85C389.97 72.85 386.86 69.74 386.86 65.92C386.86 62.1 389.97 58.99 393.79 58.99C397.61 58.99 400.72 62.1 400.72 65.92C400.72 69.74 397.61 72.85 393.79 72.85Z",fill:l}),C("path",{d:"M336.08 83.27C328.48 83.27 321.36 85.3 315.22 88.84V55.63H292.65V166.89H315.22V161.3C321.36 164.84 328.49 166.87 336.08 166.87C359.16 166.87 377.88 148.16 377.88 125.07C377.87 101.98 359.16 83.27 336.08 83.27ZM335.81 144.3C325.22 144.3 316.63 135.71 316.63 125.12C316.63 114.53 325.22 105.94 335.81 105.94C346.4 105.94 354.99 114.53 354.99 125.12C354.99 135.71 346.4 144.3 335.81 144.3Z",fill:l}),C("path",{d:"M257.34 88.71C251.25 85.25 244.21 83.27 236.71 83.27C213.62 83.27 194.91 101.98 194.91 125.07C194.91 148.15 213.62 166.87 236.71 166.87C244.21 166.87 251.25 164.89 257.34 161.43V166.89H279.91V55.63H257.34V88.71ZM236.98 144.3C226.39 144.3 217.8 135.71 217.8 125.12C217.8 114.53 226.39 105.94 236.98 105.94C247.57 105.94 256.16 114.53 256.16 125.12C256.16 135.71 247.57 144.3 236.98 144.3Z",fill:l}),C("path",{d:"M176.9 84.11L162.26 131.32L147.62 84.11H125.25L150.92 166.89H151.23H173.29H173.6L199.27 84.11H176.9Z",fill:l})]});export{o as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as n,jsx as i}from"react/jsx-runtime";import t from"styled-components";import{Badge as p}from"../Badge/index.js";import{Button as d}from"../Button/index.js";import"../../theme.js";import"react";import"../Spinner/index.js";import"../../typography/ButtonText/index.js";import"../Button/styles.js";const m=t.div`
|
|
1
|
+
import{jsxs as n,jsx as i}from"react/jsx-runtime";import t from"styled-components";import{Badge as p}from"../Badge/index.js";import{Button as d}from"../Button/index.js";import"../../theme.js";import"react";import"../Spinner/index.js";import"../../utils/utils.js";import"../../typography/ButtonText/index.js";import"../Button/styles.js";const m=t.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-block;
|
|
4
4
|
`,e=t(p)`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as b,jsx as l}from"react/jsx-runtime";import
|
|
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`
|
|
2
2
|
.circle {
|
|
3
3
|
&--outer {
|
|
4
4
|
height: 24px;
|
|
@@ -29,21 +29,21 @@ import{jsxs as b,jsx as l}from"react/jsx-runtime";import o,{css as s}from"styled
|
|
|
29
29
|
|
|
30
30
|
.circle {
|
|
31
31
|
&--inner {
|
|
32
|
-
background-color: ${e.colors.
|
|
32
|
+
background-color: ${e.colors.grayscaleToned.light1};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&--outer {
|
|
36
|
-
border: 2px solid ${e.colors.
|
|
36
|
+
border: 2px solid ${e.colors.grayscaleToned.light1};
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
`,k=s`
|
|
40
40
|
.circle {
|
|
41
41
|
&--inner {
|
|
42
42
|
opacity: 1;
|
|
43
|
-
background-color: ${e.colors.
|
|
43
|
+
background-color: ${e.colors.grayscaleToned.light1};
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
`,D=(r,
|
|
46
|
+
`,D=(r,o)=>s`
|
|
47
47
|
.circle {
|
|
48
48
|
&--inner {
|
|
49
49
|
opacity: 1;
|
|
@@ -52,14 +52,14 @@ import{jsxs as b,jsx as l}from"react/jsx-runtime";import o,{css as s}from"styled
|
|
|
52
52
|
|
|
53
53
|
&--outer {
|
|
54
54
|
border: 2px solid
|
|
55
|
-
${
|
|
55
|
+
${o?e.colors.error.dark:e.colors[r].main};
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`,z=
|
|
58
|
+
`,z=i.div`
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: center;
|
|
61
61
|
box-sizing: border-box;
|
|
62
|
-
`,
|
|
62
|
+
`,T=i.span`
|
|
63
63
|
cursor: pointer;
|
|
64
64
|
display: flex;
|
|
65
65
|
position: relative;
|
|
@@ -72,7 +72,7 @@ import{jsxs as b,jsx as l}from"react/jsx-runtime";import o,{css as s}from"styled
|
|
|
72
72
|
${r=>r.isDisabled&&y};
|
|
73
73
|
|
|
74
74
|
${r=>r.isChecked&&r.isDisabled&&k};
|
|
75
|
-
`,
|
|
75
|
+
`,E=i.input`
|
|
76
76
|
position: absolute;
|
|
77
77
|
opacity: 0;
|
|
78
78
|
margin: 0;
|
|
@@ -84,26 +84,26 @@ import{jsxs as b,jsx as l}from"react/jsx-runtime";import o,{css as s}from"styled
|
|
|
84
84
|
transition: background-color 400ms;
|
|
85
85
|
${x}
|
|
86
86
|
}
|
|
87
|
-
`,
|
|
87
|
+
`,v=i.span`
|
|
88
88
|
display: flex;
|
|
89
89
|
box-sizing: border-box;
|
|
90
90
|
border-radius: 50%;
|
|
91
91
|
|
|
92
92
|
border: 2px solid
|
|
93
|
-
${r=>r.$hasError?e.colors.error.dark:e.colors.
|
|
94
|
-
`,
|
|
93
|
+
${r=>r.$hasError?e.colors.error.dark:e.colors.grayscaleToned.light1};
|
|
94
|
+
`,w=i.span`
|
|
95
95
|
box-sizing: border-box;
|
|
96
96
|
opacity: 0;
|
|
97
97
|
margin: auto;
|
|
98
98
|
border-radius: 50%;
|
|
99
|
-
background-color: ${e.colors.
|
|
99
|
+
background-color: ${e.colors.grayscaleToned.light1};
|
|
100
100
|
|
|
101
101
|
position: absolute;
|
|
102
102
|
top: 0;
|
|
103
103
|
left: 0;
|
|
104
|
-
`,
|
|
104
|
+
`,B=i(g)`
|
|
105
105
|
cursor: ${({isDisabled:r})=>r?"default":"pointer"};
|
|
106
106
|
user-select: none;
|
|
107
|
-
color: ${({theme:r,isDisabled:
|
|
107
|
+
color: ${({theme:r,isDisabled:o})=>o?r.colors.text.disabled:r.colors.text.dark};
|
|
108
108
|
margin-left: 0.5rem;
|
|
109
|
-
`,p=({name:r=
|
|
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};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import{jsxs as u,jsx as
|
|
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`
|
|
2
2
|
font-family: ${({theme:o})=>o.typography.fontBaseFamily};
|
|
3
3
|
position: relative;
|
|
4
|
-
`,
|
|
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`
|
|
5
5
|
position: absolute;
|
|
6
6
|
z-index: 1;
|
|
7
7
|
top: 0.5rem;
|
|
8
8
|
margin: 0.35rem 0.75rem;
|
|
9
9
|
|
|
10
|
-
fill: ${
|
|
10
|
+
fill: ${r.colors.grayscaleToned.dark5};
|
|
11
11
|
transition: ${S};
|
|
12
12
|
|
|
13
|
-
${o=>o.isDisabled&&` fill: ${
|
|
13
|
+
${o=>o.isDisabled&&` fill: ${r.colors.grayscaleToned.light1}; `}
|
|
14
14
|
|
|
15
15
|
${o=>o.isFocused&&` fill: ${o.theme.colors.text.dark}; `}
|
|
16
16
|
`,P=m.span`
|
|
17
|
-
${
|
|
17
|
+
${R}
|
|
18
18
|
display: block;
|
|
19
19
|
margin-top: 0.25rem;
|
|
20
|
-
color: ${({hasError:o})=>o?
|
|
21
|
-
`,V=o=>u("svg",{...o,children:[
|
|
20
|
+
color: ${({hasError:o})=>o?r.colors.error.dark:r.colors.text.disabled};
|
|
21
|
+
`,V=o=>u("svg",{...o,children:[a("symbol",{id:"icon-arrow",viewBox:"0 0 19 19",children:a("path",{d:"M2.03039 7.95496L9.80856 15.7331C9.90619 15.8308 10.0645 15.8308 10.1621 15.7331L17.9403 7.95496L19.0009 9.01562L11.2228 16.7938C10.5394 17.4772 9.43132 17.4772 8.7479 16.7938L0.969727 9.01562L2.03039 7.95496Z"})}),a("use",{xlinkHref:"#icon-arrow"})]}),G=m(V)`
|
|
22
22
|
width: 0.75rem;
|
|
23
23
|
height: 0.75rem;
|
|
24
24
|
margin: 0;
|
|
25
25
|
${o=>o.$isFocused&&`color: ${o.$theme.colors.text.dark}`}
|
|
26
|
-
${o=>o.$isDisabled&&`color: ${o.$theme.colors.
|
|
26
|
+
${o=>o.$isDisabled&&`color: ${o.$theme.colors.grayscaleToned.dark1}`}
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
path {
|
|
@@ -36,4 +36,4 @@ import{jsxs as u,jsx as t,Fragment as N}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,
|
|
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};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{jsx as
|
|
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`
|
|
2
2
|
top: 0;
|
|
3
|
-
`,bottom:
|
|
3
|
+
`,bottom:r`
|
|
4
4
|
bottom: 0;
|
|
5
|
-
`},
|
|
5
|
+
`},N={right:r`
|
|
6
6
|
right: 0;
|
|
7
|
-
`,center:
|
|
7
|
+
`,center:r`
|
|
8
8
|
left: 50%;
|
|
9
9
|
transform: translate(-50%, 0);
|
|
10
|
-
`,left:
|
|
10
|
+
`,left:r`
|
|
11
11
|
left: 0;
|
|
12
|
-
`},
|
|
13
|
-
font-family: ${({theme:
|
|
12
|
+
`},s=200,i="anim",O=n.div`
|
|
13
|
+
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
14
14
|
position: fixed;
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
@@ -23,17 +23,17 @@ import{jsx as e,jsxs as $}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
23
23
|
border-radius: 0.4rem;
|
|
24
24
|
padding: 1.15rem 1.25rem;
|
|
25
25
|
|
|
26
|
-
font-weight: ${({theme:
|
|
26
|
+
font-weight: ${({theme:e})=>e.typography.fontBaseBoldWeight};
|
|
27
27
|
font-size: 0.875rem;
|
|
28
28
|
|
|
29
|
-
box-shadow: ${
|
|
30
|
-
background-color: ${o=>o
|
|
31
|
-
color: ${o=>o
|
|
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};
|
|
32
32
|
|
|
33
|
-
${
|
|
34
|
-
${
|
|
33
|
+
${e=>B[e.origin.vertical||"bottom"]}
|
|
34
|
+
${e=>N[e.origin.horizontal||"left"]}
|
|
35
35
|
|
|
36
|
-
transition: opacity ${
|
|
36
|
+
transition: opacity ${s}ms ease-in;
|
|
37
37
|
|
|
38
38
|
&.${i}-enter {
|
|
39
39
|
opacity: 0;
|
|
@@ -47,19 +47,19 @@ import{jsx as e,jsxs as $}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
47
47
|
&.${i}-exit-active {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
`,
|
|
50
|
+
`,g=n.div`
|
|
51
51
|
display: inline-flex;
|
|
52
52
|
margin: -0.25rem 0;
|
|
53
53
|
margin-right: 0.75rem;
|
|
54
54
|
|
|
55
|
-
${
|
|
55
|
+
${e=>e.type==="text"&&"margin-right: 0;"}
|
|
56
56
|
|
|
57
57
|
svg {
|
|
58
58
|
width: 1.5rem;
|
|
59
59
|
height: 1.5rem;
|
|
60
|
-
fill: ${o=>o
|
|
60
|
+
fill: ${({theme:e,color:o})=>o!=="none"?e.colors.background.light:e.colors.background.dark};
|
|
61
61
|
}
|
|
62
|
-
`,
|
|
62
|
+
`,S=n(g)`
|
|
63
63
|
cursor: pointer;
|
|
64
64
|
|
|
65
65
|
/* Bigger click area */
|
|
@@ -75,4 +75,4 @@ import{jsx as e,jsxs as $}from"react/jsx-runtime";import{useEffect as b}from"rea
|
|
|
75
75
|
}
|
|
76
76
|
`,T=n.span`
|
|
77
77
|
flex: 1;
|
|
78
|
-
`,
|
|
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};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{jsx as
|
|
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`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
5
5
|
100% {
|
|
6
6
|
transform: rotate(360deg);
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,p=s.div`
|
|
9
9
|
display: inline-block;
|
|
10
10
|
border-radius: 50%;
|
|
11
|
-
border-top: ${({theme:e,color:r,size:
|
|
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}`};
|
|
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);`};
|
|
15
15
|
width: ${({size:e})=>o(e)}em;
|
|
16
16
|
height: ${({size:e})=>o(e)}em;
|
|
17
|
-
animation: ${
|
|
17
|
+
animation: ${f} ${({speed:e})=>u(e)} infinite linear;
|
|
18
18
|
will-change: transform;
|
|
19
|
-
|
|
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};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as l,jsx as e}from"react/jsx-runtime";import o from"styled-components";import d from"../../icons/components/CheckmarkIcon.js";import p from"../../icons/components/CloseIcon.js";import f from"../Spinner/index.js";import"../../theme.js";import"../../utils/utils.js";const c=o.div`
|
|
2
2
|
position: absolute;
|
|
3
|
-
|
|
3
|
+
`,h=o(f)`
|
|
4
4
|
position: absolute;
|
|
5
5
|
|
|
6
6
|
${({size:i})=>i&&`
|
|
@@ -16,7 +16,7 @@ import{jsxs as d,jsx as e}from"react/jsx-runtime";import o from"styled-component
|
|
|
16
16
|
|
|
17
17
|
${({isLoading:i,theme:t})=>!i&&`
|
|
18
18
|
animation: none;
|
|
19
|
-
border: 1px solid ${t.colors.
|
|
19
|
+
border: 1px solid ${t.colors.grayscaleToned.dark3};
|
|
20
20
|
`}
|
|
21
21
|
`,s=o.div`
|
|
22
22
|
position: absolute;
|
|
@@ -35,4 +35,4 @@ import{jsxs as d,jsx as e}from"react/jsx-runtime";import o from"styled-component
|
|
|
35
35
|
|
|
36
36
|
transition: opacity 500ms ease-in-out;
|
|
37
37
|
opacity: ${({isDone:i,isError:t})=>!i&&!t?"0":"1"};
|
|
38
|
-
`,n=({isLoading:i=!0,isDone:t=!1,isError:a=!1,size:r=3.5,...m})=>
|
|
38
|
+
`,n=({isLoading:i=!0,isDone:t=!1,isError:a=!1,size:r=3.5,...m})=>l(c,{"data-testid":"spinner-thin","aria-label":"Loading...",children:[e(s,{size:r,isDone:t,children:e(d,{})}),e(s,{isClose:!0,size:r,isError:a,children:e(p,{})}),e(h,{size:r,speed:"fast",color:"neutral",isLoading:i,...m})]});export{n as SpinnerThin,n as default};
|
|
@@ -4,7 +4,7 @@ import{jsx as l}from"react/jsx-runtime";import a from"styled-components";import
|
|
|
4
4
|
border-radius: 12px;
|
|
5
5
|
border: none;
|
|
6
6
|
padding: 2px;
|
|
7
|
-
background-color: ${({selected:o,disabled:e,color:d})=>e?r.colors.
|
|
7
|
+
background-color: ${({selected:o,disabled:e,color:d})=>e?r.colors.grayscaleToned.light3:o?r.colors[d]?.main:r.colors.grayscaleToned.dark5};
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
10
|
justify-content: ${({selected:o})=>o?"flex-end":"flex-start"};
|
|
@@ -15,6 +15,9 @@ import{jsx as l}from"react/jsx-runtime";import a from"styled-components";import
|
|
|
15
15
|
width: 20px;
|
|
16
16
|
height: 20px;
|
|
17
17
|
border-radius: 50%;
|
|
18
|
-
background-color: ${({disabled:o})=>o?r.colors.
|
|
19
|
-
box-shadow:
|
|
20
|
-
|
|
18
|
+
background-color: ${({disabled:o})=>o?r.colors.grayscaleToned.light6:r.colors.common.white};
|
|
19
|
+
box-shadow:
|
|
20
|
+
0 2px 4px rgba(0, 0, 0, 0.1),
|
|
21
|
+
0 2px 4px rgba(0, 0, 0, 0.09),
|
|
22
|
+
0 1px 5px rgba(0, 0, 0, 0.15);
|
|
23
|
+
`,s=({selected:o=!1,disabled:e=!1,onToggle:d,color:i="info",...t})=>l(c,{selected:o,disabled:e,color:i,onClick:()=>{!e&&d&&d(!o)},...t,children:l(n,{disabled:e})});export{s as Switcher,s as default};
|