-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from WestpacGEL/develop
merge develop to main
- Loading branch information
Showing
338 changed files
with
12,623 additions
and
571 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@westpac/ui': minor | ||
--- | ||
|
||
added auto complete, date picker, progress rope, panel, list, mega input, pagination and compacta |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.2.0 | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run build | ||
run: pnpm build | ||
|
||
- name: Run tests | ||
run: pnpm ci:test |
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,47 @@ | ||
name: Version | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
workflow_dispatch: | ||
|
||
jobs: | ||
version: | ||
name: Version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.2.0 | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Create Release Pull Request | ||
uses: changesets/action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 @@ | ||
name: Autocomplete |
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,101 @@ | ||
## Autocomplete | ||
|
||
### Default | ||
|
||
```jsx | ||
<Autocomplete aria-label="Animals"> | ||
<Autocomplete.Item key="red panda">Red Panda</Autocomplete.Item> | ||
<Autocomplete.Item key="cat">Cat</Autocomplete.Item> | ||
<Autocomplete.Item key="dog">Dog</Autocomplete.Item> | ||
<Autocomplete.Item key="aardvark">Aardvark</Autocomplete.Item> | ||
<Autocomplete.Item key="kangaroo">Kangaroo</Autocomplete.Item> | ||
<Autocomplete.Item key="snake">Snake</Autocomplete.Item> | ||
</Autocomplete> | ||
``` | ||
|
||
### Controlled | ||
|
||
```jsx | ||
() => { | ||
const [selectedKey, setSelectedKey] = useState<Key>(); | ||
const handleSelectionChange = (key: Key) => { | ||
setSelectedKey(key); | ||
}; | ||
return ( | ||
<Autocomplete onSelectionChange={handleSelectionChange} selectedKey={selectedKey} aria-label="Animals"> | ||
<Autocomplete.Item key="red panda">Red Panda</Autocomplete.Item> | ||
<Autocomplete.Item key="cat">Cat</Autocomplete.Item> | ||
<Autocomplete.Item key="dog">Dog</Autocomplete.Item> | ||
<Autocomplete.Item key="aardvark">Aardvark</Autocomplete.Item> | ||
<Autocomplete.Item key="kangaroo">Kangaroo</Autocomplete.Item> | ||
<Autocomplete.Item key="snake">Snake</Autocomplete.Item> | ||
</Autocomplete> | ||
); | ||
}; | ||
``` | ||
|
||
### Invalid | ||
|
||
```jsx | ||
<Autocomplete aria-label="Animals" invalid> | ||
<Autocomplete.Item key="red panda">Red Panda</Autocomplete.Item> | ||
<Autocomplete.Item key="cat">Cat</Autocomplete.Item> | ||
<Autocomplete.Item key="dog">Dog</Autocomplete.Item> | ||
<Autocomplete.Item key="aardvark">Aardvark</Autocomplete.Item> | ||
<Autocomplete.Item key="kangaroo">Kangaroo</Autocomplete.Item> | ||
<Autocomplete.Item key="snake">Snake</Autocomplete.Item> | ||
</Autocomplete> | ||
``` | ||
|
||
### Disabled | ||
|
||
```jsx | ||
<Autocomplete aria-label="Animals" disabled> | ||
<Autocomplete.Item key="red panda">Red Panda</Autocomplete.Item> | ||
<Autocomplete.Item key="cat">Cat</Autocomplete.Item> | ||
<Autocomplete.Item key="dog">Dog</Autocomplete.Item> | ||
<Autocomplete.Item key="aardvark">Aardvark</Autocomplete.Item> | ||
<Autocomplete.Item key="kangaroo">Kangaroo</Autocomplete.Item> | ||
<Autocomplete.Item key="snake">Snake</Autocomplete.Item> | ||
</Autocomplete> | ||
``` | ||
|
||
### Sizes | ||
|
||
```jsx | ||
() => { | ||
const [selectedKey, setSelectedKey] = useState<Key>(); | ||
const handleSelectionChange = (key: Key) => { | ||
setSelectedKey(key); | ||
}; | ||
return ( | ||
<Fragment> | ||
{['small', 'medium', 'large', 'xlarge'].map(size => ( | ||
<div className="py-2" key={size}> | ||
<Autocomplete label={size} size={size as any} aria-label={`size ${size}`}> | ||
<Autocomplete.Item key="red panda">Red Panda</Autocomplete.Item> | ||
<Autocomplete.Item key="cat">Cat</Autocomplete.Item> | ||
<Autocomplete.Item key="dog">Dog</Autocomplete.Item> | ||
<Autocomplete.Item key="aardvark">Aardvark</Autocomplete.Item> | ||
<Autocomplete.Item key="kangaroo">Kangaroo</Autocomplete.Item> | ||
<Autocomplete.Item key="snake">Snake</Autocomplete.Item> | ||
</Autocomplete> | ||
</div> | ||
))} | ||
</Fragment> | ||
); | ||
}; | ||
``` | ||
|
||
### Footer | ||
|
||
```jsx | ||
<Autocomplete aria-label="Animals" disabled footer={<h3>Footer message</h3>}> | ||
<Autocomplete.Item key="red panda">Red Panda</Autocomplete.Item> | ||
<Autocomplete.Item key="cat">Cat</Autocomplete.Item> | ||
<Autocomplete.Item key="dog">Dog</Autocomplete.Item> | ||
<Autocomplete.Item key="aardvark">Aardvark</Autocomplete.Item> | ||
<Autocomplete.Item key="kangaroo">Kangaroo</Autocomplete.Item> | ||
<Autocomplete.Item key="snake">Snake</Autocomplete.Item> | ||
</Autocomplete> | ||
``` |
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 @@ | ||
name: Button Dropdown |
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 @@ | ||
## Default usage | ||
|
||
```jsx | ||
<ButtonDropdown text="Dropdown" look="primary" soft> | ||
<p> | ||
Example dropdown <a href="#" className="text-[blue] underline">content</a>... | ||
</p> | ||
</ButtonDropdown> | ||
``` | ||
|
||
## Dropdown with headings | ||
|
||
```jsx | ||
<ButtonDropdown text="Dropdown" look="primary" soft> | ||
<ButtonDropdown.Heading>Dropdown heading #1</ButtonDropdown.Heading> | ||
Example dropdown content... | ||
<ButtonDropdown.Heading>Dropdown heading #2</ButtonDropdown.Heading> | ||
Example dropdown content... | ||
</ButtonDropdown> | ||
``` | ||
|
||
## Dropdown box sizes (min-widths) | ||
```jsx | ||
<div> | ||
<h3 className="font-bold">Small</h3> | ||
<ButtonDropdown text="Dropdown" dropdownSize="small" look="primary" soft> | ||
<ButtonDropdown.Heading>Small</ButtonDropdown.Heading> | ||
</ButtonDropdown> | ||
<h3 className="font-bold">Medium</h3> | ||
<ButtonDropdown text="Dropdown" dropdownSize="medium" look="primary" soft> | ||
<ButtonDropdown.Heading>Medium</ButtonDropdown.Heading> | ||
</ButtonDropdown> | ||
<h3 className="font-bold">Large</h3> | ||
<ButtonDropdown text="Dropdown" dropdownSize="large" look="primary" soft> | ||
<ButtonDropdown.Heading>Large</ButtonDropdown.Heading> | ||
</ButtonDropdown> | ||
</div> | ||
``` |
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 @@ | ||
name: Collapsible |
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,61 @@ | ||
## Collapsible sizes | ||
|
||
```jsx | ||
<div> | ||
<div className="mb-2"> | ||
<h2 className="typography-body-10 mb-1">Small</h2> | ||
|
||
<Collapsible text="Toggle collapsible" size="small"> | ||
<p> | ||
Hello vivamus sagittis lacus vel augue laoreet rutrum faucibus. Lorem ipsum dolor sit amet, consectetur | ||
adipisicing elit. Nesciunt laboriosam, mollitia magnam ad magni consequuntur hic et quos optio corrupti | ||
praesentium veniam aspernatur minima aperiam ut quas, possimus non architecto. Lorem ipsum dolor sit amet, | ||
consectetur adipisicing elit. Aut animi velit in? Suscipit nostrum itaque voluptatibus dolorem qui soluta | ||
nobis modi officia incidunt eos dolores atque, unde error delectus officiis. | ||
</p> | ||
</Collapsible> | ||
</div> | ||
<hr className="mb-2"/> | ||
<div className="mb-2"> | ||
<h2 className="typography-body-10 mb-1">Medium (default)</h2> | ||
|
||
<Collapsible text="Toggle collapsible" size="medium"> | ||
<p> | ||
Hello vivamus sagittis lacus vel augue laoreet rutrum faucibus. Lorem ipsum dolor sit amet, consectetur | ||
adipisicing elit. Nesciunt laboriosam, mollitia magnam ad magni consequuntur hic et quos optio corrupti | ||
praesentium veniam aspernatur minima aperiam ut quas, possimus non architecto. Lorem ipsum dolor sit amet, | ||
consectetur adipisicing elit. Aut animi velit in? Suscipit nostrum itaque voluptatibus dolorem qui soluta | ||
nobis modi officia incidunt eos dolores atque, unde error delectus officiis. | ||
</p> | ||
</Collapsible> | ||
</div> | ||
<hr className="mb-2"/> | ||
<div className="mb-2"> | ||
<h2 className="typography-body-10 mb-1">Large</h2> | ||
|
||
<Collapsible text="Toggle collapsible" size="large"> | ||
<p> | ||
Hello vivamus sagittis lacus vel augue laoreet rutrum faucibus. Lorem ipsum dolor sit amet, consectetur | ||
adipisicing elit. Nesciunt laboriosam, mollitia magnam ad magni consequuntur hic et quos optio corrupti | ||
praesentium veniam aspernatur minima aperiam ut quas, possimus non architecto. Lorem ipsum dolor sit amet, | ||
consectetur adipisicing elit. Aut animi velit in? Suscipit nostrum itaque voluptatibus dolorem qui soluta | ||
nobis modi officia incidunt eos dolores atque, unde error delectus officiis. | ||
</p> | ||
</Collapsible> | ||
</div> | ||
<hr className="mb-2"/> | ||
<div className="mb-2"> | ||
<h2 className="typography-body-10 mb-1">XLarge</h2> | ||
|
||
<Collapsible text="Toggle collapsible" size="xlarge"> | ||
<p> | ||
Hello vivamus sagittis lacus vel augue laoreet rutrum faucibus. Lorem ipsum dolor sit amet, consectetur | ||
adipisicing elit. Nesciunt laboriosam, mollitia magnam ad magni consequuntur hic et quos optio corrupti | ||
praesentium veniam aspernatur minima aperiam ut quas, possimus non architecto. Lorem ipsum dolor sit amet, | ||
consectetur adipisicing elit. Aut animi velit in? Suscipit nostrum itaque voluptatibus dolorem qui soluta | ||
nobis modi officia incidunt eos dolores atque, unde error delectus officiis. | ||
</p> | ||
</Collapsible> | ||
</div> | ||
</div> | ||
``` |
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 @@ | ||
name: Compacta |
Oops, something went wrong.