From d2185e297f3786787e548b7137953f27045ae96f Mon Sep 17 00:00:00 2001 From: Mathieu Lavoie <44816587+m4thieulavoie@users.noreply.github.com> Date: Thu, 10 Feb 2022 12:43:17 -0500 Subject: [PATCH] Components use html templates (#5496) * use html instead of string templating * Change files * rollback to comment highlighting Co-authored-by: Chris Holt Co-authored-by: John Kreitlow <863023+radium-v@users.noreply.github.com> Co-authored-by: Rob Eisenberg --- ...st-components-31b7336b-21fd-4a8f-900b-3d4968476ff9.json | 7 +++++++ .../fast-components/src/accordion-item/index.ts | 4 ++-- .../web-components/fast-components/src/checkbox/index.ts | 4 ++-- .../web-components/fast-components/src/combobox/index.ts | 2 +- .../web-components/fast-components/src/flipper/index.ts | 4 ++-- .../web-components/fast-components/src/menu-item/index.ts | 6 +++--- .../fast-components/src/number-field/index.ts | 4 ++-- .../fast-components/src/progress-ring/index.ts | 2 +- .../web-components/fast-components/src/progress/index.ts | 4 ++-- packages/web-components/fast-components/src/radio/index.ts | 2 +- .../web-components/fast-components/src/select/index.ts | 2 +- .../web-components/fast-components/src/slider/index.ts | 2 +- .../web-components/fast-components/src/switch/index.ts | 2 +- .../web-components/fast-components/src/tree-item/index.ts | 2 +- 14 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 change/@microsoft-fast-components-31b7336b-21fd-4a8f-900b-3d4968476ff9.json diff --git a/change/@microsoft-fast-components-31b7336b-21fd-4a8f-900b-3d4968476ff9.json b/change/@microsoft-fast-components-31b7336b-21fd-4a8f-900b-3d4968476ff9.json new file mode 100644 index 00000000000..2953269cf1c --- /dev/null +++ b/change/@microsoft-fast-components-31b7336b-21fd-4a8f-900b-3d4968476ff9.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "use html instead of string templating", + "packageName": "@microsoft/fast-components", + "email": "mathieulavoie94@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/web-components/fast-components/src/accordion-item/index.ts b/packages/web-components/fast-components/src/accordion-item/index.ts index 71f6f22828d..4b1a0f2e1d3 100644 --- a/packages/web-components/fast-components/src/accordion-item/index.ts +++ b/packages/web-components/fast-components/src/accordion-item/index.ts @@ -18,7 +18,7 @@ export const fastAccordionItem = AccordionItem.compose({ baseName: "accordion-item", template, styles, - collapsedIcon: ` + collapsedIcon: /* html */ ` ({ /> `, - expandedIcon: ` + expandedIcon: /* html */ ` ({ baseName: "checkbox", template, styles, - checkedIndicator: ` + checkedIndicator: /* html */ ` ({ /> `, - indeterminateIndicator: ` + indeterminateIndicator: /* html */ `
`, }); diff --git a/packages/web-components/fast-components/src/combobox/index.ts b/packages/web-components/fast-components/src/combobox/index.ts index d935e6715db..b45c5705ecf 100644 --- a/packages/web-components/fast-components/src/combobox/index.ts +++ b/packages/web-components/fast-components/src/combobox/index.ts @@ -21,7 +21,7 @@ export const fastCombobox = Combobox.compose({ shadowOptions: { delegatesFocus: true, }, - indicator: ` + indicator: /* html */ ` ({ baseName: "flipper", template, styles, - next: ` + next: /* html */ ` `, - previous: ` + previous: /* html */ ` ({ baseName: "menu-item", template, styles, - checkboxIndicator: ` + checkboxIndicator: /* html */ ` ({ /> `, - expandCollapseGlyph: ` + expandCollapseGlyph: /* html */ ` ({ /> `, - radioIndicator: ` + radioIndicator: /* html */ ` `, }); diff --git a/packages/web-components/fast-components/src/number-field/index.ts b/packages/web-components/fast-components/src/number-field/index.ts index e3b68d62514..27c5abfc852 100644 --- a/packages/web-components/fast-components/src/number-field/index.ts +++ b/packages/web-components/fast-components/src/number-field/index.ts @@ -46,10 +46,10 @@ export const fastNumberField = NumberField.compose({ shadowOptions: { delegatesFocus: true, }, - stepDownGlyph: ` + stepDownGlyph: /* html */ ` `, - stepUpGlyph: ` + stepUpGlyph: /* html */ ` `, }); diff --git a/packages/web-components/fast-components/src/progress-ring/index.ts b/packages/web-components/fast-components/src/progress-ring/index.ts index 47409101b0f..8c1a5127e38 100644 --- a/packages/web-components/fast-components/src/progress-ring/index.ts +++ b/packages/web-components/fast-components/src/progress-ring/index.ts @@ -18,7 +18,7 @@ export const fastProgressRing = ProgressRing.compose({ baseName: "progress-ring", template, styles, - indeterminateIndicator: ` + indeterminateIndicator: /* html */ ` ({ baseName: "progress", template, styles, - indeterminateIndicator1: ` + indeterminateIndicator1: /* html */ ` `, - indeterminateIndicator2: ` + indeterminateIndicator2: /* html */ ` `, }); diff --git a/packages/web-components/fast-components/src/radio/index.ts b/packages/web-components/fast-components/src/radio/index.ts index 3a2b10674ec..57d4ee4af63 100644 --- a/packages/web-components/fast-components/src/radio/index.ts +++ b/packages/web-components/fast-components/src/radio/index.ts @@ -18,7 +18,7 @@ export const fastRadio = Radio.compose({ baseName: "radio", template, styles, - checkedIndicator: ` + checkedIndicator: /* html */ `
`, }); diff --git a/packages/web-components/fast-components/src/select/index.ts b/packages/web-components/fast-components/src/select/index.ts index c79d7ab6419..077816d3792 100644 --- a/packages/web-components/fast-components/src/select/index.ts +++ b/packages/web-components/fast-components/src/select/index.ts @@ -19,7 +19,7 @@ export const fastSelect = Select.compose({ baseName: "select", template, styles, - indicator: ` + indicator: /* html */ ` ({ baseName: "slider", template, styles, - thumb: ` + thumb: /* html */ `
`, }); diff --git a/packages/web-components/fast-components/src/switch/index.ts b/packages/web-components/fast-components/src/switch/index.ts index 26a80abb881..6faa44ab9c5 100644 --- a/packages/web-components/fast-components/src/switch/index.ts +++ b/packages/web-components/fast-components/src/switch/index.ts @@ -18,7 +18,7 @@ export const fastSwitch = Switch.compose({ baseName: "switch", template, styles, - switch: ` + switch: /* html */ ` `, }); diff --git a/packages/web-components/fast-components/src/tree-item/index.ts b/packages/web-components/fast-components/src/tree-item/index.ts index 6ae7559671f..95784a611b7 100644 --- a/packages/web-components/fast-components/src/tree-item/index.ts +++ b/packages/web-components/fast-components/src/tree-item/index.ts @@ -19,7 +19,7 @@ export const fastTreeItem = TreeItem.compose({ baseName: "tree-item", template, styles, - expandCollapseGlyph: ` + expandCollapseGlyph: /* html */ `