mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
rename part
This commit is contained in:
@@ -15,10 +15,12 @@ During the alpha period, things might break! We take breaking changes very serio
|
||||
## Next
|
||||
|
||||
- Added `checked` and `disabled` custom states to `<wa-checkbox>` and `<wa-radio>`
|
||||
scroll-button-end
|
||||
- Removed stateful CSS parts in favor of custom states
|
||||
- `<wa-checkbox>`: `control--checked`, `control--indeterminate`
|
||||
- `<wa-radio>`: `control--checked`
|
||||
- `<wa-tree-item>`: `item--disabled`, `item--expanded`, `item--indeterminate`, `item--selected`
|
||||
- Renamed the `scroll-button--start` and `scroll-button--end` parts to `scroll-button-start` and `scroll-button-end` in `<wa-tab-group>`
|
||||
|
||||
## 3.0.0-alpha.5
|
||||
|
||||
|
||||
@@ -40,20 +40,20 @@
|
||||
width: var(--wa-space-xl);
|
||||
}
|
||||
|
||||
.tab-group__scroll-button--start {
|
||||
.tab-group__scroll-button-start {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.tab-group__scroll-button--end {
|
||||
.tab-group__scroll-button-end {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.tab-group--rtl .tab-group__scroll-button--start {
|
||||
.tab-group--rtl .tab-group__scroll-button-start {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.tab-group--rtl .tab-group__scroll-button--end {
|
||||
.tab-group--rtl .tab-group__scroll-button-end {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ describe('<wa-tab-group>', () => {
|
||||
expect(isElementVisibleFromOverflow(tabGroup, firstTab!)).to.be.true;
|
||||
expect(isElementVisibleFromOverflow(tabGroup, lastTab!)).to.be.false;
|
||||
|
||||
const scrollToRightButton = tabGroup.shadowRoot?.querySelector('wa-icon-button[part*="scroll-button--end"]');
|
||||
const scrollToRightButton = tabGroup.shadowRoot?.querySelector('wa-icon-button[part*="scroll-button-end"]');
|
||||
expect(scrollToRightButton).not.to.be.null;
|
||||
await clickOnElement(scrollToRightButton!);
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ import styles from './tab-group.css';
|
||||
* @csspart tabs - The container that wraps the tabs.
|
||||
* @csspart body - The tab group's body where tab panels are slotted in.
|
||||
* @csspart scroll-button - The previous/next scroll buttons that show when tabs are scrollable, an `<wa-icon-button>`.
|
||||
* @csspart scroll-button--start - The starting scroll button.
|
||||
* @csspart scroll-button--end - The ending scroll button.
|
||||
* @csspart scroll-button-start - The starting scroll button.
|
||||
* @csspart scroll-button-end - The ending scroll button.
|
||||
* @csspart scroll-button__base - The scroll button's exported `base` part.
|
||||
*
|
||||
* @cssproperty --indicator-color - The color of the active tab indicator.
|
||||
@@ -392,9 +392,9 @@ export default class WaTabGroup extends WebAwesomeElement {
|
||||
${this.hasScrollControls
|
||||
? html`
|
||||
<wa-icon-button
|
||||
part="scroll-button scroll-button--start"
|
||||
part="scroll-button scroll-button-start"
|
||||
exportparts="base:scroll-button__base"
|
||||
class="tab-group__scroll-button tab-group__scroll-button--start"
|
||||
class="tab-group__scroll-button tab-group__scroll-button-start"
|
||||
name=${isRtl ? 'chevron-right' : 'chevron-left'}
|
||||
library="system"
|
||||
variant="solid"
|
||||
@@ -414,9 +414,9 @@ export default class WaTabGroup extends WebAwesomeElement {
|
||||
${this.hasScrollControls
|
||||
? html`
|
||||
<wa-icon-button
|
||||
part="scroll-button scroll-button--end"
|
||||
part="scroll-button scroll-button-end"
|
||||
exportparts="base:scroll-button__base"
|
||||
class="tab-group__scroll-button tab-group__scroll-button--end"
|
||||
class="tab-group__scroll-button tab-group__scroll-button-end"
|
||||
name=${isRtl ? 'chevron-left' : 'chevron-right'}
|
||||
library="system"
|
||||
variant="solid"
|
||||
|
||||
Reference in New Issue
Block a user