From a782959d337a19c7513627eab33a36034b71cbc0 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 4 Apr 2021 02:53:54 +0200 Subject: Extract blueprintjs to an independent library --- sw-ui/build.gradle.kts | 9 +- .../kotlin/com/palantir/blueprintjs/BpButtons.kt | 135 -------- .../kotlin/com/palantir/blueprintjs/BpCallout.kt | 27 -- .../main/kotlin/com/palantir/blueprintjs/BpCard.kt | 29 -- .../kotlin/com/palantir/blueprintjs/BpDialog.kt | 46 --- .../kotlin/com/palantir/blueprintjs/BpDivider.kt | 21 -- .../kotlin/com/palantir/blueprintjs/BpHtmlTable.kt | 27 -- .../main/kotlin/com/palantir/blueprintjs/BpIcon.kt | 73 ----- .../kotlin/com/palantir/blueprintjs/BpInputs.kt | 63 ---- .../com/palantir/blueprintjs/BpNonIdealState.kt | 34 -- .../kotlin/com/palantir/blueprintjs/BpOverlay.kt | 160 ---------- .../kotlin/com/palantir/blueprintjs/BpPopover.kt | 128 -------- .../kotlin/com/palantir/blueprintjs/BpSpinner.kt | 38 --- .../main/kotlin/com/palantir/blueprintjs/BpTag.kt | 81 ----- .../main/kotlin/com/palantir/blueprintjs/BpText.kt | 30 -- .../kotlin/com/palantir/blueprintjs/blueprintjs.kt | 331 -------------------- .../com/palantir/blueprintjs/blueprintjsHelpers.kt | 347 --------------------- .../ui/components/errors/ErrorDialog.kt | 13 +- .../ui/components/game/BoardSummary.kt | 6 +- .../sevenwonders/ui/components/game/GameScene.kt | 12 +- .../luxons/sevenwonders/ui/components/game/Hand.kt | 9 +- .../ui/components/game/HandRotationIndicator.kt | 2 +- .../ui/components/game/PreparedMove.kt | 7 +- .../sevenwonders/ui/components/game/ScoreTable.kt | 2 +- .../ui/components/game/TransactionsSelector.kt | 2 +- .../ui/components/gameBrowser/CreateGameForm.kt | 9 +- .../ui/components/gameBrowser/GameBrowser.kt | 4 +- .../ui/components/gameBrowser/GameList.kt | 5 +- .../ui/components/gameBrowser/PlayerInfo.kt | 2 +- .../ui/components/home/ChooseNameForm.kt | 11 +- .../sevenwonders/ui/components/lobby/Lobby.kt | 22 +- .../ui/components/lobby/RadialPlayerList.kt | 4 +- 32 files changed, 68 insertions(+), 1621 deletions(-) delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpButtons.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpCallout.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpCard.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpDialog.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpDivider.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpHtmlTable.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpIcon.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpInputs.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpNonIdealState.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpOverlay.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpPopover.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpSpinner.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpTag.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpText.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/blueprintjs.kt delete mode 100644 sw-ui/src/main/kotlin/com/palantir/blueprintjs/blueprintjsHelpers.kt diff --git a/sw-ui/build.gradle.kts b/sw-ui/build.gradle.kts index 3031c7a6..9965ce85 100644 --- a/sw-ui/build.gradle.kts +++ b/sw-ui/build.gradle.kts @@ -47,8 +47,13 @@ kotlin { implementation(npm("styled-components", styledComponentsVersion)) implementation(npm("inline-style-prefixer", "6.0.0")) - implementation(npm("@blueprintjs/core", "3.38.1")) - implementation(npm("@blueprintjs/icons", "3.24.0")) + val bpCoreVersion = "3.42.0" + val bpIconsVersion = "3.26.0" + val bpWrapperVersion = "1" + implementation("org.hildan.blueprintjs:kotlin-blueprintjs-core:$bpCoreVersion-$bpWrapperVersion") + implementation("org.hildan.blueprintjs:kotlin-blueprintjs-icons:$bpIconsVersion-$bpWrapperVersion") + implementation(npm("@blueprintjs/core", bpCoreVersion)) + implementation(npm("@blueprintjs/icons", bpIconsVersion)) } } test { diff --git a/sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpButtons.kt b/sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpButtons.kt deleted file mode 100644 index 7438e0ba..00000000 --- a/sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpButtons.kt +++ /dev/null @@ -1,135 +0,0 @@ -@file:JsModule("@blueprintjs/core") - -package com.palantir.blueprintjs - -import org.w3c.dom.HTMLElement -import org.w3c.dom.events.MouseEvent -import react.PureComponent -import react.RState -import react.ReactElement - -/** - * Interface for a clickable action, such as a button or menu item. - * These props can be spready directly to a `