-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: place demos at the top of each docs page (#3957)
* docs: move to 11ty beta for ESM support * docs: place demos at the top of each docs page
- Loading branch information
Westbrook Johnson
authored
Feb 6, 2024
1 parent
a55342f
commit c78de32
Showing
29 changed files
with
1,046 additions
and
428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
Copyright 2024 Adobe. All rights reserved. | ||
This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. You may obtain a copy | ||
of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under | ||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
OF ANY KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. | ||
*/ | ||
|
||
export const argTypes = { | ||
open: { | ||
name: 'open', | ||
type: { name: 'boolean', required: false }, | ||
description: 'Whether the second accordion item is open.', | ||
table: { | ||
type: { summary: 'boolean' }, | ||
defaultValue: { summary: false }, | ||
}, | ||
control: { | ||
type: 'boolean', | ||
}, | ||
}, | ||
allowMultiple: { | ||
name: 'allowMultiple', | ||
type: { name: 'boolean', required: false }, | ||
description: | ||
'Whether multipel Accordion Items can be open at the same time.', | ||
table: { | ||
type: { summary: 'boolean' }, | ||
defaultValue: { summary: false }, | ||
}, | ||
control: { | ||
type: 'boolean', | ||
}, | ||
}, | ||
density: { | ||
name: 'density', | ||
type: { name: 'string', required: false }, | ||
description: 'The density at which to display accordion items.', | ||
table: { | ||
defaultValue: { summary: 'default' }, | ||
}, | ||
control: { | ||
labels: { | ||
compact: 'Compact', | ||
spacious: 'Spacious', | ||
default: 'Default', | ||
}, | ||
type: 'select', | ||
}, | ||
}, | ||
size: { | ||
name: 'size', | ||
type: { name: 'string', required: false }, | ||
description: 'The size at which to display accordion items.', | ||
table: { | ||
defaultValue: { summary: 'm' }, | ||
}, | ||
control: { | ||
labels: { | ||
s: 'Small', | ||
m: 'Medium', | ||
l: 'Large', | ||
xl: 'Extra large', | ||
}, | ||
type: 'select', | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
Copyright 2024 Adobe. All rights reserved. | ||
This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. You may obtain a copy | ||
of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under | ||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
OF ANY KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. | ||
*/ | ||
|
||
import { AccordionMarkup } from './'; | ||
|
||
export const Template = AccordionMarkup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
Copyright 2024 Adobe. All rights reserved. | ||
This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. You may obtain a copy | ||
of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under | ||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
OF ANY KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. | ||
*/ | ||
|
||
export const argTypes = { | ||
open: { | ||
name: 'open', | ||
type: { name: 'boolean', required: false }, | ||
description: 'Whether the Action Bar is open and visible.', | ||
table: { | ||
type: { summary: 'boolean' }, | ||
defaultValue: { summary: true }, | ||
}, | ||
control: { | ||
type: 'boolean', | ||
}, | ||
}, | ||
emphasized: { | ||
name: 'emphasized', | ||
type: { name: 'boolean', required: false }, | ||
description: 'Whether the Action Bar is emphasized for the viewer.', | ||
table: { | ||
type: { summary: 'boolean' }, | ||
defaultValue: { summary: false }, | ||
}, | ||
control: { | ||
type: 'boolean', | ||
}, | ||
}, | ||
tools: { | ||
name: 'tools', | ||
type: { name: 'boolean', required: false }, | ||
description: 'Whether to display tools in the action bar.', | ||
table: { | ||
type: { summary: 'boolean' }, | ||
defaultValue: { summary: true }, | ||
}, | ||
control: { | ||
type: 'boolean', | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
Copyright 2024 Adobe. All rights reserved. | ||
This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. You may obtain a copy | ||
of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under | ||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
OF ANY KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. | ||
*/ | ||
|
||
import { html, TemplateResult } from '@spectrum-web-components/base'; | ||
|
||
import '@spectrum-web-components/action-bar/sp-action-bar.js'; | ||
import '@spectrum-web-components/action-button/sp-action-button.js'; | ||
import '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js'; | ||
import '@spectrum-web-components/icons-workflow/icons/sp-icon-more.js'; | ||
|
||
export interface Properties { | ||
emphasized?: boolean; | ||
open?: boolean; | ||
tools?: boolean; | ||
} | ||
|
||
export const Template = ({ | ||
emphasized, | ||
open, | ||
tools = true, | ||
}: Properties): TemplateResult => { | ||
return html` | ||
<sp-action-bar ?open=${open} ?emphasized=${emphasized}> | ||
2 selected | ||
${tools | ||
? html` | ||
<sp-action-button slot="buttons" label="Edit"> | ||
<sp-icon-edit slot="icon"></sp-icon-edit> | ||
</sp-action-button> | ||
<sp-action-button slot="buttons" label="More"> | ||
<sp-icon-more slot="icon"></sp-icon-more> | ||
</sp-action-button> | ||
` | ||
: html``} | ||
</sp-action-bar> | ||
`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
Copyright 2024 Adobe. All rights reserved. | ||
This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. You may obtain a copy | ||
of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under | ||
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
OF ANY KIND, either express or implied. See the License for the specific language | ||
governing permissions and limitations under the License. | ||
*/ | ||
|
||
import { html, TemplateResult } from '@spectrum-web-components/base'; | ||
import { ifDefined } from '@spectrum-web-components/base/src/directives.js'; | ||
import { | ||
ButtonTreatments, | ||
ButtonVariants, | ||
} from '@spectrum-web-components/button/src/Button.js'; | ||
|
||
export interface Properties { | ||
variant?: ButtonVariants; | ||
treatment?: ButtonTreatments; | ||
quiet?: boolean; | ||
pending?: boolean; | ||
content?: TemplateResult; | ||
disabled?: boolean; | ||
size?: 's' | 'm' | 'l' | 'xl'; | ||
href?: string; | ||
target?: '_blank' | '_parent' | '_self' | '_top'; | ||
warning?: boolean; | ||
iconOnly?: boolean; | ||
} | ||
|
||
export const Template = ({ | ||
disabled, | ||
pending, | ||
size, | ||
treatment, | ||
variant, | ||
}: Properties): TemplateResult => html` | ||
<sp-button | ||
?disabled=${disabled} | ||
?pending=${pending} | ||
size=${ifDefined(size)} | ||
treatment=${ifDefined(treatment)} | ||
variant=${ifDefined(variant)} | ||
> | ||
Test Button | ||
</sp-button> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.