@madgex/design-system 1.21.9 → 1.22.1

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 Wed, 21 Aug 2019 12:37:48 GMT
3
+ * Generated on Wed, 04 Sep 2019 14:46:54 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 Wed, 21 Aug 2019 12:37:48 GMT
3
+ * Generated on Wed, 04 Sep 2019 14:46:54 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 Wed, 21 Aug 2019 12:37:48 GMT
4
+ Generated on Wed, 04 Sep 2019 14:46:54 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 Wed, 21 Aug 2019 12:37:48 GMT
3
+ Generated on Wed, 04 Sep 2019 14:46:54 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,8 +1599,42 @@ body {
1566
1599
  color: #222222;
1567
1600
  }
1568
1601
 
1569
- .js .mds-tabs__panel {
1570
- padding: 28px 32px;
1602
+ .mds-input {
1603
+ width: 100%;
1604
+ background-color: #f8f8f8;
1605
+ height: 2rem;
1606
+ margin: 4px 0;
1607
+ padding: 4px;
1608
+ }
1609
+
1610
+ .mds-input__label {
1611
+ font-weight: 600;
1612
+ }
1613
+
1614
+ .mds-input__label--hint {
1615
+ font-weight: normal;
1616
+ color: #979797;
1617
+ }
1618
+
1619
+ .mds-input__validation-message {
1620
+ display: block;
1621
+ text-align: right;
1622
+ }
1623
+
1624
+ .mds-input__validation-message--error {
1625
+ color: #e1021d;
1626
+ }
1627
+
1628
+ .mds-input--error {
1629
+ border-color: #e1021d;
1630
+ }
1631
+
1632
+ .mds-textarea {
1633
+ resize: none;
1634
+ width: 100%;
1635
+ background-color: #f8f8f8;
1636
+ margin: 4px 0;
1637
+ padding: 8px;
1571
1638
  }
1572
1639
 
1573
1640
  .mds-font-canon {
@@ -1700,35 +1767,35 @@ body {
1700
1767
  }
1701
1768
  }
1702
1769
 
1703
- .mds-font-body-copy, body, h4 {
1704
- font-size: 0.875rem;
1705
- line-height: 1.43;
1770
+ .mds-font-body-copy, body, h4, .mds-button {
1771
+ font-size: 1rem;
1772
+ line-height: 1.38;
1706
1773
  }
1707
1774
 
1708
1775
  @media (min-width: 25em) {
1709
- .mds-font-body-copy, body, h4 {
1776
+ .mds-font-body-copy, body, h4, .mds-button {
1710
1777
  font-size: 1rem;
1711
1778
  line-height: 1.38;
1712
1779
  }
1713
1780
  }
1714
1781
 
1715
1782
  @media (min-width: 37.5em) {
1716
- .mds-font-body-copy, body, h4 {
1783
+ .mds-font-body-copy, body, h4, .mds-button {
1717
1784
  font-size: 1.125rem;
1718
1785
  line-height: 1.34;
1719
1786
  }
1720
1787
  }
1721
1788
 
1722
1789
  @media (min-width: 63em) {
1723
- .mds-font-body-copy, body, h4 {
1790
+ .mds-font-body-copy, body, h4, .mds-button {
1724
1791
  font-size: 1rem;
1725
1792
  line-height: 1.38;
1726
1793
  }
1727
1794
  }
1728
1795
 
1729
1796
  .mds-font-body-copy-bulk {
1730
- font-size: 0.875rem;
1731
- line-height: 1.71;
1797
+ font-size: 1rem;
1798
+ line-height: 1.75;
1732
1799
  }
1733
1800
 
1734
1801
  @media (min-width: 25em) {
@@ -4720,3 +4787,47 @@ body {
4720
4787
  .mds-edited-text .mds-font-body-copy-bulk p {
4721
4788
  margin-bottom: 16px;
4722
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.21.9",
3
+ "version": "1.22.1",
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
+ }
@@ -0,0 +1,3 @@
1
+ {% macro MdsInput(params) %}
2
+ {%- include "./_template.njk" -%}
3
+ {% endmacro %}
@@ -0,0 +1,32 @@
1
+ <div>
2
+ <label class="mds-display-block mds-input__label mds-font-long-primer" for="{{ params.id }}">
3
+ {{ params.labelText }}
4
+ {% if params.required %}
5
+ <span>*</span>
6
+ {% endif %}
7
+ </label>
8
+ <input
9
+ class="mds-input mds-border mds-border-radius"
10
+ type="{{ params.type }}"
11
+ name="{{ params.name }}"
12
+ id="{{ params.id }}"
13
+ {% if params.validationMessage %}
14
+ aria-describedby="{{ params.id }}-validation-message"
15
+ {% endif %}
16
+ {% if params.required %}
17
+ required="required"
18
+ {% endif %}
19
+ {% if params.disabled %}
20
+ disabled="disabled"
21
+ {% endif %}
22
+ />
23
+ {% if params.validationMessage %}
24
+ <span
25
+ aria-live="polite"
26
+ id="{{ params.id }}-validation-message"
27
+ class="mds-input__validation-message mds-font-brevier"
28
+ >
29
+ {{ params.validationMessage }}
30
+ </span>
31
+ {% endif %}
32
+ </div>
@@ -0,0 +1,42 @@
1
+ module.exports = {
2
+ title: 'Input',
3
+ status: 'prototype',
4
+ context: {
5
+ labelText: 'Text input',
6
+ name: 'Example input',
7
+ id: 'exampleInput',
8
+ type: 'text',
9
+ },
10
+ variants: [
11
+ {
12
+ name: 'Required input',
13
+ context: {
14
+ labelText: 'Required input',
15
+ name: 'Required input',
16
+ id: 'requiredInput',
17
+ type: 'password',
18
+ required: true,
19
+ },
20
+ },
21
+ {
22
+ name: 'With validation message',
23
+ context: {
24
+ labelText: 'Validated input',
25
+ name: 'Validated input',
26
+ id: 'validatedInput',
27
+ type: 'text',
28
+ validationMessage: '100 characters remaining',
29
+ },
30
+ },
31
+ {
32
+ name: 'Disabled input',
33
+ context: {
34
+ labelText: 'Disabled input',
35
+ name: 'Disabled input',
36
+ id: 'disabledInput',
37
+ type: 'email',
38
+ disabled: true,
39
+ },
40
+ },
41
+ ],
42
+ };
@@ -0,0 +1,11 @@
1
+ {% from "./input/_macro.njk" import MdsInput %}
2
+
3
+ {{ MdsInput({
4
+ labelText: labelText,
5
+ name: name,
6
+ id: id,
7
+ type: type,
8
+ required: required,
9
+ disabled: disabled,
10
+ validationMessage: validationMessage
11
+ }) }}
@@ -0,0 +1,24 @@
1
+ .mds-input {
2
+ width: 100%;
3
+ background-color: $mds-color-neutral-lightest;
4
+ height: 2rem;
5
+ margin: $mds-size-baseline 0;
6
+ padding: $mds-size-baseline;
7
+ &__label {
8
+ font-weight: 600;
9
+ &--hint {
10
+ font-weight: normal;
11
+ color: $mds-color-neutral-base;
12
+ }
13
+ }
14
+ &__validation-message {
15
+ display: block;
16
+ text-align: right;
17
+ &--error {
18
+ color: $mds-color-status-error-base;
19
+ }
20
+ }
21
+ &--error {
22
+ border-color: $mds-color-status-error-base;
23
+ }
24
+ }
@@ -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
  }
@@ -0,0 +1,3 @@
1
+ {% macro MdsTextArea(params) %}
2
+ {%- include "./_template.njk" -%}
3
+ {% endmacro %}
@@ -0,0 +1,41 @@
1
+ <div>
2
+ <label class="mds-display-block mds-input__label mds-font-long-primer mds-margin-bottom-b1" for="{{ params.id }}">
3
+ {{ params.labelText }}
4
+ {% if params.required %}
5
+ <span>*</span>
6
+ {% endif %}
7
+ </label>
8
+ {% if params.labelHint %}
9
+ <span
10
+ class="mds-display-block mds-input__label--hint mds-font-long-primer mds-margin-bottom-b1"
11
+ id="{{ params.id }}-hint"
12
+ >
13
+ {{ params.labelHint }}
14
+ </span>
15
+ {% endif %}
16
+ <textarea
17
+ class="mds-textarea mds-border mds-border-radius"
18
+ name="{{ params.name }}"
19
+ id="{{ params.id }}"
20
+ cols="{{ params.cols | default(30) }}"
21
+ rows="{{ params.rows | default(10) }}"
22
+ {% if params.labelHint or params.validationMessage %}
23
+ aria-describedby="{% if params.labelHint %}{{ params.id }}-hint {% endif %}{% if params.validationMessage %}{{ params.id }}-validation-message{% endif %}"
24
+ {% endif %}
25
+ {% if params.disabled %}
26
+ disabled="disabled"
27
+ {% endif %}
28
+ {% if params.required %}
29
+ required="required"
30
+ {% endif %}
31
+ ></textarea>
32
+ {% if params.validationMessage %}
33
+ <span
34
+ aria-live="polite"
35
+ id="{{ params.id }}-validation-message"
36
+ class="mds-input__validation-message mds-font-brevier"
37
+ >
38
+ {{ params.validationMessage }}
39
+ </span>
40
+ {% endif %}
41
+ </div>
@@ -0,0 +1,31 @@
1
+ module.exports = {
2
+ title: 'Text Area',
3
+ status: 'prototype',
4
+ context: {
5
+ labelText: 'Text area',
6
+ name: 'Example text area',
7
+ id: 'exampleTextArea',
8
+ },
9
+ variants: [
10
+ {
11
+ name: 'With label hint',
12
+ context: {
13
+ labelText: 'Hint input',
14
+ name: 'Hint input',
15
+ id: 'hintInput',
16
+ type: 'text',
17
+ labelHint: 'This is a text area',
18
+ },
19
+ },
20
+ {
21
+ name: 'With validation message',
22
+ context: {
23
+ labelText: 'Validated input',
24
+ name: 'Validated input',
25
+ id: 'validatedInput',
26
+ type: 'text',
27
+ validationMessage: '100 characters remaining',
28
+ },
29
+ },
30
+ ],
31
+ };
@@ -0,0 +1,11 @@
1
+ {% from "./textarea/_macro.njk" import MdsTextArea %}
2
+
3
+ {{ MdsTextArea({
4
+ labelText: labelText,
5
+ labelHint: labelHint,
6
+ name: name,
7
+ id: id,
8
+ required: required,
9
+ disabled: disabled,
10
+ validationMessage: validationMessage
11
+ }) }}
@@ -0,0 +1,7 @@
1
+ .mds-textarea {
2
+ resize: none;
3
+ width: 100%;
4
+ background-color: $mds-color-neutral-lightest;
5
+ margin: $mds-size-baseline 0;
6
+ padding: $mds-size-baseline * 2;
7
+ }
@@ -3,3 +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';
@@ -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": {