@funidata/fudis-core 1.0.0 → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funidata/fudis-core",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Core styles and foundations for Fudis Design System",
5
5
  "files": [
6
6
  "src",
@@ -11,10 +11,6 @@
11
11
  min-height: spacing.$spacing-lg;
12
12
  text-align: center;
13
13
 
14
- &__link {
15
- margin-left: spacing.$spacing-xxs;
16
- }
17
-
18
14
  &__text {
19
15
  flex-grow: 1;
20
16
  }
@@ -1,25 +1,46 @@
1
- @use '../../foundations/borders/mixins.scss' as border;
1
+ @use '../../foundations/borders/mixins.scss' as borders;
2
2
  @use '../../foundations/spacing/tokens.scss' as spacing;
3
3
  @use '../../foundations/colors/tokens.scss' as colors;
4
- @use '../../foundations/colors/mixins.scss' as colorMixin;
4
+ @use '../../foundations/colors/mixins.scss' as colorMixins;
5
5
  @use '../../foundations/utilities/mixins.scss' as utilities;
6
6
  @use '../../foundations/focus/mixins.scss' as focus;
7
7
  @use '../../foundations/typography/mixins.scss' as typography;
8
+ @use '../../foundations/typography/tokens.scss' as typographyTokens;
8
9
 
9
10
  .fudis-checkbox {
10
11
  @include typography.body-text-md-regular;
11
- @include colorMixin.text-color('gray-dark');
12
+ @include colorMixins.text-color('gray-dark');
12
13
 
13
14
  display: inline-flex;
14
15
  position: relative;
15
16
  align-items: center;
16
- cursor: pointer;
17
17
  width: auto;
18
18
  min-height: spacing.$spacing-lg;
19
19
 
20
+ &__label {
21
+ display: inline-flex;
22
+ position: relative;
23
+ align-items: center;
24
+
25
+ &__text {
26
+ position: relative;
27
+ padding-right: spacing.$spacing-xs;
28
+ padding-left: spacing.$spacing-xs;
29
+ }
30
+
31
+ &--disabled {
32
+ pointer-events: none;
33
+ }
34
+ }
35
+
20
36
  &__content {
21
37
  display: inline-flex;
22
38
  align-items: center;
39
+ cursor: pointer;
40
+
41
+ &--disabled {
42
+ cursor: default;
43
+ }
23
44
 
24
45
  &-wrapper {
25
46
  display: flex;
@@ -30,7 +51,7 @@
30
51
  }
31
52
 
32
53
  &__box {
33
- @include border.border('1px', 'solid', 'gray-middle');
54
+ @include borders.border('1px', 'solid', 'gray-middle');
34
55
 
35
56
  display: flex;
36
57
  position: absolute;
@@ -40,19 +61,21 @@
40
61
  width: spacing.$checkbox-size;
41
62
  height: spacing.$checkbox-size;
42
63
 
64
+ &__icon .fudis-icon {
65
+ fill: colors.$color-gray-middle;
66
+ }
67
+
43
68
  &--focused {
44
69
  @include focus.focus-checkbox;
45
70
  }
46
71
 
47
72
  &--disabled {
48
- @include border.border('1px', 'dashed', 'gray-middle');
49
- @include colorMixin.bg-color('gray-extra-light');
50
-
51
- cursor: default;
73
+ @include borders.border('1px', 'dashed', 'gray-middle');
74
+ @include colorMixins.bg-color('gray-extra-light');
52
75
  }
53
76
 
54
77
  &--invalid {
55
- @include border.border('1px', 'solid', 'red');
78
+ @include borders.border('1px', 'solid', 'red');
56
79
 
57
80
  box-shadow: 0 0 0 spacing.$pixel-3 colors.$color-red-light;
58
81
  }
@@ -65,6 +88,19 @@
65
88
  }
66
89
  }
67
90
 
91
+ &__required {
92
+ @include typography.text-field-label;
93
+ @include colorMixins.text-color('gray-middle');
94
+
95
+ display: inline-block;
96
+ vertical-align: baseline;
97
+ text-transform: initial;
98
+ /* stylelint-disable-next-line property-disallowed-list */
99
+ line-height: typographyTokens.$text-input-line-height;
100
+ /* stylelint-disable-next-line property-disallowed-list */
101
+ font-size: typographyTokens.$body-text-sm-font-size;
102
+ }
103
+
68
104
  &__input {
69
105
  @include utilities.box-reset;
70
106
 
@@ -83,3 +119,7 @@
83
119
  pointer-events: none;
84
120
  }
85
121
  }
122
+ /* stylelint-disable selector-class-pattern */
123
+ .fudis-checkbox.fudis-checkbox__label {
124
+ cursor: pointer;
125
+ }
@@ -7,7 +7,6 @@
7
7
  @use '../../foundations/typography/mixins.scss' as typographyMixin;
8
8
 
9
9
  .fudis-tab-navigation-bar {
10
- display: inline-block;
11
10
  position: relative;
12
11
 
13
12
  &__wrapper {