Skip to content

Commit

Permalink
Merge pull request #13 from linked-planet/dev
Browse files Browse the repository at this point in the history
Dev v0.5.0
  • Loading branch information
sjahreis authored May 23, 2022
2 parents a4f433c + cb02e6d commit 9f30374
Show file tree
Hide file tree
Showing 10 changed files with 357 additions and 1 deletion.
51 changes: 50 additions & 1 deletion kotlin-js-store/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@
"@babel/runtime" "^7.0.0"
"@emotion/core" "^10.0.9"

"@atlaskit/[email protected]":
version "15.0.3"
resolved "https://registry.yarnpkg.com/@atlaskit/badge/-/badge-15.0.3.tgz#b5f8c4ded902c12e1225f31fa3537e24fb4a1ca4"
integrity sha512-UWc6EJC+Pn3oMFsMitf+psMqxTZHwFmS11DQouCx65RU/qIa9MycH10c1DebsM68dkVtAOWzQJ7YRZka+SApsQ==
dependencies:
"@atlaskit/codemod-utils" "^3.2.0"
"@atlaskit/theme" "^11.4.0"
"@atlaskit/tokens" "^0.2.0"
"@babel/runtime" "^7.0.0"
"@emotion/core" "^10.0.9"

"@atlaskit/[email protected]":
version "11.4.9"
resolved "https://registry.yarnpkg.com/@atlaskit/banner/-/banner-11.4.9.tgz#bcf80e816e53791aa246f5dcd2ad66d76d82d7ca"
Expand Down Expand Up @@ -139,6 +150,19 @@
"@babel/runtime" "^7.0.0"
"@emotion/core" "^10.0.9"

"@atlaskit/button@^16.3.0":
version "16.3.1"
resolved "https://registry.yarnpkg.com/@atlaskit/button/-/button-16.3.1.tgz#51258e70e48c10926660d7088d9416e26ed7d166"
integrity sha512-44lEkbTz/PqQyOt6gB2/RDUEEUcSTsZoHWTXWLMQUXgGLxtKaUya+lznQfngDVUBBoSN3abLXJXkykj/cj5Z3A==
dependencies:
"@atlaskit/analytics-next" "^8.2.0"
"@atlaskit/ds-lib" "^1.4.0"
"@atlaskit/spinner" "^15.1.0"
"@atlaskit/theme" "^12.1.0"
"@atlaskit/tokens" "^0.10.0"
"@babel/runtime" "^7.0.0"
"@emotion/core" "^10.0.9"

"@atlaskit/[email protected]":
version "12.1.10"
resolved "https://registry.yarnpkg.com/@atlaskit/calendar/-/calendar-12.1.10.tgz#b4b7970c62dfe2cc1d654e8bf7c10ed76eff6c07"
Expand Down Expand Up @@ -490,6 +514,21 @@
"@emotion/core" "^10.0.9"
raf-schd "^4.0.3"

"@atlaskit/[email protected]":
version "14.1.6"
resolved "https://registry.yarnpkg.com/@atlaskit/pagination/-/pagination-14.1.6.tgz#9e5a5fba2ad299c1a577ba81936da2d87213403a"
integrity sha512-xy5b2qkmpB1/Ihv09cd8mixTJ1+GOLRFsh+eb16rxVPL+542bVqLP+PLSQXz+TL3an6DZQ8Q2ahpqtUWR5smKQ==
dependencies:
"@atlaskit/analytics-next" "^8.0.0"
"@atlaskit/button" "^16.3.0"
"@atlaskit/codemod-utils" "^4.0.0"
"@atlaskit/ds-lib" "^1.4.0"
"@atlaskit/icon" "^21.10.0"
"@atlaskit/theme" "^12.1.0"
"@babel/runtime" "^7.0.0"
"@emotion/core" "^10.0.9"
memoize-one "^6.0.0"

"@atlaskit/pagination@^14.0.0":
version "14.1.5"
resolved "https://registry.yarnpkg.com/@atlaskit/pagination/-/pagination-14.1.5.tgz#cd839769c7a982e8bca51fac9e5f57068bb14efd"
Expand Down Expand Up @@ -741,7 +780,7 @@
"@babel/runtime" "^7.0.0"
"@emotion/core" "^10.0.9"

"@atlaskit/theme@^11.0.0":
"@atlaskit/theme@^11.0.0", "@atlaskit/theme@^11.4.0":
version "11.5.2"
resolved "https://registry.yarnpkg.com/@atlaskit/theme/-/theme-11.5.2.tgz#43ac3b3a203241ae83b1d62d15912e6c36f465a9"
integrity sha512-iycVcMzGaPboTVu0s+DoeV3oZZGIxXca1IjVtlxERA/78dftYoVTjiBnh6XtAQnIgB0O+SaAOQaaHJZgJ4gwpQ==
Expand Down Expand Up @@ -806,6 +845,16 @@
"@babel/runtime" "^7.0.0"
"@emotion/core" "^10.0.9"

"@atlaskit/tokens@^0.10.0":
version "0.10.0"
resolved "https://registry.yarnpkg.com/@atlaskit/tokens/-/tokens-0.10.0.tgz#34339915b5d9423f3065b4801b050145f6d04ed2"
integrity sha512-y7ClaaFbLSpnS1hwfgkU12vdHY+aZ2h/1DrA/CIPo2yThEirSOhtpTgU6nITnZTKGjNd2oIVvUodK5UZwXAUFA==
dependencies:
"@atlaskit/ds-lib" "^1.4.0"
"@babel/runtime" "^7.0.0"
"@babel/traverse" "^7.15.0"
"@babel/types" "^7.15.0"

"@atlaskit/tokens@^0.2.0":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@atlaskit/tokens/-/tokens-0.2.1.tgz#85b48d52d49688ebaef604949426588ba9c81892"
Expand Down
2 changes: 2 additions & 0 deletions ui-kit-lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies {
// Atlaskit
implementation(npm("@atlaskit/atlassian-navigation", "2.1.3"))
implementation(npm("@atlaskit/avatar", "20.5.7"))
implementation(npm("@atlaskit/badge", "15.0.3"))
implementation(npm("@atlaskit/banner", "11.4.9"))
implementation(npm("@atlaskit/button", "16.2.1"))
implementation(npm("@atlaskit/calendar", "12.1.10"))
Expand All @@ -48,6 +49,7 @@ dependencies {
implementation(npm("@atlaskit/lozenge", "11.1.8"))
implementation(npm("@atlaskit/modal-dialog", "12.2.5"))
implementation(npm("@atlaskit/page-layout", "1.2.0"))
implementation(npm("@atlaskit/pagination", "14.1.6"))
implementation(npm("@atlaskit/panel", "0.4.7"))
implementation(npm("@atlaskit/popup", "1.3.4"))
implementation(npm("@atlaskit/select", "15.2.10"))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Copyright 2022 linked-planet GmbH.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.linkedplanet.uikit.wrapper.ajs

object AJS {
fun getCurrentUserFullname(): String =
js("AJS.Meta.get('current-user-fullname')").toString()

fun getCurrentUsername(): String =
js("AJS.Meta.get('remote-user')").toString()

fun getCurrentUserId(): String =
js("AJS.Meta.get('remote-user-key')").toString()

fun getUserLocale(): String =
js("AJS.Meta.get('user-locale')").toString()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* Copyright 2022 linked-planet GmbH.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:JsModule("@atlaskit/badge")

package com.linkedplanet.uikit.wrapper.atlaskit.badge

import react.ComponentClass
import react.Props

@JsName("default")
external val Badge: ComponentClass<BadgeProps>

external interface BadgeProps : Props {

/**
* Affects the visual style of the badge.
* One of
* - "added",
* - "default",
* - "important",
* - "primary",
* - "primaryInverted",
* - "removed"
*/
var appearance: String

/**
* The maximum value to display. Defaults to 99. If the value is 100, and max is 50, "50+" will be displayed. This
* value should be greater than 0.
*/
var max: Number
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright 2022 linked-planet GmbH.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:JsModule("@atlaskit/icon/glyph/add")

package com.linkedplanet.uikit.wrapper.atlaskit.icon

import react.ComponentClass

@JsName("default")
external val AddIcon: ComponentClass<IconProps>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright 2022 linked-planet GmbH.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:JsModule("@atlaskit/icon/glyph/check-circle-outline")

package com.linkedplanet.uikit.wrapper.atlaskit.icon

import react.ComponentClass

@JsName("default")
external val CheckCircleOutlineIcon: ComponentClass<IconProps>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright 2022 linked-planet GmbH.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:JsModule("@atlaskit/icon/glyph/task")

package com.linkedplanet.uikit.wrapper.atlaskit.icon

import react.ComponentClass

@JsName("default")
external val TaskIcon: ComponentClass<IconProps>
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/**
* Copyright 2022 linked-planet GmbH.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:JsModule("@atlaskit/pagination")

package com.linkedplanet.uikit.wrapper.atlaskit.pagination

import org.w3c.dom.events.Event
import react.*

@JsName("default")
external val Pagination: ComponentClass<PaginationProps>

external interface PaginationProps : Props {

/**
* Replace the built-in Page, Previous, Next and/ or Ellipsis component.
*/
var components: PaginationComponentsProps

/**
* Index of the page to be selected by default.
*/
var defaultSelectedIndex: Int

/**
* Helper function to get text displayed on the page button. It is helpful in scenarios when page the page passed
* in is an object.
*/
var getPageLabel: (page: dynamic, pageIndex: Int) -> String

/**
* The aria-label for the next button.
*/
var nextLabel: String

/**
* The aria-label for the previous button
*/
var previousLabel: String

/**
* Maximum number of pages to be displayed in the pagination.
*/
var max: Int

/**
* Array of the pages to display.
*/
var pages: Array<Int>

/**
* Index of the selected page. This will make this pagination controlled.
*/
var selectedIndex: Int

/**
* The onChange handler which is called when the page is changed.
*/
var onChange: (Event, Int, Event) -> Unit

}

external interface PaginationComponentsProps {
var Page: ReactNode
var Previous: ReactNode
var Next: ReactNode
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,36 @@ external interface NestableNavigationContentProps : Props
external val ButtonItem: ComponentClass<ButtonItemProps>

external interface ButtonItemProps : Props {
/**
* Description of the item. This will render smaller text below the primary text of the item as well as slightly
* increasing the height of the item.
*/
var description: String

/**
* Element to render before the item text. Generally should be an icon component.
*/
var iconBefore: ReactNode

/**
* Element to render after the item text. Generally should be an icon component.
*/
var iconAfter: ReactNode

/**
* Event that is triggered when the element is clicked.
*/
var onClick: (Event) -> Unit

/**
* Makes the element appear selected.
*/
var isSelected: Boolean

/**
* Makes the element appear disabled as well as removing interactivity.
*/
var isDisabled: Boolean
}

@JsName("NestingItem")
Expand Down
Loading

0 comments on commit 9f30374

Please sign in to comment.