-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eschweitzer78/2024-06-13-0900 (#366)
* Add comments * Fix a11y issue * Fix a11y issue * Fix missing markup * Versioning * A11y issue with form steps titles * Fixes to tests and icons * Remove unncessary template * Fix NSW DS SideNav test
- Loading branch information
1 parent
7888b94
commit 29ca3e8
Showing
27 changed files
with
866 additions
and
88 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
sfGpsDs/main/default/lwc/sfGpsDsFormBlockOsN/sfGpsDsFormBlockOsN.html
This file was deleted.
Oops, something went wrong.
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
4 changes: 3 additions & 1 deletion
4
...ain/default/lwc/sfGpsDsAuNswForm/lwc/sfGpsDsAuNswFormStepOsN/sfGpsDsAuNswFormStepOsN.html
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
5 changes: 4 additions & 1 deletion
5
sfGpsDsAuVic/main/default/lwc/sfGpsDsAuVicFormStepOsN/sfGpsDsAuVicFormStepOsN.html
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
25 changes: 25 additions & 0 deletions
25
...Vic2Accordion/lwc/sfGpsDsAuVic2AccordionItem/__tests__/sfGpsDsAuVic2AccordionItem.test.js
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,25 @@ | ||
import { createElement } from "lwc"; | ||
import SfGpsDsAuVic2AccordionItem from "c/sfGpsDsAuVic2AccordionItem"; | ||
|
||
describe("c-sf-gps-ds-au-vic2-accordion-item", () => { | ||
afterEach(() => { | ||
// The jsdom instance is shared across test cases in a single file so reset the DOM | ||
while (document.body.firstChild) { | ||
document.body.removeChild(document.body.firstChild); | ||
} | ||
}); | ||
|
||
it("TODO: test case generated by CLI command, please fill in test logic", () => { | ||
// Arrange | ||
const element = createElement("c-sf-gps-ds-au-vic2-accordion-item", { | ||
is: SfGpsDsAuVic2AccordionItem | ||
}); | ||
|
||
// Act | ||
document.body.appendChild(element); | ||
|
||
// Assert | ||
// const div = element.shadowRoot.querySelector('div'); | ||
expect(1).toBe(1); | ||
}); | ||
}); |
34 changes: 34 additions & 0 deletions
34
...lwc/sfGpsDsAuVic2Accordion/lwc/sfGpsDsAuVic2AccordionItem/sfGpsDsAuVic2AccordionItem.html
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,34 @@ | ||
<template> | ||
<button | ||
id="button" | ||
class="rpl-accordion__item-toggle rpl-u-focusable-block" | ||
type="button" | ||
onclick={handleToggle} | ||
aria-expanded={active} | ||
aria-controls="content" | ||
> | ||
<span class="rpl-accordion__item-heading-wrapper"> | ||
<span aria-hidden="true" class="rpl-accordion__item-number rpl-type-h4" | ||
>{indexP1}</span | ||
> | ||
<span class="rpl-accordion__item-heading rpl-type-h4">{title}</span> | ||
</span> | ||
|
||
<span class="rpl-accordion__item-icon rpl-u-screen-only" aria-hidden="true"> | ||
<c-sf-gps-ds-au-vic2-icon name="icon-chevron-down"> | ||
</c-sf-gps-ds-au-vic2-icon> | ||
</span> | ||
</button> | ||
|
||
<c-sf-gps-ds-au-vic2-expandable | ||
id="content" | ||
expanded={active} | ||
labelledby="button" | ||
hidden={inactive} | ||
class-name="rpl-accordion__item-content" | ||
> | ||
<div class="rpl-accordion__item-content-inner"> | ||
<slot></slot> | ||
</div> | ||
</c-sf-gps-ds-au-vic2-expandable> | ||
</template> |
38 changes: 38 additions & 0 deletions
38
...t/lwc/sfGpsDsAuVic2Accordion/lwc/sfGpsDsAuVic2AccordionItem/sfGpsDsAuVic2AccordionItem.js
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,38 @@ | ||
import { LightningElement, api } from "lwc"; | ||
|
||
export default class extends LightningElement { | ||
@api title; | ||
@api active; | ||
|
||
_indexOriginal; | ||
_index; | ||
|
||
@api | ||
get index() { | ||
return this._indexOriginal; | ||
} | ||
|
||
set index(value) { | ||
this._indexOriginal = value; | ||
this._index = Number(value); | ||
} | ||
|
||
get inactive() { | ||
return !this.active; | ||
} | ||
|
||
get indexP1() { | ||
return this._index + 1; | ||
} | ||
|
||
handleToggle() { | ||
this.dispatchEvent( | ||
new CustomEvent("toggle", { | ||
detail: { | ||
index: this._index, | ||
active: !this.active | ||
} | ||
}) | ||
); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...psDsAuVic2Accordion/lwc/sfGpsDsAuVic2AccordionItem/sfGpsDsAuVic2AccordionItem.js-meta.xml
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,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>60.0</apiVersion> | ||
<isExposed>false</isExposed> | ||
</LightningComponentBundle> |
Oops, something went wrong.