-
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.
- Loading branch information
Showing
63 changed files
with
329 additions
and
106 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...e-web/colors-compose-web/com.chrynan.colors.compose.web/-compose-color/index.md
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,9 @@ | ||
//[colors-compose-web](../../../index.md)/[com.chrynan.colors.compose.web](../index.md)/[ComposeColor](index.md) | ||
|
||
# ComposeColor | ||
|
||
[common]\ | ||
expect class [ComposeColor](index.md) | ||
|
||
[js]\ | ||
actual typealias [ComposeColor](index.md) = CSSColorValue |
18 changes: 18 additions & 0 deletions
18
...-compose-web/colors-compose-web/com.chrynan.colors.compose.web/-local-colors.md
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,18 @@ | ||
//[colors-compose-web](../../index.md)/[com.chrynan.colors.compose.web](index.md)/[LocalColors](-local-colors.md) | ||
|
||
# LocalColors | ||
|
||
[common]\ | ||
val [LocalColors](-local-colors.md): ProvidableCompositionLocal<[Colors](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md)> | ||
|
||
A ProvidableCompositionLocal of the [Colors](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md) interface. | ||
|
||
To access this value in a Composable function, simply access the current value: | ||
|
||
LocalColors.current | ||
|
||
To provide a new local color value, simply use the CompositionLocalProvider function: | ||
|
||
CompositionLocalProvider(LocalColors provides colors) {\ | ||
LocalColors.current\ | ||
} |
24 changes: 24 additions & 0 deletions
24
docs/colors-compose-web/colors-compose-web/com.chrynan.colors.compose.web/index.md
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,24 @@ | ||
//[colors-compose-web](../../index.md)/[com.chrynan.colors.compose.web](index.md) | ||
|
||
# Package com.chrynan.colors.compose.web | ||
|
||
## Types | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [ComposeColor](-compose-color/index.md) | [common, js]<br>[common]<br>expect class [ComposeColor](-compose-color/index.md)<br>[js]<br>actual typealias [ComposeColor](-compose-color/index.md) = CSSColorValue | | ||
|
||
## Functions | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [isSystemInDarkTheme](is-system-in-dark-theme.md) | [common]<br>@Composable<br>@ReadOnlyComposable<br>fun [isSystemInDarkTheme](is-system-in-dark-theme.md)(): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)<br>Determines whether the current system theme is set to dark mode. | | ||
| [systemBasedColors](system-based-colors.md) | [common]<br>@Composable<br>fun [LightDarkColorTheme](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-light-dark-color-theme/index.md).[systemBasedColors](system-based-colors.md)(): [Colors](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md)<br>Obtains the appropriate [Colors](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md) instance of this [LightDarkColorTheme](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-light-dark-color-theme/index.md) depending on the result of the [isSystemInDarkTheme](is-system-in-dark-theme.md) function. If [isSystemInDarkTheme](is-system-in-dark-theme.md) returns true, then the [LightDarkColorTheme.dark](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md) will be returned. Otherwise, the [LightDarkColorTheme.light](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md) will be returned. | | ||
| [toComposeColor](to-compose-color.md) | [common, js]<br>[common]<br>expect fun [Color](../../../colors-core/colors-core/com.chrynan.colors/-color/index.md).[toComposeColor](to-compose-color.md)(): [ComposeColor](-compose-color/index.md)<br>[js]<br>actual fun [Color](../../../colors-core/colors-core/com.chrynan.colors/-color/index.md).[toComposeColor](to-compose-color.md)(): [ComposeColor](-compose-color/index.md) | | ||
| [toCSSColorValue](to-c-s-s-color-value.md) | [js]<br>fun [Color](../../../colors-core/colors-core/com.chrynan.colors/-color/index.md).[toCSSColorValue](to-c-s-s-color-value.md)(destinationColorSpace: [ColorSpace](../../../colors-core/colors-core/com.chrynan.colors.space/-color-space/index.md) = ColorSpaces.SRGB, renderIntent: [RenderIntent](../../../colors-core/colors-core/com.chrynan.colors.space/-render-intent/index.md) = RenderIntent.PERCEPTUAL): CSSColorValue<br>Converts this [Color](../../../colors-core/colors-core/com.chrynan.colors/-color/index.md) to a CSSColorValue so that it can be used with compose-web components. | | ||
|
||
## Properties | ||
|
||
| Name | Summary | | ||
|---|---| | ||
| [LocalColors](-local-colors.md) | [common]<br>val [LocalColors](-local-colors.md): ProvidableCompositionLocal<[Colors](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md)><br>A ProvidableCompositionLocal of the [Colors](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md) interface. | |
13 changes: 13 additions & 0 deletions
13
...eb/colors-compose-web/com.chrynan.colors.compose.web/is-system-in-dark-theme.md
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,13 @@ | ||
//[colors-compose-web](../../index.md)/[com.chrynan.colors.compose.web](index.md)/[isSystemInDarkTheme](is-system-in-dark-theme.md) | ||
|
||
# isSystemInDarkTheme | ||
|
||
[common]\ | ||
|
||
@Composable | ||
|
||
@ReadOnlyComposable | ||
|
||
fun [isSystemInDarkTheme](is-system-in-dark-theme.md)(): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | ||
|
||
Determines whether the current system theme is set to dark mode. |
11 changes: 11 additions & 0 deletions
11
...se-web/colors-compose-web/com.chrynan.colors.compose.web/system-based-colors.md
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,11 @@ | ||
//[colors-compose-web](../../index.md)/[com.chrynan.colors.compose.web](index.md)/[systemBasedColors](system-based-colors.md) | ||
|
||
# systemBasedColors | ||
|
||
[common]\ | ||
|
||
@Composable | ||
|
||
fun [LightDarkColorTheme](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-light-dark-color-theme/index.md).[systemBasedColors](system-based-colors.md)(): [Colors](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md) | ||
|
||
Obtains the appropriate [Colors](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md) instance of this [LightDarkColorTheme](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-light-dark-color-theme/index.md) depending on the result of the [isSystemInDarkTheme](is-system-in-dark-theme.md) function. If [isSystemInDarkTheme](is-system-in-dark-theme.md) returns true, then the [LightDarkColorTheme.dark](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md) will be returned. Otherwise, the [LightDarkColorTheme.light](../../../colors-theme/colors-theme/com.chrynan.colors.theme/-colors/index.md) will be returned. |
10 changes: 10 additions & 0 deletions
10
...e-web/colors-compose-web/com.chrynan.colors.compose.web/to-c-s-s-color-value.md
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,10 @@ | ||
//[colors-compose-web](../../index.md)/[com.chrynan.colors.compose.web](index.md)/[toCSSColorValue](to-c-s-s-color-value.md) | ||
|
||
# toCSSColorValue | ||
|
||
[js]\ | ||
fun [Color](../../../colors-core/colors-core/com.chrynan.colors/-color/index.md).[toCSSColorValue](to-c-s-s-color-value.md)(destinationColorSpace: [ColorSpace](../../../colors-core/colors-core/com.chrynan.colors.space/-color-space/index.md) = ColorSpaces.SRGB, renderIntent: [RenderIntent](../../../colors-core/colors-core/com.chrynan.colors.space/-render-intent/index.md) = RenderIntent.PERCEPTUAL): CSSColorValue | ||
|
||
Converts this [Color](../../../colors-core/colors-core/com.chrynan.colors/-color/index.md) to a CSSColorValue so that it can be used with compose-web components. | ||
|
||
Note that this [Color](../../../colors-core/colors-core/com.chrynan.colors/-color/index.md) will first be converted to an [RgbaColor](../../../colors-core/colors-core/com.chrynan.colors/-rgba-color/index.md) so that it can be easily converted to a CSSColorValue. |
10 changes: 10 additions & 0 deletions
10
...mpose-web/colors-compose-web/com.chrynan.colors.compose.web/to-compose-color.md
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,10 @@ | ||
//[colors-compose-web](../../index.md)/[com.chrynan.colors.compose.web](index.md)/[toComposeColor](to-compose-color.md) | ||
|
||
# toComposeColor | ||
|
||
[common, js]\ | ||
[common]\ | ||
expect fun [Color](../../../colors-core/colors-core/com.chrynan.colors/-color/index.md).[toComposeColor](to-compose-color.md)(): [ComposeColor](-compose-color/index.md) | ||
|
||
[js]\ | ||
actual fun [Color](../../../colors-core/colors-core/com.chrynan.colors/-color/index.md).[toComposeColor](to-compose-color.md)(): [ComposeColor](-compose-color/index.md) |
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
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
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.