@ons/design-system 72.10.9 → 72.11.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.
Files changed (39) hide show
  1. package/README.md +9 -5
  2. package/components/announcement-banner/_announcement-banner.scss +24 -0
  3. package/components/announcement-banner/_macro.njk +33 -0
  4. package/components/announcement-banner/_macro.spec.js +106 -0
  5. package/components/announcement-banner/_test_examples.js +22 -0
  6. package/components/announcement-banner/example-banner-black.njk +12 -0
  7. package/components/announcement-banner/example-banner-red.njk +13 -0
  8. package/components/announcement-banner/example-banner-teal.njk +13 -0
  9. package/components/button/_button.scss +29 -1
  10. package/components/chart/_chart.scss +3 -0
  11. package/components/chart/_macro.njk +10 -4
  12. package/components/chart/_macro.spec.js +1150 -642
  13. package/components/chart/chart-iframe-resize.js +2 -2
  14. package/components/chart/example-iframe-chart.njk +1 -1
  15. package/components/duration/example-duration-error-for-single-field.njk +0 -1
  16. package/components/duration/example-duration-error.njk +0 -1
  17. package/components/footer/_macro.spec.js +2 -2
  18. package/components/header/_macro.njk +5 -16
  19. package/components/header/example-header-button-and-navigation.njk +133 -0
  20. package/components/header/example-header-external-with-navigation-and-search.njk +1 -1
  21. package/components/navigation/_macro.njk +11 -16
  22. package/components/navigation/_navigation.scss +24 -0
  23. package/components/table/_macro.njk +107 -112
  24. package/components/table/_macro.spec.js +35 -44
  25. package/components/table/_table.scss +0 -12
  26. package/components/table/example-table-sortable.njk +1 -1
  27. package/components/tabs/example-tabs-details.njk +1 -1
  28. package/components/textarea/_macro.njk +1 -0
  29. package/components/textarea/_macro.spec.js +1 -0
  30. package/components/timeout-panel/timeout-panel.spec.js +1 -1
  31. package/css/main.css +1 -1
  32. package/layout/_template.njk +13 -0
  33. package/package.json +3 -3
  34. package/scripts/main.es5.js +1 -1
  35. package/scripts/main.js +1 -1
  36. package/scss/main.scss +1 -0
  37. package/scss/vars/_colors.scss +3 -0
  38. package/scss/vars/_forms.scss +11 -0
  39. package/components/table/example-table-scrollable.njk +0 -158
package/scss/main.scss CHANGED
@@ -5,6 +5,7 @@
5
5
  @import 'objects/index';
6
6
  @import '../components/access-code/access-code';
7
7
  @import '../components/address-output/address-output';
8
+ @import '../components/announcement-banner/announcement-banner';
8
9
  @import '../components/autosuggest/autosuggest';
9
10
  @import '../components/back-to-top/back-to-top';
10
11
  @import '../components/breadcrumbs/breadcrumbs';
@@ -33,6 +33,9 @@
33
33
  --ons-color-sun-yellow: #fbc900;
34
34
  --ons-color-neon-yellow: #f0f762;
35
35
  --ons-color-light-orange: #e8bb9b;
36
+ --ons-color-gov-teal: #00847d;
37
+ --ons-color-gov-red: #b10e1e;
38
+ --ons-color-gov-black: #0b0c0c;
36
39
 
37
40
  // Core colour adjustments - tints
38
41
  --ons-color-ocean-blue-tint: #e9eff4;
@@ -46,3 +46,14 @@ $nbsp-width: 0.288rem;
46
46
  #{$padding-width + $chars-width + $num-chars-width + $chars-space-width + $spaces-width} + #{($input-border-width * 2) + 2px}
47
47
  );
48
48
  }
49
+
50
+ $iframe-ratios: '16-9', '4-3', '21-9', '1-1', '3-2', '9-16';
51
+
52
+ @mixin iframe-aspect-ratio($class-name, $ratios: $iframe-ratios) {
53
+ @each $ratio in $ratios {
54
+ .#{str-replace($class-name, '{x}', $ratio)} {
55
+ aspect-ratio: #{str-replace($ratio, '-', '/')};
56
+ width: 100%;
57
+ }
58
+ }
59
+ }
@@ -1,158 +0,0 @@
1
- {% from "components/table/_macro.njk" import onsTable %}
2
- {{
3
- onsTable({
4
- "variants": 'scrollable',
5
- "caption": "Scrollable table",
6
- "ariaLabel": "There are 7 columns in this table. Some of the table may be off screen. Scroll or drag horizontally to bring into view.",
7
- "ths": [
8
- {
9
- "value": "ID"
10
- },
11
- {
12
- "value": "Title"
13
- },
14
- {
15
- "value": "Abbreviation"
16
- },
17
- {
18
- "value": "Legal basis"
19
- },
20
- {
21
- "value": "Frequency"
22
- },
23
- {
24
- "value": "Date"
25
- },
26
- {
27
- "value": "Status"
28
- }
29
- ],
30
- "trs": [
31
- {
32
- "tds": [
33
- {
34
- "value": "023"
35
- },
36
- {
37
- "value": "Monthly Business Survey - Retail Sales Index"
38
- },
39
- {
40
- "value": "RSI"
41
- },
42
- {
43
- "value": "Statistics of Trade Act 1947"
44
- },
45
- {
46
- "value": "Monthly"
47
- },
48
- {
49
- "value": "20 Jan 2018"
50
- },
51
- {
52
- "value": "<span class='ons-status ons-status--success'>Ready</span>"
53
- }
54
- ]
55
- },
56
- {
57
- "tds": [
58
- {
59
- "value": "112"
60
- },
61
- {
62
- "value": "Annual Inward Foreign Direct Investment Survey"
63
- },
64
- {
65
- "value": "AIFDI"
66
- },
67
- {
68
- "value": "Statistics of Trade Act 1947"
69
- },
70
- {
71
- "value": "Annually"
72
- },
73
- {
74
- "value": "26 Feb 2018"
75
- },
76
- {
77
- "value": "<span class='ons-status ons-status--dead'>Not ready</span>"
78
- }
79
- ]
80
- },
81
- {
82
- "tds": [
83
- {
84
- "value": "332"
85
- },
86
- {
87
- "value": "Business Register and Employment Survey"
88
- },
89
- {
90
- "value": "BRES"
91
- },
92
- {
93
- "value": "Statistics of Trade Act 1947"
94
- },
95
- {
96
- "value": "Annually"
97
- },
98
- {
99
- "value": "23 Jan 2013"
100
- },
101
- {
102
- "value": "<span class='ons-status ons-status--info'>In progress</span>"
103
- }
104
- ]
105
- },
106
- {
107
- "tds": [
108
- {
109
- "value": "654"
110
- },
111
- {
112
- "value": "Quartely Survey of Building Materials Sand and Gravel"
113
- },
114
- {
115
- "value": "QBMS"
116
- },
117
- {
118
- "value": "Statistics of Trade Act 1947 - BEIS"
119
- },
120
- {
121
- "value": "Quartely"
122
- },
123
- {
124
- "value": "24 Jan 2015"
125
- },
126
- {
127
- "value": "<span class='ons-status ons-status--error'>Issue</span>"
128
- }
129
- ]
130
- },
131
- {
132
- "tds": [
133
- {
134
- "value": "765"
135
- },
136
- {
137
- "value": "Monthly Survey of Building Materials Concrete Building Blocks"
138
- },
139
- {
140
- "value": "MSBB"
141
- },
142
- {
143
- "value": "Voluntary"
144
- },
145
- {
146
- "value": "Monthly"
147
- },
148
- {
149
- "value": "25 Jan 2014"
150
- },
151
- {
152
- "value": "<span class='ons-status ons-status--success'>Ready</span>"
153
- }
154
- ]
155
- }
156
- ]
157
- })
158
- }}