Migrating to version 9
This guide is primarily for users of Kongponents v8
who want to browse the breaking changes they may encounter when upgrading to Kongponents v9
.
This is not something you have to read from top to bottom before trying out the new version.
If you notice any breaking changes we missed, we invite you to open an issue.
General Breaking Changes
Styles
Kongponents styles are no longer designed to be utilized standalone, separately from the Vue components. Any standalone imports of the exported styles or Sass variables and/or mixins are no longer supported.
Breaking Component Changes
KAlert
Props
Slots
Events
Structure
Constants, Types & Interfaces
appearances
const is no longer exported by the KAlert component. Instead, you can importAlertAppearances
from@kong/kongponents
directly.
KBadge
Structure
Constants, Types & Interfaces
Props
Slots
KBreadcrumbs
KButton
Props
- some values
appearance
prop accepts were changed:outline
has been removed (we suggest usingsecondary
instead)creation
has been removed (we suggest usingprimary
instead)btn-link
is no longer accepted (we suggest usingtertiary
instead)btn-link-danger
has been removedaction-active
has been removed
showCaret
prop is removedcaretColor
prop is removedisRounded
prop is removedicon
prop is removed (TODO: [beta])
Slots
icon
slot is removed (TODO: [beta])
Structure
icon-btn
class has been renamed toicon-button
Constants, Types & Interfaces
appearances
andsizes
constants are no longer exported by the KButton component. Instead, you can importButtonAppearances
andButtonSizes
from@kong/kongponents
directly
KCard
KCatalog
KCheckbox
Props
testMode
prop has been removedhelp
property oflabelAttributes
prop has been deprecated in favor ofinfo
Structure
k-input
class has been changed tocheckbox-input
k-checkbox-label
class has been changed tocheckbox-label
k-checkbox-description
class has been changed tocheckbox-description
has-desc
class has been been changed tohas-description
KCodeBlock
Props
- New
maxHeight
prop to control themax-height
of the code block. Defaults tonone
Slots
Events
Structure
Constants, Types & Interfaces
KCollapse
KDateTimePicker
KDropdownMenu
Component has been renamed to KDropdown
Props
label
prop has been deprecated in favor of the newtrigger-text
prop (usage is the same)appearance
prop has been changed in favor of theselectionMenu
prop for the selection menu functionality.appearance
now controls the underlyingKButton
appearance
prop (note that defaultappearance
for component whenselectionMenu
istrue
changed fromtertiary
toprimary
)buttonAppearance
prop has been removed in favor ofappearance
, still controlling theKButton
appearance
proptestMode
prop has been removedicon
prop is removed (TODO: [beta])caretColor
prop is removedisDangerous
KDropdownItem
prop has been deprecated in favor ofdanger
Structure
k-dropdown-menu
class has been removed (k-dropdown
class remains)k-dropdown-menu-popover
testid
data attribute has been renamed tok-dropdown-popover
k-dropdown-trigger
class has been removedk-dropdown-trigger
testid
data attribute has been renamed todropdown-trigger
k-dropdown-btn
class has been renamed todropdown-trigger-button
k-dropdown-btn
testid
data attribute has been renamed todropdown-trigger-button
k-dropdown-list
class has been removedk-dropdown-list
testid
data attribute has been renamed todropdown-list
k-dropdown-selected-option
class has been renamed todropdown-selected-option
k-dropdown-item-trigger
class has been renamed todropdown-item-trigger
k-dropdown-item-trigger-label
class has been renamed todropdown-item-trigger-label
- dynamic
k-dropdown-item
testid
data attribute has been renamed todropdown-item
Constants, Types & Interfaces
AppearanceArray
const has been removedAppearance
type has been removed
KEmptyState
KExternalLink
KFileUpload
KIcon
KInlineEdit
KInput
Props
overlayLabel
prop has been removedsize
prop has been removed (KInput only comes in 1 size now)iconPosition
prop has been removedtestMode
prop has been removedhelp
property oflabelAttributes
prop has been deprecated in favor ofinfo
hasError
prop has been deprecated in favor oferror
Slots
icon
slot has been removed. Instead, you can use newbefore
and/orafter
slots to provide icons on the left/right, inside the input
Events
icon:click
event has been removed. Instead, when usingbefore
and/orafter
slots, you can provide your custom click handlers bound to clicks on slotted content. See KInput's slots for more details
Structure
form-control
class has been removedover-char-limit
class has been removedhelp
class has been changed tohelp-text
Constants, Types & Interfaces
SizeArray
andIconPositionArray
constants have been removedSize
andIconPosition
types have been removed
KInputSwitch
KLabel
Props
help
prop has been deprecated in favor ofinfo
testMode
prop has been removed
Structure
k-input-label
class has been renamed tok-label
KMenu
KMethod Badge
KModal
Props
- New
maxWidth
prop to control themax-width
of the modal. Defaults to500px
Slots
Events
Structure
Constants, Types & Interfaces
KModalFullscreen
KMultiselect
KPagination
KPopover
KPrompt
Props
- New
maxHeight
prop to control themax-height
of the prompt. Defaults to400px
Slots
Events
Constants, Types & Interfaces
Komponent
Removed as of v9
. Use KComponent
instead.
Kooltip
Removed as of v9
. Use KTooltip
instead.
KRadio
Props
testMode
prop has been removedtype
prop has been deprecated in favor ofcard
prophelp
property oflabelAttributes
prop has been deprecated in favor ofinfo
Structure
k-input
class on theinput[type="radio"]
has been changed toradio-input
k-radio-default
class has been removedk-radio-card
class has been changed toradio-card
k-radio-label
class has been changed toradio-label
. If you were usingk-radio-label
to leverage preconfigured KRadio styles we suggest passing the label content through thelabel
propk-radio-description
class has been changed toradio-description
. If you were usingk-radio-description
to leverage preconfigured KRadio styles we suggest passing the label content through thedescription
prop
Krumbs
Removed as of v9
. Use KBreadcumbs
instead.