@funidata/fudis-core 0.0.2-alpha.5 → 0.0.3

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 (39) hide show
  1. package/_index.scss +30 -2
  2. package/package.json +3 -1
  3. package/src/components/alert/alert.scss +75 -0
  4. package/src/components/badge/badge.scss +39 -0
  5. package/src/components/button/button.scss +49 -15
  6. package/src/components/checkbox/checkbox.scss +85 -0
  7. package/src/components/checkbox-group/checkbox-group.scss +7 -0
  8. package/src/components/error-summary/error-summary.scss +47 -0
  9. package/src/components/fieldset/fieldset.scss +90 -0
  10. package/src/components/guidance/guidance.scss +80 -0
  11. package/src/components/horizontal-rule/horizontal-rule.scss +13 -0
  12. package/src/components/icon/icon.scss +238 -0
  13. package/src/components/label/label.scss +33 -0
  14. package/src/components/link/link.scss +18 -0
  15. package/src/components/loading-spinner/loading-spinner.scss +49 -0
  16. package/src/components/notification/notification.scss +49 -0
  17. package/src/components/popover/popover.scss +18 -0
  18. package/src/components/radio-button/radio-button.scss +107 -0
  19. package/src/components/radio-button-group/radio-button-group.scss +7 -0
  20. package/src/components/tab-navigation/tab-navigation.scss +99 -0
  21. package/src/components/text-area/text-area.scss +7 -0
  22. package/src/components/text-input/text-input.scss +17 -0
  23. package/src/components/validator-error-message/validator-error-message.scss +17 -0
  24. package/src/foundations/borders/mixins.scss +10 -10
  25. package/src/foundations/colors/mixins.scss +5 -5
  26. package/src/foundations/focus/mixins.scss +8 -8
  27. package/src/foundations/grid/mixins.scss +1 -1
  28. package/src/foundations/spacing/classes.scss +1 -2
  29. package/src/foundations/spacing/tokens.scss +3 -0
  30. package/src/foundations/typography/classes.scss +105 -0
  31. package/src/foundations/typography/mixins.scss +15 -4
  32. package/src/foundations/utilities/classes.scss +7 -11
  33. package/src/foundations/utilities/mixins.scss +0 -1
  34. package/src/foundations/z-index/mixins.scss +1 -1
  35. package/src/assets/fonts/fonts.scss +0 -33
  36. package/src/assets/fonts/woff/FiraSans-Light.woff2 +0 -0
  37. package/src/assets/fonts/woff/FiraSans-Medium.woff2 +0 -0
  38. package/src/assets/fonts/woff/FiraSans-Regular.woff2 +0 -0
  39. package/src/assets/fonts/woff/FiraSans-SemiBold.woff2 +0 -0
@@ -0,0 +1,238 @@
1
+ @use '../../foundations/spacing/tokens.scss' as spacing;
2
+ @use '../../foundations/colors/tokens.scss' as colors;
3
+ @use '../../foundations/colors/mixins.scss' as colorMixin;
4
+
5
+ /* Only for internal use for this icon class */
6
+ @mixin icon-mask-base() {
7
+ /* stylelint-disable property-disallowed-list */
8
+ background-color: currentcolor;
9
+ width: var(--icon-size);
10
+ height: var(--icon-size);
11
+ content: '';
12
+ mask-repeat: no-repeat;
13
+ mask-position: center;
14
+ mask-size: contain;
15
+ }
16
+
17
+ .fudis-icon {
18
+ box-sizing: border-box;
19
+ display: inline-flex;
20
+ align-items: center;
21
+ transition: all 0.6s ease;
22
+
23
+ &__color {
24
+ &__yellow {
25
+ @include colorMixin.text-color('yellow');
26
+ }
27
+
28
+ &__red {
29
+ @include colorMixin.text-color('red');
30
+ }
31
+
32
+ &__gray-dark {
33
+ @include colorMixin.text-color('gray-dark');
34
+ }
35
+
36
+ &__gray-middle {
37
+ @include colorMixin.text-color('gray-middle');
38
+ }
39
+
40
+ &__gray-light {
41
+ @include colorMixin.text-color('gray-light');
42
+ }
43
+
44
+ &__primary {
45
+ @include colorMixin.text-color('primary');
46
+ }
47
+
48
+ &__primary-dark {
49
+ @include colorMixin.text-color('primary-dark');
50
+ }
51
+
52
+ &__green {
53
+ @include colorMixin.text-color('green');
54
+ }
55
+
56
+ &__white {
57
+ @include colorMixin.text-color('white');
58
+ }
59
+ }
60
+
61
+ &__lg {
62
+ --icon-size: #{spacing.$spacing-lg};
63
+ }
64
+
65
+ &__md {
66
+ --icon-size: #{spacing.$spacing-md};
67
+ }
68
+
69
+ &__sm {
70
+ --icon-size: #{spacing.$spacing-sm};
71
+ }
72
+
73
+ &__rotate {
74
+ &__flip-180 {
75
+ transform: rotate(180deg);
76
+ }
77
+
78
+ &__cw-90 {
79
+ transform: rotate(90deg);
80
+ }
81
+
82
+ &__ccw-90 {
83
+ transform: rotate(-90deg);
84
+ }
85
+ }
86
+
87
+ &__achievement {
88
+ &::after {
89
+ @include icon-mask-base;
90
+
91
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M24.373 12.384c-.277.894-.664 1.75-1.152 2.55a7.743 7.743 0 0 1-1.067-2.251 29.695 29.695 0 0 1 1.152-3.616 21.15 21.15 0 0 1 1.067 3.317ZM22.209 15.67a8.063 8.063 0 0 1-1.067 2.186 6.729 6.729 0 0 1-1.067-2.133 8.66 8.66 0 0 1 1.067-2.422c.49.722.85 1.523 1.067 2.368Z'/%3E%3Cpath d='M24.064 17.888a10.932 10.932 0 0 1-2.9-.47 9.271 9.271 0 0 1 2.132-1.813c.984.023 1.96.177 2.902.459a9.526 9.526 0 0 1-2.134 1.824ZM22.73 20.267a9.804 9.804 0 0 1-2.634 1.066 9.826 9.826 0 0 1-2.496-1.365 9.802 9.802 0 0 1 2.634-1.067c.892.336 1.732.796 2.496 1.366ZM18.826 15.403c.347.778.549 1.613.598 2.464-.181.576-2.027 2.133-2.027 2.133a7.06 7.06 0 0 1-.597-2.475c.192-.608 2.026-2.122 2.026-2.122Z'/%3E%3Cpath d='m18.112 19.339 3.307-1.664-2.496 2.282-4.587 2.592.416-1.216 3.36-1.994ZM7.66 12.576c.255.84.613 1.647 1.066 2.4.47-.648.83-1.369 1.067-2.133a29.196 29.196 0 0 0-1.067-3.467 21.546 21.546 0 0 0-1.067 3.2ZM9.792 15.67a8.064 8.064 0 0 0 1.067 2.186 6.73 6.73 0 0 0 1.066-2.133A8.663 8.663 0 0 0 10.86 13.3a7.56 7.56 0 0 0-1.067 2.368Z'/%3E%3Cpath d='M7.936 17.888c.984-.025 1.96-.183 2.901-.47a9.27 9.27 0 0 0-2.133-1.813c-.983.023-1.959.177-2.901.459a9.525 9.525 0 0 0 2.133 1.824ZM11.904 21.333a9.825 9.825 0 0 0 2.496-1.365 9.802 9.802 0 0 0-2.635-1.067c-.891.336-1.732.796-2.495 1.366.821.481 1.709.84 2.634 1.066ZM13.174 15.403a7.062 7.062 0 0 0-.598 2.464c.181.576 2.027 2.133 2.027 2.133.347-.782.55-1.62.597-2.475-.192-.608-2.026-2.122-2.026-2.122Z'/%3E%3Cpath d='m13.888 19.339-3.307-1.664 2.496 2.282 4.587 2.592-.406-1.216-3.37-1.994Z'/%3E%3C/svg%3E");
92
+ }
93
+ }
94
+
95
+ &__alert {
96
+ &::after {
97
+ @include icon-mask-base;
98
+
99
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='M15.634 8.5a1 1 0 0 1 1.73 0l7.5 13a1 1 0 0 1-.86 1.5h-15a1 1 0 0 1-.87-1.5l7.5-13Zm8.37 13.5-7.5-13-7.5 13h15Z' clip-rule='evenodd'/%3E%3Ccircle cx='16.504' cy='19.75' r='.75'/%3E%3Cpath d='M16.504 17.75a.75.75 0 0 1-.75-.75v-3a.75.75 0 0 1 1.5 0v3a.76.76 0 0 1-.75.75Z'/%3E%3C/svg%3E");
100
+ }
101
+ }
102
+
103
+ &__archive {
104
+ &::after {
105
+ @include icon-mask-base;
106
+
107
+ mask-image: url("data:image/svg+xml,%3Csvg id='archive' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M25.429 11.83a.533.533 0 0 0-.533.533v10.304a1.6 1.6 0 0 1-1.6 1.6H9.78a1.6 1.6 0 0 1-1.6-1.6V12.363a.533.533 0 1 0-1.067 0v10.304a2.667 2.667 0 0 0 2.667 2.666h13.515a2.677 2.677 0 0 0 2.666-2.666V12.363a.533.533 0 0 0-.533-.534Z'/%3E%3Cpath fill-rule='evenodd' d='M8 6.4h17.066a2.667 2.667 0 0 1 2.667 2.667v1.962h-22.4V9.067A2.667 2.667 0 0 1 8 6.4ZM6.4 9.963h20.266v-.896a1.6 1.6 0 0 0-1.6-1.6H8a1.61 1.61 0 0 0-1.6 1.6v.896ZM20.267 17.248c0 .784-.636 1.419-1.42 1.419H14.23a1.419 1.419 0 0 1-1.43-1.419v-.352c0-.79.64-1.43 1.43-1.43h4.619a1.43 1.43 0 0 1 1.419 1.43v.352Zm-6.4-.352v.352a.363.363 0 0 0 .362.352h4.619a.352.352 0 0 0 .352-.352v-.352a.363.363 0 0 0-.352-.363h-4.62a.363.363 0 0 0-.362.363Z' clip-rule='evenodd'/%3E%3C/svg%3E");
108
+ }
109
+ }
110
+
111
+ &__arrow-big {
112
+ &::after {
113
+ @include icon-mask-base;
114
+
115
+ mask-image: url("data:image/svg+xml,%3Csvg id='arrow-big' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='M15.925 24.534a1.6 1.6 0 0 1-1.6-1.6v-9.93l-3.06 3.064a1.596 1.596 0 0 1-2.259.005 1.598 1.598 0 0 1-.011-2.258l5.792-5.87c.315-.322.75-.495 1.174-.478.39-.016.858.161 1.166.47l5.861 5.87a1.6 1.6 0 1 1-2.264 2.26l-3.2-3.202v10.07a1.6 1.6 0 0 1-1.6 1.6Z' clip-rule='evenodd'/%3E%3C/svg%3E");
116
+ }
117
+ }
118
+
119
+ &__arrow-dashed {
120
+ &::after {
121
+ @include icon-mask-base;
122
+
123
+ mask-image: url("data:image/svg+xml,%3Csvg id='arrow-dashed' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M23.466 17.067H16v-2.134h7.466v2.134Zm-10.666 0H5.333v-2.134H12.8v2.134Z'/%3E%3Cpath d='m26.506 16-6.016 4.267v-8.534L26.506 16Z'/%3E%3C/svg%3E");
124
+ }
125
+ }
126
+
127
+ &__arrow-solid {
128
+ &::after {
129
+ @include icon-mask-base;
130
+
131
+ mask-image: url("data:image/svg+xml,%3Csvg id='arrow-solid' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M25.868 15.182a1 1 0 0 1 0 1.636l-7.865 5.539a1 1 0 0 1-1.576-.818V10.461a1 1 0 0 1 1.576-.818l7.865 5.54Z'/%3E%3Cpath fill-rule='evenodd' d='M5.5 16a1 1 0 0 1 1-1H20a1 1 0 1 1 0 2H6.5a1 1 0 0 1-1-1Z' clip-rule='evenodd'/%3E%3C/svg%3E");
132
+ }
133
+ }
134
+
135
+ &__check {
136
+ &::after {
137
+ @include icon-mask-base;
138
+
139
+ mask-image: url("data:image/svg+xml,%3Csvg id='check' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='M22.726 9.437a1.5 1.5 0 0 1 .371 2.088l-7.448 10.667a1.5 1.5 0 0 1-2.347.143l-4.285-4.779a1.5 1.5 0 0 1 2.234-2.003l3.022 3.37 6.364-9.115a1.5 1.5 0 0 1 2.089-.371Z' clip-rule='evenodd'/%3E%3C/svg%3E");
140
+ }
141
+ }
142
+
143
+ &__brochure {
144
+ &::after {
145
+ @include icon-mask-base;
146
+
147
+ mask-image: url("data:image/svg+xml,%3Csvg id='brochure' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='M11 8.5a.5.5 0 0 0-.5.5v13.5a.5.5 0 0 0 .5.5h7v-2a1.5 1.5 0 0 1 1.5-1.5h2V9a.5.5 0 0 0-.5-.5H11Zm9.793 12H19.5a.5.5 0 0 0-.5.5v1.293l1.793-1.793ZM9.5 9A1.5 1.5 0 0 1 11 7.5h10A1.5 1.5 0 0 1 22.5 9v11.207L18.707 24H11a1.5 1.5 0 0 1-1.5-1.5V9Z' clip-rule='evenodd'/%3E%3Cpath fill-rule='evenodd' d='M12 12a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5Zm0 2.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5Zm0 2.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");
148
+ }
149
+ }
150
+
151
+ &__check-indeterminate {
152
+ &::after {
153
+ @include icon-mask-base;
154
+
155
+ mask-image: url("data:image/svg+xml,%3Csvg id='check-indeterminate' xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect width='12' height='3' x='2' y='7' rx='1.5'/%3E%3C/svg%3E");
156
+ }
157
+ }
158
+
159
+ &__calendar {
160
+ &::after {
161
+ @include icon-mask-base;
162
+
163
+ mask-image: url("data:image/svg+xml,%3Csvg id='calendar' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='M22.394 24.533c.552 0 1.073-.813 1.073-1.365v-12.8c0-.553-.52-.768-1.073-.768H19.2V8.533h-1.066V9.6h-4.267V8.533H12.8V9.6H9.594c-.518 0-1.06.244-1.06.768v12.8c0 .553.507 1.365 1.06 1.365h12.8ZM9.6 10.667h3.2v1.066h1.067v-1.066h4.267v1.066H19.2v-1.066h3.2V12.8H9.6v-2.133Zm0 3.2h12.8v8.868c0 .276-.163.732-.44.732h-12c-.275 0-.36-.456-.36-.732v-8.868Zm4.267 5.333h-2.133v2.133h2.133V19.2Zm0-3.2h-2.133v2.133h2.133V16Zm3.2 3.2h-2.134v2.133h2.133V19.2Zm0-3.2h-2.134v2.133h2.133V16Zm3.2 3.2h-2.133v2.133h2.133V19.2Zm0-3.2h-2.133v2.133h2.133V16Z' clip-rule='evenodd'/%3E%3C/svg%3E");
164
+ }
165
+ }
166
+
167
+ &__bullets {
168
+ &::after {
169
+ @include icon-mask-base;
170
+
171
+ mask-image: url("data:image/svg+xml,%3Csvg id='bullets' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='7' cy='11' r='1'/%3E%3Crect width='16' height='2' x='10' y='10' rx='1'/%3E%3Ccircle cx='7' cy='16' r='1'/%3E%3Crect width='16' height='2' x='10' y='15' rx='1'/%3E%3Ccircle cx='7' cy='21' r='1'/%3E%3Crect width='16' height='2' x='10' y='20' rx='1'/%3E%3C/svg%3E");
172
+ }
173
+ }
174
+
175
+ &__back {
176
+ &::after {
177
+ @include icon-mask-base;
178
+
179
+ mask-image: url("data:image/svg+xml,%3Csvg id='back' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='m18.684 14.403-.018-.003h-7.37l3.486-3.411c.2-.197.2-.513 0-.709a.518.518 0 0 0-.723 0l-4.25 4.16a.686.686 0 0 0 0 .986l4.25 4.16c.2.196.524.196.723 0 .2-.194.2-.512 0-.708l-3.486-3.411h7.37v.004c1.49-.037 2.667 1.19 2.667 2.662s-1.178 2.699-2.667 2.663v.004h-1.6a.533.533 0 0 0 0 1.067h1.6a3.737 3.737 0 0 0 3.733-3.734c0-2.057-1.654-3.756-3.715-3.73' clip-rule='evenodd'/%3E%3C/svg%3E");
180
+ }
181
+ }
182
+
183
+ &__change-log {
184
+ &::after {
185
+ @include icon-mask-base;
186
+
187
+ mask-image: url("data:image/svg+xml,%3Csvg id='change-log' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='M16.5 15.717V11.2h-1v5.083l2.91 1.746.514-.858-2.424-1.454Z' clip-rule='evenodd'/%3E%3Cpath d='M9.066 16a6.934 6.934 0 1 1 3.736 6.152l.494-.95A5.862 5.862 0 1 0 10.138 16H9.066Z'/%3E%3Cpath d='M7.467 16h4.266L9.6 18.667 7.467 16Z'/%3E%3C/svg%3E");
188
+ }
189
+ }
190
+
191
+ &__search {
192
+ &::after {
193
+ @include icon-mask-base;
194
+
195
+ mask-image: url("data:image/svg+xml,%3Csvg id='search' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='m19.114 18.485 3.083 3.2a.917.917 0 0 1 0 1.227.981.981 0 0 1-1.366 0l-3.2-3.2a5.472 5.472 0 0 1-2.634.683 5.397 5.397 0 1 1 5.397-5.333 5.227 5.227 0 0 1-1.28 3.423Zm-5.473-6.65a3.488 3.488 0 0 0-2.11 3.27 3.467 3.467 0 0 0 3.476 3.423 3.488 3.488 0 1 0-1.366-6.693Z' clip-rule='evenodd'/%3E%3C/svg%3E");
196
+ }
197
+ }
198
+
199
+ &__new-tab {
200
+ &::after {
201
+ @include icon-mask-base;
202
+
203
+ mask-image: url("data:image/svg+xml,%3Csvg id='new-tab' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='M17.571 8H23.464c.296 0 .536.24.536.536V14.429h-1.071v-4.6l-7.657 7.657-.38.379-.757-.758.38-.379 7.656-7.657h-4.6V8ZM9 10.143h7.5v1.071h-6.429V21.93h10.715V15.5h1.071V23H9V10.143Z' clip-rule='evenodd'/%3E%3C/svg%3E");
204
+ }
205
+ }
206
+
207
+ &__close {
208
+ &::after {
209
+ @include icon-mask-base;
210
+
211
+ mask-image: url("data:image/svg+xml,%3Csvg id='close' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M20.255 20.932a.672.672 0 0 1-.47-.202l-8.533-8.534a.672.672 0 1 1 .95-.938l8.533 8.533a.672.672 0 0 1 0 .939.715.715 0 0 1-.48.202Z'/%3E%3Cpath d='M11.721 20.932a.714.714 0 0 0 .48-.202l8.533-8.534a.672.672 0 0 0-.949-.938l-8.533 8.533a.672.672 0 0 0 .469 1.141Z'/%3E%3C/svg%3E");
212
+ }
213
+ }
214
+
215
+ &__exclamation-mark-circle {
216
+ &::after {
217
+ @include icon-mask-base;
218
+
219
+ mask-image: url("data:image/svg+xml,%3Csvg id='exclamation-mark-circle' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='M16 25a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0 1c5.523 0 10-4.477 10-10S21.523 6 16 6 6 10.477 6 16s4.477 10 10 10Z' clip-rule='evenodd'/%3E%3Cpath d='M16 18.5c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1Zm0-1.5c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1Z'/%3E%3C/svg%3E");
220
+ }
221
+ }
222
+
223
+ &__checkmark-circle {
224
+ &::after {
225
+ @include icon-mask-base;
226
+
227
+ mask-image: url("data:image/svg+xml,%3Csvg id='checkmark-circle' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='M16 25a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0 1c5.523 0 10-4.477 10-10S21.523 6 16 6 6 10.477 6 16s4.477 10 10 10Z' clip-rule='evenodd'/%3E%3Cpath fill-rule='evenodd' d='M21.573 11.18a1 1 0 0 1 .247 1.393l-5.713 8.181a1 1 0 0 1-1.564.095l-3.287-3.665a1 1 0 0 1 1.489-1.335l2.444 2.726 4.991-7.147a1 1 0 0 1 1.393-.248Z' clip-rule='evenodd'/%3E%3C/svg%3E");
228
+ }
229
+ }
230
+
231
+ &__info-circle {
232
+ &::after {
233
+ @include icon-mask-base;
234
+
235
+ mask-image: url("data:image/svg+xml,%3Csvg id='info-circle' xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill-rule='evenodd' d='M16 25a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0 1c5.523 0 10-4.477 10-10S21.523 6 16 6 6 10.477 6 16s4.477 10 10 10Z' clip-rule='evenodd'/%3E%3Ccircle cx='16' cy='11.5' r='1.5'/%3E%3Cpath d='M17 20.5v-6h-3v1h1v5h-1v1h4v-1h-1Z'/%3E%3C/svg%3E");
236
+ }
237
+ }
238
+ }
@@ -0,0 +1,33 @@
1
+ @use '../../foundations/spacing/tokens.scss' as spacing;
2
+ @use '../../foundations/typography/mixins.scss' as typography;
3
+ @use '../../foundations/typography/tokens.scss' as typographyToken;
4
+ @use '../../foundations/colors/mixins.scss' as colorMixin;
5
+
6
+ .fudis-label {
7
+ @include colorMixin.text-color('gray-dark');
8
+ @include typography.text-field-label;
9
+
10
+ display: flex;
11
+ align-items: flex-end;
12
+ justify-content: space-between;
13
+
14
+ &__content {
15
+ margin: spacing.$spacing-xxs 0;
16
+ min-height: spacing.$spacing-md;
17
+
18
+ &__text {
19
+ margin-right: spacing.$spacing-xs;
20
+ }
21
+
22
+ &__required {
23
+ @include typography.text-field-label;
24
+ @include colorMixin.text-color('gray-middle');
25
+
26
+ display: inline-block;
27
+ vertical-align: bottom;
28
+ text-transform: initial;
29
+ /* stylelint-disable-next-line property-disallowed-list */
30
+ font-size: typographyToken.$body-text-sm-font-size;
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,18 @@
1
+ @use '../../foundations/typography/mixins.scss' as typography;
2
+ @use '../../foundations/spacing/tokens.scss' as spacing;
3
+
4
+ .fudis-link {
5
+ &__size {
6
+ &__inherit {
7
+ @include typography.link-inherit;
8
+ }
9
+
10
+ &__md {
11
+ @include typography.link-md;
12
+ }
13
+
14
+ &__lg {
15
+ @include typography.link-lg;
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,49 @@
1
+ @use '../../foundations/colors/tokens.scss' as color;
2
+ @use '../../foundations/spacing/tokens.scss' as spacing;
3
+
4
+ /* stylelint-disable-next-line unit-disallowed-list */
5
+ $lg-size: calc(3rem / var(--fudis-rem-multiplier)); // 48px
6
+ /* stylelint-disable-next-line unit-disallowed-list */
7
+ $max-width: calc(16rem / var(--fudis-rem-multiplier)); // 256px
8
+
9
+ .fudis-loading-spinner {
10
+ display: inline-block;
11
+ max-width: $max-width;
12
+
13
+ &__ui-content {
14
+ display: flex;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ justify-content: center;
18
+ }
19
+
20
+ &__variant {
21
+ &__sm {
22
+ margin-top: spacing.$spacing-xxs;
23
+ margin-bottom: spacing.$spacing-xs;
24
+ width: spacing.$spacing-md;
25
+ height: spacing.$spacing-md;
26
+ }
27
+
28
+ &__lg {
29
+ margin-bottom: spacing.$spacing-sm;
30
+ width: $lg-size;
31
+ height: $lg-size;
32
+ }
33
+ }
34
+
35
+ &__svg {
36
+ animation: spin 1.5s linear infinite;
37
+ fill: color.$color-primary;
38
+ }
39
+ }
40
+
41
+ @keyframes spin {
42
+ 0% {
43
+ transform: rotate(0deg);
44
+ }
45
+
46
+ 100% {
47
+ transform: rotate(360deg);
48
+ }
49
+ }
@@ -0,0 +1,49 @@
1
+ @use '../../foundations/colors/mixins.scss' as color;
2
+ @use '../../foundations/borders/mixins.scss' as border;
3
+ @use '../../foundations/spacing/tokens.scss' as spacing;
4
+ @use '../../foundations/focus/mixins.scss' as focus;
5
+
6
+ .fudis-notification {
7
+ @include border.border-radius('2px');
8
+
9
+ box-sizing: border-box;
10
+ display: flex;
11
+ align-items: flex-start;
12
+ padding: 0 spacing.$spacing-sm 0 spacing.$spacing-xxs;
13
+ width: 100%;
14
+ min-height: spacing.$spacing-md;
15
+
16
+ &__content {
17
+ display: inline-block;
18
+ align-self: center;
19
+ margin: calc(spacing.$spacing-xxs + spacing.$pixel-2) 0;
20
+ }
21
+
22
+ &__warning {
23
+ @include color.bg-color('yellow-light');
24
+ @include border.border('1px', 'solid', 'yellow');
25
+
26
+ border-left-width: spacing.$spacing-xs;
27
+ }
28
+
29
+ &__danger {
30
+ @include color.bg-color('red-light');
31
+ @include border.border('1px', 'solid', 'red');
32
+
33
+ border-left-width: spacing.$spacing-xs;
34
+ }
35
+
36
+ &__success {
37
+ @include color.bg-color('green-light');
38
+ @include border.border('1px', 'solid', 'green');
39
+
40
+ border-left-width: spacing.$spacing-xs;
41
+ }
42
+
43
+ &__info {
44
+ @include color.bg-color('primary-light');
45
+ @include border.border('1px', 'solid', 'primary-dark');
46
+
47
+ border-left-width: spacing.$spacing-xs;
48
+ }
49
+ }
@@ -0,0 +1,18 @@
1
+ @use '../../foundations/spacing/tokens.scss' as spacing;
2
+ @use '../../foundations/colors/mixins.scss' as colorMixin;
3
+ @use '../../foundations/typography/mixins.scss' as typography;
4
+ @use '../../foundations/borders/mixins.scss' as border;
5
+
6
+ /* stylelint-disable unit-disallowed-list */
7
+
8
+ .fudis-popover {
9
+ @include border.border-radius('3px');
10
+ @include typography.body-text-sm-regular;
11
+ @include colorMixin.bg-color('gray-dark');
12
+ @include colorMixin.text-color('white');
13
+
14
+ display: inline-block;
15
+ padding: spacing.$spacing-xxs spacing.$spacing-xs;
16
+ max-width: calc(12rem / var(--fudis-rem-multiplier));
17
+ letter-spacing: normal;
18
+ }
@@ -0,0 +1,107 @@
1
+ /* stylelint-disable unit-disallowed-list */
2
+ @use '../../foundations/borders/mixins.scss' as border;
3
+ @use '../../foundations/spacing/tokens.scss' as spacing;
4
+ @use '../../foundations/typography/mixins.scss' as typography;
5
+ @use '../../foundations/colors/tokens.scss' as color;
6
+ @use '../../foundations/colors/mixins.scss' as colorMixin;
7
+ @use '../../foundations/focus/mixins.scss' as focus;
8
+
9
+ $radio-input-size: calc(1.25rem / var(--fudis-rem-multiplier));
10
+ $radio-indicator-size: calc(0.75rem / var(--fudis-rem-multiplier));
11
+
12
+ .fudis-radio-button {
13
+ @include typography.body-text-md-regular;
14
+ @include colorMixin.text-color('gray-dark');
15
+
16
+ display: inline-flex;
17
+ position: relative;
18
+ align-items: center;
19
+ margin-bottom: 0;
20
+ width: auto;
21
+ min-height: spacing.$spacing-lg;
22
+
23
+ &__label {
24
+ margin-bottom: 0;
25
+ padding-right: spacing.$spacing-xs;
26
+ padding-left: spacing.$spacing-xs;
27
+ }
28
+
29
+ /* Radio button circle */
30
+ &__content {
31
+ display: flex;
32
+ align-items: center;
33
+ transform: translateX(calc(-0.1rem / var(--fudis-rem-multiplier)));
34
+ padding-left: 0;
35
+
36
+ &-wrapper {
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ min-width: spacing.$spacing-lg;
41
+ min-height: spacing.$spacing-lg;
42
+ }
43
+
44
+ &__control {
45
+ @include border.border('1px', 'solid', 'gray-middle');
46
+
47
+ display: inline-flex;
48
+ top: 0;
49
+ left: 0;
50
+ align-items: center;
51
+ justify-content: center;
52
+ border-radius: 50%;
53
+ width: $radio-input-size;
54
+ min-width: $radio-input-size;
55
+ height: $radio-input-size;
56
+
57
+ &--invalid {
58
+ @include border.border('1px', 'solid', 'red');
59
+
60
+ box-shadow: 0 0 0 spacing.$pixel-3 color.$color-red-light;
61
+ }
62
+
63
+ &--disabled {
64
+ @include border.border('1px', 'dashed', 'gray-middle');
65
+ @include colorMixin.bg-color('gray-extra-light');
66
+ }
67
+
68
+ &__indicator {
69
+ @include colorMixin.bg-color('gray-dark');
70
+
71
+ border-radius: 50%;
72
+ width: $radio-indicator-size;
73
+ height: $radio-indicator-size;
74
+ }
75
+ }
76
+ }
77
+
78
+ &__input {
79
+ position: absolute;
80
+ left: 0;
81
+ opacity: 0;
82
+ margin: 0;
83
+ cursor: pointer;
84
+ width: 100%;
85
+ height: 100%;
86
+
87
+ &--disabled {
88
+ cursor: default;
89
+ }
90
+
91
+ /* stylelint-disable-next-line */
92
+ &:focus
93
+ /* stylelint-disable selector-class-pattern */
94
+ + .fudis-radio-button__content
95
+ .fudis-radio-button__content__control {
96
+ @include focus.focus-form-field;
97
+ }
98
+ }
99
+
100
+ /*
101
+ * If RadioButtonGroup is disabled through "disabled" Input, we need to set pointer-event to none for each radio-button.
102
+ * This is not necessary when disabling comes through formControl.
103
+ */
104
+ &--disabled {
105
+ pointer-events: none;
106
+ }
107
+ }
@@ -0,0 +1,7 @@
1
+ @use '../../foundations/spacing/tokens.scss' as spacing;
2
+
3
+ .fudis-radio-button-group {
4
+ .fudis-fieldset-content {
5
+ margin-top: spacing.$spacing-none;
6
+ }
7
+ }
@@ -0,0 +1,99 @@
1
+ @use '../../foundations/colors/tokens.scss' as color;
2
+ @use '../../foundations/spacing/tokens.scss' as spacing;
3
+ @use '../../foundations/focus/mixins' as focus;
4
+ @use '../../foundations/colors/mixins.scss' as colorMixin;
5
+ @use '../../foundations/borders/mixins.scss' as border;
6
+ @use '../../foundations/typography/tokens.scss' as typography;
7
+ @use '../../foundations/typography/mixins.scss' as typographyMixin;
8
+
9
+ .fudis-tab-navigation-bar {
10
+ display: inline-block;
11
+ position: relative;
12
+
13
+ &__wrapper {
14
+ &--primary {
15
+ border-bottom: solid spacing.$pixel-1 color.$color-gray-dark;
16
+ }
17
+
18
+ &--secondary {
19
+ @include border.border-none;
20
+
21
+ padding-top: spacing.$spacing-xxs;
22
+ }
23
+
24
+ &__tab-container {
25
+ display: flex;
26
+ column-gap: spacing.$spacing-xs;
27
+ overflow-x: auto;
28
+ scrollbar-width: none;
29
+
30
+ &--primary {
31
+ padding-top: spacing.$pixel-3;
32
+
33
+ &:first-child {
34
+ padding-left: spacing.$spacing-sm;
35
+ }
36
+
37
+ &:last-child {
38
+ padding-right: spacing.$spacing-sm;
39
+ }
40
+ }
41
+
42
+ &--secondary {
43
+ padding: spacing.$pixel-3;
44
+ }
45
+ }
46
+ }
47
+ }
48
+
49
+ .fudis-tab-navigation-tab {
50
+ @include colorMixin.bg-color('white');
51
+ @include colorMixin.text-color('gray-dark');
52
+ @include typographyMixin.tab-text;
53
+
54
+ box-sizing: border-box;
55
+ display: flex;
56
+ align-items: center;
57
+ cursor: pointer;
58
+ padding-right: spacing.$spacing-sm;
59
+ padding-left: spacing.$spacing-sm;
60
+ text-decoration: none;
61
+
62
+ &:focus-visible {
63
+ @include focus.focus-generic;
64
+ }
65
+
66
+ &--primary {
67
+ @include border.border('1px', 'solid', 'gray-dark');
68
+
69
+ border-bottom: unset;
70
+ border-top-left-radius: spacing.$pixel-2;
71
+ border-top-right-radius: spacing.$pixel-2;
72
+ height: spacing.$spacing-xl;
73
+
74
+ &--active {
75
+ @include colorMixin.bg-color('primary');
76
+ @include colorMixin.text-color('white');
77
+
78
+ border-color: color.$color-primary;
79
+ text-decoration: underline solid;
80
+ }
81
+ }
82
+
83
+ &--secondary {
84
+ @include colorMixin.bg-color('gray-light');
85
+ @include colorMixin.text-color('gray-dark');
86
+ @include border.border('1px', 'solid', 'gray-light');
87
+
88
+ border-radius: spacing.$pixel-1;
89
+ height: spacing.$spacing-lg;
90
+
91
+ &--active {
92
+ @include colorMixin.bg-color('gray-dark');
93
+ @include colorMixin.text-color('white');
94
+ @include border.border('1px', 'solid', 'gray-dark');
95
+
96
+ text-decoration: underline solid;
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,7 @@
1
+ @use '../../foundations/utilities/mixins.scss' as utilities;
2
+
3
+ .fudis-text-area {
4
+ &__input {
5
+ @include utilities.text-area;
6
+ }
7
+ }
@@ -0,0 +1,17 @@
1
+ @use '../../foundations/utilities/mixins.scss' as utilities;
2
+
3
+ .fudis-text-input {
4
+ box-sizing: border-box;
5
+ display: block;
6
+ width: 100%;
7
+
8
+ &__input {
9
+ @include utilities.text-input;
10
+ }
11
+
12
+ // Keep number input arrows visible all the time
13
+ /* stylelint-disable-next-line selector-no-qualifying-type */
14
+ input[type='number']::-webkit-inner-spin-button {
15
+ opacity: 1;
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ @use '../../foundations/spacing/tokens.scss' as spacing;
2
+ @use '../../foundations/typography/mixins.scss' as typography;
3
+ @use '../../foundations/colors/mixins.scss' as colorMixin;
4
+
5
+ .fudis-error-message {
6
+ margin-top: spacing.$spacing-xs;
7
+ margin-bottom: spacing.$spacing-xs;
8
+
9
+ &__body-text {
10
+ @include typography.body-text-md-regular;
11
+ }
12
+
13
+ &__form-error {
14
+ @include colorMixin.text-color('red');
15
+ @include typography.body-text-sm-regular;
16
+ }
17
+ }