Skip to content

Commit

Permalink
chore(*): remove k-* classes (#95)
Browse files Browse the repository at this point in the history
* chore(*): remove k-* classes

* chore(*): add eslint rule
  • Loading branch information
Leopoldthecoder authored Sep 15, 2023
1 parent 98c1536 commit 4912830
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ module.exports = {
'vue/no-deprecated-dollar-listeners-api': 'error',
'vue/no-deprecated-events-api': 'error',
'vue/no-deprecated-v-on-native-modifier': 'error',
'vue/no-restricted-class': ['error', ...kongponentUtilityClasses],
'vue/no-restricted-class': ['error', '/^k-/', ...kongponentUtilityClasses],

// a11y
'vuejs-accessibility/label-has-for': 'off',
Expand Down
2 changes: 1 addition & 1 deletion src/components/EntityForm/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const ArrayStringFieldSchema = {
itemContainerComponent: 'FieldArrayItem',
fieldClasses: 'kong-form-array-string-field',
fieldItemsClasses: 'kong-form-array-string-field-item',
inputAttributes: { class: 'k-input', style: { minWidth: '200px' } },
inputAttributes: { class: 'form-control', style: { minWidth: '200px' } },
validator: 'array',
styleClasses: 'kong-form-field-wrapper',
newElementButtonLabel: '+ Add',
Expand Down
4 changes: 2 additions & 2 deletions src/pages/plugins/PluginCardSkeleton.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<KSkeleton
:card-count="cardCount"
class="k-skeleton-25"
class="plugin-card-skeleton"
type="card"
>
<template #card-header>
Expand Down Expand Up @@ -37,7 +37,7 @@ export default {
</script>

<style lang="scss">
.k-skeleton-25 {
.plugin-card-skeleton {
.skeleton-card {
height: 240px;
}
Expand Down
5 changes: 2 additions & 3 deletions src/pages/plugins/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
<div class="plugins-shell">
<PageHeader title="New Plugin">
<div class="plugins-filter-wrapper">
<input
<KInput
v-model="filter"
class="k-input"
type="search"
placeholder="Filter Plugins"
data-testid="plugins-filter"
>
/>
</div>
</PageHeader>
<section
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/ArrayCardContainerFields.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {
type: 'array',
showRemoveButton: false,
newElementButtonLabelClasses: 'k-button btn-link kong-form-new-element-button-label',
newElementButtonLabelClasses: 'kong-form-new-element-button-label',
itemContainerComponent: 'FieldArrayCardContainer',
fieldClasses: 'array-card-container-wrapper',
}
2 changes: 1 addition & 1 deletion src/schemas/MetricFields.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {
type: 'array',
showRemoveButton: false,
newElementButtonLabelClasses: 'k-button btn-primary kong-form-new-element-button-label',
newElementButtonLabelClasses: 'kong-form-new-element-button-label',
itemContainerComponent: 'FieldMetric',
fieldClasses: 'metrics-wrapper',
}
2 changes: 1 addition & 1 deletion src/schemas/typedefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const fields = {
fieldClasses: 'kong-form-array-field',
fieldItemsClasses: 'kong-form-array-field-item',
newElementButtonLabelClasses: 'kong-form-new-element-button-label',
inputAttributes: { class: 'k-input', style: { minWidth: '200px' }, ...inputAttributes },
inputAttributes: { class: 'form-control', style: { minWidth: '200px' }, ...inputAttributes },
removeElementButtonLabel: 'remove',
styleClasses: 'kong-form-field-wrapper',
inputType: 'text',
Expand Down
1 change: 0 additions & 1 deletion src/styles/form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ fieldset {
.kong-form-array-field-item {
display: flex;
margin-top: $kui-space-40;
width: 50%;
}

.kong-form-array-string-field-item {
Expand Down

0 comments on commit 4912830

Please sign in to comment.