@madgex/design-system 1.22.0 → 1.22.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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 30 Aug 2019 15:07:31 GMT
3
+ * Generated on Wed, 04 Sep 2019 15:10:31 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -89,16 +89,16 @@
89
89
  --mds-font-type-great-primer-md-line-height: 1.15;
90
90
  --mds-font-type-great-primer-lg-size: 20px;
91
91
  --mds-font-type-great-primer-lg-line-height: 1.2;
92
- --mds-font-type-body-copy-default-size: 14px;
93
- --mds-font-type-body-copy-default-line-height: 1.43;
92
+ --mds-font-type-body-copy-default-size: 16px;
93
+ --mds-font-type-body-copy-default-line-height: 1.38;
94
94
  --mds-font-type-body-copy-sm-size: 16px;
95
95
  --mds-font-type-body-copy-sm-line-height: 1.38;
96
96
  --mds-font-type-body-copy-md-size: 18px;
97
97
  --mds-font-type-body-copy-md-line-height: 1.34;
98
98
  --mds-font-type-body-copy-lg-size: 16px;
99
99
  --mds-font-type-body-copy-lg-line-height: 1.38;
100
- --mds-font-type-body-copy-bulk-default-size: 14px;
101
- --mds-font-type-body-copy-bulk-default-line-height: 1.71;
100
+ --mds-font-type-body-copy-bulk-default-size: 16px;
101
+ --mds-font-type-body-copy-bulk-default-line-height: 1.75;
102
102
  --mds-font-type-body-copy-bulk-sm-size: 16px;
103
103
  --mds-font-type-body-copy-bulk-sm-line-height: 1.75;
104
104
  --mds-font-type-body-copy-bulk-md-size: 18px;
@@ -151,7 +151,7 @@
151
151
  --mds-size-wrapper-width: 100%;
152
152
  --mds-size-wrapper-max-width: 1280px;
153
153
  --mds-size-wrapper-padding: 1.5%;
154
- --mds-size-surface-padding: 28px 32px;
154
+ --mds-size-surface-padding: 16px;
155
155
  --mds-size-button-border-radius: 4px;
156
156
  --mds-size-icon-default: 1em;
157
157
  --mds-size-icon-sm: 16px;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Fri, 30 Aug 2019 15:07:31 GMT
3
+ * Generated on Wed, 04 Sep 2019 15:10:32 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1798,9 +1798,9 @@ module.exports = {
1798
1798
  "body-copy": {
1799
1799
  "default": {
1800
1800
  "size": {
1801
- "value": "14px",
1801
+ "value": "16px",
1802
1802
  "original": {
1803
- "value": "14px"
1803
+ "value": "16px"
1804
1804
  },
1805
1805
  "name": "MdsFontTypeBodyCopyDefaultSize",
1806
1806
  "attributes": {
@@ -1819,9 +1819,9 @@ module.exports = {
1819
1819
  ]
1820
1820
  },
1821
1821
  "line-height": {
1822
- "value": "1.43",
1822
+ "value": "1.38",
1823
1823
  "original": {
1824
- "value": "1.43"
1824
+ "value": "1.38"
1825
1825
  },
1826
1826
  "name": "MdsFontTypeBodyCopyDefaultLineHeight",
1827
1827
  "attributes": {
@@ -1976,9 +1976,9 @@ module.exports = {
1976
1976
  "body-copy-bulk": {
1977
1977
  "default": {
1978
1978
  "size": {
1979
- "value": "14px",
1979
+ "value": "16px",
1980
1980
  "original": {
1981
- "value": "14px"
1981
+ "value": "16px"
1982
1982
  },
1983
1983
  "name": "MdsFontTypeBodyCopyBulkDefaultSize",
1984
1984
  "attributes": {
@@ -1997,9 +1997,9 @@ module.exports = {
1997
1997
  ]
1998
1998
  },
1999
1999
  "line-height": {
2000
- "value": "1.71",
2000
+ "value": "1.75",
2001
2001
  "original": {
2002
- "value": "1.71"
2002
+ "value": "1.75"
2003
2003
  },
2004
2004
  "name": "MdsFontTypeBodyCopyBulkDefaultLineHeight",
2005
2005
  "attributes": {
@@ -3110,9 +3110,9 @@ module.exports = {
3110
3110
  },
3111
3111
  "surface": {
3112
3112
  "padding": {
3113
- "value": "28rem",
3113
+ "value": "16rem",
3114
3114
  "original": {
3115
- "value": "28px 32px"
3115
+ "value": "16px"
3116
3116
  },
3117
3117
  "name": "MdsSizeSurfacePadding",
3118
3118
  "attributes": {
@@ -1,7 +1,7 @@
1
1
 
2
2
  /*
3
3
  Do not edit directly
4
- Generated on Fri, 30 Aug 2019 15:07:31 GMT
4
+ Generated on Wed, 04 Sep 2019 15:10:32 GMT
5
5
  */
6
6
 
7
7
  $mds-color-brand-1-base: #1b75bb !default;
@@ -89,16 +89,16 @@ $mds-font-type-great-primer-md-size: 21px !default;
89
89
  $mds-font-type-great-primer-md-line-height: 1.15 !default;
90
90
  $mds-font-type-great-primer-lg-size: 20px !default;
91
91
  $mds-font-type-great-primer-lg-line-height: 1.2 !default;
92
- $mds-font-type-body-copy-default-size: 14px !default;
93
- $mds-font-type-body-copy-default-line-height: 1.43 !default;
92
+ $mds-font-type-body-copy-default-size: 16px !default;
93
+ $mds-font-type-body-copy-default-line-height: 1.38 !default;
94
94
  $mds-font-type-body-copy-sm-size: 16px !default;
95
95
  $mds-font-type-body-copy-sm-line-height: 1.38 !default;
96
96
  $mds-font-type-body-copy-md-size: 18px !default;
97
97
  $mds-font-type-body-copy-md-line-height: 1.34 !default;
98
98
  $mds-font-type-body-copy-lg-size: 16px !default;
99
99
  $mds-font-type-body-copy-lg-line-height: 1.38 !default;
100
- $mds-font-type-body-copy-bulk-default-size: 14px !default;
101
- $mds-font-type-body-copy-bulk-default-line-height: 1.71 !default;
100
+ $mds-font-type-body-copy-bulk-default-size: 16px !default;
101
+ $mds-font-type-body-copy-bulk-default-line-height: 1.75 !default;
102
102
  $mds-font-type-body-copy-bulk-sm-size: 16px !default;
103
103
  $mds-font-type-body-copy-bulk-sm-line-height: 1.75 !default;
104
104
  $mds-font-type-body-copy-bulk-md-size: 18px !default;
@@ -151,7 +151,7 @@ $mds-size-container-max-width: 100% !default;
151
151
  $mds-size-wrapper-width: 100% !default;
152
152
  $mds-size-wrapper-max-width: 1280px !default;
153
153
  $mds-size-wrapper-padding: 1.5% !default;
154
- $mds-size-surface-padding: 28px 32px !default;
154
+ $mds-size-surface-padding: 16px !default;
155
155
  $mds-size-button-border-radius: 4px !default;
156
156
  $mds-size-icon-default: 1em !default;
157
157
  $mds-size-icon-sm: 16px !default;
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Do not edit directly
3
- Generated on Fri, 30 Aug 2019 15:07:31 GMT
3
+ Generated on Wed, 04 Sep 2019 15:10:32 GMT
4
4
  */
5
5
  html,
6
6
  body,
@@ -444,7 +444,11 @@ template {
444
444
  white-space: nowrap;
445
445
  }
446
446
 
447
- h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, pre {
447
+ h1 {
448
+ margin-bottom: 24px;
449
+ }
450
+
451
+ h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, pre {
448
452
  margin-bottom: 12px;
449
453
  }
450
454
 
@@ -503,8 +507,14 @@ body {
503
507
  background: #ffffff;
504
508
  }
505
509
 
506
- .mds-surface__inner {
507
- padding: 28px 32px;
510
+ .mds-surface__inner, .js .mds-tabs__tab, .js .mds-tabs__panel {
511
+ padding: 16px;
512
+ }
513
+
514
+ @media (min-width: 37.5em) {
515
+ .mds-surface__inner, .js .mds-tabs__tab, .js .mds-tabs__panel {
516
+ padding: calc(16px * 2);
517
+ }
508
518
  }
509
519
 
510
520
  .mds-fixed-container {
@@ -533,6 +543,10 @@ body {
533
543
  margin-left: 16px;
534
544
  }
535
545
 
546
+ .mds-list__item:last-child {
547
+ margin-bottom: 0;
548
+ }
549
+
536
550
  .mds-list--bullet,
537
551
  .mds-list--number {
538
552
  margin-left: 12px;
@@ -566,6 +580,10 @@ body {
566
580
  margin-bottom: 12px;
567
581
  }
568
582
 
583
+ .mds-list__value:last-child {
584
+ margin-bottom: 0;
585
+ }
586
+
569
587
  .mds-list--inline {
570
588
  margin-left: 0;
571
589
  }
@@ -1467,24 +1485,20 @@ body {
1467
1485
  cursor: pointer;
1468
1486
  user-select: none;
1469
1487
  vertical-align: middle;
1470
- white-space: nowrap;
1471
1488
  -webkit-appearance: none;
1489
+ width: auto;
1472
1490
  border: 1px solid transparent;
1473
1491
  border-radius: 4px;
1474
1492
  background-color: #f0af11;
1475
- padding: 12px 12px;
1476
- font-size: 100%;
1477
- width: 100%;
1493
+ padding: 12px 20px;
1478
1494
  display: inline-block;
1479
1495
  text-align: center;
1480
1496
  color: #343433;
1481
- line-height: 1.15;
1482
1497
  }
1483
1498
 
1484
1499
  @media (min-width: 37.5em) {
1485
1500
  .mds-button {
1486
- width: auto;
1487
- padding: 8px 12px;
1501
+ padding: 8px 20px;
1488
1502
  }
1489
1503
  }
1490
1504
 
@@ -1499,6 +1513,26 @@ body {
1499
1513
  color: #343433;
1500
1514
  }
1501
1515
 
1516
+ .mds-button--small {
1517
+ padding: 8px 12px;
1518
+ }
1519
+
1520
+ @media (min-width: 37.5em) {
1521
+ .mds-button--small {
1522
+ padding: 4px 12px;
1523
+ }
1524
+ }
1525
+
1526
+ .mds-button--large {
1527
+ padding: 20px 24px;
1528
+ }
1529
+
1530
+ @media (min-width: 37.5em) {
1531
+ .mds-button--large {
1532
+ padding: 16px 24px;
1533
+ }
1534
+ }
1535
+
1502
1536
  .mds-card {
1503
1537
  padding: 12px 16px;
1504
1538
  border: 1px solid #dddddd;
@@ -1550,7 +1584,6 @@ body {
1550
1584
  text-align: center;
1551
1585
  margin-right: 4px;
1552
1586
  margin-bottom: 0;
1553
- padding: 28px 32px;
1554
1587
  padding-top: 24px;
1555
1588
  padding-bottom: 20px;
1556
1589
  }
@@ -1566,10 +1599,6 @@ body {
1566
1599
  color: #222222;
1567
1600
  }
1568
1601
 
1569
- .js .mds-tabs__panel {
1570
- padding: 28px 32px;
1571
- }
1572
-
1573
1602
  .mds-input {
1574
1603
  width: 100%;
1575
1604
  background-color: #f8f8f8;
@@ -1738,35 +1767,35 @@ body {
1738
1767
  }
1739
1768
  }
1740
1769
 
1741
- .mds-font-body-copy, body, h4 {
1742
- font-size: 0.875rem;
1743
- line-height: 1.43;
1770
+ .mds-font-body-copy, body, h4, .mds-button {
1771
+ font-size: 1rem;
1772
+ line-height: 1.38;
1744
1773
  }
1745
1774
 
1746
1775
  @media (min-width: 25em) {
1747
- .mds-font-body-copy, body, h4 {
1776
+ .mds-font-body-copy, body, h4, .mds-button {
1748
1777
  font-size: 1rem;
1749
1778
  line-height: 1.38;
1750
1779
  }
1751
1780
  }
1752
1781
 
1753
1782
  @media (min-width: 37.5em) {
1754
- .mds-font-body-copy, body, h4 {
1783
+ .mds-font-body-copy, body, h4, .mds-button {
1755
1784
  font-size: 1.125rem;
1756
1785
  line-height: 1.34;
1757
1786
  }
1758
1787
  }
1759
1788
 
1760
1789
  @media (min-width: 63em) {
1761
- .mds-font-body-copy, body, h4 {
1790
+ .mds-font-body-copy, body, h4, .mds-button {
1762
1791
  font-size: 1rem;
1763
1792
  line-height: 1.38;
1764
1793
  }
1765
1794
  }
1766
1795
 
1767
1796
  .mds-font-body-copy-bulk {
1768
- font-size: 0.875rem;
1769
- line-height: 1.71;
1797
+ font-size: 1rem;
1798
+ line-height: 1.75;
1770
1799
  }
1771
1800
 
1772
1801
  @media (min-width: 25em) {
@@ -4758,3 +4787,47 @@ body {
4758
4787
  .mds-edited-text .mds-font-body-copy-bulk p {
4759
4788
  margin-bottom: 16px;
4760
4789
  }
4790
+
4791
+ .mds-width-full {
4792
+ width: 100%;
4793
+ }
4794
+
4795
+ .mds-width-auto {
4796
+ width: auto;
4797
+ }
4798
+
4799
+ @media (min-width: 25em) {
4800
+ .mds-width-sm-full {
4801
+ width: 100%;
4802
+ }
4803
+ .mds-width-sm-auto {
4804
+ width: auto;
4805
+ }
4806
+ }
4807
+
4808
+ @media (min-width: 37.5em) {
4809
+ .mds-width-md-full {
4810
+ width: 100%;
4811
+ }
4812
+ .mds-width-md-auto {
4813
+ width: auto;
4814
+ }
4815
+ }
4816
+
4817
+ @media (min-width: 63em) {
4818
+ .mds-width-lg-full {
4819
+ width: 100%;
4820
+ }
4821
+ .mds-width-lg-auto {
4822
+ width: auto;
4823
+ }
4824
+ }
4825
+
4826
+ @media (min-width: 80em) {
4827
+ .mds-width-xl-full {
4828
+ width: 100%;
4829
+ }
4830
+ .mds-width-xl-auto {
4831
+ width: auto;
4832
+ }
4833
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madgex/design-system",
3
- "version": "1.22.0",
3
+ "version": "1.22.2",
4
4
  "scripts": {
5
5
  "clean": "rimraf dist public tokens/build",
6
6
  "commit": "commit",
@@ -0,0 +1,21 @@
1
+ ## Parameters
2
+
3
+ - `text`: Text on the button
4
+ - `html`: if you want to add html markup instead of plain text, use `html` attribute instead
5
+ - `name`: add `name` attribute
6
+ - `element`: we're using `<button>` by default but you can change to be a link or an input
7
+ - `href`: if `element` is a link then add the url using `href`
8
+ - `classes`: css classes to add on the button (for example `mds-width-full`)
9
+ - `disabled`: disable button
10
+ - `attributes`: you can add extra attributes by passing an object to the parameter. Example: `attributes: { attribute-name: 'attribute-value' }`
11
+ - `type`: by default it will be `submit`
12
+
13
+
14
+ ## Full width button
15
+
16
+ We have 2 helpers classes that can help you achieve full width buttons at different sizes.
17
+ `.mds-width-full` and `.mds-width-auto`.
18
+
19
+ For example, if you would like your button to be full width at mobile size and have `width: auto` at any wider size, add the following classes on the button (using the `classes` parameter): `mds-width-full mds-width-md-auto`.
20
+
21
+ Both helper classes are set with breakpoints. Just add the name of the class followed by the breakpoint name (`sm`, `md`, `lg`, `xl`) and the value (`full` or `auto`).
@@ -1,5 +1,6 @@
1
1
  module.exports = {
2
2
  title: 'Buttons',
3
+ status: 'wip',
3
4
  context: {
4
5
  text: 'Button 1',
5
6
  },
@@ -18,5 +19,26 @@ module.exports = {
18
19
  text: 'Input button 3',
19
20
  },
20
21
  },
22
+ {
23
+ name: 'small-buttons',
24
+ context: {
25
+ text: 'Small button',
26
+ classes: 'mds-button--small',
27
+ },
28
+ },
29
+ {
30
+ name: 'large-buttons',
31
+ context: {
32
+ text: 'Large button',
33
+ classes: 'mds-button--large',
34
+ },
35
+ },
36
+ {
37
+ name: 'full-width-example',
38
+ context: {
39
+ text: 'Full width example',
40
+ classes: 'mds-width-full mds-width-md-auto',
41
+ },
42
+ },
21
43
  ],
22
44
  };
@@ -3,5 +3,7 @@
3
3
  {{ MdsButton({
4
4
  text: text,
5
5
  element: element,
6
- href: href
6
+ href: href,
7
+ classes: classes,
8
+ attributes: attributes
7
9
  }) }}
@@ -7,22 +7,19 @@ $mds-color-button-text-hover: $mds-color-button-text !default;
7
7
  cursor: pointer;
8
8
  user-select: none;
9
9
  vertical-align: middle;
10
- white-space: nowrap;
11
10
  -webkit-appearance: none;
11
+ width: auto;
12
12
  border: 1px solid transparent;
13
13
  border-radius: $mds-size-button-border-radius;
14
14
  background-color: $mds-color-button-bg;
15
- padding: ($mds-size-baseline * 3) ($mds-size-baseline * 3);
16
- font-size: 100%;
17
- width: 100%;
15
+ padding: ($mds-size-baseline * 3) ($mds-size-baseline * 5);
18
16
  display: inline-block;
19
17
  text-align: center;
20
18
  color: $mds-color-button-text;
21
- line-height: 1.15;
19
+ @extend .mds-font-body-copy;
22
20
 
23
21
  @include mq($from: md) {
24
- width: auto;
25
- padding: ($mds-size-baseline * 2) ($mds-size-baseline * 3);
22
+ padding: ($mds-size-baseline * 2) ($mds-size-baseline * 5);
26
23
  }
27
24
 
28
25
  // Ensure that any global link styles are overridden
@@ -40,3 +37,19 @@ $mds-color-button-text-hover: $mds-color-button-text !default;
40
37
  color: $mds-color-button-text-hover;
41
38
  }
42
39
  }
40
+
41
+ .mds-button--small {
42
+ padding: ($mds-size-baseline * 2) ($mds-size-baseline * 3);
43
+
44
+ @include mq($from: md) {
45
+ padding: ($mds-size-baseline * 1) ($mds-size-baseline * 3);
46
+ }
47
+ }
48
+
49
+ .mds-button--large {
50
+ padding: ($mds-size-baseline * 5) ($mds-size-baseline * 6);
51
+
52
+ @include mq($from: md) {
53
+ padding: ($mds-size-baseline * 4) ($mds-size-baseline * 6);
54
+ }
55
+ }
@@ -31,7 +31,7 @@
31
31
  text-align: center;
32
32
  margin-right: $mds-size-baseline;
33
33
  margin-bottom: 0;
34
- padding: $mds-size-surface-padding;
34
+ @extend .mds-surface__inner;
35
35
  padding-top: $mds-size-baseline * 6;
36
36
  padding-bottom: $mds-size-baseline * 5;
37
37
 
@@ -47,5 +47,5 @@
47
47
  }
48
48
 
49
49
  .js .mds-tabs__panel {
50
- padding: $mds-size-surface-padding;
50
+ @extend .mds-surface__inner;
51
51
  }
@@ -3,5 +3,5 @@
3
3
  @import '../../components/card/card';
4
4
  @import '../../components/section-title/section-title';
5
5
  @import '../../components/tabs/tabs';
6
- @import '../components/input/input';
7
- @import '../components/textarea/textarea';
6
+ @import '../../components/input/input';
7
+ @import '../../components/textarea/textarea';
@@ -28,6 +28,10 @@ body {
28
28
 
29
29
  .mds-surface__inner {
30
30
  padding: $mds-size-surface-padding;
31
+
32
+ @include mq($from: $mds-size-breakpoint-md) {
33
+ padding: calc(#{$mds-size-surface-padding} * 2);
34
+ }
31
35
  }
32
36
 
33
37
  .mds-fixed-container {
@@ -1,10 +1,13 @@
1
1
  $mds-color-link: $mds-color-brand-1-base !default;
2
2
  $mds-color-link-hover: $mds-color-brand-1-dark !default;
3
3
 
4
- h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, pre {
5
- margin-bottom: $mds-size-baseline * 3;
4
+ h1 {
5
+ margin-bottom: $mds-size-baseline * 6;
6
6
  }
7
7
 
8
+ h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, pre {
9
+ margin-bottom: $mds-size-baseline * 3;
10
+ }
8
11
 
9
12
  a {
10
13
  color: $mds-color-link;
@@ -7,6 +7,10 @@
7
7
  .mds-list__item {
8
8
  margin-bottom: $mds-size-baseline;
9
9
  margin-left: $mds-size-baseline * 4;
10
+
11
+ &:last-child {
12
+ margin-bottom: 0;
13
+ }
10
14
  }
11
15
  .mds-list--bullet,
12
16
  .mds-list--number {
@@ -38,6 +42,10 @@
38
42
  }
39
43
  .mds-list__value {
40
44
  margin-bottom: $mds-size-baseline * 3;
45
+
46
+ &:last-child {
47
+ margin-bottom: 0;
48
+ }
41
49
  }
42
50
  .mds-list--inline {
43
51
  margin-left: 0;
@@ -5,3 +5,4 @@
5
5
  @import 'display';
6
6
  @import 'borders';
7
7
  @import 'edited-text';
8
+ @import 'width';
@@ -0,0 +1,19 @@
1
+ $breakpoints: map-get(map-get($tokens, 'size'), 'breakpoint');
2
+
3
+ .mds-width-full {
4
+ width: 100%;
5
+ }
6
+ .mds-width-auto {
7
+ width: auto;
8
+ }
9
+
10
+ @each $bpname, $value in $breakpoints {
11
+ @include mq($from: $bpname) {
12
+ .mds-width-#{$bpname}-full {
13
+ width: 100%;
14
+ }
15
+ .mds-width-#{$bpname}-auto {
16
+ width: auto;
17
+ }
18
+ }
19
+ }
@@ -103,8 +103,8 @@
103
103
  },
104
104
  "body-copy": {
105
105
  "default": {
106
- "size": { "value": "14px" },
107
- "line-height": { "value": "1.43" }
106
+ "size": { "value": "16px" },
107
+ "line-height": { "value": "1.38" }
108
108
  },
109
109
  "sm": {
110
110
  "size": { "value": "16px" },
@@ -122,10 +122,10 @@
122
122
  "body-copy-bulk": {
123
123
  "default": {
124
124
  "size": {
125
- "value": "14px"
125
+ "value": "16px"
126
126
  },
127
127
  "line-height": {
128
- "value": "1.71"
128
+ "value": "1.75"
129
129
  }
130
130
  },
131
131
  "sm": {
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "surface": {
42
42
  "padding": {
43
- "value": "28px 32px"
43
+ "value": "16px"
44
44
  }
45
45
  },
46
46
  "button": {