From a68b4c7d8ea9ee9dad356a577a1625615810bb5c Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 12 Jan 2022 16:27:37 +0600 Subject: [PATCH 1/4] start 0.0.3 --- CHANGELOG.md | 2 ++ gradle.properties | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ae17c4..6c496dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.0.3 + ## 0.0.2 * Name of project has been changed: `jsuikitkotlin` -> `kjsuikit` diff --git a/gradle.properties b/gradle.properties index c8797d5..79d769d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,5 +9,5 @@ android.enableJetifier=true # Project data group=dev.inmo -version=0.0.2 +version=0.0.3 From 6c5dbdba87c6c624c580baf5a8f0a3748d3c0112 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 12 Jan 2022 16:27:49 +0600 Subject: [PATCH 2/4] global changes in packages --- CHANGELOG.md | 2 ++ .../jsuikit/{defaults => }/UIKitAttributeValueBuilder.kt | 5 ++--- .../kotlin/dev/inmo/jsuikit/defaults/modifers/UIKit.kt | 4 ---- .../dev/inmo/jsuikit/defaults/utils/Milliseconds.kt | 3 --- .../dev/inmo/jsuikit/{defaults => elements}/Button.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/Dialog.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/Divider.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/Dropdown.kt | 5 +++-- .../dev/inmo/jsuikit/{defaults => elements}/Flex.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/Grid.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/Icon.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/Labels.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/List.kt | 2 +- .../kotlin/dev/inmo/jsuikit/{defaults => elements}/Nav.kt | 5 +++-- .../dev/inmo/jsuikit/{defaults => elements}/Navbar.kt | 2 +- .../jsuikit/{defaults => elements}/NavbarNavBuilder.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/Progress.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/Spinner.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/Table.kt | 2 +- .../dev/inmo/jsuikit/{defaults => elements}/TextField.kt | 2 +- .../jsuikit/{defaults => }/modifers/AttributeValue.kt | 2 +- src/main/kotlin/dev/inmo/jsuikit/modifers/UIKit.kt | 4 ++++ .../inmo/jsuikit/{defaults => }/modifers/UIKitAlign.kt | 2 +- .../jsuikit/{defaults => }/modifers/UIKitAnimation.kt | 4 ++-- .../jsuikit/{defaults => }/modifers/UIKitBackground.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitButton.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitDropdown.kt | 8 ++++---- .../jsuikit/{defaults => }/modifers/UIKitExtensions.kt | 2 +- .../dev/inmo/jsuikit/{defaults => }/modifers/UIKitFlex.kt | 2 +- .../dev/inmo/jsuikit/{defaults => }/modifers/UIKitGrid.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitIconType.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitMargin.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitModifier.kt | 2 +- .../dev/inmo/jsuikit/{defaults => }/modifers/UIKitNav.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitNavbar.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitPadding.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitPosition.kt | 2 +- .../{defaults => }/modifers/UIKitScreenSizeModifier.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitTable.kt | 2 +- .../dev/inmo/jsuikit/{defaults => }/modifers/UIKitText.kt | 2 +- .../{defaults => }/modifers/UIKitTooltipModifier.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitUtility.kt | 2 +- .../inmo/jsuikit/{defaults => }/modifers/UIKitWidth.kt | 2 +- src/main/kotlin/dev/inmo/jsuikit/utils/Milliseconds.kt | 3 +++ 44 files changed, 57 insertions(+), 54 deletions(-) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/UIKitAttributeValueBuilder.kt (80%) delete mode 100644 src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKit.kt delete mode 100644 src/main/kotlin/dev/inmo/jsuikit/defaults/utils/Milliseconds.kt rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Button.kt (98%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Dialog.kt (98%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Divider.kt (81%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Dropdown.kt (91%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Flex.kt (93%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Grid.kt (97%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Icon.kt (99%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Labels.kt (96%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/List.kt (96%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Nav.kt (90%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Navbar.kt (96%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/NavbarNavBuilder.kt (97%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Progress.kt (93%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Spinner.kt (93%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/Table.kt (97%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => elements}/TextField.kt (95%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/AttributeValue.kt (52%) create mode 100644 src/main/kotlin/dev/inmo/jsuikit/modifers/UIKit.kt rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitAlign.kt (86%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitAnimation.kt (91%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitBackground.kt (97%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitButton.kt (91%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitDropdown.kt (82%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitExtensions.kt (85%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitFlex.kt (97%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitGrid.kt (91%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitIconType.kt (87%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitMargin.kt (98%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitModifier.kt (91%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitNav.kt (91%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitNavbar.kt (91%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitPadding.kt (94%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitPosition.kt (97%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitScreenSizeModifier.kt (93%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitTable.kt (89%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitText.kt (94%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitTooltipModifier.kt (96%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitUtility.kt (88%) rename src/main/kotlin/dev/inmo/jsuikit/{defaults => }/modifers/UIKitWidth.kt (95%) create mode 100644 src/main/kotlin/dev/inmo/jsuikit/utils/Milliseconds.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c496dd..2f120a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## 0.0.3 +__Global changes in packages__ + ## 0.0.2 * Name of project has been changed: `jsuikitkotlin` -> `kjsuikit` diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/UIKitAttributeValueBuilder.kt b/src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt similarity index 80% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/UIKitAttributeValueBuilder.kt rename to src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt index 8e0aa37..26d5882 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/UIKitAttributeValueBuilder.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt @@ -1,6 +1,5 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit -import dev.inmo.jsuikit.defaults.modifers.AttributeValue import org.jetbrains.compose.web.attributes.AttrsBuilder class UIKitAttributeValueBuilder { @@ -12,7 +11,7 @@ class UIKitAttributeValueBuilder { } } - infix fun String.to(other: AttributeValue?) { + infix fun String.to(other: dev.inmo.jsuikit.modifers.AttributeValue?) { this to other ?.name } diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKit.kt b/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKit.kt deleted file mode 100644 index 8b8c520..0000000 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKit.kt +++ /dev/null @@ -1,4 +0,0 @@ -package dev.inmo.jsuikit.defaults.modifers - -inline val UIKit - get() = js("UIkit") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/utils/Milliseconds.kt b/src/main/kotlin/dev/inmo/jsuikit/defaults/utils/Milliseconds.kt deleted file mode 100644 index 88e3b0b..0000000 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/utils/Milliseconds.kt +++ /dev/null @@ -1,3 +0,0 @@ -package dev.inmo.jsuikit.defaults.utils - -typealias Milliseconds = Long diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Button.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Button.kt similarity index 98% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Button.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Button.kt index 91d00ab..0ba4157 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Button.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Button.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import androidx.compose.web.events.SyntheticMouseEvent diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Dialog.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Dialog.kt similarity index 98% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Dialog.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Dialog.kt index d198c60..80b614e 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Dialog.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Dialog.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffectResult diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Divider.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Divider.kt similarity index 81% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Divider.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Divider.kt index 9155309..97b2386 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Divider.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Divider.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import org.jetbrains.compose.web.dom.Hr diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Dropdown.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Dropdown.kt similarity index 91% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Dropdown.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Dropdown.kt index e39e838..7032c6b 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Dropdown.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Dropdown.kt @@ -1,8 +1,9 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable +import dev.inmo.jsuikit.buildAndAddAttribute import dev.inmo.jsuikit.defaults.modifers.* -import dev.inmo.jsuikit.defaults.utils.Milliseconds +import dev.inmo.jsuikit.utils.Milliseconds import org.jetbrains.compose.web.dom.ContentBuilder import org.jetbrains.compose.web.dom.Div import org.w3c.dom.HTMLDivElement diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Flex.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Flex.kt similarity index 93% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Flex.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Flex.kt index b581cd0..e4fe37a 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Flex.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Flex.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import dev.inmo.jsuikit.defaults.modifers.UIKitModifier diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Grid.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Grid.kt similarity index 97% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Grid.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Grid.kt index 7059f5c..34733c1 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Grid.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Grid.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import dev.inmo.jsuikit.defaults.modifers.UIKitModifier diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Icon.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Icon.kt similarity index 99% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Icon.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Icon.kt index 0c18434..e4eb8e0 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Icon.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Icon.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import dev.inmo.jsuikit.defaults.modifers.* diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Labels.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Labels.kt similarity index 96% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Labels.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Labels.kt index 71a5b15..d9bf6ad 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Labels.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Labels.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import dev.inmo.jsuikit.defaults.modifers.UIKitModifier diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/List.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/List.kt similarity index 96% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/List.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/List.kt index d18ded1..9db1498 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/List.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/List.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import androidx.compose.runtime.snapshots.SnapshotStateList diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Nav.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Nav.kt similarity index 90% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Nav.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Nav.kt index 8ea3889..b566321 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Nav.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Nav.kt @@ -1,8 +1,9 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable +import dev.inmo.jsuikit.buildAndAddAttribute import dev.inmo.jsuikit.defaults.modifers.* -import dev.inmo.jsuikit.defaults.utils.Milliseconds +import dev.inmo.jsuikit.utils.Milliseconds import org.jetbrains.compose.web.dom.* import org.w3c.dom.HTMLLIElement import org.w3c.dom.HTMLUListElement diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Navbar.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Navbar.kt similarity index 96% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Navbar.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Navbar.kt index b73e1c4..62d582c 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Navbar.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Navbar.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import dev.inmo.jsuikit.defaults.modifers.UIKitModifier diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/NavbarNavBuilder.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/NavbarNavBuilder.kt similarity index 97% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/NavbarNavBuilder.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/NavbarNavBuilder.kt index ccb5197..70317a0 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/NavbarNavBuilder.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/NavbarNavBuilder.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import dev.inmo.jsuikit.defaults.modifers.UIKitModifier diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Progress.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Progress.kt similarity index 93% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Progress.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Progress.kt index 79dd540..7eb31b0 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Progress.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Progress.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import dev.inmo.jsuikit.defaults.modifers.UIKitModifier diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Spinner.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Spinner.kt similarity index 93% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Spinner.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Spinner.kt index c9ba980..c6f3b52 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Spinner.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Spinner.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import dev.inmo.jsuikit.defaults.modifers.* diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/Table.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Table.kt similarity index 97% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/Table.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/Table.kt index e01f3ff..8b1ef86 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/Table.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Table.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import androidx.compose.runtime.snapshots.SnapshotStateList diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/TextField.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/TextField.kt similarity index 95% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/TextField.kt rename to src/main/kotlin/dev/inmo/jsuikit/elements/TextField.kt index 0aa7675..4c996fc 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/TextField.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/TextField.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults +package dev.inmo.jsuikit.elements import androidx.compose.runtime.* import dev.inmo.jsuikit.defaults.modifers.UIKitModifier diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/AttributeValue.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/AttributeValue.kt similarity index 52% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/AttributeValue.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/AttributeValue.kt index 491896c..234f91f 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/AttributeValue.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/AttributeValue.kt @@ -1,3 +1,3 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class AttributeValue(val name: String) diff --git a/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKit.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKit.kt new file mode 100644 index 0000000..b6f8881 --- /dev/null +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKit.kt @@ -0,0 +1,4 @@ +package dev.inmo.jsuikit.modifers + +inline val UIKit + get() = js("UIkit") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitAlign.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAlign.kt similarity index 86% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitAlign.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAlign.kt index 42bcac6..3b3d15a 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitAlign.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAlign.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitAlign(classnameSuffix: String) : UIKitModifier { override val classes: Array = arrayOf("uk-align-$classnameSuffix") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitAnimation.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt similarity index 91% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitAnimation.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt index 08ad8f7..c8de563 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitAnimation.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt @@ -1,6 +1,6 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers -sealed class UIKitAnimation (name: String) : UIKitModifier, AttributeValue(name) { +sealed class UIKitAnimation (name: String) : UIKitModifier, dev.inmo.jsuikit.modifers.AttributeValue(name) { override val classes: Array = arrayOf("uk-animation-$name") object Fade : UIKitAnimation("fade") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitBackground.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitBackground.kt similarity index 97% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitBackground.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitBackground.kt index 8b07a49..691fd6f 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitBackground.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitBackground.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitBackground(suffix: String) : UIKitModifier { override val classes: Array = arrayOf("uk-background-$suffix") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitButton.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitButton.kt similarity index 91% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitButton.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitButton.kt index 8a40f1c..8783527 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitButton.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitButton.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitButton(suffix: String) : UIKitModifier { override val classes: Array = arrayOf("uk-button-$suffix") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitDropdown.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt similarity index 82% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitDropdown.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt index 013526e..9131610 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitDropdown.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitDropdown(classname: String) : UIKitModifier { override val classes: Array = arrayOf(classname) @@ -7,7 +7,7 @@ sealed class UIKitDropdown(classname: String) : UIKitModifier { object Grid : UIKitDropdown("uk-dropdown-grid") - sealed class Position(name: String) : AttributeValue(name) { + sealed class Position(name: String) : dev.inmo.jsuikit.modifers.AttributeValue(name) { sealed class Bottom(name: String) : Position("bottom-$name") { @@ -45,14 +45,14 @@ sealed class UIKitDropdown(classname: String) : UIKitModifier { } - sealed class Mode(name: String) : AttributeValue(name) { + sealed class Mode(name: String) : dev.inmo.jsuikit.modifers.AttributeValue(name) { object Click : Mode("click") object Hover : Mode("hover") } - sealed class Flip(name: String) : AttributeValue(name) { + sealed class Flip(name: String) : dev.inmo.jsuikit.modifers.AttributeValue(name) { object True : Flip("true") object False : Flip("false") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitExtensions.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitExtensions.kt similarity index 85% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitExtensions.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitExtensions.kt index 8448016..7fecb8b 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitExtensions.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitExtensions.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitExtension(classname: String) : UIKitModifier { override val classes: Array = arrayOf(classname) diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitFlex.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitFlex.kt similarity index 97% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitFlex.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitFlex.kt index 2866e26..78c9599 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitFlex.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitFlex.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitFlex(suffix: String) : UIKitModifier { override val classes: Array = arrayOf("uk-flex-$suffix") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitGrid.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitGrid.kt similarity index 91% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitGrid.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitGrid.kt index 25b1e45..24d7a0f 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitGrid.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitGrid.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitGrid(suffix: String) : UIKitModifier { override val classes: Array = arrayOf("uk-grid-$suffix") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitIconType.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitIconType.kt similarity index 87% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitIconType.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitIconType.kt index ae1dcfa..bda1bb9 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitIconType.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitIconType.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitIconType(suffix: String?) : UIKitModifier { override val classes: Array = suffix ?.let { diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitMargin.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitMargin.kt similarity index 98% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitMargin.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitMargin.kt index 91e9dab..23c3b2f 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitMargin.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitMargin.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitMargin(val classname: String) : UIKitModifier { override val classes: Array = arrayOf(classname) diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitModifier.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitModifier.kt similarity index 91% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitModifier.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitModifier.kt index 728729e..a5e2068 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitModifier.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitModifier.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers import org.jetbrains.compose.web.attributes.AttrsBuilder diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitNav.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitNav.kt similarity index 91% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitNav.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitNav.kt index 638eb9c..895727b 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitNav.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitNav.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitNav(classname: String) : UIKitModifier { override val classes: Array = arrayOf(classname) diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitNavbar.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitNavbar.kt similarity index 91% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitNavbar.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitNavbar.kt index fd9c25a..5c61aa8 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitNavbar.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitNavbar.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitNavbar(suffix: String) : UIKitModifier { override val classes: Array = arrayOf("uk-navbar-$suffix") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitPadding.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitPadding.kt similarity index 94% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitPadding.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitPadding.kt index 6d001ff..f4c844e 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitPadding.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitPadding.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitPadding(suffix: String?) : UIKitModifier { override val classes: Array = arrayOf("uk-padding${suffix ?.let { "-$it" } ?: ""}") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitPosition.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitPosition.kt similarity index 97% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitPosition.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitPosition.kt index 38109c0..1f426e8 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitPosition.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitPosition.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitPosition(classname: String) : UIKitModifier { override val classes: Array = arrayOf(classname) diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitScreenSizeModifier.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitScreenSizeModifier.kt similarity index 93% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitScreenSizeModifier.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitScreenSizeModifier.kt index 9a3b6d8..677e2fb 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitScreenSizeModifier.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitScreenSizeModifier.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitScreenSizeModifier(val name: String) { class UIKitScreenSizeModifierModified ( diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitTable.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitTable.kt similarity index 89% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitTable.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitTable.kt index 65e1163..3f04493 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitTable.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitTable.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitTable(suffix: String) : UIKitModifier { override val classes: Array = arrayOf("uk-table-$suffix") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitText.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitText.kt similarity index 94% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitText.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitText.kt index 8415c5a..34a49eb 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitText.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitText.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitText(suffix: String) : UIKitModifier { override val classes: Array = arrayOf("uk-text-$suffix") diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitTooltipModifier.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitTooltipModifier.kt similarity index 96% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitTooltipModifier.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitTooltipModifier.kt index 2b396c9..e03097c 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitTooltipModifier.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitTooltipModifier.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers class UIKitTooltipModifier( text: String, diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitUtility.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitUtility.kt similarity index 88% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitUtility.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitUtility.kt index 198e0a3..7ce1efa 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitUtility.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitUtility.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitUtility(classname: String) : UIKitModifier { override val classes: Array = arrayOf(classname) diff --git a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitWidth.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitWidth.kt similarity index 95% rename from src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitWidth.kt rename to src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitWidth.kt index 8d68bba..a705884 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/defaults/modifers/UIKitWidth.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitWidth.kt @@ -1,4 +1,4 @@ -package dev.inmo.jsuikit.defaults.modifers +package dev.inmo.jsuikit.modifers sealed class UIKitWidth(classname: String) : UIKitModifier { override val classes: Array = arrayOf("uk-width-$classname") diff --git a/src/main/kotlin/dev/inmo/jsuikit/utils/Milliseconds.kt b/src/main/kotlin/dev/inmo/jsuikit/utils/Milliseconds.kt new file mode 100644 index 0000000..ee076b6 --- /dev/null +++ b/src/main/kotlin/dev/inmo/jsuikit/utils/Milliseconds.kt @@ -0,0 +1,3 @@ +package dev.inmo.jsuikit.utils + +typealias Milliseconds = Long From a70256cdafa2724dc6ba27fb7279b4d7dd308bfc Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 12 Jan 2022 16:30:45 +0600 Subject: [PATCH 3/4] fix imports --- src/main/kotlin/dev/inmo/jsuikit/elements/Button.kt | 2 +- src/main/kotlin/dev/inmo/jsuikit/elements/Dialog.kt | 4 ++-- src/main/kotlin/dev/inmo/jsuikit/elements/Dropdown.kt | 2 +- src/main/kotlin/dev/inmo/jsuikit/elements/Flex.kt | 4 ++-- src/main/kotlin/dev/inmo/jsuikit/elements/Grid.kt | 4 ++-- src/main/kotlin/dev/inmo/jsuikit/elements/Icon.kt | 2 +- src/main/kotlin/dev/inmo/jsuikit/elements/Labels.kt | 4 ++-- src/main/kotlin/dev/inmo/jsuikit/elements/List.kt | 4 ++-- src/main/kotlin/dev/inmo/jsuikit/elements/Nav.kt | 2 +- src/main/kotlin/dev/inmo/jsuikit/elements/Navbar.kt | 4 ++-- src/main/kotlin/dev/inmo/jsuikit/elements/NavbarNavBuilder.kt | 4 ++-- src/main/kotlin/dev/inmo/jsuikit/elements/Progress.kt | 4 ++-- src/main/kotlin/dev/inmo/jsuikit/elements/Spinner.kt | 2 +- src/main/kotlin/dev/inmo/jsuikit/elements/Table.kt | 2 +- src/main/kotlin/dev/inmo/jsuikit/elements/TextField.kt | 4 ++-- 15 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Button.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Button.kt index 0ba4157..3456367 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Button.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Button.kt @@ -2,7 +2,7 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import androidx.compose.web.events.SyntheticMouseEvent -import dev.inmo.jsuikit.defaults.modifers.* +import dev.inmo.jsuikit.modifers.* import org.jetbrains.compose.web.attributes.InputType import org.jetbrains.compose.web.attributes.disabled import org.jetbrains.compose.web.dom.* diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Dialog.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Dialog.kt index 80b614e..0d8254f 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Dialog.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Dialog.kt @@ -2,8 +2,8 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffectResult -import dev.inmo.jsuikit.defaults.modifers.UIKitModifier -import dev.inmo.jsuikit.defaults.modifers.include +import dev.inmo.jsuikit.modifers.UIKitModifier +import dev.inmo.jsuikit.modifers.include import org.jetbrains.compose.web.dom.* import org.w3c.dom.HTMLElement import org.w3c.dom.events.Event diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Dropdown.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Dropdown.kt index 7032c6b..7dd774b 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Dropdown.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Dropdown.kt @@ -2,7 +2,7 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import dev.inmo.jsuikit.buildAndAddAttribute -import dev.inmo.jsuikit.defaults.modifers.* +import dev.inmo.jsuikit.modifers.* import dev.inmo.jsuikit.utils.Milliseconds import org.jetbrains.compose.web.dom.ContentBuilder import org.jetbrains.compose.web.dom.Div diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Flex.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Flex.kt index e4fe37a..9a103ab 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Flex.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Flex.kt @@ -1,8 +1,8 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable -import dev.inmo.jsuikit.defaults.modifers.UIKitModifier -import dev.inmo.jsuikit.defaults.modifers.include +import dev.inmo.jsuikit.modifers.UIKitModifier +import dev.inmo.jsuikit.modifers.include import org.jetbrains.compose.web.dom.Div import org.jetbrains.compose.web.dom.ElementScope import org.w3c.dom.HTMLDivElement diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Grid.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Grid.kt index 34733c1..cd3a91f 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Grid.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Grid.kt @@ -1,8 +1,8 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable -import dev.inmo.jsuikit.defaults.modifers.UIKitModifier -import dev.inmo.jsuikit.defaults.modifers.include +import dev.inmo.jsuikit.modifers.UIKitModifier +import dev.inmo.jsuikit.modifers.include import org.jetbrains.compose.web.dom.Div import org.jetbrains.compose.web.dom.ElementScope import org.w3c.dom.HTMLDivElement diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Icon.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Icon.kt index e4eb8e0..97a0ba0 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Icon.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Icon.kt @@ -1,7 +1,7 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable -import dev.inmo.jsuikit.defaults.modifers.* +import dev.inmo.jsuikit.modifers.* import org.jetbrains.compose.web.dom.Button import org.jetbrains.compose.web.dom.Span import org.w3c.dom.events.Event diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Labels.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Labels.kt index d9bf6ad..4124fe2 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Labels.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Labels.kt @@ -1,8 +1,8 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable -import dev.inmo.jsuikit.defaults.modifers.UIKitModifier -import dev.inmo.jsuikit.defaults.modifers.include +import dev.inmo.jsuikit.modifers.UIKitModifier +import dev.inmo.jsuikit.modifers.include import org.jetbrains.compose.web.dom.Span import org.jetbrains.compose.web.dom.Text diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/List.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/List.kt index 9db1498..a3cbe3d 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/List.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/List.kt @@ -2,8 +2,8 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import androidx.compose.runtime.snapshots.SnapshotStateList -import dev.inmo.jsuikit.defaults.modifers.UIKitModifier -import dev.inmo.jsuikit.defaults.modifers.include +import dev.inmo.jsuikit.modifers.UIKitModifier +import dev.inmo.jsuikit.modifers.include import org.jetbrains.compose.web.dom.* import org.w3c.dom.HTMLUListElement diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Nav.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Nav.kt index b566321..2e39dbb 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Nav.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Nav.kt @@ -2,7 +2,7 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import dev.inmo.jsuikit.buildAndAddAttribute -import dev.inmo.jsuikit.defaults.modifers.* +import dev.inmo.jsuikit.modifers.* import dev.inmo.jsuikit.utils.Milliseconds import org.jetbrains.compose.web.dom.* import org.w3c.dom.HTMLLIElement diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Navbar.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Navbar.kt index 62d582c..abca6df 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Navbar.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Navbar.kt @@ -1,8 +1,8 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable -import dev.inmo.jsuikit.defaults.modifers.UIKitModifier -import dev.inmo.jsuikit.defaults.modifers.include +import dev.inmo.jsuikit.modifers.UIKitModifier +import dev.inmo.jsuikit.modifers.include import org.jetbrains.compose.web.dom.Div import org.jetbrains.compose.web.dom.Nav diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/NavbarNavBuilder.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/NavbarNavBuilder.kt index 70317a0..6172f7e 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/NavbarNavBuilder.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/NavbarNavBuilder.kt @@ -1,8 +1,8 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable -import dev.inmo.jsuikit.defaults.modifers.UIKitModifier -import dev.inmo.jsuikit.defaults.modifers.include +import dev.inmo.jsuikit.modifers.UIKitModifier +import dev.inmo.jsuikit.modifers.include import org.jetbrains.compose.web.attributes.AttrsBuilder import org.jetbrains.compose.web.dom.* import org.w3c.dom.HTMLLIElement diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Progress.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Progress.kt index 7eb31b0..545b209 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Progress.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Progress.kt @@ -1,8 +1,8 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable -import dev.inmo.jsuikit.defaults.modifers.UIKitModifier -import dev.inmo.jsuikit.defaults.modifers.include +import dev.inmo.jsuikit.modifers.UIKitModifier +import dev.inmo.jsuikit.modifers.include import org.jetbrains.compose.web.dom.Progress @Composable diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Spinner.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Spinner.kt index c6f3b52..5cc86f8 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Spinner.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Spinner.kt @@ -1,7 +1,7 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable -import dev.inmo.jsuikit.defaults.modifers.* +import dev.inmo.jsuikit.modifers.* import org.jetbrains.compose.web.dom.Div @Composable diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/Table.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/Table.kt index 8b1ef86..f9811e0 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/Table.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/Table.kt @@ -2,7 +2,7 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.Composable import androidx.compose.runtime.snapshots.SnapshotStateList -import dev.inmo.jsuikit.defaults.modifers.* +import dev.inmo.jsuikit.modifers.* import org.jetbrains.compose.web.dom.* @Composable diff --git a/src/main/kotlin/dev/inmo/jsuikit/elements/TextField.kt b/src/main/kotlin/dev/inmo/jsuikit/elements/TextField.kt index 4c996fc..9b0f1e0 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/elements/TextField.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/elements/TextField.kt @@ -1,8 +1,8 @@ package dev.inmo.jsuikit.elements import androidx.compose.runtime.* -import dev.inmo.jsuikit.defaults.modifers.UIKitModifier -import dev.inmo.jsuikit.defaults.modifers.include +import dev.inmo.jsuikit.modifers.UIKitModifier +import dev.inmo.jsuikit.modifers.include import org.jetbrains.compose.web.attributes.* import org.jetbrains.compose.web.dom.Input From 8aaa83f57db71dc8ed6710128042bcf6c20f4948 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 12 Jan 2022 16:33:46 +0600 Subject: [PATCH 4/4] remove redundant package names in calls --- .../kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt | 3 ++- src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt | 2 +- src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt b/src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt index 26d5882..53331d3 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/UIKitAttributeValueBuilder.kt @@ -1,5 +1,6 @@ package dev.inmo.jsuikit +import dev.inmo.jsuikit.modifers.AttributeValue import org.jetbrains.compose.web.attributes.AttrsBuilder class UIKitAttributeValueBuilder { @@ -11,7 +12,7 @@ class UIKitAttributeValueBuilder { } } - infix fun String.to(other: dev.inmo.jsuikit.modifers.AttributeValue?) { + infix fun String.to(other: AttributeValue?) { this to other ?.name } diff --git a/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt index c8de563..6fb5be1 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitAnimation.kt @@ -1,6 +1,6 @@ package dev.inmo.jsuikit.modifers -sealed class UIKitAnimation (name: String) : UIKitModifier, dev.inmo.jsuikit.modifers.AttributeValue(name) { +sealed class UIKitAnimation (name: String) : UIKitModifier, AttributeValue(name) { override val classes: Array = arrayOf("uk-animation-$name") object Fade : UIKitAnimation("fade") diff --git a/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt index 9131610..3ac76b3 100644 --- a/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt +++ b/src/main/kotlin/dev/inmo/jsuikit/modifers/UIKitDropdown.kt @@ -7,7 +7,7 @@ sealed class UIKitDropdown(classname: String) : UIKitModifier { object Grid : UIKitDropdown("uk-dropdown-grid") - sealed class Position(name: String) : dev.inmo.jsuikit.modifers.AttributeValue(name) { + sealed class Position(name: String) : AttributeValue(name) { sealed class Bottom(name: String) : Position("bottom-$name") { @@ -45,14 +45,14 @@ sealed class UIKitDropdown(classname: String) : UIKitModifier { } - sealed class Mode(name: String) : dev.inmo.jsuikit.modifers.AttributeValue(name) { + sealed class Mode(name: String) : AttributeValue(name) { object Click : Mode("click") object Hover : Mode("hover") } - sealed class Flip(name: String) : dev.inmo.jsuikit.modifers.AttributeValue(name) { + sealed class Flip(name: String) : AttributeValue(name) { object True : Flip("true") object False : Flip("false")