-
Notifications
You must be signed in to change notification settings - Fork 0
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 #6 from kostaskougios/0.21
0.21
- Loading branch information
Showing
21 changed files
with
455 additions
and
33 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
31 changes: 31 additions & 0 deletions
31
end-to-end-tests/src/main/scala/tests/chakra/Disclosure.scala
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,31 @@ | ||
package tests.chakra | ||
|
||
import org.terminal21.client.ConnectedSession | ||
import org.terminal21.client.components.UiElement | ||
import org.terminal21.client.components.chakra.* | ||
import org.terminal21.client.components.std.Paragraph | ||
import tests.chakra.Common.commonBox | ||
|
||
object Disclosure: | ||
def components(using session: ConnectedSession): Seq[UiElement] = | ||
Seq( | ||
commonBox(text = "Tabs"), | ||
Tabs().withChildren( | ||
TabList().withChildren( | ||
Tab(text = "tab-one", _selected = Map("color" -> "white", "bg" -> "blue.500")), | ||
Tab(text = "tab-two", _selected = Map("color" -> "white", "bg" -> "green.400")), | ||
Tab(text = "tab-three") | ||
), | ||
TabPanels().withChildren( | ||
TabPanel().withChildren( | ||
Paragraph(text = "tab-1-content") | ||
), | ||
TabPanel().withChildren( | ||
Paragraph(text = "tab-2-content") | ||
), | ||
TabPanel().withChildren( | ||
Paragraph(text = "tab-3-content") | ||
) | ||
) | ||
) | ||
) |
23 changes: 23 additions & 0 deletions
23
end-to-end-tests/src/main/scala/tests/chakra/Feedback.scala
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 @@ | ||
package tests.chakra | ||
|
||
import org.terminal21.client.ConnectedSession | ||
import org.terminal21.client.components.UiElement | ||
import org.terminal21.client.components.chakra.* | ||
import tests.chakra.Common.commonBox | ||
|
||
object Feedback: | ||
def components(using session: ConnectedSession): Seq[UiElement] = | ||
Seq( | ||
commonBox(text = "Alerts"), | ||
VStack().withChildren( | ||
Alert(status = "error").withChildren(AlertIcon(), AlertTitle(text = "Alert:error"), AlertDescription(text = "alert-error-text-01")), | ||
Alert(status = "success").withChildren(AlertIcon(), AlertTitle(text = "Alert:success"), AlertDescription(text = "alert-success-text-01")), | ||
Alert(status = "warning").withChildren(AlertIcon(), AlertTitle(text = "Alert:warning"), AlertDescription(text = "alert-warning-text-01")), | ||
Alert(status = "info").withChildren(AlertIcon(), AlertTitle(text = "Alert:info"), AlertDescription(text = "alert-info-text-01")) | ||
), | ||
commonBox(text = "Progress"), | ||
Progress(value = 10), | ||
Progress(value = 20, hasStripe = Some(true)), | ||
Progress(value = 30, isIndeterminate = Some(true)), | ||
Tooltip(label = "A help message").withContent(Text(text = "hover me!")) | ||
) |
36 changes: 36 additions & 0 deletions
36
end-to-end-tests/src/main/scala/tests/chakra/Navigation.scala
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,36 @@ | ||
package tests.chakra | ||
|
||
import org.terminal21.client.ConnectedSession | ||
import org.terminal21.client.components.UiElement | ||
import org.terminal21.client.components.chakra.* | ||
import org.terminal21.client.components.std.Paragraph | ||
import tests.chakra.Common.commonBox | ||
|
||
object Navigation: | ||
def components(using session: ConnectedSession): Seq[UiElement] = | ||
val clickedBreadcrumb = Paragraph(text = "no-breadcrumb-clicked") | ||
def breadcrumbClicked(t: String): Unit = | ||
clickedBreadcrumb.withText(s"breadcrumb-click: $t").renderChanges() | ||
|
||
val clickedLink = Paragraph(text = "no-link-clicked") | ||
|
||
Seq( | ||
commonBox(text = "Breadcrumbs"), | ||
Breadcrumb().withChildren( | ||
BreadcrumbItem().withChildren( | ||
BreadcrumbLink(text = "breadcrumb-home").onClick(() => breadcrumbClicked("breadcrumb-home")) | ||
), | ||
BreadcrumbItem().withChildren( | ||
BreadcrumbLink(text = "breadcrumb-link1").onClick(() => breadcrumbClicked("breadcrumb-link1")) | ||
), | ||
BreadcrumbItem(isCurrentPage = Some(true)).withChildren( | ||
BreadcrumbLink(text = "breadcrumb-link2").onClick(() => breadcrumbClicked("breadcrumb-link2")) | ||
) | ||
), | ||
clickedBreadcrumb, | ||
commonBox(text = "Link"), | ||
Link(text = "link-external-google", href = "https://www.google.com/", isExternal = Some(true)) | ||
.onClick: () => | ||
clickedLink.withText("link-clicked").renderChanges(), | ||
clickedLink | ||
) |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
//> using jvm "21" | ||
//> using scala 3 | ||
|
||
//> using dep io.github.kostaskougios::terminal21-ui-std:0.20 | ||
//> using dep io.github.kostaskougios::terminal21-nivo:0.20 | ||
//> using dep io.github.kostaskougios::terminal21-mathjax:0.20 | ||
//> using dep io.github.kostaskougios::terminal21-ui-std:0.21 | ||
//> using dep io.github.kostaskougios::terminal21-nivo:0.21 | ||
//> using dep io.github.kostaskougios::terminal21-mathjax:0.21 | ||
|
||
//> using dep commons-io:commons-io:2.15.1 |
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
Oops, something went wrong.