@ongov/ontario-design-system-component-library 4.3.1-alpha.1 → 5.0.0-alpha.3
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/app-globals-6f6b30a8.js.map +1 -1
- 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} +358 -85
- 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 +252 -34
- package/dist/collection/components/ontario-card/ontario-card.js +102 -78
- 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-date-input/test/ontario-date-input.spec.js +58 -0
- package/dist/collection/components/ontario-date-input/test/ontario-date-input.spec.js.map +1 -1
- package/dist/collection/components/ontario-date-input/utils/date-validation-utils.js +14 -4
- package/dist/collection/components/ontario-date-input/utils/date-validation-utils.js.map +1 -1
- package/dist/collection/components/ontario-header/service-ontario-header.css +0 -3
- 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/fonts/open-sans-400/LICENSE.txt +0 -0
- package/dist/collection/fonts/open-sans-400/open-sans-400.eot +0 -0
- package/dist/collection/fonts/open-sans-400/open-sans-400.svg +0 -0
- package/dist/collection/fonts/open-sans-400/open-sans-400.ttf +0 -0
- package/dist/collection/fonts/open-sans-400/open-sans-400.woff +0 -0
- package/dist/collection/fonts/open-sans-400/open-sans-400.woff2 +0 -0
- package/dist/collection/fonts/open-sans-700/LICENSE.txt +0 -0
- package/dist/collection/fonts/open-sans-700/open-sans-700.eot +0 -0
- package/dist/collection/fonts/open-sans-700/open-sans-700.svg +0 -0
- package/dist/collection/fonts/open-sans-700/open-sans-700.ttf +0 -0
- 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/helper/utils.js +4 -2
- package/dist/collection/utils/helper/utils.js.map +1 -1
- package/dist/collection/utils/helper/utils.spec.js +99 -1
- package/dist/collection/utils/helper/utils.spec.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/input.js +3 -0
- package/dist/components/input.js.map +1 -1
- package/dist/components/ontario-card.js +116 -64
- 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 +15 -4
- 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 +4 -6
- 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-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 +4 -2
- package/dist/components/utils.js.map +1 -1
- package/dist/esm/app-globals-70748594.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} +358 -85
- package/dist/esm/ontario-accordion_44.entry.js.map +1 -0
- package/dist/esm/ontario-design-system-components.js +1 -1
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/ontario-design-system-components/fonts/open-sans-400/LICENSE.txt +0 -0
- package/dist/ontario-design-system-components/fonts/open-sans-400/open-sans-400.eot +0 -0
- package/dist/ontario-design-system-components/fonts/open-sans-400/open-sans-400.svg +0 -0
- package/dist/ontario-design-system-components/fonts/open-sans-400/open-sans-400.ttf +0 -0
- package/dist/ontario-design-system-components/fonts/open-sans-400/open-sans-400.woff +0 -0
- package/dist/ontario-design-system-components/fonts/open-sans-400/open-sans-400.woff2 +0 -0
- package/dist/ontario-design-system-components/fonts/open-sans-700/LICENSE.txt +0 -0
- package/dist/ontario-design-system-components/fonts/open-sans-700/open-sans-700.eot +0 -0
- package/dist/ontario-design-system-components/fonts/open-sans-700/open-sans-700.svg +0 -0
- package/dist/ontario-design-system-components/fonts/open-sans-700/open-sans-700.ttf +0 -0
- 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-103a233b.js.map +1 -1
- package/dist/ontario-design-system-components/{p-abe58ec9.entry.js → p-ac4e76b2.entry.js} +1927 -1728
- package/dist/ontario-design-system-components/p-ac4e76b2.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-date-input/utils/date-validation-utils.d.ts +14 -0
- package/dist/types/components/ontario-search-box/ontario-search-box.d.ts +180 -0
- package/dist/types/components.d.ts +199 -16
- 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/package.json +3 -3
- package/src/components/ontario-card/ontario-card-types.tsx +33 -4
- package/src/components/ontario-card/ontario-card.scss +54 -40
- package/src/components/ontario-card/ontario-card.tsx +94 -68
- 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-date-input/test/ontario-date-input.spec.tsx +76 -0
- package/src/components/ontario-date-input/utils/date-validation-utils.ts +18 -4
- package/src/components/ontario-header/service-ontario-header.scss +0 -4
- package/src/components/ontario-hint-text/readme.md +2 -0
- 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 +199 -16
- package/src/config.json +1 -4
- package/src/index.html +287 -52
- package/src/utils/common/input/input.tsx +4 -1
- package/src/utils/common/input-caption/input-caption.tsx +9 -3
- package/src/utils/helper/utils.spec.ts +127 -1
- package/src/utils/helper/utils.ts +4 -2
- 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-103a233b.js.map +1 -1
- package/www/build/{p-abe58ec9.entry.js → p-ac4e76b2.entry.js} +1927 -1728
- package/www/build/p-ac4e76b2.entry.js.map +1 -0
- package/www/build/{p-fdc9ab6d.js → p-c9a9b857.js} +1 -1
- package/www/fonts/open-sans-400/LICENSE.txt +0 -0
- package/www/fonts/open-sans-400/open-sans-400.eot +0 -0
- package/www/fonts/open-sans-400/open-sans-400.svg +0 -0
- package/www/fonts/open-sans-400/open-sans-400.ttf +0 -0
- package/www/fonts/open-sans-400/open-sans-400.woff +0 -0
- package/www/fonts/open-sans-400/open-sans-400.woff2 +0 -0
- package/www/fonts/open-sans-700/LICENSE.txt +0 -0
- package/www/fonts/open-sans-700/open-sans-700.eot +0 -0
- package/www/fonts/open-sans-700/open-sans-700.svg +0 -0
- package/www/fonts/open-sans-700/open-sans-700.ttf +0 -0
- package/www/index.html +261 -52
- 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-abe58ec9.entry.js.map +0 -1
- package/www/build/p-abe58ec9.entry.js.map +0 -1
package/src/components.d.ts
CHANGED
|
@@ -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
|
/**
|
|
@@ -1826,6 +1826,54 @@ export namespace Components {
|
|
|
1826
1826
|
*/
|
|
1827
1827
|
required?: boolean;
|
|
1828
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
|
+
}
|
|
1829
1877
|
interface OntarioStepIndicator {
|
|
1830
1878
|
/**
|
|
1831
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.
|
|
@@ -1969,6 +2017,10 @@ export interface OntarioRadioButtonsCustomEvent<T> extends CustomEvent<T> {
|
|
|
1969
2017
|
detail: T;
|
|
1970
2018
|
target: HTMLOntarioRadioButtonsElement;
|
|
1971
2019
|
}
|
|
2020
|
+
export interface OntarioSearchBoxCustomEvent<T> extends CustomEvent<T> {
|
|
2021
|
+
detail: T;
|
|
2022
|
+
target: HTMLOntarioSearchBoxElement;
|
|
2023
|
+
}
|
|
1972
2024
|
export interface OntarioTextareaCustomEvent<T> extends CustomEvent<T> {
|
|
1973
2025
|
detail: T;
|
|
1974
2026
|
target: HTMLOntarioTextareaElement;
|
|
@@ -3019,6 +3071,65 @@ declare global {
|
|
|
3019
3071
|
prototype: HTMLOntarioRadioButtonsElement;
|
|
3020
3072
|
new (): HTMLOntarioRadioButtonsElement;
|
|
3021
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
|
+
};
|
|
3022
3133
|
interface HTMLOntarioStepIndicatorElement extends Components.OntarioStepIndicator, HTMLStencilElement {}
|
|
3023
3134
|
var HTMLOntarioStepIndicatorElement: {
|
|
3024
3135
|
prototype: HTMLOntarioStepIndicatorElement;
|
|
@@ -3224,6 +3335,7 @@ declare global {
|
|
|
3224
3335
|
'ontario-loading-indicator': HTMLOntarioLoadingIndicatorElement;
|
|
3225
3336
|
'ontario-page-alert': HTMLOntarioPageAlertElement;
|
|
3226
3337
|
'ontario-radio-buttons': HTMLOntarioRadioButtonsElement;
|
|
3338
|
+
'ontario-search-box': HTMLOntarioSearchBoxElement;
|
|
3227
3339
|
'ontario-step-indicator': HTMLOntarioStepIndicatorElement;
|
|
3228
3340
|
'ontario-table': HTMLOntarioTableElement;
|
|
3229
3341
|
'ontario-textarea': HTMLOntarioTextareaElement;
|
|
@@ -3368,18 +3480,14 @@ declare namespace LocalJSX {
|
|
|
3368
3480
|
* Action link for when the card is clicked. This is optional.
|
|
3369
3481
|
*/
|
|
3370
3482
|
cardLink?: string;
|
|
3371
|
-
/**
|
|
3372
|
-
* The type of card to render. If no type is passed, it will default to 'basic'.
|
|
3373
|
-
*/
|
|
3374
|
-
cardType?: CardType;
|
|
3375
3483
|
/**
|
|
3376
3484
|
* Text to be displayed within the card description container. This is optional.
|
|
3377
3485
|
*/
|
|
3378
3486
|
description?: string;
|
|
3379
3487
|
/**
|
|
3380
|
-
*
|
|
3488
|
+
* Set the card's header colour. This is optional.
|
|
3381
3489
|
*/
|
|
3382
|
-
|
|
3490
|
+
headerColour?: HeaderColour;
|
|
3383
3491
|
/**
|
|
3384
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'.
|
|
3385
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>
|
|
@@ -3399,6 +3507,10 @@ declare namespace LocalJSX {
|
|
|
3399
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" >
|
|
3400
3508
|
*/
|
|
3401
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;
|
|
3402
3514
|
}
|
|
3403
3515
|
interface OntarioCardCollection {
|
|
3404
3516
|
/**
|
|
@@ -5051,6 +5163,75 @@ declare namespace LocalJSX {
|
|
|
5051
5163
|
*/
|
|
5052
5164
|
required?: boolean;
|
|
5053
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
|
+
}
|
|
5054
5235
|
interface OntarioStepIndicator {
|
|
5055
5236
|
/**
|
|
5056
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.
|
|
@@ -5321,6 +5502,7 @@ declare namespace LocalJSX {
|
|
|
5321
5502
|
'ontario-loading-indicator': OntarioLoadingIndicator;
|
|
5322
5503
|
'ontario-page-alert': OntarioPageAlert;
|
|
5323
5504
|
'ontario-radio-buttons': OntarioRadioButtons;
|
|
5505
|
+
'ontario-search-box': OntarioSearchBox;
|
|
5324
5506
|
'ontario-step-indicator': OntarioStepIndicator;
|
|
5325
5507
|
'ontario-table': OntarioTable;
|
|
5326
5508
|
'ontario-textarea': OntarioTextarea;
|
|
@@ -5525,6 +5707,7 @@ declare module '@stencil/core' {
|
|
|
5525
5707
|
JSXBase.HTMLAttributes<HTMLOntarioLoadingIndicatorElement>;
|
|
5526
5708
|
'ontario-page-alert': LocalJSX.OntarioPageAlert & JSXBase.HTMLAttributes<HTMLOntarioPageAlertElement>;
|
|
5527
5709
|
'ontario-radio-buttons': LocalJSX.OntarioRadioButtons & JSXBase.HTMLAttributes<HTMLOntarioRadioButtonsElement>;
|
|
5710
|
+
'ontario-search-box': LocalJSX.OntarioSearchBox & JSXBase.HTMLAttributes<HTMLOntarioSearchBoxElement>;
|
|
5528
5711
|
'ontario-step-indicator': LocalJSX.OntarioStepIndicator & JSXBase.HTMLAttributes<HTMLOntarioStepIndicatorElement>;
|
|
5529
5712
|
'ontario-table': LocalJSX.OntarioTable & JSXBase.HTMLAttributes<HTMLOntarioTableElement>;
|
|
5530
5713
|
'ontario-textarea': LocalJSX.OntarioTextarea & JSXBase.HTMLAttributes<HTMLOntarioTextareaElement>;
|
package/src/config.json
CHANGED