diff --git a/packages/calcite-components/src/components/combobox/combobox.e2e.ts b/packages/calcite-components/src/components/combobox/combobox.e2e.ts index 5ba9b928311..753d399af8e 100644 --- a/packages/calcite-components/src/components/combobox/combobox.e2e.ts +++ b/packages/calcite-components/src/components/combobox/combobox.e2e.ts @@ -47,6 +47,18 @@ describe("calcite-combobox", () => { propertyName: "scale", defaultValue: "m", }, + { + propertyName: "status", + defaultValue: "idle", + }, + { + propertyName: "validationIcon", + defaultValue: undefined, + }, + { + propertyName: "validationMessage", + defaultValue: undefined, + }, ]); }); @@ -101,6 +113,14 @@ describe("calcite-combobox", () => { propertyName: "selectionMode", value: "single", }, + { + propertyName: "status", + value: "invalid", + }, + { + propertyName: "validationIcon", + value: true, + }, ]); }); diff --git a/packages/calcite-components/src/components/combobox/combobox.tsx b/packages/calcite-components/src/components/combobox/combobox.tsx index efa7574b1b4..fad92b77723 100644 --- a/packages/calcite-components/src/components/combobox/combobox.tsx +++ b/packages/calcite-components/src/components/combobox/combobox.tsx @@ -188,7 +188,7 @@ export class Combobox @Prop() validationMessage: string; /** Specifies the validation icon to display under the component. */ - @Prop() validationIcon: string | boolean; + @Prop({ reflect: true }) validationIcon: string | boolean; /** * Specifies the name of the component. diff --git a/packages/calcite-components/src/components/input-date-picker/input-date-picker.e2e.ts b/packages/calcite-components/src/components/input-date-picker/input-date-picker.e2e.ts index dd54fd1ce61..e50c14aeb54 100644 --- a/packages/calcite-components/src/components/input-date-picker/input-date-picker.e2e.ts +++ b/packages/calcite-components/src/components/input-date-picker/input-date-picker.e2e.ts @@ -45,6 +45,18 @@ describe("calcite-input-date-picker", () => { propertyName: "flipPlacements", defaultValue: undefined, }, + { + propertyName: "status", + defaultValue: "idle", + }, + { + propertyName: "validationIcon", + defaultValue: undefined, + }, + { + propertyName: "validationMessage", + defaultValue: undefined, + }, ]); }); diff --git a/packages/calcite-components/src/components/input-date-picker/input-date-picker.tsx b/packages/calcite-components/src/components/input-date-picker/input-date-picker.tsx index 36a4079a662..dfe057f06f1 100644 --- a/packages/calcite-components/src/components/input-date-picker/input-date-picker.tsx +++ b/packages/calcite-components/src/components/input-date-picker/input-date-picker.tsx @@ -274,7 +274,7 @@ export class InputDatePicker @Prop() validationMessage: string; /** Specifies the validation icon to display under the component. */ - @Prop() validationIcon: string | boolean; + @Prop({ reflect: true }) validationIcon: string | boolean; /** * Specifies the name of the component. diff --git a/packages/calcite-components/src/components/input-number/input-number.e2e.ts b/packages/calcite-components/src/components/input-number/input-number.e2e.ts index 1c8f91bee1e..9d7d5492786 100644 --- a/packages/calcite-components/src/components/input-number/input-number.e2e.ts +++ b/packages/calcite-components/src/components/input-number/input-number.e2e.ts @@ -60,6 +60,10 @@ describe("calcite-input-number", () => { propertyName: "scale", value: "s", }, + { + propertyName: "validationIcon", + value: true, + }, ]); }); @@ -85,6 +89,14 @@ describe("calcite-input-number", () => { propertyName: "value", defaultValue: "", }, + { + propertyName: "validationIcon", + defaultValue: undefined, + }, + { + propertyName: "validationMessage", + defaultValue: undefined, + }, ]); }); diff --git a/packages/calcite-components/src/components/input-number/input-number.tsx b/packages/calcite-components/src/components/input-number/input-number.tsx index bb2749f68e1..c058ad08984 100644 --- a/packages/calcite-components/src/components/input-number/input-number.tsx +++ b/packages/calcite-components/src/components/input-number/input-number.tsx @@ -216,7 +216,7 @@ export class InputNumber @Prop() validationMessage: string; /** Specifies the validation icon to display under the component. */ - @Prop() validationIcon: string | boolean; + @Prop({ reflect: true }) validationIcon: string | boolean; /** * Specifies the name of the component. diff --git a/packages/calcite-components/src/components/input-text/input-text.e2e.ts b/packages/calcite-components/src/components/input-text/input-text.e2e.ts index 9933ca817f3..0840551a35f 100644 --- a/packages/calcite-components/src/components/input-text/input-text.e2e.ts +++ b/packages/calcite-components/src/components/input-text/input-text.e2e.ts @@ -41,6 +41,10 @@ describe("calcite-input-text", () => { propertyName: "scale", value: "s", }, + { + propertyName: "validationIcon", + value: true, + }, ]); }); @@ -62,6 +66,14 @@ describe("calcite-input-text", () => { propertyName: "value", defaultValue: "", }, + { + propertyName: "validationIcon", + defaultValue: undefined, + }, + { + propertyName: "validationMessage", + defaultValue: undefined, + }, ]); }); diff --git a/packages/calcite-components/src/components/input-text/input-text.tsx b/packages/calcite-components/src/components/input-text/input-text.tsx index 324f77e9010..c9d8b28ff91 100644 --- a/packages/calcite-components/src/components/input-text/input-text.tsx +++ b/packages/calcite-components/src/components/input-text/input-text.tsx @@ -151,7 +151,7 @@ export class InputText @Prop() validationMessage: string; /** Specifies the validation icon to display under the component. */ - @Prop() validationIcon: string | boolean; + @Prop({ reflect: true }) validationIcon: string | boolean; /** * Specifies the name of the component. diff --git a/packages/calcite-components/src/components/input-time-picker/input-time-picker.e2e.ts b/packages/calcite-components/src/components/input-time-picker/input-time-picker.e2e.ts index aa73e4280ee..e2d3398c050 100644 --- a/packages/calcite-components/src/components/input-time-picker/input-time-picker.e2e.ts +++ b/packages/calcite-components/src/components/input-time-picker/input-time-picker.e2e.ts @@ -67,6 +67,9 @@ describe("calcite-input-time-picker", () => { { propertyName: "scale", defaultValue: "m" }, { propertyName: "step", defaultValue: 60 }, { propertyName: "overlayPositioning", defaultValue: "absolute" }, + { propertyName: "status", defaultValue: "idle" }, + { propertyName: "validationIcon", defaultValue: undefined }, + { propertyName: "validationMessage", defaultValue: undefined }, ]); }); @@ -75,6 +78,8 @@ describe("calcite-input-time-picker", () => { { propertyName: "open", value: true }, { propertyName: "disabled", value: true }, { propertyName: "scale", value: "m" }, + { propertyName: "status", value: "invalid" }, + { propertyName: "validationIcon", value: true }, ]); }); diff --git a/packages/calcite-components/src/components/input-time-picker/input-time-picker.tsx b/packages/calcite-components/src/components/input-time-picker/input-time-picker.tsx index fb04f23d72e..319a09cdfb6 100644 --- a/packages/calcite-components/src/components/input-time-picker/input-time-picker.tsx +++ b/packages/calcite-components/src/components/input-time-picker/input-time-picker.tsx @@ -247,7 +247,7 @@ export class InputTimePicker @Prop() validationMessage: string; /** Specifies the validation icon to display under the component. */ - @Prop() validationIcon: string | boolean; + @Prop({ reflect: true }) validationIcon: string | boolean; /** Specifies the name of the component on form submission. */ @Prop() name: string; diff --git a/packages/calcite-components/src/components/input-time-zone/input-time-zone.e2e.ts b/packages/calcite-components/src/components/input-time-zone/input-time-zone.e2e.ts index 65ea98d79ee..19f1eda91d3 100644 --- a/packages/calcite-components/src/components/input-time-zone/input-time-zone.e2e.ts +++ b/packages/calcite-components/src/components/input-time-zone/input-time-zone.e2e.ts @@ -82,6 +82,8 @@ describe("calcite-input-time-zone", () => { { propertyName: "open", value: true }, { propertyName: "scale", value: "m" }, { propertyName: "overlayPositioning", value: "absolute" }, + { propertyName: "status", value: "invalid" }, + { propertyName: "validationIcon", value: true }, ]); }); @@ -94,6 +96,9 @@ describe("calcite-input-time-zone", () => { { propertyName: "open", defaultValue: false }, { propertyName: "overlayPositioning", defaultValue: "absolute" }, { propertyName: "scale", defaultValue: "m" }, + { propertyName: "status", defaultValue: "idle" }, + { propertyName: "validationIcon", defaultValue: undefined }, + { propertyName: "validationMessage", defaultValue: undefined }, ]); }); diff --git a/packages/calcite-components/src/components/input-time-zone/input-time-zone.tsx b/packages/calcite-components/src/components/input-time-zone/input-time-zone.tsx index 1810f207957..31e6285acd7 100644 --- a/packages/calcite-components/src/components/input-time-zone/input-time-zone.tsx +++ b/packages/calcite-components/src/components/input-time-zone/input-time-zone.tsx @@ -128,7 +128,7 @@ export class InputTimeZone @Prop() validationMessage: string; /** Specifies the validation icon to display under the component. */ - @Prop() validationIcon: string | boolean; + @Prop({ reflect: true }) validationIcon: string | boolean; /** * Specifies the name of the component. diff --git a/packages/calcite-components/src/components/input/input.e2e.ts b/packages/calcite-components/src/components/input/input.e2e.ts index 1cc282e4a74..9f02f810ff4 100644 --- a/packages/calcite-components/src/components/input/input.e2e.ts +++ b/packages/calcite-components/src/components/input/input.e2e.ts @@ -64,6 +64,10 @@ describe("calcite-input", () => { propertyName: "scale", value: "s", }, + { + propertyName: "validationIcon", + value: true, + }, ]); }); @@ -93,6 +97,14 @@ describe("calcite-input", () => { propertyName: "value", defaultValue: "", }, + { + propertyName: "validationIcon", + defaultValue: undefined, + }, + { + propertyName: "validationMessage", + defaultValue: undefined, + }, ]); }); diff --git a/packages/calcite-components/src/components/input/input.tsx b/packages/calcite-components/src/components/input/input.tsx index 31916d6fdbc..a9699fa8236 100644 --- a/packages/calcite-components/src/components/input/input.tsx +++ b/packages/calcite-components/src/components/input/input.tsx @@ -213,7 +213,7 @@ export class Input @Prop() validationMessage: string; /** Specifies the validation icon to display under the component. */ - @Prop() validationIcon: string | boolean; + @Prop({ reflect: true }) validationIcon: string | boolean; /** * Specifies the name of the component. diff --git a/packages/calcite-components/src/components/select/select.e2e.ts b/packages/calcite-components/src/components/select/select.e2e.ts index 20f96b52305..8deac1487ed 100644 --- a/packages/calcite-components/src/components/select/select.e2e.ts +++ b/packages/calcite-components/src/components/select/select.e2e.ts @@ -2,6 +2,7 @@ import { E2EElement, E2EPage, newE2EPage } from "@stencil/core/testing"; import { accessible, disabled, + defaults, focusable, formAssociated, labelable, @@ -37,6 +38,15 @@ describe("calcite-select", () => { focusable(simpleTestMarkup); }); + describe("defaults", () => { + defaults("calcite-select", [ + { propertyName: "scale", defaultValue: "m" }, + { propertyName: "status", defaultValue: "idle" }, + { propertyName: "validationIcon", defaultValue: undefined }, + { propertyName: "validationMessage", defaultValue: undefined }, + ]); + }); + describe("reflects", () => { reflects(simpleTestMarkup, [ { @@ -47,6 +57,14 @@ describe("calcite-select", () => { propertyName: "scale", value: "m", }, + { + propertyName: "status", + value: "invalid", + }, + { + propertyName: "validationIcon", + value: true, + }, ]); }); diff --git a/packages/calcite-components/src/components/select/select.tsx b/packages/calcite-components/src/components/select/select.tsx index 8fc89f117c5..5a532e49f5d 100644 --- a/packages/calcite-components/src/components/select/select.tsx +++ b/packages/calcite-components/src/components/select/select.tsx @@ -91,7 +91,7 @@ export class Select @Prop() validationMessage: string; /** Specifies the validation icon to display under the component. */ - @Prop() validationIcon: string | boolean; + @Prop({ reflect: true }) validationIcon: string | boolean; /** * Specifies the name of the component. diff --git a/packages/calcite-components/src/components/text-area/text-area.e2e.ts b/packages/calcite-components/src/components/text-area/text-area.e2e.ts index 07a0cc91906..255cf87f099 100644 --- a/packages/calcite-components/src/components/text-area/text-area.e2e.ts +++ b/packages/calcite-components/src/components/text-area/text-area.e2e.ts @@ -29,6 +29,18 @@ describe("calcite-text-area", () => { propertyName: "scale", defaultValue: "m", }, + { + propertyName: "status", + defaultValue: "idle", + }, + { + propertyName: "validationIcon", + defaultValue: undefined, + }, + { + propertyName: "validationMessage", + defaultValue: undefined, + }, ]); }); @@ -58,6 +70,14 @@ describe("calcite-text-area", () => { propertyName: "scale", value: "s", }, + { + propertyName: "status", + value: "invalid", + }, + { + propertyName: "validationIcon", + value: true, + }, ]); }); diff --git a/packages/calcite-components/src/components/text-area/text-area.tsx b/packages/calcite-components/src/components/text-area/text-area.tsx index 746582532ce..95e672d7c34 100644 --- a/packages/calcite-components/src/components/text-area/text-area.tsx +++ b/packages/calcite-components/src/components/text-area/text-area.tsx @@ -136,7 +136,7 @@ export class TextArea @Prop() validationMessage: string; /** Specifies the validation icon to display under the component. */ - @Prop() validationIcon: string | boolean; + @Prop({ reflect: true }) validationIcon: string | boolean; /** * Specifies the name of the component.