Skip to content

Commit

Permalink
fix(*): kongponents alpha phase 10 [KHCP-11172] (#1292)
Browse files Browse the repository at this point in the history
* chore(deps): bump kongponents to preview [KHCP-11172]

* test(kbreadcrumb): update selectors

* fix(app-page-header): remove kbreadcrumb overrides

* test(app-page-header): fix component tests

* chore(deps): bump kongponents

* fix(app-layout): app page header breadcrumbs fixes

* chore(deps): bump kongponents

* fix(kbreadcrumb): minor fix

* chore(deps): bump kongponents
  • Loading branch information
portikM authored Mar 27, 2024
1 parent c79f953 commit 47f01aa
Show file tree
Hide file tree
Showing 30 changed files with 608 additions and 437 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@digitalroute/cz-conventional-changelog-for-jira": "^8.0.1",
"@evilmartians/lefthook": "^1.6.7",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"@rushstack/eslint-patch": "^1.7.2",
"@types/flat": "^5.0.5",
"@types/js-yaml": "^4.0.9",
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics/analytics-chart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"vue": ">= 3.3.13 < 4"
},
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong-ui-public/sandbox-layout": "workspace:^",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"@types/uuid": "^9.0.8",
"file-saver": "^2.0.5",
"lodash.mapkeys": "^4.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/analytics-metric-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@kong-ui-public/analytics-config-store": "workspace:^",
"@kong-ui-public/analytics-utilities": "workspace:^",
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"pinia": ">= 2.1.7 < 3"
}
}
4 changes: 2 additions & 2 deletions packages/analytics/dashboard-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@kong-ui-public/i18n": "workspace:^",
"@kong-ui-public/sandbox-layout": "workspace:^",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"json-schema-to-ts": "^3.0.1",
"pinia": ">= 2.1.7 < 3",
"swrv": "^1.0.4",
Expand Down Expand Up @@ -73,7 +73,7 @@
"@kong-ui-public/analytics-metric-provider": "workspace:^",
"@kong-ui-public/analytics-utilities": "workspace:^",
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"swrv": "^1.0.4",
"vue": ">= 3.3.13 < 4"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics/metric-cards/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"test:unit:open": "cross-env FORCE_COLOR=1 vitest --ui"
},
"peerDependencies": {
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"vue": ">= 3.3.13 < 4"
},
"devDependencies": {
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"vue": "^3.4.21"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/app-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test:unit:open": "cross-env FORCE_COLOR=1 vitest --ui"
},
"peerDependencies": {
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"vue": ">= 3.3.13 < 4",
"vue-router": "^4.3.0"
},
Expand All @@ -51,7 +51,7 @@
},
"devDependencies": {
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"@types/lodash.clonedeep": "^4.5.9",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
Expand Down
21 changes: 11 additions & 10 deletions packages/core/app-layout/sandbox/pages/PageHeaderPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
:breadcrumbs="breadcrumbs"
title="Cats are Cool"
>
<template #icon-home>
<KIcon
class="home-breadcrumb-icon"
color="#169fcc"
icon="immunity"
size="16"
/>
<template #icon-app-layout>
<KongIcon :color="KUI_COLOR_TEXT_DECORATIVE_AQUA" />
</template>
<template #title-before>
<KIcon
Expand Down Expand Up @@ -116,14 +111,20 @@
import { computed, ref } from 'vue'
import type { BadgeMethodAppearance } from '@kong/kongponents'
import { AppAboutSection, AppPageHeader } from '../../src'
import { EditIcon } from '@kong/icons'
import { EditIcon, KongIcon } from '@kong/icons'
import { KUI_COLOR_TEXT_DECORATIVE_AQUA } from '@kong/design-tokens'
const breadcrumbs = computed(() => {
return [
{
key: 'home',
key: 'app-layout',
to: { name: 'home' },
text: 'Home',
text: 'App Layout',
},
{
key: 'app-page-header',
to: { name: 'page-header' },
text: 'App Page Header',
},
]
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('<AppPageHeader />', () => {

cy.get('.kong-ui-app-page-header').should('exist')
cy.getTestId('page-header-breadcrumbs').should('be.visible')
cy.get('.k-breadcrumb-text').should('contain.text', breadcrumbTitle)
cy.get('.breadcrumbs-text').should('contain.text', breadcrumbTitle)
cy.getTestId('page-header-title').should('be.visible')
cy.getTestId('page-header-title').should('contain.text', title)
})
Expand Down Expand Up @@ -53,8 +53,8 @@ describe('<AppPageHeader />', () => {
})

cy.get('.kong-ui-app-page-header').should('exist')
cy.get('.k-breadcrumb-icon-wrapper').should('be.visible')
cy.get('.k-breadcrumb-icon-wrapper').should('contain.text', breadcrumbIcon)
cy.get('.breadcrumbs-icon-container').should('be.visible')
cy.get('.breadcrumbs-icon-container').should('contain.text', breadcrumbIcon)
cy.getTestId('page-header-title-before').should('be.visible')
cy.getTestId('page-header-title-before').should('contain.text', iconText)
cy.getTestId('page-header-title-after').should('be.visible')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
class="page-header-breadcrumbs"
data-testid="page-header-breadcrumbs"
>
<KBreadcrumbs :items="breadcrumbs">
<template #divider>
<span class="page-header-breadcrumb-divider">/</span>
</template>
<KBreadcrumbs
item-max-width="150"
:items="breadcrumbs"
>
<template
v-for="slotName in breadcrumbIconSlots"
#[slotName]
Expand Down Expand Up @@ -64,7 +64,7 @@

<script setup lang="ts">
import type { PropType } from 'vue'
import { computed } from 'vue'
import { computed, useSlots } from 'vue'
import type { BreadcrumbItem } from '@kong/kongponents'
const props = defineProps({
Expand All @@ -78,21 +78,19 @@ const props = defineProps({
},
})
const slots = useSlots()
const hasBreadcrumbs = computed((): boolean => !!props.breadcrumbs?.length)
const getBreadcrumbKey = (item: BreadcrumbItem, idx: number): string => { return item.key || `breadcrumb-${idx}` }
const breadcrumbIconSlots = computed((): string[] => {
return props.breadcrumbs.map((item, idx) => `icon-${getBreadcrumbKey(item, idx)}`) || []
// only return used icon slots
return Object.keys(slots).filter((slotName) => slotName.startsWith('icon-'))
})
</script>

<style lang="scss" scoped>
.kong-ui-app-page-header {
margin-bottom: $kui-space-70;
.page-header-breadcrumb-divider {
color: $kui-color-text-neutral-weak;
}
.page-header-title-section {
align-items: center;
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions packages/core/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": ">= 3.3.13 < 4"
},
Expand All @@ -65,7 +65,7 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"vue": "^3.4.21"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/expressions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"devDependencies": {
"@kong/atc-router": "1.6.0-rc.1",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.105",
"@kong/kongponents": "9.0.0-alpha.123",
"monaco-editor": "0.47.0",
"vite-plugin-monaco-editor": "^1.1.0",
"vite-plugin-top-level-await": "^1.4.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"vue": "^3.4.21"
},
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"@types/lodash": "^4.14.202",
"pug": "^3.0.2"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/core/misc-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"vue": ">= 3.3.13 < 4"
},
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"vue": "^3.4.21"
},
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/sandbox-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"devDependencies": {
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
},
Expand All @@ -62,7 +62,7 @@
"errorLimit": "200KB"
},
"peerDependencies": {
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"vue": ">= 3.3.13 < 4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/entities/entities-certificates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": ">= 3.3.13 < 4",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/entities/entities-consumer-credentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": ">= 3.3.13 < 4",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/entities/entities-consumer-groups/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": ">= 3.3.13 < 4",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/entities/entities-consumers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": ">= 3.3.13 < 4",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/entities/entities-gateway-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": ">= 3.3.13 < 4",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/entities/entities-key-sets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": ">= 3.3.13 < 4",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/entities/entities-keys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
"peerDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": ">= 3.3.13 < 4",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@kong-ui-public/i18n": "workspace:^",
"@kong/design-tokens": "1.12.10",
"@kong/kongponents": "9.0.0-alpha.121",
"@kong/kongponents": "9.0.0-alpha.123",
"axios": "^1.6.8",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
Expand Down
Loading

0 comments on commit 47f01aa

Please sign in to comment.