@ongov/ontario-design-system-component-library 4.3.0 → 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/cjs/index-88d5cf20.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{ontario-accordion_43.cjs.entry.js → ontario-accordion_44.cjs.entry.js} +738 -296
- package/dist/cjs/ontario-accordion_44.cjs.entry.js.map +1 -0
- package/dist/cjs/ontario-design-system-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ontario-card/ontario-card-types.js +29 -2
- package/dist/collection/components/ontario-card/ontario-card-types.js.map +1 -1
- package/dist/collection/components/ontario-card/ontario-card.css +257 -31
- package/dist/collection/components/ontario-card/ontario-card.js +104 -80
- package/dist/collection/components/ontario-card/ontario-card.js.map +1 -1
- package/dist/collection/components/ontario-card/test/ontario-cards.spec.js +23 -13
- package/dist/collection/components/ontario-card/test/ontario-cards.spec.js.map +1 -1
- package/dist/collection/components/ontario-header/ontario-header.js +17 -3
- package/dist/collection/components/ontario-header/ontario-header.js.map +1 -1
- package/dist/collection/components/ontario-header/service-ontario-header.css +0 -3
- package/dist/collection/components/ontario-header/test/ontario-header.spec.js +3 -3
- package/dist/collection/components/ontario-header/test/ontario-header.spec.js.map +1 -1
- package/dist/collection/components/ontario-language-toggle/ontario-language-toggle.js +193 -47
- package/dist/collection/components/ontario-language-toggle/ontario-language-toggle.js.map +1 -1
- package/dist/collection/components/ontario-language-toggle/test/ontario-language-toggle.spec.js +16 -3
- package/dist/collection/components/ontario-language-toggle/test/ontario-language-toggle.spec.js.map +1 -1
- package/dist/collection/components/ontario-search-box/assets/ontario-icon-close.svg +1 -0
- package/dist/collection/components/ontario-search-box/assets/ontario-logo--mobile.svg +6 -0
- package/dist/collection/components/ontario-search-box/ontario-search-box.css +823 -0
- package/dist/collection/components/ontario-search-box/ontario-search-box.js +584 -0
- package/dist/collection/components/ontario-search-box/ontario-search-box.js.map +1 -0
- package/dist/collection/components/ontario-search-box/test/ontario-search-box.e2e.js +20 -0
- package/dist/collection/components/ontario-search-box/test/ontario-search-box.e2e.js.map +1 -0
- package/dist/collection/components/ontario-search-box/test/ontario-search-box.spec.js +19 -0
- package/dist/collection/components/ontario-search-box/test/ontario-search-box.spec.js.map +1 -0
- package/dist/collection/components/ontario-step-indicator/ontario-step-indicator.js +5 -5
- package/dist/collection/components/ontario-table/ontario-table.js +5 -5
- package/dist/collection/components/ontario-textarea/ontario-textarea.js +3 -3
- package/dist/collection/i18n/global.i18n.json +172 -162
- package/dist/collection/utils/common/input/input.js +3 -0
- package/dist/collection/utils/common/input/input.js.map +1 -1
- package/dist/collection/utils/common/input-caption/input-caption.js +5 -3
- package/dist/collection/utils/common/input-caption/input-caption.js.map +1 -1
- package/dist/collection/utils/common/language-types.js +1 -1
- package/dist/collection/utils/common/language-types.js.map +1 -1
- package/dist/collection/utils/helper/utils-types.js +2 -0
- package/dist/collection/utils/helper/utils-types.js.map +1 -0
- package/dist/collection/utils/helper/utils.js +26 -0
- package/dist/collection/utils/helper/utils.js.map +1 -1
- package/dist/components/error-message.js +1 -324
- package/dist/components/error-message.js.map +1 -1
- package/dist/components/event-handler.js +330 -0
- package/dist/components/event-handler.js.map +1 -0
- package/dist/components/global.i18n.js +184 -173
- package/dist/components/global.i18n.js.map +1 -1
- package/dist/components/input.js +3 -0
- package/dist/components/input.js.map +1 -1
- package/dist/components/ontario-card.js +118 -66
- package/dist/components/ontario-card.js.map +1 -1
- package/dist/components/ontario-checkboxes.js +2 -1
- package/dist/components/ontario-checkboxes.js.map +1 -1
- package/dist/components/ontario-date-input.js +2 -1
- package/dist/components/ontario-date-input.js.map +1 -1
- package/dist/components/ontario-dropdown-list.js +2 -1
- package/dist/components/ontario-dropdown-list.js.map +1 -1
- package/dist/components/ontario-header.js +13 -7
- package/dist/components/ontario-header.js.map +1 -1
- package/dist/components/ontario-icon-search2.js +6 -0
- package/dist/components/ontario-icon-search2.js.map +1 -0
- package/dist/components/ontario-input.js +2 -1
- package/dist/components/ontario-input.js.map +1 -1
- package/dist/components/ontario-language-toggle2.js +180 -37
- package/dist/components/ontario-language-toggle2.js.map +1 -1
- package/dist/components/ontario-radio-buttons.js +2 -1
- package/dist/components/ontario-radio-buttons.js.map +1 -1
- package/dist/components/ontario-search-box.d.ts +11 -0
- package/dist/components/ontario-search-box.js +269 -0
- package/dist/components/ontario-search-box.js.map +1 -0
- package/dist/components/ontario-step-indicator.js +5 -5
- package/dist/components/ontario-table.js +5 -5
- package/dist/components/ontario-textarea.js +5 -4
- package/dist/components/ontario-textarea.js.map +1 -1
- package/dist/components/utils.js +28 -0
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/index-603026f7.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{ontario-accordion_43.entry.js → ontario-accordion_44.entry.js} +738 -296
- package/dist/esm/ontario-accordion_44.entry.js.map +1 -0
- package/dist/esm/ontario-design-system-components.js +1 -1
- package/dist/ontario-design-system-components/i18n/global.i18n.json +172 -162
- package/dist/ontario-design-system-components/ontario-design-system-components.esm.js +1 -1
- package/dist/ontario-design-system-components/ontario-design-system-components.esm.js.map +1 -1
- package/dist/ontario-design-system-components/{p-cff41424.entry.js → p-9c3a1be9.entry.js} +2204 -1918
- package/dist/ontario-design-system-components/p-9c3a1be9.entry.js.map +1 -0
- package/dist/types/components/ontario-card/ontario-card-types.d.ts +4 -4
- package/dist/types/components/ontario-card/ontario-card.d.ts +40 -29
- package/dist/types/components/ontario-header/ontario-header.d.ts +13 -2
- package/dist/types/components/ontario-language-toggle/ontario-language-toggle.d.ts +75 -8
- package/dist/types/components/ontario-search-box/ontario-search-box.d.ts +180 -0
- package/dist/types/components.d.ts +211 -22
- package/dist/types/utils/common/input/input.d.ts +2 -1
- package/dist/types/utils/common/input-caption/input-caption.d.ts +7 -1
- package/dist/types/utils/common/language-types.d.ts +2 -1
- package/dist/types/utils/helper/utils-types.d.ts +2 -0
- package/dist/types/utils/helper/utils.d.ts +21 -0
- package/package.json +3 -3
- package/src/components/ontario-card/ontario-card-types.tsx +33 -4
- package/src/components/ontario-card/ontario-card.scss +59 -38
- package/src/components/ontario-card/ontario-card.tsx +98 -70
- package/src/components/ontario-card/readme.md +57 -27
- package/src/components/ontario-card/test/__snapshots__/ontario-cards.spec.tsx.snap +66 -0
- package/src/components/ontario-card/test/ontario-cards.spec.tsx +27 -13
- package/src/components/ontario-card-collection/readme.md +13 -13
- package/src/components/ontario-checkbox/ontario-checkboxes.scss +0 -1
- package/src/components/ontario-header/ontario-header.tsx +13 -4
- package/src/components/ontario-header/service-ontario-header.scss +0 -4
- package/src/components/ontario-header/test/ontario-header.spec.tsx +3 -3
- package/src/components/ontario-hint-text/readme.md +2 -0
- package/src/components/ontario-language-toggle/ontario-language-toggle.tsx +192 -45
- package/src/components/ontario-language-toggle/readme.md +10 -10
- package/src/components/ontario-language-toggle/test/__snapshots__/ontario-language-toggle.spec.tsx.snap +1 -1
- package/src/components/ontario-language-toggle/test/ontario-language-toggle.spec.tsx +17 -3
- package/src/components/ontario-radio-buttons/ontario-radio-buttons.scss +0 -1
- package/src/components/ontario-search-box/assets/ontario-icon-close.svg +1 -0
- package/src/components/ontario-search-box/assets/ontario-logo--mobile.svg +6 -0
- package/src/components/ontario-search-box/ontario-search-box.scss +141 -0
- package/src/components/ontario-search-box/ontario-search-box.tsx +341 -0
- package/src/components/ontario-search-box/readme.md +132 -0
- package/src/components/ontario-search-box/test/__snapshots__/ontario-search-box.spec.tsx.snap +35 -0
- package/src/components/ontario-search-box/test/ontario-search-box.e2e.ts +21 -0
- package/src/components/ontario-search-box/test/ontario-search-box.spec.tsx +22 -0
- package/src/components.d.ts +211 -22
- package/src/french.html +37 -0
- package/src/index.html +292 -38
- package/src/translations/global.i18n.json +172 -162
- package/src/utils/common/input/input.tsx +4 -1
- package/src/utils/common/input-caption/input-caption.tsx +9 -3
- package/src/utils/common/language-types.ts +2 -1
- package/src/utils/helper/utils-types.ts +2 -0
- package/src/utils/helper/utils.ts +30 -0
- package/www/build/ontario-design-system-components.esm.js +1 -1
- package/www/build/ontario-design-system-components.esm.js.map +1 -1
- package/www/build/{p-b61db0f6.js → p-84035ac3.js} +1 -1
- package/www/build/{p-cff41424.entry.js → p-9c3a1be9.entry.js} +2204 -1918
- package/www/build/p-9c3a1be9.entry.js.map +1 -0
- package/www/french.html +37 -0
- package/www/i18n/global.i18n.json +172 -162
- package/www/index.html +266 -38
- package/dist/cjs/ontario-accordion_43.cjs.entry.js.map +0 -1
- package/dist/esm/ontario-accordion_43.entry.js.map +0 -1
- package/dist/ontario-design-system-components/p-cff41424.entry.js.map +0 -1
- package/www/build/p-cff41424.entry.js.map +0 -1
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
import { BadgeColour } from './components/ontario-badge/ontario-badge.types';
|
|
17
17
|
import { ButtonType, HtmlType } from './components/ontario-button/ontario-button.types';
|
|
18
18
|
import {
|
|
19
|
-
|
|
20
|
-
HeaderType,
|
|
19
|
+
HeaderColour,
|
|
21
20
|
HorizontalImagePositionType,
|
|
22
21
|
HorizontalImageSizeType,
|
|
22
|
+
Layout,
|
|
23
23
|
} from './components/ontario-card/ontario-card-types';
|
|
24
24
|
import { CardsPerRow } from './components/ontario-card-collection/ontario-collection-card-types';
|
|
25
25
|
import { Caption } from './utils/common/input-caption/caption.interface';
|
|
@@ -68,10 +68,10 @@ export {
|
|
|
68
68
|
export { BadgeColour } from './components/ontario-badge/ontario-badge.types';
|
|
69
69
|
export { ButtonType, HtmlType } from './components/ontario-button/ontario-button.types';
|
|
70
70
|
export {
|
|
71
|
-
|
|
72
|
-
HeaderType,
|
|
71
|
+
HeaderColour,
|
|
73
72
|
HorizontalImagePositionType,
|
|
74
73
|
HorizontalImageSizeType,
|
|
74
|
+
Layout,
|
|
75
75
|
} from './components/ontario-card/ontario-card-types';
|
|
76
76
|
export { CardsPerRow } from './components/ontario-card-collection/ontario-collection-card-types';
|
|
77
77
|
export { Caption } from './utils/common/input-caption/caption.interface';
|
|
@@ -248,18 +248,14 @@ export namespace Components {
|
|
|
248
248
|
* Action link for when the card is clicked. This is optional.
|
|
249
249
|
*/
|
|
250
250
|
cardLink?: string;
|
|
251
|
-
/**
|
|
252
|
-
* The type of card to render. If no type is passed, it will default to 'basic'.
|
|
253
|
-
*/
|
|
254
|
-
cardType: CardType;
|
|
255
251
|
/**
|
|
256
252
|
* Text to be displayed within the card description container. This is optional.
|
|
257
253
|
*/
|
|
258
254
|
description?: string;
|
|
259
255
|
/**
|
|
260
|
-
*
|
|
256
|
+
* Set the card's header colour. This is optional.
|
|
261
257
|
*/
|
|
262
|
-
|
|
258
|
+
headerColour?: HeaderColour;
|
|
263
259
|
/**
|
|
264
260
|
* The position of the image when the card-type is set to 'horizontal'. This prop is only necessry when the card-type is set to 'horizontal'.
|
|
265
261
|
* @example <ontario-card card-type="horizontal" label="Card Title 1" image="https://picsum.photos/200/300" horizontal-image-position-type="left" horizontal-image-size-type="one-fourth" description="Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum" > </ontario-card>
|
|
@@ -279,6 +275,10 @@ export namespace Components {
|
|
|
279
275
|
* @example <ontario-card header-type="dark" card-type="horizontal" label="Card Title 1" description="Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum" >
|
|
280
276
|
*/
|
|
281
277
|
label: string;
|
|
278
|
+
/**
|
|
279
|
+
* The layout oritnetation of the card. If no type is passed, it will default to 'vertical'.
|
|
280
|
+
*/
|
|
281
|
+
layout?: Layout;
|
|
282
282
|
}
|
|
283
283
|
interface OntarioCardCollection {
|
|
284
284
|
/**
|
|
@@ -1725,7 +1725,10 @@ export namespace Components {
|
|
|
1725
1725
|
* A custom function to pass to the language toggle button. This is optional.
|
|
1726
1726
|
*/
|
|
1727
1727
|
customLanguageToggle?: (event: globalThis.Event) => void;
|
|
1728
|
-
|
|
1728
|
+
/**
|
|
1729
|
+
* The language of the component. In most cases, the language toggle should be the source of truth for determining the site language. Only pass a language value here if necessary.
|
|
1730
|
+
*/
|
|
1731
|
+
language?: Language;
|
|
1729
1732
|
/**
|
|
1730
1733
|
* The size of the language toggle button. If no prop is passed, it will be set to the `default` size.
|
|
1731
1734
|
*/
|
|
@@ -1823,6 +1826,54 @@ export namespace Components {
|
|
|
1823
1826
|
*/
|
|
1824
1827
|
required?: boolean;
|
|
1825
1828
|
}
|
|
1829
|
+
interface OntarioSearchBox {
|
|
1830
|
+
/**
|
|
1831
|
+
* The text to display as the input label
|
|
1832
|
+
* @example <ontario-search-box caption='{ "captionText": "Search directory", "captionType": "default" }' required = "true" > </ontario-search-box>
|
|
1833
|
+
*/
|
|
1834
|
+
caption: Caption | string;
|
|
1835
|
+
/**
|
|
1836
|
+
* Used to add a custom function to the input onBlur event.
|
|
1837
|
+
*/
|
|
1838
|
+
customOnBlur?: (event: globalThis.Event) => void;
|
|
1839
|
+
/**
|
|
1840
|
+
* Used to add a custom function to the input onChange event.
|
|
1841
|
+
*/
|
|
1842
|
+
customOnChange?: (event: globalThis.Event) => void;
|
|
1843
|
+
/**
|
|
1844
|
+
* Used to add a custom function to the input onFocus event.
|
|
1845
|
+
*/
|
|
1846
|
+
customOnFocus?: (event: globalThis.Event) => void;
|
|
1847
|
+
/**
|
|
1848
|
+
* Used to add a custom function to the input onInput event.
|
|
1849
|
+
*/
|
|
1850
|
+
customOnInput?: (event: globalThis.Event) => void;
|
|
1851
|
+
/**
|
|
1852
|
+
* The unique identifier of the search-box component. This is optional - if no ID is passed, one will be generated.
|
|
1853
|
+
*/
|
|
1854
|
+
elementId?: string;
|
|
1855
|
+
/**
|
|
1856
|
+
* Used to include the ontario-hint-text component for the search-box. This is optional.
|
|
1857
|
+
*/
|
|
1858
|
+
hintText?: string | Hint;
|
|
1859
|
+
/**
|
|
1860
|
+
* The language of the component. This is used for translations. If none is passed, it will default to English.
|
|
1861
|
+
*/
|
|
1862
|
+
language?: Language;
|
|
1863
|
+
/**
|
|
1864
|
+
* This Function to perform a search operation. This function will be called when the search submit button is triggered. The value argument is used for as search term to use for the search operation. This parameter is optional. The performSearch prop can be set dynamically using JavaScript, allowing you to define custom search functionality when the search form is submitted.
|
|
1865
|
+
* @example <ontario-search-box id="ontario-search-box" caption='Search directory' ></ontario-search-box> <script> window.addEventListener('load', () => { const searchBox = document.getElementById('ontario-search-box'); searchBox.performSearch = async (value) => { console.log('Performing search with value:', value); }; }); </script>
|
|
1866
|
+
*/
|
|
1867
|
+
performSearch?: (value?: string) => Promise<void>;
|
|
1868
|
+
/**
|
|
1869
|
+
* This is used to determine whether the dropdown list is required or not. This prop gets passed to the InputCaption utility to display either an optional or required flag in the label. If no prop is set, it will default to false (optional).
|
|
1870
|
+
*/
|
|
1871
|
+
required?: boolean;
|
|
1872
|
+
/**
|
|
1873
|
+
* The value of the search term. This is optional.
|
|
1874
|
+
*/
|
|
1875
|
+
value?: string;
|
|
1876
|
+
}
|
|
1826
1877
|
interface OntarioStepIndicator {
|
|
1827
1878
|
/**
|
|
1828
1879
|
* URL for the back element to set a path for where the link will lead. If a URL is passed in, the back element will display as an anchor tag. The back element will require either the backButtonURL prop or the customOnClick prop to be passed in order for the back element to display.
|
|
@@ -1966,6 +2017,10 @@ export interface OntarioRadioButtonsCustomEvent<T> extends CustomEvent<T> {
|
|
|
1966
2017
|
detail: T;
|
|
1967
2018
|
target: HTMLOntarioRadioButtonsElement;
|
|
1968
2019
|
}
|
|
2020
|
+
export interface OntarioSearchBoxCustomEvent<T> extends CustomEvent<T> {
|
|
2021
|
+
detail: T;
|
|
2022
|
+
target: HTMLOntarioSearchBoxElement;
|
|
2023
|
+
}
|
|
1969
2024
|
export interface OntarioTextareaCustomEvent<T> extends CustomEvent<T> {
|
|
1970
2025
|
detail: T;
|
|
1971
2026
|
target: HTMLOntarioTextareaElement;
|
|
@@ -2893,7 +2948,7 @@ declare global {
|
|
|
2893
2948
|
new (): HTMLOntarioInputElement;
|
|
2894
2949
|
};
|
|
2895
2950
|
interface HTMLOntarioLanguageToggleElementEventMap {
|
|
2896
|
-
setAppLanguage:
|
|
2951
|
+
setAppLanguage: Language;
|
|
2897
2952
|
headerLanguageToggled: HeaderLanguageToggleEventDetails;
|
|
2898
2953
|
}
|
|
2899
2954
|
interface HTMLOntarioLanguageToggleElement extends Components.OntarioLanguageToggle, HTMLStencilElement {
|
|
@@ -3016,6 +3071,65 @@ declare global {
|
|
|
3016
3071
|
prototype: HTMLOntarioRadioButtonsElement;
|
|
3017
3072
|
new (): HTMLOntarioRadioButtonsElement;
|
|
3018
3073
|
};
|
|
3074
|
+
interface HTMLOntarioSearchBoxElementEventMap {
|
|
3075
|
+
searchOnSubmit: string;
|
|
3076
|
+
inputOnInput: InputInputEvent;
|
|
3077
|
+
inputOnChange: InputInteractionEvent;
|
|
3078
|
+
inputOnBlur: InputFocusBlurEvent;
|
|
3079
|
+
inputOnFocus: InputFocusBlurEvent;
|
|
3080
|
+
}
|
|
3081
|
+
interface HTMLOntarioSearchBoxElement extends Components.OntarioSearchBox, HTMLStencilElement {
|
|
3082
|
+
addEventListener<K extends keyof HTMLOntarioSearchBoxElementEventMap>(
|
|
3083
|
+
type: K,
|
|
3084
|
+
listener: (
|
|
3085
|
+
this: HTMLOntarioSearchBoxElement,
|
|
3086
|
+
ev: OntarioSearchBoxCustomEvent<HTMLOntarioSearchBoxElementEventMap[K]>,
|
|
3087
|
+
) => any,
|
|
3088
|
+
options?: boolean | AddEventListenerOptions,
|
|
3089
|
+
): void;
|
|
3090
|
+
addEventListener<K extends keyof DocumentEventMap>(
|
|
3091
|
+
type: K,
|
|
3092
|
+
listener: (this: Document, ev: DocumentEventMap[K]) => any,
|
|
3093
|
+
options?: boolean | AddEventListenerOptions,
|
|
3094
|
+
): void;
|
|
3095
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
3096
|
+
type: K,
|
|
3097
|
+
listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any,
|
|
3098
|
+
options?: boolean | AddEventListenerOptions,
|
|
3099
|
+
): void;
|
|
3100
|
+
addEventListener(
|
|
3101
|
+
type: string,
|
|
3102
|
+
listener: EventListenerOrEventListenerObject,
|
|
3103
|
+
options?: boolean | AddEventListenerOptions,
|
|
3104
|
+
): void;
|
|
3105
|
+
removeEventListener<K extends keyof HTMLOntarioSearchBoxElementEventMap>(
|
|
3106
|
+
type: K,
|
|
3107
|
+
listener: (
|
|
3108
|
+
this: HTMLOntarioSearchBoxElement,
|
|
3109
|
+
ev: OntarioSearchBoxCustomEvent<HTMLOntarioSearchBoxElementEventMap[K]>,
|
|
3110
|
+
) => any,
|
|
3111
|
+
options?: boolean | EventListenerOptions,
|
|
3112
|
+
): void;
|
|
3113
|
+
removeEventListener<K extends keyof DocumentEventMap>(
|
|
3114
|
+
type: K,
|
|
3115
|
+
listener: (this: Document, ev: DocumentEventMap[K]) => any,
|
|
3116
|
+
options?: boolean | EventListenerOptions,
|
|
3117
|
+
): void;
|
|
3118
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(
|
|
3119
|
+
type: K,
|
|
3120
|
+
listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any,
|
|
3121
|
+
options?: boolean | EventListenerOptions,
|
|
3122
|
+
): void;
|
|
3123
|
+
removeEventListener(
|
|
3124
|
+
type: string,
|
|
3125
|
+
listener: EventListenerOrEventListenerObject,
|
|
3126
|
+
options?: boolean | EventListenerOptions,
|
|
3127
|
+
): void;
|
|
3128
|
+
}
|
|
3129
|
+
var HTMLOntarioSearchBoxElement: {
|
|
3130
|
+
prototype: HTMLOntarioSearchBoxElement;
|
|
3131
|
+
new (): HTMLOntarioSearchBoxElement;
|
|
3132
|
+
};
|
|
3019
3133
|
interface HTMLOntarioStepIndicatorElement extends Components.OntarioStepIndicator, HTMLStencilElement {}
|
|
3020
3134
|
var HTMLOntarioStepIndicatorElement: {
|
|
3021
3135
|
prototype: HTMLOntarioStepIndicatorElement;
|
|
@@ -3221,6 +3335,7 @@ declare global {
|
|
|
3221
3335
|
'ontario-loading-indicator': HTMLOntarioLoadingIndicatorElement;
|
|
3222
3336
|
'ontario-page-alert': HTMLOntarioPageAlertElement;
|
|
3223
3337
|
'ontario-radio-buttons': HTMLOntarioRadioButtonsElement;
|
|
3338
|
+
'ontario-search-box': HTMLOntarioSearchBoxElement;
|
|
3224
3339
|
'ontario-step-indicator': HTMLOntarioStepIndicatorElement;
|
|
3225
3340
|
'ontario-table': HTMLOntarioTableElement;
|
|
3226
3341
|
'ontario-textarea': HTMLOntarioTextareaElement;
|
|
@@ -3365,18 +3480,14 @@ declare namespace LocalJSX {
|
|
|
3365
3480
|
* Action link for when the card is clicked. This is optional.
|
|
3366
3481
|
*/
|
|
3367
3482
|
cardLink?: string;
|
|
3368
|
-
/**
|
|
3369
|
-
* The type of card to render. If no type is passed, it will default to 'basic'.
|
|
3370
|
-
*/
|
|
3371
|
-
cardType?: CardType;
|
|
3372
3483
|
/**
|
|
3373
3484
|
* Text to be displayed within the card description container. This is optional.
|
|
3374
3485
|
*/
|
|
3375
3486
|
description?: string;
|
|
3376
3487
|
/**
|
|
3377
|
-
*
|
|
3488
|
+
* Set the card's header colour. This is optional.
|
|
3378
3489
|
*/
|
|
3379
|
-
|
|
3490
|
+
headerColour?: HeaderColour;
|
|
3380
3491
|
/**
|
|
3381
3492
|
* The position of the image when the card-type is set to 'horizontal'. This prop is only necessry when the card-type is set to 'horizontal'.
|
|
3382
3493
|
* @example <ontario-card card-type="horizontal" label="Card Title 1" image="https://picsum.photos/200/300" horizontal-image-position-type="left" horizontal-image-size-type="one-fourth" description="Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum" > </ontario-card>
|
|
@@ -3396,6 +3507,10 @@ declare namespace LocalJSX {
|
|
|
3396
3507
|
* @example <ontario-card header-type="dark" card-type="horizontal" label="Card Title 1" description="Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum" >
|
|
3397
3508
|
*/
|
|
3398
3509
|
label?: string;
|
|
3510
|
+
/**
|
|
3511
|
+
* The layout oritnetation of the card. If no type is passed, it will default to 'vertical'.
|
|
3512
|
+
*/
|
|
3513
|
+
layout?: Layout;
|
|
3399
3514
|
}
|
|
3400
3515
|
interface OntarioCardCollection {
|
|
3401
3516
|
/**
|
|
@@ -4923,15 +5038,18 @@ declare namespace LocalJSX {
|
|
|
4923
5038
|
* A custom function to pass to the language toggle button. This is optional.
|
|
4924
5039
|
*/
|
|
4925
5040
|
customLanguageToggle?: (event: globalThis.Event) => void;
|
|
4926
|
-
language?: Language | string;
|
|
4927
5041
|
/**
|
|
4928
|
-
*
|
|
5042
|
+
* The language of the component. In most cases, the language toggle should be the source of truth for determining the site language. Only pass a language value here if necessary.
|
|
5043
|
+
*/
|
|
5044
|
+
language?: Language;
|
|
5045
|
+
/**
|
|
5046
|
+
* Event that fires when the language toggle is pressed/clicked. The event contains the oldLanguage along with the newLanguage.
|
|
4929
5047
|
*/
|
|
4930
5048
|
onHeaderLanguageToggled?: (event: OntarioLanguageToggleCustomEvent<HeaderLanguageToggleEventDetails>) => void;
|
|
4931
5049
|
/**
|
|
4932
|
-
*
|
|
5050
|
+
* Event that fires during the setAppLanguageHandler() method. The event contains the current language (after language logic has already occurred).
|
|
4933
5051
|
*/
|
|
4934
|
-
onSetAppLanguage?: (event: OntarioLanguageToggleCustomEvent<
|
|
5052
|
+
onSetAppLanguage?: (event: OntarioLanguageToggleCustomEvent<Language>) => void;
|
|
4935
5053
|
/**
|
|
4936
5054
|
* The size of the language toggle button. If no prop is passed, it will be set to the `default` size.
|
|
4937
5055
|
*/
|
|
@@ -5045,6 +5163,75 @@ declare namespace LocalJSX {
|
|
|
5045
5163
|
*/
|
|
5046
5164
|
required?: boolean;
|
|
5047
5165
|
}
|
|
5166
|
+
interface OntarioSearchBox {
|
|
5167
|
+
/**
|
|
5168
|
+
* The text to display as the input label
|
|
5169
|
+
* @example <ontario-search-box caption='{ "captionText": "Search directory", "captionType": "default" }' required = "true" > </ontario-search-box>
|
|
5170
|
+
*/
|
|
5171
|
+
caption?: Caption | string;
|
|
5172
|
+
/**
|
|
5173
|
+
* Used to add a custom function to the input onBlur event.
|
|
5174
|
+
*/
|
|
5175
|
+
customOnBlur?: (event: globalThis.Event) => void;
|
|
5176
|
+
/**
|
|
5177
|
+
* Used to add a custom function to the input onChange event.
|
|
5178
|
+
*/
|
|
5179
|
+
customOnChange?: (event: globalThis.Event) => void;
|
|
5180
|
+
/**
|
|
5181
|
+
* Used to add a custom function to the input onFocus event.
|
|
5182
|
+
*/
|
|
5183
|
+
customOnFocus?: (event: globalThis.Event) => void;
|
|
5184
|
+
/**
|
|
5185
|
+
* Used to add a custom function to the input onInput event.
|
|
5186
|
+
*/
|
|
5187
|
+
customOnInput?: (event: globalThis.Event) => void;
|
|
5188
|
+
/**
|
|
5189
|
+
* The unique identifier of the search-box component. This is optional - if no ID is passed, one will be generated.
|
|
5190
|
+
*/
|
|
5191
|
+
elementId?: string;
|
|
5192
|
+
/**
|
|
5193
|
+
* Used to include the ontario-hint-text component for the search-box. This is optional.
|
|
5194
|
+
*/
|
|
5195
|
+
hintText?: string | Hint;
|
|
5196
|
+
/**
|
|
5197
|
+
* The language of the component. This is used for translations. If none is passed, it will default to English.
|
|
5198
|
+
*/
|
|
5199
|
+
language?: Language;
|
|
5200
|
+
/**
|
|
5201
|
+
* Emitted when a keyboard input event occurs when an input has lost focus.
|
|
5202
|
+
*/
|
|
5203
|
+
onInputOnBlur?: (event: OntarioSearchBoxCustomEvent<InputFocusBlurEvent>) => void;
|
|
5204
|
+
/**
|
|
5205
|
+
* Emitted when a keyboard input or mouse event occurs when an input has been changed.
|
|
5206
|
+
*/
|
|
5207
|
+
onInputOnChange?: (event: OntarioSearchBoxCustomEvent<InputInteractionEvent>) => void;
|
|
5208
|
+
/**
|
|
5209
|
+
* Emitted when a keyboard input event occurs when an input has gained focus.
|
|
5210
|
+
*/
|
|
5211
|
+
onInputOnFocus?: (event: OntarioSearchBoxCustomEvent<InputFocusBlurEvent>) => void;
|
|
5212
|
+
/**
|
|
5213
|
+
* Emitted when a input occurs when an input has been changed.
|
|
5214
|
+
*/
|
|
5215
|
+
onInputOnInput?: (event: OntarioSearchBoxCustomEvent<InputInputEvent>) => void;
|
|
5216
|
+
/**
|
|
5217
|
+
* Emitted when the search is submitted. Below is an example on how to hook into the event to get the event details.
|
|
5218
|
+
* @example <script> document.getElementById('ontario-search-box').addEventListener('searchOnSubmit', (event) => { const searchValue = event.detail; console.log('Search submitted with value:', searchValue); }; </script>
|
|
5219
|
+
*/
|
|
5220
|
+
onSearchOnSubmit?: (event: OntarioSearchBoxCustomEvent<string>) => void;
|
|
5221
|
+
/**
|
|
5222
|
+
* This Function to perform a search operation. This function will be called when the search submit button is triggered. The value argument is used for as search term to use for the search operation. This parameter is optional. The performSearch prop can be set dynamically using JavaScript, allowing you to define custom search functionality when the search form is submitted.
|
|
5223
|
+
* @example <ontario-search-box id="ontario-search-box" caption='Search directory' ></ontario-search-box> <script> window.addEventListener('load', () => { const searchBox = document.getElementById('ontario-search-box'); searchBox.performSearch = async (value) => { console.log('Performing search with value:', value); }; }); </script>
|
|
5224
|
+
*/
|
|
5225
|
+
performSearch?: (value?: string) => Promise<void>;
|
|
5226
|
+
/**
|
|
5227
|
+
* This is used to determine whether the dropdown list is required or not. This prop gets passed to the InputCaption utility to display either an optional or required flag in the label. If no prop is set, it will default to false (optional).
|
|
5228
|
+
*/
|
|
5229
|
+
required?: boolean;
|
|
5230
|
+
/**
|
|
5231
|
+
* The value of the search term. This is optional.
|
|
5232
|
+
*/
|
|
5233
|
+
value?: string;
|
|
5234
|
+
}
|
|
5048
5235
|
interface OntarioStepIndicator {
|
|
5049
5236
|
/**
|
|
5050
5237
|
* URL for the back element to set a path for where the link will lead. If a URL is passed in, the back element will display as an anchor tag. The back element will require either the backButtonURL prop or the customOnClick prop to be passed in order for the back element to display.
|
|
@@ -5315,6 +5502,7 @@ declare namespace LocalJSX {
|
|
|
5315
5502
|
'ontario-loading-indicator': OntarioLoadingIndicator;
|
|
5316
5503
|
'ontario-page-alert': OntarioPageAlert;
|
|
5317
5504
|
'ontario-radio-buttons': OntarioRadioButtons;
|
|
5505
|
+
'ontario-search-box': OntarioSearchBox;
|
|
5318
5506
|
'ontario-step-indicator': OntarioStepIndicator;
|
|
5319
5507
|
'ontario-table': OntarioTable;
|
|
5320
5508
|
'ontario-textarea': OntarioTextarea;
|
|
@@ -5519,6 +5707,7 @@ declare module '@stencil/core' {
|
|
|
5519
5707
|
JSXBase.HTMLAttributes<HTMLOntarioLoadingIndicatorElement>;
|
|
5520
5708
|
'ontario-page-alert': LocalJSX.OntarioPageAlert & JSXBase.HTMLAttributes<HTMLOntarioPageAlertElement>;
|
|
5521
5709
|
'ontario-radio-buttons': LocalJSX.OntarioRadioButtons & JSXBase.HTMLAttributes<HTMLOntarioRadioButtonsElement>;
|
|
5710
|
+
'ontario-search-box': LocalJSX.OntarioSearchBox & JSXBase.HTMLAttributes<HTMLOntarioSearchBoxElement>;
|
|
5522
5711
|
'ontario-step-indicator': LocalJSX.OntarioStepIndicator & JSXBase.HTMLAttributes<HTMLOntarioStepIndicatorElement>;
|
|
5523
5712
|
'ontario-table': LocalJSX.OntarioTable & JSXBase.HTMLAttributes<HTMLOntarioTableElement>;
|
|
5524
5713
|
'ontario-textarea': LocalJSX.OntarioTextarea & JSXBase.HTMLAttributes<HTMLOntarioTextareaElement>;
|
|
@@ -17,6 +17,7 @@ export type InputProps = {
|
|
|
17
17
|
onChange?: ((event: Event) => void) | undefined;
|
|
18
18
|
onBlur?: ((event: Event) => void) | undefined;
|
|
19
19
|
onFocus?: ((event: Event) => void) | undefined;
|
|
20
|
-
|
|
20
|
+
onClick?: ((event: Event) => void) | undefined;
|
|
21
|
+
ref?: (el: HTMLInputElement) => HTMLElement;
|
|
21
22
|
};
|
|
22
23
|
export declare const Input: FunctionalComponent<InputProps>;
|
|
@@ -40,9 +40,15 @@ export declare class InputCaption implements CaptionInfo {
|
|
|
40
40
|
/**
|
|
41
41
|
* Return the `<label>` element for text inputs
|
|
42
42
|
* @param captionFor Set the `htmlFor` attribute
|
|
43
|
+
* @param hasHintExpander Indicate whether the component the label is for has a hint expander or not
|
|
44
|
+
* @param disableRequiredFlag Disable the required/optional label text _(only use in highly special cases)_
|
|
43
45
|
* @returns element containing the caption for the input
|
|
44
46
|
*/
|
|
45
|
-
getCaption: (
|
|
47
|
+
getCaption: (
|
|
48
|
+
captionFor?: string | undefined,
|
|
49
|
+
hasHintExpander?: boolean,
|
|
50
|
+
disableRequiredFlag?: boolean,
|
|
51
|
+
) => HTMLElement;
|
|
46
52
|
getHintExpanderAccessibilityText(captionText: string, hasHintExpanderOnOption?: boolean): HTMLElement;
|
|
47
53
|
/**
|
|
48
54
|
* Determines which flag text to use between `required` and `optional`
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const supportedLanguages: readonly ['en', 'fr'];
|
|
2
|
+
export type Language = (typeof supportedLanguages)[number];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Conjunction } from './utils-types';
|
|
1
2
|
export declare function format(first: string | undefined, middle: string | undefined, last: string | undefined): string;
|
|
2
3
|
export declare function hasMultipleTrueValues<T>(arr: T[], key: keyof T): boolean;
|
|
3
4
|
export declare function extractValuesByKey<T>(objects: T[], key: keyof T): Array<T[keyof T]>;
|
|
@@ -20,3 +21,23 @@ export declare function isEmpty(str: string | undefined | null): boolean;
|
|
|
20
21
|
* @returns {string[]}
|
|
21
22
|
*/
|
|
22
23
|
export declare function retrieveEnumKeys(enumObject: object): string[];
|
|
24
|
+
/**
|
|
25
|
+
* Prints an array as a comma delimited list, with the last element being preceded by a conjunction.
|
|
26
|
+
* As per ontario.ca content guidelines, there is no Oxford comma.
|
|
27
|
+
*
|
|
28
|
+
* @param {Array<any>} arr - The array that you wish to print.
|
|
29
|
+
* @param {Conjunction} conjunctionType - Whether you want the sentence to end with 'and value.' or 'or value.'
|
|
30
|
+
*
|
|
31
|
+
* @returns {string}
|
|
32
|
+
*/
|
|
33
|
+
export declare function printArray(arr: Array<any>, conjunctionType?: Conjunction): string;
|
|
34
|
+
/**
|
|
35
|
+
* Grabs the HTML element of the page.
|
|
36
|
+
*
|
|
37
|
+
* More targetted than document.documentElement as the documentElement could
|
|
38
|
+
* in theory be any element that is the top level. e.g. <div> if the page is not
|
|
39
|
+
* set up to be semantically correct.
|
|
40
|
+
*
|
|
41
|
+
* @returns {HTMLElement}
|
|
42
|
+
*/
|
|
43
|
+
export declare function getRootHTMLElement(): HTMLElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ongov/ontario-design-system-component-library",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-alpha.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Ontario Design System Component Library",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"test:unit": "stencil test --spec"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@ongov/ontario-design-system-global-styles": "4.3.
|
|
43
|
+
"@ongov/ontario-design-system-global-styles": "4.3.1-alpha.1",
|
|
44
44
|
"@stencil/core": "^4.12.2",
|
|
45
45
|
"dotenv": "^16.3.1"
|
|
46
46
|
},
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"collection:main": "dist/collection/index.js",
|
|
103
103
|
"es2015": "dist/esm/index.mjs",
|
|
104
104
|
"es2017": "dist/esm/index.mjs",
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "2941db5cb66d3a161e359f36543b489922853b02"
|
|
106
106
|
}
|
|
@@ -1,9 +1,38 @@
|
|
|
1
|
-
export const
|
|
2
|
-
export const HeaderTypes = ['default', 'light', 'dark'] as const;
|
|
1
|
+
export const Layouts = ['vertical', 'horizontal'] as const;
|
|
3
2
|
export const HorizontalImagePositionTypes = ['left', 'right'] as const;
|
|
4
3
|
export const HorizontalImageSizeTypes = ['one-fourth', 'one-third'] as const;
|
|
5
4
|
|
|
6
|
-
export type
|
|
7
|
-
export type HeaderType = (typeof HeaderTypes)[number];
|
|
5
|
+
export type Layout = (typeof Layouts)[number];
|
|
8
6
|
export type HorizontalImagePositionType = (typeof HorizontalImagePositionTypes)[number];
|
|
9
7
|
export type HorizontalImageSizeType = (typeof HorizontalImageSizeTypes)[number];
|
|
8
|
+
|
|
9
|
+
export const HeaderColours = [
|
|
10
|
+
'dark-accent',
|
|
11
|
+
'light-accent',
|
|
12
|
+
'light-gold',
|
|
13
|
+
'light-yellow',
|
|
14
|
+
'light-taupe',
|
|
15
|
+
'light-green',
|
|
16
|
+
'light-lime',
|
|
17
|
+
'light-teal',
|
|
18
|
+
'light-sky',
|
|
19
|
+
'light-blue',
|
|
20
|
+
'light-purple',
|
|
21
|
+
'light-orange',
|
|
22
|
+
'light-red',
|
|
23
|
+
'light-magenta',
|
|
24
|
+
'gold',
|
|
25
|
+
'yellow',
|
|
26
|
+
'taupe',
|
|
27
|
+
'green',
|
|
28
|
+
'lime',
|
|
29
|
+
'teal',
|
|
30
|
+
'sky',
|
|
31
|
+
'blue',
|
|
32
|
+
'purple',
|
|
33
|
+
'orange',
|
|
34
|
+
'red',
|
|
35
|
+
'magenta',
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
export type HeaderColour = (typeof HeaderColours)[number];
|
|
@@ -15,7 +15,7 @@
|
|
|
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
|
-
/*
|
|
18
|
+
/*
|
|
19
19
|
* Required for cards to stay the same height regardless of content size.
|
|
20
20
|
* Without subtracting the margin-bottom amount the cards will be too large.
|
|
21
21
|
*/
|
|
@@ -47,6 +47,13 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
.ontario-card--image-true {
|
|
51
|
+
margin-top: spacing.$spacing-2 * -1;
|
|
52
|
+
@at-root .ontario-card__card-type--horizontal & {
|
|
53
|
+
margin-top: spacing.$spacing-0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
50
57
|
.ontario-card__card-type--horizontal {
|
|
51
58
|
display: flex;
|
|
52
59
|
|
|
@@ -60,6 +67,10 @@
|
|
|
60
67
|
position: relative;
|
|
61
68
|
}
|
|
62
69
|
|
|
70
|
+
.ontario-card__heading {
|
|
71
|
+
border-radius: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
63
74
|
a {
|
|
64
75
|
&:focus-within {
|
|
65
76
|
box-shadow: none;
|
|
@@ -88,35 +99,18 @@
|
|
|
88
99
|
padding: (spacing.$spacing-5 - spacing.$spacing-1) spacing.$spacing-5 spacing.$spacing-2 spacing.$spacing-5;
|
|
89
100
|
transition: text-decoration 0.3s ease-in-out;
|
|
90
101
|
background-color: colours.$ontario-colour-white;
|
|
102
|
+
max-width: none;
|
|
91
103
|
|
|
92
104
|
.ontario-card:hover & {
|
|
93
105
|
text-decoration-line: underline;
|
|
94
106
|
text-decoration-color: colours.$ontario-colour-black;
|
|
95
107
|
}
|
|
96
108
|
|
|
97
|
-
.ontario-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
border-radius: globalVariables.$global-radius globalVariables.$global-radius 0 0;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.ontario-card__header-type--dark & {
|
|
106
|
-
background-color: colours.$ontario-colour-black;
|
|
107
|
-
padding-top: spacing.$spacing-4;
|
|
108
|
-
padding-bottom: spacing.$spacing-4;
|
|
109
|
-
border-radius: globalVariables.$global-radius globalVariables.$global-radius 0 0;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.ontario-card__header-type--dark:hover & {
|
|
113
|
-
text-decoration-line: underline;
|
|
114
|
-
text-decoration-color: colours.$ontario-colour-white;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.ontario-card--no-description & {
|
|
118
|
-
padding: spacing.$spacing-4 spacing.$spacing-5;
|
|
119
|
-
border-radius: 0 0 globalVariables.$global-radius globalVariables.$global-radius;
|
|
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
|
+
}
|
|
120
114
|
}
|
|
121
115
|
|
|
122
116
|
a {
|
|
@@ -124,10 +118,6 @@
|
|
|
124
118
|
text-decoration: none;
|
|
125
119
|
outline: none;
|
|
126
120
|
|
|
127
|
-
.ontario-card__header-type--dark & {
|
|
128
|
-
color: colours.$ontario-colour-white;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
121
|
&::after {
|
|
132
122
|
content: '';
|
|
133
123
|
position: absolute;
|
|
@@ -153,6 +143,47 @@
|
|
|
153
143
|
}
|
|
154
144
|
}
|
|
155
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
|
+
|
|
156
187
|
.ontario-card__text-container {
|
|
157
188
|
.ontario-card__card-type--horizontal & {
|
|
158
189
|
width: 66.6%;
|
|
@@ -182,18 +213,8 @@
|
|
|
182
213
|
margin-bottom: spacing.$spacing-0;
|
|
183
214
|
}
|
|
184
215
|
|
|
185
|
-
.ontario-card__header-type--light &,
|
|
186
|
-
.ontario-card__header-type--dark & {
|
|
187
|
-
padding-top: spacing.$spacing-4;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
216
|
@media screen and (max-width: breakpoints.$medium-breakpoint) {
|
|
191
217
|
padding: spacing.$spacing-2 spacing.$spacing-4 spacing.$spacing-5 spacing.$spacing-4;
|
|
192
|
-
|
|
193
|
-
.ontario-card__header-type--light &,
|
|
194
|
-
.ontario-card__header-type--dark & {
|
|
195
|
-
padding-top: spacing.$spacing-4;
|
|
196
|
-
}
|
|
197
218
|
}
|
|
198
219
|
}
|
|
199
220
|
|