@mtvh/mtvh-design-system 0.0.3 → 0.0.5

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 (36) hide show
  1. package/README.md +15 -2
  2. package/assets/scss/app.scss +38 -0
  3. package/assets/scss/base/_all.scss +4 -0
  4. package/assets/scss/base/_functions.scss +38 -0
  5. package/assets/scss/base/_global.scss +25 -0
  6. package/assets/scss/base/_mixins.scss +171 -0
  7. package/assets/scss/base/_print.scss +55 -0
  8. package/assets/scss/common/_custom.scss +63 -0
  9. package/assets/scss/common/_variables-custom.scss +0 -0
  10. package/assets/scss/common/_variables-overrides.scss +0 -0
  11. package/assets/scss/components/_all.scss +5 -0
  12. package/assets/scss/components/_breadcrumb.scss +60 -0
  13. package/assets/scss/components/_button.scss +209 -0
  14. package/assets/scss/components/_content-block.scss +239 -0
  15. package/assets/scss/components/_form.scss +10 -0
  16. package/assets/scss/components/_link.scss +92 -0
  17. package/assets/scss/config/_all.scss +5 -0
  18. package/assets/scss/config/_font.scss +8 -0
  19. package/assets/scss/config/_map-amends.scss +5 -0
  20. package/assets/scss/config/_map-list.scss +114 -0
  21. package/assets/scss/config/_palette.scss +51 -0
  22. package/assets/scss/config/_theme.scss +23 -0
  23. package/assets/scss/config/_variables.scss +159 -0
  24. package/assets/scss/core/_all.scss +2 -0
  25. package/assets/scss/core/iconography/_icon.scss +32 -0
  26. package/assets/scss/core/typography/_typography.scss +107 -0
  27. package/assets/scss/forms/_form-check.scss +48 -0
  28. package/assets/scss/forms/_form-control.scss +38 -0
  29. package/assets/scss/forms/_formio.scss +36 -0
  30. package/assets/scss/forms/_labels.scss +4 -0
  31. package/assets/scss/forms/_validation.scss +22 -0
  32. package/assets/scss/mtvh.scss +68 -0
  33. package/dist/js/app.min.js +9 -0
  34. package/dist/mtvh.min.css +1 -1
  35. package/package.json +6 -8
  36. package/public/js/app.js +5194 -0
@@ -0,0 +1,159 @@
1
+ // Font
2
+ $prefix: mtvh-;
3
+ $enable-important-utilities: true !default;
4
+ $data-svg-prefix: 'data:image/svg+xml;utf-8,';
5
+
6
+ $font-size-base: 1rem;
7
+ $font-size-xs: $font-size-base;
8
+ $font-size-sm: $font-size-base * 1.125;
9
+ $font-size-md: $font-size-base * 1.375;
10
+ $font-size-lg: $font-size-base * 1.625;
11
+ $h1-font-size: $font-size-base * 2.5;
12
+ $h2-font-size: $font-size-base * 2;
13
+ $h3-font-size: $font-size-base * 1.75;
14
+ $h4-font-size: $font-size-base * 1.5;
15
+
16
+ $font-sizes: (
17
+ 1: $h1-font-size,
18
+ 2: $h2-font-size,
19
+ 3: $h3-font-size,
20
+ 4: $font-size-lg,
21
+ 5: $font-size-md,
22
+ 6: $font-size-sm,
23
+ 7: $font-size-xs
24
+ );
25
+
26
+ $line-height-base: 1.5;
27
+ $link-color: #0072BF;
28
+ $link-hover-color: #005792;
29
+ $body-color: #000;
30
+ $font-family-sans-serif: Arial, sans-serif;
31
+
32
+
33
+ // MTVH Font
34
+ $mtvh-base-font-size: $font-size-base;
35
+ $mtvh-font-weight-lighter: lighter !default;
36
+ $mtvh-font-weight-light: 300 !default;
37
+ $mtvh-font-weight-normal: 400 !default;
38
+ $mtvh-font-weight-medium: 500 !default;
39
+ $mtvh-font-weight-semibold: 600 !default;
40
+ $mtvh-font-weight-bold: 700 !default;
41
+ $mtvh-font-weight-bolder: bolder !default;
42
+
43
+
44
+
45
+ //button
46
+ $input-btn-font-family:$font-family-sans-serif;
47
+ $btn-border-radius: 3rem;
48
+ $btn-font-weight: bold;
49
+ $btn-padding-x: 1rem;
50
+ $btn-padding-y: 0.438rem;
51
+ $btn-font-size: 1rem;
52
+ $btn-border-width: 3px;
53
+
54
+ //spacing
55
+ $button-icon-spacing: 0.75rem;
56
+ $button-icon-small-spacing: 8px;
57
+ $link-icon-spacing: 0.5rem;
58
+
59
+ $border-width-sm: 0.15rem;
60
+ $border-width-md: 0.19rem;
61
+
62
+ $mtvh-spacing-1: 0.125rem;
63
+ $mtvh-spacing-2: 0.25rem;
64
+ $mtvh-spacing-3: 0.5rem;
65
+ $mtvh-spacing-4: 0.75rem;
66
+ $mtvh-spacing-5: 1rem;
67
+ $mtvh-spacing-6: 1.5rem;
68
+ $mtvh-spacing-7: 2rem;
69
+ $mtvh-spacing-8: 2.5rem;
70
+ $mtvh-spacing-9: 3rem;
71
+ // custom added bs spacing value
72
+
73
+ $spacer: 1rem;
74
+ $spacers: (
75
+ 0: 0,
76
+ 1: $spacer * .25,
77
+ 2: $spacer * .5,
78
+ 3: $spacer,
79
+ 4: $spacer * 1.5,
80
+ 5: $spacer * 3,
81
+ 6: $mtvh-spacing-8
82
+ );
83
+
84
+ $icon-size-scale-xs : 16px !default;
85
+ $icon-size-scale-sm : 20px !default;
86
+ $icon-size-scale-md : 28px !default;
87
+ $icon-size-scale-lg : 42px !default;
88
+ $icon-size-scale-xl : 56px !default;
89
+ $breadcrumb-item-padding-x: $mtvh-spacing-4;
90
+ $breadcrumb-font-size: $font-size-xs;
91
+
92
+ $mtvh-icon-sizes: (
93
+ "xs" : $icon-size-scale-xs,
94
+ "sm" : $icon-size-scale-sm,
95
+ "md" : $icon-size-scale-md,
96
+ "lg" : $icon-size-scale-lg,
97
+ "xl" : $icon-size-scale-xl
98
+ ) !default;
99
+
100
+
101
+ $success: #23870B;
102
+ $info: #895ED0;
103
+ $warning: #D8B000; //--mtvh-purple-04
104
+ $danger: #DD080D;
105
+ $primary: #0072BF;
106
+ $btn-color: $primary;
107
+
108
+ /* breadcrumb */
109
+ $breadcrumb-margin-bottom: $mtvh-spacing-6;
110
+
111
+ /* form */
112
+ $form-label-font-size : $font-size-md;
113
+ $form-label-font-weight: 700;
114
+ $form-label-color: #000000;
115
+ $form-text-font-size: $font-size-sm;
116
+ $form-label-margin-bottom: $mtvh-spacing-3;
117
+ $form-select-focus-border-color: var( --mtvh-grey-06);
118
+ $form-feedback-font-size: $font-size-sm;
119
+ $form-feedback-invalid-color: $danger;
120
+ $form-feedback-icon-invalid: '';
121
+ $form-feedback-margin-top: $mtvh-spacing-4;
122
+ $input-line-height: 1.5;
123
+ $input-font-size: $font-size-sm;
124
+ $input-padding-y: $mtvh-spacing-4;
125
+ $input-padding-x: $mtvh-spacing-5;
126
+ $input-focus-color: var(--mtvh-blue-05);
127
+ $input-focus-border-color: var( --mtvh-grey-06);
128
+ $input-border-color: var( --mtvh-grey-06);
129
+ $input-border-radius: 0.25rem;
130
+ $input-color: $body-color;
131
+ $input-placeholder-color: var( --mtvh-grey-06);
132
+
133
+ /* form check */
134
+ $form-check-bg-color: var(--mtvh-grey-01);
135
+ $form-check-hover-bg-color: var(--mtvh-grey-02);
136
+ $form-check-input-width: 2em;
137
+ $form-check-input-height: 2em;
138
+ $form-check-margin-bottom: $mtvh-spacing-5;
139
+ $form-check-input-checked-color: var(--mtvh-white);
140
+ $form-check-input-checked-color: #fff;
141
+ $form-check-padding-start: $form-check-input-width + 1em;
142
+ $form-check-input-checked-bg-color: var(--mtvh-purple-04);
143
+ $form-check-input-hover-bg-color: var(--mtvh-purple-05);
144
+ $form-check-input-checked-border-color: var(--mtvh-purple-04);
145
+ $form-check-input-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#{$form-check-input-checked-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/></svg>");
146
+ $form-check-radio-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='2' fill='#{$form-check-input-checked-color}'/></svg>");
147
+
148
+
149
+ $line-height-md: 1.3;
150
+ $container-max-widths: (
151
+ sm: 540px,
152
+ md: 720px,
153
+ lg: 960px,
154
+ xl: 1140px,
155
+ xxl: 1320px
156
+ );
157
+
158
+ $font-path: "./fonts/" !default;
159
+ $asset-icon-path: "./images/icons/" !default;
@@ -0,0 +1,2 @@
1
+ @import 'iconography/icon';
2
+ @import 'typography/typography';
@@ -0,0 +1,32 @@
1
+
2
+ .mtvh-icon {
3
+
4
+ @each $mtvh-icon, $property-map in $mtvh-icons{
5
+ &-#{$mtvh-icon} {
6
+ &:not(.mtvh-icon--right) { //default to use left position
7
+ @include mtvh-icon($icon: $mtvh-icon, $position: 'left', $width: map-get($property-map, width),
8
+ $height: map-get($property-map, height), $svg-path: map-get($property-map, svg-path));
9
+ &.mtvh-icon--hover {
10
+ @include hover-animate;
11
+ }
12
+ }
13
+ &.mtvh-icon--right {
14
+ @include mtvh-icon($icon: $mtvh-icon, $position: 'right', $width: map-get($property-map, width),
15
+ $height: map-get($property-map, height), $svg-path: map-get($property-map, svg-path));
16
+ &.mtvh-icon--hover {
17
+ @include hover-animate($position: 'right');
18
+ }
19
+ }
20
+
21
+ }
22
+
23
+ }
24
+
25
+ // create all sizes for the icons
26
+ @each $size, $value in $mtvh-icon-sizes {
27
+ &.mtvh-icon--#{$size} {
28
+ @include icon-size($value,$value);
29
+ }
30
+ }
31
+
32
+ }
@@ -0,0 +1,107 @@
1
+ h1, h2, h3, h4, h5, h6, dt,
2
+ .mtvh-h1,
3
+ .mtvh-h2,
4
+ .mtvh-h3,
5
+ .mtvh-h4,
6
+ .mtvh-h5,
7
+ .mtvh-h6 {
8
+ margin: 0;
9
+ padding: 0;
10
+ font-family: var(--mtvh-font);
11
+ font-weight: var(--mtvh-font-bold);
12
+ }
13
+
14
+ h1, .mtvh-h1 {
15
+ @extend %h1;
16
+ }
17
+ .mtvh-title-h1 {
18
+ @extend %h1;
19
+ @extend %parent-title-h1;
20
+
21
+ }
22
+
23
+ h2, .mtvh-h2 {
24
+ @extend %h2;
25
+ }
26
+ h3, .mtvh-h3 {
27
+ @extend %h3;
28
+ }
29
+ h4, .mtvh-h4 {
30
+ @extend %h4;
31
+ }
32
+ p {
33
+ @extend %p;
34
+ }
35
+
36
+ %h1 {
37
+ margin-bottom: 1rem;
38
+ font-size: 2.5rem;
39
+ line-height: 1.2;
40
+ display: block;
41
+ }
42
+
43
+ %parent-title-h1 {
44
+ @include media-breakpoint-up('md') {
45
+ font-size: 3.25rem;
46
+ }
47
+ }
48
+
49
+ %h2 {
50
+ margin-bottom: 1rem;
51
+ font-size: 2rem;
52
+ line-height: 1.25;
53
+ display: block;
54
+ }
55
+
56
+ %h3 {
57
+ margin-bottom: 0.375rem;
58
+ font-size: 1.625rem;
59
+ line-height: 1.3;
60
+ display: block;
61
+ }
62
+
63
+ %h4 {
64
+ margin-bottom: 0.375rem;
65
+ font-size: 1.375rem;
66
+ line-height: 1.4;
67
+ display: block;
68
+ }
69
+
70
+ %p {
71
+ margin-bottom: 1rem;
72
+ display: block;
73
+ font-size: $font-size-sm;
74
+ }
75
+
76
+ .mtvh-intro {
77
+ margin-bottom: 1rem;
78
+ font-size: 1.375rem;
79
+ line-height: 1.4;
80
+ }
81
+
82
+ .small {
83
+ margin-bottom: 0.75rem;
84
+ font-size: 1rem;
85
+ line-height: 1.5;
86
+ }
87
+
88
+ a {
89
+ font-weight: bold;
90
+ outline-color: var(--mtvh-btn-outline-color);
91
+ }
92
+
93
+ ul,
94
+ ol,
95
+ {
96
+ margin: 0 0 1rem 0;
97
+ padding-right: 0;
98
+ padding-left: 1.75rem;
99
+ }
100
+
101
+
102
+ ul,
103
+ ol {
104
+ li {
105
+ margin-bottom: 0.25rem;
106
+ }
107
+ }
@@ -0,0 +1,48 @@
1
+ //
2
+ // Check/radio
3
+ //
4
+
5
+ .form-check {
6
+ label, .form-check-input {
7
+ &:hover {
8
+ cursor: pointer;
9
+
10
+ .form-check-input {
11
+ cursor: pointer;
12
+ }
13
+ }
14
+ }
15
+ padding:$mtvh-spacing-4 $mtvh-spacing-5;
16
+ background-color: $form-check-bg-color;
17
+ border-radius: $border-radius;
18
+
19
+ &:hover {
20
+ background-color: $form-check-hover-bg-color;
21
+ }
22
+ }
23
+
24
+ .form-check-input {
25
+ float: none;
26
+ margin-left: 0;
27
+ margin-right: $mtvh-spacing-3;
28
+ &:hover {
29
+
30
+ &[type="checkbox"] {
31
+ @if $enable-gradients {
32
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-checked-bg-image)}, var(--#{$prefix}gradient);
33
+ } @else {
34
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-input-checked-bg-image)};
35
+ }
36
+ }
37
+
38
+ &[type="radio"] {
39
+ @if $enable-gradients {
40
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-radio-checked-bg-image)}, var(--#{$prefix}gradient);
41
+ } @else {
42
+ --#{$prefix}form-check-bg-image: #{escape-svg($form-check-radio-checked-bg-image)};
43
+ }
44
+ background-color: $form-check-input-hover-bg-color;
45
+ }
46
+ }
47
+
48
+ }
@@ -0,0 +1,38 @@
1
+ .form-control {
2
+ height: auto;
3
+ &:focus {
4
+ box-shadow: none;
5
+ outline: solid var(--mtvh-btn-outline-border) var(--mtvh-btn-outline-color);
6
+ outline-offset: 0;
7
+ outline-offset: var(--mtvh-btn-outline-border);
8
+ color: $input-color;
9
+ }
10
+
11
+ &.is-invalid {
12
+ &:focus {
13
+ border-color: $input-border-color;
14
+ box-shadow: none;
15
+ }
16
+ background-color: var(--mtvh-red-01);
17
+ }
18
+
19
+ span[ref|="charcount"], .text-muted {
20
+ color : var(--mtvh-grey-06) !important;
21
+ }
22
+ }
23
+
24
+
25
+ textarea {
26
+ &.form-control {
27
+ max-height: 496px;
28
+ @include media-breakpoint-up(md) {
29
+ max-height: 608px;
30
+ }
31
+ }
32
+ }
33
+
34
+ select {
35
+ &.form-control {
36
+ height: auto;
37
+ }
38
+ }
@@ -0,0 +1,36 @@
1
+ .formio-component {
2
+
3
+ margin-bottom: $mtvh-spacing-9;
4
+
5
+ &.formio-hidden{
6
+ margin-bottom:0;
7
+ }
8
+
9
+ &.formio-component-button:has(> button[type="submit"]),&.formio-component-form,&.formio-component-fieldset,&.formio-component-columns,&.formio-component-mtvhLogicSet{
10
+ margin-bottom:0;
11
+ }
12
+
13
+ &.has-message.has-error {
14
+ .text-danger {
15
+ color: var(--mtvh-red-04) !important;
16
+ }
17
+ }
18
+
19
+ //Remove padding from last child
20
+ div.formio-component-form{
21
+ & .formio-component:last-child {
22
+ margin-bottom:0!important;
23
+ border: 1px red solid;
24
+ }
25
+
26
+ div[ref="element"] {
27
+ .form-text.text-right, .form-text.pull-right {
28
+ float: none;
29
+ margin-top: 12px;
30
+ margin-bottom: 0;
31
+ text-align: left !important;
32
+ }
33
+ }
34
+ }
35
+
36
+ }
@@ -0,0 +1,4 @@
1
+ .col-form-label {
2
+ font-size: $form-label-font-size;
3
+ font-weight: $form-label-font-weight;
4
+ }
@@ -0,0 +1,22 @@
1
+ // Form validation
2
+ //
3
+ // Provide feedback to users when form field values are valid or invalid. Works
4
+ // primarily for client-side validation via scoped `:invalid` and `:valid`
5
+ // pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
6
+ // server-side validation.
7
+
8
+ .invalid-feedback {
9
+ font-weight: $mtvh-font-weight-bold;
10
+ }
11
+ .form-control {
12
+ &.is-invalid {
13
+ background-color: var(--mtvh-red-01)
14
+ }
15
+ }
16
+ .form-text {
17
+ font-size: $font-size-sm;
18
+ margin-bottom: $mtvh-spacing-4;
19
+ &.error {
20
+ @include form-invalid-text();
21
+ }
22
+ }
@@ -0,0 +1,68 @@
1
+ // Source: https://getbootstrap.com/docs/5.3/customize/sass/#importing
2
+
3
+ // 1. Include functions first (so you can manipulate colors, SVGs, calc, etc)
4
+ @import "bootstrap/scss/functions";
5
+
6
+ // 2. Include any default variable overrides here
7
+ @import "config/variables";
8
+ @import "config/font";
9
+ @import 'config/palette';
10
+ @import 'config/theme';
11
+ @import "config/map-list";
12
+ @import 'base/all';
13
+
14
+ // 3. Include remainder of required Bootstrap stylesheets (including any separate color mode stylesheets)
15
+ @import "bootstrap/scss/variables";
16
+ //@import "bootstrap/scss/variables-dark";
17
+ //$theme-colors: map-remove($theme-colors, "light");
18
+
19
+ // 4. Include any default map overrides here
20
+ @import "config/map-amends";
21
+
22
+ // 5. Include remainder of required parts
23
+ @import "bootstrap/scss/maps";
24
+ @import "bootstrap/scss/mixins";
25
+ @import "bootstrap/scss/root";
26
+
27
+ // 6. Optionally include any other parts as needed
28
+
29
+ // Layout & components
30
+ @import "bootstrap/scss/utilities";
31
+ @import "bootstrap/scss/reboot";
32
+ @import "bootstrap/scss/type";
33
+ @import "bootstrap/scss/images";
34
+ @import "bootstrap/scss/containers";
35
+ @import "bootstrap/scss/grid";
36
+ @import "bootstrap/scss/helpers";
37
+ @import "bootstrap/scss/tables";
38
+ @import "bootstrap/scss/forms";
39
+ @import "bootstrap/scss/buttons";
40
+ @import "bootstrap/scss/transitions";
41
+ @import "bootstrap/scss/dropdown";
42
+ @import "bootstrap/scss/button-group";
43
+ @import "bootstrap/scss/nav";
44
+ @import "bootstrap/scss/navbar";
45
+ //@import "bootstrap/scss/card";
46
+ @import "bootstrap/scss/accordion";
47
+ @import "bootstrap/scss/breadcrumb";
48
+ @import "bootstrap/scss/pagination";
49
+ @import "bootstrap/scss/alert";
50
+ //@import "bootstrap/scss/progress";
51
+ //@import "bootstrap/scss/list-group";
52
+ @import "bootstrap/scss/close";
53
+ //@import "bootstrap/scss/toasts";
54
+ @import "bootstrap/scss/modal";
55
+ @import "bootstrap/scss/tooltip";
56
+ @import "bootstrap/scss/popover";
57
+ //@import "bootstrap/scss/carousel";
58
+ //@import "bootstrap/scss/spinners";
59
+ @import "bootstrap/scss/offcanvas";
60
+ @import "bootstrap/scss/placeholders";
61
+
62
+ // 7. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss`
63
+ @import "bootstrap/scss/utilities/api";
64
+
65
+ // 8. Add additional custom code here
66
+ @import 'components/all';
67
+
68
+ @import 'core/all';