@kvdbil/components 15.1.5 → 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 +1 -1
- package/package.json.tmp +1 -1
- 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
package/cjs/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.default={typography:{fontBaseFamily:"'Open Sans', sans-serif",fontAlternativeFamily:"'Next Book', sans-serif",fontBaseRegularWeight:400,fontBaseBoldWeight:600,fontAlternativeRegularWeight:400,fontAlternativeBoldWeight:700},colors:{primary:{darker:"#
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.default={typography:{fontBaseFamily:"'Open Sans', sans-serif",fontAlternativeFamily:"'Next Book', sans-serif",fontBaseRegularWeight:400,fontBaseBoldWeight:600,fontAlternativeRegularWeight:400,fontAlternativeBoldWeight:700},colors:{primary:{darker:"#c48900",dark:"#e8a100",mainAlt:"#e8a100",main:"#f5b400",light:"#f7cf57",lighter:"#fbe7ab",lighter2:"#fff7e5",lighter3:"#fdf9f1"},secondary:{darker:"#00474d",dark:"#1b6359",mainAlt:"#228277",main:"#299d8f",light:"#32bfaf",lighter:"#a4ddcb",lighter2:"#d6f0e8",lighter3:"#f4fbf8"},tertiary:{darker:"#5e2636",dark:"#9c333c",mainAlt:"#c94d4d",main:"#f05c5c",light:"#f59085",lighter:"#fac7c3",lighter2:"#fcedeb",lighter3:"#fbf5f4"},info:{darker:"#004773",dark:"#005e8c",mainAlt:"#007ab8",main:"#499ad4",light:"#3bb7e2",lighter:"#abe0ff",lighter2:"#e5f5ff",lighter3:"#f4f8fb"},success:{darker:"#0b4222",dark:"#006629",mainAlt:"#00aa47",main:"#3ac25e",light:"#59d771",lighter:"#c7f2cf",lighter2:"#edfaf0",lighter3:"#f4fbf7"},warning:{darker:"#c48900",dark:"#e8a100",mainAlt:"#e8a100",main:"#f5b400",light:"#f7cf57",lighter:"#fbe7ab",lighter2:"#fff7e5",lighter3:"#fdf9f1"},error:{darker:"#841c24",dark:"#aa2228",mainAlt:"#e9191d",main:"#ff5153",light:"#ff8888",lighter:"#ffc2c2",lighter2:"#ffd6d6",lighter3:"#fbf4f4"},purple:{darker:"#42214f",dark:"#8f367f",mainAlt:"#a33e90",main:"#cf59bf",light:"#e28dde",lighter:"#e0bfd9",lighter2:"#f5edf2",lighter3:"#fbf4f9"},text:{dark:"#1a2030",disabled:"#babcc2",light:"#ffffff"},background:{light:"#ffffff",lightGray:"#fafafa",gray:"#f2f2f2",sand:"#f2efe6",dark:"#1a2030"},common:{black:"#000000",white:"#ffffff"},grayscaleToned:{dark1:"#1a2030",dark2:"#313645",dark3:"#484d59",dark4:"#5f636e",dark5:"#71757f",light1:"#8d8f97",light2:"#a4a6ac",light3:"#babcc2",light4:"#d1d2d6",light5:"#e8e9ea",light6:"#f2f2f2",light7:"#fafafa"},grayscaleNeutral:{dark1:"#000000",dark2:"#191919",dark3:"#333333",dark4:"#4c4c4c",dark5:"#666666",light1:"#7f7f7f",light2:"#999999",light3:"#b2b2b2",light4:"#cccccc",light5:"#e5e5e5",light6:"#f0f0f0",light7:"#fbfbfb"}},elevations:{elevation2:"0px 1px 5px rgba(0, 0, 0, 0.15), 0px 2px 4px rgba(0, 0, 0, 0.09), 0px 2px 4px rgba(0, 0, 0, 0.1)",elevation4:"0px 1px 10px rgba(0, 0, 0, 0.15), 0px 4px 5px rgba(0, 0, 0, 0.09), 0px 2px 4px rgba(0, 0, 0, 0.1)",elevation8:"0px 4px 5px rgba(0, 0, 0, 0.15), 0px 3px 14px rgba(0, 0, 0, 0.09), 0px 8px 10px rgba(0, 0, 0, 0.1)",elevation16:"0px 8px 10px rgba(0, 0, 0, 0.15), 0px 6px 30px rgba(0, 0, 0, 0.09), 0px 16px 24px rgba(0, 0, 0, 0.1)",elevation24:"0px 11px 15px rgba(0, 0, 0, 0.15), 0px 9px 46px rgba(0, 0, 0, 0.09), 0px 24px 38px rgba(0, 0, 0, 0.1)"}};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("styled-components"),o=require("../../shared/media-queries.js");var s,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("styled-components"),o=require("../../shared/media-queries.js");var s,i=(s=t)&&s.__esModule?s:{default:s};const r=t.css`
|
|
2
2
|
font-feature-settings: 'lnum' on;
|
|
3
3
|
`,n=t.css`
|
|
4
4
|
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
5
|
-
${
|
|
5
|
+
${r}
|
|
6
6
|
`,a=t.css`
|
|
7
7
|
${n}
|
|
8
8
|
font-weight: ${({theme:e})=>e.typography.fontBaseRegularWeight};
|
|
@@ -17,34 +17,40 @@
|
|
|
17
17
|
${a}
|
|
18
18
|
font-size: 0.75rem;
|
|
19
19
|
line-height: 1.5rem;
|
|
20
|
-
`,m=
|
|
20
|
+
`,m=t.css`
|
|
21
21
|
${a}
|
|
22
|
-
|
|
22
|
+
font-size: 0.625rem;
|
|
23
|
+
line-height: 1rem;
|
|
24
|
+
`,h=i.default.p`
|
|
25
|
+
${a}
|
|
26
|
+
`,y=t.css`
|
|
23
27
|
font-family: Georgia, Cambria, Cochin, Times, 'Times New Roman', serif;
|
|
24
28
|
font-style: italic;
|
|
25
29
|
font-weight: ${({theme:e})=>e.typography.fontBaseRegularWeight};
|
|
26
30
|
font-size: 1rem;
|
|
27
31
|
line-height: 1.5rem;
|
|
28
|
-
${
|
|
29
|
-
`,
|
|
30
|
-
${
|
|
31
|
-
`,
|
|
32
|
+
${r}
|
|
33
|
+
`,u=i.default.p`
|
|
34
|
+
${y}
|
|
35
|
+
`,d=i.default.p`
|
|
32
36
|
${l}
|
|
33
|
-
`,
|
|
37
|
+
`,g=t.css`
|
|
34
38
|
${p}
|
|
35
39
|
font-size: 1rem;
|
|
36
40
|
line-height: 1.5rem;
|
|
37
|
-
`,
|
|
38
|
-
${
|
|
39
|
-
|
|
41
|
+
`,x=i.default.p`
|
|
42
|
+
${g}
|
|
43
|
+
`,$=i.default.p`
|
|
40
44
|
${f}
|
|
41
|
-
|
|
45
|
+
`,c=i.default.p`
|
|
46
|
+
${m}
|
|
47
|
+
`,B=t.css`
|
|
42
48
|
${p}
|
|
43
49
|
font-size: 0.75rem;
|
|
44
50
|
line-height: 1.5rem;
|
|
45
|
-
`,
|
|
46
|
-
${
|
|
47
|
-
`,
|
|
51
|
+
`,S=i.default.p`
|
|
52
|
+
${B}
|
|
53
|
+
`,z=t.css`
|
|
48
54
|
font-family: ${({theme:e})=>e.typography.fontAlternativeFamily};
|
|
49
55
|
font-weight: ${({theme:e})=>e.typography.fontAlternativeBoldWeight};
|
|
50
56
|
font-size: 1rem;
|
|
@@ -55,6 +61,6 @@
|
|
|
55
61
|
${o.mq("laptop")} {
|
|
56
62
|
font-size: 0.75rem;
|
|
57
63
|
}
|
|
58
|
-
`,
|
|
59
|
-
${
|
|
60
|
-
`,
|
|
64
|
+
`,C=i.default.p`
|
|
65
|
+
${z}
|
|
66
|
+
`,v=()=>e.jsx("div",{});exports.BodyLink=x,exports.BodyLinkStyle=g,exports.BodyText=d,exports.BodyTextStyle=l,exports.BodyTexts=v,exports.Caption=$,exports.Caption2=c,exports.Caption2Style=m,exports.CaptionLink=S,exports.CaptionLinkStyle=B,exports.CaptionStyle=f,exports.Quote=u,exports.QuoteStyle=y,exports.Status=C,exports.StatusStyle=z,exports.StyledBodyText=h,exports.default=v;
|
package/cjs/utils/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("styled-components").css`
|
|
2
2
|
appearance: none;
|
|
3
3
|
background-color: transparent;
|
|
4
4
|
border: 0;
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
font-family: inherit;
|
|
7
7
|
outline: none;
|
|
8
8
|
padding: 0;
|
|
9
|
-
|
|
9
|
+
`,e=r=>({darker:r.colors.grayscaleNeutral.dark1,dark:r.colors.grayscaleNeutral.dark1,mainAlt:r.colors.grayscaleToned.dark1,main:r.colors.grayscaleToned.dark1,light:r.colors.grayscaleToned.light1});exports.getLuminosity=r=>{let e=0,t=0,a=0;return 4===r.length?(e=parseInt("0x"+r[1]+r[1]),t=parseInt("0x"+r[2]+r[2]),a=parseInt("0x"+r[3]+r[3])):7===r.length&&(e=parseInt("0x"+r[1]+r[2]),t=parseInt("0x"+r[3]+r[4]),a=parseInt("0x"+r[5]+r[6])),(Math.max(Number(e/255),Number(t/255),Number(a/255))+Math.min(Number(e/255),Number(t/255),Number(a/255)))/2*100},exports.hexToRGB=(r,e=1)=>`rgba(${parseInt(r.slice(1,3),16)}, ${parseInt(r.slice(3,5),16)}, ${parseInt(r.slice(5,7),16)}, ${e})`,exports.neutralColorSwap=e,exports.resetButtonStyle=r,exports.resolveColorWithNeutral=(r,t)=>"neutral"===t?e(r):r.colors[t];
|
package/esm/ColorCard.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import{jsxs as a,jsx as
|
|
1
|
+
import{jsxs as a,jsx as l,Fragment as s}from"react/jsx-runtime";import r from"styled-components";import{getLuminosity as m}from"./utils/utils.js";import n from"./theme.js";const p=r.ul`
|
|
2
2
|
padding-left: 2rem;
|
|
3
3
|
`,c=r.li`
|
|
4
4
|
list-style: none;
|
|
5
5
|
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.03);
|
|
6
|
-
border: 1px solid ${n.colors.
|
|
6
|
+
border: 1px solid ${n.colors.grayscaleToned.light2};
|
|
7
7
|
border-radius: 4px;
|
|
8
8
|
font-family: 'Ralway', sans-serif;
|
|
9
9
|
margin-top: 0.75rem;
|
|
10
|
-
`,
|
|
10
|
+
`,d=r.span`
|
|
11
11
|
text-transform: capitalize;
|
|
12
12
|
padding: 0.5em;
|
|
13
13
|
display: block;
|
|
14
|
-
border-bottom: 1px solid ${n.colors.
|
|
14
|
+
border-bottom: 1px solid ${n.colors.grayscaleToned.light2};
|
|
15
15
|
`,f=r.li`
|
|
16
16
|
display: block;
|
|
17
|
-
background: ${({hex:
|
|
18
|
-
color: ${({hex:
|
|
17
|
+
background: ${({hex:o})=>o};
|
|
18
|
+
color: ${({hex:o})=>m(o)<40?"#fff":"#000"};
|
|
19
19
|
padding: 1em;
|
|
20
20
|
`,g=r.ul`
|
|
21
21
|
margin: 0;
|
|
22
22
|
padding: 0;
|
|
23
23
|
display: flex;
|
|
24
24
|
flex-direction: column;
|
|
25
|
-
`,
|
|
25
|
+
`,t=o=>Object.entries(o).map(([e,i])=>typeof i=="string"?a(f,{hex:i,children:[e," (",i,")"]},i):a(s,{children:[l(d,{children:e}),l(p,{children:t(i)})]})),x=({colorName:o,variants:e})=>a(c,{children:[l(d,{children:o}),l(g,{children:t(e)})]});export{x as default};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n,jsxs as s}from"react/jsx-runtime";import{useState as f}from"react";import r from"styled-components";import{UnmountClosed as g}from"react-collapse";import{mq as y}from"../../shared/media-queries.js";import $ from"../../icons/components/ArrowDownIcon.js";const x=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
.ReactCollapse--collapse {
|
|
5
5
|
transition: height 300ms;
|
|
6
6
|
}
|
|
7
|
-
`,u=
|
|
7
|
+
`,u=r.ul`
|
|
8
8
|
margin: 0;
|
|
9
9
|
padding: 0;
|
|
10
10
|
list-style: none;
|
|
11
|
-
`,b=
|
|
11
|
+
`,b=r.div`
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: row;
|
|
14
14
|
justify-content: space-between;
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
margin: 0.5rem 0;
|
|
17
|
-
`,w=
|
|
17
|
+
`,w=r.div`
|
|
18
18
|
display: flex;
|
|
19
19
|
justify-content: center;
|
|
20
20
|
align-items: center;
|
|
@@ -22,19 +22,19 @@ import{jsx as i,jsxs as s}from"react/jsx-runtime";import{useState as f}from"reac
|
|
|
22
22
|
color: ${({theme:e})=>e.colors.text.dark};
|
|
23
23
|
transition: 200ms ease-in-out;
|
|
24
24
|
transform: ${({isOpen:e})=>`rotate(${e?"180deg":"0deg"})`};
|
|
25
|
-
`,O=
|
|
26
|
-
border-top: ${({theme:e})=>`1px solid ${e.colors.
|
|
25
|
+
`,O=r.li`
|
|
26
|
+
border-top: ${({theme:e})=>`1px solid ${e.colors.grayscaleToned.light2}`};
|
|
27
27
|
padding: ${({isOpen:e})=>e?"0.5rem 0 1rem 0":"0.5rem 0"};
|
|
28
28
|
|
|
29
29
|
&:last-child {
|
|
30
|
-
border-bottom: ${({theme:e})=>`1px solid ${e.colors.
|
|
30
|
+
border-bottom: ${({theme:e})=>`1px solid ${e.colors.grayscaleToned.light2}`};
|
|
31
31
|
}
|
|
32
|
-
`,k=
|
|
32
|
+
`,k=r.span`
|
|
33
33
|
color: ${({theme:e})=>e.colors.text.dark};
|
|
34
34
|
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
35
35
|
font-size: 0.9375rem;
|
|
36
36
|
font-weight: ${({theme:e})=>e.typography.fontBaseBoldWeight};
|
|
37
|
-
`,B=
|
|
37
|
+
`,B=r.div`
|
|
38
38
|
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
39
39
|
color: ${({theme:e})=>e.colors.text.dark};
|
|
40
40
|
font-size: 0.9375rem;
|
|
@@ -48,4 +48,4 @@ import{jsx as i,jsxs as s}from"react/jsx-runtime";import{useState as f}from"reac
|
|
|
48
48
|
margin-top: 0;
|
|
49
49
|
margin-bottom: 0;
|
|
50
50
|
}
|
|
51
|
-
`,l=({items:e,...m})=>{const[d,c]=f({}),a=o=>{c(t=>({...t,[o]:!t[o]}))},p=o=>()=>{a(o)},h=o=>t=>{t.key==="Enter"&&a(o)};return
|
|
51
|
+
`,l=({items:e,...m})=>{const[d,c]=f({}),a=o=>{c(t=>({...t,[o]:!t[o]}))},p=o=>()=>{a(o)},h=o=>t=>{t.key==="Enter"&&a(o)};return n(x,{...m,children:n(u,{className:"accordionList",children:e.map((o,t)=>{const i=!!d[t];return s(O,{isOpen:i,className:"accordionItem",children:[s(b,{onClick:p(t),onKeyPress:h(t),className:"accordionItemTitle",role:"button",tabIndex:0,"aria-expanded":i,id:`panel${t}-header`,"aria-controls":`panel${t}-content`,children:[n(k,{as:"span",children:o.title}),n(w,{isOpen:i,children:n($,{})})]}),n(g,{isOpened:i,children:n(B,{"aria-labelledby":`panel${t}-header`,id:`panel${t}-content`,role:"region",className:"wysiwyg",dangerouslySetInnerHTML:{__html:o.text}})},t)]},o.title)})})})};export{l as Accordion,l as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o,Fragment as n,jsxs as i}from"react/jsx-runtime";import t from"styled-components";import{BodyTextStyle as a,BodyText as s}from"../../typography/BodyText/index.js";import"../../shared/media-queries.js";const c=t.li`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
margin: 0;
|
|
@@ -24,23 +24,23 @@ import{jsx as t,Fragment as n,jsxs as i}from"react/jsx-runtime";import o from"st
|
|
|
24
24
|
overflow: hidden;
|
|
25
25
|
}
|
|
26
26
|
`}
|
|
27
|
-
`,
|
|
27
|
+
`,h=t(s)`
|
|
28
28
|
color: ${({theme:e})=>e.colors.text.dark};
|
|
29
29
|
overflow: hidden;
|
|
30
30
|
text-overflow: ellipsis;
|
|
31
|
-
`,m=
|
|
31
|
+
`,m=t.span`
|
|
32
32
|
display: inline-flex;
|
|
33
33
|
padding-right: 0.5rem;
|
|
34
34
|
svg {
|
|
35
35
|
width: 1rem;
|
|
36
36
|
height: 1rem;
|
|
37
37
|
}
|
|
38
|
-
`,p=
|
|
38
|
+
`,p=t.span`
|
|
39
39
|
display: inline-flex;
|
|
40
40
|
padding: 0 0.5rem;
|
|
41
|
-
color: ${({theme:e})=>e.colors.
|
|
41
|
+
color: ${({theme:e})=>e.colors.grayscaleToned.light1};
|
|
42
42
|
svg {
|
|
43
43
|
width: 1rem;
|
|
44
44
|
height: 1rem;
|
|
45
45
|
}
|
|
46
|
-
`,f=({link:e,separator:r,isLast:l,onlyLastTruncated:d})=>
|
|
46
|
+
`,f=({link:e,separator:r,isLast:l,onlyLastTruncated:d})=>o(n,{children:i(c,{$onlyLastTruncated:d,children:[e.prefixIcon&&o(m,{children:e.prefixIcon}),l?o(h,{as:"span",children:e.component}):i(n,{children:[e.component,o(p,{children:r})]})]})});export{f as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l,jsxs as I,Fragment as W}from"react/jsx-runtime";import g,{forwardRef as w}from"react";import t,{css as u}from"styled-components";import $ from"../../theme.js";import B from"../Spinner/index.js";import{BasicButtonFontStyle as j,ButtonRegularTextStyle as k}from"../../typography/ButtonText/index.js";import{fontSizes as T,smallSizeStyles as A,regularSizeStyles as C,largeSizeStyles as E,disabledColorStyles as F,colorStyles as R}from"./styles.js";import"../../utils/utils.js";const c=0,V=t.button`
|
|
2
2
|
${j}
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
outline: none;
|
|
@@ -6,17 +6,18 @@ import{jsx as s,jsxs as I,Fragment as W}from"react/jsx-runtime";import g,{forwar
|
|
|
6
6
|
user-select: none;
|
|
7
7
|
position: relative;
|
|
8
8
|
border: none;
|
|
9
|
+
border-radius: 0.5rem;
|
|
9
10
|
min-width: ${({minWidth:e})=>e||"auto"};
|
|
10
11
|
width: ${({fullWidth:e})=>e&&"100%"};
|
|
11
12
|
display: flex;
|
|
12
13
|
align-items: center;
|
|
13
|
-
justify-content: ${({sufixIcon:e,prefixIcon:i,isLoading:
|
|
14
|
+
justify-content: ${({sufixIcon:e,prefixIcon:i,isLoading:s})=>!s&&(e||i)?"space-between":"center"};
|
|
14
15
|
|
|
15
|
-
${({size:e="small"})=>
|
|
16
|
-
${({size:e})=>u`
|
|
17
|
-
${
|
|
18
|
-
${e==="regular"&&
|
|
19
|
-
${e==="large"&&
|
|
16
|
+
${({$size:e="small"})=>T[e]||k}
|
|
17
|
+
${({$size:e})=>u`
|
|
18
|
+
${e==="small"&&A()}
|
|
19
|
+
${e==="regular"&&C()}
|
|
20
|
+
${e==="large"&&E()}
|
|
20
21
|
`}
|
|
21
22
|
background-color: transparent;
|
|
22
23
|
transition:
|
|
@@ -24,20 +25,21 @@ import{jsx as s,jsxs as I,Fragment as W}from"react/jsx-runtime";import g,{forwar
|
|
|
24
25
|
background-color 0.3s ease,
|
|
25
26
|
border 0.3s ease,
|
|
26
27
|
filter 0.3s;
|
|
27
|
-
${({variant:e="solid"
|
|
28
|
-
${n?
|
|
28
|
+
${({$variant:e="solid",$color:i,$colorShade:s="main",disabled:n,theme:a})=>u`
|
|
29
|
+
${n?F(a,e):R[e]({theme:a,$color:i,$colorShade:s,$variant:e})}
|
|
29
30
|
`}
|
|
30
31
|
&:focus-visible {
|
|
31
|
-
box-shadow: 0px 0px 0px 1px
|
|
32
|
+
box-shadow: 0px 0px 0px 1px
|
|
33
|
+
${({theme:e})=>e.colors.grayscaleToned.light5};
|
|
32
34
|
}
|
|
33
|
-
`,
|
|
35
|
+
`,D={small:"1rem",regular:"1.25rem",large:"1.5rem"},h={small:"0.5rem",regular:"1rem",large:"1rem"},y=t.span`
|
|
34
36
|
display: flex;
|
|
35
37
|
margin-right: ${({type:e,size:i})=>e==="prefix"?h[i]:0};
|
|
36
38
|
margin-left: ${({type:e,size:i})=>e==="sufix"?h[i]:0};
|
|
37
|
-
font-size: ${({size:e})=>
|
|
39
|
+
font-size: ${({size:e})=>D[e]};
|
|
38
40
|
opacity: ${({isLoading:e})=>e?c:1};
|
|
39
|
-
`,
|
|
41
|
+
`,M=t(B)`
|
|
40
42
|
position: absolute;
|
|
41
|
-
`,
|
|
43
|
+
`,N=t.span`
|
|
42
44
|
opacity: ${({isLoading:e})=>e?c:1};
|
|
43
|
-
`,q={
|
|
45
|
+
`,q={small:1,regular:1.25,large:1.5},f=w(({size:e="small",color:i,colorShade:s="mainAlt",variant:n="solid",fullWidth:a=!1,isDisabled:x=!1,isLoading:r=!1,children:b,sufixIcon:d,prefixIcon:m,minWidth:z,as:S="button",...L},v)=>l(V,{...L,as:S,minWidth:z,$color:i,$colorShade:s,disabled:x||r,fullWidth:a,theme:$,$variant:n,$size:e,isLoading:r,ref:v,prefixIcon:m,sufixIcon:d,children:I(W,{children:[m&&l(y,{size:e,type:"prefix",isLoading:r,children:m}),((o,p)=>typeof o=="string"||typeof o=="number"?l(N,{isLoading:p,children:o}):g.isValidElement(o)?g.cloneElement(o,{style:{...o.props.style,opacity:p?c:1}}):o)(b,r),d&&l(y,{size:e,type:"sufix",isLoading:r,children:d}),r&&l(M,{customColor:$.colors.grayscaleToned.light1,size:q[e]})]})}));f.displayName="Button";export{f as Button,f as default};
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import{ButtonLargeTextStyle as
|
|
1
|
+
import{ButtonLargeTextStyle as n,ButtonRegularTextStyle as c,ButtonSmallTextStyle as s}from"../../typography/ButtonText/index.js";import{resolveColorWithNeutral as t}from"../../utils/utils.js";import"react/jsx-runtime";import"styled-components";const d={small:s,regular:c,large:n},g=()=>`
|
|
2
2
|
padding: 0.25rem 0.75rem;
|
|
3
3
|
min-height: 2.5rem;
|
|
4
|
-
`,
|
|
4
|
+
`,m=()=>`
|
|
5
5
|
padding: 0.25rem 1.5rem;
|
|
6
6
|
min-height: 3rem;
|
|
7
|
-
`,
|
|
7
|
+
`,h=()=>`
|
|
8
8
|
padding: 0.25rem 1.5rem;
|
|
9
9
|
min-height: 3.75rem;
|
|
10
|
-
|
|
11
|
-
color: ${
|
|
12
|
-
background-color: ${
|
|
10
|
+
`,$=({theme:r,$color:e,$colorShade:o})=>{const l=t(r,e),a=e==="neutral"?l.mainAlt:r.colors[e][o];return`
|
|
11
|
+
color: ${r.colors.text.light};
|
|
12
|
+
background-color: ${a};
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
border-color: ${
|
|
14
|
+
&:hover {
|
|
15
|
+
border-color: ${l.dark};
|
|
16
16
|
filter: brightness(0.9)
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
border-color: ${
|
|
19
|
+
&:active {
|
|
20
|
+
border-color: ${l.light};
|
|
21
21
|
filter: brightness(1.1)
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
color: ${o.
|
|
25
|
-
border: 2px solid ${o.
|
|
23
|
+
`},u=({theme:r,$color:e})=>{const o=t(r,e);return`
|
|
24
|
+
color: ${o.mainAlt};
|
|
25
|
+
border: 2px solid ${o.mainAlt};
|
|
26
26
|
background-color: transparent;
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
border: 2px solid ${o.
|
|
30
|
-
color: ${o.
|
|
28
|
+
&:hover {
|
|
29
|
+
border: 2px solid ${o.dark};
|
|
30
|
+
color: ${o.dark};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
border: 2px solid ${o.
|
|
35
|
-
color: ${o.
|
|
33
|
+
&:active {
|
|
34
|
+
border: 2px solid ${o.light};
|
|
35
|
+
color: ${o.light};
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
color: ${o.
|
|
37
|
+
`},p=({theme:r,$color:e})=>{const o=t(r,e);return`
|
|
38
|
+
color: ${o.mainAlt};
|
|
39
39
|
|
|
40
40
|
background-color: transparent;
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
color: ${o.
|
|
42
|
+
&:hover, &:active {
|
|
43
|
+
color: ${o.dark};
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
color: ${
|
|
45
|
+
`},i=r=>`
|
|
46
|
+
color: ${r.colors.grayscaleToned.light1};
|
|
47
47
|
cursor: not-allowed;
|
|
48
|
-
|
|
49
|
-
${
|
|
50
|
-
background-color: ${
|
|
51
|
-
${
|
|
52
|
-
border: 2px solid ${
|
|
48
|
+
`,S=(r,e)=>e==="solid"?`
|
|
49
|
+
${i(r)};
|
|
50
|
+
background-color: ${r.colors.grayscaleToned.light4};`:e==="outline"?`
|
|
51
|
+
${i(r)};
|
|
52
|
+
border: 2px solid ${r.colors.grayscaleToned.light1};`:i(r),b={solid:$,outline:u,flat:p};export{b as colorStyles,S as disabledColorStyles,d as fontSizes,h as largeSizeStyles,m as regularSizeStyles,g as smallSizeStyles};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{jsxs as s,jsx as i}from"react/jsx-runtime";import l from"styled-components";import n from"../../theme.js";const
|
|
2
|
-
background: ${({topBorder:
|
|
1
|
+
import{jsxs as s,jsx as i}from"react/jsx-runtime";import l from"styled-components";import n from"../../theme.js";const c=l.div``,m=l.div`
|
|
2
|
+
background: ${({topBorder:o})=>o};
|
|
3
3
|
height: 0.25rem;
|
|
4
|
-
`,
|
|
4
|
+
`,p=l.div`
|
|
5
5
|
background: ${n.colors.background.light};
|
|
6
6
|
|
|
7
|
-
${({noFrame:
|
|
7
|
+
${({noFrame:o,topBorder:r,lineBorder:e,theme:d})=>!r&&(!o||e)&&`border-top: 1px solid ${d.colors.grayscaleToned.light5};`}
|
|
8
8
|
|
|
9
|
-
${({noFrame:
|
|
9
|
+
${({noFrame:o,lineBorder:r,theme:e})=>(!o||r)&&`border-bottom: 1px solid ${e.colors.grayscaleToned.light5};
|
|
10
10
|
`}
|
|
11
11
|
|
|
12
|
-
${({noFrame:
|
|
13
|
-
border-left: 1px solid ${e.colors.
|
|
14
|
-
`,t=({children:
|
|
12
|
+
${({noFrame:o,lineBorder:r,theme:e})=>!o&&!r&&`border-right: 1px solid ${e.colors.grayscaleToned.light5};
|
|
13
|
+
border-left: 1px solid ${e.colors.grayscaleToned.light5};`}
|
|
14
|
+
`,t=({children:o,topBorder:r,noFrame:e=!1,lineBorder:d=!1,as:a="div"})=>s(c,{as:a,children:[r&&i(m,{topBorder:r}),i(p,{topBorder:r,noFrame:e,lineBorder:d,children:o})]});export{t as Card,t as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as b,jsx as s}from"react/jsx-runtime";import
|
|
1
|
+
import{jsxs as b,jsx as s}from"react/jsx-runtime";import a,{css as r}from"styled-components";import m from"../../icons/components/CheckmarkIcon.js";import{generateNameHash as g}from"../../shared/helpers.js";import i from"../../theme.js";import{BodyText as f}from"../../typography/BodyText/index.js";import{BackgroundStyles as u}from"../IconButton.js";import"../../shared/media-queries.js";import"../../utils/utils.js";const k=r`
|
|
2
2
|
width: 24px;
|
|
3
3
|
height: 24px;
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import t,{css as r}from"styled
|
|
|
16
16
|
}
|
|
17
17
|
`,n={regular:k,large:$},y=r`
|
|
18
18
|
cursor: default;
|
|
19
|
-
border: 2px solid ${i.colors.
|
|
19
|
+
border: 2px solid ${i.colors.grayscaleToned.light2};
|
|
20
20
|
`,v=e=>r`
|
|
21
21
|
svg {
|
|
22
22
|
opacity: 1;
|
|
@@ -28,16 +28,16 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import t,{css as r}from"styled
|
|
|
28
28
|
background: ${i.colors[e].main};
|
|
29
29
|
border: 2px solid ${i.colors[e].main};
|
|
30
30
|
`,z=r`
|
|
31
|
-
background: ${i.colors.
|
|
31
|
+
background: ${i.colors.grayscaleToned.light2};
|
|
32
32
|
z-index: 1;
|
|
33
33
|
`,D=r`
|
|
34
34
|
border: 2px solid ${i.colors.error.dark};
|
|
35
|
-
`,w=
|
|
35
|
+
`,w=a.div`
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: flex-start;
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
position: relative;
|
|
40
|
-
`,C=
|
|
40
|
+
`,C=a.input.attrs({type:"checkbox"})`
|
|
41
41
|
position: absolute;
|
|
42
42
|
appearance: none;
|
|
43
43
|
width: 100%;
|
|
@@ -53,7 +53,7 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import t,{css as r}from"styled
|
|
|
53
53
|
transition: background-color 400ms;
|
|
54
54
|
${u}
|
|
55
55
|
}
|
|
56
|
-
`,S=
|
|
56
|
+
`,S=a.span`
|
|
57
57
|
box-sizing: border-box;
|
|
58
58
|
cursor: pointer;
|
|
59
59
|
display: flex;
|
|
@@ -62,7 +62,7 @@ import{jsxs as b,jsx as s}from"react/jsx-runtime";import t,{css as r}from"styled
|
|
|
62
62
|
justify-content: center;
|
|
63
63
|
z-index: 0;
|
|
64
64
|
|
|
65
|
-
border: 2px solid ${i.colors.
|
|
65
|
+
border: 2px solid ${i.colors.grayscaleToned.dark5};
|
|
66
66
|
|
|
67
67
|
${e=>n[e.size]};
|
|
68
68
|
|
|
@@ -75,10 +75,10 @@ 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
|
-
`,
|
|
78
|
+
`,T=a(f)`
|
|
79
79
|
flex: 1;
|
|
80
80
|
cursor: ${({isDisabled:e})=>e?"default":"pointer"};
|
|
81
81
|
user-select: none;
|
|
82
82
|
color: ${({theme:e,isDisabled:o})=>o?e.colors.text.disabled:e.colors.text.dark};
|
|
83
83
|
margin-left: 0.5rem;
|
|
84
|
-
`,h=({name:e=g("check-box"),isDisabled:o=!1,size:
|
|
84
|
+
`,h=({name:e=g("check-box"),isDisabled:o=!1,size:t="regular",checked:l=!1,color:d="secondary",hasError:p=!1,label:c,...x})=>b(w,{children:[s(C,{...x,type:"checkbox",checked:l,"data-validate":"checked",name:e,id:e,color:d,disabled:o,isDisabled:o,boxSize:t}),s(S,{size:t,color:d,isChecked:l,isDisabled:o,hasError:p,children:s(m,{})}),c&&s(T,{as:"label",htmlFor:e,isDisabled:o,children:c})]});export{h as CheckBox,h as default};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{jsx as i,jsxs as
|
|
1
|
+
import{jsx as i,jsxs as x}from"react/jsx-runtime";import t from"styled-components";import v from"../../icons/components/CloseIcon.js";import{getFontSize as y,getCursorType as p,getBackgroundColor as C,getColor as $,getBorderColor as k,getHoverBorderColor as z,getHoverBackgroundColor as B,getHoverColor as D,getActiveBackgroundColor as b,getActiveBorderColor as j,getActiveColor as H,getSufixHoverBackgroundColor as w}from"./styles.js";import"../../utils/utils.js";const A={small:"2px 16px",regular:"3px 16px",large:"7px 16px"},S=t.div`
|
|
2
2
|
font-family: ${({theme:e})=>e.typography.fontBaseFamily};
|
|
3
|
-
font-size: ${({size:e})=>
|
|
3
|
+
font-size: ${({size:e})=>y(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
|
-
cursor: ${
|
|
8
|
+
cursor: ${p};
|
|
9
9
|
align-items: center;
|
|
10
|
-
background: ${
|
|
11
|
-
color: ${
|
|
10
|
+
background: ${C};
|
|
11
|
+
color: ${$};
|
|
12
12
|
justify-content: center;
|
|
13
13
|
border-width: 1px;
|
|
14
14
|
border-style: solid;
|
|
@@ -19,13 +19,14 @@ import{jsx as i,jsxs as v}from"react/jsx-runtime";import t from"styled-component
|
|
|
19
19
|
color 0.3s ease,
|
|
20
20
|
background-color 0.3s ease,
|
|
21
21
|
border 0.3s ease;
|
|
22
|
+
box-sizing: border-box;
|
|
22
23
|
|
|
23
24
|
${e=>!e.isDisabled&&e.isClickable&&` &:hover {
|
|
24
|
-
border-color: ${
|
|
25
|
-
background-color: ${
|
|
25
|
+
border-color: ${z(e)};
|
|
26
|
+
background-color: ${B(e)};
|
|
26
27
|
color: ${D(e)};
|
|
27
28
|
} &:active {
|
|
28
|
-
background-color: ${
|
|
29
|
+
background-color: ${b(e)};
|
|
29
30
|
border-color: ${j(e)};
|
|
30
31
|
color: ${H(e)};
|
|
31
32
|
}`}
|
|
@@ -39,10 +40,10 @@ import{jsx as i,jsxs as v}from"react/jsx-runtime";import t from"styled-component
|
|
|
39
40
|
margin-right: 0.625rem;
|
|
40
41
|
display: flex;
|
|
41
42
|
align-items: center;
|
|
42
|
-
`,
|
|
43
|
+
`,N=t.span`
|
|
43
44
|
display: flex;
|
|
44
45
|
align-items: center;
|
|
45
|
-
cursor: ${
|
|
46
|
+
cursor: ${p};
|
|
46
47
|
padding: 0.5rem;
|
|
47
48
|
margin-left: 0.25rem;
|
|
48
49
|
margin-right: -0.25rem;
|
|
@@ -63,11 +64,11 @@ import{jsx as i,jsxs as v}from"react/jsx-runtime";import t from"styled-component
|
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
&:active:before {
|
|
66
|
-
background-color: ${
|
|
67
|
+
background-color: ${b};
|
|
67
68
|
opacity: 1;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
&:hover:before {
|
|
71
72
|
opacity: 1;
|
|
72
73
|
}
|
|
73
|
-
`,
|
|
74
|
+
`,m=({color:e="primary",children:l,component:u="div",isDisabled:r,onClick:s,size:h="regular",prefix:n,onDelete:a,variant:c="solid",...f})=>{const o=!!(s&&!r),d=!!(a&&!r);return i(S,{...f,role:o?"button":void 0,onClick:o?s:void 0,tabIndex:o?0:void 0,as:o?"button":u,color:e,isDisabled:r,size:h,isClickable:o,isDeletable:d,variant:c,hasPrefix:!!n,children:x(F,{children:[n&&i(I,{className:"prefix",children:n}),l,a&&i(N,{role:"button",onClick:d?g=>{g.stopPropagation(),a?.(g)}:void 0,color:e,variant:c,isClickable:o,isDisabled:r,isDeletable:!0,size:"regular",children:i(v,{})})]})})};export{m as Chip,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{resolveColorWithNeutral as a}from"../../utils/utils.js";import"styled-components";const n=(r="small")=>({small:"0.75rem",regular:"1rem",large:"1rem"})[r],s=({isDisabled:r,variant:o,color:t,theme:e})=>r?e.colors.grayscaleToned.light5:t==="neutralLight"?{solid:e.colors.background.gray,flat:e.colors.background.light,outline:"transparent"}[o]:{solid:a(e,t).main,flat:e.colors.background.light,outline:"transparent"}[o],c=({isDisabled:r,variant:o,color:t,theme:e})=>{if(r)return e.colors.text.disabled;if(t==="neutralLight")return o==="outline"?e.colors.text.disabled:e.colors.text.dark;const l=a(e,t).main;return{solid:e.colors.text.light,flat:l,outline:l}[o]},g=({color:r,isDisabled:o,variant:t,theme:e})=>{if(o)return e.colors.grayscaleToned.light5;if(r==="neutralLight")return{solid:"transparent",flat:"transparent",outline:e.colors.text.disabled}[t];const l=a(e,r).main;return{solid:l,flat:"transparent",outline:l}[t]},d=({isDisabled:r,isClickable:o,isDeletable:t})=>r?"not-allowed":o||t?"pointer":"auto",u=({variant:r,color:o,theme:t})=>o==="neutralLight"?{solid:t.colors.grayscaleToned.light4,flat:t.colors.background.light,outline:"transparent"}[r]:{solid:a(t,o).dark,flat:t.colors.background.light,outline:"transparent"}[r],h=({variant:r,color:o,theme:t})=>{if(o==="neutralLight")return{solid:t.colors.grayscaleToned.light4,flat:"transparent",outline:t.colors.text.dark}[r];const e=a(t,o).dark;return{solid:e,flat:"transparent",outline:e}[r]},f=({variant:r,color:o,theme:t})=>{if(o==="neutralLight")return t.colors.text.dark;const e=a(t,o).dark;return{solid:t.colors.text.light,flat:e,outline:e}[r]},k=({variant:r,color:o,isClickable:t,isDisabled:e,theme:l})=>{if(e)return l.colors.grayscaleToned.light5;if(o==="neutralLight")return{solid:l.colors.grayscaleToned.light2,flat:l.colors.grayscaleToned.light4,outline:l.colors.grayscaleToned.light4}[r];const i=a(l,o);return r==="solid"?t?i.darker:i.dark:l.colors.background.gray},b=({color:r,variant:o,isDisabled:t,theme:e})=>t?"transparent":r==="neutralLight"?e.colors.background.light:o==="solid"?a(e,r).light:"transparent",m=({variant:r,color:o,theme:t})=>{if(o==="neutralLight")return{solid:t.colors.background.light,flat:"transparent",outline:t.colors.background.light}[r];const e=a(t,o).light;return{solid:e,flat:"transparent",outline:e}[r]},p=({variant:r,color:o,theme:t})=>o==="neutralLight"?t.colors.text.dark:r==="solid"?t.colors.text.light:a(t,o).light;export{b as getActiveBackgroundColor,m as getActiveBorderColor,p as getActiveColor,s as getBackgroundColor,g as getBorderColor,c as getColor,d as getCursorType,n as getFontSize,u as getHoverBackgroundColor,h as getHoverBorderColor,f as getHoverColor,k as getSufixHoverBackgroundColor};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{jsxs as c,jsx as t}from"react/jsx-runtime";import o from"styled-components";import d from"../Icons/Arrow.js";import
|
|
1
|
+
import{jsxs as c,jsx as t}from"react/jsx-runtime";import o from"styled-components";import d from"../Icons/Arrow.js";import e from"../../theme.js";import{BodyText as s}from"../../typography/BodyText/index.js";import{formatMonthTitle as p}from"./localeUtils.js";import"../../shared/media-queries.js";const f=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
padding: 0 2em;
|
|
5
|
-
`,h=o(
|
|
5
|
+
`,h=o(s)`
|
|
6
6
|
font-size: 1.5em;
|
|
7
|
-
color: ${
|
|
8
|
-
`,
|
|
7
|
+
color: ${e.colors.text.dark};
|
|
8
|
+
`,r=o.button`
|
|
9
9
|
appearance: none;
|
|
10
10
|
background-color: transparent;
|
|
11
11
|
border: 0;
|
|
@@ -14,12 +14,12 @@ import{jsxs as c,jsx as t}from"react/jsx-runtime";import o from"styled-component
|
|
|
14
14
|
outline: none;
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
|
-
`,
|
|
17
|
+
`,n=o(d)`
|
|
18
18
|
width: 16px;
|
|
19
19
|
height: 16px;
|
|
20
|
-
fill: ${
|
|
21
|
-
`,x=o(
|
|
20
|
+
fill: ${e.colors.grayscaleToned.dark3};
|
|
21
|
+
`,x=o(n)`
|
|
22
22
|
transform: rotate(90deg);
|
|
23
|
-
`,k=o(
|
|
23
|
+
`,k=o(n)`
|
|
24
24
|
transform: rotate(-90deg);
|
|
25
|
-
`,g=({month:
|
|
25
|
+
`,g=({month:i,onPreviousClick:l,onNextClick:a,locale:m})=>c(f,{children:[t(r,{onClick:()=>l(),children:t(x,{title:"prev-month"})}),t(h,{as:"h3",children:p(i,m)}),t(r,{onClick:()=>a(),children:t(k,{title:"next-month"})})]});export{g as default};
|