diff --git a/packages/calcite-components/src/components/swatch/swatch.e2e.ts b/packages/calcite-components/src/components/swatch/swatch.e2e.ts
index 3d64a0754e4..861b00b627b 100644
--- a/packages/calcite-components/src/components/swatch/swatch.e2e.ts
+++ b/packages/calcite-components/src/components/swatch/swatch.e2e.ts
@@ -151,7 +151,20 @@ describe("calcite-swatch", () => {
describe("themed", () => {
describe("default", () => {
themed(html`calcite-swatch`, {
- "--calcite-swatch-corner-radius": { shadowSelector: `.${CSS.container}`, targetProp: "borderRadius" },
+ "--calcite-swatch-corner-radius": [
+ { shadowSelector: `.${CSS.container}`, targetProp: "borderRadius" },
+ { shadowSelector: `#${IDS.swatchRect}`, targetProp: "rx" },
+ ],
+ });
+ });
+ describe("solid ", () => {
+ themed(html``, {
+ "--calcite-swatch-corner-radius": [{ shadowSelector: `#${IDS.swatchSolid}`, targetProp: "rx" }],
+ });
+ });
+ describe("transparent ", () => {
+ themed(html``, {
+ "--calcite-swatch-corner-radius": [{ shadowSelector: `#${IDS.swatchTransparent}`, targetProp: "rx" }],
});
});
});
diff --git a/packages/calcite-components/src/components/swatch/swatch.scss b/packages/calcite-components/src/components/swatch/swatch.scss
index f28ab31d0b8..5c1d56b4598 100644
--- a/packages/calcite-components/src/components/swatch/swatch.scss
+++ b/packages/calcite-components/src/components/swatch/swatch.scss
@@ -126,6 +126,7 @@
stroke: var(--calcite-color-text-1);
stroke-width: var(--calcite-border-width-md);
stroke-opacity: 0.3;
+ rx: var(--calcite-swatch-corner-radius);
}
.internal-svg-disabled {
diff --git a/packages/calcite-components/src/custom-theme.stories.ts b/packages/calcite-components/src/custom-theme.stories.ts
index 6d176ce8a95..a61f2e4313d 100644
--- a/packages/calcite-components/src/custom-theme.stories.ts
+++ b/packages/calcite-components/src/custom-theme.stories.ts
@@ -100,6 +100,8 @@ import { meter, meterTokens } from "./custom-theme/meter";
import { table, tableTokens } from "./custom-theme/table";
import { carousel, carouselTokens } from "./custom-theme/carousel";
import { dialog, dialogTokens } from "./custom-theme/dialog";
+import { swatchGroup, swatchGroupTokens } from "./custom-theme/swatch-group";
+import { swatch, swatchTokens } from "./custom-theme/swatch";
const globalTokens = {
calciteColorBrand: "#007ac2",
@@ -245,6 +247,12 @@ const kitchenSink = (args: Record, useTestValues = false) =>
+
+
`;
const componentTokens = {
@@ -314,6 +322,8 @@ const componentTokens = {
...tableTokens,
...carouselTokens,
...dialogTokens,
+ ...swatchGroupTokens,
+ ...swatchTokens,
};
export default {
diff --git a/packages/calcite-components/src/custom-theme/swatch-group.ts b/packages/calcite-components/src/custom-theme/swatch-group.ts
new file mode 100644
index 00000000000..9118c073b45
--- /dev/null
+++ b/packages/calcite-components/src/custom-theme/swatch-group.ts
@@ -0,0 +1,16 @@
+import { html } from "../../support/formatting";
+
+export const swatchGroupTokens = {
+ calciteSwatchGroupSpace: "",
+};
+
+export const swatchGroup = html`
+
+
+
+
+
+
+
+
+`;
diff --git a/packages/calcite-components/src/custom-theme/swatch.ts b/packages/calcite-components/src/custom-theme/swatch.ts
new file mode 100644
index 00000000000..ffa611dcd72
--- /dev/null
+++ b/packages/calcite-components/src/custom-theme/swatch.ts
@@ -0,0 +1,7 @@
+import { html } from "../../support/formatting";
+
+export const swatchTokens = {
+ calciteSwatchCornerRadius: "",
+};
+
+export const swatch = html` `;
diff --git a/packages/calcite-components/src/demos/swatch-group.html b/packages/calcite-components/src/demos/swatch-group.html
index 1d3e382206f..fdda27101f0 100644
--- a/packages/calcite-components/src/demos/swatch-group.html
+++ b/packages/calcite-components/src/demos/swatch-group.html
@@ -276,7 +276,32 @@ Swatch group selection mode examples
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+