@kvdbil/components 15.0.3 → 15.0.5
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/README.md +3 -1
- package/cjs/components/Breadcrumbs/BreadcrumbsItem.js +8 -7
- package/cjs/components/Breadcrumbs/index.js +1 -1
- package/esm/components/Breadcrumbs/BreadcrumbsItem.js +19 -9
- package/esm/components/Breadcrumbs/index.js +2 -2
- package/esm/components/Button/styles.js +1 -1
- package/esm/components/Card/index.js +4 -4
- package/esm/components/CheckBox/index.js +3 -3
- package/esm/components/Chip/index.js +4 -4
- package/esm/components/DayPicker/index.js +2 -2
- package/esm/components/EditRow/index.js +1 -1
- package/esm/components/Hero/index.js +19 -19
- package/esm/components/Icon/index.js +2 -2
- package/esm/components/IconButton.js +7 -7
- package/esm/components/Message/index.js +2 -2
- package/esm/components/Modal/index.js +1 -1
- package/esm/components/OffCanvas/Overlay.js +2 -2
- package/esm/components/Select/index.js +1 -1
- package/esm/components/Snackbar/index.js +1 -1
- package/esm/components/SpinnerThin/index.js +3 -3
- package/esm/components/StepperAccordion/index.js +7 -7
- package/esm/components/Tabs/Tab.js +3 -3
- package/esm/components/TextArea/index.js +1 -1
- package/esm/components/Textfield/index.js +1 -1
- package/esm/components/ValuationRange/index.js +2 -2
- package/package.json +3 -2
- package/package.json.tmp +3 -2
- package/types/components/Breadcrumbs/BreadcrumbsItem.d.ts +2 -1
- package/types/components/Breadcrumbs/index.d.ts +2 -1
package/README.md
CHANGED
|
@@ -47,4 +47,6 @@ When adding new icons:
|
|
|
47
47
|
|
|
48
48
|
## Outdated dependencies
|
|
49
49
|
|
|
50
|
-
- typescript - @typescript-eslint/typescript-estree does not support any Typescript version above 5.5.4
|
|
50
|
+
- typescript - @typescript-eslint/typescript-estree does not support any Typescript version above 5.5.4
|
|
51
|
+
- @types/react, @types/react-dom, react, react-dom, react-is - Waiting for React 19
|
|
52
|
+
- react-day-picker - quite a big task (KVDBIL-3865)
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("styled-components"),n=require("../../typography/BodyText/index.js");require("../../shared/media-queries.js");var r,o=(r=t)&&r.__esModule?r:{default:r};const i=o.default.li`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
margin: 0;
|
|
5
5
|
text-indent: 0;
|
|
6
6
|
list-style-type: none;
|
|
7
|
-
overflow: hidden
|
|
7
|
+
${({$onlyLastTruncated:e})=>!e&&"\n overflow: hidden;\n "}
|
|
8
8
|
|
|
9
9
|
a {
|
|
10
|
-
${
|
|
10
|
+
${n.BodyTextStyle}
|
|
11
11
|
font-weight: ${({theme:e})=>e.typography.fontBaseBoldWeight};
|
|
12
12
|
color: ${({theme:e})=>e.colors.info.main};
|
|
13
13
|
text-decoration: none;
|
|
14
|
-
overflow: hidden
|
|
15
|
-
text-overflow: ellipsis;
|
|
14
|
+
${({$onlyLastTruncated:e})=>!e&&"\n overflow: hidden;\n text-overflow: ellipsis;\n "}
|
|
16
15
|
}
|
|
17
|
-
|
|
16
|
+
|
|
17
|
+
${({$onlyLastTruncated:e})=>e&&"\n &:last-child {\n overflow: hidden;\n }\n "}
|
|
18
|
+
`,l=o.default(n.BodyText)`
|
|
18
19
|
color: ${({theme:e})=>e.colors.text.dark};
|
|
19
20
|
overflow: hidden;
|
|
20
21
|
text-overflow: ellipsis;
|
|
@@ -33,4 +34,4 @@
|
|
|
33
34
|
width: 1rem;
|
|
34
35
|
height: 1rem;
|
|
35
36
|
}
|
|
36
|
-
`;exports.default=({link:t,separator:
|
|
37
|
+
`;exports.default=({link:t,separator:n,isLast:r,onlyLastTruncated:o})=>e.jsx(e.Fragment,{children:e.jsxs(i,{$onlyLastTruncated:o,children:[t.prefixIcon&&e.jsx(s,{children:t.prefixIcon}),r?e.jsx(l,{as:"span",children:t.component}):e.jsxs(e.Fragment,{children:[t.component,e.jsx(d,{children:n})]})]})});
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
padding: 0;
|
|
5
5
|
white-space: nowrap;
|
|
6
6
|
overflow: hidden;
|
|
7
|
-
`;exports.default=({links:e,separator:s=r.jsx(a.default,{})})=>r.jsx(i,{children:e.map(((a,i)=>r.jsx(t.default,{link:a,separator:s,isLast:i===e.length-1},i)))});
|
|
7
|
+
`;exports.default=({links:e,separator:s=r.jsx(a.default,{}),onlyLastTruncated:n=!1})=>r.jsx(i,{children:e.map(((a,i)=>r.jsx(t.default,{link:a,separator:s,isLast:i===e.length-1,onlyLastTruncated:n},i)))});
|
|
@@ -1,31 +1,41 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,Fragment as n,jsxs as i}from"react/jsx-runtime";import o from"styled-components";import{BodyTextStyle as a,BodyText as s}from"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const h=o.li`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
margin: 0;
|
|
5
5
|
text-indent: 0;
|
|
6
6
|
list-style-type: none;
|
|
7
|
-
|
|
7
|
+
${({$onlyLastTruncated:e})=>!e&&`
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
`}
|
|
8
10
|
|
|
9
11
|
a {
|
|
10
|
-
${
|
|
12
|
+
${a}
|
|
11
13
|
font-weight: ${({theme:e})=>e.typography.fontBaseBoldWeight};
|
|
12
14
|
color: ${({theme:e})=>e.colors.info.main};
|
|
13
15
|
text-decoration: none;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
${({$onlyLastTruncated:e})=>!e&&`
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
`}
|
|
16
20
|
}
|
|
17
|
-
|
|
21
|
+
|
|
22
|
+
${({$onlyLastTruncated:e})=>e&&`
|
|
23
|
+
&:last-child {
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
`}
|
|
27
|
+
`,c=o(s)`
|
|
18
28
|
color: ${({theme:e})=>e.colors.text.dark};
|
|
19
29
|
overflow: hidden;
|
|
20
30
|
text-overflow: ellipsis;
|
|
21
|
-
`,m=
|
|
31
|
+
`,m=o.span`
|
|
22
32
|
display: inline-flex;
|
|
23
33
|
padding-right: 0.5rem;
|
|
24
34
|
svg {
|
|
25
35
|
width: 1rem;
|
|
26
36
|
height: 1rem;
|
|
27
37
|
}
|
|
28
|
-
`,p=
|
|
38
|
+
`,p=o.span`
|
|
29
39
|
display: inline-flex;
|
|
30
40
|
padding: 0 0.5rem;
|
|
31
41
|
color: ${({theme:e})=>e.colors.gray.light1};
|
|
@@ -33,4 +43,4 @@ import{jsx as o,Fragment as t,jsxs as r}from"react/jsx-runtime";import i from"st
|
|
|
33
43
|
width: 1rem;
|
|
34
44
|
height: 1rem;
|
|
35
45
|
}
|
|
36
|
-
`,
|
|
46
|
+
`,f=({link:e,separator:r,isLast:l,onlyLastTruncated:d})=>t(n,{children:i(h,{$onlyLastTruncated:d,children:[e.prefixIcon&&t(m,{children:e.prefixIcon}),l?t(c,{as:"span",children:e.component}):i(n,{children:[e.component,t(p,{children:r})]})]})});export{f as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import n from"styled-components";import p from"./BreadcrumbsItem.js";import s from"../../icons/components/NextIcon.js";import"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const l=n.ul`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
padding: 0;
|
|
5
5
|
white-space: nowrap;
|
|
6
6
|
overflow: hidden;
|
|
7
|
-
`,
|
|
7
|
+
`,m=({links:t,separator:a=r(s,{}),onlyLastTruncated:e=!1})=>r(l,{children:t.map((i,o)=>r(p,{link:i,separator:a,isLast:o===t.length-1,onlyLastTruncated:e},o))});export{m as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ButtonSmallTextStyle as c,ButtonRegularTextStyle as e,ButtonLargeTextStyle as a}from"../../typography/ButtonText/index.js";import"react/jsx-runtime";import"styled-components";const n={smaller:c,small:e,regular:e,large:a},d=()=>`
|
|
2
2
|
padding: 0.25rem 0.75rem;
|
|
3
3
|
min-height: 2.5rem;
|
|
4
4
|
`,g=()=>`
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as s,jsx as i}from"react/jsx-runtime";import l from"styled-components";import n from"../../theme.js";const m=l.div``,p=l.div`
|
|
2
2
|
background: ${({topBorder:r})=>r};
|
|
3
3
|
height: 0.25rem;
|
|
4
|
-
`,g=
|
|
5
|
-
background: ${
|
|
4
|
+
`,g=l.div`
|
|
5
|
+
background: ${n.colors.background.light};
|
|
6
6
|
|
|
7
7
|
${({noFrame:r,topBorder:o,lineBorder:e,theme:d})=>!o&&(!r||e)&&`border-top: 1px solid ${d.colors.gray.light5};`}
|
|
8
8
|
|
|
@@ -11,4 +11,4 @@ import{jsxs as n,jsx as t}from"react/jsx-runtime";import i from"styled-component
|
|
|
11
11
|
|
|
12
12
|
${({noFrame:r,lineBorder:o,theme:e})=>!r&&!o&&`border-right: 1px solid ${e.colors.gray.light5};
|
|
13
13
|
border-left: 1px solid ${e.colors.gray.light5};`}
|
|
14
|
-
`,
|
|
14
|
+
`,t=({children:r,topBorder:o,noFrame:e=!1,lineBorder:d=!1,as:a="div"})=>s(m,{as:a,children:[o&&i(p,{topBorder:o}),i(g,{topBorder:o,noFrame:e,lineBorder:d,children:r})]});export{t as Card,t as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as b,jsx as s}from"react/jsx-runtime";import t,{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
|
|
1
|
+
import{jsxs as b,jsx as s}from"react/jsx-runtime";import t,{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";const k=r`
|
|
2
2
|
width: 24px;
|
|
3
3
|
height: 24px;
|
|
4
4
|
|
|
@@ -51,7 +51,7 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import t,{css as r}from"styled
|
|
|
51
51
|
|
|
52
52
|
:focus-visible {
|
|
53
53
|
transition: background-color 400ms;
|
|
54
|
-
${
|
|
54
|
+
${u}
|
|
55
55
|
}
|
|
56
56
|
`,S=t.span`
|
|
57
57
|
box-sizing: border-box;
|
|
@@ -75,7 +75,7 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import t,{css as r}from"styled
|
|
|
75
75
|
${e=>e.isDisabled&&y};
|
|
76
76
|
${e=>e.hasError&&D};
|
|
77
77
|
${e=>e.isChecked&&e.isDisabled&&z};
|
|
78
|
-
`,j=t(
|
|
78
|
+
`,j=t(f)`
|
|
79
79
|
flex: 1;
|
|
80
80
|
cursor: ${({isDisabled:e})=>e?"default":"pointer"};
|
|
81
81
|
user-select: none;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{jsx as i,jsxs as
|
|
1
|
+
import{jsx as i,jsxs as y}from"react/jsx-runtime";import t from"styled-components";import C from"../../icons/components/CloseIcon.js";import{getFontSize as $,getCursorType as m,getBackgroundColor as v,getColor as x,getBorderColor as k,getHoverBorderColor as B,getHoverBackgroundColor as z,getHoverColor as D,getActiveBackgroundColor as p,getActiveBorderColor as j,getActiveColor as H,getSufixHoverBackgroundColor as w}from"./styles.js";const A={smaller:"0.25rem 1rem",small:"0.25rem 1rem",regular:"0.25rem 1rem",large:"0.5rem 1rem"},S=t.div`
|
|
2
2
|
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
3
|
-
font-size: ${({size: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
8
|
cursor: ${m};
|
|
9
9
|
align-items: center;
|
|
10
|
-
background: ${
|
|
10
|
+
background: ${v};
|
|
11
11
|
color: ${x};
|
|
12
12
|
justify-content: center;
|
|
13
13
|
border-width: 1px;
|
|
@@ -70,4 +70,4 @@ import{jsx as i,jsxs as v}from"react/jsx-runtime";import t from"styled-component
|
|
|
70
70
|
&:hover:before {
|
|
71
71
|
opacity: 1;
|
|
72
72
|
}
|
|
73
|
-
`,b=({color:e="primary",children:l,component:
|
|
73
|
+
`,b=({color:e="primary",children:l,component:u="div",isDisabled:o,onClick:s,size:f="regular",prefix:n,onDelete:a,variant:c="solid",...h})=>{const r=!!(s&&!o),d=!!(a&&!o);return i(S,{...h,role:r?"button":void 0,onClick:r?s:void 0,tabIndex:r?0:void 0,as:r?"button":u,color:e,isDisabled:o,size:f,isClickable:r,isDeletable:d,variant:c,hasPrefix:!!n,children:y(F,{children:[n&&i(I,{className:"prefix",children:n}),l,a&&i(P,{role:"button",onClick:d?g=>{g.stopPropagation(),a?.(g)}:void 0,color:e,variant:c,isClickable:r,isDisabled:o,isDeletable:!0,size:"regular",children:i(C,{})})]})})};export{b as Chip,b as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import a from"react-day-picker";import c from"styled-components";import r from"../../theme.js";import n from"./DayPickerNavBar.js";import{
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import a from"react-day-picker";import c from"styled-components";import r from"../../theme.js";import n from"./DayPickerNavBar.js";import{MONTHS as p,WEEKDAYS_LONG as s,WEEKDAYS_SHORT as f,FIRST_DAY_OF_THE_WEEK as y}from"./localeUtils.js";import d from"./style.js";import"../Icons/Arrow.js";import"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const E=c.div`
|
|
2
2
|
${d}
|
|
3
3
|
|
|
4
4
|
font-family: ${({theme:o})=>o.typography.fontAlternativeFamily};
|
|
5
|
-
`,S=o=>({selected:{color:r.colors.text.light,background:r.colors[o].main},today:{color:r.colors[o].main}}),e=({locale:o="sv",color:m="primary",...i})=>t(E,{color:m,children:t(a,{...i,locale:o,months:
|
|
5
|
+
`,S=o=>({selected:{color:r.colors.text.light,background:r.colors[o].main},today:{color:r.colors[o].main}}),e=({locale:o="sv",color:m="primary",...i})=>t(E,{color:m,children:t(a,{...i,locale:o,months:p[o],weekdaysLong:s[o],weekdaysShort:f[o],firstDayOfWeek:y[o],navbarElement:l=>t(n,{...l,locale:o}),captionElement:t("div",{}),modifiersStyles:S(m)})});export{e as DayPicker,e as default};
|
|
@@ -31,4 +31,4 @@ import{jsxs as m,Fragment as P,jsx as o}from"react/jsx-runtime";import{useState
|
|
|
31
31
|
flex-wrap: wrap;
|
|
32
32
|
`,M=i(V)`
|
|
33
33
|
margin: 0.5rem;
|
|
34
|
-
`,ee=({value:p,label:c,onChange:w,onEdit:
|
|
34
|
+
`,ee=({value:p,label:c,onChange:w,onEdit:u,options:j=[],inputProps:T={},isClearable:D=!1,isEditionDisabled:k=!1,editText:E,saveText:F,cancelText:S,noValueText:B,formatterFunc:h,isSingleSelect:$,color:d="secondary"})=>{const[r,t]=s(p),[G,H]=s(p),[l,x]=s(!1),a=typeof r=="string",J=h&&a?h?.(r):r,K=a?J:r.join(", "),g=r.length>0;Q(()=>u?.(l),[u,l]);const b=()=>{l?t(G):H(r),x(e=>!e)},L=e=>{e.preventDefault(),w?.(r),x(!1)},N=e=>{if(typeof r!="object")throw new Error("Cannot toggle chip on other than array");if($){if(r.includes(e)&&D){t([]);return}t([e]);return}if(r.includes(e)){const n=r.filter(O=>O!==e);t(n);return}t(n=>[...n,e])};return m(X,{children:[!l&&m(P,{children:[o(v,{children:c}),g&&o(C,{children:K}),!g&&o(A,{children:B}),o(f,{variant:"flat",color:d,onClick:b,isDisabled:k,children:E})]}),l&&m(Y,{onSubmit:L,children:[o(v,{children:c}),a&&o(Z,{...T,autoFocus:!0,value:r,label:c,onChange:e=>t(e.target.value)}),!a&&o(I,{children:j.map(e=>o(M,{color:d,onClick:n=>{n.preventDefault(),N(e)},variant:r.includes(e)?"solid":"outline",children:e},e))}),m(_,{children:[o(z,{type:"button",variant:"flat",color:"neutral",onClick:b,children:S}),o(q,{type:"submit",color:d,children:F})]})]})]})};export{ee as default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{jsx as o,jsxs as c}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as o,jsxs as c}from"react/jsx-runtime";import i,{keyframes as I}from"styled-components";import{Display3 as P,Title as q}from"../../typography/Heading/index.js";import{mq as m}from"../../shared/media-queries.js";const A=i.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
min-height: 440px;
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
|
-
`,
|
|
6
|
+
`,f=I`
|
|
7
7
|
0% {
|
|
8
8
|
background-color:#f5f5f5;
|
|
9
9
|
}
|
|
@@ -14,11 +14,11 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import t,{keyframes as I}from"
|
|
|
14
14
|
|
|
15
15
|
100% {
|
|
16
16
|
background-color:#f5f5f5;
|
|
17
|
-
}`,B=
|
|
17
|
+
}`,B=i.div`
|
|
18
18
|
width: 100%;
|
|
19
19
|
height: 440px;
|
|
20
|
-
animation: ${
|
|
21
|
-
`,D=
|
|
20
|
+
animation: ${f} 2s linear infinite;
|
|
21
|
+
`,D=i.div`
|
|
22
22
|
pointer-events: ${({$pointerEvents:e})=>e};
|
|
23
23
|
display: flex;
|
|
24
24
|
flex-direction: ${({$direction:e})=>e};
|
|
@@ -27,26 +27,26 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import t,{keyframes as I}from"
|
|
|
27
27
|
padding: 3rem 1.5rem;
|
|
28
28
|
z-index: 1;
|
|
29
29
|
flex: 1;
|
|
30
|
-
`,F=
|
|
30
|
+
`,F=i.iframe`
|
|
31
31
|
position: absolute;
|
|
32
32
|
width: 100%;
|
|
33
33
|
height: 100%;
|
|
34
34
|
top: 0;
|
|
35
35
|
left: 0;
|
|
36
|
-
`,a=e=>typeof e=="number",
|
|
36
|
+
`,a=e=>typeof e=="number",g=e=>typeof e=="string",T=({$positionX:e,$positionY:t})=>{if(a(e)&&a(t))return`${e}% ${t}%`;if(g(e)&&g(t))return`${e} ${t}`;if(e||t){const n=a(e)?`${e}%`:e,r=a(t)?`${t}%`:t;return`${n||"50%"} ${r||"50%"}`}return"50% 50%"},X=i.div`
|
|
37
37
|
width: 100%;
|
|
38
38
|
min-height: 440px;
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
justify-content: center;
|
|
42
42
|
|
|
43
|
-
${({$url:e,...
|
|
43
|
+
${({$url:e,...t})=>e&&`
|
|
44
44
|
background: url('${e}');
|
|
45
45
|
background-repeat: no-repeat;
|
|
46
46
|
background-size: cover;
|
|
47
|
-
background-position: ${T(
|
|
47
|
+
background-position: ${T(t)};
|
|
48
48
|
`}
|
|
49
|
-
`,Y=
|
|
49
|
+
`,Y=i.div`
|
|
50
50
|
padding-left: 1rem;
|
|
51
51
|
padding-right: 1rem;
|
|
52
52
|
z-index: 2;
|
|
@@ -55,7 +55,7 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import t,{keyframes as I}from"
|
|
|
55
55
|
padding-left: 1.5rem;
|
|
56
56
|
padding-right: 1.5rem;
|
|
57
57
|
}
|
|
58
|
-
`,H=
|
|
58
|
+
`,H=i.div`
|
|
59
59
|
${({$centered:e})=>e&&`
|
|
60
60
|
display: flex;
|
|
61
61
|
flex-direction: column;
|
|
@@ -63,7 +63,7 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import t,{keyframes as I}from"
|
|
|
63
63
|
text-align: center;
|
|
64
64
|
`}
|
|
65
65
|
|
|
66
|
-
${({$maxWidth:e,$dynamicGutter:
|
|
66
|
+
${({$maxWidth:e,$dynamicGutter:t})=>!t&&`
|
|
67
67
|
width: 100%;
|
|
68
68
|
margin-left: auto;
|
|
69
69
|
margin-right: auto;
|
|
@@ -81,19 +81,19 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import t,{keyframes as I}from"
|
|
|
81
81
|
margin-right: ${e.laptopVw}vw;
|
|
82
82
|
}
|
|
83
83
|
`}
|
|
84
|
-
`,J=
|
|
84
|
+
`,J=i(P)`
|
|
85
85
|
margin: 0;
|
|
86
|
-
color: ${({$color:e,theme:
|
|
86
|
+
color: ${({$color:e,theme:t})=>t.colors.text[e]};
|
|
87
87
|
|
|
88
88
|
${({$shadow:e})=>e&&"text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.2);"}
|
|
89
|
-
`,L=
|
|
89
|
+
`,L=i(q)`
|
|
90
90
|
margin: 0.25rem 0;
|
|
91
|
-
color: ${({$color:e,theme:
|
|
91
|
+
color: ${({$color:e,theme:t})=>t.colors.text[e]};
|
|
92
92
|
|
|
93
93
|
${({$shadow:e})=>e&&"text-shadow: 4px 4px 6px rgba(0, 0, 0, 0.2);"}
|
|
94
|
-
`,M=
|
|
94
|
+
`,M=i.div`
|
|
95
95
|
display: inline-block;
|
|
96
96
|
margin-top: 3rem;
|
|
97
97
|
|
|
98
|
-
${({$shadow:e,theme:
|
|
99
|
-
`,N=({imageProps:e,imageElement:
|
|
98
|
+
${({$shadow:e,theme:t})=>e&&`box-shadow: ${t.elevations.elevation8};`}
|
|
99
|
+
`,N=({imageProps:e,imageElement:t,videoProps:n,children:r,align:u,direction:x,justify:w,contentMaxWidth:y=64,heading:d,headingColor:p="dark",subheading:l,button:s,dynamicGutter:b,isLoading:v=!1,contentCentered:k=!1,containerStyle:j,elementShadow:$=!1})=>{const{autoplay:G=0,controls:z=0,disablekb:E=0,end:h,loop:S=0,modestbranding:V=1,start:W=0,showInfo:C=0}=n?.ytConfig||{};return v?o(B,{"data-testid":"loader"}):o(A,{style:j,children:n?o(F,{"data-testid":"hero-video",title:"video-frame",src:`${n.src}?disabledkb=${E}&autoplay=${G}&controls=${z}&loop=${S}&modestbranding=${V}&start=${W}&showInfo=${C}${h?`&end=${h}`:""}`,width:"100%",height:"100%",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):c(X,{"data-testid":"hero-image",$positionX:t?void 0:e?.x,$positionY:t?void 0:e?.y,$url:t?void 0:e?.src,children:[t,c(Y,{children:[(d||l||s)&&c(H,{$maxWidth:y,$dynamicGutter:b,$centered:k,children:[d&&o(J,{as:"h1",$color:p,$shadow:$,children:d}),l&&o(L,{$color:p,$shadow:$,children:l}),s&&o(M,{$shadow:$,children:s})]}),r&&o(D,{$pointerEvents:n?"none":"auto",$align:u||"flex-start",$direction:x||"column",$justify:w||"flex-start",children:r})]})]})})};export{f as colorAnimation,N as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs 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 b}from"../../typography/BodyText/index.js";import{Title as h}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";const w=i.div`
|
|
2
2
|
margin: 0 auto;
|
|
3
3
|
max-width: 700px;
|
|
4
4
|
`,y=i(h)`
|
|
@@ -29,4 +29,4 @@ import{jsxs as s,Fragment as u,jsx as e}from"react/jsx-runtime";import{useState
|
|
|
29
29
|
`,v=i.span`
|
|
30
30
|
font-size: ${({size:r})=>r};
|
|
31
31
|
color: ${({color:r})=>r};
|
|
32
|
-
`,z=({background:r=p.colors.background.light,color:l=p.colors.text.dark,icons:m,size:d="2rem"})=>{const[a,n]=x({isOpen:!1,message:"",type:"info",color:"neutral"}),g=async o=>{const
|
|
32
|
+
`,z=({background:r=p.colors.background.light,color:l=p.colors.text.dark,icons:m,size:d="2rem"})=>{const[a,n]=x({isOpen:!1,message:"",type:"info",color:"neutral"}),g=async o=>{const s=`import { ${o} } from 'kvdbil-components';`;if(navigator.clipboard)try{await navigator.clipboard.writeText(s),n(t=>({...t,isOpen:!0,message:`copied import for ${o}`,type:"success",color:"success"}))}catch(t){n(f=>({...f,isOpen:!0,message:`Could not copy text: ${t}`,type:"error",color:"error"}))}};return c(u,{children:[c(w,{children:[e(y,{as:"h2",children:"Click to copy import declaration for icon"}),e(O,{children:m.map(([o,s],t)=>c($,{background:r,onClick:()=>{g(o)},children:[e(C,{children:o}),e(v,{size:d,color:l,children:e(s,{})})]},t))})]}),e(k,{message:a.message,isOpen:a.isOpen,type:a.type,color:a.color,onClose:()=>n(o=>({...o,isOpen:!1}))})]})};export{z as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{jsxs as u,jsx as d}from"react/jsx-runtime";import
|
|
1
|
+
import{jsxs as u,jsx as d}from"react/jsx-runtime";import r,{css as a}from"styled-components";const b=a`
|
|
2
2
|
background-color: transparent;
|
|
3
3
|
`,s="400ms",m="1500ms",f="750ms",c=a`
|
|
4
|
-
background-color: ${({theme:
|
|
4
|
+
background-color: ${({theme:o,color:n})=>o.colors[n].main};
|
|
5
5
|
opacity: 0.1;
|
|
6
|
-
${
|
|
7
|
-
`,k=
|
|
8
|
-
cursor: ${
|
|
6
|
+
${o=>o.isDisabled&&b};
|
|
7
|
+
`,k=r.div`
|
|
8
|
+
cursor: ${o=>o.isDisabled?"default":"pointer"};
|
|
9
9
|
outline: none;
|
|
10
10
|
|
|
11
11
|
display: inline-block;
|
|
@@ -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
|
-
`,g=
|
|
65
|
+
`,g=r.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
|
-
`,h=({children:
|
|
75
|
+
`,h=({children:o,isActive:n,isDisabled:i,onClick:t,noTabIndex:l=!1,color:p})=>u(k,{color:p,isActive:n,isDisabled:i,onClick:e=>{e.stopPropagation(),e.preventDefault(),e.persist(),!i&&typeof t=="function"&&t(e)},onKeyDown:e=>{e.key==="Enter"&&!i&&typeof t=="function"&&(e.persist(),t(e))},tabIndex:i||l?void 0:0,children:[d(g,{className:"button-background"}),o]});export{c as BackgroundStyles,h as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
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`
|
|
2
2
|
${({isDeleted:e})=>e&&`
|
|
3
3
|
opacity: 0;
|
|
4
4
|
transition: opacity 0.3s;
|
|
@@ -36,4 +36,4 @@ import{jsx as o,jsxs as c}from"react/jsx-runtime";import{useRef as h,useState as
|
|
|
36
36
|
font-size: 2.5rem;
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
}
|
|
39
|
-
`,E=({children:e,type:t,withIcon:r=!1,isDeletable:n=!1,fullWidth:i=!1,inverted:
|
|
39
|
+
`,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};
|
|
@@ -76,4 +76,4 @@ import{jsx as t,jsxs as e,Fragment as x}from"react/jsx-runtime";import{useEffect
|
|
|
76
76
|
}
|
|
77
77
|
`,O=d`
|
|
78
78
|
${s}
|
|
79
|
-
`,c=({children:m,isOpen:n,contentStyles:p,withPortal:l=!1,withCloseIcon:
|
|
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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{CSSTransition as r}from"react-transition-group";import e from"styled-components";const s={classNames:"backgroundTransition",timeout:{enter:400,exit:400},mountOnEnter:!0,unmountOnExit:!0},c=e.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
z-index: 1000;
|
|
4
4
|
width: 100%;
|
|
@@ -24,4 +24,4 @@ import{jsx as n}from"react/jsx-runtime";import{CSSTransition as r}from"react-tra
|
|
|
24
24
|
opacity: 0;
|
|
25
25
|
transition: opacity 0.2s ease-in-out;
|
|
26
26
|
}
|
|
27
|
-
`,u=({className:
|
|
27
|
+
`,u=({className:n,isOpen:o,onClick:i,transitionProps:a=s})=>t(r,{in:o,...a,className:n,children:t(c,{onClick:()=>{i&&i()}})});export{u as default};
|
|
@@ -36,4 +36,4 @@ import{jsxs as k,jsx as l}from"react/jsx-runtime";import{useState as F}from"reac
|
|
|
36
36
|
transform: ${o=>o.$isMenuOpen?"rotate(-180deg)":"rotate(0deg)"};
|
|
37
37
|
|
|
38
38
|
transform-origin: 50% 60%;
|
|
39
|
-
`,G=(o,
|
|
39
|
+
`,G=(o,t)=>t?e.colors.error.main:o?e.colors.text.dark:e.colors.gray.light1,U=({selectProps:{menuIsOpen:o=!1},isFocused:t=!1,isDisabled:p})=>l(V,{$isDisabled:p,$isFocused:t,$isMenuOpen:o,$theme:e});function w({className:o,color:t="primary",forwardRef:p,hasError:s=!1,height:n,helperText:u,isDisabled:d=!1,onBlur:L=()=>null,onFocus:v=()=>null,onInputChange:C=()=>null,placeholder:I="",name:g,...i}){const[c,f]=F(!1),[T,B]=F(""),z=(r,a)=>{C(r,a),B(r)},b=({isSelected:r,isFocused:a,isDisabled:h})=>r?e.colors[t].main:h?e.colors.background.light:a?e.colors.background.gray:e.colors.background.light,E=r=>{f(!0),v(r)},N=r=>{f(!1),L(r)},x=G(c,s),$=!i.label;return k(M,{className:o,children:[!$&&i.label&&l(H,{htmlFor:g,height:n,isFocused:c,hasValue:!!(i.value||T),disabled:d,theme:e,hasError:s,children:i.label}),i.prefix&&l(A,{isDisabled:d,isFocused:c,children:i.prefix}),l(O,{...i,id:"react-select",inputId:g,name:g,ref:p,isDisabled:d,onInputChange:z,placeholder:I,onFocus:E,onBlur:N,styles:{control:r=>({...r,borderRadius:0,color:e.colors.text.dark,fontFamily:e.typography.fontBaseFamily,fontSize:"1rem",fontWeight:400,cursor:"pointer",padding:"0.7rem 0.5rem",backgroundColor:e.colors.background.light,borderColor:x,boxShadow:"none",minHeight:"3rem","&:hover":{borderColor:"none"},...W(d),...j(s),...D(!!i.prefix)}),input:r=>({...r,height:"auto",margin:0,padding:0}),placeholder:r=>{const a={...r,fontSize:"1rem",lineHeight:"1.5rem",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",margin:0};return $?{...a,color:e.colors.text.dark,fontWeight:600}:{...a,display:c?"static":"none"}},menuList:r=>({...r,padding:"0.5rem 0",paddingBottom:"5rem",marginTop:0,border:`1px solid ${x}`,borderTop:"none",display:"flex",flexDirection:"column",gap:"0.5rem"}),menu:r=>({...r,borderRadius:0,boxShadow:"none",zIndex:5,padding:"0",marginTop:"-0.1rem"}),option:(r,{isSelected:a,isFocused:h,isDisabled:y})=>({...r,padding:"0.5rem",lineHeight:"1.5rem",fontSize:"1rem",fontWeight:400,cursor:y?"not-allowed":"pointer","&:hover":{background:b({isSelected:a,isFocused:!0,isDisabled:y})},background:b({isSelected:a,isFocused:h}),...D(!!i.prefix)}),valueContainer:r=>({...r,position:"static",padding:n?`${n-1}rem 0 `:0,height:n?"auto":"1.5rem"}),clearIndicator:r=>({...r,paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:"0.2rem"})},components:{IndicatorSeparator:()=>null,DropdownIndicator:U,...i.components??{}}}),u&&l(_,{hasError:s,children:u})]})}export{w as Select,w as default};
|
|
@@ -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
|
-
`,j={error:e(E,{}),success:e(k,{}),info:e(w,{}),text:""},d=({message:o,color:a="none",type:l="info",action:c,isOpen:f,origin:h={},onClose:m=()=>{},onExited:
|
|
78
|
+
`,j={error:e(E,{}),success:e(k,{}),info:e(w,{}),text:""},d=({message:o,color:a="none",type:l="info",action:c,isOpen:f,origin:h={},onClose:m=()=>{},onExited:u=()=>{},autoHideDuration:s=4e3,...x})=>(b(()=>{const y=setTimeout(m,s);return()=>clearTimeout(y)},[s,m]),e(B,{in:f,timeout:g,mountOnEnter:!0,unmountOnExit:!0,onExited:u,classNames:i,children:$(S,{...x,color:a,origin:h,children:[e(p,{color:a,type:l,children:j[l]}),e(T,{children:o}),c&&c,e(N,{color:a??"none",onClick:m,children:e(v,{})})]})}));export{d as Snackbar,d 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 f from"../../icons/components/CloseIcon.js";import c from"../Spinner/index.js";import"../../theme.js";const s=o.div`
|
|
2
2
|
position: absolute;
|
|
3
|
-
`,
|
|
3
|
+
`,h=o(c)`
|
|
4
4
|
position: absolute;
|
|
5
5
|
|
|
6
6
|
${({size:i})=>i&&`
|
|
@@ -35,4 +35,4 @@ import{jsxs as d,jsx as r}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
|
-
`,a=({isLoading:i=!0,isDone:t=!1,isError:m=!1,size:
|
|
38
|
+
`,a=({isLoading:i=!0,isDone:t=!1,isError:m=!1,size:r=3.5,...p})=>l(s,{"data-testid":"spinner-thin","aria-label":"Loading...",children:[e(n,{size:r,isDone:t,children:e(d,{})}),e(n,{isClose:!0,size:r,isError:m,children:e(f,{})}),e(h,{size:r,speed:"fast",color:"neutral",isLoading:i,...p})]});export{s as Container,n as IconWrapper,a as SpinnerThin,a as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as m,jsx as e}from"react/jsx-runtime";import{useState as g,useCallback as b,useEffect as u}from"react";import t,{css as l}from"styled-components";import o from"../../theme.js";import{Title as x}from"../../typography/Heading/index.js";import C from"../Icons/CheckIcon.js";import D from"../Icons/Arrow.js";import{fadedColor as
|
|
1
|
+
import{jsxs as m,jsx as e}from"react/jsx-runtime";import{useState as g,useCallback as b,useEffect as u}from"react";import t,{css as l}from"styled-components";import o from"../../theme.js";import{Title as x}from"../../typography/Heading/index.js";import C from"../Icons/CheckIcon.js";import D from"../Icons/Arrow.js";import{fadedColor as a}from"../../shared/helpers.js";import{Collapse as y}from"react-collapse";import"../../shared/media-queries.js";const n="200ms",k=t.div`
|
|
2
2
|
.ReactCollapse--collapse {
|
|
3
|
-
transition: height ${
|
|
3
|
+
transition: height ${n} ease-in-out;
|
|
4
4
|
}
|
|
5
5
|
`,v=l`
|
|
6
6
|
margin-top: 0.25rem;
|
|
@@ -21,7 +21,7 @@ import{jsxs as m,jsx as e}from"react/jsx-runtime";import{useState as g,useCallba
|
|
|
21
21
|
|
|
22
22
|
fill: currentColor;
|
|
23
23
|
|
|
24
|
-
transition: ${
|
|
24
|
+
transition: ${n};
|
|
25
25
|
transform: rotate(0deg);
|
|
26
26
|
transform-origin: center;
|
|
27
27
|
${i=>i.isExpanded&&v};
|
|
@@ -30,11 +30,11 @@ import{jsxs as m,jsx as e}from"react/jsx-runtime";import{useState as g,useCallba
|
|
|
30
30
|
background-color: ${o.colors[i].main};
|
|
31
31
|
`,z=(i,r)=>l`
|
|
32
32
|
fill: white;
|
|
33
|
-
border: 2px solid ${
|
|
33
|
+
border: 2px solid ${a(o.colors[r].main,.2)};
|
|
34
34
|
|
|
35
35
|
${i&&`
|
|
36
|
-
border: 2px solid ${
|
|
37
|
-
background-color: ${
|
|
36
|
+
border: 2px solid ${a(o.colors[r].main,0)};
|
|
37
|
+
background-color: ${a(o.colors[r].main,.5)};
|
|
38
38
|
`}
|
|
39
39
|
`,T=t.div`
|
|
40
40
|
font-family: ${({theme:i})=>i.typography.fontBaseFamily};
|
|
@@ -66,7 +66,7 @@ import{jsxs as m,jsx as e}from"react/jsx-runtime";import{useState as g,useCallba
|
|
|
66
66
|
margin-top: 0.1rem;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
transition: background-color ${
|
|
69
|
+
transition: background-color ${n};
|
|
70
70
|
${i=>i.isComplete&&S(i.color)};
|
|
71
71
|
${i=>i.isDisabled&&z(i.isComplete,i.color)};
|
|
72
72
|
`,c=i=>{const[r,d]=g(i.isExpanded||!1),p=b(()=>{i.isDisabled||d(s=>!s)},[i.isDisabled]);u(()=>{d(i.isExpanded||!1)},[i.isDisabled,i.isExpanded]);const f=i.step||i.step===0;return m(k,{children:[m(E,{...i,onClick:s=>{const h=i.onClick||p;i.isDisabled||h(s)},isExpanded:r,isDisabled:i.isDisabled||!1,children:[f&&e(T,{isComplete:i.isComplete||!1,isDisabled:i.isDisabled||!1,color:i.color||"primary",children:i.isComplete?e(C,{}):e("span",{children:i.step})}),e(w,{children:i.title}),e(j,{isExpanded:r})]}),e(y,{isOpened:r,children:i.children}),i.closedChildren&&i.closedChildren]})};export{c as StepperAccordion,c as default};
|
|
@@ -4,14 +4,14 @@ import{jsx as s}from"react/jsx-runtime";import n from"styled-components";import{
|
|
|
4
4
|
&& {
|
|
5
5
|
margin-bottom: -3px;
|
|
6
6
|
padding: 0.875rem 1.375rem;
|
|
7
|
-
border-bottom: ${({theme:
|
|
7
|
+
border-bottom: ${({theme:r,isActive:o,activeColor:e})=>o?`3px solid ${r.colors[e].main}`:"3px solid transparent"};
|
|
8
8
|
transition:
|
|
9
9
|
color 0.3s ease,
|
|
10
10
|
border 0.3s ease;
|
|
11
11
|
|
|
12
12
|
:focus-visible {
|
|
13
|
-
${({theme:
|
|
13
|
+
${({theme:r,isActive:o,activeColor:e})=>!o&&`background-color: ${f(r.colors[e].main,.1)};
|
|
14
14
|
`}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
`,m=b(({label:
|
|
17
|
+
`,m=b(({label:r,index:o=-1,isActive:e=!1,onClick:t,activeColor:a="secondary",isDisabled:c=!1,onKeyUp:l},p)=>s(v,{role:"presentation",children:s(x,{tabIndex:e?0:-1,isActive:e,onClick:i=>t&&t(i,o),activeColor:a,isDisabled:c,variant:"flat",color:e?a:"neutral",id:`tab-${o}`,role:"tab","aria-selected":e?"true":"false","aria-controls":`tabpanel-${o}`,onKeyUp:i=>l&&l(i,o),ref:p,children:r})}));m.displayName="Tab";export{m as default};
|
|
@@ -51,4 +51,4 @@ import{jsxs as m,jsx as a}from"react/jsx-runtime";import{useState as k}from"reac
|
|
|
51
51
|
`,A=o.span`
|
|
52
52
|
display: block;
|
|
53
53
|
color: ${({theme:r})=>r.colors.error.dark};
|
|
54
|
-
`,
|
|
54
|
+
`,g=({placeholder:r="",isDisabled:l=!1,centered:t=!1,hasError:f=!1,className:u,helperText:d,label:s="",resize:x=!0,name:c,errors:n,...i})=>{const[h,$]=k(!1),y=!!i.value;return m(T,{className:u,children:[m(j,{isFocused:h,disabled:l,centered:t,hasError:f,hasPlaceholder:!!r,children:[a(w,{...i,name:c,"aria-label":s||c,resize:x,onFocus:()=>$(!0),onBlur:()=>$(!1),disabled:l,theme:e,placeholder:s&&!h?"":r}),i.suffix&&a(C,{children:i.suffix})]}),s&&a(v,{htmlFor:c,isFocused:h,centered:t,hasError:f,hasValue:y,disabled:l,theme:e,children:s}),(d||n)&&m(N,{centered:t,children:[d&&a(P,{children:d}),n&&n.map(b=>a(A,{children:b},b))]})]})};export{g as TextArea,g as default};
|
|
@@ -63,4 +63,4 @@ import{jsxs as h,jsx as t}from"react/jsx-runtime";import{useState as B}from"reac
|
|
|
63
63
|
`,M=r.span`
|
|
64
64
|
display: block;
|
|
65
65
|
color: ${({theme:e})=>e.colors.error.dark};
|
|
66
|
-
|
|
66
|
+
`,g=({placeholder:e="",isDisabled:l=!1,centered:d=!1,hasError:p=!1,className:$,helperText:c,label:s="",onBlur:y=()=>null,onFocus:k=()=>null,forwardRef:F,suffix:b,name:a=T("text-input"),errors:i,isAutoFocused:v=!1,...u})=>{const[n,f]=B(!1),w=!!u.value,x=i&&Array.isArray(i)&&i?.length>0;return h(C,{className:$,children:[h(L,{isFocused:n,disabled:l,centered:d,hasError:p,hasPlaceholder:!!e,children:[t(P,{...u,id:a,name:a,"aria-label":s||a,ref:F,onFocus:o=>{f(!0),k(o)},onBlur:o=>{f(!1),y(o)},disabled:l,placeholder:s&&!n?"":e,autoFocus:v}),b&&t(D,{children:b})]}),s&&t(E,{htmlFor:a,isFocused:n,centered:d,hasError:p,hasValue:w,disabled:l,children:s}),(c||x)&&h(H,{centered:d,children:[c&&t(I,{children:c}),x&&i.map(o=>t(M,{children:o},o))]})]})};export{g as TextField,g as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as l,jsx as i,Fragment as
|
|
1
|
+
import{jsxs as l,jsx as i,Fragment as x}from"react/jsx-runtime";import r from"styled-components";import{Caption as y}from"../../typography/BodyText/index.js";import{Subtitle as p,Title as g}from"../../typography/Heading/index.js";import"../../shared/media-queries.js";const u=r.div`
|
|
2
2
|
margin: 0 1rem;
|
|
3
3
|
`,v=r.div`
|
|
4
4
|
flex: 1;
|
|
@@ -40,4 +40,4 @@ import{jsxs as l,jsx as i,Fragment as f}from"react/jsx-runtime";import r from"st
|
|
|
40
40
|
height: 0.7rem;
|
|
41
41
|
top: 0;
|
|
42
42
|
position: absolute;
|
|
43
|
-
`,F=({intervalMin:e=0,intervalMax:t=0,value:o=0,color:n="primary",noApproximateSymbol:h=!1,isDisabled:$=!1,manualValuationText:a=""})=>{const
|
|
43
|
+
`,F=({intervalMin:e=0,intervalMax:t=0,value:o=0,color:n="primary",noApproximateSymbol:h=!1,isDisabled:$=!1,manualValuationText:a=""})=>{const c=new Intl.NumberFormat("sv-SE"),d=e>0&&t>0&&!a,f=o>0&&!a,s=$?"lighter":"main";return l(u,{children:[l(j,{children:[i(m,{children:d?`- ${c.format(e)}`:""}),i(v,{children:l(b,{$color:n,$type:s,children:[f&&l(x,{children:[i(g,{as:"span",children:`${h?"":"~ "}${c.format(o)} `}),i(p,{as:"span",children:"kr"})]}),a&&i(w,{as:"span",children:a})]})}),i(m,{children:d?`+ ${c.format(t)}`:""})]}),l(S,{$color:n,$type:s,children:[i(k,{$color:n,$type:s}),i(C,{$color:n,$type:s})]})]})};export{F as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kvdbil/components",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.5",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"not op_mini all"
|
|
46
46
|
],
|
|
47
47
|
"resolutions": {
|
|
48
|
-
"**/cross-spawn": "^7.0.5"
|
|
48
|
+
"**/cross-spawn": "^7.0.5",
|
|
49
|
+
"**/@types/react": "^18.3.12"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@babel/core": "^7.11.6",
|
package/package.json.tmp
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kvdbil/components",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.5",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"not op_mini all"
|
|
45
45
|
],
|
|
46
46
|
"resolutions": {
|
|
47
|
-
"**/cross-spawn": "^7.0.5"
|
|
47
|
+
"**/cross-spawn": "^7.0.5",
|
|
48
|
+
"**/@types/react": "^18.3.12"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
51
|
"@babel/core": "^7.11.6",
|
|
@@ -4,6 +4,7 @@ interface Props {
|
|
|
4
4
|
link: BreadcrumbLink;
|
|
5
5
|
separator?: ReactNode;
|
|
6
6
|
isLast: boolean;
|
|
7
|
+
onlyLastTruncated: boolean;
|
|
7
8
|
}
|
|
8
|
-
declare const BreadcrumbsItem: ({ link, separator, isLast }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const BreadcrumbsItem: ({ link, separator, isLast, onlyLastTruncated, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default BreadcrumbsItem;
|
|
@@ -6,6 +6,7 @@ export interface BreadcrumbLink {
|
|
|
6
6
|
export interface Props {
|
|
7
7
|
links: BreadcrumbLink[];
|
|
8
8
|
separator?: ReactNode;
|
|
9
|
+
onlyLastTruncated?: boolean;
|
|
9
10
|
}
|
|
10
|
-
declare const Breadcrumbs: ({ links, separator }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const Breadcrumbs: ({ links, separator, onlyLastTruncated, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default Breadcrumbs;
|