@funidata/fudis-core 2.1.0 → 2.2.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/_styles.scss CHANGED
@@ -11,8 +11,10 @@
11
11
  @forward './src/components/alert/alert';
12
12
  @forward './src/components/button/button';
13
13
  @forward './src/components/badge/badge';
14
+ @forward './src/components/breadcrumbs/breadcrumbs';
14
15
  @forward './src/components/checkbox/checkbox';
15
16
  @forward './src/components/checkbox-group/checkbox-group';
17
+ @forward './src/components/description-list/description-list';
16
18
  @forward './src/components/error-summary/error-summary';
17
19
  @forward './src/components/fieldset/fieldset';
18
20
  @forward './src/components/guidance/guidance';
@@ -25,6 +27,8 @@
25
27
  @forward './src/components/popover/popover';
26
28
  @forward './src/components/radio-button/radio-button';
27
29
  @forward './src/components/radio-button-group/radio-button-group';
30
+ @forward './src/components/table/table';
31
+ @forward './src/components/table/table-mixins';
28
32
  @forward './src/components/tab-navigation/tab-navigation';
29
33
  @forward './src/components/text-area/text-area';
30
34
  @forward './src/components/text-input/text-input';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funidata/fudis-core",
3
- "version": "2.1.0",
3
+ "version": "2.2.0-rc.0",
4
4
  "description": "Core styles and foundations for Fudis Design System",
5
5
  "files": [
6
6
  "src",
@@ -0,0 +1,24 @@
1
+ @use '../../foundations/utilities/mixins.scss' as utilities;
2
+ @use '../../foundations/typography/mixins.scss' as typography;
3
+ @use '../../foundations/spacing/tokens.scss' as spacing;
4
+
5
+ .fudis-breadcrumbs {
6
+ @include typography.body-text-md-regular;
7
+ @include utilities.box-reset;
8
+
9
+ display: flex;
10
+ flex-wrap: wrap;
11
+ align-items: center;
12
+ margin-bottom: spacing.$spacing-md;
13
+ list-style: none;
14
+
15
+ &__item {
16
+ display: flex;
17
+ align-items: center;
18
+ min-height: spacing.$spacing-lg;
19
+
20
+ &-link {
21
+ @include typography.link-inherit;
22
+ }
23
+ }
24
+ }
@@ -24,7 +24,7 @@
24
24
  @include focus.focus-generic;
25
25
  }
26
26
 
27
- &:has(&__icon):not(&__label--hidden) {
27
+ &:has(&__icon) {
28
28
  padding-left: 0;
29
29
  }
30
30
 
@@ -63,7 +63,7 @@
63
63
  min-height: spacing.$spacing-lg;
64
64
  }
65
65
 
66
- &__icon-only {
66
+ &__extra-small {
67
67
  padding: 0;
68
68
  width: spacing.$spacing-lg;
69
69
  min-width: initial;
@@ -71,12 +71,6 @@
71
71
  }
72
72
  }
73
73
 
74
- &__label {
75
- &--hidden {
76
- padding: 0 spacing.$spacing-xs;
77
- }
78
- }
79
-
80
74
  &__icon {
81
75
  position: relative;
82
76
  width: spacing.$spacing-lg;
@@ -52,6 +52,7 @@
52
52
 
53
53
  &__box {
54
54
  @include borders.border('1px', 'solid', 'gray-middle');
55
+ @include colorMixins.bg-color('white');
55
56
 
56
57
  display: flex;
57
58
  position: absolute;
@@ -0,0 +1,95 @@
1
+ @use '../../foundations/colors/mixins' as colorMixin;
2
+ @use '../../foundations/spacing/tokens.scss' as spacing;
3
+ @use '../../foundations/typography/mixins' as typography;
4
+ @use '../../foundations/typography/tokens.scss' as typographyTokens;
5
+ @use '../../foundations/utilities/mixins.scss' as utilities;
6
+
7
+ .fudis-dl {
8
+ @include utilities.box-reset;
9
+
10
+ .fudis-dl-item {
11
+ @include utilities.box-reset;
12
+
13
+ display: block;
14
+ min-height: spacing.$spacing-md;
15
+ }
16
+
17
+ .fudis-dl-item-term {
18
+ &__regular {
19
+ @include typography.description-list-key-typography;
20
+ @include colorMixin.text-color('gray-dark');
21
+
22
+ display: flex;
23
+ align-items: flex-start;
24
+ margin: spacing.$spacing-xxs 0;
25
+ min-height: spacing.$spacing-md;
26
+ }
27
+
28
+ &__compact {
29
+ @include typography.description-list-compact-key-typography;
30
+ @include colorMixin.text-color('gray-dark');
31
+
32
+ display: inline-block;
33
+ position: relative;
34
+ padding-left: spacing.$spacing-xs;
35
+
36
+ &::before {
37
+ @include colorMixin.bg-color('gray-middle');
38
+
39
+ display: inline-block;
40
+ position: absolute;
41
+ top: spacing.$pixel-2;
42
+ left: 0;
43
+ width: spacing.$pixel-1;
44
+ height: 80%;
45
+ content: '';
46
+ }
47
+
48
+ &__colon {
49
+ font-weight: typographyTokens.$font-weight-light;
50
+ }
51
+ }
52
+ }
53
+
54
+ .fudis-dl-item-details {
55
+ &__regular {
56
+ @include typography.description-list-value-typography;
57
+ @include colorMixin.text-color('gray-dark');
58
+
59
+ display: flex;
60
+ flex-direction: column;
61
+ margin: 0;
62
+ min-height: spacing.$spacing-sm;
63
+
64
+ &__parenthesis {
65
+ display: none;
66
+ }
67
+
68
+ &__sub-heading {
69
+ @include colorMixin.text-color('gray-dark');
70
+ @include typography.description-list-value-typography;
71
+
72
+ margin-top: 0;
73
+ margin-bottom: spacing.$spacing-xxs;
74
+ font-weight: typographyTokens.$font-weight-regular;
75
+ }
76
+ }
77
+
78
+ &__compact {
79
+ @include typography.description-list-compact-value-typography;
80
+ @include colorMixin.text-color('gray-dark');
81
+
82
+ display: inline-block;
83
+ margin-left: 0;
84
+ padding-left: spacing.$spacing-xxs;
85
+
86
+ &__parenthesis {
87
+ display: initial;
88
+ }
89
+
90
+ &__sub-heading {
91
+ @include utilities.box-reset;
92
+ }
93
+ }
94
+ }
95
+ }
@@ -21,6 +21,8 @@
21
21
  list-style: none;
22
22
 
23
23
  &__item {
24
+ @include typography.body-text-md-regular;
25
+
24
26
  position: relative;
25
27
  margin-left: spacing.$spacing-sm;
26
28
  padding-left: spacing.$spacing-xxs;
@@ -15,4 +15,15 @@
15
15
  @include typography.link-lg;
16
16
  }
17
17
  }
18
+
19
+ &__external {
20
+ padding-right: spacing.$spacing-lg;
21
+
22
+ &__icon {
23
+ position: absolute;
24
+ top: 50%;
25
+ right: 0;
26
+ transform: translateY(-50%);
27
+ }
28
+ }
18
29
  }
@@ -43,6 +43,7 @@ $radio-indicator-size: calc(0.75rem / var(--fudis-rem-multiplier));
43
43
 
44
44
  &__control {
45
45
  @include border.border('1px', 'solid', 'gray-middle');
46
+ @include colorMixin.bg-color('white');
46
47
 
47
48
  display: inline-flex;
48
49
  top: 0;
@@ -9,6 +9,55 @@
9
9
  .fudis-tab-navigation-bar {
10
10
  position: relative;
11
11
 
12
+ &__button-container {
13
+ @include colorMixin.bg-color('white');
14
+
15
+ &--right {
16
+ display: flex;
17
+ position: absolute;
18
+ top: 0;
19
+ right: 0;
20
+ align-items: flex-start;
21
+ justify-content: flex-end;
22
+ width: spacing.$spacing-xl;
23
+ height: spacing.$tab-navigation-button-height;
24
+ }
25
+
26
+ &--left {
27
+ display: flex;
28
+ position: absolute;
29
+ top: 0;
30
+ left: 0;
31
+ align-items: flex-start;
32
+ justify-content: flex-start;
33
+ width: spacing.$spacing-xl;
34
+ height: spacing.$tab-navigation-button-height;
35
+ }
36
+
37
+ &__button {
38
+ @include colorMixin.bg-color('white');
39
+
40
+ position: absolute;
41
+ top: 50%;
42
+ transform: translate(0, -50%);
43
+ border-style: none;
44
+ cursor: pointer;
45
+ padding: 0;
46
+
47
+ &:focus {
48
+ @include focus.focus-generic;
49
+ }
50
+
51
+ &--right {
52
+ right: 0;
53
+ }
54
+
55
+ &--left {
56
+ left: 0;
57
+ }
58
+ }
59
+ }
60
+
12
61
  &__wrapper {
13
62
  &--primary {
14
63
  border-bottom: solid spacing.$pixel-1 color.$color-gray-dark;
@@ -0,0 +1,153 @@
1
+ @use '../../foundations/typography/mixins.scss' as typography;
2
+ @use '../../foundations/spacing/tokens' as spacing;
3
+ @use '../../foundations/colors/tokens' as color;
4
+
5
+ @mixin fudis-table-default {
6
+ width: 100%;
7
+ border-collapse: collapse;
8
+
9
+ &__caption {
10
+ @include typography.table-caption;
11
+
12
+ padding-bottom: spacing.$spacing-xs;
13
+ caption-side: top;
14
+ text-align: left;
15
+ }
16
+
17
+ &__header {
18
+ @include typography.table-header;
19
+
20
+ border-bottom: spacing.$pixel-2 solid color.$color-gray-light;
21
+ padding: spacing.$spacing-sm;
22
+ vertical-align: bottom;
23
+
24
+ &__align {
25
+ &__left {
26
+ text-align: left;
27
+ }
28
+
29
+ &__center {
30
+ text-align: center;
31
+ }
32
+
33
+ &__right {
34
+ text-align: right;
35
+ }
36
+ }
37
+ }
38
+
39
+ &__cell {
40
+ @include typography.table-cell-default;
41
+
42
+ border-bottom: spacing.$pixel-1 solid color.$color-gray-light;
43
+ padding: spacing.$spacing-sm;
44
+
45
+ &__align {
46
+ &__left {
47
+ text-align: left;
48
+ }
49
+
50
+ &__center {
51
+ text-align: center;
52
+ }
53
+
54
+ &__right {
55
+ text-align: right;
56
+ }
57
+ }
58
+
59
+ &__vertical-align {
60
+ &__top {
61
+ align-content: start;
62
+ }
63
+
64
+ &__center {
65
+ align-content: center;
66
+ }
67
+
68
+ &__bottom {
69
+ align-content: end;
70
+ }
71
+ }
72
+
73
+ /* Checkbox needs different padding-top since its clickable area expands out of visible component outlines */
74
+ &__checkbox {
75
+ padding-top: calc(spacing.$spacing-xs + spacing.$spacing-xxs);
76
+ }
77
+ }
78
+ }
79
+
80
+ @mixin fudis-table-mobile {
81
+ width: 100%;
82
+ border-collapse: collapse;
83
+
84
+ &__caption {
85
+ @include typography.table-caption;
86
+
87
+ padding-bottom: spacing.$spacing-xs;
88
+ caption-side: top;
89
+ text-align: left;
90
+ }
91
+
92
+ &__header {
93
+ @include typography.table-header;
94
+
95
+ border-bottom: spacing.$pixel-2 solid color.$color-gray-light;
96
+ padding: spacing.$spacing-xs;
97
+ vertical-align: bottom;
98
+
99
+ &__align {
100
+ &__left {
101
+ text-align: left;
102
+ }
103
+
104
+ &__center {
105
+ text-align: center;
106
+ }
107
+
108
+ &__right {
109
+ text-align: right;
110
+ }
111
+ }
112
+ }
113
+
114
+ &__cell {
115
+ @include typography.table-cell-mobile;
116
+
117
+ border-bottom: spacing.$pixel-1 solid color.$color-gray-light;
118
+ padding: spacing.$spacing-xs;
119
+
120
+ &__align {
121
+ &__left {
122
+ text-align: left;
123
+ }
124
+
125
+ &__center {
126
+ text-align: center;
127
+ }
128
+
129
+ &__right {
130
+ text-align: right;
131
+ }
132
+ }
133
+
134
+ &__vertical-align {
135
+ &__top {
136
+ align-content: start;
137
+ }
138
+
139
+ &__center {
140
+ align-content: center;
141
+ }
142
+
143
+ &__bottom {
144
+ align-content: end;
145
+ }
146
+ }
147
+
148
+ /* Checkbox needs different padding-top since its clickable area expands out of visible component outlines */
149
+ &__checkbox {
150
+ padding-top: spacing.$spacing-xxs;
151
+ }
152
+ }
153
+ }
@@ -0,0 +1,10 @@
1
+ @use './table-mixins' as mixins;
2
+ @use '../../foundations/breakpoints/mixins' as breakpoints;
3
+
4
+ .fudis-table {
5
+ @include mixins.fudis-table-mobile;
6
+
7
+ @include breakpoints.breakpoint('md') {
8
+ @include mixins.fudis-table-default;
9
+ }
10
+ }
@@ -127,18 +127,37 @@
127
127
  font-weight: tokens.$font-weight-bold;
128
128
  }
129
129
 
130
- // Table caption
130
+ // Table styles
131
131
 
132
132
  @mixin table-caption {
133
133
  @include colorMixin.text-color('gray-dark');
134
134
 
135
+ line-height: tokens.$table-caption-line-height;
136
+ font-family: tokens.$font-family;
137
+ font-size: tokens.$heading-sm-font-size;
138
+ font-weight: tokens.$font-weight-medium;
139
+ }
140
+
141
+ @mixin table-header {
142
+ @include colorMixin.text-color('gray-dark');
143
+
135
144
  text-transform: uppercase;
136
- line-height: tokens.$text-input-line-height;
145
+ line-height: tokens.$table-header-line-height;
137
146
  font-family: tokens.$font-family;
138
147
  font-size: tokens.$body-text-md-font-size;
139
148
  font-weight: tokens.$font-weight-regular;
140
149
  }
141
150
 
151
+ @mixin table-cell-default {
152
+ @include colorMixin.text-color('gray-dark');
153
+ @include body-text-lg-light;
154
+ }
155
+
156
+ @mixin table-cell-mobile {
157
+ @include colorMixin.text-color('gray-dark');
158
+ @include body-text-md-light;
159
+ }
160
+
142
161
  // Other UI styles
143
162
 
144
163
  // Text-input, text-area, dropdown, legend components
@@ -247,7 +266,7 @@
247
266
 
248
267
  display: inline-block;
249
268
  position: relative;
250
- text-decoration: underline solid;
269
+ text-decoration: underline;
251
270
  font-family: tokens.$font-family;
252
271
  overflow-wrap: anywhere;
253
272
 
@@ -30,6 +30,8 @@ $heading-sm-line-height: calc(1.125rem / var(--fudis-rem-multiplier));
30
30
  $text-input-line-height: calc(1.25rem / var(--fudis-rem-multiplier));
31
31
  $form-label-line-height: calc(1.5rem / var(--fudis-rem-multiplier));
32
32
  $badge-line-height: calc(0.875rem / var(--fudis-rem-multiplier));
33
+ $table-caption-line-height: calc(1.125rem / var(--fudis-rem-multiplier));
34
+ $table-header-line-height: calc(1.5rem / var(--fudis-rem-multiplier));
33
35
 
34
36
  // Font weight
35
37
  $font-weight-light: 300;