@uva-glass/component-library 3.0.6 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/variables.css +21 -21
- package/dist/components/Accordion/Accordion.test.d.ts +0 -0
- package/dist/components/Accordion/Accordion.test.js +29 -0
- package/dist/components/Accordion/Accordion.test.js.map +1 -0
- package/dist/components/AccordionCard/AccordionCard.test.d.ts +0 -0
- package/dist/components/AccordionCard/AccordionCard.test.js +33 -0
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -0
- package/dist/components/Label/Label.test.js +19 -4254
- package/dist/components/Label/Label.test.js.map +1 -1
- package/dist/{index-BqHyOZsF.js → index-DuZiPGs-.js} +1 -2
- package/dist/{index-BqHyOZsF.js.map → index-DuZiPGs-.js.map} +1 -1
- package/dist/index-sIsmp53X.js +2962 -0
- package/dist/index-sIsmp53X.js.map +1 -0
- package/dist/react.esm-f8cBAyS5.js +4271 -0
- package/dist/react.esm-f8cBAyS5.js.map +1 -0
- package/dist/setupTests.js +7 -1555
- package/dist/setupTests.js.map +1 -1
- package/package.json +16 -15
|
@@ -24,34 +24,34 @@
|
|
|
24
24
|
--color-blue-400: #a3e7ff;
|
|
25
25
|
--color-blue-50: #e0f7ff;
|
|
26
26
|
--color-purple-400: #9747ff;
|
|
27
|
+
--color-black-transparent: rgba(0 0 0 / 50%);
|
|
28
|
+
--color-cobalt: #0d4da5;
|
|
29
|
+
--color-san-felix: #2c632e;
|
|
30
|
+
--color-uva-green: #49a74c;
|
|
31
|
+
--color-scarpa-flow: #69656c;
|
|
27
32
|
--color-uva-red-dark: #9e002a;
|
|
28
33
|
--color-uva-red: #bd0032;
|
|
29
|
-
--color-
|
|
34
|
+
--color-silver: #bfbfbf;
|
|
30
35
|
--color-chilean-fire: #d45c3a;
|
|
31
|
-
--color-
|
|
32
|
-
--color-
|
|
36
|
+
--color-pattens-blue: #dddedf;
|
|
37
|
+
--color-amaranth: #dc3251;
|
|
38
|
+
--color-ghost-white: #f4f4f5;
|
|
39
|
+
--color-lavender: #ebebec;
|
|
40
|
+
--color-mint-cream: #eafbf2;
|
|
33
41
|
--color-amour: #ffe5ec;
|
|
34
|
-
--color-cobalt: #0d4da5;
|
|
35
42
|
--color-dandelion: #ffde66;
|
|
36
43
|
--color-natural-wood: #fff6d6;
|
|
37
|
-
--color-
|
|
38
|
-
--color-
|
|
39
|
-
--color-
|
|
40
|
-
--color-uva-green: #49a74c;
|
|
41
|
-
--color-medium-aquamarine: #62df9f;
|
|
42
|
-
--color-vista-blue: #8feabb;
|
|
43
|
-
--color-mint-cream: #eafbf2;
|
|
44
|
-
--color-black-transparent: rgba(0 0 0 / 50%);
|
|
45
|
-
--color-scarpa-flow: #69656c;
|
|
44
|
+
--color-uva-black: #1F1D20;
|
|
45
|
+
--color-uva-red-transparent: rgba(189 0 50 / 10%);
|
|
46
|
+
--color-electric-violet: #9747FF;
|
|
46
47
|
--color-lemon-grass: #99998a;
|
|
47
|
-
--color-
|
|
48
|
-
--color-
|
|
48
|
+
--color-vista-blue: #8feabb;
|
|
49
|
+
--color-medium-aquamarine: #62df9f;
|
|
50
|
+
--color-uva-orange: #cc8500;
|
|
49
51
|
--color-fog: #cfcdd0;
|
|
50
|
-
--color-
|
|
51
|
-
--color-
|
|
52
|
+
--color-french-grey: #b3afb6;
|
|
53
|
+
--color-columbia-blue: #a1e7fc;
|
|
54
|
+
--color-light-cyan: #e1f8ff;
|
|
52
55
|
--color-lavender-transparent: rgba(235 235 236 / 50%);
|
|
53
|
-
--color-
|
|
54
|
-
--color-electric-violet: #9747ff;
|
|
55
|
-
--color-natural-wool: #fff6d6;
|
|
56
|
-
--color-uva-black: #1f1d20;
|
|
56
|
+
--color-natural-wool: #FFF6D6;
|
|
57
57
|
}
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-DuZiPGs-.js";
|
|
3
|
+
import { r as n, s as a } from "../../react.esm-f8cBAyS5.js";
|
|
4
|
+
import { u as e } from "../../index-sIsmp53X.js";
|
|
5
|
+
import { Accordion as i } from "./Accordion.js";
|
|
6
|
+
describe("Accordion", () => {
|
|
7
|
+
it("should render", () => {
|
|
8
|
+
n(/* @__PURE__ */ o(i, { title: "Test Accordion", content: "Test Content" }));
|
|
9
|
+
const t = a.getByText("Test Accordion");
|
|
10
|
+
expect(t).toBeInTheDocument(), expect(t).toHaveAttribute("aria-expanded", "false");
|
|
11
|
+
}), it("should display content when expanded by default", () => {
|
|
12
|
+
n(/* @__PURE__ */ o(i, { title: "Test Accordion", content: "Test Content", expanded: !0 }));
|
|
13
|
+
const t = a.getByText("Test Accordion");
|
|
14
|
+
expect(t).toBeInTheDocument(), expect(t).toHaveAttribute("aria-expanded", "true");
|
|
15
|
+
}), it("should toggle content visibility on click", async () => {
|
|
16
|
+
n(/* @__PURE__ */ o(i, { title: "Test Accordion", content: "Test Content" }));
|
|
17
|
+
const t = a.getByText("Test Accordion");
|
|
18
|
+
await e.click(t), expect(t).toHaveAttribute("aria-expanded", "true"), await e.click(t), expect(t).toHaveAttribute("aria-expanded", "false");
|
|
19
|
+
}), it("should toggle content visibility on Enter key press", async () => {
|
|
20
|
+
n(/* @__PURE__ */ o(i, { title: "Test Accordion", content: "Test Content" }));
|
|
21
|
+
const t = a.getByText("Test Accordion");
|
|
22
|
+
await e.keyboard("[Tab]"), await e.keyboard("[Enter]"), expect(t).toHaveAttribute("aria-expanded", "true"), await e.keyboard("[Enter]"), expect(t).toHaveAttribute("aria-expanded", "false");
|
|
23
|
+
}), it("should toggle content visibility on Space key press", async () => {
|
|
24
|
+
n(/* @__PURE__ */ o(i, { title: "Test Accordion", content: "Test Content" }));
|
|
25
|
+
const t = a.getByText("Test Accordion");
|
|
26
|
+
await e.keyboard("[Tab]"), await e.keyboard("[Space]"), expect(t).toHaveAttribute("aria-expanded", "true"), await e.keyboard("[Space]"), expect(t).toHaveAttribute("aria-expanded", "false");
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=Accordion.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.test.js","sources":["../../../src/components/Accordion/Accordion.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\r\nimport { render, screen } from '@testing-library/react';\r\nimport userEvent from '@testing-library/user-event';\r\n\r\nimport { Accordion } from './Accordion';\r\n\r\ndescribe('Accordion', () => {\r\n it('should render', () => {\r\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\r\n const titleElement = screen.getByText('Test Accordion');\r\n expect(titleElement).toBeInTheDocument();\r\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\r\n });\r\n\r\n it('should display content when expanded by default', () => {\r\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" expanded />);\r\n const titleElement = screen.getByText('Test Accordion');\r\n expect(titleElement).toBeInTheDocument();\r\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\r\n });\r\n\r\n it('should toggle content visibility on click', async () => {\r\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\r\n const titleElement = screen.getByText('Test Accordion');\r\n await userEvent.click(titleElement);\r\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\r\n await userEvent.click(titleElement);\r\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\r\n });\r\n\r\n it('should toggle content visibility on Enter key press', async () => {\r\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\r\n const titleElement = screen.getByText('Test Accordion');\r\n await userEvent.keyboard('[Tab]');\r\n await userEvent.keyboard('[Enter]');\r\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\r\n await userEvent.keyboard('[Enter]');\r\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\r\n });\r\n\r\n it('should toggle content visibility on Space key press', async () => {\r\n render(<Accordion title=\"Test Accordion\" content=\"Test Content\" />);\r\n const titleElement = screen.getByText('Test Accordion');\r\n await userEvent.keyboard('[Tab]');\r\n await userEvent.keyboard('[Space]');\r\n expect(titleElement).toHaveAttribute('aria-expanded', 'true');\r\n await userEvent.keyboard('[Space]');\r\n expect(titleElement).toHaveAttribute('aria-expanded', 'false');\r\n });\r\n});\r\n"],"names":["render","Accordion","titleElement","screen","jsx","userEvent"],"mappings":";;;;;AAMA,SAAS,aAAa,MAAM;AAC1B,KAAG,iBAAiB,MAAM;AACxB,IAAAA,oBAAQC,GAAU,EAAA,OAAM,kBAAiB,SAAQ,gBAAe,CAAE;AAC5D,UAAAC,IAAeC,EAAO,UAAU,gBAAgB;AAC/C,WAAAD,CAAY,EAAE,kBAAkB,GACvC,OAAOA,CAAY,EAAE,gBAAgB,iBAAiB,OAAO;AAAA,EAAA,CAC9D,GAED,GAAG,mDAAmD,MAAM;AACnD,IAAAF,EAAA,gBAAAI,EAACH,KAAU,OAAM,kBAAiB,SAAQ,gBAAe,UAAQ,IAAC,CAAE;AACrE,UAAAC,IAAeC,EAAO,UAAU,gBAAgB;AAC/C,WAAAD,CAAY,EAAE,kBAAkB,GACvC,OAAOA,CAAY,EAAE,gBAAgB,iBAAiB,MAAM;AAAA,EAAA,CAC7D,GAED,GAAG,6CAA6C,YAAY;AAC1D,IAAAF,oBAAQC,GAAU,EAAA,OAAM,kBAAiB,SAAQ,gBAAe,CAAE;AAC5D,UAAAC,IAAeC,EAAO,UAAU,gBAAgB;AAChD,UAAAE,EAAU,MAAMH,CAAY,GAClC,OAAOA,CAAY,EAAE,gBAAgB,iBAAiB,MAAM,GACtD,MAAAG,EAAU,MAAMH,CAAY,GAClC,OAAOA,CAAY,EAAE,gBAAgB,iBAAiB,OAAO;AAAA,EAAA,CAC9D,GAED,GAAG,uDAAuD,YAAY;AACpE,IAAAF,oBAAQC,GAAU,EAAA,OAAM,kBAAiB,SAAQ,gBAAe,CAAE;AAC5D,UAAAC,IAAeC,EAAO,UAAU,gBAAgB;AAChD,UAAAE,EAAU,SAAS,OAAO,GAC1B,MAAAA,EAAU,SAAS,SAAS,GAClC,OAAOH,CAAY,EAAE,gBAAgB,iBAAiB,MAAM,GACtD,MAAAG,EAAU,SAAS,SAAS,GAClC,OAAOH,CAAY,EAAE,gBAAgB,iBAAiB,OAAO;AAAA,EAAA,CAC9D,GAED,GAAG,uDAAuD,YAAY;AACpE,IAAAF,oBAAQC,GAAU,EAAA,OAAM,kBAAiB,SAAQ,gBAAe,CAAE;AAC5D,UAAAC,IAAeC,EAAO,UAAU,gBAAgB;AAChD,UAAAE,EAAU,SAAS,OAAO,GAC1B,MAAAA,EAAU,SAAS,SAAS,GAClC,OAAOH,CAAY,EAAE,gBAAgB,iBAAiB,MAAM,GACtD,MAAAG,EAAU,SAAS,SAAS,GAClC,OAAOH,CAAY,EAAE,gBAAgB,iBAAiB,OAAO;AAAA,EAAA,CAC9D;AACH,CAAC;"}
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-DuZiPGs-.js";
|
|
3
|
+
import { r as c, s as e, f as s, w as d } from "../../react.esm-f8cBAyS5.js";
|
|
4
|
+
import { u as r } from "../../index-sIsmp53X.js";
|
|
5
|
+
import { AccordionCard as a } from "./AccordionCard.js";
|
|
6
|
+
describe("AccordionCard", () => {
|
|
7
|
+
it("should render", () => {
|
|
8
|
+
c(/* @__PURE__ */ n(a, { title: "Test Accordion Card", content: "TestComponent", expanded: !0 })), expect(e.getByText("Test Accordion Card")).toBeInTheDocument(), expect(e.getByText("TestComponent")).toBeInTheDocument();
|
|
9
|
+
}), it("should display content when expanded by default", () => {
|
|
10
|
+
c(/* @__PURE__ */ n(a, { title: "Test Accordion Card", content: "TestComponent", expanded: !0 })), expect(e.getByText("Test Accordion Card")).toBeInTheDocument(), expect(e.getByText("TestComponent")).toHaveClass("accordion-card__content--expanded");
|
|
11
|
+
}), it("should toggle content visibility on click", () => {
|
|
12
|
+
c(/* @__PURE__ */ n(a, { title: "Test Accordion Card", content: "TestComponent" }));
|
|
13
|
+
const o = e.getByText("Test Accordion Card"), t = e.getByText("TestComponent");
|
|
14
|
+
expect(o).toBeInTheDocument(), s.click(o), expect(t).toHaveClass("accordion-card__content--expanded"), s.click(o), expect(t).not.toHaveClass("accordion-card__content--expanded");
|
|
15
|
+
}), it("should toggle content visibility on Enter key press", async () => {
|
|
16
|
+
c(/* @__PURE__ */ n(a, { title: "Test Accordion Card", content: "TestComponent" }));
|
|
17
|
+
const o = e.getByRole("button"), t = e.getByText("TestComponent");
|
|
18
|
+
o.focus(), await r.keyboard("[Enter]"), await d(() => {
|
|
19
|
+
expect(t).toHaveClass("accordion-card__content--expanded");
|
|
20
|
+
}), await r.keyboard("[Enter]"), await d(() => {
|
|
21
|
+
expect(t).not.toHaveClass("accordion-card__content--expanded");
|
|
22
|
+
});
|
|
23
|
+
}), it("should toggle content visibility on Space key press", async () => {
|
|
24
|
+
c(/* @__PURE__ */ n(a, { title: "Test Accordion Card", content: "TestComponent" }));
|
|
25
|
+
const o = e.getByRole("button"), t = e.getByText("TestComponent");
|
|
26
|
+
o.focus(), await r.keyboard("[Space]"), await d(() => {
|
|
27
|
+
expect(t).toHaveClass("accordion-card__content--expanded");
|
|
28
|
+
}), await r.keyboard("[Space]"), await d(() => {
|
|
29
|
+
expect(t).not.toHaveClass("accordion-card__content--expanded");
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=AccordionCard.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionCard.test.js","sources":["../../../src/components/AccordionCard/AccordionCard.test.tsx"],"sourcesContent":["import '@testing-library/jest-dom';\r\nimport { fireEvent, render, screen, waitFor } from '@testing-library/react';\r\nimport userEvent from '@testing-library/user-event';\r\n\r\nimport { AccordionCard } from './AccordionCard';\r\n\r\ndescribe('AccordionCard', () => {\r\n it('should render', () => {\r\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} expanded />);\r\n expect(screen.getByText('Test Accordion Card')).toBeInTheDocument();\r\n expect(screen.getByText('TestComponent')).toBeInTheDocument();\r\n });\r\n\r\n it('should display content when expanded by default', () => {\r\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} expanded />);\r\n expect(screen.getByText('Test Accordion Card')).toBeInTheDocument();\r\n expect(screen.getByText('TestComponent')).toHaveClass('accordion-card__content--expanded');\r\n });\r\n\r\n it('should toggle content visibility on click', () => {\r\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\r\n const titleElement = screen.getByText('Test Accordion Card');\r\n const contentElement = screen.getByText('TestComponent');\r\n expect(titleElement).toBeInTheDocument();\r\n fireEvent.click(titleElement);\r\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\r\n fireEvent.click(titleElement);\r\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\r\n });\r\n\r\n it('should toggle content visibility on Enter key press', async () => {\r\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\r\n const titleElement = screen.getByRole('button');\r\n const contentElement = screen.getByText('TestComponent');\r\n titleElement.focus();\r\n await userEvent.keyboard('[Enter]');\r\n await waitFor(() => {\r\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\r\n });\r\n await userEvent.keyboard('[Enter]');\r\n await waitFor(() => {\r\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\r\n });\r\n });\r\n\r\n it('should toggle content visibility on Space key press', async () => {\r\n render(<AccordionCard title=\"Test Accordion Card\" content={'TestComponent'} />);\r\n const titleElement = screen.getByRole('button');\r\n const contentElement = screen.getByText('TestComponent');\r\n titleElement.focus();\r\n await userEvent.keyboard('[Space]');\r\n await waitFor(() => {\r\n expect(contentElement).toHaveClass('accordion-card__content--expanded');\r\n });\r\n await userEvent.keyboard('[Space]');\r\n await waitFor(() => {\r\n expect(contentElement).not.toHaveClass('accordion-card__content--expanded');\r\n });\r\n });\r\n});\r\n"],"names":["render","jsx","AccordionCard","screen","titleElement","contentEl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