@dative-gpi/foundation-shared-components 0.0.4 → 0.0.6

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 (52) hide show
  1. package/components/FSBreadcrumbs.vue +23 -18
  2. package/components/FSButton.vue +138 -30
  3. package/components/FSCheckbox.vue +41 -26
  4. package/components/FSCol.vue +56 -16
  5. package/components/FSColor.vue +80 -0
  6. package/components/FSFadeOut.vue +11 -6
  7. package/components/FSIcon.vue +5 -3
  8. package/components/FSNumberField.vue +65 -0
  9. package/components/FSPasswordField.vue +119 -0
  10. package/components/FSRadio.vue +40 -26
  11. package/components/FSRadioGroup.vue +6 -8
  12. package/components/FSRow.vue +57 -17
  13. package/components/FSSearchField.vue +122 -0
  14. package/components/FSSlideGroup.vue +17 -13
  15. package/components/FSSpan.vue +28 -4
  16. package/components/FSSwitch.vue +45 -28
  17. package/components/FSTab.vue +36 -22
  18. package/components/FSTabs.vue +21 -12
  19. package/components/FSTag.vue +48 -31
  20. package/components/FSTagField.vue +152 -0
  21. package/components/FSTagGroup.vue +60 -0
  22. package/components/FSText.vue +78 -0
  23. package/components/FSTextField.vue +122 -13
  24. package/components/FSWrapGroup.vue +16 -13
  25. package/composables/useColors.ts +31 -39
  26. package/models/FSButtons.ts +111 -0
  27. package/models/FSTags.ts +8 -0
  28. package/models/FSTextFields.ts +17 -0
  29. package/package.json +5 -4
  30. package/styles/components/fs_breadcrumbs.scss +29 -11
  31. package/styles/components/fs_button.scss +36 -9
  32. package/styles/components/fs_checkbox.scss +3 -4
  33. package/styles/components/fs_col.scss +87 -2
  34. package/styles/components/fs_color.scss +5 -0
  35. package/styles/components/fs_icon.scss +4 -4
  36. package/styles/components/fs_password_field.scss +10 -0
  37. package/styles/components/fs_radio.scss +3 -4
  38. package/styles/components/fs_row.scss +86 -1
  39. package/styles/components/fs_span.scss +8 -3
  40. package/styles/components/fs_switch.scss +4 -4
  41. package/styles/components/fs_tabs.scss +8 -9
  42. package/styles/components/fs_tag.scss +8 -8
  43. package/styles/components/fs_tag_field.scss +10 -0
  44. package/styles/components/fs_text.scss +5 -0
  45. package/styles/components/fs_text_field.scss +46 -17
  46. package/styles/components/index.scss +18 -14
  47. package/styles/globals/fixes.scss +5 -0
  48. package/styles/globals/index.scss +4 -1
  49. package/styles/globals/overrides.scss +26 -4
  50. package/styles/globals/text_fonts.scss +48 -24
  51. package/themes/default.ts +6 -6
  52. package/defaults/FSButtons.ts +0 -63
@@ -1,6 +1,91 @@
1
1
  .fs-col {
2
2
  display: flex;
3
3
  flex-direction: column;
4
- align-items: flex-start;
5
- gap: var(--fs-col-gap)
4
+ gap: var(--fs-col-gap);
5
+
6
+ &-top-left {
7
+ justify-content: flex-start;
8
+ align-items: flex-start;
9
+ }
10
+
11
+ &-top-center {
12
+ justify-content: flex-start;
13
+ align-items: center;
14
+ }
15
+
16
+ &-top-right {
17
+ justify-content: flex-start;
18
+ align-items: flex-end;
19
+ }
20
+
21
+ &-center-left {
22
+ justify-content: center;
23
+ align-items: flex-start;
24
+ }
25
+
26
+ &-center-center {
27
+ justify-content: center;
28
+ align-items: center;
29
+ }
30
+
31
+ &-center-right {
32
+ justify-content: center;
33
+ align-items: flex-end;
34
+ }
35
+
36
+ &-bottom-left {
37
+ justify-content: flex-end;
38
+ align-items: flex-start;
39
+ }
40
+
41
+ &-bottom-center {
42
+ justify-content: flex-end;
43
+ align-items: center;
44
+ }
45
+
46
+ &-bottom-right {
47
+ justify-content: flex-end;
48
+ align-items: flex-end;
49
+ }
50
+ }
51
+
52
+ .fs-col > .fs-col-width {
53
+ &-fill {
54
+ align-self: stretch;
55
+ }
56
+
57
+ &-fixed {
58
+ width: var(--fs-col-width);
59
+ }
60
+ }
61
+
62
+ :not(.fs-col) > .fs-col-width {
63
+ &-fill {
64
+ flex: 1 0 0;
65
+ }
66
+
67
+ &-fixed {
68
+ width: var(--fs-col-width);
69
+ }
70
+ }
71
+
72
+ .fs-col > .fs-col-height {
73
+ &-fill {
74
+ flex: 1 0 0;
75
+ }
76
+
77
+ &-fixed {
78
+ height: var(--fs-col-height);
79
+ }
80
+
81
+ }
82
+
83
+ :not(.fs-col) > .fs-col-height {
84
+ &-fill {
85
+ align-self: stretch;
86
+ }
87
+
88
+ &-fixed {
89
+ height: var(--fs-col-height);
90
+ }
6
91
  }
@@ -0,0 +1,5 @@
1
+ .fs-color {
2
+ background-color: var(--fs-color-background-color);
3
+ color: var(--fs-color-color);
4
+ border-radius: 4px;
5
+ }
@@ -3,12 +3,12 @@
3
3
  }
4
4
 
5
5
  .fs-icon-m {
6
- @include mobile {
7
- font-size: 18px !important;
6
+ @include web {
7
+ font-size: 20px !important;
8
8
  }
9
9
 
10
- @include web {
11
- font-size: 24px !important;
10
+ @include mobile {
11
+ font-size: 16px !important;
12
12
  }
13
13
  }
14
14
 
@@ -0,0 +1,10 @@
1
+ .fs-password-field-icon {
2
+ opacity: 1 !important;
3
+ cursor: var(--fs-password-field-cursor) !important;
4
+ color: var(--fs-password-field-base-text) !important;
5
+ transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
6
+
7
+ &:hover {
8
+ color: var(--fs-password-field-dark-text) !important;
9
+ }
10
+ }
@@ -1,15 +1,14 @@
1
1
  .fs-radio {
2
2
  cursor: var(--fs-radio-cursor) !important;
3
- color: var(--fs-radio-base-color) !important;
3
+ color: var(--fs-radio-radio-color) !important;
4
4
  }
5
5
 
6
6
  .fs-radio-label {
7
7
  cursor: var(--fs-radio-cursor) !important;
8
- color: var(--fs-radio-base-text);
9
- height: 20px !important;
8
+ color: var(--fs-radio-color) !important;
10
9
  user-select: none;
11
10
  }
12
11
 
13
12
  .fs-radio-description {
14
- color: var(--fs-radio-base-text);
13
+ color: var(--fs-radio-color) !important;
15
14
  }
@@ -1,6 +1,91 @@
1
1
  .fs-row {
2
2
  display: flex;
3
- align-items: flex-start;
4
3
  flex-wrap: var(--fs-row-flex-wrap);
5
4
  gap: var(--fs-row-gap);
5
+
6
+ &-top-left {
7
+ align-items: flex-start;
8
+ justify-content: flex-start;
9
+ }
10
+
11
+ &-top-center {
12
+ align-items: flex-start;
13
+ justify-content: center;
14
+ }
15
+
16
+ &-top-right {
17
+ align-items: flex-start;
18
+ justify-content: flex-end;
19
+ }
20
+
21
+ &-center-left {
22
+ align-items: center;
23
+ justify-content: flex-start;
24
+ }
25
+
26
+ &-center-center {
27
+ align-items: center;
28
+ justify-content: center;
29
+ }
30
+
31
+ &-center-right {
32
+ align-items: center;
33
+ justify-content: flex-end;
34
+ }
35
+
36
+ &-bottom-left {
37
+ align-items: flex-end;
38
+ justify-content: flex-start;
39
+ }
40
+
41
+ &-bottom-center {
42
+ align-items: flex-end;
43
+ justify-content: center;
44
+ }
45
+
46
+ &-bottom-right {
47
+ align-items: flex-end;
48
+ justify-content: flex-end;
49
+ }
50
+ }
51
+
52
+ :not(.fs-col) > .fs-row-width {
53
+ &-fill {
54
+ flex: 1 0 0;
55
+ }
56
+
57
+ &-fixed {
58
+ width: var(--fs-row-width);
59
+ }
60
+ }
61
+
62
+ .fs-col > .fs-row-width {
63
+ &-fill {
64
+ align-self: stretch;
65
+ }
66
+
67
+ &-fixed {
68
+ width: var(--fs-row-width);
69
+ }
70
+ }
71
+
72
+ :not(.fs-col) > .fs-row-height {
73
+ &-fill {
74
+ align-self: stretch;
75
+ }
76
+
77
+ &-fixed {
78
+ height: var(--fs-row-height);
79
+ }
80
+
81
+ }
82
+
83
+ .fs-col > .fs-row-height {
84
+ &-fill {
85
+ flex: 1 0 0;
86
+ }
87
+
88
+ &-fixed {
89
+ width: var(--fs-row-height);
90
+ }
6
91
  }
@@ -1,8 +1,13 @@
1
1
  .fs-span {
2
- height: 100%;
3
- display: flex;
4
- align-items: center;
2
+ padding-inline-end: 2px;
3
+ }
4
+
5
+ .fs-span-ellipsis {
5
6
  overflow: hidden;
6
7
  white-space: nowrap;
7
8
  text-overflow: ellipsis;
9
+ }
10
+
11
+ .fs-span-pre-wrap {
12
+ white-space: pre-wrap;
8
13
  }
@@ -29,23 +29,23 @@
29
29
 
30
30
  .fs-switch-label {
31
31
  cursor: var(--fs-switch-cursor) !important;
32
- color: var(--fs-switch-base-text);
32
+ color: var(--fs-switch-color) !important;
33
33
  user-select: none;
34
34
  }
35
35
 
36
36
  .fs-switch-description {
37
- color: var(--fs-switch-base-text);
37
+ color: var(--fs-switch-color) !important;
38
38
  }
39
39
 
40
40
  .v-switch__track {
41
41
  width: 40px !important;
42
42
  height: 24px !important;
43
- background-color: var(--fs-switch-base-color) !important;
43
+ background-color: var(--fs-switch-track-color) !important;
44
44
 
45
45
  }
46
46
 
47
47
  .v-switch__thumb {
48
48
  width: 16px !important;
49
49
  height: 16px !important;
50
- background-color: var(--fs-switch-base-background) !important;
50
+ background-color: var(--fs-switch-thumb-color) !important;
51
51
  }
@@ -12,18 +12,17 @@
12
12
  }
13
13
 
14
14
  .fs-tab {
15
- display: flex;
16
15
  padding: 0 16px;
17
- border-bottom: 1px solid var(--fs-group-light-text) !important;
18
- color: var(--fs-group-light-text) !important;
16
+ border-bottom: 1px solid var(--fs-group-color) !important;
17
+ color: var(--fs-group-color) !important;
19
18
 
20
19
  & .fs-tab-label {
21
20
  @extend .text-button;
22
21
  }
23
22
 
24
23
  &:hover {
25
- border-bottom: 1px solid var(--fs-group-dark-text) !important;
26
- color: var(--fs-group-dark-text) !important;
24
+ border-bottom: 1px solid var(--fs-group-hover-color) !important;
25
+ color: var(--fs-group-hover-color) !important;
27
26
  }
28
27
 
29
28
  @include web {
@@ -36,8 +35,8 @@
36
35
  }
37
36
 
38
37
  .fs-tab-active {
39
- background-color: var(--fs-group-light-color) !important;
40
- color: var(--fs-group-dark-text) !important;
38
+ background-color: var(--fs-group-hover-background-color) !important;
39
+ color: var(--fs-group-hover-color) !important;
41
40
  border-bottom: 0 !important;
42
41
 
43
42
  &:hover {
@@ -48,8 +47,8 @@
48
47
  .fs-tab-tag {
49
48
  padding: 0 8px;
50
49
  border-radius: 4px;
51
- background-color: var(--fs-group-base-color);
52
- color: var(--fs-group-light-color);
50
+ background-color: var(--fs-tab-tag-background-color);
51
+ color: var(--fs-tab-tag-color);
53
52
 
54
53
  @include web {
55
54
  min-width: 28px;
@@ -1,8 +1,8 @@
1
1
  .fs-tag {
2
2
  padding: 0 8px !important;
3
3
  border-radius: 2px !important;
4
- background-color: var(--fs-tag-light-color) !important;
5
- color: var(--fs-tag-light-text) !important;
4
+ background-color: var(--fs-tag-background-color) !important;
5
+ color: var(--fs-tag-color) !important;
6
6
 
7
7
  @include web {
8
8
  height: 28px !important;
@@ -18,17 +18,17 @@
18
18
  margin: 4px 0 !important;
19
19
  border-radius: 2px !important;
20
20
  box-shadow: none !important;
21
- background-color: var(--fs-tag-light-color) !important;
22
- color: var(--fs-tag-light-text) !important;
21
+ background-color: var(--fs-tag-background-color) !important;
22
+ color: var(--fs-tag-color) !important;
23
23
 
24
24
  &:hover {
25
- background-color: var(--fs-tag-base-color) !important;
26
- color: var(--fs-tag-base-text) !important;
25
+ background-color: var(--fs-tag-hover-background-color) !important;
26
+ color: var(--fs-tag-hover-color) !important;
27
27
  }
28
28
 
29
29
  &:active {
30
- background-color: var(--fs-tag-dark-color) !important;
31
- color: var(--fs-tag-dark-text) !important;
30
+ background-color: var(--fs-tag-active-background-color) !important;
31
+ color: var(--fs-tag-active-color) !important;
32
32
  }
33
33
 
34
34
  @include web {
@@ -0,0 +1,10 @@
1
+ .fs-tag-field-icon {
2
+ opacity: 1 !important;
3
+ cursor: var(--fs-tag-field-cursor) !important;
4
+ color: var(--fs-tag-field-base-text) !important;
5
+ transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
6
+
7
+ &:hover {
8
+ color: var(--fs-tag-field-dark-text) !important;
9
+ }
10
+ }
@@ -0,0 +1,5 @@
1
+ .fs-text {
2
+ color: var(--fs-text-color);
3
+
4
+ @extend .fs-span;
5
+ }
@@ -1,24 +1,53 @@
1
- .fs-text-field > .v-input__control > .v-field {
2
- border: 1.3px solid #000000 !important;
3
- border-radius: 4px !important;
1
+ .fs-text-field {
2
+ padding: 0px !important;
3
+ width: 100%;
4
4
 
5
- & > .v-field__outline {
6
- display: none;
7
- }
8
- }
5
+ & > .v-input__control > .v-field {
6
+ border: 1px solid var(--fs-text-field-border-color) !important;
7
+ border-radius: 4px !important;
8
+ padding: 0 16px !important;
9
9
 
10
- .fs-text-field > .v-input__control > .v-field > .v-field__field > input {
11
- @extend .text-body;
10
+ &--error {
11
+ border-color: var(--fs-text-field-error-border-color) !important;
12
+ }
12
13
 
13
- padding: 12px 16px !important;
14
+ &:not(.v-field--error):focus-within {
15
+ border-color: var(--fs-text-field-active-border-color) !important;
16
+ }
14
17
 
15
- @include web {
16
- min-height: 44px !important;
17
- height: 44px !important;
18
- }
18
+ & > .v-field__outline {
19
+ display: none;
20
+ }
19
21
 
20
- @include mobile {
21
- min-height: 40px !important;
22
- height: 40px !important;
22
+ & > .v-field__field > input {
23
+ @extend .text-body;
24
+
25
+ padding-inline: 0 !important;
26
+ cursor: var(--fs-text-field-cursor) !important;
27
+ color: var(--fs-text-field-color);
28
+
29
+ @include web {
30
+ min-height: 46px !important;
31
+ height: 46px !important;
32
+ }
33
+
34
+ @include mobile {
35
+ min-height: 34px !important;
36
+ height: 34px !important;
37
+ }
38
+ }
23
39
  }
40
+ }
41
+
42
+ .fs-text-field-label {
43
+ color: var(--fs-text-field-color);
44
+ }
45
+
46
+ .fs-text-field-messages {
47
+ align-self: stretch;
48
+ color: var(--fs-text-field-error-color);
49
+ }
50
+
51
+ .fs-text-field-description {
52
+ color: var(--fs-text-field-color);
24
53
  }
@@ -1,14 +1,18 @@
1
- @import 'fs_breadcrumbs.scss';
2
- @import 'fs_button.scss';
3
- @import 'fs_checkbox.scss';
4
- @import 'fs_col.scss';
5
- @import 'fs_fade_out.scss';
6
- @import 'fs_icon.scss';
7
- @import 'fs_radio.scss';
8
- @import 'fs_row.scss';
9
- @import 'fs_span.scss';
10
- @import 'fs_switch.scss';
11
- @import 'fs_tag.scss';
12
- @import 'fs_tabs.scss';
13
- @import 'fs_text_field.scss';
14
- @import 'fs_wrap_group.scss';
1
+ @import "fs_breadcrumbs.scss";
2
+ @import "fs_button.scss";
3
+ @import "fs_checkbox.scss";
4
+ @import "fs_col.scss";
5
+ @import "fs_color.scss";
6
+ @import "fs_fade_out.scss";
7
+ @import "fs_icon.scss";
8
+ @import "fs_password_field.scss";
9
+ @import "fs_radio.scss";
10
+ @import "fs_row.scss";
11
+ @import "fs_span.scss";
12
+ @import "fs_switch.scss";
13
+ @import "fs_tag.scss";
14
+ @import "fs_tabs.scss";
15
+ @import "fs_tag_field.scss";
16
+ @import "fs_text_field.scss";
17
+ @import "fs_text.scss";
18
+ @import "fs_wrap_group.scss";
@@ -0,0 +1,5 @@
1
+ .fs-tab > .v-btn__content > .fs-row > .text-button {
2
+ @include web {
3
+ padding-top: 2px !important;
4
+ }
5
+ }
@@ -3,4 +3,7 @@
3
3
  @import 'text_fonts.scss';
4
4
  @import 'touchscreen.scss';
5
5
  @import 'scrollbars.scss';
6
- @import 'overrides.scss';
6
+ @import 'overrides.scss';
7
+
8
+ // Find a better way to fix this
9
+ @import 'fixes.scss';
@@ -8,6 +8,28 @@
8
8
  display: none;
9
9
  }
10
10
 
11
+ // Margin with prepend / append downgraded to default gap
12
+ .v-input > .v-input__prepend {
13
+ margin-inline-end: 8px !important;
14
+ }
15
+
16
+ .v-input > .v-input__append {
17
+ margin-inline-start: 8px !important;
18
+ }
19
+
20
+ // No up / down buttons in input field of type number
21
+ input[type=number] {
22
+ -moz-appearance: textfield;
23
+ appearance: textfield;
24
+ margin: 0;
25
+ }
26
+
27
+ input[type=number]::-webkit-inner-spin-button,
28
+ input[type=number]::-webkit-outer-spin-button {
29
+ -webkit-appearance: none;
30
+ margin: 0;
31
+ }
32
+
11
33
  /***** Applies to all slide groups (FSTabs, FSSlideGroup, FSWrapGroup) *****/
12
34
 
13
35
  // On touchscreen, hide arrows
@@ -18,7 +40,7 @@
18
40
  min-width: 24px !important;
19
41
  width: 24px !important;
20
42
  flex: 1 1 0 !important;
21
- color: var(--fs-group-base-text);
43
+ color: var(--fs-group-color);
22
44
 
23
45
  @include touchscreen {
24
46
  display: none !important;
@@ -28,14 +50,14 @@
28
50
  // Light background color & dark text color on arrows when hovered
29
51
  .v-slide-group__prev:hover,
30
52
  .v-slide-group__next:hover {
31
- background-color: var(--fs-group-light-color);
32
- color: var(--fs-group-dark-text);
53
+ background-color: var(--fs-group-hover-background-color);
54
+ color: var(--fs-group-hover-color);
33
55
  }
34
56
 
35
57
  // Light text color on arrows when disabled
36
58
  .v-slide-group__prev--disabled,
37
59
  .v-slide-group__next--disabled {
38
- color: var(--fs-group-light-text) !important;
60
+ color: var(--fs-group-disabled-color) !important;
39
61
  }
40
62
 
41
63
  /***************************************************************************/
@@ -1,54 +1,58 @@
1
+ @import "@fontsource/montserrat/500.css";
2
+ @import "@fontsource/montserrat/600.css";
3
+ @import "@fontsource/montserrat/700.css";
4
+
1
5
  .text-h1 {
2
6
  font-family: 'Montserrat', sans-serif !important;
3
- font-style: normal;
4
- font-weight: 700;
7
+ font-style: normal !important;
8
+ font-weight: 700 !important;
5
9
 
6
10
  @include web {
7
- font-size: 36px;
8
- line-height: 40px;
9
- letter-spacing: -0.72px;
11
+ font-size: 36px !important;
12
+ line-height: 40px !important;
13
+ letter-spacing: -0.72px !important;
10
14
  }
11
15
 
12
16
  @include mobile {
13
- font-size: 29px;
14
- line-height: 32px;
15
- letter-spacing: -1.45px;
17
+ font-size: 29px !important;
18
+ line-height: 32px !important;
19
+ letter-spacing: -1.45px !important;
16
20
  }
17
21
  }
18
22
 
19
23
  .text-h2 {
20
24
  font-family: 'Montserrat', sans-serif !important;
21
- font-style: normal;
22
- font-weight: 600;
25
+ font-style: normal !important;
26
+ font-weight: 600 !important;
23
27
 
24
28
  @include web {
25
- font-size: 27px;
26
- line-height: 32px;
27
- letter-spacing: -0.81px;
29
+ font-size: 27px !important;
30
+ line-height: 32px !important;
31
+ letter-spacing: -0.81px !important;
28
32
  }
29
33
 
30
34
  @include mobile {
31
- font-size: 22px;
32
- line-height: 24px;
33
- letter-spacing: -0.88px;
35
+ font-size: 22px !important;
36
+ line-height: 24px !important;
37
+ letter-spacing: -0.88px !important;
34
38
  }
35
39
  }
36
40
 
37
41
  .text-h3 {
38
42
  font-family: 'Montserrat', sans-serif !important;
39
- font-style: normal;
40
- font-weight: 600;
43
+ font-style: normal !important;
44
+ font-weight: 600 !important;
41
45
 
42
46
  @include web {
43
- font-size: 21px;
44
- line-height: 24px;
45
- letter-spacing: -0.63px;
47
+ font-size: 21px !important;
48
+ line-height: 24px !important;
49
+ letter-spacing: -0.63px !important;
46
50
  }
47
51
 
48
52
  @include mobile {
49
- font-size: 17px;
50
- line-height: 20px;
51
- letter-spacing: -0.51px;
53
+ font-size: 17px !important;
54
+ line-height: 20px !important;
55
+ letter-spacing: -0.51px !important;
52
56
  }
53
57
  }
54
58
 
@@ -91,6 +95,26 @@
91
95
  }
92
96
 
93
97
  .text-overline {
98
+ font-family: 'Montserrat', sans-serif !important;
99
+ font-style: normal !important;
100
+ text-transform: none !important;
101
+
102
+ @include web {
103
+ font-weight: 600 !important;
104
+ font-size: 12px !important;
105
+ line-height: 16px !important;
106
+ letter-spacing: 0.08px !important;
107
+ }
108
+
109
+ @include mobile {
110
+ font-weight: 500 !important;
111
+ font-size: 10px !important;
112
+ line-height: 16px !important;
113
+ letter-spacing: 0.19px !important;
114
+ }
115
+ }
116
+
117
+ .text-underline {
94
118
  font-family: 'Montserrat', sans-serif !important;
95
119
  font-style: normal !important;
96
120
  font-weight: 500 !important;