@ongov/ontario-design-system-complete-styles 4.2.0-alpha.1 → 4.3.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.
@@ -15,6 +15,11 @@
15
15
  border-radius: globalVariables.$global-radius;
16
16
  margin: spacing.$spacing-0 spacing.$spacing-7 spacing.$spacing-7 spacing.$spacing-0;
17
17
  padding: spacing.$spacing-0;
18
+ /*
19
+ * Required for cards to stay the same height regardless of content size.
20
+ * Without subtracting the margin-bottom amount the cards will be too large.
21
+ */
22
+ height: calc(100% - spacing.$spacing-7);
18
23
  list-style-type: none;
19
24
  transition: all 0.3s ease-in-out;
20
25
  position: relative;
@@ -5,6 +5,9 @@
5
5
  .ontario-card-collection__container {
6
6
  display: flex;
7
7
  flex-wrap: wrap;
8
+ justify-content: flex-start;
9
+ margin: spacing.$spacing-0;
10
+ padding: spacing.$spacing-0;
8
11
  }
9
12
 
10
13
  .ontario-card-collecton--cards-per-row-4 ::slotted(ontario-card) {
@@ -1,5 +1,6 @@
1
1
  @use 'sass:math';
2
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/2-tools/functions/global.functions' as globalFunctions;
3
4
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/spacing.variables' as spacing;
4
5
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/colours.variables' as colours;
5
6
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/breakpoints.variables' as breakpoints;
@@ -8,11 +9,18 @@
8
9
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/4-elements/_global.elements.scss';
9
10
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/6-components/_form.component.scss';
10
11
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/7-overrides/_visibility.overrides.scss';
12
+ @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/6-components/_text-inputs.component.scss';
13
+ @forward '../../utils/components/error-message/error-message';
11
14
 
12
- $ontario-checkboxes-size: 28px;
13
- $ontario-checkboxes-size-mobile: 32px;
14
- $ontario-checkbox-border-size: 2px;
15
- $ontario-checkbox-box-shadow-outline: 4px;
15
+ $ontario-checkboxes-size: globalFunctions.px-to-rem(28);
16
+ $ontario-checkboxes-size-mobile: globalFunctions.px-to-rem(32);
17
+ $ontario-checkbox-border-size: globalFunctions.px-to-rem(2);
18
+ $ontario-checkbox-box-shadow-outline: globalFunctions.px-to-rem(4);
19
+ $ontario-input-border-width: 0.125rem;
20
+
21
+ :host {
22
+ --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");
23
+ }
16
24
 
17
25
  .ontario-checkboxes {
18
26
  margin-bottom: spacing.$spacing-7;
@@ -93,7 +101,7 @@ $ontario-checkbox-box-shadow-outline: 4px;
93
101
  // ✔✔✔ Check mark styles ✔✔✔
94
102
  &:after {
95
103
  content: '';
96
- background-image: 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%0A");
104
+ background-image: var(--checkbox-bg);
97
105
  background-repeat: no-repeat;
98
106
  height: $ontario-checkboxes-size + $ontario-checkbox-border-size;
99
107
  width: $ontario-checkboxes-size + $ontario-checkbox-border-size;
@@ -2,6 +2,9 @@
2
2
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/colours.variables' as colours;
3
3
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/4-elements/_global.elements.scss';
4
4
  @use '../../styles/form.scss';
5
+ @forward '../../utils/components/error-message/error-message';
6
+
7
+ $ontario-dropdown-border-width: 0.125rem;
5
8
 
6
9
  .ontario-dropdown {
7
10
  background-color: colours.$ontario-colour-white;
@@ -24,3 +27,9 @@
24
27
  .ontario-dropdown option {
25
28
  font-weight: normal;
26
29
  }
30
+
31
+ .ontario-dropdown--error {
32
+ select {
33
+ border: $ontario-dropdown-border-width solid colours.$ontario-colour-alert;
34
+ }
35
+ }
@@ -26,6 +26,10 @@ $ontario-header-menu-button-icon--margin-right: 6px;
26
26
 
27
27
  $ontario-navigation-container-min-width: 290px;
28
28
 
29
+ :host {
30
+ --header-search-reset: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTE5IDYuNEwxNy42IDUgMTIgMTAuNiA2LjQgNSA1IDYuNGw1LjYgNS42TDUgMTcuNiA2LjQgMTlsNS42LTUuNiA1LjYgNS42IDEuNC0xLjQtNS42LTUuNkwxOSA2LjR6IiBmaWxsPSIjMDAwIi8+PC9zdmc+);
31
+ }
32
+
29
33
  .ontario-header__container {
30
34
  position: relative;
31
35
  z-index: calc(zIndex.$ontario-z-index-above-high + 1);
@@ -419,7 +423,7 @@ input[type='reset'].ontario-header__search-reset {
419
423
  color: colours.$ontario-colour-black;
420
424
  margin: spacing.$spacing-0;
421
425
  padding: spacing.$spacing-2;
422
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTE5IDYuNEwxNy42IDUgMTIgMTAuNiA2LjQgNSA1IDYuNGw1LjYgNS42TDUgMTcuNiA2LjQgMTlsNS42LTUuNiA1LjYgNS42IDEuNC0xLjQtNS42LTUuNkwxOSA2LjR6IiBmaWxsPSIjMDAwIi8+PC9zdmc+);
426
+ background-image: var(--header-search-reset);
423
427
  background-position: center center;
424
428
  background-repeat: no-repeat;
425
429
  background-color: transparent;
@@ -13,10 +13,13 @@
13
13
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/4-elements/_global.elements.scss';
14
14
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/6-components/_form.component.scss';
15
15
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/7-overrides/_visibility.overrides.scss';
16
+ @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/6-components/_text-inputs.component.scss';
17
+ @forward '../../utils/components/error-message/error-message';
16
18
 
17
19
  $ontario-radios-size: 32px;
18
20
  $ontario-radios-size-mobile: 36px;
19
21
  $ontario-input-offset: math.div((globalVariables.$touch-target-size - $ontario-radios-size), 2);
22
+ $ontario-input-border-width: 0.125rem;
20
23
 
21
24
  .ontario-radios__item {
22
25
  position: relative;
@@ -7,6 +7,9 @@
7
7
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/1-variables/font-sizes.variables' as fontSizes;
8
8
  @use '@ongov/ontario-design-system-global-styles/dist/styles/scss/4-elements/_global.elements.scss';
9
9
  @use '../../styles/form.scss';
10
+ @forward '../../utils/components/error-message/error-message';
11
+
12
+ $ontario-textarea-border-width: 0.125rem;
10
13
 
11
14
  .ontario-textarea {
12
15
  border: globalVariables.$border-size-standard solid colours.$ontario-colour-black;
@@ -34,3 +37,9 @@
34
37
  .ontario-textarea.ontario-textarea-hint-expander--true {
35
38
  margin-bottom: spacing.$spacing-4;
36
39
  }
40
+
41
+ .ontario-textarea--error {
42
+ textarea {
43
+ border: $ontario-textarea-border-width solid colours.$ontario-colour-alert;
44
+ }
45
+ }
@@ -7,6 +7,11 @@
7
7
  @use '../1-variables/letter-spacing.variables' as letterSpacing;
8
8
  @use '../1-variables/line-heights.variables' as lineHeight;
9
9
 
10
+ //for general forms
11
+ .ontario-form-group:last-of-type {
12
+ margin-bottom: 2.5rem;
13
+ }
14
+
10
15
  .ontario-form-group:last-of-type {
11
16
  margin-bottom: spacing.$spacing-8;
12
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ongov/ontario-design-system-complete-styles",
3
- "version": "4.2.0-alpha.1",
3
+ "version": "4.3.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,9 +20,9 @@
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": "4.2.0-alpha.1",
24
- "@ongov/ontario-design-system-design-tokens": "4.2.0-alpha.1",
25
- "@ongov/ontario-design-system-global-styles": "4.2.0-alpha.1",
23
+ "@ongov/ontario-design-system-component-library": "4.3.0-alpha.1",
24
+ "@ongov/ontario-design-system-design-tokens": "4.3.0-alpha.1",
25
+ "@ongov/ontario-design-system-global-styles": "4.3.0-alpha.1",
26
26
  "gulp-flatten": "^0.4.0"
27
27
  },
28
28
  "devDependencies": {
@@ -48,5 +48,5 @@
48
48
  }
49
49
  ],
50
50
  "sass": "dist/styles/scss/theme.scss",
51
- "gitHead": "d18083f3565f0c6b7f3e6da76e7364cb5c7356fb"
51
+ "gitHead": "e2994e1e48a783104f3299980481b3cdaab2a302"
52
52
  }