Skip to content

Commit

Permalink
feat(preview): accordion web components
Browse files Browse the repository at this point in the history
  • Loading branch information
castastrophe committed Aug 7, 2024
1 parent 055e5ad commit 7f35f31
Show file tree
Hide file tree
Showing 67 changed files with 1,435 additions and 507 deletions.
1 change: 0 additions & 1 deletion .storybook/types/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ import argTypes from "./args.js";
import globalTypes from "./global.js";

export * from "./states.js";
export * from "./variants.js";
export { argTypes, globalTypes };
22 changes: 1 addition & 21 deletions .storybook/types/states.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,6 @@ export const isLoading = {
control: "boolean",
};

export const isIndeterminate = {
name: "Indeterminate",
type: { name: "boolean" },
table: {
type: { summary: "boolean" },
category: "State",
},
control: "boolean",
};

export const isDisabled = {
name: "Disabled",
type: { name: "boolean" },
Expand Down Expand Up @@ -134,7 +124,7 @@ export const isReadOnly = {
type: { name: "boolean" },
table: {
type: { summary: "boolean" },
category: "State",
category: "Advanced",
},
control: "boolean",
};
Expand All @@ -148,13 +138,3 @@ export const isChecked = {
},
control: { type: "boolean" },
};

export const isPending = {
name: "Pending",
type: { name: "boolean" },
table: {
type: { summary: "boolean" },
category: "State",
},
control: "boolean",
};
69 changes: 0 additions & 69 deletions .storybook/types/variants.js

This file was deleted.

26 changes: 26 additions & 0 deletions components/accordion/stories/Accordion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { LitElement, css, unsafeCSS } from "lit";
import styles from "../index.css?inline";
import { Template } from "./template";

export class Accordion extends LitElement {
static get styles() {
return css`${unsafeCSS(styles)}`;
}

static get properties() {
return {
args: { type: Object },
};
}

constructor() {
super();
this.args = {};
}

render() {
return Template(this.args);
}
}

customElements.define("spectrum-accordion", Accordion);
26 changes: 26 additions & 0 deletions components/accordion/stories/AccordionItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { LitElement, css, unsafeCSS } from "lit";
import styles from "../index.css?inline";
import { ItemTemplate } from "./template.js";

export class AccordionItem extends LitElement {
static get styles() {
return css`${unsafeCSS(styles)}`;
}

static get properties() {
return {
args: { type: Object },
};
}

constructor() {
super();
this.args = {};
}

render() {
return ItemTemplate(this.args);
}
}

customElements.define("spectrum-accordion-item", AccordionItem);
Loading

0 comments on commit 7f35f31

Please sign in to comment.