@ons/design-system 44.0.0 → 44.1.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.
- package/components/address-input/_macro.njk +1 -0
- package/components/address-input/autosuggest.address.js +0 -1
- package/components/autosuggest/_macro.njk +1 -0
- package/components/autosuggest/autosuggest.ui.js +1 -1
- package/components/checkboxes/_checkbox.scss +1 -1
- package/components/checkboxes/_macro.njk +3 -3
- package/components/collapsible/_collapsible.scss +1 -1
- package/components/input/_input.scss +6 -2
- package/components/message/_message.scss +3 -1
- package/components/modal/_macro.njk +23 -0
- package/components/modal/_modal.scss +32 -0
- package/components/modal/modal.dom.js +14 -0
- package/components/modal/modal.js +104 -0
- package/components/summary/_summary.scss +4 -2
- package/components/table/_table.scss +1 -1
- package/components/timeout-modal/_macro.njk +26 -0
- package/components/timeout-modal/timeout.dom.js +16 -0
- package/components/timeout-modal/timeout.js +289 -0
- package/css/census.css +1 -1
- package/css/error.css +1 -1
- package/css/main.css +1 -1
- package/favicons/census/cy/android-chrome-192x192.png +0 -0
- package/favicons/census/cy/android-chrome-512x512.png +0 -0
- package/favicons/census/cy/apple-touch-icon.png +0 -0
- package/favicons/census/cy/browserconfig.xml +12 -0
- package/favicons/census/cy/favicon-16x16.png +0 -0
- package/favicons/census/cy/favicon-32x32.png +0 -0
- package/favicons/census/cy/favicon.ico +0 -0
- package/favicons/census/cy/manifest.json +20 -0
- package/favicons/census/cy/mstitle-150x150.png +0 -0
- package/favicons/census/cy/mstitle-310x150.png +0 -0
- package/favicons/census/cy/mstitle-310x310.png +0 -0
- package/favicons/census/cy/mstitle-70x70.png +0 -0
- package/favicons/census/cy/opengraph.png +0 -0
- package/favicons/census/cy/safari-pinned-tab.svg +3 -0
- package/favicons/census/cy/site.webmanifest +19 -0
- package/favicons/census/cy/twitter.png +0 -0
- package/favicons/census/en/android-chrome-192x192.png +0 -0
- package/favicons/census/en/android-chrome-512x512.png +0 -0
- package/favicons/census/en/apple-touch-icon.png +0 -0
- package/favicons/census/en/browserconfig.xml +12 -0
- package/favicons/census/en/favicon-16x16.png +0 -0
- package/favicons/census/en/favicon-32x32.png +0 -0
- package/favicons/census/en/favicon.ico +0 -0
- package/favicons/census/en/manifest.json +20 -0
- package/favicons/census/en/mstitle-150x150.png +0 -0
- package/favicons/census/en/mstitle-310x150.png +0 -0
- package/favicons/census/en/mstitle-310x310.png +0 -0
- package/favicons/census/en/mstitle-70x70.png +0 -0
- package/favicons/census/en/opengraph.png +0 -0
- package/favicons/census/en/safari-pinned-tab.svg +3 -0
- package/favicons/census/en/site.webmanifest +19 -0
- package/favicons/census/en/twitter.png +0 -0
- package/favicons/census/ni/favicon.ico +0 -0
- package/package.json +8 -11
- package/scripts/main.es5.js +2 -2
- package/scripts/main.js +1 -1
- package/scss/base/_global.scss +9 -5
- package/scss/error.scss +0 -2
- package/scss/helpers/_functions.scss +4 -2
- package/scss/main.scss +65 -8
- package/scss/overrides/rtl.scss +4 -2
- package/scss/patternlib.scss +3 -2
- package/scss/utilities/_colors.scss +4 -4
- package/scss/utilities/_grid.scss +7 -5
- package/src/js/domready.js +17 -0
package/scss/base/_global.scss
CHANGED
|
@@ -29,6 +29,14 @@ hr {
|
|
|
29
29
|
margin: 2rem 0 0;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
%a-focus {
|
|
33
|
+
background-color: $color-focus;
|
|
34
|
+
box-shadow: 0 -2px $color-focus, 0 4px $color-text-link-focus;
|
|
35
|
+
color: $color-text-link-focus;
|
|
36
|
+
outline: 3px solid transparent;
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
32
40
|
a {
|
|
33
41
|
color: $color-text-link;
|
|
34
42
|
text-decoration-thickness: 1px;
|
|
@@ -52,10 +60,6 @@ a {
|
|
|
52
60
|
text-decoration: underline solid $color-text-link-hover 2px;
|
|
53
61
|
}
|
|
54
62
|
&:focus:not(.ons-btn--link):not(.ons-btn--ghost):not(.ons-js-clear-btn):not(.ons-download__thumbnail--link):not(.ons-tab--row):not(.ons-skip-link) {
|
|
55
|
-
|
|
56
|
-
box-shadow: 0 -2px $color-focus, 0 4px $color-text-link-focus;
|
|
57
|
-
color: $color-text-link-focus;
|
|
58
|
-
outline: 3px solid transparent;
|
|
59
|
-
text-decoration: none;
|
|
63
|
+
@extend %a-focus;
|
|
60
64
|
}
|
|
61
65
|
}
|
package/scss/error.scss
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
1
3
|
@function ems($pxval, $base: $base) {
|
|
2
|
-
$em-size: $pxval
|
|
4
|
+
$em-size: math.div($pxval, $base);
|
|
3
5
|
|
|
4
6
|
@return #{$em-size}em;
|
|
5
7
|
}
|
|
6
8
|
|
|
7
9
|
@function rems($pxval, $base: $base) {
|
|
8
|
-
$rem-size: $pxval
|
|
10
|
+
$rem-size: math.div($pxval, $base);
|
|
9
11
|
|
|
10
12
|
@return #{$rem-size}rem;
|
|
11
13
|
}
|
package/scss/main.scss
CHANGED
|
@@ -1,18 +1,75 @@
|
|
|
1
1
|
@import 'normalize';
|
|
2
|
-
|
|
3
|
-
@include normalize();
|
|
4
|
-
|
|
5
2
|
@import 'vars/index';
|
|
6
3
|
@import 'helpers/index';
|
|
7
4
|
@import 'base/index';
|
|
8
5
|
@import 'objects/index';
|
|
9
|
-
@import '../components
|
|
10
|
-
@import '../
|
|
11
|
-
@import '../
|
|
6
|
+
@import '../components/access-code/uac';
|
|
7
|
+
@import '../components/address-output/address-output';
|
|
8
|
+
@import '../components/articles/articles';
|
|
9
|
+
@import '../components/autosuggest/autosuggest';
|
|
10
|
+
@import '../components/breadcrumbs/breadcrumbs';
|
|
11
|
+
@import '../components/button/button';
|
|
12
|
+
@import '../components/call-to-action/call-to-action';
|
|
13
|
+
@import '../components/card/card';
|
|
14
|
+
@import '../components/checkboxes/checkbox';
|
|
15
|
+
@import '../components/checkboxes/checkboxes';
|
|
16
|
+
@import '../components/collapsible/collapsible';
|
|
17
|
+
@import '../components/content-pagination/content-pagination';
|
|
18
|
+
@import '../components/cookies-banner/cookies-banner';
|
|
19
|
+
@import '../components/download-resources/download-resources';
|
|
20
|
+
@import '../components/downloads/downloads';
|
|
21
|
+
@import '../components/external-link/external-link';
|
|
22
|
+
@import '../components/feedback/feedback';
|
|
23
|
+
@import '../components/field/field-group';
|
|
24
|
+
@import '../components/field/field';
|
|
25
|
+
@import '../components/fieldset/fieldset';
|
|
26
|
+
@import '../components/find-a-support-centre/find-a-support-centre';
|
|
27
|
+
@import '../components/footer/footer';
|
|
28
|
+
@import '../components/header/header-nav';
|
|
29
|
+
@import '../components/header/header';
|
|
30
|
+
@import '../components/hero/hero';
|
|
31
|
+
@import '../components/icons/icons';
|
|
32
|
+
@import '../components/images/images';
|
|
33
|
+
@import '../components/input/input-type';
|
|
34
|
+
@import '../components/input/input';
|
|
35
|
+
@import '../components/label/label';
|
|
36
|
+
@import '../components/language-selector/language';
|
|
37
|
+
@import '../components/lists/list';
|
|
38
|
+
@import '../components/message-list/message-list';
|
|
39
|
+
@import '../components/message/message';
|
|
40
|
+
@import '../components/metadata/metadata';
|
|
41
|
+
@import '../components/modal/modal';
|
|
42
|
+
@import '../components/pagination/pagination';
|
|
43
|
+
@import '../components/panel/panel';
|
|
44
|
+
@import '../components/phase-banner/phase-banner';
|
|
45
|
+
@import '../components/promotional-banner/promo-banner';
|
|
46
|
+
@import '../components/question/question';
|
|
47
|
+
@import '../components/quote/quote';
|
|
48
|
+
@import '../components/radios/radio';
|
|
49
|
+
@import '../components/radios/radios';
|
|
50
|
+
@import '../components/related-content/related-content';
|
|
51
|
+
@import '../components/relationships/relationships';
|
|
52
|
+
@import '../components/search/search';
|
|
53
|
+
@import '../components/section-navigation/section-navigation';
|
|
54
|
+
@import '../components/skip-to-content/skip';
|
|
55
|
+
@import '../components/status/status';
|
|
56
|
+
@import '../components/summary/summary';
|
|
57
|
+
@import '../components/table-of-contents/toc';
|
|
58
|
+
@import '../components/table/table';
|
|
59
|
+
@import '../components/tabs/tabs';
|
|
60
|
+
@import '../components/text-indent/text-indent';
|
|
61
|
+
@import '../components/timeline/timeline';
|
|
62
|
+
@import '../components/upload/upload';
|
|
63
|
+
@import '../components/video/video';
|
|
64
|
+
@import '../patterns/help-users-to/see-important-information/src/_highlight';
|
|
65
|
+
@import '../patterns/pages/question/examples/question-anatomy/pl-question-anatomy';
|
|
66
|
+
@import '../foundations/layout/page-template/examples/block-areas/block-areas';
|
|
67
|
+
@import '../foundations/style/colours/colours';
|
|
68
|
+
@import '../foundations/style/icons/icon-swatch';
|
|
12
69
|
@import 'utilities/index';
|
|
13
70
|
|
|
14
71
|
// Right to left
|
|
15
|
-
@import 'overrides/rtl
|
|
72
|
+
@import 'overrides/rtl';
|
|
16
73
|
|
|
17
74
|
// High Contrast Mode
|
|
18
|
-
@import 'overrides/hcm
|
|
75
|
+
@import 'overrides/hcm';
|
package/scss/overrides/rtl.scss
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
1
3
|
.ons-rtl .ons-page__container > .ons-grid {
|
|
2
4
|
direction: rtl;
|
|
3
5
|
|
|
@@ -97,7 +99,7 @@
|
|
|
97
99
|
// Flip push and pull
|
|
98
100
|
@each $breakpoint-min, $size in $grid-bp {
|
|
99
101
|
@for $column from 1 through $grid-cols {
|
|
100
|
-
$width: percentage($column
|
|
102
|
+
$width: percentage(math.div($column, $grid-cols));
|
|
101
103
|
|
|
102
104
|
@include mq($breakpoint-min) {
|
|
103
105
|
.ons-push-#{$column}\@#{$breakpoint-min} {
|
|
@@ -112,7 +114,7 @@
|
|
|
112
114
|
|
|
113
115
|
@each $breakpoint-max, $size in $grid-bp {
|
|
114
116
|
@for $column from 1 through $grid-cols {
|
|
115
|
-
$width: percentage($column
|
|
117
|
+
$width: percentage(math.div($column, $grid-cols));
|
|
116
118
|
|
|
117
119
|
@include mq($breakpoint-min, $breakpoint-max) {
|
|
118
120
|
.ons-push-#{$column}\@#{$breakpoint-min}\@#{$breakpoint-max} {
|
package/scss/patternlib.scss
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@import 'vars/index';
|
|
2
|
-
@import 'helpers
|
|
3
|
-
@import '../views/partials
|
|
2
|
+
@import 'helpers/index';
|
|
3
|
+
@import '../views/partials/example/example';
|
|
4
|
+
@import '../views/partials/sub-navigation/sub-navigation';
|
|
4
5
|
@import '../foundations/layout/page-template/examples/block-areas/block-areas';
|
|
5
6
|
@import '../patterns/pages/question/examples/question-anatomy/pl-question-anatomy';
|
|
6
7
|
@import 'prism-tomorrow';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
@each $label, $color in (blue: $color-night-blue, green: $color-leaf-green) {
|
|
2
|
-
.ons-u-#{$label} {
|
|
2
|
+
.ons-u-#{'' + $label} {
|
|
3
3
|
color: $color;
|
|
4
4
|
}
|
|
5
|
-
.ons-u-bg-#{$label} {
|
|
5
|
+
.ons-u-bg-#{'' + $label} {
|
|
6
6
|
background-color: $color;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
@for $tint from 1 through 10 {
|
|
10
|
-
.ons-u-#{$label}-#{$tint*10} {
|
|
10
|
+
.ons-u-#{'' + $label}-#{$tint*10} {
|
|
11
11
|
color: tint($color, $tint * 10);
|
|
12
12
|
}
|
|
13
|
-
.ons-u-bg-#{$label}-#{$tint*10} {
|
|
13
|
+
.ons-u-bg-#{'' + $label}-#{$tint*10} {
|
|
14
14
|
background-color: tint($color, $tint * 10);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
1
3
|
.ons-grid {
|
|
2
4
|
box-sizing: border-box;
|
|
3
5
|
font-size: 0;
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
}
|
|
33
35
|
&.ons-grid--tight {
|
|
34
36
|
.ons-grid__col {
|
|
35
|
-
margin-bottom: $grid-gutters
|
|
37
|
+
margin-bottom: math.div($grid-gutters, 2);
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -53,9 +55,9 @@
|
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
.ons-grid--tight {
|
|
56
|
-
margin-left: -$grid-gutters
|
|
58
|
+
margin-left: math.div(-$grid-gutters, 2);
|
|
57
59
|
.ons-grid__col {
|
|
58
|
-
padding-left: $grid-gutters
|
|
60
|
+
padding-left: math.div($grid-gutters, 2);
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
|
|
@@ -157,7 +159,7 @@
|
|
|
157
159
|
|
|
158
160
|
@each $breakpoint-min, $size in $grid-bp {
|
|
159
161
|
@for $column from 1 through $grid-cols {
|
|
160
|
-
$width: percentage($column
|
|
162
|
+
$width: percentage(math.div($column, $grid-cols));
|
|
161
163
|
|
|
162
164
|
@include mq($breakpoint-min) {
|
|
163
165
|
.ons-col-#{$column}\@#{$breakpoint-min} {
|
|
@@ -179,7 +181,7 @@
|
|
|
179
181
|
|
|
180
182
|
@each $breakpoint-max, $size in $grid-bp {
|
|
181
183
|
@for $column from 1 through $grid-cols {
|
|
182
|
-
$width: percentage($column
|
|
184
|
+
$width: percentage(math.div($column, $grid-cols));
|
|
183
185
|
|
|
184
186
|
@include mq($breakpoint-min, $breakpoint-max) {
|
|
185
187
|
.ons-col-#{$column}\@#{$breakpoint-min}\@#{$breakpoint-max} {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
let callbacks = [];
|
|
2
|
+
|
|
3
|
+
const onReady = () => {
|
|
4
|
+
callbacks.forEach(fn => fn.call());
|
|
5
|
+
callbacks = [];
|
|
6
|
+
window.onsDOMReady = true;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function ready(fn) {
|
|
10
|
+
if (document.readyState === 'loading') {
|
|
11
|
+
callbacks.push(fn);
|
|
12
|
+
} else {
|
|
13
|
+
fn.call();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
document.addEventListener('DOMContentLoaded', onReady);
|