@ongov/ontario-design-system-complete-styles 4.3.1-alpha.1 → 5.0.0-alpha.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.
- package/dist/assets/ontario-icon-close.svg +1 -0
- package/dist/scripts/toc-smooth-scroll.js +20 -0
- package/dist/styles/components/ontario-card/ontario-card.scss +54 -40
- package/dist/styles/components/ontario-checkbox/ontario-checkboxes.scss +0 -1
- package/dist/styles/components/ontario-header/service-ontario-header.scss +0 -4
- package/dist/styles/components/ontario-radio-buttons/ontario-radio-buttons.scss +0 -1
- package/dist/styles/components/ontario-search-box/ontario-search-box.scss +141 -0
- package/dist/styles/scss/6-components/_all.component.scss +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path d="M19 6.4L17.6 5 12 10.6 6.4 5 5 6.4l5.6 5.6L5 17.6 6.4 19l5.6-5.6 5.6 5.6 1.4-1.4-5.6-5.6L19 6.4z" fill="#000"/></svg>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
const links = document.querySelectorAll('.ontario-page-navigation-item__link');
|
|
3
|
+
|
|
4
|
+
for (const link of links) {
|
|
5
|
+
link.addEventListener('click', clickHandler);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function clickHandler(e) {
|
|
9
|
+
e.preventDefault();
|
|
10
|
+
|
|
11
|
+
const href = this.getAttribute('href');
|
|
12
|
+
const element = document.querySelector(href);
|
|
13
|
+
|
|
14
|
+
if (element) {
|
|
15
|
+
element.scrollIntoView({ behavior: 'smooth' });
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
history.pushState(null, null, href);
|
|
19
|
+
}
|
|
20
|
+
})();
|
|
@@ -47,16 +47,11 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.ontario-card__header-type--dark.ontario-card__description-false {
|
|
51
|
-
background-color: colours.$ontario-colour-black;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.ontario-card__header-type--light.ontario-card__description-false {
|
|
55
|
-
background-color: colours.$ontario-greyscale-5;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
50
|
.ontario-card--image-true {
|
|
59
51
|
margin-top: spacing.$spacing-2 * -1;
|
|
52
|
+
@at-root .ontario-card__card-type--horizontal & {
|
|
53
|
+
margin-top: spacing.$spacing-0;
|
|
54
|
+
}
|
|
60
55
|
}
|
|
61
56
|
|
|
62
57
|
.ontario-card__card-type--horizontal {
|
|
@@ -72,6 +67,10 @@
|
|
|
72
67
|
position: relative;
|
|
73
68
|
}
|
|
74
69
|
|
|
70
|
+
.ontario-card__heading {
|
|
71
|
+
border-radius: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
75
74
|
a {
|
|
76
75
|
&:focus-within {
|
|
77
76
|
box-shadow: none;
|
|
@@ -100,30 +99,18 @@
|
|
|
100
99
|
padding: (spacing.$spacing-5 - spacing.$spacing-1) spacing.$spacing-5 spacing.$spacing-2 spacing.$spacing-5;
|
|
101
100
|
transition: text-decoration 0.3s ease-in-out;
|
|
102
101
|
background-color: colours.$ontario-colour-white;
|
|
102
|
+
max-width: none;
|
|
103
103
|
|
|
104
104
|
.ontario-card:hover & {
|
|
105
105
|
text-decoration-line: underline;
|
|
106
106
|
text-decoration-color: colours.$ontario-colour-black;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.ontario-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
border-radius: globalVariables.$global-radius globalVariables.$global-radius 0 0;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.ontario-card__header-type--dark & {
|
|
118
|
-
background-color: colours.$ontario-colour-black;
|
|
119
|
-
padding-top: spacing.$spacing-4;
|
|
120
|
-
padding-bottom: spacing.$spacing-4;
|
|
121
|
-
border-radius: globalVariables.$global-radius globalVariables.$global-radius 0 0;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.ontario-card__header-type--dark:hover & {
|
|
125
|
-
text-decoration-line: underline;
|
|
126
|
-
text-decoration-color: colours.$ontario-colour-white;
|
|
109
|
+
.ontario-card--image-true & {
|
|
110
|
+
border-radius: 0;
|
|
111
|
+
@at-root .ontario-card__card-type--horizontal & {
|
|
112
|
+
border-radius: 0 globalVariables.$global-radius 0 0;
|
|
113
|
+
}
|
|
127
114
|
}
|
|
128
115
|
|
|
129
116
|
a {
|
|
@@ -131,10 +118,6 @@
|
|
|
131
118
|
text-decoration: none;
|
|
132
119
|
outline: none;
|
|
133
120
|
|
|
134
|
-
.ontario-card__header-type--dark & {
|
|
135
|
-
color: colours.$ontario-colour-white;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
121
|
&::after {
|
|
139
122
|
content: '';
|
|
140
123
|
position: absolute;
|
|
@@ -160,6 +143,47 @@
|
|
|
160
143
|
}
|
|
161
144
|
}
|
|
162
145
|
|
|
146
|
+
// ontario-card's header colour options
|
|
147
|
+
|
|
148
|
+
$ontario-card-heading-colours: (
|
|
149
|
+
'light-accent': colours.$ontario-greyscale-5,
|
|
150
|
+
'dark-accent': colours.$ontario-colour-black,
|
|
151
|
+
'light-gold': colours.$ontario-colour-light-gold,
|
|
152
|
+
'light-yellow': colours.$ontario-colour-light-yellow,
|
|
153
|
+
'light-taupe': colours.$ontario-colour-light-taupe,
|
|
154
|
+
'light-green': colours.$ontario-colour-light-green,
|
|
155
|
+
'light-lime': colours.$ontario-colour-light-lime,
|
|
156
|
+
'light-teal': colours.$ontario-colour-light-teal,
|
|
157
|
+
'light-sky': colours.$ontario-colour-light-sky,
|
|
158
|
+
'light-purple': colours.$ontario-colour-light-purple,
|
|
159
|
+
'light-orange': colours.$ontario-colour-light-orange,
|
|
160
|
+
'light-red': colours.$ontario-colour-light-red,
|
|
161
|
+
'light-magenta': colours.$ontario-colour-light-magenta,
|
|
162
|
+
'gold': colours.$ontario-colour-gold,
|
|
163
|
+
'yellow': colours.$ontario-colour-yellow,
|
|
164
|
+
'taupe': colours.$ontario-colour-taupe,
|
|
165
|
+
'green': colours.$ontario-colour-green,
|
|
166
|
+
'lime': colours.$ontario-colour-lime,
|
|
167
|
+
'teal': colours.$ontario-colour-teal,
|
|
168
|
+
'sky': colours.$ontario-colour-sky,
|
|
169
|
+
'purple': colours.$ontario-colour-purple,
|
|
170
|
+
'orange': colours.$ontario-colour-orange,
|
|
171
|
+
'red': colours.$ontario-colour-red,
|
|
172
|
+
'magenta': colours.$ontario-colour-magenta,
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
@each $colour-name, $colour-value in $ontario-card-heading-colours {
|
|
176
|
+
.ontario-card__background--#{$colour-name} {
|
|
177
|
+
background-color: $colour-value;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.ontario-card__heading--#{$colour-name} {
|
|
181
|
+
background-color: $colour-value;
|
|
182
|
+
padding-top: spacing.$spacing-4;
|
|
183
|
+
padding-bottom: spacing.$spacing-4;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
163
187
|
.ontario-card__text-container {
|
|
164
188
|
.ontario-card__card-type--horizontal & {
|
|
165
189
|
width: 66.6%;
|
|
@@ -189,18 +213,8 @@
|
|
|
189
213
|
margin-bottom: spacing.$spacing-0;
|
|
190
214
|
}
|
|
191
215
|
|
|
192
|
-
.ontario-card__header-type--light &,
|
|
193
|
-
.ontario-card__header-type--dark & {
|
|
194
|
-
padding-top: spacing.$spacing-4;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
216
|
@media screen and (max-width: breakpoints.$medium-breakpoint) {
|
|
198
217
|
padding: spacing.$spacing-2 spacing.$spacing-4 spacing.$spacing-5 spacing.$spacing-4;
|
|
199
|
-
|
|
200
|
-
.ontario-card__header-type--light &,
|
|
201
|
-
.ontario-card__header-type--dark & {
|
|
202
|
-
padding-top: spacing.$spacing-4;
|
|
203
|
-
}
|
|
204
218
|
}
|
|
205
219
|
}
|
|
206
220
|
|
|
@@ -16,7 +16,6 @@ $ontario-checkboxes-size: globalFunctions.px-to-rem(28);
|
|
|
16
16
|
$ontario-checkboxes-size-mobile: globalFunctions.px-to-rem(32);
|
|
17
17
|
$ontario-checkbox-border-size: globalFunctions.px-to-rem(2);
|
|
18
18
|
$ontario-checkbox-box-shadow-outline: globalFunctions.px-to-rem(4);
|
|
19
|
-
$ontario-input-border-width: 0.125rem;
|
|
20
19
|
|
|
21
20
|
:host {
|
|
22
21
|
--checkbox-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M0 2.667C0 1.194 1.194 0 2.667 0h18.667C22.806 0 24 1.194 24 2.667v18.667C24 22.806 22.806 24 21.333 24H2.667C1.194 24 0 22.806 0 21.333V2.667z' fill='%231a1a1a'/%3E%3Cpath d='M2.667 12.616l6.667 6.718 12-12.092-1.88-1.908L9.333 15.53l-4.787-4.8-1.88 1.894z' fill='%23fff'/%3E%3C/svg%3E");
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
$ontario-radios-size: 32px;
|
|
20
20
|
$ontario-radios-size-mobile: 36px;
|
|
21
21
|
$ontario-input-offset: math.div((globalVariables.$touch-target-size - $ontario-radios-size), 2);
|
|
22
|
-
$ontario-input-border-width: 0.125rem;
|
|
23
22
|
|
|
24
23
|
.ontario-radios__item {
|
|
25
24
|
position: relative;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/global.variables' as globalVariables;
|
|
3
|
+
@use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/spacing.variables' as spacing;
|
|
4
|
+
@use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/colours.variables' as colours;
|
|
5
|
+
@use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/breakpoints.variables' as breakpoints;
|
|
6
|
+
@use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/typography.variables' as typography;
|
|
7
|
+
@use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/line-heights.variables' as lineheight;
|
|
8
|
+
@use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/font-weights.variables' as fontWeights;
|
|
9
|
+
@use '@ongov/ontario-design-system-global-styles/dist/styles/scss/2-tools/functions/global.functions' as globalFunctions;
|
|
10
|
+
@use '@ongov/ontario-design-system-global-styles/dist/styles/scss/2-tools/placeholder/focus.placeholders' as
|
|
11
|
+
focusPlaceholders;
|
|
12
|
+
@use '@ongov/ontario-design-system-global-styles/dist/styles/scss/4-elements/_global.elements.scss';
|
|
13
|
+
@use '../../styles/form.scss';
|
|
14
|
+
|
|
15
|
+
$ontario-input-height: globalFunctions.px-to-rem(48);
|
|
16
|
+
$ontario-search-icon-size: 2rem;
|
|
17
|
+
$ontario-reset-icon-size: 1.5rem;
|
|
18
|
+
$ontario-search-button-width: 5rem;
|
|
19
|
+
$ontario-search-button-width--mobile: 3rem;
|
|
20
|
+
$ontario-search-input-padding: 8.5rem;
|
|
21
|
+
$ontario-search-input-padding--mobile: 7.75rem;
|
|
22
|
+
$ontario-search-desktop-width: 34rem;
|
|
23
|
+
$ontario-search-mobile-width: 20.5rem;
|
|
24
|
+
|
|
25
|
+
.ontario-search__container {
|
|
26
|
+
max-width: $ontario-search-desktop-width;
|
|
27
|
+
margin-bottom: spacing.$spacing-7;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ontario-search__input-container {
|
|
31
|
+
position: relative;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ontario-search__input.ontario-input {
|
|
35
|
+
border: 2px solid colours.$ontario-colour-black;
|
|
36
|
+
margin-bottom: spacing.$spacing-0;
|
|
37
|
+
height: $ontario-input-height;
|
|
38
|
+
padding-left: spacing.$spacing-3;
|
|
39
|
+
padding-right: $ontario-search-input-padding;
|
|
40
|
+
width: 100%;
|
|
41
|
+
|
|
42
|
+
&:invalid + input[type='reset'] {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:focus {
|
|
47
|
+
@extend %ontario-focus;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
input[type='reset'].ontario-search__reset {
|
|
52
|
+
position: absolute;
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
top: spacing.$spacing-3;
|
|
56
|
+
right: $ontario-search-button-width + spacing.$spacing-4;
|
|
57
|
+
height: $ontario-reset-icon-size;
|
|
58
|
+
width: $ontario-reset-icon-size;
|
|
59
|
+
color: colours.$ontario-colour-black;
|
|
60
|
+
margin: spacing.$spacing-0;
|
|
61
|
+
padding: spacing.$spacing-1;
|
|
62
|
+
background-size: $ontario-reset-icon-size;
|
|
63
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTE5IDYuNEwxNy42IDUgMTIgMTAuNiA2LjQgNSA1IDYuNGw1LjYgNS42TDUgMTcuNiA2LjQgMTlsNS42LTUuNiA1LjYgNS42IDEuNC0xLjQtNS42LTUuNkwxOSA2LjR6IiBmaWxsPSIjMDAwIi8+PC9zdmc+);
|
|
64
|
+
background-position: center center;
|
|
65
|
+
background-repeat: no-repeat;
|
|
66
|
+
background-color: transparent;
|
|
67
|
+
outline: none;
|
|
68
|
+
border: none;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
|
|
71
|
+
&:focus {
|
|
72
|
+
box-shadow: inset 0 0 0 globalVariables.$global-radius colours.$ontario-colour-focus;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@media screen and (max-width: breakpoints.$small-breakpoint) {
|
|
76
|
+
right: $ontario-search-button-width--mobile + spacing.$spacing-7;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ontario-search__submit {
|
|
81
|
+
border: 0;
|
|
82
|
+
border-radius: 0 3px 3px 0;
|
|
83
|
+
background-color: colours.$ontario-colour-link;
|
|
84
|
+
color: colours.$ontario-colour-black;
|
|
85
|
+
|
|
86
|
+
display: flex;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
align-items: center;
|
|
89
|
+
|
|
90
|
+
font-family: typography.$ontario-font-open-sans;
|
|
91
|
+
font-weight: fontWeights.$ontario-font-weights-semi-bold;
|
|
92
|
+
font-size: 1.125rem;
|
|
93
|
+
width: $ontario-search-button-width;
|
|
94
|
+
line-height: lineheight.$ontario-line-height-8;
|
|
95
|
+
|
|
96
|
+
position: absolute;
|
|
97
|
+
right: spacing.$spacing-0;
|
|
98
|
+
bottom: spacing.$spacing-0;
|
|
99
|
+
top: spacing.$spacing-0;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
background-color: colours.$ontario-colour-link--hover;
|
|
104
|
+
color: colours.$ontario-colour-white;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:focus {
|
|
108
|
+
outline: none;
|
|
109
|
+
box-shadow: 0 0 0 globalVariables.$global-radius colours.$ontario-colour-focus;
|
|
110
|
+
background-color: colours.$ontario-colour-link--hover;
|
|
111
|
+
color: colours.$ontario-colour-white;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:active {
|
|
115
|
+
background-color: colours.$ontario-colour-link--active;
|
|
116
|
+
color: colours.$ontario-colour-white;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
svg {
|
|
120
|
+
fill: colours.$ontario-colour-white;
|
|
121
|
+
margin-right: spacing.$spacing-0;
|
|
122
|
+
margin-bottom: spacing.$spacing-0;
|
|
123
|
+
width: $ontario-search-icon-size;
|
|
124
|
+
height: $ontario-search-icon-size;
|
|
125
|
+
display: inline-block;
|
|
126
|
+
vertical-align: middle;
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@media screen and (max-width: breakpoints.$small-breakpoint) {
|
|
131
|
+
width: $ontario-search-button-width--mobile;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// remove default cancel button for input with type="search"
|
|
136
|
+
input[type='search'].ontario-search__input::-webkit-search-decoration,
|
|
137
|
+
input[type='search'].ontario-search__input::-webkit-search-cancel-button,
|
|
138
|
+
input[type='search'].ontario-search__input::-webkit-search-results-button,
|
|
139
|
+
input[type='search'].ontario-search__input::-webkit-search-results-decoration {
|
|
140
|
+
-webkit-appearance: none;
|
|
141
|
+
}
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
@forward "./../../components/ontario-loading-indicator/ontario-loading-indicator.scss";
|
|
25
25
|
@forward "./../../components/ontario-page-alert/ontario-page-alert.scss";
|
|
26
26
|
@forward "./../../components/ontario-radio-buttons/ontario-radio-buttons.scss";
|
|
27
|
+
@forward "./../../components/ontario-search-box/ontario-search-box.scss";
|
|
27
28
|
@forward "./../../components/ontario-step-indicator/ontario-step-indicator.scss";
|
|
28
29
|
@forward "./../../components/ontario-table/ontario-table.scss";
|
|
29
30
|
@forward "./../../components/ontario-textarea/ontario-textarea.scss";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ongov/ontario-design-system-complete-styles",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-alpha.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Complete styles package for the Ontario Design System containing all SASS and CSS for use independently of the Component Library.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"docs:copy:readme": "ts-node ../../scripts/documentation-helper.ts -f README.md -p \"---\ntitle: Complete Styles\n---\n\" -df ../app-web-components-documentation/docs/06-readme-complete-styles.md"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@ongov/ontario-design-system-component-library": "
|
|
23
|
+
"@ongov/ontario-design-system-component-library": "5.0.0-alpha.1",
|
|
24
24
|
"@ongov/ontario-design-system-design-tokens": "4.3.1-alpha.1",
|
|
25
25
|
"@ongov/ontario-design-system-global-styles": "4.3.1-alpha.1",
|
|
26
26
|
"gulp-flatten": "^0.4.0"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
}
|
|
49
49
|
],
|
|
50
50
|
"sass": "dist/styles/scss/theme.scss",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "2941db5cb66d3a161e359f36543b489922853b02"
|
|
52
52
|
}
|