@helsenorge/designsystem-react 1.0.0-beta88 → 1.0.0-beta92

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 (121) hide show
  1. package/Button-2be46c88.js +2 -0
  2. package/Button-2be46c88.js.map +1 -0
  3. package/Checkbox-0ba01292.js +2 -0
  4. package/Checkbox-0ba01292.js.map +1 -0
  5. package/Close-80751ae6.js +2 -0
  6. package/Close-80751ae6.js.map +1 -0
  7. package/FormGroup-9555dd73.js +2 -0
  8. package/FormGroup-9555dd73.js.map +1 -0
  9. package/Icon-9b4a8a2d.js +2 -0
  10. package/Icon-9b4a8a2d.js.map +1 -0
  11. package/Loader-3589bdb1.js +2 -0
  12. package/Loader-3589bdb1.js.map +1 -0
  13. package/Modal-b68c7a72.js +2 -0
  14. package/Modal-b68c7a72.js.map +1 -0
  15. package/RadioButton-84ca988e.js +2 -0
  16. package/RadioButton-84ca988e.js.map +1 -0
  17. package/Textarea-9c91191a.js +2 -0
  18. package/Textarea-9c91191a.js.map +1 -0
  19. package/Validation-1236e8ef.js +2 -0
  20. package/Validation-1236e8ef.js.map +1 -0
  21. package/components/AnchorLink/AnchorLink.d.ts.map +1 -1
  22. package/components/AnchorLink/index.js +1 -1
  23. package/components/Avatar/index.js +1 -1
  24. package/components/Button/Button.d.ts.map +1 -1
  25. package/components/Button/index.js +1 -1
  26. package/components/ButtonWithModal/componentdata.json +61 -1
  27. package/components/ButtonWithModal/index.js +1 -1
  28. package/components/Checkbox/Checkbox.d.ts +3 -3
  29. package/components/Checkbox/Checkbox.d.ts.map +1 -1
  30. package/components/Checkbox/componentdata.json +13 -7
  31. package/components/Checkbox/index.js +1 -1
  32. package/components/Close/index.js +1 -1
  33. package/components/ExpanderList/index.js +1 -1
  34. package/components/FormExample/FormExample.d.ts +7 -5
  35. package/components/FormExample/FormExample.d.ts.map +1 -1
  36. package/components/FormExample/componentdata.json +9 -3
  37. package/components/FormExample/index.js +1 -1
  38. package/components/FormExample/index.js.map +1 -1
  39. package/components/FormGroup/FormGroup.d.ts +5 -6
  40. package/components/FormGroup/FormGroup.d.ts.map +1 -1
  41. package/components/FormGroup/componentdata.json +32 -7
  42. package/components/FormGroup/index.js +1 -1
  43. package/components/FormGroup/styles.module.scss +12 -3
  44. package/components/Icons/AcupunctureBack.js +1 -1
  45. package/components/Icons/Icon.js +1 -1
  46. package/components/Icons/NoEye.js +1 -1
  47. package/components/Icons/SectionSign.js +1 -1
  48. package/components/Icons/SpeechBubble.js +1 -1
  49. package/components/Icons/SupportingPerson.js +1 -1
  50. package/components/Icons/Syringe.js +1 -1
  51. package/components/Icons/index.js +1 -1
  52. package/components/LinkList/LinkList.d.ts +2 -0
  53. package/components/LinkList/LinkList.d.ts.map +1 -1
  54. package/components/LinkList/index.js +1 -1
  55. package/components/Loader/Loader.d.ts +7 -1
  56. package/components/Loader/Loader.d.ts.map +1 -1
  57. package/components/Loader/componentdata.json +32 -1
  58. package/components/Loader/index.js +1 -1
  59. package/components/Loader/styles.module.scss +19 -4
  60. package/components/Modal/Modal.d.ts +9 -0
  61. package/components/Modal/Modal.d.ts.map +1 -1
  62. package/components/Modal/componentdata.json +63 -1
  63. package/components/Modal/index.js +1 -1
  64. package/components/Modal/styles.module.scss +35 -4
  65. package/components/Modal/styles.module.scss.d.ts +3 -0
  66. package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
  67. package/components/NotificationPanel/index.js +1 -1
  68. package/components/NotificationPanel/styles.module.scss +0 -51
  69. package/components/NotificationPanel/styles.module.scss.d.ts +0 -2
  70. package/components/Portal/componentdata.json +80 -0
  71. package/components/Portal/index.d.ts +13 -0
  72. package/components/Portal/index.d.ts.map +1 -0
  73. package/components/Portal/index.js +2 -0
  74. package/components/Portal/index.js.map +1 -0
  75. package/components/RadioButton/RadioButton.d.ts +31 -0
  76. package/components/RadioButton/RadioButton.d.ts.map +1 -0
  77. package/components/RadioButton/componentdata.json +265 -0
  78. package/components/RadioButton/index.d.ts +3 -0
  79. package/components/RadioButton/index.d.ts.map +1 -0
  80. package/components/RadioButton/index.js +2 -0
  81. package/components/RadioButton/index.js.map +1 -0
  82. package/components/RadioButton/styles.module.scss +236 -0
  83. package/components/RadioButton/styles.module.scss.d.ts +23 -0
  84. package/components/Textarea/Textarea.d.ts +31 -0
  85. package/components/Textarea/Textarea.d.ts.map +1 -0
  86. package/components/Textarea/componentdata.json +527 -0
  87. package/components/Textarea/index.d.ts +3 -0
  88. package/components/Textarea/index.d.ts.map +1 -0
  89. package/components/Textarea/index.js +2 -0
  90. package/components/Textarea/index.js.map +1 -0
  91. package/components/Textarea/styles.module.scss +154 -0
  92. package/components/Textarea/styles.module.scss.d.ts +21 -0
  93. package/components/Tile/Tile.d.ts.map +1 -1
  94. package/components/Tile/index.js +1 -1
  95. package/components/Validation/Validation.d.ts +2 -2
  96. package/components/Validation/Validation.d.ts.map +1 -1
  97. package/components/Validation/componentdata.json +3 -3
  98. package/components/Validation/index.js +1 -1
  99. package/constants-a4b0b501.js +2 -0
  100. package/constants-a4b0b501.js.map +1 -0
  101. package/constants.d.ts +29 -0
  102. package/constants.d.ts.map +1 -1
  103. package/package.json +2 -1
  104. package/Button-55952154.js +0 -2
  105. package/Button-55952154.js.map +0 -1
  106. package/Checkbox-46666e69.js +0 -2
  107. package/Checkbox-46666e69.js.map +0 -1
  108. package/Close-a6cbd165.js +0 -2
  109. package/Close-a6cbd165.js.map +0 -1
  110. package/FormGroup-56d60079.js +0 -2
  111. package/FormGroup-56d60079.js.map +0 -1
  112. package/Loader-6ff0d481.js +0 -2
  113. package/Loader-6ff0d481.js.map +0 -1
  114. package/Modal-cdc876a8.js +0 -2
  115. package/Modal-cdc876a8.js.map +0 -1
  116. package/Validation-372a97b9.js +0 -2
  117. package/Validation-372a97b9.js.map +0 -1
  118. package/X-8d8ff918.js +0 -2
  119. package/X-8d8ff918.js.map +0 -1
  120. package/constants-d919236e.js +0 -2
  121. package/constants-d919236e.js.map +0 -1
@@ -0,0 +1,236 @@
1
+ @import '../../scss/_spacers.scss';
2
+ @import '../../scss/_breakpoints.scss';
3
+ @import '../../scss/_palette.scss';
4
+ @import '../../scss/font-settings.scss';
5
+
6
+ .radio-button-errors {
7
+ font-size: $font-size-sm;
8
+ font-weight: 600;
9
+ color: $cherry500;
10
+ margin-top: 0;
11
+ }
12
+
13
+ .radio-button-wrapper {
14
+ cursor: pointer;
15
+ margin: getSpacer(s) 0;
16
+
17
+ &--with-error {
18
+ padding: getSpacer(s) getSpacer(xs) getSpacer(m);
19
+ background-color: $cherry50;
20
+ margin-left: -0.75rem;
21
+ border-left: 0.25rem solid $cherry500;
22
+
23
+ @media (min-width: map-get($grid-breakpoints, md)) {
24
+ padding: getSpacer(s) getSpacer(m) getSpacer(l);
25
+ }
26
+ }
27
+
28
+ &--with-error#{&}--bigform {
29
+ padding: getSpacer(m) getSpacer(m);
30
+ }
31
+
32
+ &--bigform {
33
+ margin: getSpacer(xs) 0 getSpacer(xs) 0;
34
+ }
35
+ }
36
+
37
+ .radio-button-wrapper:first-of-type {
38
+ margin-top: 0;
39
+ }
40
+
41
+ .radio-button-wrapper:last-of-type {
42
+ margin-bottom: 0;
43
+ }
44
+
45
+ .radio-button-label {
46
+ display: flex;
47
+ align-items: center;
48
+ cursor: pointer;
49
+ font-size: $font-size-sm;
50
+
51
+ @media (min-width: map-get($grid-breakpoints, md)) {
52
+ font-size: $font-size-md;
53
+ }
54
+
55
+ &--on-dark {
56
+ color: $white;
57
+ }
58
+
59
+ &--invalid {
60
+ color: $black;
61
+ }
62
+
63
+ &--disabled {
64
+ cursor: default;
65
+ color: $neutral400;
66
+ }
67
+
68
+ &--bigform {
69
+ padding: getSpacer(s);
70
+ background-color: $neutral50;
71
+ }
72
+
73
+ &--bigform#{&}--on-blueberry {
74
+ background-color: $blueberry50;
75
+ }
76
+
77
+ &--bigform#{&}--on-dark {
78
+ background-color: $blueberry800;
79
+ }
80
+
81
+ &--bigform#{&}--invalid {
82
+ background-color: $white;
83
+ }
84
+
85
+ @media (min-width: map-get($grid-breakpoints, md)) {
86
+ &--bigform {
87
+ padding: 1.68rem getSpacer(l);
88
+ }
89
+ }
90
+ }
91
+
92
+ .radio-button {
93
+ -moz-appearance: none;
94
+ -webkit-appearance: none;
95
+ -o-appearance: none;
96
+
97
+ cursor: pointer;
98
+ display: flex;
99
+ justify-content: center;
100
+ align-items: center;
101
+ border-radius: 10rem;
102
+ margin: getSpacer(3xs) getSpacer(s) getSpacer(3xs) getSpacer(3xs);
103
+ height: 1.5rem;
104
+ width: 1.5rem;
105
+ min-width: auto !important;
106
+ min-height: auto !important;
107
+ color: $neutral700;
108
+ box-shadow: 0 0 0 getSpacer(3xs);
109
+
110
+ &:checked {
111
+ color: $blueberry500;
112
+
113
+ &:hover {
114
+ background-color: $blueberry50;
115
+ }
116
+ }
117
+
118
+ &:focus {
119
+ box-shadow: 0 0 0 getSpacer(2xs);
120
+ color: $black;
121
+ }
122
+
123
+ &:hover {
124
+ box-shadow: 0 0 0 getSpacer(2xs);
125
+ background-color: $neutral100;
126
+ }
127
+
128
+ :active > & {
129
+ box-shadow: 0 0 0 getSpacer(2xs);
130
+ color: $black;
131
+ }
132
+
133
+ &--on-blueberry {
134
+ color: $blueberry500;
135
+
136
+ :hover > & {
137
+ background-color: $blueberry100;
138
+ }
139
+ }
140
+
141
+ &--on-dark {
142
+ color: $neutral200;
143
+
144
+ &:hover {
145
+ background-color: $inverted-hover;
146
+ box-shadow: 0 0 0 getSpacer(2xs);
147
+ }
148
+
149
+ &:checked {
150
+ color: $blueberry200;
151
+
152
+ &:hover {
153
+ background-color: $inverted-hover;
154
+ }
155
+ }
156
+
157
+ :active > & {
158
+ box-shadow: 0 0 0 getSpacer(2xs);
159
+ color: $white;
160
+ }
161
+
162
+ &:focus {
163
+ color: $white;
164
+ }
165
+ }
166
+
167
+ &--invalid {
168
+ color: $cherry500;
169
+
170
+ &:hover {
171
+ background-color: $cherry100;
172
+ }
173
+
174
+ &:checked {
175
+ color: $cherry500;
176
+
177
+ &:hover {
178
+ background-color: $cherry100;
179
+ }
180
+ }
181
+
182
+ &:active {
183
+ color: $black;
184
+ }
185
+
186
+ &:focus {
187
+ color: $black;
188
+ }
189
+ }
190
+
191
+ &--disabled {
192
+ cursor: default;
193
+
194
+ color: $neutral400;
195
+ &:checked {
196
+ color: $neutral400;
197
+
198
+ &:hover {
199
+ box-shadow: 0 0 0 getSpacer(3xs);
200
+ background-color: transparent;
201
+ }
202
+ }
203
+ &:hover {
204
+ box-shadow: 0 0 0 getSpacer(3xs);
205
+ background-color: transparent;
206
+ }
207
+
208
+ &:active {
209
+ color: $neutral400;
210
+ }
211
+ }
212
+
213
+ // :before er dot i RadioButton
214
+ &:checked::before {
215
+ content: '';
216
+ display: flex;
217
+ background-color: $blueberry500;
218
+ width: 0.75rem;
219
+ height: 0.75rem;
220
+ border-radius: 10rem;
221
+ }
222
+
223
+ &--on-dark:checked::before {
224
+ background-color: $blueberry200;
225
+ }
226
+
227
+ &--disabled:checked::before {
228
+ box-shadow: 0 0 0 0;
229
+ background-color: $neutral400;
230
+ color: $neutral400;
231
+ }
232
+
233
+ &--invalid:checked::before {
234
+ background-color: $cherry500;
235
+ }
236
+ }
@@ -0,0 +1,23 @@
1
+ export type Styles = {
2
+ 'radio-button': string;
3
+ 'radio-button--disabled': string;
4
+ 'radio-button--invalid': string;
5
+ 'radio-button--on-blueberry': string;
6
+ 'radio-button--on-dark': string;
7
+ 'radio-button-errors': string;
8
+ 'radio-button-label': string;
9
+ 'radio-button-label--bigform': string;
10
+ 'radio-button-label--disabled': string;
11
+ 'radio-button-label--invalid': string;
12
+ 'radio-button-label--on-blueberry': string;
13
+ 'radio-button-label--on-dark': string;
14
+ 'radio-button-wrapper': string;
15
+ 'radio-button-wrapper--bigform': string;
16
+ 'radio-button-wrapper--with-error': string;
17
+ };
18
+
19
+ export type ClassNames = keyof Styles;
20
+
21
+ declare const styles: Styles;
22
+
23
+ export default styles;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { HTMLTextareaProps, FormMode } from '../../constants';
3
+ interface TextareaProps extends HTMLTextareaProps {
4
+ /** initial value for textarea */
5
+ defaultValue?: string;
6
+ /** max character limit in textarea */
7
+ maxCharacters?: number;
8
+ /** The text is displayed in the end of the text-counter */
9
+ maxText?: string;
10
+ /** Sets the data-testid attribute. */
11
+ testId?: string;
12
+ /** If true, the component will have a bottom margin. */
13
+ marginBottom?: boolean;
14
+ /** If true, the component will be transparent. */
15
+ transparent?: boolean;
16
+ /** Changes the visuals of the textarea */
17
+ mode?: keyof typeof FormMode;
18
+ /** Label of the input */
19
+ label?: string;
20
+ /** max rows */
21
+ maxRows?: number;
22
+ /** min rows */
23
+ minRows?: number;
24
+ /** auto-grows until maxRows */
25
+ grow?: boolean;
26
+ /** Error text to show above the component */
27
+ errorText?: string;
28
+ }
29
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
30
+ export default Textarea;
31
+ //# sourceMappingURL=Textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG9D,UAAU,aAAc,SAAQ,iBAAiB;IAC/C,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kDAAkD;IAClD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,QAAQ,2FAiHZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}