diff --git a/docs/cypress.json b/docs/cypress.json
index f2f24765..66d2b558 100644
--- a/docs/cypress.json
+++ b/docs/cypress.json
@@ -1,5 +1,5 @@
{
"baseUrl": "http://localhost:3000",
"video": false,
- "defaultCommandTimeout": 1000
+ "defaultCommandTimeout": 20
}
diff --git a/docs/cypress/integration/Button.js b/docs/cypress/integration/Button.js
index 9eda6102..52372707 100644
--- a/docs/cypress/integration/Button.js
+++ b/docs/cypress/integration/Button.js
@@ -8,4 +8,22 @@ describe("Button", () => {
expect($.length).to.eql(4);
});
});
+
+ it.only("clicks", () => {
+ cy.get('[data-test="button-primary"]')
+ .as("btn")
+ .contains("Primary button");
+
+ cy.get("@btn").trigger("click");
+ cy.get("@log").should("be.calledWith", "click");
+
+ cy.get("@btn").trigger("mouseover");
+ cy.get("@log").should("be.calledWith", "mouseover");
+
+ cy.get("@btn").trigger("mouseenter");
+ cy.get("@log").should("be.calledWith", "mouseenter");
+
+ cy.get("@btn").trigger("mouseleave");
+ cy.get("@log").should("be.calledWith", "mouseleave");
+ });
});
diff --git a/docs/cypress/support/commands.js b/docs/cypress/support/commands.js
index 5003b2cf..163629b8 100644
--- a/docs/cypress/support/commands.js
+++ b/docs/cypress/support/commands.js
@@ -1,3 +1,7 @@
Cypress.Commands.add("examples", (component) => {
- cy.visit(`/examples/${component}`);
+ cy.visit(`/examples/${component}`, {
+ onBeforeLoad(win) {
+ cy.stub(win.console, "log").as("log");
+ },
+ });
});
diff --git a/docs/src/routes/_layout.svelte b/docs/src/routes/_layout.svelte
index a8c7cb46..966b9f39 100644
--- a/docs/src/routes/_layout.svelte
+++ b/docs/src/routes/_layout.svelte
@@ -1,14 +1,67 @@
+
+
{#if segment !== 'examples'}
-
+
+
+
+
+
+ Home
+
+ {#if segment}
+
+ {urlIds[segment]}
+
+ {/if}
+ {#if segment && $tail}
+
+ {$tail.title}
+
+ {/if}
+
+
+
+
+
{:else}
diff --git a/docs/src/routes/components/[slug].svelte b/docs/src/routes/components/[slug].svelte
index f6f0076a..3bfb7173 100644
--- a/docs/src/routes/components/[slug].svelte
+++ b/docs/src/routes/components/[slug].svelte
@@ -14,25 +14,53 @@
+
+
{data.title}
{data.title}
-
-{#if component}
-
-{/if}
+
+ {#if component}
+
+ {/if}
+
diff --git a/docs/src/routes/components/index.svelte b/docs/src/routes/components/index.svelte
index 348c85ae..5a048cda 100644
--- a/docs/src/routes/components/index.svelte
+++ b/docs/src/routes/components/index.svelte
@@ -1,23 +1,48 @@
+
+
Components
Components
-
{#each data as data, i (data.title)}
diff --git a/docs/src/routes/examples/Button.svelte b/docs/src/routes/examples/Button.svelte
index b485cc4e..929f60a2 100644
--- a/docs/src/routes/examples/Button.svelte
+++ b/docs/src/routes/examples/Button.svelte
@@ -1,8 +1,41 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/src/routes/examples/_layout.svelte b/docs/src/routes/examples/_layout.svelte
deleted file mode 100644
index 4fa864ce..00000000
--- a/docs/src/routes/examples/_layout.svelte
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/docs/yarn.lock b/docs/yarn.lock
index ded42162..1e8da793 100644
--- a/docs/yarn.lock
+++ b/docs/yarn.lock
@@ -633,15 +633,15 @@ camel-case@^3.0.0:
upper-case "^1.1.1"
carbon-components-svelte@../:
- version "0.7.6"
+ version "0.8.5"
dependencies:
- carbon-icons-svelte "^10.13.0"
+ carbon-icons-svelte "^10.14.0"
flatpickr "4.6.3"
-carbon-icons-svelte@^10.13.0:
- version "10.13.0"
- resolved "https://registry.npmjs.org/carbon-icons-svelte/-/carbon-icons-svelte-10.13.0.tgz#fbb3d863901bee94418e8caf2959777655edfa78"
- integrity sha512-WXEr+cE1IXtYQspp3cwE2l2qlYUeHWd46wyqYM2PJ3Qw5n4tPD7OCs+MZa6hmOaziv/fns+uYMeeisGvJp5Slg==
+carbon-icons-svelte@^10.14.0:
+ version "10.14.0"
+ resolved "https://registry.npmjs.org/carbon-icons-svelte/-/carbon-icons-svelte-10.14.0.tgz#a26984db41bb3b04afcabfdbcf481d0387c4763b"
+ integrity sha512-Ucfy6A0GtvCxBPNCuUaFj7QsxV6hN/R8E8L/RMoytdrkZFD+tkl5pUVOHypcmYYZF7Dumnxr6ePr2bvwyTs5lg==
caseless@~0.12.0:
version "0.12.0"