bonkers-ui 1.0.43 → 1.0.44

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonkers-ui",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "storybook": "start-storybook -p 6006",
@@ -14,13 +14,11 @@
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.3.0",
18
+ "@fortawesome/free-brands-svg-icons": "^6.3.0",
19
+ "@fortawesome/free-regular-svg-icons": "^6.3.0",
20
+ "@fortawesome/free-solid-svg-icons": "^6.3.0",
21
21
  "@fortawesome/vue-fontawesome": "^3.0.3",
22
- "@vueuse/components": "^9.12.0",
23
- "@vueuse/core": "^9.12.0",
24
22
  "vue": "^3.2.47"
25
23
  },
26
24
  "devDependencies": {
@@ -28,34 +26,34 @@
28
26
  "@storybook/addon-essentials": "^6.5.16",
29
27
  "@storybook/addon-links": "^6.5.16",
30
28
  "@storybook/addon-postcss": "^2.0.0",
31
- "@storybook/builder-vite": "^0.2.7",
29
+ "@storybook/builder-vite": "^0.4.2",
32
30
  "@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",
31
+ "@typescript-eslint/eslint-plugin": "^5.56.0",
32
+ "@typescript-eslint/parser": "^5.56.0",
33
+ "@vitejs/plugin-vue": "^4.1.0",
36
34
  "@vue/eslint-config-typescript": "^11.0.2",
37
- "@vue/test-utils": "^2.2.9",
38
- "eslint": "8.33.0",
35
+ "@vue/test-utils": "^2.3.2",
36
+ "eslint": "8.36.0",
39
37
  "eslint-plugin-vue": "^9.9.0",
40
38
  "gh-pages": "^5.0.0",
41
39
  "husky": "4.3.8",
42
- "jsdom": "^21.1.0",
43
- "lint-staged": "^13.1.0",
40
+ "jsdom": "^21.1.1",
41
+ "lint-staged": "^13.2.0",
44
42
  "postcss": "^8.4.21",
45
43
  "postcss-html": "^1.4.1",
46
44
  "storybook-tailwind-dark-mode": "^1.0.15",
47
- "stylelint": "^14.16.1",
48
- "stylelint-config-recommended": "^9.0.0",
45
+ "stylelint": "^15.3.0",
46
+ "stylelint-config-recommended": "^11.0.0",
49
47
  "stylelint-config-recommended-vue": "^1.4.0",
50
- "stylelint-config-standard": "^29.0.0",
51
- "tailwindcss": "^3.2.4",
48
+ "stylelint-config-standard": "^31.0.0",
49
+ "tailwindcss": "^3.2.7",
52
50
  "ts-node": "^10.9.1",
53
- "typescript": "^4.9.5",
54
- "vite": "^4.1.1",
55
- "vitest": "^0.28.3",
51
+ "typescript": "^5.0.2",
52
+ "vite": "^4.2.1",
53
+ "vitest": "^0.29.7",
56
54
  "vue-eslint-parser": "^9.1.0",
57
55
  "vue-loader": "^17.0.1",
58
- "vue-tsc": "^1.0.24"
56
+ "vue-tsc": "^1.2.0"
59
57
  },
60
58
  "lint-staged": {
61
59
  "*.{ts,tsx,vue}": [
@@ -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
  });
@@ -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
  );
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>