Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(accordion, accordion-item): add component tokens #9861

Merged
merged 54 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
37e0eb3
chore(accordion): renaming interal accordion variables
alisonailea Jul 25, 2024
a779b3c
fix(accordion): tokens
alisonailea Jul 25, 2024
6e34762
chore(accordion-item): rename internal variables
alisonailea Jul 25, 2024
56ffb5f
feat(accordion-item): tokens
alisonailea Jul 25, 2024
ab459ac
fix(accordion-item): remove unnecessary styles
alisonailea Jul 25, 2024
7fbafbd
chore(accordion-item): remove unnecessary :host
alisonailea Jul 25, 2024
e23febc
chore(accordion-item): move :host to the top of the page
alisonailea Jul 25, 2024
c38a76b
chore(accordion-item): remove unnecessary &
alisonailea Jul 25, 2024
4472949
chore(accordion-item): sort styles
alisonailea Jul 26, 2024
c9d743b
chore(accordion-item): remove extranious SCSS
alisonailea Jul 26, 2024
49704ee
chore(accordion-item): remove unused variables
alisonailea Jul 26, 2024
5e0d7e9
chore(accordion-item): use global token for border width
alisonailea Jul 26, 2024
43df8fa
chore(accordion-item): join duplicate css selectors
alisonailea Jul 26, 2024
2f41369
fix(accordion-item): application of colors on :host state
alisonailea Jul 26, 2024
497739b
chore(accordion-item): simplify icon styling
alisonailea Jul 26, 2024
5f7f751
fix(accordion-item): rename component token
alisonailea Jul 26, 2024
3abe303
fix(accordion-item): add back missing internal variables for spacing
alisonailea Jul 26, 2024
b907a47
chore(accordion-item): rename tokens
alisonailea Jul 26, 2024
b36afec
chore(accordion): move css classes to resources
alisonailea Jul 26, 2024
d14baa7
chore(accordion): give control of background color to accordion
alisonailea Jul 26, 2024
2eb20b7
fix(accordion, accordion-item): border-color token
alisonailea Jul 26, 2024
2e40dd9
chore(package-lock): update
alisonailea Jul 26, 2024
9175f5c
Merge branch 'dev' of github.com:Esri/calcite-components into ali-act…
alisonailea Jul 26, 2024
6ef3a07
chore(components.d): update
alisonailea Jul 26, 2024
44475fa
chore(themed): helpers for e2e, storybook, and demo pages
alisonailea Jul 26, 2024
e10a097
chore(demo-theme): demo-theme helper reference shared util
alisonailea Jul 26, 2024
8752ec0
test(accordion-item): add theme e2e tests
alisonailea Jul 26, 2024
d37fe2a
test(accordion): chromatic theme tests
alisonailea Jul 26, 2024
1c1e260
test(accordion): demo page theme example
alisonailea Jul 26, 2024
c0b8dee
docs(accordion-item): add jsdocs for variables
alisonailea Jul 26, 2024
e7c0eae
docs(accordion-item): update token names
alisonailea Jul 26, 2024
ddf62ed
test(accordion): clean up theme tests
alisonailea Jul 26, 2024
43be0f2
chore(demo-theme): fix imports into demo pages
alisonailea Jul 26, 2024
1b92739
chore(accordion): update demo theme example
alisonailea Jul 26, 2024
f0c3bf1
chore(accordion, accordion-item): update token names
alisonailea Jul 30, 2024
3636315
docs(accordion-item, accordion): Specifies vs Specify
alisonailea Jul 30, 2024
3bea20d
Merge branch 'dev' of github.com:Esri/calcite-components into ali-ope…
alisonailea Jul 30, 2024
ac0efad
chore(variableValue): remove old test util
alisonailea Jul 30, 2024
2c81cc2
chore(theme): update demo values for tests
alisonailea Jul 30, 2024
4cc2f68
docs(accordion, accordion-item): grammar for token descriptions
alisonailea Jul 30, 2024
217f80f
docs(accordion): fix grammar of token descriptions
alisonailea Jul 30, 2024
43c6288
fix(accordion, accordion-item): update token names to -hover -pressed
alisonailea Jul 30, 2024
b452c8b
Merge branch 'astump/7180-accordion' of github.com:Esri/calcite-compo…
alisonailea Jul 30, 2024
d43abc5
Merge branch 'dev' of github.com:Esri/calcite-components into ali-ope…
alisonailea Jul 30, 2024
6a9e03b
docs(accordion-item): missing space token
alisonailea Jul 30, 2024
77d7f20
chore(package-lock): update
alisonailea Jul 31, 2024
de02733
Merge branch 'dev' of github.com:Esri/calcite-components into ali-ope…
alisonailea Jul 31, 2024
be87b6d
chore(accordion): rename resource to ACCORDION_ITEM_CSS
alisonailea Aug 1, 2024
eee43bf
Merge branch 'dev' of github.com:Esri/calcite-components into ali-ope…
alisonailea Aug 8, 2024
208e67d
fix(accordion-item): resolve focus conflicts with 2e29b42d13ecaec0beb…
alisonailea Aug 8, 2024
24d31aa
fix(accordion-item): put back padding styles
alisonailea Aug 12, 2024
15e18fc
Merge branch 'dev' of github.com:Esri/calcite-components into ali-ope…
alisonailea Aug 12, 2024
21c3e8c
Merge branch 'dev' into astump/7180-accordion
alisonailea Aug 13, 2024
66aaff5
Merge branch 'dev' into astump/7180-accordion
alisonailea Aug 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { newE2EPage } from "@stencil/core/testing";
import { accessible, renders, slots, hidden, focusable } from "../../tests/commonTests";
import { accessible, renders, slots, hidden, themed, focusable } from "../../tests/commonTests";
import { html } from "../../../support/formatting";
import { CSS, IDS, SLOTS } from "./resources";

Expand All @@ -24,6 +24,67 @@ describe("calcite-accordion-item", () => {
focusable("calcite-accordion-item");
});

describe("theme", () => {
describe("default", () => {
themed(
html`<calcite-accordion-item heading="Heading" description="Description" icon-start="home" icon-end="home"
>content</calcite-accordion-item
>`,
{
"--calcite-accordion-text-color": [
{
shadowSelector: `.${CSS.content}`,
targetProp: "color",
},
{
shadowSelector: `.${CSS.expandIcon}`,
targetProp: "color",
},
{
shadowSelector: `.${CSS.description}`,
targetProp: "color",
},
],
"--calcite-accordion-text-color-hover": [
{
shadowSelector: `.${CSS.heading}`,
targetProp: "color",
},
],
"--calcite-accordion-border-color": [
{
shadowSelector: `.${CSS.content}`,
targetProp: "borderBlockEndColor",
},
{
shadowSelector: `.${CSS.header}`,
targetProp: "borderBlockEndColor",
},
],
},
);
});
describe("expanded", () => {
themed(
html`<calcite-accordion-item heading="Heading" description="Description" expanded
>content</calcite-accordion-item
>`,
{
"--calcite-accordion-text-color-hover": [
{
shadowSelector: `.${CSS.description}`,
targetProp: "color",
},
],
"--calcite-accordion-text-color-pressed": {
shadowSelector: `.${CSS.heading}`,
targetProp: "color",
},
},
);
});
});

it("properly uses ARIA and roles", async () => {
// this test covers a11y relationships not reported by axe-core/accessible test helper

Expand Down
Loading
Loading