diff --git a/packages/calcite-components/src/components/dropdown/dropdown.e2e.ts b/packages/calcite-components/src/components/dropdown/dropdown.e2e.ts index 70df138aa16..5631d9ef4e8 100644 --- a/packages/calcite-components/src/components/dropdown/dropdown.e2e.ts +++ b/packages/calcite-components/src/components/dropdown/dropdown.e2e.ts @@ -145,7 +145,7 @@ describe("calcite-dropdown", () => { it("renders requested props when valid props are provided", async () => { const page = await newE2EPage(); - await page.setContent(html` + await page.setContent(html` Open dropdown Dropdown Item Content @@ -157,7 +157,7 @@ describe("calcite-dropdown", () => { const element = await page.find("calcite-dropdown"); const group1 = await element.find("calcite-dropdown-group[id='group-1']"); - expect(element).toEqualAttribute("width", "l"); + expect(element).toEqualAttribute("width-scale", "l"); expect(element).toEqualAttribute("placement", "bottom-end"); expect(group1).toEqualAttribute("selection-mode", "multiple"); }); diff --git a/packages/calcite-components/src/components/dropdown/dropdown.scss b/packages/calcite-components/src/components/dropdown/dropdown.scss index 0bc0223fdb7..20184ba91a9 100644 --- a/packages/calcite-components/src/components/dropdown/dropdown.scss +++ b/packages/calcite-components/src/components/dropdown/dropdown.scss @@ -44,13 +44,13 @@ } // width -:host([width="s"]) { +:host([width-scale="s"]) { --calcite-dropdown-width: theme("spacing.48"); } -:host([width="m"]) { +:host([width-scale="m"]) { --calcite-dropdown-width: theme("spacing.56"); } -:host([width="l"]) { +:host([width-scale="l"]) { --calcite-dropdown-width: theme("spacing.64"); } diff --git a/packages/calcite-components/src/components/dropdown/dropdown.stories.ts b/packages/calcite-components/src/components/dropdown/dropdown.stories.ts index b3f18ff15b1..76811abbf26 100644 --- a/packages/calcite-components/src/components/dropdown/dropdown.stories.ts +++ b/packages/calcite-components/src/components/dropdown/dropdown.stories.ts @@ -23,7 +23,7 @@ export const simple = (): string => html` open placement="${select("placement", menuPlacements, defaultMenuPlacement)}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "m")}" + width-scale="${select("width-scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} @@ -68,7 +68,7 @@ export const simpleFullWidth = (): string => html` open placement="${select("placement", menuPlacements, defaultMenuPlacement)}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "m")}" + width-scale="${select("width-scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} @@ -91,7 +91,7 @@ export const withIcons = (): string => html` open placement="${select("placement", menuPlacements, defaultMenuPlacement)}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "m")}" + width-scale="${select("width-scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} @@ -129,7 +129,7 @@ export const groupsAndSelectionModes = (): string => html` open placement="${select("placement", menuPlacements, defaultMenuPlacement)}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "m")}" + width-scale="${select("width-scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} @@ -157,7 +157,7 @@ export const itemsAsLinks = (): string => html` open placement="${select("placement", menuPlacements, defaultMenuPlacement)}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "m")}" + width-scale="${select("width-scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} @@ -190,7 +190,7 @@ export const darkModeRTL_TestOnly = (): string => html` class="calcite-mode-dark" placement="${select("placement", menuPlacements, defaultMenuPlacement)}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "m")}" + width-scale="${select("width-scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} @@ -225,7 +225,7 @@ export const itemsAsLinksDarkMode = (): string => html` class="calcite-mode-dark" placement="${select("placement", menuPlacements, defaultMenuPlacement)}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "m")}" + width-scale="${select("width-scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} @@ -259,7 +259,7 @@ export const scrollingAfterCertainItems_TestOnly = (): string => html` placement="${select("placement", menuPlacements, defaultMenuPlacement)}" max-items="${number("max-items", 7, { min: 0, max: 10, step: 1 })}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "m")}" + width-scale="${select("width-scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} @@ -343,7 +343,7 @@ export const disabled_TestOnly = (): string => html` export const flipPositioning_TestOnly = (): string => html`
- + Open Dropdown 1 @@ -365,7 +365,7 @@ export const alignedCenter_TestOnly = (): string => html` open placement="${select("placement", menuPlacements, defaultMenuPlacement)}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "m")}" + width-scale="${select("width-scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} @@ -389,7 +389,7 @@ export const alignedCenterRTL_TestOnly = (): string => html` open placement="${select("placement", menuPlacements, defaultMenuPlacement)}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "m")}" + width-scale="${select("width-scale", ["s", "m", "l"], "m")}" type="${select("type", ["click", "hover"], "click")}" ${boolean("close-on-select-disabled", false)} ${boolean("disabled", false)} @@ -439,7 +439,7 @@ export const flipPlacements_TestOnly = (): string => html` `; export const mediumIconForLargeDropdownItem_TestOnly = (): string => html` - + Table Grid diff --git a/packages/calcite-components/src/components/dropdown/dropdown.tsx b/packages/calcite-components/src/components/dropdown/dropdown.tsx index a792548c370..259043dfd1b 100644 --- a/packages/calcite-components/src/components/dropdown/dropdown.tsx +++ b/packages/calcite-components/src/components/dropdown/dropdown.tsx @@ -170,7 +170,7 @@ export class Dropdown /** * Specifies the width of the component. */ - @Prop({ reflect: true }) width: Scale; + @Prop({ reflect: true }) widthScale: Scale; /** Specifies the size of the component. */ @Prop({ reflect: true }) scale: Scale = "m"; diff --git a/packages/calcite-components/src/components/split-button/split-button.e2e.ts b/packages/calcite-components/src/components/split-button/split-button.e2e.ts index 19a1e7415e4..7cc7ae2d998 100644 --- a/packages/calcite-components/src/components/split-button/split-button.e2e.ts +++ b/packages/calcite-components/src/components/split-button/split-button.e2e.ts @@ -194,7 +194,7 @@ describe("calcite-split-button", () => { element.setProperty("scale", elementScale); await page.waitForChanges(); const dropdownScale = elementScaleToDropdownScale[elementScale]; - expect(dropdown).toEqualAttribute("width", dropdownScale); + expect(dropdown).toEqualAttribute("width-scale", dropdownScale); expect(dropdown).toEqualAttribute("scale", dropdownScale); expect(primaryButton).toEqualAttribute("scale", elementScaleToButtonScale[elementScale]); } diff --git a/packages/calcite-components/src/components/split-button/split-button.tsx b/packages/calcite-components/src/components/split-button/split-button.tsx index 23ad18353c8..cba41764055 100644 --- a/packages/calcite-components/src/components/split-button/split-button.tsx +++ b/packages/calcite-components/src/components/split-button/split-button.tsx @@ -210,7 +210,7 @@ export class SplitButton implements InteractiveComponent, LoadableComponent { overlayPositioning={this.overlayPositioning} placement="bottom-end" scale={this.scale} - width={this.scale} + width-scale={this.scale} >
-
width S
+
widthScale S
- + Scale S List @@ -67,7 +67,7 @@
- + Scale M List @@ -78,7 +78,7 @@
- + Scale L List @@ -91,10 +91,10 @@
-
width M
+
widthScale M
- + Scale S List @@ -105,7 +105,7 @@
- + Scale M List @@ -116,7 +116,7 @@
- + Scale L List @@ -129,10 +129,10 @@
-
width L
+
widthScale L
- + Scale S List @@ -143,7 +143,7 @@
- + Scale M List @@ -154,7 +154,7 @@
- + Scale L List