dibk-design 0.4.41 → 0.4.44

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.
Files changed (100) hide show
  1. package/LICENSE +674 -674
  2. package/README.md +3 -3
  3. package/dist/components/Accordion.md +15 -15
  4. package/dist/components/Accordion.module.scss +205 -181
  5. package/dist/components/Button.md +75 -75
  6. package/dist/components/Button.module.scss +232 -216
  7. package/dist/components/CheckBoxIcon.js +109 -103
  8. package/dist/components/CheckBoxIcon.md +38 -38
  9. package/dist/components/CheckBoxIcon.module.scss +62 -62
  10. package/dist/components/CheckBoxInput.js +104 -101
  11. package/dist/components/CheckBoxInput.md +58 -51
  12. package/dist/components/CheckBoxInput.module.scss +24 -24
  13. package/dist/components/CheckBoxListItem.md +82 -82
  14. package/dist/components/CheckBoxListItem.module.scss +71 -71
  15. package/dist/components/ContentBox.md +46 -46
  16. package/dist/components/ContentBox.module.scss +116 -116
  17. package/dist/components/Dialog.md +5 -5
  18. package/dist/components/Dialog.module.scss +78 -71
  19. package/dist/components/DragAndDropFileInput.md +13 -13
  20. package/dist/components/DragAndDropFileInput.module.scss +45 -45
  21. package/dist/components/Footer.md +7 -7
  22. package/dist/components/Footer.module.scss +11 -11
  23. package/dist/components/Header.md +11 -11
  24. package/dist/components/Header.module.scss +64 -51
  25. package/dist/components/InputField.md +41 -41
  26. package/dist/components/InputField.module.scss +95 -83
  27. package/dist/components/Label.md +9 -9
  28. package/dist/components/Label.module.scss +16 -16
  29. package/dist/components/List.md +10 -10
  30. package/dist/components/List.module.scss +18 -18
  31. package/dist/components/LoadingAnimation.md +5 -5
  32. package/dist/components/LoadingAnimation.module.scss +26 -26
  33. package/dist/components/NavigationBar.md +42 -42
  34. package/dist/components/NavigationBar.module.scss +176 -176
  35. package/dist/components/NavigationBarListItem.md +15 -15
  36. package/dist/components/Paper.md +9 -9
  37. package/dist/components/Paper.module.scss +18 -17
  38. package/dist/components/RadioButtonIcon.md +41 -41
  39. package/dist/components/RadioButtonIcon.module.scss +44 -44
  40. package/dist/components/RadioButtonInput.md +30 -30
  41. package/dist/components/RadioButtonInput.module.scss +26 -26
  42. package/dist/components/RadioButtonListItem.md +70 -70
  43. package/dist/components/RadioButtonListItem.module.scss +71 -71
  44. package/dist/components/Select.md +28 -28
  45. package/dist/components/Select.module.scss +100 -101
  46. package/dist/components/Textarea.md +27 -27
  47. package/dist/components/Textarea.module.scss +72 -64
  48. package/dist/components/Theme.md +12 -12
  49. package/dist/components/Theme.module.scss +76 -76
  50. package/dist/components/WizardNavigation/Step.module.scss +75 -75
  51. package/dist/components/WizardNavigation.md +84 -84
  52. package/dist/components/WizardNavigation.module.scss +3 -3
  53. package/dist/fonts/Altis-Light.svg +326 -326
  54. package/dist/fonts/open-sans-v27-latin-ext_latin-300.svg +346 -346
  55. package/dist/fonts/open-sans-v27-latin-ext_latin-300italic.svg +377 -377
  56. package/dist/fonts/open-sans-v27-latin-ext_latin-700.svg +349 -349
  57. package/dist/fonts/open-sans-v27-latin-ext_latin-700italic.svg +379 -379
  58. package/dist/fonts/open-sans-v27-latin-ext_latin-italic.svg +379 -379
  59. package/dist/fonts/open-sans-v27-latin-ext_latin-regular.svg +349 -349
  60. package/dist/images/dibk-logo-mobile.svg +91 -91
  61. package/dist/images/dibk-logo.svg +991 -991
  62. package/dist/images/spinner.svg +56 -56
  63. package/dist/style/abstracts/_all.scss +1 -1
  64. package/dist/style/abstracts/mixins/_all.scss +12 -12
  65. package/dist/style/abstracts/mixins/_animation.scss +6 -6
  66. package/dist/style/abstracts/mixins/_appearance.scss +5 -5
  67. package/dist/style/abstracts/mixins/_border-radius.scss +31 -31
  68. package/dist/style/abstracts/mixins/_box-shadow.scss +5 -5
  69. package/dist/style/abstracts/mixins/_box-sizing.scss +5 -5
  70. package/dist/style/abstracts/mixins/_calc.scss +5 -5
  71. package/dist/style/abstracts/mixins/_keyframes.scss +14 -14
  72. package/dist/style/abstracts/mixins/_opacity.scss +5 -5
  73. package/dist/style/abstracts/mixins/_placeholder.scss +17 -17
  74. package/dist/style/abstracts/mixins/_scrollbar.scss +26 -26
  75. package/dist/style/abstracts/mixins/_transform.scss +6 -6
  76. package/dist/style/abstracts/mixins/_transition.scss +34 -34
  77. package/dist/style/abstracts/variables/_all.scss +2 -2
  78. package/dist/style/abstracts/variables/_colors.scss +29 -29
  79. package/dist/style/abstracts/variables/_typography.scss +1 -1
  80. package/dist/style/abstracts/variables/_viewports.scss +14 -11
  81. package/dist/style/base/_all.scss +1 -1
  82. package/dist/style/base/_reset.scss +15 -15
  83. package/dist/style/base/_typography.scss +6 -6
  84. package/dist/style/base/fonts.css +95 -95
  85. package/dist/style/global.scss +3 -3
  86. package/dist/style/layout/_containers.scss +9 -9
  87. package/package.json +43 -42
  88. package/dist/fonts_old/Altis-Light.eot +0 -0
  89. package/dist/fonts_old/Altis-Light.svg +0 -326
  90. package/dist/fonts_old/Altis-Light.ttf +0 -0
  91. package/dist/fonts_old/Altis-Light.woff +0 -0
  92. package/dist/fonts_old/Altis.eot +0 -0
  93. package/dist/fonts_old/Altis.svg +0 -327
  94. package/dist/fonts_old/Altis.ttf +0 -0
  95. package/dist/fonts_old/OpenSans-300.woff2 +0 -0
  96. package/dist/fonts_old/OpenSans-400.ttf +0 -0
  97. package/dist/fonts_old/OpenSans-400.woff +0 -0
  98. package/dist/fonts_old/OpenSans-400.woff2 +0 -0
  99. package/dist/fonts_old/OpenSans-400ekte.woff +0 -0
  100. package/dist/fonts_old/OpenSans-700.woff2 +0 -0
@@ -1,26 +1,26 @@
1
- @import "../style/global.scss";
2
-
3
- :local(.radioButtonInput) {
4
- display: flex;
5
- cursor: pointer;
6
- margin-right: 1em;
7
-
8
- &:not(:local(.contentOnly)):not(:local(.disabled)) {
9
- cursor: pointer;
10
- input {
11
- cursor: pointer;
12
- }
13
- }
14
-
15
-
16
- &:local(.hasErrors) {
17
- span {
18
- color: #9d2024;
19
- }
20
- }
21
-
22
- input[type="radio"] {
23
- opacity: 0;
24
- position: absolute;
25
- }
26
- }
1
+ @import "../style/global.scss";
2
+
3
+ :local(.radioButtonInput) {
4
+ display: flex;
5
+ cursor: pointer;
6
+ margin-right: 1em;
7
+
8
+ &:not(:local(.contentOnly)):not(:local(.disabled)) {
9
+ cursor: pointer;
10
+ input {
11
+ cursor: pointer;
12
+ }
13
+ }
14
+
15
+
16
+ &:local(.hasErrors) {
17
+ span {
18
+ color: #9d2024;
19
+ }
20
+ }
21
+
22
+ input[type="radio"] {
23
+ opacity: 0;
24
+ position: absolute;
25
+ }
26
+ }
@@ -1,70 +1,70 @@
1
- Radio button list item example:
2
-
3
- ```js
4
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item" id="radio-button-list-item-1" checked={true}>
5
- Checked radio button
6
- </RadioButtonListItem>
7
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item" id="radio-button-list-item-2">
8
- Unchecked radio button
9
- </RadioButtonListItem>
10
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item" id="radio-button-list-item-3" checked={true} disabled={true}>
11
- Disabled checked radio button
12
- </RadioButtonListItem>
13
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item" id="radio-button-list-item-4" disabled={true}>
14
- Disabled Unchecked radio button
15
- </RadioButtonListItem>
16
- ```
17
-
18
- Radio button with errors list item example:
19
-
20
- ```js
21
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-1" checked={true} hasErrors={true}>
22
- Checked radio button with errors
23
- </RadioButtonListItem>
24
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-2" hasErrors={true}>
25
- Unchecked radio button with errors
26
- </RadioButtonListItem>
27
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-3" checked={true} disabled={true} hasErrors={true}>
28
- Disabled checked radio button with errors
29
- </RadioButtonListItem>
30
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-4" disabled={true} hasErrors={true}>
31
- Disabled Unchecked radio button with errors
32
- </RadioButtonListItem>
33
- ```
34
-
35
- Compact radio button list item example:
36
-
37
- ```js
38
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="compact-radio-button-list-item" id="compact-radio-button-list-item-1" checked={true} compact>
39
- Checked radio button
40
- </RadioButtonListItem>
41
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="compact-radio-button-list-item" id="compact-radio-button-list-item-2" compact>
42
- Unchecked radio button
43
- </RadioButtonListItem>
44
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="compact-radio-button-list-item" id="compact-radio-button-list-item-3" checked={true} compact disabled={true}>
45
- Disabled checked radio button
46
- </RadioButtonListItem>
47
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="compact-radio-button-list-item" id="compact-radio-button-list-item-4" compact disabled={true}>
48
- Disabled unchecked radio button
49
- </RadioButtonListItem>
50
- ```
51
-
52
- Themed Radio button list item example:
53
-
54
- ```js
55
- import customTheme from 'data/customTheme';
56
- <React.Fragment>
57
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="themed-radio-button-list-item-" id="themed-radio-button-list-item-1" checked={true} theme={customTheme}>
58
- Checked radio button
59
- </RadioButtonListItem>
60
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="themed-radio-button-list-item" id="themed-radio-button-list-item-2" theme={customTheme}>
61
- Unchecked radio button
62
- </RadioButtonListItem>
63
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="themed-radio-button-list-item-" id="themed-radio-button-list-item-3" checked={true} theme={customTheme} disabled={true}>
64
- Disabled checked radio button
65
- </RadioButtonListItem>
66
- <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="themed-radio-button-list-item" id="themed-radio-button-list-item-4" theme={customTheme} disabled={true}>
67
- Disabled unchecked radio button
68
- </RadioButtonListItem>
69
- </React.Fragment>
70
- ```
1
+ Radio button list item example:
2
+
3
+ ```js
4
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item" id="radio-button-list-item-1" checked={true}>
5
+ Checked radio button
6
+ </RadioButtonListItem>
7
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item" id="radio-button-list-item-2">
8
+ Unchecked radio button
9
+ </RadioButtonListItem>
10
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item" id="radio-button-list-item-3" checked={true} disabled={true}>
11
+ Disabled checked radio button
12
+ </RadioButtonListItem>
13
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item" id="radio-button-list-item-4" disabled={true}>
14
+ Disabled Unchecked radio button
15
+ </RadioButtonListItem>
16
+ ```
17
+
18
+ Radio button with errors list item example:
19
+
20
+ ```js
21
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-1" checked={true} hasErrors={true}>
22
+ Checked radio button with errors
23
+ </RadioButtonListItem>
24
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-2" hasErrors={true}>
25
+ Unchecked radio button with errors
26
+ </RadioButtonListItem>
27
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-3" checked={true} disabled={true} hasErrors={true}>
28
+ Disabled checked radio button with errors
29
+ </RadioButtonListItem>
30
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="radio-button-list-item-with-errors" id="radio-button-list-item-with-errors-4" disabled={true} hasErrors={true}>
31
+ Disabled Unchecked radio button with errors
32
+ </RadioButtonListItem>
33
+ ```
34
+
35
+ Compact radio button list item example:
36
+
37
+ ```js
38
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="compact-radio-button-list-item" id="compact-radio-button-list-item-1" checked={true} compact>
39
+ Checked radio button
40
+ </RadioButtonListItem>
41
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="compact-radio-button-list-item" id="compact-radio-button-list-item-2" compact>
42
+ Unchecked radio button
43
+ </RadioButtonListItem>
44
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="compact-radio-button-list-item" id="compact-radio-button-list-item-3" checked={true} compact disabled={true}>
45
+ Disabled checked radio button
46
+ </RadioButtonListItem>
47
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="compact-radio-button-list-item" id="compact-radio-button-list-item-4" compact disabled={true}>
48
+ Disabled unchecked radio button
49
+ </RadioButtonListItem>
50
+ ```
51
+
52
+ Themed Radio button list item example:
53
+
54
+ ```js
55
+ import customTheme from 'data/customTheme';
56
+ <React.Fragment>
57
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="themed-radio-button-list-item-" id="themed-radio-button-list-item-1" checked={true} theme={customTheme}>
58
+ Checked radio button
59
+ </RadioButtonListItem>
60
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="themed-radio-button-list-item" id="themed-radio-button-list-item-2" theme={customTheme}>
61
+ Unchecked radio button
62
+ </RadioButtonListItem>
63
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 1" name="themed-radio-button-list-item-" id="themed-radio-button-list-item-3" checked={true} theme={customTheme} disabled={true}>
64
+ Disabled checked radio button
65
+ </RadioButtonListItem>
66
+ <RadioButtonListItem onChange={()=>{console.log('onchange')}} inputValue="value 2" name="themed-radio-button-list-item" id="themed-radio-button-list-item-4" theme={customTheme} disabled={true}>
67
+ Disabled unchecked radio button
68
+ </RadioButtonListItem>
69
+ </React.Fragment>
70
+ ```
@@ -1,71 +1,71 @@
1
- @import "../style/global.scss";
2
-
3
- :local(.radioButtonListItem) {
4
- @include box-sizing(content-box);
5
- @include border-radius(5px);
6
- @include transition(all 0.1s ease-in-out);
7
- display: -webkit-box;
8
- display: -webkit-flex;
9
- display: -ms-flexbox;
10
- display: flex;
11
- -webkit-align-items: flex-start;
12
- -webkit-box-align: flex-start;
13
- -ms-flex-align: flex-start;
14
- align-items: flex-start;
15
- cursor: pointer;
16
- font-family: $default-font;
17
- position: relative;
18
- font-size: 17px;
19
- color: #000;
20
-
21
- &:not(:local(.contentOnly)):not(:local(.compact)) {
22
- @include box-shadow(0 0 2px $color-dark-blue);
23
- background: white;
24
- margin-bottom: 10px;
25
- }
26
-
27
- &:local(.contentOnly) {
28
- cursor: auto;
29
- label {
30
- cursor: auto;
31
- padding: 5px 10px;
32
- }
33
- }
34
-
35
- &:local(.disabled) {
36
- label {
37
- cursor: auto;
38
- }
39
- }
40
-
41
- &:local(.checked):not(:local(.contentOnly)):not(:local(.compact)):not(:local(.disabled)) {
42
- @include box-shadow(0 0 0 1px $color-dark-blue, 0 0 4px 0 $color-dark-blue);
43
- }
44
-
45
- &:not(:local(.checked)):not(:local(.contentOnly)):not(:local(.compact)):not(:local(.disabled)):hover {
46
- @include box-shadow(0 0 6px $color-dark-blue);
47
- }
48
-
49
- &:focus {
50
- outline-color: #54acb8;
51
- }
52
-
53
- label {
54
- width: 100%;
55
- padding: 10px;
56
- margin: 0;
57
- cursor: pointer;
58
- }
59
-
60
- &:local(.compact) {
61
- display: table;
62
- label {
63
- padding: 6px 4px;
64
- }
65
- }
66
-
67
- input[type="radio"] {
68
- opacity: 0;
69
- position: absolute;
70
- }
71
- }
1
+ @import "../style/global.scss";
2
+
3
+ :local(.radioButtonListItem) {
4
+ @include box-sizing(content-box);
5
+ @include border-radius(5px);
6
+ @include transition(all 0.1s ease-in-out);
7
+ display: -webkit-box;
8
+ display: -webkit-flex;
9
+ display: -ms-flexbox;
10
+ display: flex;
11
+ -webkit-align-items: flex-start;
12
+ -webkit-box-align: flex-start;
13
+ -ms-flex-align: flex-start;
14
+ align-items: flex-start;
15
+ cursor: pointer;
16
+ font-family: $default-font;
17
+ position: relative;
18
+ font-size: 17px;
19
+ color: #000;
20
+
21
+ &:not(:local(.contentOnly)):not(:local(.compact)) {
22
+ @include box-shadow(0 0 2px $color-dark-blue);
23
+ background: white;
24
+ margin-bottom: 10px;
25
+ }
26
+
27
+ &:local(.contentOnly) {
28
+ cursor: auto;
29
+ label {
30
+ cursor: auto;
31
+ padding: 5px 10px;
32
+ }
33
+ }
34
+
35
+ &:local(.disabled) {
36
+ label {
37
+ cursor: auto;
38
+ }
39
+ }
40
+
41
+ &:local(.checked):not(:local(.contentOnly)):not(:local(.compact)):not(:local(.disabled)) {
42
+ @include box-shadow(0 0 0 1px $color-dark-blue, 0 0 4px 0 $color-dark-blue);
43
+ }
44
+
45
+ &:not(:local(.checked)):not(:local(.contentOnly)):not(:local(.compact)):not(:local(.disabled)):hover {
46
+ @include box-shadow(0 0 6px $color-dark-blue);
47
+ }
48
+
49
+ &:focus {
50
+ outline-color: #54acb8;
51
+ }
52
+
53
+ label {
54
+ width: 100%;
55
+ padding: 10px;
56
+ margin: 0;
57
+ cursor: pointer;
58
+ }
59
+
60
+ &:local(.compact) {
61
+ display: table;
62
+ label {
63
+ padding: 6px 4px;
64
+ }
65
+ }
66
+
67
+ input[type="radio"] {
68
+ opacity: 0;
69
+ position: absolute;
70
+ }
71
+ }
@@ -1,28 +1,28 @@
1
- Select example:
2
-
3
- ```js
4
- <Select id="select1" onChange={()=>{console.log('onchange')}} options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
5
- <Select id="select2" onChange={()=>{console.log('onchange')}} label="Select with label" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
6
- <Select id="select3" onChange={()=>{console.log('onchange')}} label="Select with label and selected value" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
7
- <Select id="select4" onChange={()=>{console.log('onchange')}} label="Select with label and defaultValue" defaultValue="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
8
- <Select id="select5" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, errors and error message" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} hasErrors={true} errorMessage="Wrong value selected" />
9
- <Select id="select6" onChange={()=>{console.log('onchange')}} label={['Select with ', <a key="labelLink" href="#">link</a>, ' in label']} value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
10
- <Select id="select7" onChange={()=>{console.log('onchange')}} label="Select with label and placeholder" placeholder="Select from list" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
11
- <Select id="select8" onChange={()=>{console.log('onchange')}} label="Select with label, placeholder and placeholderValue" placeholder="Select from list" placeholderValue="notSelected" value="notSelected" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
12
- <Select id="select9" onChange={()=>{console.log('onchange')}} label="Select with label, selected value and contentOnly set to true" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} />
13
- <Select id="select10" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, contentOnly set to true and keyAsContent set to true" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} keyAsContent={true} />
14
- <Select id="select11" onChange={()=>{console.log('onchange')}} label="Select with label, selected value is string, contentOnly set to true and keyAsContent set to true" value="option 2" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} keyAsContent={true} />
15
- <Select id="select12" onChange={()=>{console.log('onchange')}} label="Select with label, contentOnly set to true, no value and defaultContent" contentOnly={true} defaultContent="No value selected" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
16
- <Select id="select2" onChange={()=>{console.log('onchange')}} label="Select with custom width" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} width="250px" />
17
- ```
18
-
19
- Themed select example:
20
-
21
- ```js
22
- import customTheme from 'data/customTheme';
23
- <React.Fragment>
24
- <Select id="themedSelect3" onChange={()=>{console.log('onchange')}} label="Select with label and selected value" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} theme={customTheme} />
25
- <Select id="themedSelect4" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, errors and error message" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} hasErrors={true} errorMessage="Wrong value selected" theme={customTheme} />
26
- <Select id="themedSelect5" onChange={()=>{console.log('onchange')}} label={['Select with ', <a key="labelLink" href="#">link</a>, ' in label']} value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} theme={customTheme} />
27
- </React.Fragment>
28
- ```
1
+ Select example:
2
+
3
+ ```js
4
+ <Select id="select1" onChange={()=>{console.log('onchange')}} options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
5
+ <Select id="select2" onChange={()=>{console.log('onchange')}} label="Select with label" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
6
+ <Select id="select3" onChange={()=>{console.log('onchange')}} label="Select with label and selected value" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
7
+ <Select id="select4" onChange={()=>{console.log('onchange')}} label="Select with label and defaultValue" defaultValue="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
8
+ <Select id="select5" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, errors and error message" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} hasErrors={true} errorMessage="Wrong value selected" />
9
+ <Select id="select6" onChange={()=>{console.log('onchange')}} label={['Select with ', <a key="labelLink" href="#">link</a>, ' in label']} value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
10
+ <Select id="select7" onChange={()=>{console.log('onchange')}} label="Select with label and placeholder" placeholder="Select from list" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
11
+ <Select id="select8" onChange={()=>{console.log('onchange')}} label="Select with label, placeholder and placeholderValue" placeholder="Select from list" placeholderValue="notSelected" value="notSelected" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
12
+ <Select id="select9" onChange={()=>{console.log('onchange')}} label="Select with label, selected value and contentOnly set to true" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} />
13
+ <Select id="select10" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, contentOnly set to true and keyAsContent set to true" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} keyAsContent={true} />
14
+ <Select id="select11" onChange={()=>{console.log('onchange')}} label="Select with label, selected value is string, contentOnly set to true and keyAsContent set to true" value="option 2" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} contentOnly={true} keyAsContent={true} />
15
+ <Select id="select12" onChange={()=>{console.log('onchange')}} label="Select with label, contentOnly set to true, no value and defaultContent" contentOnly={true} defaultContent="No value selected" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} />
16
+ <Select id="select2" onChange={()=>{console.log('onchange')}} label="Select with custom width" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} width="250px" />
17
+ ```
18
+
19
+ Themed select example:
20
+
21
+ ```js
22
+ import customTheme from 'data/customTheme';
23
+ <React.Fragment>
24
+ <Select id="themedSelect3" onChange={()=>{console.log('onchange')}} label="Select with label and selected value" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} theme={customTheme} />
25
+ <Select id="themedSelect4" onChange={()=>{console.log('onchange')}} label="Select with label, selected value, errors and error message" value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} hasErrors={true} errorMessage="Wrong value selected" theme={customTheme} />
26
+ <Select id="themedSelect5" onChange={()=>{console.log('onchange')}} label={['Select with ', <a key="labelLink" href="#">link</a>, ' in label']} value="value 3" options={['option 1', 'option 2', {key: 'option 3', value: 'value 3'}]} theme={customTheme} />
27
+ </React.Fragment>
28
+ ```
@@ -1,101 +1,100 @@
1
- @import "../style/global.scss";
2
-
3
- :local(.select) {
4
- :local(.selectContainer) {
5
- position: relative;
6
-
7
- :local(.selectListArrow_old) {
8
- position: absolute;
9
- display: block;
10
- content: "";
11
- top: 14px;
12
- right: 14px;
13
- height: 0;
14
- width: 0;
15
- border-left: 6px solid transparent;
16
- border-right: 6px solid transparent;
17
- border-top: 12px solid $color-primary;
18
- pointer-events: none;
19
- }
20
-
21
- :local(.selectListArrow) {
22
- box-sizing: border-box;
23
- position: absolute;
24
- top: 20px;
25
- right: 20px;
26
- display: block;
27
- width: 12px;
28
- height: 12px;
29
- border-radius: 100px;
30
-
31
- &::after {
32
- content: "";
33
- display: block;
34
- box-sizing: border-box;
35
- position: absolute;
36
- width: 12px;
37
- height: 12px;
38
- border-bottom: 2px solid;
39
- border-right: 2px solid;
40
- transform: translateY(-30%) rotate(45deg);
41
- transition: transform 0.3s ease-in-out;
42
- }
43
- }
44
-
45
- select {
46
- @include border-radius(0);
47
- @include transition(border-color 0.15s linear);
48
- @include appearance(none);
49
- @include box-shadow(none);
50
- height: 56px;
51
- color: rgba(0, 0, 0, 0.75);
52
- width: 100%;
53
- font-family: inherit;
54
- font-size: 19px;
55
- padding: 10px 40px 10px 10px;
56
- border: 1px solid #afaba8;
57
- border-radius: 0;
58
- line-height: normal;
59
- background: white;
60
- cursor: pointer;
61
-
62
- &:hover {
63
- border-color: $color-dark-blue;
64
- }
65
-
66
- &:focus {
67
- border-color: $color-dark-blue;
68
- outline-color: #54acb8;
69
- }
70
-
71
- &[disabled],
72
- &[readonly] {
73
- background-color: #ddd;
74
- cursor: default;
75
- }
76
-
77
- &:local(.hasErrors) {
78
- border-color: $color-error;
79
- &:focus {
80
- border-color: $color-error;
81
- outline-color: #b8565d;
82
- }
83
- &[disabled],
84
- &[readonly] {
85
- background-color: #ddd;
86
- cursor: default;
87
- border-color: #afaba8;
88
- }
89
- }
90
- }
91
- }
92
- :local(.errorMessage) {
93
- color: $color-error-text;
94
- font-size: 19px;
95
- font-weight: 400;
96
- line-height: 1.6;
97
- font-family: "Open Sans", sans-serif;
98
- font-style: italic;
99
- overflow-wrap: break-word;
100
- }
101
- }
1
+ @import "../style/global.scss";
2
+
3
+ :local(.select) {
4
+ :local(.selectContainer) {
5
+ position: relative;
6
+
7
+ :local(.selectListArrow) {
8
+ box-sizing: border-box;
9
+ position: absolute;
10
+ top: 15px;
11
+ right: 15px;
12
+ display: block;
13
+ width: 12px;
14
+ height: 12px;
15
+ border-radius: 100px;
16
+ @media only screen and (min-width: $screen-sm) {
17
+ top: 20px;
18
+ right: 20px;
19
+ }
20
+
21
+ &::after {
22
+ content: "";
23
+ display: block;
24
+ box-sizing: border-box;
25
+ position: absolute;
26
+ width: 12px;
27
+ height: 12px;
28
+ border-bottom: 2px solid;
29
+ border-right: 2px solid;
30
+ transform: translateY(-30%) rotate(45deg);
31
+ transition: transform 0.3s ease-in-out;
32
+ }
33
+ }
34
+
35
+ select {
36
+ @include border-radius(0);
37
+ @include transition(border-color 0.15s linear);
38
+ @include appearance(none);
39
+ @include box-shadow(none);
40
+ height: 47px;
41
+ color: rgba(0, 0, 0, 0.75);
42
+ width: 100%;
43
+ font-family: inherit;
44
+ font-size: 16px;
45
+ padding: 10px 40px 10px 10px;
46
+ border: 1px solid #afaba8;
47
+ border-radius: 0;
48
+ line-height: normal;
49
+ background: white;
50
+ cursor: pointer;
51
+ @media only screen and (min-width: $screen-sm) {
52
+ font-size: 19px;
53
+ height: 56px;
54
+ }
55
+
56
+ &:hover {
57
+ border-color: $color-dark-blue;
58
+ }
59
+
60
+ &:focus {
61
+ border-color: $color-dark-blue;
62
+ outline-color: #54acb8;
63
+ }
64
+
65
+ &[disabled],
66
+ &[readonly] {
67
+ background-color: #ddd;
68
+ cursor: default;
69
+ }
70
+
71
+ &:local(.hasErrors) {
72
+ border-color: $color-error;
73
+ &:focus {
74
+ border-color: $color-error;
75
+ outline-color: #b8565d;
76
+ }
77
+ &[disabled],
78
+ &[readonly] {
79
+ background-color: #ddd;
80
+ cursor: default;
81
+ border-color: #afaba8;
82
+ }
83
+ }
84
+ }
85
+ }
86
+ :local(.errorMessage) {
87
+ display: block;
88
+ color: $color-error-text;
89
+ font-size: 16px;
90
+ font-weight: 400;
91
+ line-height: 1.2;
92
+ margin: 4px 0;
93
+ font-family: "Open Sans", sans-serif;
94
+ font-style: italic;
95
+ overflow-wrap: break-word;
96
+ @media only screen and (min-width: $screen-sm) {
97
+ font-size: 19px;
98
+ }
99
+ }
100
+ }