bonkers-ui 1.0.43 → 1.0.45

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 CHANGED
@@ -5,67 +5,47 @@ module.exports = {
5
5
  "es2021": true,
6
6
  "node": true
7
7
  },
8
- "extends": [
9
- "plugin:vue/vue3-recommended",
10
- "eslint:recommended",
11
- "@vue/typescript/recommended",
12
- ],
8
+ "extends": ["plugin:vue/vue3-recommended", "eslint:recommended", "@vue/typescript/recommended", "plugin:storybook/recommended"],
13
9
  "parserOptions": {
14
10
  "ecmaVersion": 2021
15
11
  },
16
12
  "parser": "vue-eslint-parser",
17
13
  "plugins": [],
18
- "overrides": [
19
- {
20
- "files": ["*.vue"],
21
- "rules": {
22
- "indent": "off"
23
- }
14
+ "overrides": [{
15
+ "files": ["*.vue"],
16
+ "rules": {
17
+ "indent": "off"
24
18
  }
25
- ],
19
+ }],
26
20
  "rules": {
27
- "indent": ["error", "tab", { "VariableDeclarator": "first", "MemberExpression": 1, "ObjectExpression": 1 }],
28
- "vue/html-indent": [
29
- "error",
30
- "tab",
31
- {
32
- "attribute": 1,
33
- "baseIndent": 1,
34
- "closeBracket": 0,
35
- "alignAttributesVertically": true
36
- }
37
- ],
38
- "vue/script-indent": [
39
- "error",
40
- "tab",
41
- {
42
- "baseIndent": 1,
43
- "switchCase": 1,
44
- }
45
- ],
46
- "eol-last": [
47
- "error",
48
- "always"
49
- ],
21
+ "indent": ["error", "tab", {
22
+ "VariableDeclarator": "first",
23
+ "MemberExpression": 1,
24
+ "ObjectExpression": 1
25
+ }],
26
+ "vue/html-indent": ["error", "tab", {
27
+ "attribute": 1,
28
+ "baseIndent": 1,
29
+ "closeBracket": 0,
30
+ "alignAttributesVertically": true
31
+ }],
32
+ "vue/script-indent": ["error", "tab", {
33
+ "baseIndent": 1,
34
+ "switchCase": 1
35
+ }],
36
+ "eol-last": ["error", "always"],
50
37
  "no-console": "warn",
51
38
  "no-debugger": "warn",
52
39
  "vue/multi-word-component-names": 0,
53
40
  "object-curly-spacing": ["error", "always"],
54
- "quotes": [
55
- "error",
56
- "double",
57
- {
58
- "avoidEscape": true,
59
- "allowTemplateLiterals": true
60
- }
61
- ],
62
- "no-multiple-empty-lines": [
63
- "error",
64
- {
65
- "max": 1,
66
- "maxEOF": 0
67
- }
68
- ],
41
+ "quotes": ["error", "double", {
42
+ "avoidEscape": true,
43
+ "allowTemplateLiterals": true
44
+ }],
45
+ "no-multiple-empty-lines": ["error", {
46
+ "max": 1,
47
+ "maxEOF": 0
48
+ }],
69
49
  semi: ["error", "always"]
70
50
  }
71
51
  };
@@ -1,4 +1,4 @@
1
- const {mergeConfig} = require('vite');
1
+ const { mergeConfig } = require('vite');
2
2
 
3
3
  module.exports = {
4
4
  "stories": [
@@ -8,24 +8,22 @@ module.exports = {
8
8
  "addons": [
9
9
  "@storybook/addon-links",
10
10
  "@storybook/addon-essentials",
11
- {
12
- name: "@storybook/addon-postcss",
13
- options: {
14
- postcssLoaderOptions: {
15
- implementation: require("postcss")
16
- }
17
- }
18
- },
19
- 'storybook-tailwind-dark-mode',
11
+ "@storybook/addon-mdx-gfm",
20
12
  ],
21
- "framework": "@storybook/vue3",
22
- "core": {
23
- "builder": "@storybook/builder-vite"
13
+ framework: {
14
+ name: "@storybook/vue3-vite",
15
+ options: {}
24
16
  },
25
- async viteFinal(config, {configType}) {
26
- // return the customized config
17
+ core: {
18
+ builder: '@storybook/builder-vite', // or '@storybook/builder-webpack5'
19
+ disableTelemetry: true,
20
+ },
21
+ async viteFinal(config, {}) {
27
22
  return mergeConfig(config, {
28
23
  base: "https://bonkers-ie.github.io/bonkers-ui/",
29
24
  });
30
25
  },
31
- }
26
+ docs: {
27
+ autodocs: true
28
+ }
29
+ };
@@ -1,4 +1,5 @@
1
- import {app} from '@storybook/vue3';
1
+ import { setup } from '@storybook/vue3'
2
+ import { createRouter, createWebHashHistory } from 'vue-router'
2
3
  /* import the fontawesome core */
3
4
  import { library } from '@fortawesome/fontawesome-svg-core';
4
5
 
@@ -13,12 +14,21 @@ library.add(faFaceSmile, faCircleCheck);
13
14
 
14
15
  import '../src/main.css';
15
16
 
16
- app.component('font-awesome-icon', FontAwesomeIcon)
17
+ const router = createRouter({
18
+ history: createWebHashHistory(),
19
+ routes: [],
20
+ })
21
+
22
+ setup((app) => {
23
+ app.use(router)
24
+ app.component('font-awesome-icon', FontAwesomeIcon)
25
+ })
26
+
17
27
 
18
28
  export const parameters = {
19
29
  darkMode: false,
20
30
  stylePreview: true,
21
- actions: {argTypesRegex: "^on[A-Z].*"},
31
+ actions: { argTypesRegex: "^on[A-Z].*" },
22
32
  backgrounds: {
23
33
  default: "Bonkers",
24
34
  values: [
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "bonkers-ui",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "private": false,
5
5
  "scripts": {
6
- "storybook": "start-storybook -p 6006",
7
- "build-storybook": "build-storybook",
6
+ "storybook": "storybook dev -p 6006",
7
+ "build-storybook": "storybook build",
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",
@@ -14,48 +14,51 @@
14
14
  "i": "yarn install --frozen-lockfile"
15
15
  },
16
16
  "dependencies": {
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",
17
+ "@fortawesome/fontawesome-svg-core": "^6.4.0",
18
+ "@fortawesome/free-brands-svg-icons": "^6.4.0",
19
+ "@fortawesome/free-regular-svg-icons": "^6.4.0",
20
+ "@fortawesome/free-solid-svg-icons": "^6.4.0",
21
21
  "@fortawesome/vue-fontawesome": "^3.0.3",
22
- "@vueuse/components": "^9.12.0",
23
- "@vueuse/core": "^9.12.0",
24
- "vue": "^3.2.47"
22
+ "storybook-addon-designs": "^6.3.1",
23
+ "vue": "^3.2.47",
24
+ "vue-router": "^4.1.6"
25
25
  },
26
26
  "devDependencies": {
27
- "@storybook/addon-actions": "^6.5.16",
28
- "@storybook/addon-essentials": "^6.5.16",
29
- "@storybook/addon-links": "^6.5.16",
30
- "@storybook/addon-postcss": "^2.0.0",
31
- "@storybook/builder-vite": "^0.2.7",
32
- "@storybook/vue3": "^6.5.16",
33
- "@typescript-eslint/eslint-plugin": "^5.50.0",
34
- "@typescript-eslint/parser": "^5.50.0",
35
- "@vitejs/plugin-vue": "^4.0.0",
27
+ "@storybook/addon-essentials": "^7.0.4",
28
+ "@storybook/addon-links": "^7.0.4",
29
+ "@storybook/addon-mdx-gfm": "^7.0.4",
30
+ "@storybook/vue3": "^7.0.4",
31
+ "@storybook/vue3-vite": "^7.0.4",
32
+ "@typescript-eslint/eslint-plugin": "^5.58.0",
33
+ "@typescript-eslint/parser": "^5.58.0",
34
+ "@vitejs/plugin-vue": "^4.1.0",
36
35
  "@vue/eslint-config-typescript": "^11.0.2",
37
- "@vue/test-utils": "^2.2.9",
38
- "eslint": "8.33.0",
39
- "eslint-plugin-vue": "^9.9.0",
36
+ "@vue/test-utils": "^2.3.2",
37
+ "eslint": "8.38.0",
38
+ "eslint-plugin-storybook": "^0.6.11",
39
+ "eslint-plugin-vue": "^9.10.0",
40
40
  "gh-pages": "^5.0.0",
41
41
  "husky": "4.3.8",
42
- "jsdom": "^21.1.0",
43
- "lint-staged": "^13.1.0",
42
+ "jsdom": "^21.1.1",
43
+ "lint-staged": "^13.2.1",
44
44
  "postcss": "^8.4.21",
45
45
  "postcss-html": "^1.4.1",
46
- "storybook-tailwind-dark-mode": "^1.0.15",
47
- "stylelint": "^14.16.1",
48
- "stylelint-config-recommended": "^9.0.0",
46
+ "react": "^18.2.0",
47
+ "react-dom": "^18.2.0",
48
+ "storybook": "^7.0.4",
49
+ "storybook-tailwind-dark-mode": "^1.0.16",
50
+ "stylelint": "^15.4.0",
51
+ "stylelint-config-recommended": "^11.0.0",
49
52
  "stylelint-config-recommended-vue": "^1.4.0",
50
- "stylelint-config-standard": "^29.0.0",
51
- "tailwindcss": "^3.2.4",
53
+ "stylelint-config-standard": "^32.0.0",
54
+ "tailwindcss": "^3.3.1",
52
55
  "ts-node": "^10.9.1",
53
- "typescript": "^4.9.5",
54
- "vite": "^4.1.1",
55
- "vitest": "^0.28.3",
56
- "vue-eslint-parser": "^9.1.0",
56
+ "typescript": "^5.0.4",
57
+ "vite": "^4.2.1",
58
+ "vitest": "^0.30.1",
59
+ "vue-eslint-parser": "^9.1.1",
57
60
  "vue-loader": "^17.0.1",
58
- "vue-tsc": "^1.0.24"
61
+ "vue-tsc": "^1.2.0"
59
62
  },
60
63
  "lint-staged": {
61
64
  "*.{ts,tsx,vue}": [
@@ -0,0 +1 @@
1
+ export const ICON_DEFAULT = ["far", "face-smile"];
@@ -1,38 +1,28 @@
1
- import UiAlert from "./ui-alert.vue";
2
- import type { Story } from "@storybook/vue3";
1
+ import type { Meta } from "@storybook/vue3";
2
+ import { ICON_DEFAULT } from "./../../CONSTANTS";
3
3
  import { EAlertTypes } from "./_types";
4
+ import UiAlert from "../ui-alert";
4
5
 
5
6
  export default {
6
7
  title: "Components/ui-alert",
7
8
  component: UiAlert,
9
+ tags: ["autodocs"],
10
+
8
11
  argTypes: {
9
12
  kind: {
10
13
  control: { type: "select" },
11
14
  options: Object.values(EAlertTypes),
12
15
  description: "The button kinds",
13
16
  },
17
+ default: {
18
+ control: { type: "text" },
19
+ }
14
20
  },
15
- args: {
16
- slot: "some description text: lorem",
17
- kind: EAlertTypes.WARNING
18
- }
19
- };
20
-
21
- type TComponentProps = InstanceType<typeof UiAlert>["$props"];
21
+ } satisfies Meta<typeof UiAlert>;
22
22
 
23
- const Template: Story<TComponentProps> = (args) => ({
24
- components: { UiAlert },
25
- setup() {
26
- return { args };
23
+ export const Default = {
24
+ args: {
25
+ icon: ICON_DEFAULT,
26
+ default: "This is a default slot"
27
27
  },
28
- template: `
29
- <ui-alert
30
- :kind="args.kind"
31
- :icon="['far', 'face-smile']"
32
- >
33
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
34
- </ui-alert>
35
- `
36
- });
37
-
38
- export const Default = Template.bind({});
28
+ };
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="ui-alert flex gap-sm p-sm border rounded-lg"
3
+ class="ui-alert flex gap-sm p-sm border rounded-lg bg-white"
4
4
  :class="[
5
5
  (!kind || kind === EAlertTypes.PRIMARY) && 'border-primary',
6
6
  kind === EAlertTypes.WARNING && 'border-warning',
@@ -1,19 +1,9 @@
1
1
  import { mount } from "@vue/test-utils";
2
2
  import UiButton from "./ui-button.vue";
3
- import { test, expect } from "vitest";
4
3
 
5
- test("VButton.test.ts", async () => {
4
+ test("VButton.test.ts", () => {
6
5
  expect(UiButton).toBeTruthy();
7
6
 
8
- it("renders props.msg when passed", () => {
9
- const className = "message";
10
- const wrapper = mount(UiButton, {
11
- propsData: {
12
- class: className
13
- }
14
- });
15
-
16
- expect(wrapper.classes()).toContain(className);
17
- });
18
-
7
+ const container = mount(UiButton as any);
8
+ expect(container).toBeTruthy();
19
9
  });
@@ -56,9 +56,6 @@
56
56
  <script lang="ts" setup>
57
57
  import UiTypography, { ETypographySizes, ETextWeight, ETextAlign } from "../ui-typography";
58
58
  import { EColors } from "../../_types/colors";
59
- import { useSlots } from "vue";
60
-
61
- const slots = useSlots();
62
59
 
63
60
  defineProps<{
64
61
  header?: string;
@@ -4,7 +4,7 @@
4
4
  >
5
5
  <input
6
6
  ref="track"
7
- v-model="rangeModel"
7
+ v-model.number="rangeModel"
8
8
  class="appearance-none absolute top-0 left-0 cursor-pointer bg-transparent w-full h-full"
9
9
  type="range"
10
10
  :min="min"
@@ -33,14 +33,14 @@
33
33
  import { computed, ref } from "vue";
34
34
 
35
35
  const props = defineProps<{
36
- modelValue: string | number;
36
+ modelValue: number;
37
37
  min: string | number;
38
38
  max: string | number;
39
39
  step: string | number;
40
40
  }>();
41
41
 
42
42
  const emit = defineEmits<{
43
- (e: "update:modelValue", state: string | number): void
43
+ (e: "update:modelValue", state: number): void
44
44
  }>();
45
45
 
46
46
  const rangeModel = computed({
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <div>
3
+ <div
4
+ class="
5
+ backdrop-color
6
+ fixed
7
+ backdrop-blur-sm
8
+ transition-all
9
+ inset-0
10
+ z-0
11
+ "
12
+ />
13
+
14
+ <slot />
15
+ </div>
16
+ </template>
17
+
18
+ <style lang="css" scoped>
19
+ .backdrop-color {
20
+ background-color: rgb(0 0 0 / 50%);
21
+ }
22
+ </style>
@@ -1,8 +1,7 @@
1
- import { ref } from "vue";
2
1
  import type { Story } from "@storybook/vue3";
3
2
  import UiModal from "./ui-modal.vue";
4
3
  import UiButton from "../ui-button";
5
- import UiBackdrop from "../ui-backdrop";
4
+ import UiBackdrop from "./ui-backdrop";
6
5
  import UiIcon from "../ui-icon";
7
6
  import UiTypography from "../ui-typography";
8
7
  import { ESize } from "../../_types/sizing";
@@ -39,64 +38,31 @@ type TComponentProps = InstanceType<typeof UiModal>["$props"];
39
38
  const Template: Story<TComponentProps> = (args) => ({
40
39
  components: { UiModal, UiBackdrop, UiButton, UiIcon, UiTypography },
41
40
  setup() {
42
- const isVisible = ref(false);
43
-
44
- const showModal = () => {
45
- isVisible.value = true;
46
- };
47
-
48
- const closeModal = () => {
49
- isVisible.value = false;
50
- };
51
-
52
- return { args, showModal, closeModal, isVisible, ESize };
41
+ return { args, ESize };
53
42
  },
54
43
  template:/*html*/`
55
- <transition
56
- name="ui-modal"
57
- mode="out-in"
58
- appear
59
- enter-active-class="transition delay-100"
60
- enter-from-class="opacity-0 translate-y-1/4"
61
- enter-to-class="opacity-100 translate-y-0"
62
- leave-active-class="transition"
63
- leave-to-class="opacity-0 translate-y-1/4"
64
- leave-from-class="opacity-100 translate-y-0"
65
- >
66
- <ui-modal
67
- v-if="isVisible"
44
+ <ui-modal
68
45
  :title="args.title"
69
46
  :modalSize="args.modalSize"
70
- :closeModal="closeModal"
71
47
  >
72
48
  <template #icon>
73
49
  <ui-icon class="text-primary" :icon-name="['far', 'circle-check']" :size=ESize.XL />
74
50
  </template>
75
- <template #title>
76
- <ui-typography class="text-2xl font-bold">{{ args.title }}</ui-typography>
77
- </template>
78
51
 
79
- <template #default >
52
+ <template #default>
80
53
  {{args.body}}
81
54
  </template>
55
+
82
56
  <template #footer>
83
57
  <ui-button
84
58
  fullWidth
85
- @click="closeModal"
86
59
  >
87
60
  Ok
88
61
  </ui-button>
89
- </template>
90
- </ui-modal>
91
- </transition>
92
-
93
- <ui-backdrop v-if="isVisible" />
62
+ </template>
63
+ </ui-modal>
94
64
 
95
- <div class="absolute" style="top: calc(50vh - 2rem); left: calc(50vw - 4rem)">
96
- <ui-button @click="showModal">
97
- Toggle Modal
98
- </ui-button>
99
- </div>
65
+ <ui-backdrop />
100
66
  `
101
67
  });
102
68
 
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <div
3
- v-on-click-outside="closeModal"
4
3
  class="
5
4
  ui-modal
6
5
  absolute
@@ -8,7 +7,6 @@
8
7
  flex flex-col
9
8
  items-center
10
9
  z-10
11
- opacity-0
12
10
  inset-0
13
11
  rounded-2xl
14
12
  shadow-md
@@ -28,15 +26,19 @@
28
26
  >
29
27
  <slot name="icon" />
30
28
  </div>
31
- <ui-typography
32
- v-if="title"
33
- class="my-md"
34
- :weight="ETextWeight.BOLD"
35
- :align="ETextAlign.CENTER"
36
- :size="ETypographySizes.LG"
37
- >
38
- {{ title }}
39
- </ui-typography>
29
+
30
+ <slot name="title">
31
+ <ui-typography
32
+ v-if="title"
33
+ class="my-md"
34
+ :weight="ETextWeight.BOLD"
35
+ :align="ETextAlign.CENTER"
36
+ :size="ETypographySizes.LG"
37
+ >
38
+ {{ title }}
39
+ </ui-typography>
40
+ </slot>
41
+
40
42
  <ui-typography
41
43
  :weight="ETextWeight.REGULAR"
42
44
  :align="ETextAlign.CENTER"
@@ -51,19 +53,19 @@
51
53
  </div>
52
54
  </div>
53
55
  </template>
56
+
54
57
  <script lang="ts" setup>
55
- import { vOnClickOutside } from "@vueuse/components";
56
58
  import { ETypographySizes } from "../ui-typography/";
57
59
  import UiTypography, { ETextWeight, ETextAlign } from "../ui-typography";
58
60
  import { EModalSizes } from "./_typings";
59
61
 
60
62
  withDefaults(
61
63
  defineProps<{
62
- title: string;
64
+ title?: string;
63
65
  modalSize?: EModalSizes;
64
- closeModal: () => void;
65
66
  }>(),
66
67
  {
68
+ title: undefined,
67
69
  modalSize: EModalSizes.SM,
68
70
  }
69
71
  );
@@ -0,0 +1,7 @@
1
+ export enum ESnackbarTypes {
2
+ DEFAULT = "default",
3
+ PRIMARY = "primary",
4
+ WARNING = "warning",
5
+ ERROR = "error",
6
+ SECONDARY = "secondary",
7
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from "./ui-snackbar.vue";
2
+ export { ESnackbarTypes }from "./_types";
@@ -0,0 +1,26 @@
1
+ import { ESnackbarTypes } from "./_types";
2
+ import type { Meta } from "@storybook/vue3";
3
+ import UiSnackbar from "../ui-snackbar";
4
+
5
+ export default {
6
+ title: "Components/ui-snackbar",
7
+ component: UiSnackbar,
8
+
9
+ argTypes: {
10
+ kind: {
11
+ control: { type: "select" },
12
+ options: Object.values(ESnackbarTypes),
13
+ description: "The button kinds",
14
+ },
15
+ title: {
16
+ controls: { type: "text" },
17
+ },
18
+ }
19
+ } satisfies Meta<typeof UiSnackbar>;
20
+
21
+ export const Default = {
22
+ args: {
23
+ title: "This is a title",
24
+ articleSlot: "This is an article",
25
+ },
26
+ };
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <div
3
+ class="ui-snackbar flex shadow-md rounded-lg w-full p-sm justify-between"
4
+ :class="[
5
+ kind === ESnackbarTypes.DEFAULT && 'bg-white',
6
+ kind === ESnackbarTypes.PRIMARY && 'bg-primary text-white',
7
+ kind === ESnackbarTypes.WARNING && 'bg-warning text-white',
8
+ kind === ESnackbarTypes.ERROR && 'bg-error text-white',
9
+ kind === ESnackbarTypes.SECONDARY && 'bg-secondary text-white',
10
+ ]"
11
+ >
12
+ <slot>
13
+ <ui-typography
14
+ :size="ETypographySizes.SM"
15
+ class=""
16
+ >
17
+ <slot name="titleSlot">
18
+ {{ title }}
19
+ </slot>
20
+ </ui-typography>
21
+
22
+ <ui-typography
23
+ :size="ETypographySizes.XS"
24
+ class=""
25
+ >
26
+ <slot name="articleSlot" />
27
+ </ui-typography>
28
+ </slot>
29
+ </div>
30
+ </template>
31
+
32
+ <script lang="ts" setup>
33
+ import UiTypography, { ETypographySizes } from "../ui-typography";
34
+ import { ESnackbarTypes } from "./_types";
35
+
36
+ withDefaults(defineProps<{
37
+ title: string
38
+ kind?: ESnackbarTypes
39
+ }>(), {
40
+ kind: ESnackbarTypes.DEFAULT
41
+ });
42
+ </script>
@@ -3,7 +3,8 @@ import Code from './assets/code-brackets.svg';
3
3
 
4
4
  <Meta title="Example/Introduction" />
5
5
 
6
- <style>{`
6
+ <style>
7
+ {`
7
8
  .subheading {
8
9
  --mediumdark: '#999999';
9
10
  font-weight: 900;
@@ -66,7 +67,7 @@ import Code from './assets/code-brackets.svg';
66
67
  display: block;
67
68
  margin-bottom: 2px;
68
69
  }
69
-
70
+
70
71
  .link-item img {
71
72
  height: 40px;
72
73
  width: 40px;
@@ -104,8 +105,9 @@ import Code from './assets/code-brackets.svg';
104
105
  display: inline-block;
105
106
  }
106
107
 
107
-
108
- `}</style>
108
+
109
+ `}
110
+ </style>
109
111
 
110
112
  # Welcome to Bonkers.ie UI Storybook
111
113
 
package/tsconfig.json CHANGED
@@ -12,8 +12,6 @@
12
12
  "jsx": "preserve",
13
13
  "noImplicitThis": true,
14
14
  "isolatedModules": true,
15
- "preserveValueImports": true,
16
- "importsNotUsedAsValues": "error",
17
15
  "importHelpers": true,
18
16
  "moduleResolution": "node",
19
17
  "skipLibCheck": true,
package/vitest.config.ts CHANGED
@@ -2,14 +2,14 @@
2
2
  import { defineConfig, UserConfig } from "vite";
3
3
  import type { InlineConfig } from "vitest";
4
4
 
5
- import Vue from "@vitejs/plugin-vue";
5
+ import vue from "@vitejs/plugin-vue";
6
6
 
7
7
  interface VitestConfigExport extends UserConfig {
8
8
  test: InlineConfig;
9
9
  }
10
10
 
11
11
  export default defineConfig({
12
- plugins: [Vue()],
12
+ plugins: [vue()],
13
13
  test: {
14
14
  globals: true,
15
15
  environment: "jsdom",
@@ -1,42 +0,0 @@
1
- <template>
2
- <transition-group
3
- name="fade"
4
- enter-active-class="transition-opacity duration-300"
5
- leave-active-class="transition-opacity duration-300 opacity-0"
6
- enter-from-class="opacity-0"
7
- leave-to-class="opacity-0"
8
- >
9
- <div
10
- v-if="visible"
11
- class="
12
- backdrop-color
13
- fixed
14
- backdrop-blur-sm
15
- transition-all
16
- inset-0
17
- z-0
18
- "
19
- />
20
-
21
- <slot />
22
- </transition-group>
23
- </template>
24
-
25
- <script lang="ts" setup>
26
-
27
- withDefaults(
28
- defineProps<{
29
- visible?: boolean;
30
- }>(),
31
- {
32
- visible: true,
33
- }
34
- );
35
-
36
- </script>
37
-
38
- <style lang="css" scoped>
39
- .backdrop-color {
40
- background-color: rgb(0 0 0 / 50%);
41
- }
42
- </style>