-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat(button): adds pending button, fixes #3162 * chore(button): import sp-progress-circle whenever required * chore: updated golden image hash * chore(button): updated aria-label on changing pending state * chore(button): removed redudant styles and functions * chore(button): added tshirt sizing to the progress-circle * chore(button): removed isPending state * chore(button): update aria-label on pending toggle * chore: updated golden image hash * chore(button): removed ispending and timeout * chore(button): updated css animation names * chore(button): update aria-label on removing pending * chore(button): added docs for pending state * chore: updated golden image hash * chore(button): update arialabel on disabled change in pending state * chore: updated golden image hash * fix(button): updated aria-label management in button * fix(button): fixed aria-label management and added more tests * fix(button): revert back the aria-label management logic in ButtonBase * chore: updated golden image hash * fix(button): shifted aria-label management to updated in button * chore: udpated golden image hash * chore: updated golden image hash * chore(button): improved code readability --------- Co-authored-by: TarunAdobe <ttomar@adobe.com>
- Loading branch information
1 parent
a6253c8
commit 71254ec
Showing
23 changed files
with
949 additions
and
12 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
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
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
50 changes: 50 additions & 0 deletions
50
packages/button/stories/button-accent-fill-pending.stories.ts
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 2020 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 { TemplateResult } from '@spectrum-web-components/base'; | ||
import { Properties, renderButtonSet } from './index.js'; | ||
import { args, argTypes } from './index.js'; | ||
|
||
const variant = 'accent'; | ||
const treatment = 'fill'; | ||
const pending = true; | ||
|
||
export default { | ||
component: 'sp-button', | ||
title: 'Button/Accent/Fill/Pending', | ||
args: { | ||
...args, | ||
variant, | ||
treatment, | ||
pending, | ||
}, | ||
argTypes, | ||
}; | ||
|
||
export const s = (args: Properties): TemplateResult => renderButtonSet(args); | ||
s.args = { | ||
size: 's', | ||
}; | ||
|
||
export const m = (args: Properties): TemplateResult => renderButtonSet(args); | ||
m.args = { | ||
size: 'm', | ||
}; | ||
|
||
export const l = (args: Properties): TemplateResult => renderButtonSet(args); | ||
l.args = { | ||
size: 'l', | ||
}; | ||
|
||
export const XL = (args: Properties): TemplateResult => renderButtonSet(args); | ||
XL.args = { | ||
size: 'xl', | ||
}; |
50 changes: 50 additions & 0 deletions
50
packages/button/stories/button-accent-outline-pending.stories.ts
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 2020 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 { TemplateResult } from '@spectrum-web-components/base'; | ||
import { Properties, renderButtonSet } from './index.js'; | ||
import { args, argTypes } from './index.js'; | ||
|
||
const variant = 'accent'; | ||
const treatment = 'outline'; | ||
const pending = true; | ||
|
||
export default { | ||
component: 'sp-button', | ||
title: 'Button/Accent/Outline/Pending', | ||
args: { | ||
...args, | ||
variant, | ||
treatment, | ||
pending, | ||
}, | ||
argTypes, | ||
}; | ||
|
||
export const s = (args: Properties): TemplateResult => renderButtonSet(args); | ||
s.args = { | ||
size: 's', | ||
}; | ||
|
||
export const m = (args: Properties): TemplateResult => renderButtonSet(args); | ||
m.args = { | ||
size: 'm', | ||
}; | ||
|
||
export const l = (args: Properties): TemplateResult => renderButtonSet(args); | ||
l.args = { | ||
size: 'l', | ||
}; | ||
|
||
export const XL = (args: Properties): TemplateResult => renderButtonSet(args); | ||
XL.args = { | ||
size: 'xl', | ||
}; |
Oops, something went wrong.