@kvdbil/components 14.3.8 → 14.3.17
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 +1 -1
- package/cjs/components/Button/index.js +4 -1
- package/cjs/components/Chip/index.js +4 -1
- package/cjs/components/Modal/index.js +3 -1
- package/cjs/components/RadioButton/index.js +23 -17
- package/cjs/components/SpinnerThin/index.js +3 -1
- package/cjs/components/Tabs/Tab.js +3 -1
- package/esm/components/Button/index.js +4 -1
- package/esm/components/Button/styles.js +1 -1
- package/esm/components/Chip/index.js +4 -1
- package/esm/components/DayPicker/index.js +2 -2
- package/esm/components/Modal/index.js +3 -1
- package/esm/components/RadioButton/index.js +31 -25
- package/esm/components/SpinnerThin/index.js +3 -1
- package/esm/components/Tabs/Tab.js +3 -1
- package/package.json +30 -27
- package/package.json.tmp +124 -0
- package/types/components/Accordion/index.d.ts +2 -6
- package/types/components/ListItem/Bacon.d.ts +1 -1
- package/types/components/RadioButton/index.d.ts +5 -4
package/README.md
CHANGED
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
${"large"===e&&a.largeSizeStyles()}
|
|
20
20
|
`}
|
|
21
21
|
background-color: transparent;
|
|
22
|
-
transition:
|
|
22
|
+
transition:
|
|
23
|
+
color 0.3s ease,
|
|
24
|
+
background-color 0.3s ease,
|
|
25
|
+
border 0.3s ease,
|
|
23
26
|
filter 0.3s;
|
|
24
27
|
${({variant:e="solid",color:r="primary",colorShade:s="main",disabled:l,theme:t})=>i.css`
|
|
25
28
|
${l?a.disabledColorStyles(t,e):a.colorStyles[e](t,r,s)}
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
border-color: ${i.getBorderColor};
|
|
16
16
|
border-radius: 1.293rem;
|
|
17
17
|
padding: ${({size:e,isDeletable:r})=>r?"0 0.5rem 0 1rem":n[e]};
|
|
18
|
-
transition:
|
|
18
|
+
transition:
|
|
19
|
+
color 0.3s ease,
|
|
20
|
+
background-color 0.3s ease,
|
|
21
|
+
border 0.3s ease;
|
|
19
22
|
|
|
20
23
|
${e=>!e.isDisabled&&e.isClickable&&` &:hover {\n border-color: ${i.getHoverBorderColor(e)};\n background-color: ${i.getHoverBackgroundColor(e)};\n color: ${i.getHoverColor(e)};\n } &:active {\n background-color: ${i.getActiveBackgroundColor(e)};\n border-color: ${i.getActiveBorderColor(e)};\n color: ${i.getActiveColor(e)};\n }`}
|
|
21
24
|
`,s=l.default.span`
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
padding: 1rem;
|
|
37
37
|
background-color: white;
|
|
38
38
|
border-radius: 3px;
|
|
39
|
-
box-shadow:
|
|
39
|
+
box-shadow:
|
|
40
|
+
0px 24px 38px rgba(0, 0, 0, 0.1),
|
|
41
|
+
0px 9px 46px rgba(0, 0, 0, 0.09),
|
|
40
42
|
0px 11px 15px rgba(0, 0, 0, 0.15);
|
|
41
43
|
|
|
42
44
|
overflow-y: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("styled-components"),i=require("../../shared/helpers.js"),s=require("../../theme.js"),o=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("styled-components"),i=require("../../shared/helpers.js"),s=require("../../theme.js"),o=require("../../typography/BodyText/index.js");require("../../shared/media-queries.js");var a,l=(a=r)&&a.__esModule?a:{default:a};const t={regular:r.css`
|
|
2
2
|
.circle {
|
|
3
3
|
&--outer {
|
|
4
4
|
height: 24px;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
transform: scale(0.6);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
`},
|
|
27
|
+
`},d=r.css`
|
|
28
28
|
cursor: default;
|
|
29
29
|
|
|
30
30
|
.circle {
|
|
@@ -36,27 +36,27 @@
|
|
|
36
36
|
border: 2px solid ${s.default.colors.gray.light1};
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,c=r.css`
|
|
40
40
|
.circle {
|
|
41
41
|
&--inner {
|
|
42
42
|
opacity: 1;
|
|
43
43
|
background-color: ${s.default.colors.gray.light1};
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
`,
|
|
46
|
+
`,n=l.default.div`
|
|
47
47
|
display: flex;
|
|
48
48
|
align-items: center;
|
|
49
49
|
box-sizing: border-box;
|
|
50
|
-
`,
|
|
50
|
+
`,u=l.default.span`
|
|
51
51
|
cursor: pointer;
|
|
52
52
|
display: flex;
|
|
53
53
|
position: relative;
|
|
54
54
|
align-items: center;
|
|
55
55
|
justify-content: center;
|
|
56
56
|
|
|
57
|
-
${e=>
|
|
57
|
+
${e=>t[e.size]};
|
|
58
58
|
|
|
59
|
-
${e=>!e.isDisabled&&e.isChecked&&(e=>r.css`
|
|
59
|
+
${e=>!e.isDisabled&&e.isChecked&&((e,i)=>r.css`
|
|
60
60
|
.circle {
|
|
61
61
|
&--inner {
|
|
62
62
|
opacity: 1;
|
|
@@ -64,23 +64,29 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
&--outer {
|
|
67
|
-
border: 2px solid
|
|
67
|
+
border: 2px solid
|
|
68
|
+
${i?s.default.colors.error.dark:s.default.colors[e].main};
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
`)(e.color)};
|
|
71
|
-
${e=>e.isDisabled&&
|
|
71
|
+
`)(e.color,e.$hasError)};
|
|
72
|
+
${e=>e.isDisabled&&d};
|
|
72
73
|
|
|
73
|
-
${e=>e.isChecked&&e.isDisabled&&
|
|
74
|
-
`,
|
|
74
|
+
${e=>e.isChecked&&e.isDisabled&&c};
|
|
75
|
+
`,h=l.default.input`
|
|
75
76
|
position: fixed;
|
|
76
77
|
opacity: 0;
|
|
77
|
-
|
|
78
|
+
margin: 0;
|
|
79
|
+
${e=>!e.$isDisabled&&"cursor: pointer;"}
|
|
80
|
+
z-index: 1;
|
|
81
|
+
${e=>t[e.$size]};
|
|
82
|
+
`,b=l.default.span`
|
|
78
83
|
display: flex;
|
|
79
84
|
box-sizing: border-box;
|
|
80
85
|
border-radius: 50%;
|
|
81
86
|
|
|
82
|
-
border: 2px solid
|
|
83
|
-
|
|
87
|
+
border: 2px solid
|
|
88
|
+
${e=>e.$hasError?s.default.colors.error.dark:s.default.colors.gray.light1};
|
|
89
|
+
`,p=l.default.span`
|
|
84
90
|
box-sizing: border-box;
|
|
85
91
|
opacity: 0;
|
|
86
92
|
margin: auto;
|
|
@@ -90,9 +96,9 @@
|
|
|
90
96
|
position: absolute;
|
|
91
97
|
top: 0;
|
|
92
98
|
left: 0;
|
|
93
|
-
`,
|
|
99
|
+
`,x=l.default(o.BodyText)`
|
|
94
100
|
cursor: ${({isDisabled:e})=>e?"default":"pointer"};
|
|
95
101
|
user-select: none;
|
|
96
102
|
color: ${({theme:e,isDisabled:r})=>r?e.colors.text.disabled:e.colors.text.dark};
|
|
97
103
|
margin-left: 0.5rem;
|
|
98
|
-
`,
|
|
104
|
+
`,g=({name:r=i.generateNameHash("radio-button"),size:s="regular",checked:o=!1,isDisabled:a=!1,color:l="secondary",label:t,hasError:d,...c})=>e.jsxs(n,{children:[e.jsxs(u,{size:s,color:l,isChecked:o,isDisabled:a,$hasError:d,children:[e.jsx(h,{"data-validate":"checked",checked:o,type:"radio",name:r,id:r,disabled:a,"aria-label":r,"aria-checked":o,className:"circle circle--outer",$size:s,$isDisabled:a,...c}),e.jsx(b,{className:"circle circle--outer",$hasError:d,children:e.jsx(p,{className:"circle circle--inner"})})]}),t&&e.jsx(x,{as:"label",htmlFor:r,isDisabled:a,children:t})]});exports.RadioButton=g,exports.default=g;
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
${({size:e})=>e&&`\n width: ${e}rem;\n height: ${e}rem;\n margin-left: -${e/2}rem;\n `}
|
|
7
7
|
|
|
8
8
|
border-width: 1px;
|
|
9
|
-
transition:
|
|
9
|
+
transition:
|
|
10
|
+
all 0.02s ease-in-out !important,
|
|
11
|
+
width transition 0s !important;
|
|
10
12
|
|
|
11
13
|
${({isLoading:e,theme:i})=>!e&&`\n animation: none;\n border: 1px solid ${i.colors.gray.dark3};\n `}
|
|
12
14
|
`,l=o.default.div`
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
margin-bottom: -3px;
|
|
6
6
|
padding: 0.875rem 1.375rem;
|
|
7
7
|
border-bottom: ${({theme:e,isActive:r,activeColor:t})=>r?`3px solid ${e.colors[t].main}`:"3px solid transparent"};
|
|
8
|
-
transition:
|
|
8
|
+
transition:
|
|
9
|
+
color 0.3s ease,
|
|
10
|
+
border 0.3s ease;
|
|
9
11
|
|
|
10
12
|
:focus-visible {
|
|
11
13
|
${({theme:e,isActive:r,activeColor:t})=>!r&&`background-color: ${o.hexToRGB(e.colors[t].main,.1)};\n `}
|
|
@@ -19,7 +19,10 @@ import{jsx as s,jsxs as I,Fragment as W}from"react/jsx-runtime";import g,{forwar
|
|
|
19
19
|
${e==="large"&&R()}
|
|
20
20
|
`}
|
|
21
21
|
background-color: transparent;
|
|
22
|
-
transition:
|
|
22
|
+
transition:
|
|
23
|
+
color 0.3s ease,
|
|
24
|
+
background-color 0.3s ease,
|
|
25
|
+
border 0.3s ease,
|
|
23
26
|
filter 0.3s;
|
|
24
27
|
${({variant:e="solid",color:i="primary",colorShade:l="main",disabled:n,theme:a})=>u`
|
|
25
28
|
${n?V(a,e):C[e](a,i,l)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ButtonLargeTextStyle as c,ButtonRegularTextStyle as e,ButtonSmallTextStyle as a}from"../../typography/ButtonText/index.js";import"react/jsx-runtime";import"styled-components";const n={smaller:a,small:e,regular:e,large:c},d=()=>`
|
|
2
2
|
padding: 0.25rem 0.75rem;
|
|
3
3
|
min-height: 2.5rem;
|
|
4
4
|
`,g=()=>`
|
|
@@ -15,7 +15,10 @@ import{jsx as i,jsxs as v}from"react/jsx-runtime";import t from"styled-component
|
|
|
15
15
|
border-color: ${k};
|
|
16
16
|
border-radius: 1.293rem;
|
|
17
17
|
padding: ${({size:e,isDeletable:l})=>l?"0 0.5rem 0 1rem":A[e]};
|
|
18
|
-
transition:
|
|
18
|
+
transition:
|
|
19
|
+
color 0.3s ease,
|
|
20
|
+
background-color 0.3s ease,
|
|
21
|
+
border 0.3s ease;
|
|
19
22
|
|
|
20
23
|
${e=>!e.isDisabled&&e.isClickable&&` &:hover {
|
|
21
24
|
border-color: ${B(e)};
|
|
@@ -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{FIRST_DAY_OF_THE_WEEK as p,WEEKDAYS_SHORT as s,WEEKDAYS_LONG as f,MONTHS 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:y[o],weekdaysLong:f[o],weekdaysShort:s[o],firstDayOfWeek:p[o],navbarElement:l=>t(n,{...l,locale:o}),captionElement:t("div",{}),modifiersStyles:S(m)})});export{e as DayPicker,e as default};
|
|
@@ -36,7 +36,9 @@ import{jsx as t,jsxs as e,Fragment as x}from"react/jsx-runtime";import{useEffect
|
|
|
36
36
|
padding: 1rem;
|
|
37
37
|
background-color: white;
|
|
38
38
|
border-radius: 3px;
|
|
39
|
-
box-shadow:
|
|
39
|
+
box-shadow:
|
|
40
|
+
0px 24px 38px rgba(0, 0, 0, 0.1),
|
|
41
|
+
0px 9px 46px rgba(0, 0, 0, 0.09),
|
|
40
42
|
0px 11px 15px rgba(0, 0, 0, 0.15);
|
|
41
43
|
|
|
42
44
|
overflow-y: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as n,jsx as
|
|
1
|
+
import{jsxs as n,jsx as l}from"react/jsx-runtime";import o,{css as s}from"styled-components";import{generateNameHash as m}from"../../shared/helpers.js";import e from"../../theme.js";import{BodyText as u}from"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const x=s`
|
|
2
2
|
.circle {
|
|
3
3
|
&--outer {
|
|
4
4
|
height: 24px;
|
|
@@ -11,7 +11,7 @@ import{jsxs as n,jsx as o}from"react/jsx-runtime";import i,{css as l}from"styled
|
|
|
11
11
|
transform: scale(0.6);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
`,$=s`
|
|
15
15
|
.circle {
|
|
16
16
|
&--outer {
|
|
17
17
|
height: 32px;
|
|
@@ -24,75 +24,81 @@ import{jsxs as n,jsx as o}from"react/jsx-runtime";import i,{css as l}from"styled
|
|
|
24
24
|
transform: scale(0.6);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
`,
|
|
27
|
+
`,h={regular:x,large:$},f=s`
|
|
28
28
|
cursor: default;
|
|
29
29
|
|
|
30
30
|
.circle {
|
|
31
31
|
&--inner {
|
|
32
|
-
background-color: ${
|
|
32
|
+
background-color: ${e.colors.gray.light1};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&--outer {
|
|
36
|
-
border: 2px solid ${
|
|
36
|
+
border: 2px solid ${e.colors.gray.light1};
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`,y=s`
|
|
40
40
|
.circle {
|
|
41
41
|
&--inner {
|
|
42
42
|
opacity: 1;
|
|
43
|
-
background-color: ${
|
|
43
|
+
background-color: ${e.colors.gray.light1};
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
`,
|
|
46
|
+
`,k=(r,i)=>s`
|
|
47
47
|
.circle {
|
|
48
48
|
&--inner {
|
|
49
49
|
opacity: 1;
|
|
50
|
-
background-color: ${
|
|
50
|
+
background-color: ${e.colors[r].main};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
&--outer {
|
|
54
|
-
border: 2px solid
|
|
54
|
+
border: 2px solid
|
|
55
|
+
${i?e.colors.error.dark:e.colors[r].main};
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
`,z=
|
|
58
|
+
`,z=o.div`
|
|
58
59
|
display: flex;
|
|
59
60
|
align-items: center;
|
|
60
61
|
box-sizing: border-box;
|
|
61
|
-
`,
|
|
62
|
+
`,D=o.span`
|
|
62
63
|
cursor: pointer;
|
|
63
64
|
display: flex;
|
|
64
65
|
position: relative;
|
|
65
66
|
align-items: center;
|
|
66
67
|
justify-content: center;
|
|
67
68
|
|
|
68
|
-
${
|
|
69
|
+
${r=>h[r.size]};
|
|
69
70
|
|
|
70
|
-
${
|
|
71
|
-
${
|
|
71
|
+
${r=>!r.isDisabled&&r.isChecked&&k(r.color,r.$hasError)};
|
|
72
|
+
${r=>r.isDisabled&&f};
|
|
72
73
|
|
|
73
|
-
${
|
|
74
|
-
`,
|
|
74
|
+
${r=>r.isChecked&&r.isDisabled&&y};
|
|
75
|
+
`,E=o.input`
|
|
75
76
|
position: fixed;
|
|
76
77
|
opacity: 0;
|
|
77
|
-
|
|
78
|
+
margin: 0;
|
|
79
|
+
${r=>!r.$isDisabled&&"cursor: pointer;"}
|
|
80
|
+
z-index: 1;
|
|
81
|
+
${r=>h[r.$size]};
|
|
82
|
+
`,w=o.span`
|
|
78
83
|
display: flex;
|
|
79
84
|
box-sizing: border-box;
|
|
80
85
|
border-radius: 50%;
|
|
81
86
|
|
|
82
|
-
border: 2px solid
|
|
83
|
-
|
|
87
|
+
border: 2px solid
|
|
88
|
+
${r=>r.$hasError?e.colors.error.dark:e.colors.gray.light1};
|
|
89
|
+
`,C=o.span`
|
|
84
90
|
box-sizing: border-box;
|
|
85
91
|
opacity: 0;
|
|
86
92
|
margin: auto;
|
|
87
93
|
border-radius: 50%;
|
|
88
|
-
background-color: ${
|
|
94
|
+
background-color: ${e.colors.gray.light1};
|
|
89
95
|
|
|
90
96
|
position: absolute;
|
|
91
97
|
top: 0;
|
|
92
98
|
left: 0;
|
|
93
|
-
`,
|
|
94
|
-
cursor: ${({isDisabled:
|
|
99
|
+
`,N=o(u)`
|
|
100
|
+
cursor: ${({isDisabled:r})=>r?"default":"pointer"};
|
|
95
101
|
user-select: none;
|
|
96
|
-
color: ${({theme:
|
|
102
|
+
color: ${({theme:r,isDisabled:i})=>i?r.colors.text.disabled:r.colors.text.dark};
|
|
97
103
|
margin-left: 0.5rem;
|
|
98
|
-
`,b=({name:
|
|
104
|
+
`,b=({name:r=m("radio-button"),size:i="regular",checked:c=!1,isDisabled:a=!1,color:p="secondary",label:t,hasError:d,...g})=>n(z,{children:[n(D,{size:i,color:p,isChecked:c,isDisabled:a,$hasError:d,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:i,$isDisabled:a,...g}),l(w,{className:"circle circle--outer",$hasError:d,children:l(C,{className:"circle circle--inner"})})]}),t&&l(N,{as:"label",htmlFor:r,isDisabled:a,children:t})]});export{b as RadioButton,b as default};
|
|
@@ -10,7 +10,9 @@ import{jsxs as d,jsx as r}from"react/jsx-runtime";import o from"styled-component
|
|
|
10
10
|
`}
|
|
11
11
|
|
|
12
12
|
border-width: 1px;
|
|
13
|
-
transition:
|
|
13
|
+
transition:
|
|
14
|
+
all 0.02s ease-in-out !important,
|
|
15
|
+
width transition 0s !important;
|
|
14
16
|
|
|
15
17
|
${({isLoading:i,theme:t})=>!i&&`
|
|
16
18
|
animation: none;
|
|
@@ -5,7 +5,9 @@ import{jsx as s}from"react/jsx-runtime";import n from"styled-components";import{
|
|
|
5
5
|
margin-bottom: -3px;
|
|
6
6
|
padding: 0.875rem 1.375rem;
|
|
7
7
|
border-bottom: ${({theme:e,isActive:o,activeColor:r})=>o?`3px solid ${e.colors[r].main}`:"3px solid transparent"};
|
|
8
|
-
transition:
|
|
8
|
+
transition:
|
|
9
|
+
color 0.3s ease,
|
|
10
|
+
border 0.3s ease;
|
|
9
11
|
|
|
10
12
|
:focus-visible {
|
|
11
13
|
${({theme:e,isActive:o,activeColor:r})=>!o&&`background-color: ${f(e.colors[r].main,.1)};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kvdbil/components",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.17",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -16,15 +16,18 @@
|
|
|
16
16
|
"dev": "yarn storybook dev -p 6006 watch-css",
|
|
17
17
|
"test": "jest --silent",
|
|
18
18
|
"test:watch": "cross-env DEBUG_PRINT_LIMIT=14000 jest --verbose --watchAll",
|
|
19
|
+
"test:ci": "NODE_ENV=ci yarn test --bail=true",
|
|
19
20
|
"type-check": "tsc",
|
|
20
21
|
"generateIcons": "svgr --icon 1em --template ./src/icons/template.js -d ./src/icons/components ./src/icons/svgs --typescript",
|
|
21
|
-
"build": "yarn run generateIcons &&
|
|
22
|
+
"build": "yarn run generateIcons && rollup -c && yarn create-declaration",
|
|
22
23
|
"build:rollup": "rollup -c && cp package.json dist/",
|
|
23
24
|
"build:storybook": "storybook build",
|
|
24
|
-
"lint": "eslint --fix
|
|
25
|
+
"lint": "eslint --fix",
|
|
25
26
|
"analyze": "rollup -c rollup.config.analyze.js",
|
|
26
27
|
"create-declaration": "yarn tsc --p tsconfig.production.json --emitDeclarationOnly --noEmit false --declaration true --declarationDir dist/types",
|
|
27
|
-
"
|
|
28
|
+
"prepare": "husky",
|
|
29
|
+
"validate-code": "yarn type-check && yarn lint && yarn test && echo '✅ Code is valid!'",
|
|
30
|
+
"publish-package": "./npm-publish.sh"
|
|
28
31
|
},
|
|
29
32
|
"peerDependencies": {
|
|
30
33
|
"react": ">= 17.0.0",
|
|
@@ -42,18 +45,22 @@
|
|
|
42
45
|
"not op_mini all"
|
|
43
46
|
],
|
|
44
47
|
"resolutions": {
|
|
45
|
-
"
|
|
48
|
+
"**/cross-spawn": "^7.0.5"
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
48
51
|
"@babel/core": "^7.11.6",
|
|
52
|
+
"@babel/preset-env": "^7.25.4",
|
|
53
|
+
"@babel/preset-react": "^7.24.7",
|
|
54
|
+
"@babel/preset-typescript": "^7.24.7",
|
|
49
55
|
"@commitlint/cli": "^19.4.0",
|
|
50
56
|
"@commitlint/config-conventional": "^19.2.2",
|
|
57
|
+
"@emotion/is-prop-valid": "^1.3.1",
|
|
51
58
|
"@rollup/plugin-terser": "^0.4.4",
|
|
52
|
-
"@storybook/addon-essentials": "^
|
|
53
|
-
"@storybook/addon-
|
|
54
|
-
"@storybook/addon-
|
|
55
|
-
"@storybook/react": "^
|
|
56
|
-
"@storybook/react-webpack5": "^
|
|
59
|
+
"@storybook/addon-essentials": "^8.3.3",
|
|
60
|
+
"@storybook/addon-themes": "^8.3.3",
|
|
61
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
|
|
62
|
+
"@storybook/react": "^8.3.3",
|
|
63
|
+
"@storybook/react-webpack5": "^8.3.3",
|
|
57
64
|
"@svgr/cli": "^8.0.0",
|
|
58
65
|
"@team-griffin/install-self-peers": "^1.1.1",
|
|
59
66
|
"@testing-library/dom": "^10.4.0",
|
|
@@ -69,35 +76,31 @@
|
|
|
69
76
|
"@types/react-dom": "^18.3.0",
|
|
70
77
|
"@types/react-transition-group": "^4.4.11",
|
|
71
78
|
"@types/uuid": "^10.0.0",
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^7.0
|
|
73
|
-
"@typescript-eslint/parser": "^7.0
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
|
80
|
+
"@typescript-eslint/parser": "^8.7.0",
|
|
74
81
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
75
82
|
"babel-plugin-styled-components": "^2.1.4",
|
|
76
83
|
"cross-env": "^7.0.3",
|
|
77
|
-
"esbuild": "^0.
|
|
78
|
-
"eslint": "^
|
|
79
|
-
"eslint-config-prettier": "^
|
|
80
|
-
"eslint-
|
|
81
|
-
"eslint-plugin-
|
|
82
|
-
"eslint-plugin-
|
|
83
|
-
"
|
|
84
|
-
"eslint-plugin-mdx": "^1.15.0",
|
|
85
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
86
|
-
"eslint-plugin-react": "^7.25.1",
|
|
87
|
-
"eslint-plugin-react-hooks": "^4.2.0",
|
|
84
|
+
"esbuild": "^0.24.0",
|
|
85
|
+
"eslint": "^9.11.1",
|
|
86
|
+
"eslint-config-prettier": "^9.1.0",
|
|
87
|
+
"eslint-plugin-mdx": "^3.1.5",
|
|
88
|
+
"eslint-plugin-react": "^7.36.1",
|
|
89
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
90
|
+
"globals": "^15.9.0",
|
|
88
91
|
"husky": "^9.1.5",
|
|
89
92
|
"jest": "^29.7.0",
|
|
90
93
|
"jest-environment-jsdom": "^29.7.0",
|
|
91
94
|
"jest-styled-components": "^7.2.0",
|
|
92
95
|
"jest-watch-typeahead": "^2.2.2",
|
|
93
|
-
"prettier": "^
|
|
96
|
+
"prettier": "^3.3.3",
|
|
94
97
|
"react": "^18.3.1",
|
|
95
98
|
"react-collapse": "^5.0.1",
|
|
96
99
|
"react-day-picker": "^7.4.8",
|
|
97
100
|
"react-docgen-typescript": "^2.2.2",
|
|
98
101
|
"react-dom": "^18.3.1",
|
|
99
102
|
"react-is": "^18.3.1",
|
|
100
|
-
"react-select": "5.8.0",
|
|
103
|
+
"react-select": "^5.8.0",
|
|
101
104
|
"react-select-event": "5.5.1",
|
|
102
105
|
"react-transition-group": "^4.0.0",
|
|
103
106
|
"rollup": "^4.21.2",
|
|
@@ -105,11 +108,11 @@
|
|
|
105
108
|
"rollup-plugin-multi-input": "^1.5.0",
|
|
106
109
|
"rollup-plugin-visualizer": "^5.5.2",
|
|
107
110
|
"standard-version": "^9.3.1",
|
|
108
|
-
"storybook": "^
|
|
111
|
+
"storybook": "^8.3.2",
|
|
109
112
|
"styled-components": "^6.1.13",
|
|
110
113
|
"ts-jest": "^29.2.4",
|
|
111
114
|
"tslib": "^2.6.3",
|
|
112
|
-
"typescript": "
|
|
115
|
+
"typescript": "5.5.4"
|
|
113
116
|
},
|
|
114
117
|
"description": "KVDBil components library",
|
|
115
118
|
"repository": {
|
package/package.json.tmp
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kvdbil/components",
|
|
3
|
+
"version": "14.3.17",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"main": "cjs/index.js",
|
|
6
|
+
"module": "esm/index.js",
|
|
7
|
+
"types": "types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./esm/index.js",
|
|
11
|
+
"require": "./cjs/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"start": "yarn dev",
|
|
16
|
+
"dev": "yarn storybook dev -p 6006 watch-css",
|
|
17
|
+
"test": "jest --silent",
|
|
18
|
+
"test:watch": "cross-env DEBUG_PRINT_LIMIT=14000 jest --verbose --watchAll",
|
|
19
|
+
"test:ci": "NODE_ENV=ci yarn test --bail=true",
|
|
20
|
+
"type-check": "tsc",
|
|
21
|
+
"generateIcons": "svgr --icon 1em --template ./src/icons/template.js -d ./src/icons/components ./src/icons/svgs --typescript",
|
|
22
|
+
"build": "yarn run generateIcons && rollup -c && yarn create-declaration",
|
|
23
|
+
"build:rollup": "rollup -c && cp package.json dist/",
|
|
24
|
+
"build:storybook": "storybook build",
|
|
25
|
+
"lint": "eslint --fix",
|
|
26
|
+
"analyze": "rollup -c rollup.config.analyze.js",
|
|
27
|
+
"create-declaration": "yarn tsc --p tsconfig.production.json --emitDeclarationOnly --noEmit false --declaration true --declarationDir dist/types",
|
|
28
|
+
"validate-code": "yarn type-check && yarn lint && yarn test && echo '✅ Code is valid!'",
|
|
29
|
+
"publish-package": "./npm-publish.sh"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": ">= 17.0.0",
|
|
33
|
+
"react-collapse": ">= 5.0.1",
|
|
34
|
+
"react-day-picker": ">= 7.4.8",
|
|
35
|
+
"react-dom": ">= 17.0.0",
|
|
36
|
+
"react-select": ">= 5.8.0",
|
|
37
|
+
"react-transition-group": ">= 4.0.0",
|
|
38
|
+
"styled-components": ">= 5.1.17"
|
|
39
|
+
},
|
|
40
|
+
"browserslist": [
|
|
41
|
+
">0.2%",
|
|
42
|
+
"not dead",
|
|
43
|
+
"not ie <= 11",
|
|
44
|
+
"not op_mini all"
|
|
45
|
+
],
|
|
46
|
+
"resolutions": {
|
|
47
|
+
"**/cross-spawn": "^7.0.5"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@babel/core": "^7.11.6",
|
|
51
|
+
"@babel/preset-env": "^7.25.4",
|
|
52
|
+
"@babel/preset-react": "^7.24.7",
|
|
53
|
+
"@babel/preset-typescript": "^7.24.7",
|
|
54
|
+
"@commitlint/cli": "^19.4.0",
|
|
55
|
+
"@commitlint/config-conventional": "^19.2.2",
|
|
56
|
+
"@emotion/is-prop-valid": "^1.3.1",
|
|
57
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
58
|
+
"@storybook/addon-essentials": "^8.3.3",
|
|
59
|
+
"@storybook/addon-themes": "^8.3.3",
|
|
60
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
|
|
61
|
+
"@storybook/react": "^8.3.3",
|
|
62
|
+
"@storybook/react-webpack5": "^8.3.3",
|
|
63
|
+
"@svgr/cli": "^8.0.0",
|
|
64
|
+
"@team-griffin/install-self-peers": "^1.1.1",
|
|
65
|
+
"@testing-library/dom": "^10.4.0",
|
|
66
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
67
|
+
"@testing-library/react": "^16.0.1",
|
|
68
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
69
|
+
"@testing-library/user-event": "^14.5.2",
|
|
70
|
+
"@types/classnames": "^2.2.11",
|
|
71
|
+
"@types/jest": "^29.5.12",
|
|
72
|
+
"@types/node": "^22.4.1",
|
|
73
|
+
"@types/react": "^18.3.8",
|
|
74
|
+
"@types/react-collapse": "^5.0.4",
|
|
75
|
+
"@types/react-dom": "^18.3.0",
|
|
76
|
+
"@types/react-transition-group": "^4.4.11",
|
|
77
|
+
"@types/uuid": "^10.0.0",
|
|
78
|
+
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
|
79
|
+
"@typescript-eslint/parser": "^8.7.0",
|
|
80
|
+
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
81
|
+
"babel-plugin-styled-components": "^2.1.4",
|
|
82
|
+
"cross-env": "^7.0.3",
|
|
83
|
+
"esbuild": "^0.24.0",
|
|
84
|
+
"eslint": "^9.11.1",
|
|
85
|
+
"eslint-config-prettier": "^9.1.0",
|
|
86
|
+
"eslint-plugin-mdx": "^3.1.5",
|
|
87
|
+
"eslint-plugin-react": "^7.36.1",
|
|
88
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
89
|
+
"globals": "^15.9.0",
|
|
90
|
+
"husky": "^9.1.5",
|
|
91
|
+
"jest": "^29.7.0",
|
|
92
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
93
|
+
"jest-styled-components": "^7.2.0",
|
|
94
|
+
"jest-watch-typeahead": "^2.2.2",
|
|
95
|
+
"prettier": "^3.3.3",
|
|
96
|
+
"react": "^18.3.1",
|
|
97
|
+
"react-collapse": "^5.0.1",
|
|
98
|
+
"react-day-picker": "^7.4.8",
|
|
99
|
+
"react-docgen-typescript": "^2.2.2",
|
|
100
|
+
"react-dom": "^18.3.1",
|
|
101
|
+
"react-is": "^18.3.1",
|
|
102
|
+
"react-select": "^5.8.0",
|
|
103
|
+
"react-select-event": "5.5.1",
|
|
104
|
+
"react-transition-group": "^4.0.0",
|
|
105
|
+
"rollup": "^4.21.2",
|
|
106
|
+
"rollup-plugin-esbuild": "^6.1.1",
|
|
107
|
+
"rollup-plugin-multi-input": "^1.5.0",
|
|
108
|
+
"rollup-plugin-visualizer": "^5.5.2",
|
|
109
|
+
"standard-version": "^9.3.1",
|
|
110
|
+
"storybook": "^8.3.2",
|
|
111
|
+
"styled-components": "^6.1.13",
|
|
112
|
+
"ts-jest": "^29.2.4",
|
|
113
|
+
"tslib": "^2.6.3",
|
|
114
|
+
"typescript": "5.5.4"
|
|
115
|
+
},
|
|
116
|
+
"description": "KVDBil components library",
|
|
117
|
+
"repository": {
|
|
118
|
+
"type": "git",
|
|
119
|
+
"url": "git+ssh://git@bitbucket.org/kvarndammen/kvdbil-components.git"
|
|
120
|
+
},
|
|
121
|
+
"author": "",
|
|
122
|
+
"license": "ISC",
|
|
123
|
+
"homepage": "https://bitbucket.org/kvarndammen/kvdbil-components#readme"
|
|
124
|
+
}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
declare const Item: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {
|
|
3
|
-
isOpen: boolean;
|
|
4
|
-
}>> & string;
|
|
5
|
-
interface Item {
|
|
1
|
+
interface IItem {
|
|
6
2
|
title: string;
|
|
7
3
|
text: string;
|
|
8
4
|
}
|
|
9
5
|
export interface AccordionProps {
|
|
10
|
-
items:
|
|
6
|
+
items: IItem[];
|
|
11
7
|
}
|
|
12
8
|
export declare const Accordion: ({ items, ...props }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
9
|
export default Accordion;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import { RadioButtonSize, Color } from '../../Types';
|
|
3
|
-
|
|
3
|
+
type ComponentPropsWithoutSize = Omit<ComponentPropsWithoutRef<'input'>, 'size' | 'type'>;
|
|
4
|
+
export interface RadioButtonProps extends ComponentPropsWithoutSize {
|
|
4
5
|
name?: string;
|
|
5
6
|
color?: Color;
|
|
6
7
|
size?: RadioButtonSize;
|
|
7
8
|
checked?: boolean;
|
|
8
9
|
isDisabled?: boolean;
|
|
9
|
-
onChange?(): void;
|
|
10
10
|
label?: ReactNode;
|
|
11
|
+
hasError?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare const RadioButton: ({ name, size, checked, isDisabled, color,
|
|
13
|
+
export declare const RadioButton: ({ name, size, checked, isDisabled, color, label, hasError, ...props }: RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export default RadioButton;
|