@funidata/fudis-core 0.0.3 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funidata/fudis-core",
3
- "version": "0.0.3",
3
+ "version": "1.0.0",
4
4
  "description": "Core styles and foundations for Fudis Design System",
5
5
  "files": [
6
6
  "src",
@@ -32,11 +32,11 @@
32
32
  "devDependencies": {
33
33
  "@storybook/addon-a11y": "^8.6.12",
34
34
  "@storybook/addon-essentials": "^8.6.12",
35
- "@storybook/addon-storysource": "^8.6.12",
36
35
  "@storybook/blocks": "^8.6.12",
37
36
  "@storybook/html": "^8.6.12",
38
37
  "@storybook/html-vite": "^8.6.12",
39
38
  "@storybook/test": "^8.6.12",
39
+ "@whitespace/storybook-addon-html": "^7.0.0",
40
40
  "nodemon": "^3.1.10",
41
41
  "sass-embedded": "^1.86.3",
42
42
  "storybook": "^8.6.12"
@@ -13,6 +13,7 @@
13
13
 
14
14
  display: grid;
15
15
  grid-template-columns: 1fr;
16
+ align-items: baseline;
16
17
 
17
18
  &__legend {
18
19
  @include utilities.box-reset;
@@ -21,13 +22,14 @@
21
22
 
22
23
  &__main {
23
24
  display: flex;
24
- align-items: flex-end;
25
+ align-items: baseline;
25
26
 
26
27
  &:focus-visible {
27
28
  @include focus.focus-generic;
28
29
  }
29
30
 
30
31
  &__text-content {
32
+ display: inline-block;
31
33
  margin: spacing.$spacing-xxs 0;
32
34
  min-height: spacing.$spacing-md;
33
35
  }
@@ -35,7 +37,18 @@
35
37
  &__text {
36
38
  @include colorMixin.text-color('gray-dark');
37
39
 
38
- margin-right: spacing.$spacing-xs;
40
+ display: inline-block;
41
+ white-space: break-spaces;
42
+ }
43
+
44
+ &__space {
45
+ display: inline-block;
46
+ margin-left: spacing.$spacing-xs;
47
+ width: 0;
48
+
49
+ &::before {
50
+ content: ' ';
51
+ }
39
52
  }
40
53
 
41
54
  &__required {
@@ -43,14 +56,13 @@
43
56
  @include colorMixin.text-color('gray-middle');
44
57
 
45
58
  display: inline-block;
46
- vertical-align: bottom;
47
59
  text-transform: initial;
48
60
  /* stylelint-disable-next-line property-disallowed-list */
49
61
  font-size: typographyTokens.$body-text-sm-font-size;
50
62
  }
51
63
 
52
- &__tooltip-button {
53
- margin-top: auto;
64
+ &__popover-button {
65
+ align-self: flex-end;
54
66
  }
55
67
  }
56
68
 
@@ -7,15 +7,6 @@
7
7
  justify-content: space-between;
8
8
  width: 100%;
9
9
 
10
- &:not(:has(&__errors)):has(&__help-text) {
11
- margin-top: spacing.$spacing-xs;
12
- }
13
-
14
- /* stylelint-disable no-descending-specificity */
15
- &:not(:has(&__errors)) &__character-limit-indicator {
16
- margin-top: 0;
17
- }
18
-
19
10
  &__help-text {
20
11
  @include colorMixin.text-color('gray-dark');
21
12
  @include typography.body-text-sm-regular;
@@ -8,15 +8,38 @@
8
8
  @include typography.text-field-label;
9
9
 
10
10
  display: flex;
11
- align-items: flex-end;
11
+ align-items: baseline;
12
12
  justify-content: space-between;
13
13
 
14
14
  &__content {
15
+ display: inline-block;
15
16
  margin: spacing.$spacing-xxs 0;
16
17
  min-height: spacing.$spacing-md;
17
18
 
19
+ &__button {
20
+ display: inline-block;
21
+ margin-left: spacing.$spacing-xxs;
22
+
23
+ /** The button element inside the fudis-button exceeds the 32px because
24
+ button likely has different font metrics, that affects the baseline calculations. We set here
25
+ the container width to be the expected size of the button, so it does not affect the height of the container
26
+ when we use baseline */
27
+ height: spacing.$spacing-md;
28
+ }
29
+
18
30
  &__text {
19
- margin-right: spacing.$spacing-xs;
31
+ display: inline-block;
32
+ white-space: break-spaces;
33
+ }
34
+
35
+ &__space {
36
+ display: inline-block;
37
+ margin-left: spacing.$spacing-xs;
38
+ width: 0;
39
+
40
+ &::before {
41
+ content: ' ';
42
+ }
20
43
  }
21
44
 
22
45
  &__required {
@@ -24,8 +47,11 @@
24
47
  @include colorMixin.text-color('gray-middle');
25
48
 
26
49
  display: inline-block;
27
- vertical-align: bottom;
50
+ vertical-align: baseline;
28
51
  text-transform: initial;
52
+
53
+ /* stylelint-disable-next-line property-disallowed-list */
54
+ line-height: typographyToken.$text-input-line-height;
29
55
  /* stylelint-disable-next-line property-disallowed-list */
30
56
  font-size: typographyToken.$body-text-sm-font-size;
31
57
  }