This repository has been archived by the owner on Feb 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ui assistants management (#469)
* feat: assistants management page and create assistant * feat: assistants management page and create assistant --------- Co-authored-by: John Alling <john.alling@defenseunicorns.com> Co-authored-by: Jonathan Perry <YrrepNoj@gmail.com>
- Loading branch information
1 parent
8982bc0
commit 28ba7ed
Showing
60 changed files
with
1,380 additions
and
232 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts"> | ||
import { Tooltip } from 'carbon-components-svelte'; | ||
export let name: string = ''; | ||
export let labelText: string; | ||
export let tooltipText: string; | ||
export let direction: 'top' | 'bottom' | 'left' | 'right' = 'right'; | ||
</script> | ||
|
||
<div class="label-and-tooltip"> | ||
<label for={name} class="bx--label" style="margin-bottom: 0">{labelText}</label> | ||
<Tooltip {direction}> | ||
<p>{tooltipText}</p> | ||
</Tooltip> | ||
</div> | ||
|
||
<style lang="scss"> | ||
.label-and-tooltip { | ||
display: flex; | ||
justify-content: flex-start; | ||
align-items: center; | ||
} | ||
</style> |
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,23 @@ | ||
import { render, screen } from '@testing-library/svelte'; | ||
import InputTooltip from '$components/InputTooltip.svelte'; | ||
import userEvent from '@testing-library/user-event'; | ||
|
||
describe('Input Tooltip', () => { | ||
it('has a label and tooltip', async () => { | ||
const labelText = 'Test Label Text'; | ||
const tooltipText = 'Test label tooltip test'; | ||
render(InputTooltip, { | ||
name: 'test', | ||
labelText, | ||
tooltipText | ||
}); | ||
|
||
screen.getByText(labelText); | ||
const tooltip = screen.getByRole('button'); | ||
expect(screen.queryByText(tooltipText)).not.toBeInTheDocument(); | ||
|
||
await userEvent.click(tooltip); | ||
|
||
screen.getByText(tooltipText); | ||
}); | ||
}); |
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,26 @@ | ||
<script lang="ts"> | ||
import { Content } from 'carbon-components-svelte'; | ||
import { PoweredByDU } from '$components/index.js'; | ||
</script> | ||
|
||
<Content> | ||
<div class="lf-content-container"> | ||
<div class="slot-wrapper"> | ||
<slot /> | ||
</div> | ||
|
||
<PoweredByDU /> | ||
</div> | ||
</Content> | ||
|
||
<style lang="scss"> | ||
.slot-wrapper { | ||
height: 100%; | ||
} | ||
.lf-content-container { | ||
display: flex; | ||
height: 100%; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
} | ||
</style> |
Oops, something went wrong.