bonkers-ui 1.0.33 → 1.0.35
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/package.json +32 -53
- package/src/components/ui-badge/ui-badge.vue +5 -0
- package/src/components/ui-button/ui-button.test.ts +5 -1
- package/src/components/ui-card-cta/ui-card-cta.stories.ts +1 -1
- package/src/components/ui-icon/_typings.ts +1 -1
- package/src/components/ui-icon/ui-icon.stories.ts +1 -1
- package/src/components/ui-icon-wrapper/ui-icon-wrapper.stories.ts +1 -1
- package/src/components/ui-list-item/ui-list-item.vue +1 -1
- package/src/components/ui-order-card/ui-order-card.stories.ts +2 -2
- package/src/components/ui-radio-fancy/ui-radio-fancy.vue +24 -26
- package/src/components/ui-result-card-range/ui-result-card-range.stories.ts +6 -6
- package/tsconfig.json +1 -1
- package/vitest.config.ts +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bonkers-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"storybook": "start-storybook -p 6006",
|
|
@@ -8,75 +8,54 @@
|
|
|
8
8
|
"lint:script": "eslint --fix './src/**/*.{ts,tsx,vue}'",
|
|
9
9
|
"lint:style": "stylelint --fix './src/**/*.{css,scss,vue}'",
|
|
10
10
|
"lint:markup": "vue-tsc --noEmit",
|
|
11
|
-
"test": "jest",
|
|
12
11
|
"deploy": "gh-pages -d storybook-static",
|
|
13
12
|
"typecheck": "tsc --noEmit && vue-tsc --noEmit",
|
|
13
|
+
"test": "vitest run",
|
|
14
14
|
"i": "yarn install --frozen-lockfile"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@fortawesome/fontawesome-svg-core": "^6.2.
|
|
18
|
-
"@fortawesome/free-brands-svg-icons": "^6.2.
|
|
19
|
-
"@fortawesome/free-regular-svg-icons": "^6.2.
|
|
20
|
-
"@fortawesome/free-solid-svg-icons": "^6.2.
|
|
21
|
-
"@fortawesome/vue-fontawesome": "^3.0.
|
|
22
|
-
"@vueuse/components": "^9.
|
|
23
|
-
"@vueuse/core": "^9.
|
|
24
|
-
"vue": "^3.2.
|
|
17
|
+
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
|
18
|
+
"@fortawesome/free-brands-svg-icons": "^6.2.1",
|
|
19
|
+
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
20
|
+
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
21
|
+
"@fortawesome/vue-fontawesome": "^3.0.2",
|
|
22
|
+
"@vueuse/components": "^9.10.0",
|
|
23
|
+
"@vueuse/core": "^9.10.0",
|
|
24
|
+
"vue": "^3.2.45"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@storybook/addon-actions": "^6.5.
|
|
28
|
-
"@storybook/addon-essentials": "^6.5.
|
|
29
|
-
"@storybook/addon-links": "^6.5.
|
|
27
|
+
"@storybook/addon-actions": "^6.5.15",
|
|
28
|
+
"@storybook/addon-essentials": "^6.5.15",
|
|
29
|
+
"@storybook/addon-links": "^6.5.15",
|
|
30
30
|
"@storybook/addon-postcss": "^2.0.0",
|
|
31
|
-
"@storybook/builder-vite": "^0.2.
|
|
32
|
-
"@storybook/vue3": "^6.5.
|
|
33
|
-
"@
|
|
34
|
-
"@typescript-eslint/
|
|
35
|
-
"@
|
|
36
|
-
"@vitejs/plugin-vue": "^3.2.0",
|
|
31
|
+
"@storybook/builder-vite": "^0.2.7",
|
|
32
|
+
"@storybook/vue3": "^6.5.15",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^5.48.1",
|
|
34
|
+
"@typescript-eslint/parser": "^5.48.1",
|
|
35
|
+
"@vitejs/plugin-vue": "^4.0.0",
|
|
37
36
|
"@vue/eslint-config-typescript": "^11.0.2",
|
|
38
|
-
"@vue/test-utils": "^2.2.
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"eslint": "8.26.0",
|
|
42
|
-
"eslint-plugin-vue": "^9.6.0",
|
|
37
|
+
"@vue/test-utils": "^2.2.7",
|
|
38
|
+
"eslint": "8.31.0",
|
|
39
|
+
"eslint-plugin-vue": "^9.8.0",
|
|
43
40
|
"gh-pages": "^4.0.0",
|
|
44
|
-
"husky": "4",
|
|
45
|
-
"
|
|
46
|
-
"lint-staged": "^13.0
|
|
47
|
-
"postcss": "^8.4.
|
|
41
|
+
"husky": "4.3.8",
|
|
42
|
+
"jsdom": "^21.0.0",
|
|
43
|
+
"lint-staged": "^13.1.0",
|
|
44
|
+
"postcss": "^8.4.21",
|
|
48
45
|
"postcss-html": "^1.4.1",
|
|
49
46
|
"storybook-tailwind-dark-mode": "^1.0.15",
|
|
50
|
-
"stylelint": "^14.
|
|
47
|
+
"stylelint": "^14.16.1",
|
|
51
48
|
"stylelint-config-recommended": "^9.0.0",
|
|
52
49
|
"stylelint-config-recommended-vue": "^1.4.0",
|
|
53
50
|
"stylelint-config-standard": "^29.0.0",
|
|
54
|
-
"tailwindcss": "^3.2.
|
|
55
|
-
"ts-jest": "^27.0.7",
|
|
51
|
+
"tailwindcss": "^3.2.4",
|
|
56
52
|
"ts-node": "^10.9.1",
|
|
57
|
-
"typescript": "^4.
|
|
58
|
-
"vite": "^
|
|
53
|
+
"typescript": "^4.9.4",
|
|
54
|
+
"vite": "^4.0.4",
|
|
55
|
+
"vitest": "^0.27.0",
|
|
59
56
|
"vue-eslint-parser": "^9.1.0",
|
|
60
|
-
"vue-loader": "^17.0.
|
|
61
|
-
"vue-tsc": "^1.0.
|
|
62
|
-
},
|
|
63
|
-
"jest": {
|
|
64
|
-
"preset": "ts-jest",
|
|
65
|
-
"moduleFileExtensions": [
|
|
66
|
-
"vue",
|
|
67
|
-
"js",
|
|
68
|
-
"jsx",
|
|
69
|
-
"ts"
|
|
70
|
-
],
|
|
71
|
-
"testEnvironment": "jsdom",
|
|
72
|
-
"moduleNameMapper": {
|
|
73
|
-
"^@/(.*)$": "<rootDir>/src/$1"
|
|
74
|
-
},
|
|
75
|
-
"transform": {
|
|
76
|
-
".*\\.(js)$": "babel-jest",
|
|
77
|
-
"^.+\\.tsx?$": "ts-jest",
|
|
78
|
-
".*\\.(vue)$": "@vue/vue3-jest"
|
|
79
|
-
}
|
|
57
|
+
"vue-loader": "^17.0.1",
|
|
58
|
+
"vue-tsc": "^1.0.24"
|
|
80
59
|
},
|
|
81
60
|
"lint-staged": {
|
|
82
61
|
"*.{ts,tsx,vue}": [
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
size === EBadgeSize.MEDIUM && 'px-xs py-xs',
|
|
12
12
|
size === EBadgeSize.LARGE && 'px-sm py-xs',
|
|
13
|
+
elipsis && 'max-w-full',
|
|
13
14
|
]"
|
|
14
15
|
>
|
|
15
16
|
<ui-icon
|
|
@@ -23,6 +24,9 @@
|
|
|
23
24
|
:size="getBadgeSize"
|
|
24
25
|
:weight="ETextWeight.SEMI_BOLD"
|
|
25
26
|
class="whitespace-nowrap"
|
|
27
|
+
:class="[
|
|
28
|
+
elipsis && 'overflow-hidden overflow-ellipsis',
|
|
29
|
+
]"
|
|
26
30
|
>
|
|
27
31
|
<slot />
|
|
28
32
|
</ui-typography>
|
|
@@ -40,6 +44,7 @@
|
|
|
40
44
|
size?: EBadgeSize;
|
|
41
45
|
kind?: EBadgeKind;
|
|
42
46
|
icon?: TIconName;
|
|
47
|
+
elipsis?: boolean;
|
|
43
48
|
}>();
|
|
44
49
|
|
|
45
50
|
const slots = useSlots();
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { mount } from "@vue/test-utils";
|
|
2
2
|
import UiButton from "./ui-button.vue";
|
|
3
|
+
import { test, expect } from "vitest";
|
|
4
|
+
|
|
5
|
+
test("VButton.test.ts", async () => {
|
|
6
|
+
expect(UiButton).toBeTruthy();
|
|
3
7
|
|
|
4
|
-
describe("VButton.test.ts", () => {
|
|
5
8
|
it("renders props.msg when passed", () => {
|
|
6
9
|
const className = "message";
|
|
7
10
|
const wrapper = mount(UiButton, {
|
|
@@ -12,4 +15,5 @@ describe("VButton.test.ts", () => {
|
|
|
12
15
|
|
|
13
16
|
expect(wrapper.classes()).toContain(className);
|
|
14
17
|
});
|
|
18
|
+
|
|
15
19
|
});
|
|
@@ -37,7 +37,7 @@ const Template: Story<TComponentProps> = (args) => ({
|
|
|
37
37
|
<ui-card-cta v-bind="args">
|
|
38
38
|
<template #icon>
|
|
39
39
|
<ui-icon-wrapper>
|
|
40
|
-
<ui-icon :icon-name="['far', '
|
|
40
|
+
<ui-icon :icon-name="['far', 'face-smile']" :size=ESize.MD />
|
|
41
41
|
</ui-icon-wrapper>
|
|
42
42
|
</template>
|
|
43
43
|
|
|
@@ -30,7 +30,7 @@ const Template: Story<TComponentProps> = (args) => ({
|
|
|
30
30
|
},
|
|
31
31
|
// And then the `args` are bound to your component with `v-bind="args"`
|
|
32
32
|
template: `
|
|
33
|
-
<ui-icon v-bind="args" :icon-name="['far', '
|
|
33
|
+
<ui-icon v-bind="args" :icon-name="['far', 'face-smile']" />
|
|
34
34
|
`,
|
|
35
35
|
});
|
|
36
36
|
|
|
@@ -46,7 +46,7 @@ const Template: Story<TComponentProps> = (args) => ({
|
|
|
46
46
|
</ui-icon-wrapper>
|
|
47
47
|
|
|
48
48
|
<ui-icon-wrapper kind="primary" v-bind="args">
|
|
49
|
-
<ui-icon :icon-name="['far', '
|
|
49
|
+
<ui-icon :icon-name="['far', 'face-smile']" :size=ESize.LG />
|
|
50
50
|
<UiNotificationBadge slot="badge" :origin=EBadgeOrigin.DEFAULT>
|
|
51
51
|
2
|
|
52
52
|
</UiNotificationBadge>
|
|
@@ -30,7 +30,7 @@ const Template: Story<TComponentProps> = (args) => ({
|
|
|
30
30
|
},
|
|
31
31
|
|
|
32
32
|
template: /*html*/`
|
|
33
|
-
<ui-order-card v-bind="args" :iconName="['far', '
|
|
33
|
+
<ui-order-card v-bind="args" :iconName="['far', 'face-smile']">
|
|
34
34
|
<template #title>
|
|
35
35
|
Thank you for your order!
|
|
36
36
|
</template>
|
|
@@ -44,7 +44,7 @@ const Template: Story<TComponentProps> = (args) => ({
|
|
|
44
44
|
</template>
|
|
45
45
|
</ui-order-card>
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
|
|
48
48
|
`,
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<label
|
|
3
|
-
class="
|
|
3
|
+
class="
|
|
4
|
+
ui-radio-fancy
|
|
5
|
+
relative
|
|
6
|
+
|
|
7
|
+
"
|
|
4
8
|
:class="disabled && 'pointer-events-none'"
|
|
5
9
|
>
|
|
6
10
|
<input
|
|
@@ -8,7 +12,7 @@
|
|
|
8
12
|
type="radio"
|
|
9
13
|
:name="name"
|
|
10
14
|
:value="value"
|
|
11
|
-
class="peer group appearance-none absolute
|
|
15
|
+
class="peer group appearance-none absolute"
|
|
12
16
|
>
|
|
13
17
|
<div
|
|
14
18
|
class="
|
|
@@ -23,38 +27,32 @@
|
|
|
23
27
|
hover:border-secondary-alt-700
|
|
24
28
|
cursor-pointer
|
|
25
29
|
rounded-xl
|
|
30
|
+
|
|
31
|
+
before:absolute
|
|
32
|
+
before:-z-10
|
|
33
|
+
before:box-border
|
|
34
|
+
before:rounded-[16px]
|
|
35
|
+
before:bg-primary-300
|
|
36
|
+
|
|
26
37
|
peer-checked:border-transparent
|
|
27
38
|
peer-checked:active:shadow-border-primary
|
|
39
|
+
peer-checked:active:before:-top-xs
|
|
40
|
+
peer-checked:active:before:-bottom-xs
|
|
41
|
+
peer-checked:active:before:-left-xs
|
|
42
|
+
peer-checked:active:before:-right-xs
|
|
43
|
+
|
|
28
44
|
peer-checked:hover:shadow-border-selected
|
|
29
45
|
peer-checked:shadow-selected-shadow
|
|
30
|
-
|
|
31
|
-
peer-focus:before:-top-xs
|
|
32
|
-
peer-focus:before:-bottom-xs
|
|
33
|
-
peer-focus:before:-left-xs
|
|
34
|
-
peer-focus:before:-right-xs
|
|
35
|
-
peer-focus:before:bg-primary-300
|
|
36
|
-
peer-focus:before:rounded-[20px]
|
|
37
|
-
peer-focus:before:box-border
|
|
38
|
-
peer-focus:before:-z-10
|
|
39
|
-
peer-active:before:absolute
|
|
46
|
+
|
|
40
47
|
peer-active:before:-top-xxs
|
|
41
48
|
peer-active:before:-bottom-xxs
|
|
42
49
|
peer-active:before:-left-xxs
|
|
43
50
|
peer-active:before:-right-xxs
|
|
44
|
-
|
|
45
|
-
peer-
|
|
46
|
-
peer-
|
|
47
|
-
peer-
|
|
48
|
-
|
|
49
|
-
active:before:absolute
|
|
50
|
-
active:before:-top-xs
|
|
51
|
-
active:before:-bottom-xs
|
|
52
|
-
active:before:-left-xs
|
|
53
|
-
active:before:-right-xs
|
|
54
|
-
active:before:bg-primary-300
|
|
55
|
-
active:before:rounded-[20px]
|
|
56
|
-
active:before:box-border
|
|
57
|
-
active:before:-z-10
|
|
51
|
+
|
|
52
|
+
peer-focus:before:-top-xs
|
|
53
|
+
peer-focus:before:-bottom-xs
|
|
54
|
+
peer-focus:before:-left-xs
|
|
55
|
+
peer-focus:before:-right-xs
|
|
58
56
|
"
|
|
59
57
|
:class="disabled && 'pointer-events-none'"
|
|
60
58
|
>
|
|
@@ -25,7 +25,7 @@ const Template = (args) => ({
|
|
|
25
25
|
return { args };
|
|
26
26
|
},
|
|
27
27
|
template:/*html*/`
|
|
28
|
-
<ui-result-card-range :icon-name="['far', '
|
|
28
|
+
<ui-result-card-range :icon-name="['far', 'face-smile']" :title="args.title">
|
|
29
29
|
{{args.slot}}
|
|
30
30
|
</ui-result-card-range>
|
|
31
31
|
`,
|
|
@@ -38,18 +38,18 @@ const TemplateAll = (args) => ({
|
|
|
38
38
|
},
|
|
39
39
|
template:/*html*/`
|
|
40
40
|
<div class="ui-result-card-range grid gap-sm w-full">
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
<ui-result-card-range style="grid-column: 1 / 1"
|
|
43
|
-
:icon-name="['far', '
|
|
43
|
+
:icon-name="['far', 'face-smile']" :title="args.title">
|
|
44
44
|
{{args.slot}}
|
|
45
45
|
</ui-result-card-range>
|
|
46
46
|
|
|
47
47
|
<ui-result-card-range style="grid-column: 2 / 2"
|
|
48
|
-
:icon-name="['far', '
|
|
48
|
+
:icon-name="['far', 'face-smile']" :title="args.title">
|
|
49
49
|
{{args.slot}}
|
|
50
50
|
|
|
51
51
|
</ui-result-card-range>
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
<ui-result-card-range style="grid-column: 1 / 3; flex-direction: row; justify-content: space-between;">
|
|
54
54
|
|
|
55
55
|
<b>25/02/2022</b>
|
|
@@ -62,7 +62,7 @@ const TemplateAll = (args) => ({
|
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
export const singleCard = Template.bind({
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
export const FullCard = TemplateAll.bind({});
|
package/tsconfig.json
CHANGED
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { defineConfig, UserConfig } from "vite";
|
|
3
|
+
import type { InlineConfig } from "vitest";
|
|
4
|
+
|
|
5
|
+
import Vue from "@vitejs/plugin-vue";
|
|
6
|
+
|
|
7
|
+
interface VitestConfigExport extends UserConfig {
|
|
8
|
+
test: InlineConfig;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default defineConfig({
|
|
12
|
+
plugins: [Vue()],
|
|
13
|
+
test: {
|
|
14
|
+
globals: true,
|
|
15
|
+
environment: "jsdom",
|
|
16
|
+
},
|
|
17
|
+
} as VitestConfigExport);
|