dibk-design 4.5.0 → 5.0.1
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/dist/assets/svg/arbeidstilsynet-logo.svg +1 -0
- package/dist/components/Accordion.module.scss +6 -6
- package/dist/components/Button.js +7 -24
- package/dist/components/Button.module.scss +92 -98
- package/dist/components/CheckBoxIcon.js +0 -9
- package/dist/components/CheckBoxIcon.module.scss +6 -6
- package/dist/components/CheckBoxInput.js +0 -2
- package/dist/components/CheckBoxInput.module.scss +3 -3
- package/dist/components/CheckBoxListItem.js +1 -3
- package/dist/components/CheckBoxListItem.module.scss +4 -4
- package/dist/components/ContentBox.module.scss +6 -6
- package/dist/components/Dialog.module.scss +1 -1
- package/dist/components/DragAndDropFileInput.js +3 -5
- package/dist/components/DragAndDropFileInput.module.scss +3 -3
- package/dist/components/ErrorBox.js +1 -9
- package/dist/components/ErrorBox.module.scss +4 -4
- package/dist/components/ErrorMessage.js +2 -10
- package/dist/components/Footer.module.scss +1 -1
- package/dist/components/Header.js +1 -3
- package/dist/components/Header.module.scss +1 -3
- package/dist/components/InfoBox.js +1 -12
- package/dist/components/InfoBox.module.scss +3 -3
- package/dist/components/InputField.js +3 -14
- package/dist/components/InputField.module.scss +7 -7
- package/dist/components/NavigationBar.js +6 -30
- package/dist/components/NavigationBar.module.scss +25 -27
- package/dist/components/NavigationBarListItem.js +3 -15
- package/dist/components/PDF.scss +9 -5
- package/dist/components/ProgressBar.module.scss +2 -2
- package/dist/components/RadioButtonIcon.js +0 -9
- package/dist/components/RadioButtonIcon.module.scss +6 -6
- package/dist/components/RadioButtonInput.js +0 -2
- package/dist/components/RadioButtonInput.module.scss +3 -3
- package/dist/components/RadioButtonListItem.js +2 -4
- package/dist/components/RadioButtonListItem.module.scss +6 -6
- package/dist/components/Select.js +4 -21
- package/dist/components/Select.module.scss +6 -6
- package/dist/components/Table.module.scss +5 -5
- package/dist/components/Textarea.js +2 -12
- package/dist/components/Textarea.module.scss +5 -5
- package/dist/components/Theme.js +97 -51
- package/dist/components/Theme.module.scss +86 -21
- package/dist/components/ThemeProvider.js +24 -0
- package/dist/components/ThemeProvider.module.scss +22 -0
- package/dist/components/WizardNavigation/Step.module.scss +8 -8
- package/dist/functions/helpers.js +49 -1
- package/dist/functions/theme.js +2 -37
- package/dist/index.js +7 -0
- package/dist/style/abstracts/variables/_colors.scss +12 -16
- package/dist/style/base/_fonts.scss +0 -106
- package/dist/style/pdf.css +6 -5
- package/dist/style/pdf.css.map +1 -1
- package/package.json +2 -1
- package/dist/assets/fonts/Altis-Light.eot +0 -0
- package/dist/assets/fonts/Altis-Light.svg +0 -326
- package/dist/assets/fonts/Altis-Light.ttf +0 -0
- package/dist/assets/fonts/Altis-Light.woff +0 -0
- package/dist/assets/fonts/Altis.eot +0 -0
- package/dist/assets/fonts/Altis.svg +0 -327
- package/dist/assets/fonts/Altis.ttf +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-300.eot +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-300.svg +0 -346
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-300.ttf +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-300.woff +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-300.woff2 +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-300italic.eot +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-300italic.svg +0 -377
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-300italic.ttf +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-300italic.woff +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-300italic.woff2 +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-700.eot +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-700.svg +0 -349
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-700.ttf +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-700.woff +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-700.woff2 +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-700italic.eot +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-700italic.svg +0 -379
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-700italic.ttf +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-700italic.woff +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-700italic.woff2 +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-italic.eot +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-italic.svg +0 -379
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-italic.ttf +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-italic.woff +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-italic.woff2 +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-regular.eot +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-regular.svg +0 -349
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-regular.ttf +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-regular.woff +0 -0
- package/dist/assets/fonts/open-sans-v27-latin-ext_latin-regular.woff2 +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 668.4 171.17"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:#11c1b0;}</style></defs><title>Artboard 1</title><circle class="cls-1" cx="75.91" cy="79.24" r="68.12"/><path d="M161.61,155.16l21.66-50.54h6.86l21.66,50.54H201.61L196.84,144H176.56l-4.76,11.19Zm18.63-19.86h12.85l-6.43-14.95Z"/><path d="M237.05,128.44a13,13,0,0,0-3.39-.36,10.39,10.39,0,0,0-8.52,5.06v22h-9.39v-35h9v3.54c2.09-2.6,5.92-4.26,10.18-4.26a19.08,19.08,0,0,1,3.18.29Z"/><path d="M243.91,155.16V103.89h9.39v18.77a15.52,15.52,0,0,1,9.89-3.25c9.53,0,17.18,7.94,17.18,18.27A18.8,18.8,0,0,1,275.89,150a17.61,17.61,0,0,1-13.21,5.92,14.65,14.65,0,0,1-9.75-3.54v2.82Zm9.39-12.27a10.25,10.25,0,0,0,8.45,4.33,9.15,9.15,0,0,0,9.24-9.53c0-5.06-3.54-9.6-9-9.6a10.76,10.76,0,0,0-8.66,4.33Z"/><path d="M317.4,149.6A19,19,0,0,1,303,155.88c-10.47,0-18.34-7.22-18.34-18.19,0-9.75,6.64-18.27,17-18.27,9.68,0,16.53,8.16,16.53,17.91a15.48,15.48,0,0,1-.22,2.67H293.79a9.19,9.19,0,0,0,9.46,8.3,12.39,12.39,0,0,0,8.81-4Zm-8.74-16.46a7,7,0,0,0-6.93-6.14,7.6,7.6,0,0,0-7.51,6.14Z"/><path d="M329.45,101.72a6,6,0,1,1-6.14,6A6,6,0,0,1,329.45,101.72Zm4.69,53.43h-9.39v-35h9.39Z"/><path d="M368.08,155.16v-2.82a14.65,14.65,0,0,1-9.75,3.54A17.61,17.61,0,0,1,345.12,150a18.8,18.8,0,0,1-4.48-12.27c0-10.33,7.65-18.27,17.19-18.27a15.52,15.52,0,0,1,9.89,3.25V103.89h9.39v51.26Zm-.36-22.74a10.77,10.77,0,0,0-8.66-4.33c-5.49,0-9,4.55-9,9.6a9.15,9.15,0,0,0,9.24,9.53,10.25,10.25,0,0,0,8.45-4.33Z"/><path d="M387.56,144.47a14.75,14.75,0,0,0,9.6,3.46c2.53,0,4.48-1.23,4.48-3,0-5.27-17-3.39-17-14.66,0-6.71,6.5-10.9,13.43-10.9,4.55,0,9.53,1.73,11.84,3.54l-4.4,6.79a11.81,11.81,0,0,0-6.71-2.38c-2.6,0-4.77,1-4.77,2.82,0,4.55,17,2.75,17,14.87,0,6.71-6.57,10.83-13.94,10.83A24.22,24.22,0,0,1,383,151.18Z"/><path d="M443.15,155.16a23.14,23.14,0,0,1-5.85.72c-5.63,0-9.75-1.88-12.13-5.05-1.8-2.38-2.6-5.49-2.6-10.47V128.08h-9.75v-7.94h9.75v-9.75H432v9.75h11.55v7.94H432v13.36c0,2.17.36,3.46,1.16,4.4s2.45,1.73,4.76,1.73a22.8,22.8,0,0,0,3.83-.36Z"/><path d="M455.78,101.72a6,6,0,1,1-6.14,6A6,6,0,0,1,455.78,101.72Zm4.69,53.43h-9.39v-35h9.39Z"/><path d="M479.25,155.16h-9.39V103.89h9.39Z"/><path d="M489.71,144.47a14.75,14.75,0,0,0,9.6,3.46c2.53,0,4.48-1.23,4.48-3,0-5.27-17-3.39-17-14.66,0-6.71,6.5-10.9,13.43-10.9,4.55,0,9.53,1.73,11.84,3.54l-4.4,6.79a11.81,11.81,0,0,0-6.71-2.38c-2.6,0-4.77,1-4.77,2.82,0,4.55,17,2.75,17,14.87,0,6.71-6.57,10.83-13.94,10.83a24.22,24.22,0,0,1-14.08-4.69Z"/><path d="M521.69,172.49l9.67-20.87L515.7,120.14H526l10.25,21,9.46-21h9.89l-24.12,52.35Z"/><path d="M560.31,155.16v-35h9V123a15.45,15.45,0,0,1,9.89-3.54A15.78,15.78,0,0,1,591.36,125c2.31,2.75,3.61,6.28,3.61,12.27v17.83h-9.39V136.6c0-3.46-.79-5.27-2.09-6.57a7.38,7.38,0,0,0-5.27-2,11.18,11.18,0,0,0-8.52,4.33v22.74Z"/><path d="M633.45,149.6a19,19,0,0,1-14.37,6.28c-10.47,0-18.34-7.22-18.34-18.19,0-9.75,6.64-18.27,17-18.27,9.68,0,16.53,8.16,16.53,17.91a15.48,15.48,0,0,1-.22,2.67H609.84a9.19,9.19,0,0,0,9.46,8.3,12.39,12.39,0,0,0,8.81-4Zm-8.74-16.46a7,7,0,0,0-6.93-6.14,7.6,7.6,0,0,0-7.51,6.14Z"/><path d="M666.44,155.16a23.16,23.16,0,0,1-5.85.72c-5.63,0-9.75-1.88-12.13-5.05-1.8-2.38-2.6-5.49-2.6-10.47V128.08h-9.75v-7.94h9.75v-9.75h9.39v9.75H666.8v7.94H655.25v13.36c0,2.17.36,3.46,1.16,4.4s2.45,1.73,4.76,1.73a22.8,22.8,0,0,0,3.83-.36Z"/><path class="cls-2" d="M84.69,34.34c.52,1.69,0,3.34-1.25,3.74a5.9,5.9,0,0,1-1.21.29,3.83,3.83,0,0,0,.73.17,3.85,3.85,0,1,0,1-7.63,4,4,0,0,0-3.71,1.58A6.54,6.54,0,0,1,81.55,32C82.77,31.6,84.17,32.65,84.69,34.34Z"/><path class="cls-2" d="M69.13,33.52c-1.33.07-2.86,1-4.72,2.84-.14.14,2.56-1.41,3.24-.69a2.17,2.17,0,0,0,1.91.73c1-.08,1.56-.58,1.5-1.44A1.72,1.72,0,0,0,69.13,33.52Z"/><path class="cls-2" d="M75.91,3.33A75.91,75.91,0,0,0,0,79.24v75.91H75.91a75.91,75.91,0,0,0,0-151.82ZM126.2,80.78c-.47-5.58-2.41-6.54-2.19-5.26a22.38,22.38,0,0,1,.3,7.45c-.48,3.69-5.49,9-5.49,9s-2.9-4.41-2.5-8.31,4.75-7.76,2.27-6.45c-2.11,1.12-3.52,4.84-3.52,4.84s-1.08-1.29-.59-4.41,5.31-7,5.87-7.55a2.72,2.72,0,0,0,.34-2.46,7.4,7.4,0,0,0-6.18-4.57,9.58,9.58,0,0,0-10.89,8,9,9,0,0,0,1.2,5.75,50.28,50.28,0,0,0,4.51,6.24,28.94,28.94,0,0,1,4.1,6,9.45,9.45,0,0,1,.65,5.16A10.72,10.72,0,0,1,102,103.39c-.95-.12-1.89-.27-2.8-.45a8.77,8.77,0,0,0,3.35,5.1c2.4,1.85,5,1.25,7.19,2.47s2.6,2.11,2.6,2.11-2.94-.61-3.05.23,1.89.94,3.09,1.32a3.44,3.44,0,0,1,1.79,1.7s-1.83-.78-1.55,0c0,.06.94,1.42,1.76,2.62s1.46,2.43.27,4.2a58.43,58.43,0,0,1-15.16,9.78,12.21,12.21,0,0,1-.82-6.66c.4-2.4,1.7-3.3,3.51-3.36s3.41.31,4.52-1a1.74,1.74,0,0,0,.34-1.25,23.71,23.71,0,0,0-3.9-3.47c-2.15-1.36-2.93-2.54-6.89-2.43s-12.09,1.94-16.34-2.95a12.44,12.44,0,0,1-2.41-4.25,14.24,14.24,0,0,1-1.58,1h0c-.42.23-2.38,1.09-2.38,1.09-2.61,1-5.64,1.74-7.6,2.29-2.61.74-3.66,1.51-4.25,3-.66,1.71.58,4.31.58,4.31a12.83,12.83,0,0,1-2.12,3.21,18,18,0,0,1-4.42,3.13s2.35-5,0-2.2a10.21,10.21,0,0,1-4.61,3.37c1.2-1.4,1.45-3.4,0-1.72s-4.82,2.49-4.82,2.49c1.48-1,2.78-2.91,1.25-2.25a15.19,15.19,0,0,1-5,1,3.43,3.43,0,0,1-1.75-.3,58.76,58.76,0,0,1-12.52-13,16.23,16.23,0,0,1,7.21-2.09c2.43-.07,2.61.75,3.44,2.36.91,1.76,1.21,6,1.21,6s2.21,1.35,6.52.82c3-.73,4.7-1.91,4.86-2.42s-2.33-7.71.6-12.09a11.22,11.22,0,0,1,2.75-2.86h0a19.59,19.59,0,0,1,4-2.13c-7.61-2.83-9.26-7.62-9.78-8.79-.85-1.91-.5,4-.5,4a11.43,11.43,0,0,1-1.86-6.72h0a26.88,26.88,0,0,1,.32-3.3,26.65,26.65,0,0,1-7.11-1.07s5.58-2.23-.18-1.29c-5.51.9-8.45-.85-8.45-.85.95-.22,4.32-2.32.82-1.5-5.25,1.23-7.85-1.47-7.85-1.47,1.46.24,4.47-.35,2.5-1.17a28.94,28.94,0,0,1-4-2.29c-.27-.16-4.17-2.83-4.29-5.63a57.77,57.77,0,0,1,4.4-14.71A13.17,13.17,0,0,1,27.84,60a3.65,3.65,0,0,1-.64,5c-1.3,1.25-2.68,2.14-2.68,3.42,0,.76.67,1.37,1.35,1.83.35.23.69.42.94.57a78,78,0,0,0,17.7,4.56A18.41,18.41,0,0,1,48.18,68l-.08-.09a22.3,22.3,0,0,1-5-8.09s5.39,2.66.84-1c-4.36-3.5-5-6.85-5-6.85.8.55,4.61,1.66,1.67-.39-4.43-3.08-4.16-6.82-4.16-6.82.8,1.25,3.25,3.09,2.55,1.08a34.89,34.89,0,0,1-1-4.45c-.07-.28-.13-.58-.2-.92-.32-1.77-.73-3.8.69-5.81A58.43,58.43,0,0,1,51.14,26.5a12.78,12.78,0,0,1,1,6.81,3.54,3.54,0,0,1-3.71,3.29c-1.8.1-3.2-.25-4.29,1.07-.76.93,0,2.63.23,3.44v0a79.25,79.25,0,0,0,9.47,17.71,14.57,14.57,0,0,1,7-2.62c1.55-.15,4.24-.51,1.9-1.08-2.56-.62-5.82.14-2.79-1.16,3.69-1.59,8.6.33,10.13,0s1.85-3.17,1.91-4.53h-.34c-1.77.15-6.48.61-8.17,1.36a11.37,11.37,0,0,1-1.12-4.29,2.4,2.4,0,0,0,.69.56,6.89,6.89,0,0,0,3-.12,3.1,3.1,0,0,0,2.51-1.77,2.33,2.33,0,0,0-1.09-2.67,4.65,4.65,0,0,0-3.22.44l-.65.41c-1.72,1.09-1.35,2.31-1.35,2.31s-1.64-1-2.81-4.88c0,0-2.16-1.55-2.13-2.53a22.76,22.76,0,0,1,5.93-4.15,13.29,13.29,0,0,1,7.06-4.5s2.44-5.39,10.08-5.88c3.07-.2-3.35,1.53-4.14,2.42-1.49,1.68,3.29-1.94,10.53-.91l.38.05c.33.05,1.27.27,1.41.31l.73.22c7.15,2.4,13.45,10.61,12.4,21.12a17.11,17.11,0,0,0-3.15-6.76c-2.3-3.26-3-2.83-1.07.77,1.79,3.37,3.76,10.13,1.57,15.47a33.26,33.26,0,0,1-2.74,4.79A15.57,15.57,0,0,0,96,53.25c-.91-3.48-1.64-3.33-1.16.3.45,3.41,0,9.75-3.6,13.54a38,38,0,0,1-3.67,3,14.18,14.18,0,0,0,2-6.67c.3-3.29-.38-3.39-1.09-.1-.64,3-2.85,8-6.78,10.29a43.45,43.45,0,0,1-6.11,2.45h0A21.78,21.78,0,0,0,78,84.63a18.71,18.71,0,0,0,4.41,5c.35.27.7.54,1.08.81,0,0,3,.59,5.59,1.07s7.1,2.61,9.35,6.23h0A10.5,10.5,0,0,0,102.14,99c3.86.5,7.59-1.6,8.07-5.38a5.93,5.93,0,0,0-.35-3.18,25.35,25.35,0,0,0-3.54-5.16,52,52,0,0,1-4.71-6.58A12.39,12.39,0,0,1,100,70.79a13,13,0,0,1,14.65-11,13.23,13.23,0,0,1,9.93,6.67C128.5,72.73,126.2,80.78,126.2,80.78ZM56.07,45.18a4,4,0,0,1,5.1.86v0c-1.88-.72-2.94.15-5.69,2.12s-5.24-1-5.24-1v0C52.11,47.84,53.18,46.93,56.07,45.18Z"/></svg>
|
|
@@ -75,18 +75,18 @@
|
|
|
75
75
|
width: 100%;
|
|
76
76
|
display: block;
|
|
77
77
|
&.default {
|
|
78
|
-
background-color: $color-default-background;
|
|
78
|
+
background-color: var(--color-default-background, $color-default-background);
|
|
79
79
|
.panel span,
|
|
80
80
|
.content {
|
|
81
|
-
color: $color-default-text;
|
|
81
|
+
color: var(--color-default-text, $color-default-text);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
&.secondary {
|
|
85
|
-
background-color: $color-secondary-background;
|
|
86
|
-
color: $color-default-text;
|
|
85
|
+
background-color: var(--color-secondary-background, $color-secondary-background);
|
|
86
|
+
color: var(--color-default-text, $color-default-text);
|
|
87
87
|
.panel span,
|
|
88
88
|
.content {
|
|
89
|
-
color: $color-default-text;
|
|
89
|
+
color: var(--color-default-text, $color-default-text);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
padding: 15px 30px;
|
|
111
111
|
}
|
|
112
112
|
&:focus-visible {
|
|
113
|
-
outline-color: $color-primary;
|
|
113
|
+
outline-color: var(--color-primary, $color-primary);
|
|
114
114
|
outline-style: auto;
|
|
115
115
|
outline-width: 2px;
|
|
116
116
|
outline-offset: 0px;
|
|
@@ -6,10 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var
|
|
9
|
+
var _reactRouterDom = require("react-router-dom");
|
|
10
10
|
var _helpers = require("../functions/helpers");
|
|
11
11
|
var _ButtonModule = _interopRequireDefault(require("./Button.module.scss"));
|
|
12
|
-
var _reactRouterDom = require("react-router-dom");
|
|
13
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -26,14 +25,6 @@ const Button = props => {
|
|
|
26
25
|
return "";
|
|
27
26
|
}
|
|
28
27
|
};
|
|
29
|
-
const getThemeStyle = (theme, color) => {
|
|
30
|
-
return {
|
|
31
|
-
backgroundColor: (0, _theme.getThemePaletteBackgroundColor)(theme, color),
|
|
32
|
-
color: (0, _theme.getThemePaletteTextColor)(theme, color),
|
|
33
|
-
borderColor: (0, _theme.getThemePaletteBorderColor)(theme, color),
|
|
34
|
-
borderWidth: (0, _theme.getThemePaletteBorderColor)(theme, color) ? "1px" : "0"
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
28
|
let buttonProps = {
|
|
38
29
|
...props,
|
|
39
30
|
"aria-invalid": props.hasErrors || null,
|
|
@@ -48,8 +39,7 @@ const Button = props => {
|
|
|
48
39
|
delete buttonProps.arrow;
|
|
49
40
|
delete buttonProps.noMargin;
|
|
50
41
|
const buttonColor = (props === null || props === void 0 ? void 0 : props.inputType) === "radio" ? props.defaultChecked ? "primary" : "default" : props.color;
|
|
51
|
-
const
|
|
52
|
-
const className = (0, _helpers.classNameArrayToClassNameString)([_ButtonModule.default.button, _ButtonModule.default[buttonColor], _ButtonModule.default[props.size], getArrowClass(props.arrow), props.theme && _ButtonModule.default.hasTheme, props.noHover || (props === null || props === void 0 ? void 0 : props.inputType) === "radio" ? _ButtonModule.default.noHover : null, props.rounded && _ButtonModule.default.rounded, props.hasErrors && _ButtonModule.default.hasErrors, props.disabled && _ButtonModule.default.disabled, props.noMargin && _ButtonModule.default.noMargin]);
|
|
42
|
+
const className = (0, _helpers.classNameArrayToClassNameString)([_ButtonModule.default.button, _ButtonModule.default[buttonColor], _ButtonModule.default[props.size], getArrowClass(props.arrow), props.noHover || (props === null || props === void 0 ? void 0 : props.inputType) === "radio" ? _ButtonModule.default.noHover : null, props.rounded && _ButtonModule.default.rounded, props.hasErrors && _ButtonModule.default.hasErrors, props.disabled && _ButtonModule.default.disabled, props.noMargin && _ButtonModule.default.noMargin]);
|
|
53
43
|
const renderReactLinkElements = childElements => {
|
|
54
44
|
const childElementsthroughFragments = (0, _helpers.cloneThroughFragments)(childElements);
|
|
55
45
|
return childElementsthroughFragments.map((childElement, index) => {
|
|
@@ -58,7 +48,6 @@ const Button = props => {
|
|
|
58
48
|
var _childElement$props2, _childElement$props3;
|
|
59
49
|
const childElementCopy = _react.default.cloneElement(childElement, {
|
|
60
50
|
className: className,
|
|
61
|
-
style: themeStyle,
|
|
62
51
|
key: "button-".concat(index),
|
|
63
52
|
to: !buttonProps.disabled && childElement !== null && childElement !== void 0 && (_childElement$props2 = childElement.props) !== null && _childElement$props2 !== void 0 && _childElement$props2.to ? childElement === null || childElement === void 0 || (_childElement$props3 = childElement.props) === null || _childElement$props3 === void 0 ? void 0 : _childElement$props3.to : null
|
|
64
53
|
});
|
|
@@ -66,8 +55,7 @@ const Button = props => {
|
|
|
66
55
|
} else {
|
|
67
56
|
return _react.default.createElement("button", _extends({}, buttonProps, {
|
|
68
57
|
key: "button-".concat(index),
|
|
69
|
-
className: className
|
|
70
|
-
style: themeStyle
|
|
58
|
+
className: className
|
|
71
59
|
}), props.content || childElement.props.children);
|
|
72
60
|
}
|
|
73
61
|
});
|
|
@@ -75,7 +63,6 @@ const Button = props => {
|
|
|
75
63
|
if (props.inputType === "button") {
|
|
76
64
|
return _react.default.createElement("input", _extends({}, buttonProps, {
|
|
77
65
|
className: className,
|
|
78
|
-
style: themeStyle,
|
|
79
66
|
type: "button",
|
|
80
67
|
value: props.content
|
|
81
68
|
}));
|
|
@@ -83,29 +70,25 @@ const Button = props => {
|
|
|
83
70
|
return _react.default.createElement("label", {
|
|
84
71
|
className: className
|
|
85
72
|
}, _react.default.createElement("input", _extends({}, buttonProps, {
|
|
86
|
-
style: themeStyle,
|
|
87
73
|
type: "radio"
|
|
88
74
|
})), props.content);
|
|
89
75
|
} else if ((_props$href2 = props.href) !== null && _props$href2 !== void 0 && _props$href2.length && !props.disabled) {
|
|
90
76
|
return _react.default.createElement("a", _extends({}, buttonProps, {
|
|
91
|
-
className: className
|
|
92
|
-
style: themeStyle
|
|
77
|
+
className: className
|
|
93
78
|
}), props.content || props.children);
|
|
94
79
|
} else if ((props === null || props === void 0 || (_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === _reactRouterDom.Link) {
|
|
95
80
|
return _react.default.createElement(_react.Fragment, null, renderReactLinkElements(_react.default.Children.toArray(props.children)));
|
|
96
81
|
} else {
|
|
97
82
|
return _react.default.createElement("button", _extends({}, buttonProps, {
|
|
98
|
-
className: className
|
|
99
|
-
style: themeStyle
|
|
83
|
+
className: className
|
|
100
84
|
}), props.content || props.children);
|
|
101
85
|
}
|
|
102
86
|
};
|
|
103
87
|
Button.propTypes = {
|
|
104
88
|
content: _propTypes.default.string,
|
|
105
|
-
color: _propTypes.default.oneOf(["
|
|
89
|
+
color: _propTypes.default.oneOf(["primary", "secondary"]),
|
|
106
90
|
size: _propTypes.default.oneOf(["small", "regular"]),
|
|
107
91
|
arrow: _propTypes.default.oneOf(["none", "left", "right"]),
|
|
108
|
-
theme: _propTypes.default.object,
|
|
109
92
|
disabled: _propTypes.default.bool,
|
|
110
93
|
inputType: _propTypes.default.oneOf(["button", "radio"]),
|
|
111
94
|
name: _propTypes.default.string,
|
|
@@ -120,7 +103,7 @@ Button.propTypes = {
|
|
|
120
103
|
noMargin: _propTypes.default.bool
|
|
121
104
|
};
|
|
122
105
|
Button.defaultProps = {
|
|
123
|
-
color: "
|
|
106
|
+
color: "primary",
|
|
124
107
|
size: "regular",
|
|
125
108
|
disabled: false,
|
|
126
109
|
hasErrors: false,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
font-family: $default-font;
|
|
40
40
|
border-style: solid;
|
|
41
41
|
border-width: 1px;
|
|
42
|
-
border-color: $color-primary;
|
|
42
|
+
border-color: var(--color-primary, $color-primary);
|
|
43
43
|
cursor: pointer;
|
|
44
44
|
line-height: 1;
|
|
45
45
|
position: relative;
|
|
@@ -57,25 +57,13 @@
|
|
|
57
57
|
margin-bottom: 8px;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
&.hasTheme {
|
|
61
|
-
&:hover,
|
|
62
|
-
&:focus,
|
|
63
|
-
&:focus-within {
|
|
64
|
-
filter: brightness(90%);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&:active {
|
|
68
|
-
filter: brightness(85%);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
60
|
&:focus {
|
|
73
61
|
outline-offset: 3px;
|
|
74
62
|
}
|
|
75
63
|
|
|
76
64
|
&:focus-visible,
|
|
77
65
|
&:focus-within {
|
|
78
|
-
outline-color: $color-primary;
|
|
66
|
+
outline-color: var(--color-primary, $color-primary);
|
|
79
67
|
}
|
|
80
68
|
|
|
81
69
|
&.regular {
|
|
@@ -92,103 +80,88 @@
|
|
|
92
80
|
}
|
|
93
81
|
}
|
|
94
82
|
|
|
95
|
-
&.
|
|
96
|
-
background-color:
|
|
97
|
-
color: $color-primary-
|
|
98
|
-
|
|
99
|
-
&:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
border-color: $color-secondary-light;
|
|
107
|
-
}
|
|
83
|
+
&.primary {
|
|
84
|
+
background-color: var(--color-primary, $color-primary);
|
|
85
|
+
color: var(--color-primary-contrast, $color-primary-contrast);
|
|
86
|
+
&:hover:not(.noHover),
|
|
87
|
+
&:focus-visible {
|
|
88
|
+
background-color: var(--color-primary-light, $color-primary-light);
|
|
89
|
+
border-color: var(--color-primary-light, $color-primary-light);
|
|
90
|
+
color: var(--color-primary-contrast, $color-primary-contrast);
|
|
91
|
+
&:after,
|
|
92
|
+
&:before {
|
|
93
|
+
border-color: var(--color-primary-light, $color-primary-light);
|
|
108
94
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
95
|
+
}
|
|
96
|
+
&:active:not(.noHover),
|
|
97
|
+
&:active:hover:not(.noHover) {
|
|
98
|
+
background-color: var(--color-primary-x-light, $color-primary-x-light);
|
|
99
|
+
border-color: var(--color-primary-x-light, $color-primary-x-light);
|
|
100
|
+
color: var(--color-primary-contrast, $color-primary-contrast);
|
|
101
|
+
&:after,
|
|
102
|
+
&:before {
|
|
103
|
+
border-color: var(--color-primary-x-light, $color-primary-x-light);
|
|
117
104
|
}
|
|
118
105
|
}
|
|
119
106
|
}
|
|
120
107
|
|
|
121
|
-
&.
|
|
122
|
-
background-color: $color-
|
|
123
|
-
color:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
border-color: $color-primary-light;
|
|
133
|
-
}
|
|
108
|
+
&.secondary {
|
|
109
|
+
background-color: var(--color-secondary, $color-secondary);
|
|
110
|
+
color: var(--color-secondary-contrast, $color-secondary-contrast);
|
|
111
|
+
border-color: var(--color-secondary-x-light, $color-secondary-x-light);
|
|
112
|
+
&:hover:not(.noHover),
|
|
113
|
+
&:focus-visible {
|
|
114
|
+
background-color: var(--color-secondary-x-light, $color-secondary-x-light);
|
|
115
|
+
color: var(--color-secondary-contrast, $color-secondary-contrast);
|
|
116
|
+
&:after,
|
|
117
|
+
&:before {
|
|
118
|
+
border-color: var(--color-secondary-x-light, $color-secondary-x-light);
|
|
134
119
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
120
|
+
}
|
|
121
|
+
&:active:not(.noHover),
|
|
122
|
+
&:active:hover:not(.noHover) {
|
|
123
|
+
background-color: var(--color-secondary-light, $color-secondary-light);
|
|
124
|
+
color: var(--color-secondary-contrast, $color-secondary-contrast);
|
|
125
|
+
&:after,
|
|
126
|
+
&:before {
|
|
127
|
+
border-color: var(--color-secondary-light, $color-secondary-light);
|
|
144
128
|
}
|
|
145
129
|
}
|
|
146
130
|
}
|
|
147
131
|
|
|
148
132
|
&:disabled,
|
|
149
133
|
&.disabled {
|
|
150
|
-
&.
|
|
151
|
-
|
|
134
|
+
&.primary,
|
|
135
|
+
&.secondary {
|
|
136
|
+
background-color: var(--color-primary, $color-primary);
|
|
152
137
|
cursor: default;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
&.default,
|
|
163
|
-
&.primary {
|
|
164
|
-
background-color: $color-secondary-light;
|
|
138
|
+
color: var(--color-primary-contrast, $color-primary-contrast);
|
|
139
|
+
border: 1px solid var(--color-primary, $color-primary);
|
|
140
|
+
opacity: 0.2;
|
|
141
|
+
filter: saturate(3);
|
|
142
|
+
&:hover:not(.noHover),
|
|
143
|
+
&:focus-visible,
|
|
144
|
+
&:active:not(.noHover),
|
|
145
|
+
&:active:hover:not(.noHover) {
|
|
146
|
+
background-color: var(--color-primary, $color-primary);
|
|
165
147
|
cursor: default;
|
|
166
|
-
color:
|
|
167
|
-
border: 1px solid $color-
|
|
168
|
-
&:hover:not(.noHover),
|
|
169
|
-
&:focus-visible,
|
|
170
|
-
&:active:not(.noHover),
|
|
171
|
-
&:active:hover:not(.noHover) {
|
|
172
|
-
background-color: $color-secondary-light;
|
|
173
|
-
cursor: default;
|
|
174
|
-
color: #fff;
|
|
175
|
-
border: 1px solid $color-secondary-light;
|
|
176
|
-
&:before,
|
|
177
|
-
&:after {
|
|
178
|
-
border-color: $color-secondary-light;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
148
|
+
color: var(--color-primary-contrast, $color-primary-contrast);
|
|
149
|
+
border: 1px solid var(--color-primary, $color-primary);
|
|
181
150
|
&:before,
|
|
182
151
|
&:after {
|
|
183
|
-
border-color: $color-
|
|
152
|
+
border-color: var(--color-primary-contrast, $color-primary-contrast);
|
|
184
153
|
}
|
|
185
154
|
}
|
|
155
|
+
&:before,
|
|
156
|
+
&:after {
|
|
157
|
+
border-color: var(--color-secondary-light, $color-secondary-light);
|
|
158
|
+
}
|
|
186
159
|
}
|
|
187
160
|
}
|
|
188
161
|
|
|
189
162
|
&.hasErrors {
|
|
190
|
-
@include box-shadow(0 0 2px 1px $color-error);
|
|
191
|
-
border-color: $color-error;
|
|
163
|
+
@include box-shadow(0 0 2px 1px var(--color-error, $color-error));
|
|
164
|
+
border-color: var(--color-error, $color-error);
|
|
192
165
|
}
|
|
193
166
|
|
|
194
167
|
&.rounded {
|
|
@@ -211,6 +184,16 @@
|
|
|
211
184
|
left: 1em;
|
|
212
185
|
}
|
|
213
186
|
}
|
|
187
|
+
&.primary {
|
|
188
|
+
&:before {
|
|
189
|
+
border-color: var(--color-primary-contrast, $color-primary-contrast);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
&.secondary {
|
|
193
|
+
&:before {
|
|
194
|
+
border-color: var(--color-secondary-contrast, $color-secondary-contrast);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
214
197
|
|
|
215
198
|
&:hover:not(.noHover),
|
|
216
199
|
&:focus-visible,
|
|
@@ -219,14 +202,14 @@
|
|
|
219
202
|
&:before {
|
|
220
203
|
@include animation(pushprev 0.8s linear infinite);
|
|
221
204
|
}
|
|
222
|
-
&.
|
|
205
|
+
&.primary {
|
|
223
206
|
&:before {
|
|
224
|
-
border-color: $color-primary;
|
|
207
|
+
border-color: var(--color-primary-contrast, $color-primary-contrast);
|
|
225
208
|
}
|
|
226
209
|
}
|
|
227
|
-
&.
|
|
210
|
+
&.secondary {
|
|
228
211
|
&:before {
|
|
229
|
-
border-color:
|
|
212
|
+
border-color: var(--color-secondary-contrast, $color-secondary-contrast);
|
|
230
213
|
}
|
|
231
214
|
}
|
|
232
215
|
}
|
|
@@ -241,7 +224,7 @@
|
|
|
241
224
|
width: 0.5rem;
|
|
242
225
|
height: 0.5rem;
|
|
243
226
|
vertical-align: middle;
|
|
244
|
-
border:
|
|
227
|
+
border-style: solid;
|
|
245
228
|
border-width: 2px 2px 0 0;
|
|
246
229
|
margin-left: 1em;
|
|
247
230
|
@media only screen and (min-width: $screen-sm) {
|
|
@@ -249,6 +232,17 @@
|
|
|
249
232
|
}
|
|
250
233
|
}
|
|
251
234
|
|
|
235
|
+
&.primary {
|
|
236
|
+
&:after {
|
|
237
|
+
border-color: var(--color-primary-contrast, $color-primary-contrast);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
&.secondary {
|
|
241
|
+
&:after {
|
|
242
|
+
border-color: var(--color-secondary-contrast, $color-secondary-contrast);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
252
246
|
&:hover:not(.noHover),
|
|
253
247
|
&:focus-visible,
|
|
254
248
|
&:active:not(.noHover),
|
|
@@ -256,14 +250,14 @@
|
|
|
256
250
|
&:after {
|
|
257
251
|
@include animation(pushnext 0.8s linear infinite);
|
|
258
252
|
}
|
|
259
|
-
&.
|
|
253
|
+
&.primary {
|
|
260
254
|
&:after {
|
|
261
|
-
border-color: $color-primary;
|
|
255
|
+
border-color: var(--color-primary-contrast, $color-primary-contrast);
|
|
262
256
|
}
|
|
263
257
|
}
|
|
264
|
-
&.
|
|
258
|
+
&.secondary {
|
|
265
259
|
&:after {
|
|
266
|
-
border-color:
|
|
260
|
+
border-color: var(--color-secondary-contrast, $color-secondary-contrast);
|
|
267
261
|
}
|
|
268
262
|
}
|
|
269
263
|
}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _theme = require("../functions/theme");
|
|
10
9
|
var _CheckBoxIconModule = _interopRequireDefault(require("./CheckBoxIcon.module.scss"));
|
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
11
|
const CheckBoxIcon = props => {
|
|
@@ -15,13 +14,6 @@ const CheckBoxIcon = props => {
|
|
|
15
14
|
width: props.size,
|
|
16
15
|
fontSize: props.size
|
|
17
16
|
};
|
|
18
|
-
if (props.theme && props.checked) {
|
|
19
|
-
inlineStyle = {
|
|
20
|
-
...inlineStyle,
|
|
21
|
-
[!props.hasErrors && "color"]: (0, _theme.getThemePaletteBackgroundColor)(props.theme, "primary"),
|
|
22
|
-
[!props.hasErrors && props.showBox && "boxShadow"]: "0 0 0 1px ".concat((0, _theme.getThemePaletteBackgroundColor)(props.theme, "primary"))
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
17
|
const checkBoxIconProps = {
|
|
26
18
|
className: "".concat(_CheckBoxIconModule.default.checkBoxIcon, " ").concat(props.checked ? _CheckBoxIconModule.default.checked : "", " ").concat(props.disabled ? _CheckBoxIconModule.default.disabled : "", " ").concat(props.showBox ? _CheckBoxIconModule.default.showBox : "", " ").concat(props.hasErrors ? _CheckBoxIconModule.default.hasErrors : ""),
|
|
27
19
|
style: inlineStyle
|
|
@@ -36,7 +28,6 @@ CheckBoxIcon.propTypes = {
|
|
|
36
28
|
checked: _propTypes.default.bool,
|
|
37
29
|
disabled: _propTypes.default.bool,
|
|
38
30
|
showBox: _propTypes.default.bool,
|
|
39
|
-
theme: _propTypes.default.object,
|
|
40
31
|
hasErrors: _propTypes.default.bool,
|
|
41
32
|
checkmarkCharacter: _propTypes.default.string
|
|
42
33
|
};
|
|
@@ -20,26 +20,26 @@
|
|
|
20
20
|
margin-top: 2px;
|
|
21
21
|
background: white;
|
|
22
22
|
&:not(.hasErrors) {
|
|
23
|
-
@include box-shadow(0 0 0 1px $color-primary);
|
|
23
|
+
@include box-shadow(0 0 0 1px var(--color-primary, $color-primary));
|
|
24
24
|
}
|
|
25
25
|
&.hasErrors {
|
|
26
|
-
@include box-shadow(0 0 0 1px $color-error);
|
|
26
|
+
@include box-shadow(0 0 0 1px var(--color-error, $color-error));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
&.checked {
|
|
31
|
-
color: $color-primary;
|
|
31
|
+
color: var(--color-primary, $color-primary);
|
|
32
32
|
&.hasErrors {
|
|
33
33
|
span {
|
|
34
|
-
color: $color-error;
|
|
34
|
+
color: var(--color-error, $color-error);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
&.showBox {
|
|
38
38
|
&:not(.hasErrors) {
|
|
39
|
-
@include box-shadow(0 0 0 1px $color-primary);
|
|
39
|
+
@include box-shadow(0 0 0 1px var(--color-primary, $color-primary));
|
|
40
40
|
}
|
|
41
41
|
&.hasErrors {
|
|
42
|
-
@include box-shadow(0 0 0 1px $color-error);
|
|
42
|
+
@include box-shadow(0 0 0 1px var(--color-error, $color-error));
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -18,7 +18,6 @@ const CheckBoxInput = props => {
|
|
|
18
18
|
const iconProps = {
|
|
19
19
|
checked: props.checked,
|
|
20
20
|
disabled: props.disabled,
|
|
21
|
-
theme: props.theme,
|
|
22
21
|
showBox: !props.contentOnly,
|
|
23
22
|
hasErrors: props.contentOnly && props.hasErrors,
|
|
24
23
|
checkmarkCharacter: props.checkmarkCharacter
|
|
@@ -54,7 +53,6 @@ CheckBoxInput.propTypes = {
|
|
|
54
53
|
onChange: _propTypes.default.func.isRequired,
|
|
55
54
|
contentOnly: _propTypes.default.bool,
|
|
56
55
|
hasErrors: _propTypes.default.bool,
|
|
57
|
-
theme: _propTypes.default.object,
|
|
58
56
|
checkmarkCharacter: _propTypes.default.string,
|
|
59
57
|
"aria-controls": _propTypes.default.string,
|
|
60
58
|
"aria-describedby": _propTypes.default.string
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
.labelText {
|
|
24
24
|
font-size: 16px;
|
|
25
25
|
line-height: 24px;
|
|
26
|
-
color: $color-primary;
|
|
26
|
+
color: var(--color-primary, $color-primary);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&.disabled {
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
|
|
35
35
|
&.hasErrors {
|
|
36
36
|
span {
|
|
37
|
-
color: $color-error;
|
|
37
|
+
color: var(--color-error, $color-error);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
&:focus-within {
|
|
42
42
|
outline-width: 2px;
|
|
43
|
-
outline-color: $color-primary;
|
|
43
|
+
outline-color: var(--color-primary, $color-primary);
|
|
44
44
|
outline-style: auto;
|
|
45
45
|
outline-offset: 1px;
|
|
46
46
|
}
|
|
@@ -11,7 +11,7 @@ var _helpers = require("../functions/helpers");
|
|
|
11
11
|
var _CheckBoxListItemModule = _interopRequireDefault(require("./CheckBoxListItem.module.scss"));
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
const CheckBoxListItem = props => {
|
|
14
|
-
const listItemClassNameArray = [_CheckBoxListItemModule.default.checkBoxListItem, props.checked ? _CheckBoxListItemModule.default.checked : null, props.disabled ? _CheckBoxListItemModule.default.disabled : null, props.compact ? _CheckBoxListItemModule.default.compact : null, props.contentOnly ? _CheckBoxListItemModule.default.contentOnly : null, props.hasErrors ? _CheckBoxListItemModule.default.hasErrors : null
|
|
14
|
+
const listItemClassNameArray = [_CheckBoxListItemModule.default.checkBoxListItem, props.checked ? _CheckBoxListItemModule.default.checked : null, props.disabled ? _CheckBoxListItemModule.default.disabled : null, props.compact ? _CheckBoxListItemModule.default.compact : null, props.contentOnly ? _CheckBoxListItemModule.default.contentOnly : null, props.hasErrors ? _CheckBoxListItemModule.default.hasErrors : null];
|
|
15
15
|
const listItemClassNameString = (0, _helpers.classNameArrayToClassNameString)(listItemClassNameArray);
|
|
16
16
|
const inputProps = {
|
|
17
17
|
onChange: props.onChange,
|
|
@@ -25,7 +25,6 @@ const CheckBoxListItem = props => {
|
|
|
25
25
|
"aria-describedby": props["aria-describedby"],
|
|
26
26
|
id: props.id,
|
|
27
27
|
name: props.name,
|
|
28
|
-
theme: props.theme,
|
|
29
28
|
checkmarkCharacter: props.checkmarkCharacter
|
|
30
29
|
};
|
|
31
30
|
return _react.default.createElement("div", {
|
|
@@ -41,7 +40,6 @@ CheckBoxListItem.propTypes = {
|
|
|
41
40
|
name: _propTypes.default.string,
|
|
42
41
|
onChange: _propTypes.default.func.isRequired,
|
|
43
42
|
contentOnly: _propTypes.default.bool,
|
|
44
|
-
theme: _propTypes.default.object,
|
|
45
43
|
compact: _propTypes.default.bool,
|
|
46
44
|
hasErrors: _propTypes.default.bool,
|
|
47
45
|
checkmarkCharacter: _propTypes.default.string,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
color: #000;
|
|
21
21
|
|
|
22
22
|
&:not(.contentOnly):not(.compact) {
|
|
23
|
-
border: 1px solid $color-secondary-light;
|
|
23
|
+
border: 1px solid var(--color-secondary-light, $color-secondary-light);
|
|
24
24
|
background: white;
|
|
25
25
|
margin-bottom: 8px;
|
|
26
26
|
label {
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
&.checked:not(.contentOnly):not(.compact):not(.disabled):not(.hasTheme) {
|
|
46
|
-
background-color: $color-secondary-light;
|
|
46
|
+
background-color: var(--color-secondary-light, $color-secondary-light);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&:not(.checked):not(.contentOnly):not(.compact):not(.disabled):not(.hasTheme) {
|
|
50
50
|
&:hover {
|
|
51
|
-
background-color: $color-secondary-x-light;
|
|
51
|
+
background-color: var(--color-secondary-x-light, $color-secondary-x-light);
|
|
52
52
|
}
|
|
53
53
|
&:focus-within {
|
|
54
|
-
background-color: $color-secondary-x-light;
|
|
54
|
+
background-color: var(--color-secondary-x-light, $color-secondary-x-light);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
width: 100%;
|
|
8
8
|
display: block;
|
|
9
9
|
&.link {
|
|
10
|
-
color: $color-primary;
|
|
10
|
+
color: var(--color-primary, $color-primary);
|
|
11
11
|
@include transition(filter 0.3s);
|
|
12
12
|
&:hover,
|
|
13
13
|
&:focus {
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
&.default {
|
|
21
|
-
background-color: $color-default-background;
|
|
21
|
+
background-color: var(--color-default-background, $color-default-background);
|
|
22
22
|
.content,
|
|
23
23
|
.title {
|
|
24
24
|
color: $color-default-text;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
&.secondary {
|
|
28
|
-
background-color: $color-secondary-background;
|
|
29
|
-
color: $color-default-text;
|
|
28
|
+
background-color: var(--color-secondary-background, $color-secondary-background);
|
|
29
|
+
color: var(--color-default-text, $color-default-text);
|
|
30
30
|
.content,
|
|
31
31
|
.title {
|
|
32
|
-
color: $color-default-text;
|
|
32
|
+
color: var(--color-default-text, $color-default-text);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
font-style: normal;
|
|
42
42
|
line-height: 1.4;
|
|
43
43
|
padding-bottom: 10px;
|
|
44
|
-
border-bottom: 1px solid
|
|
44
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.075);
|
|
45
45
|
}
|
|
46
46
|
&.large {
|
|
47
47
|
font-family: $default-font;
|