diff --git a/packages/calcite-components/src/components/modal/modal.scss b/packages/calcite-components/src/components/modal/modal.scss index 00cb5216cbf..097078288b1 100644 --- a/packages/calcite-components/src/components/modal/modal.scss +++ b/packages/calcite-components/src/components/modal/modal.scss @@ -265,14 +265,14 @@ slot[name="primary"] { * Sizes */ @mixin modal-size($size, $width) { - :host([width="#{$size}"]) .modal { + :host([width-scale="#{$size}"]) .modal { @apply max-h-full max-w-full; inline-size: var(--calcite-modal-width, $width); block-size: var(--calcite-modal-height, auto); } @media screen and (max-width: $width + 2 * $baseline) { - :host([width="#{$size}"]) { + :host([width-scale="#{$size}"]) { .modal { @apply m-0 h-full max-h-full w-full max-w-full; } @@ -281,7 +281,7 @@ slot[name="primary"] { max-block-size: unset; } } - :host([width="#{$size}"][docked]) .container { + :host([width-scale="#{$size}"][docked]) .container { align-items: flex-end; } } diff --git a/packages/calcite-components/src/components/modal/modal.stories.ts b/packages/calcite-components/src/components/modal/modal.stories.ts index 1b336372c26..5892bd26983 100644 --- a/packages/calcite-components/src/components/modal/modal.stories.ts +++ b/packages/calcite-components/src/components/modal/modal.stories.ts @@ -20,7 +20,7 @@ export const simple = (): string => html` ${boolean("open", true)} kind="${select("kind", ["brand", "danger", "info", "success", "warning"], "")}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "s")}" + width-scale="${select("width-scale", ["s", "m", "l"], "s")}" ${boolean("fullscreen", false)} ${boolean("docked", false)} ${boolean("escape-disabled", false)} @@ -52,7 +52,7 @@ export const slots = (): string => html` ${boolean("open", true)} kind="${select("kind", ["brand", "danger", "info", "success", "warning"], "")}" scale="${select("scale", ["s", "m", "l"], "m")}" - width="${select("width", ["s", "m", "l"], "s")}" + width-scale="${select("width-scale", ["s", "m", "l"], "s")}" ${boolean("fullscreen", false)} ${boolean("docked", false)} ${boolean("escape-disabled", false)} diff --git a/packages/calcite-components/src/components/modal/modal.tsx b/packages/calcite-components/src/components/modal/modal.tsx index 02b76609e28..ace7cf1348b 100644 --- a/packages/calcite-components/src/components/modal/modal.tsx +++ b/packages/calcite-components/src/components/modal/modal.tsx @@ -128,7 +128,7 @@ export class Modal @Prop({ reflect: true }) scale: Scale = "m"; /** Specifies the width of the component. */ - @Prop({ reflect: true }) width: Scale = "m"; + @Prop({ reflect: true }) widthScale: Scale = "m"; /** Sets the component to always be fullscreen (overrides `width` and `--calcite-modal-width` / `--calcite-modal-height`). */ @Prop({ reflect: true }) fullscreen: boolean; diff --git a/packages/calcite-components/src/demos/modal.html b/packages/calcite-components/src/demos/modal.html index 16fa4782b92..057faddf03d 100644 --- a/packages/calcite-components/src/demos/modal.html +++ b/packages/calcite-components/src/demos/modal.html @@ -53,12 +53,12 @@

Modal

************************************************** -->
-
Width S
+
WidthScale S
- +
- -

Small width and small scale modal

+ +

Small widthScale and small scale modal

The small modal is perfect for short confirmation dialogs or very compact interfaces with few elements. @@ -82,10 +82,10 @@

Small width and small scale modal

- +
- -

Small width and medium scale modal

+ +

Small widthScale and medium scale modal

The small modal is perfect for short confirmation dialogs or very compact interfaces with few elements. @@ -109,10 +109,10 @@

Small width and medium scale modal

- +
- -

Small width and large scale modal

+ +

Small widthScale and large scale modal

The small modal is perfect for short confirmation dialogs or very compact interfaces with few elements. @@ -143,12 +143,12 @@

Small width and large scale modal

************************************************** -->
-
Width M
+
WidthScale M
- +
- -

Medium wdith and small scale modal

+ +

Medium wdithScale and small scale modal

@@ -184,10 +184,10 @@

Medium wdith and small scale modal

- +
- -

Medium width and medium scale modal

+ +

Medium widthScale and medium scale modal

@@ -223,10 +223,10 @@

Medium width and medium scale modal

- +
- -

Medium width and large scale modal

+ +

Medium widthScale and large scale modal

@@ -269,12 +269,12 @@

Medium width and large scale modal

************************************************** -->
-
Width L
+
WidthScale L
- +
- -

Large width and small scale modal

+ +

Large widthScale and small scale modal

This modal will be fullscreen until it is as wide as the calcite-web grid's max-width. This enables you @@ -300,10 +300,10 @@

Large width and small scale modal

- +
- -

Large width and medium scale modal

+ +

Large widthScale and medium scale modal

This modal will be fullscreen until it is as wide as the calcite-web grid's max-width. This enables you @@ -329,10 +329,10 @@

Large width and medium scale modal

- +
- -

Large width and large scale modal

+ +

Large widthScale and large scale modal

This modal will be fullscreen until it is as wide as the calcite-web grid's max-width. This enables you @@ -873,7 +873,7 @@

Fullscreen modal

************************************************** -->
- +

Docked