@kvdbil/components 8.3.5 → 8.3.6
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("styled-components"),t=require("../../shared/helpers.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("styled-components"),t=require("../../shared/helpers.js"),a=require("../../theme.js"),i=require("../IconButton.js"),l=require("../../typography/BodyText/index.js");function o(y){return y&&typeof y=="object"&&"default"in y?y:{default:y}}require("../../shared/media-queries.js");var s=o(e),c=o(r);const d={regular:r.css`
|
|
2
2
|
.circle {
|
|
3
3
|
&--outer {
|
|
4
4
|
height: 24px;
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
|
|
30
30
|
.circle {
|
|
31
31
|
&--inner {
|
|
32
|
-
background-color: ${
|
|
32
|
+
background-color: ${a.default.colors.gray.light1};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&--outer {
|
|
36
|
-
border: 2px solid ${
|
|
36
|
+
border: 2px solid ${a.default.colors.gray.light1};
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
`,u=r.css`
|
|
40
40
|
.circle {
|
|
41
41
|
&--inner {
|
|
42
42
|
opacity: 1;
|
|
43
|
-
background-color: ${
|
|
43
|
+
background-color: ${a.default.colors.gray.light1};
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
`,f=c.default.div`
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
.circle {
|
|
61
61
|
&--inner {
|
|
62
62
|
opacity: 1;
|
|
63
|
-
background-color: ${
|
|
63
|
+
background-color: ${a.default.colors[$].main};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
&--outer {
|
|
67
|
-
border: 2px solid ${
|
|
67
|
+
border: 2px solid ${a.default.colors[$].main};
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
`);var $}};
|
|
@@ -74,19 +74,18 @@
|
|
|
74
74
|
`,p=c.default.input`
|
|
75
75
|
position: fixed;
|
|
76
76
|
opacity: 0;
|
|
77
|
-
pointer-events: none;
|
|
78
77
|
`,h=c.default.span`
|
|
79
78
|
display: flex;
|
|
80
79
|
box-sizing: border-box;
|
|
81
80
|
border-radius: 50%;
|
|
82
81
|
|
|
83
|
-
border: 2px solid ${
|
|
82
|
+
border: 2px solid ${a.default.colors.gray.light1};
|
|
84
83
|
`,g=c.default.span`
|
|
85
84
|
box-sizing: border-box;
|
|
86
85
|
opacity: 0;
|
|
87
86
|
margin: auto;
|
|
88
87
|
border-radius: 50%;
|
|
89
|
-
background-color: ${
|
|
88
|
+
background-color: ${a.default.colors.gray.light1};
|
|
90
89
|
|
|
91
90
|
position: absolute;
|
|
92
91
|
top: 0;
|
|
@@ -96,4 +95,4 @@
|
|
|
96
95
|
user-select: none;
|
|
97
96
|
color: ${({theme:y,isDisabled:$})=>$?y.colors.text.disabled:y.colors.text.dark};
|
|
98
97
|
margin-left: 0.5rem;
|
|
99
|
-
`,x=({name:y=t.generateNameHash("radio-button"),size:$="regular",checked:
|
|
98
|
+
`,x=({name:y=t.generateNameHash("radio-button"),size:$="regular",checked:D=!1,isDisabled:k=!1,color:j="secondary",onChange:q,label:v,...E})=>s.default.createElement(f,null,s.default.createElement(i.default,{onClick:q,isActive:D,isDisabled:k,color:j},s.default.createElement(p,{"data-validate":"checked",checked:D,type:"radio",name:y,id:y,onChange:q,disabled:k,"aria-label":y,...E}),s.default.createElement(b,{size:$,color:j,isChecked:D,isDisabled:k},s.default.createElement(h,{className:"circle circle--outer"},s.default.createElement(g,{className:"circle circle--inner"})))),v&&s.default.createElement(m,{as:"label",htmlFor:y,isDisabled:k},v));exports.RadioButton=x,exports.default=x;
|
|
@@ -74,7 +74,6 @@ import r from"react";import o,{css as i}from"styled-components";import{generateN
|
|
|
74
74
|
`,E=o.input`
|
|
75
75
|
position: fixed;
|
|
76
76
|
opacity: 0;
|
|
77
|
-
pointer-events: none;
|
|
78
77
|
`,j=o.span`
|
|
79
78
|
display: flex;
|
|
80
79
|
box-sizing: border-box;
|
|
@@ -91,9 +90,9 @@ import r from"react";import o,{css as i}from"styled-components";import{generateN
|
|
|
91
90
|
position: absolute;
|
|
92
91
|
top: 0;
|
|
93
92
|
left: 0;
|
|
94
|
-
`,
|
|
93
|
+
`,S=o(h)`
|
|
95
94
|
cursor: ${({isDisabled:e})=>e?"default":"pointer"};
|
|
96
95
|
user-select: none;
|
|
97
96
|
color: ${({theme:e,isDisabled:l})=>l?e.colors.text.disabled:e.colors.text.dark};
|
|
98
97
|
margin-left: 0.5rem;
|
|
99
|
-
`,u=({name:e=p("radio-button"),size:l="regular",checked:
|
|
98
|
+
`,u=({name:e=p("radio-button"),size:l="regular",checked:a=!1,isDisabled:c=!1,color:s="secondary",onChange:n,label:d,...m})=>r.createElement(z,null,r.createElement(g,{onClick:n,isActive:a,isDisabled:c,color:s},r.createElement(E,{"data-validate":"checked",checked:a,type:"radio",name:e,id:e,onChange:n,disabled:c,"aria-label":e,...m}),r.createElement(B,{size:l,color:s,isChecked:a,isDisabled:c},r.createElement(j,{className:"circle circle--outer"},r.createElement(C,{className:"circle circle--inner"})))),d&&r.createElement(S,{as:"label",htmlFor:e,isDisabled:c},d));export{u as RadioButton,u as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kvdbil/components",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.6",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"build-storybook": "build-storybook -s ./public",
|
|
20
20
|
"updateSnapshots": "yarn test -u",
|
|
21
21
|
"analyze": "rollup -c rollup.config.analyze.js",
|
|
22
|
-
"create-declaration": "yarn tsc --p tsconfig.production.json --emitDeclarationOnly --noEmit false --declaration true --declarationDir dist/types
|
|
22
|
+
"create-declaration": "yarn tsc --p tsconfig.production.json --emitDeclarationOnly --noEmit false --declaration true --declarationDir dist/types"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">= 17.0.0",
|