@kiva/kv-components 2.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{.eslintrc.js → .eslintrc.cjs} +1 -1
- package/CHANGELOG.md +69 -0
- package/__mocks__/ResizeObserver.js +13 -0
- package/package.json +23 -10
- package/{postcss.config.js → postcss.config.cjs} +2 -2
- package/{tailwind.config.js → tailwind.config.cjs} +3 -3
- package/tests/unit/jest-setup.js +5 -0
- package/tests/unit/specs/components/KvButton.spec.js +38 -25
- package/tests/unit/specs/components/KvCarousel.spec.js +11 -0
- package/tests/unit/specs/components/KvCheckbox.spec.js +73 -14
- package/tests/unit/specs/components/KvLightbox.spec.js +14 -0
- package/tests/unit/specs/components/KvProgressBar.spec.js +11 -0
- package/tests/unit/specs/components/KvRadio.spec.js +94 -5
- package/tests/unit/specs/components/KvSelect.spec.js +113 -0
- package/tests/unit/specs/components/KvSwitch.spec.js +92 -33
- package/tests/unit/specs/components/KvTabPanel.spec.js +32 -0
- package/tests/unit/specs/components/KvTabs.spec.js +167 -0
- package/tests/unit/specs/components/KvTextInput.spec.js +86 -9
- package/tests/unit/specs/components/KvTextLink.spec.js +16 -24
- package/tests/unit/specs/components/KvToast.spec.js +11 -0
- package/tests/unit/utils/addVueRouter.js +24 -0
- package/utils/attrs.js +62 -0
- package/utils/{themeUtils.js → themeUtils.cjs} +0 -0
- package/vue/.storybook/{main.js → main.cjs} +13 -5
- package/vue/.storybook/preview.js +6 -1
- package/vue/KvButton.vue +75 -53
- package/vue/KvCarousel.vue +142 -106
- package/vue/KvCheckbox.vue +86 -60
- package/vue/KvContentfulImg.vue +45 -34
- package/vue/KvLightbox.vue +108 -69
- package/vue/KvProgressBar.vue +33 -19
- package/vue/KvRadio.vue +72 -41
- package/vue/KvSelect.vue +46 -20
- package/vue/KvSwitch.vue +55 -33
- package/vue/KvTab.vue +49 -21
- package/vue/KvTabPanel.vue +26 -6
- package/vue/KvTabs.vue +73 -55
- package/vue/KvTextInput.vue +71 -48
- package/vue/KvTextLink.vue +42 -20
- package/vue/KvThemeProvider.vue +1 -1
- package/vue/KvToast.vue +53 -37
- package/vue/stories/KvCheckbox.stories.js +5 -5
- package/vue/stories/KvSwitch.stories.js +2 -2
- package/vue/stories/KvTabs.stories.js +8 -8
- package/vue/stories/KvTextInput.stories.js +1 -1
- package/vue/stories/KvThemeProvider.stories.js +1 -1
- package/vue/stories/KvToast.stories.js +3 -2
- package/vue/stories/StyleguidePrimitives.stories.js +9 -9
- package/.babelrc +0 -16
- package/jest.config.js +0 -36
|
@@ -49,8 +49,9 @@ const Template = (args, {
|
|
|
49
49
|
</div>
|
|
50
50
|
</div>`,
|
|
51
51
|
methods: {
|
|
52
|
-
showToast(
|
|
53
|
-
this.$refs.toastRef
|
|
52
|
+
showToast(messageInput, type, persistInput) {
|
|
53
|
+
console.log(this.$refs.toastRef);
|
|
54
|
+
this.$refs.toastRef.show(messageInput, type, persistInput);
|
|
54
55
|
},
|
|
55
56
|
onClose() {
|
|
56
57
|
console.log('toast closed');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import resolveConfig from 'tailwindcss/resolveConfig'; // eslint-disable-line import/no-extraneous-dependencies
|
|
2
|
-
import tailwindConfig from '@kiva/kv-tokens/configs/tailwind.config';
|
|
3
|
-
import { textStyles } from '@kiva/kv-tokens/configs/kivaTypography';
|
|
2
|
+
import tailwindConfig from '@kiva/kv-tokens/configs/tailwind.config.cjs';
|
|
3
|
+
import { textStyles } from '@kiva/kv-tokens/configs/kivaTypography.cjs';
|
|
4
4
|
import KvGrid from '../KvGrid.vue';
|
|
5
5
|
import KvPageContainer from '../KvPageContainer.vue';
|
|
6
6
|
import KvTab from '../KvTab.vue';
|
|
@@ -8,7 +8,7 @@ import KvTabs from '../KvTabs.vue';
|
|
|
8
8
|
import KvTabPanel from '../KvTabPanel.vue';
|
|
9
9
|
import KvToast from '../KvToast.vue';
|
|
10
10
|
|
|
11
|
-
const { headerNumberCase, kebabCase, removeObjectProperty } = require('../../utils/themeUtils');
|
|
11
|
+
const { headerNumberCase, kebabCase, removeObjectProperty } = require('../../utils/themeUtils.cjs');
|
|
12
12
|
|
|
13
13
|
const config = resolveConfig(tailwindConfig);
|
|
14
14
|
const { theme } = config;
|
|
@@ -50,8 +50,8 @@ export const Primitives = (args, { argTypes }) => ({
|
|
|
50
50
|
<h2 class="tw-mb-4">Background Colors</h2>
|
|
51
51
|
<kv-tabs>
|
|
52
52
|
<template #tabNav>
|
|
53
|
-
<kv-tab for="bg_themable">Themable</kv-tab>
|
|
54
|
-
<kv-tab for="bg_static">Static</kv-tab>
|
|
53
|
+
<kv-tab for-panel="bg_themable">Themable</kv-tab>
|
|
54
|
+
<kv-tab for-panel="bg_static">Static</kv-tab>
|
|
55
55
|
</template>
|
|
56
56
|
<template #tabPanels>
|
|
57
57
|
<kv-tab-panel id="bg_themable">
|
|
@@ -118,8 +118,8 @@ export const Primitives = (args, { argTypes }) => ({
|
|
|
118
118
|
<h2 class="tw-mb-4">Text Colors</h2>
|
|
119
119
|
<kv-tabs>
|
|
120
120
|
<template #tabNav>
|
|
121
|
-
<kv-tab for="text_themable">Themable</kv-tab>
|
|
122
|
-
<kv-tab for="text_static">Static</kv-tab>
|
|
121
|
+
<kv-tab for-panel="text_themable">Themable</kv-tab>
|
|
122
|
+
<kv-tab for-panel="text_static">Static</kv-tab>
|
|
123
123
|
</template>
|
|
124
124
|
<template #tabPanels>
|
|
125
125
|
<kv-tab-panel id="text_themable">
|
|
@@ -174,8 +174,8 @@ export const Primitives = (args, { argTypes }) => ({
|
|
|
174
174
|
<h2 class="tw-mb-4">Border/Ring Colors</h2>
|
|
175
175
|
<kv-tabs>
|
|
176
176
|
<template #tabNav>
|
|
177
|
-
<kv-tab for="border_themable">Themable</kv-tab>
|
|
178
|
-
<kv-tab for="border_static">Static</kv-tab>
|
|
177
|
+
<kv-tab for-panel="border_themable">Themable</kv-tab>
|
|
178
|
+
<kv-tab for-panel="border_static">Static</kv-tab>
|
|
179
179
|
</template>
|
|
180
180
|
<template #tabPanels>
|
|
181
181
|
<kv-tab-panel id="border_themable">
|
package/.babelrc
DELETED
package/jest.config.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* For a detailed explanation regarding each configuration property, visit:
|
|
3
|
-
* https://jestjs.io/docs/configuration
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
testMatch: ['**/unit/specs/**/*.spec.js'],
|
|
8
|
-
|
|
9
|
-
// Automatically clear mock calls and instances between every test
|
|
10
|
-
clearMocks: true,
|
|
11
|
-
|
|
12
|
-
// Indicates whether the coverage information should be collected while executing the test
|
|
13
|
-
collectCoverage: false,
|
|
14
|
-
|
|
15
|
-
// The directory where Jest should output its coverage files
|
|
16
|
-
// coverageDirectory: 'coverage',
|
|
17
|
-
|
|
18
|
-
// Indicates which provider should be used to instrument code for coverage
|
|
19
|
-
// coverageProvider: 'v8',
|
|
20
|
-
|
|
21
|
-
// An array of file extensions your modules use
|
|
22
|
-
moduleFileExtensions: [
|
|
23
|
-
'js',
|
|
24
|
-
'json',
|
|
25
|
-
'vue',
|
|
26
|
-
],
|
|
27
|
-
|
|
28
|
-
// The test environment that will be used for testing
|
|
29
|
-
testEnvironment: 'jsdom',
|
|
30
|
-
|
|
31
|
-
// A map from regular expressions to paths to transformers
|
|
32
|
-
transform: {
|
|
33
|
-
'^.+\\.vue$': 'vue-jest',
|
|
34
|
-
'^.+\\.js$': 'babel-jest',
|
|
35
|
-
},
|
|
36
|
-
};
|