@ongov/ontario-design-system-component-library-react 10.0.0-alpha.1 → 10.0.0-beta.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.
@@ -6,7 +6,7 @@
6
6
  /* eslint-disable */
7
7
 
8
8
  // @ts-ignore - ignore potential type issues as the project is importing itself
9
- import { type AccordionChangeDetail, type AutocompleteSuggestionSelectedEvent, type DateInputFieldType, type HeaderLanguageToggleEventDetails, type HeaderMenuToggleDetail, type InputFocusBlurEvent, type InputInputEvent, type InputInteractionEvent, type Language, type OntarioAccordionCustomEvent, type OntarioBackButtonCustomEvent, type OntarioCheckboxesCustomEvent, type OntarioDateInputCustomEvent, type OntarioDropdownListCustomEvent, type OntarioHeaderCustomEvent, type OntarioHeaderMenuTabsCustomEvent, type OntarioHeaderOverflowMenuCustomEvent, type OntarioHintExpanderCustomEvent, type OntarioInputCustomEvent, type OntarioLanguageToggleCustomEvent, type OntarioRadioButtonsCustomEvent, type OntarioSearchBoxCustomEvent, type OntarioSearchResultItemCustomEvent, type OntarioTextareaCustomEvent, type RadioAndCheckboxChangeEvent } from "@ongov/ontario-design-system-component-library";
9
+ import { type AccordionChangeDetail, type AutocompleteSuggestionSelectedEvent, type DateInputFieldType, type HeaderLanguageToggleEventDetails, type HeaderMenuToggleDetail, type InputFocusBlurEvent, type InputInputEvent, type InputInteractionEvent, type Language, type OntarioAccordionCustomEvent, type OntarioBackButtonCustomEvent, type OntarioCheckboxCustomEvent, type OntarioCheckboxesCustomEvent, type OntarioDateInputCustomEvent, type OntarioDropdownListCustomEvent, type OntarioHeaderCustomEvent, type OntarioHeaderMenuTabsCustomEvent, type OntarioHeaderOverflowMenuCustomEvent, type OntarioHintExpanderCustomEvent, type OntarioInputCustomEvent, type OntarioLanguageToggleCustomEvent, type OntarioRadioButtonsCustomEvent, type OntarioSearchBoxCustomEvent, type OntarioSearchResultItemCustomEvent, type OntarioTextareaCustomEvent, type RadioAndCheckboxChangeEvent } from "@ongov/ontario-design-system-component-library";
10
10
  import * as clientComponents from '@ongov/ontario-design-system-component-library-react';
11
11
  import { OntarioAccordion as OntarioAccordionElement } from "@ongov/ontario-design-system-component-library/components/ontario-accordion.js";
12
12
  import { OntarioAside as OntarioAsideElement } from "@ongov/ontario-design-system-component-library/components/ontario-aside.js";
@@ -18,6 +18,7 @@ import { OntarioButton as OntarioButtonElement } from "@ongov/ontario-design-sys
18
18
  import { OntarioCallout as OntarioCalloutElement } from "@ongov/ontario-design-system-component-library/components/ontario-callout.js";
19
19
  import { OntarioCardCollection as OntarioCardCollectionElement } from "@ongov/ontario-design-system-component-library/components/ontario-card-collection.js";
20
20
  import { OntarioCard as OntarioCardElement } from "@ongov/ontario-design-system-component-library/components/ontario-card.js";
21
+ import { OntarioCheckbox as OntarioCheckboxElement } from "@ongov/ontario-design-system-component-library/components/ontario-checkbox.js";
21
22
  import { OntarioCheckboxes as OntarioCheckboxesElement } from "@ongov/ontario-design-system-component-library/components/ontario-checkboxes.js";
22
23
  import { OntarioCriticalAlert as OntarioCriticalAlertElement } from "@ongov/ontario-design-system-component-library/components/ontario-critical-alert.js";
23
24
  import { OntarioDateInput as OntarioDateInputElement } from "@ongov/ontario-design-system-component-library/components/ontario-date-input.js";
@@ -323,6 +324,36 @@ export const OntarioCardCollection: StencilReactComponent<OntarioCardCollectionE
323
324
  serializeShadowRoot
324
325
  });
325
326
 
327
+ export type OntarioCheckboxEvents = {
328
+ onCheckboxOnChange: EventName<OntarioCheckboxCustomEvent<RadioAndCheckboxChangeEvent>>,
329
+ onCheckboxOnBlur: EventName<OntarioCheckboxCustomEvent<InputFocusBlurEvent>>,
330
+ onCheckboxOnFocus: EventName<OntarioCheckboxCustomEvent<InputFocusBlurEvent>>,
331
+ onInputErrorOccurred: EventName<OntarioCheckboxCustomEvent<{ errorMessage: string }>>
332
+ };
333
+
334
+ export const OntarioCheckbox: StencilReactComponent<OntarioCheckboxElement, OntarioCheckboxEvents> = /*@__PURE__*/ createComponent<OntarioCheckboxElement, OntarioCheckboxEvents>({
335
+ tagName: 'ontario-checkbox',
336
+ properties: {
337
+ label: 'label',
338
+ elementId: 'element-id',
339
+ name: 'name',
340
+ value: 'value',
341
+ checked: 'checked',
342
+ hintText: 'hint-text',
343
+ hintExpander: 'hint-expander',
344
+ required: 'required',
345
+ errorMessage: 'error-message',
346
+ requiredValidationMessage: 'required-validation-message',
347
+ language: 'language',
348
+ customOnChange: 'custom-on-change',
349
+ customOnBlur: 'custom-on-blur',
350
+ customOnFocus: 'custom-on-focus'
351
+ },
352
+ hydrateModule: import('@ongov/ontario-design-system-component-library/hydrate') as Promise<HydrateModule>,
353
+ clientModule: clientComponents.OntarioCheckbox as ReactWebComponent<OntarioCheckboxElement, OntarioCheckboxEvents>,
354
+ serializeShadowRoot
355
+ });
356
+
326
357
  export type OntarioCheckboxesEvents = {
327
358
  onCheckboxOnChange: EventName<OntarioCheckboxesCustomEvent<RadioAndCheckboxChangeEvent>>,
328
359
  onCheckboxOnBlur: EventName<OntarioCheckboxesCustomEvent<InputFocusBlurEvent>>,
@@ -2270,6 +2301,8 @@ export const OntarioInput: StencilReactComponent<OntarioInputElement, OntarioInp
2270
2301
  hintText: 'hint-text',
2271
2302
  required: 'required',
2272
2303
  type: 'type',
2304
+ inputMode: 'input-mode',
2305
+ pattern: 'pattern',
2273
2306
  value: 'value',
2274
2307
  errorMessage: 'error-message',
2275
2308
  language: 'language',
@@ -2387,6 +2420,8 @@ export const OntarioSearchBox: StencilReactComponent<OntarioSearchBoxElement, On
2387
2420
  maxSuggestions: 'max-suggestions',
2388
2421
  caption: 'caption',
2389
2422
  required: 'required',
2423
+ inputMode: 'input-mode',
2424
+ pattern: 'pattern',
2390
2425
  performSearch: 'perform-search',
2391
2426
  hintText: 'hint-text',
2392
2427
  customOnInput: 'custom-on-input',
@@ -7,7 +7,7 @@
7
7
 
8
8
  /* eslint-disable */
9
9
 
10
- import { type AccordionChangeDetail, type AutocompleteSuggestionSelectedEvent, type DateInputFieldType, type HeaderLanguageToggleEventDetails, type HeaderMenuToggleDetail, type InputFocusBlurEvent, type InputInputEvent, type InputInteractionEvent, type Language, type OntarioAccordionCustomEvent, type OntarioBackButtonCustomEvent, type OntarioCheckboxesCustomEvent, type OntarioDateInputCustomEvent, type OntarioDropdownListCustomEvent, type OntarioHeaderCustomEvent, type OntarioHeaderMenuTabsCustomEvent, type OntarioHeaderOverflowMenuCustomEvent, type OntarioHintExpanderCustomEvent, type OntarioInputCustomEvent, type OntarioLanguageToggleCustomEvent, type OntarioRadioButtonsCustomEvent, type OntarioSearchBoxCustomEvent, type OntarioSearchResultItemCustomEvent, type OntarioTextareaCustomEvent, type RadioAndCheckboxChangeEvent } from "@ongov/ontario-design-system-component-library";
10
+ import { type AccordionChangeDetail, type AutocompleteSuggestionSelectedEvent, type DateInputFieldType, type HeaderLanguageToggleEventDetails, type HeaderMenuToggleDetail, type InputFocusBlurEvent, type InputInputEvent, type InputInteractionEvent, type Language, type OntarioAccordionCustomEvent, type OntarioBackButtonCustomEvent, type OntarioCheckboxCustomEvent, type OntarioCheckboxesCustomEvent, type OntarioDateInputCustomEvent, type OntarioDropdownListCustomEvent, type OntarioHeaderCustomEvent, type OntarioHeaderMenuTabsCustomEvent, type OntarioHeaderOverflowMenuCustomEvent, type OntarioHintExpanderCustomEvent, type OntarioInputCustomEvent, type OntarioLanguageToggleCustomEvent, type OntarioRadioButtonsCustomEvent, type OntarioSearchBoxCustomEvent, type OntarioSearchResultItemCustomEvent, type OntarioTextareaCustomEvent, type RadioAndCheckboxChangeEvent } from "@ongov/ontario-design-system-component-library";
11
11
  import { OntarioAccordion as OntarioAccordionElement, defineCustomElement as defineOntarioAccordion } from "@ongov/ontario-design-system-component-library/components/ontario-accordion.js";
12
12
  import { OntarioAside as OntarioAsideElement, defineCustomElement as defineOntarioAside } from "@ongov/ontario-design-system-component-library/components/ontario-aside.js";
13
13
  import { OntarioBackButton as OntarioBackButtonElement, defineCustomElement as defineOntarioBackButton } from "@ongov/ontario-design-system-component-library/components/ontario-back-button.js";
@@ -18,6 +18,7 @@ import { OntarioButton as OntarioButtonElement, defineCustomElement as defineOnt
18
18
  import { OntarioCallout as OntarioCalloutElement, defineCustomElement as defineOntarioCallout } from "@ongov/ontario-design-system-component-library/components/ontario-callout.js";
19
19
  import { OntarioCardCollection as OntarioCardCollectionElement, defineCustomElement as defineOntarioCardCollection } from "@ongov/ontario-design-system-component-library/components/ontario-card-collection.js";
20
20
  import { OntarioCard as OntarioCardElement, defineCustomElement as defineOntarioCard } from "@ongov/ontario-design-system-component-library/components/ontario-card.js";
21
+ import { OntarioCheckbox as OntarioCheckboxElement, defineCustomElement as defineOntarioCheckbox } from "@ongov/ontario-design-system-component-library/components/ontario-checkbox.js";
21
22
  import { OntarioCheckboxes as OntarioCheckboxesElement, defineCustomElement as defineOntarioCheckboxes } from "@ongov/ontario-design-system-component-library/components/ontario-checkboxes.js";
22
23
  import { OntarioCriticalAlert as OntarioCriticalAlertElement, defineCustomElement as defineOntarioCriticalAlert } from "@ongov/ontario-design-system-component-library/components/ontario-critical-alert.js";
23
24
  import { OntarioDateInput as OntarioDateInputElement, defineCustomElement as defineOntarioDateInput } from "@ongov/ontario-design-system-component-library/components/ontario-date-input.js";
@@ -280,6 +281,27 @@ export const OntarioCardCollection: StencilReactComponent<OntarioCardCollectionE
280
281
  defineCustomElement: defineOntarioCardCollection
281
282
  });
282
283
 
284
+ export type OntarioCheckboxEvents = {
285
+ onCheckboxOnChange: EventName<OntarioCheckboxCustomEvent<RadioAndCheckboxChangeEvent>>,
286
+ onCheckboxOnBlur: EventName<OntarioCheckboxCustomEvent<InputFocusBlurEvent>>,
287
+ onCheckboxOnFocus: EventName<OntarioCheckboxCustomEvent<InputFocusBlurEvent>>,
288
+ onInputErrorOccurred: EventName<OntarioCheckboxCustomEvent<{ errorMessage: string }>>
289
+ };
290
+
291
+ export const OntarioCheckbox: StencilReactComponent<OntarioCheckboxElement, OntarioCheckboxEvents> = /*@__PURE__*/ createComponent<OntarioCheckboxElement, OntarioCheckboxEvents>({
292
+ tagName: 'ontario-checkbox',
293
+ elementClass: OntarioCheckboxElement,
294
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
295
+ react: React,
296
+ events: {
297
+ onCheckboxOnChange: 'checkboxOnChange',
298
+ onCheckboxOnBlur: 'checkboxOnBlur',
299
+ onCheckboxOnFocus: 'checkboxOnFocus',
300
+ onInputErrorOccurred: 'inputErrorOccurred'
301
+ } as OntarioCheckboxEvents,
302
+ defineCustomElement: defineOntarioCheckbox
303
+ });
304
+
283
305
  export type OntarioCheckboxesEvents = {
284
306
  onCheckboxOnChange: EventName<OntarioCheckboxesCustomEvent<RadioAndCheckboxChangeEvent>>,
285
307
  onCheckboxOnBlur: EventName<OntarioCheckboxesCustomEvent<InputFocusBlurEvent>>,
package/src/components.ts CHANGED
@@ -20,6 +20,7 @@ export const OntarioButton = /*@__PURE__*/createReactComponent<JSX.OntarioButton
20
20
  export const OntarioCallout = /*@__PURE__*/createReactComponent<JSX.OntarioCallout, HTMLOntarioCalloutElement>('ontario-callout');
21
21
  export const OntarioCard = /*@__PURE__*/createReactComponent<JSX.OntarioCard, HTMLOntarioCardElement>('ontario-card');
22
22
  export const OntarioCardCollection = /*@__PURE__*/createReactComponent<JSX.OntarioCardCollection, HTMLOntarioCardCollectionElement>('ontario-card-collection');
23
+ export const OntarioCheckbox = /*@__PURE__*/createReactComponent<JSX.OntarioCheckbox, HTMLOntarioCheckboxElement>('ontario-checkbox');
23
24
  export const OntarioCheckboxes = /*@__PURE__*/createReactComponent<JSX.OntarioCheckboxes, HTMLOntarioCheckboxesElement>('ontario-checkboxes');
24
25
  export const OntarioCriticalAlert = /*@__PURE__*/createReactComponent<JSX.OntarioCriticalAlert, HTMLOntarioCriticalAlertElement>('ontario-critical-alert');
25
26
  export const OntarioDateInput = /*@__PURE__*/createReactComponent<JSX.OntarioDateInput, HTMLOntarioDateInputElement>('ontario-date-input');