bonkers-ui 1.0.3 → 1.0.4

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.3",
3
+ "version": "1.0.4",
4
4
  "scripts": {
5
5
  "storybook": "start-storybook -p 6006",
6
6
  "build-storybook": "build-storybook",
@@ -9,7 +9,7 @@
9
9
  "lint:markup": "vue-tsc --noEmit",
10
10
  "test": "jest",
11
11
  "deploy": "gh-pages -d storybook-static",
12
- "typecheck": "tsc --noEmit",
12
+ "typecheck": "tsc --noEmit && vue-tsc --noEmit",
13
13
  "i": "yarn install --frozen-lockfile"
14
14
  },
15
15
  "dependencies": {
@@ -54,7 +54,7 @@
54
54
  "vite": "^2.9.12",
55
55
  "vue-eslint-parser": "^9.0.3",
56
56
  "vue-loader": "^17.0.0",
57
- "vue-tsc": "^0.38.1"
57
+ "vue-tsc": "^0.39.0"
58
58
  },
59
59
  "jest": {
60
60
  "preset": "ts-jest",
@@ -17,7 +17,7 @@
17
17
  :class="invertOrder && 'order-first'"
18
18
  >
19
19
  <ui-typography
20
- :kind="ETypographyColors.SECONDARY"
20
+ :kind="EColors.SECONDARY"
21
21
  :weight="ETextWeight.SEMI_BOLD"
22
22
  class-name="mb-xxs"
23
23
  >
@@ -25,7 +25,7 @@
25
25
  </ui-typography>
26
26
 
27
27
  <ui-typography
28
- :kind="ETypographyColors.SECONDARY_300"
28
+ :kind="EColors.SECONDARY_300"
29
29
  :size="ETypographySizes.SM"
30
30
  >
31
31
  <slot name="description" />
@@ -39,6 +39,7 @@
39
39
  import { useSlots } from "vue";
40
40
  import UiTypography from "../ui-typography";
41
41
  import { ETypographyColors, ETypographySizes, ETextWeight } from "../ui-typography/_typings";
42
+ import { EColors } from "../../_types/colors";
42
43
 
43
44
  const slots = useSlots();
44
45
 
@@ -18,7 +18,7 @@
18
18
  class="appearance-none absolute"
19
19
  type="checkbox"
20
20
  :disabled="disabled"
21
- @input="$emit('update:modelValue', $event.target.checked)"
21
+ @input="$emit('update:modelValue', !!($event.target as HTMLInputElement)?.value)"
22
22
  >
23
23
  <span
24
24
  class="ui-checkbox_custom w-md h-md flex items-center justify-center border border-secondary-alt-500 rounded relative hover:border-secondary-alt-700"
@@ -18,7 +18,7 @@
18
18
 
19
19
  <script lang="ts" setup>
20
20
  import { ESize } from "../../_types/sizing";
21
- import { TIconName } from "./_typings";
21
+ import type { TIconName } from "./_typings";
22
22
 
23
23
  defineProps<{
24
24
  className?: string;
@@ -15,7 +15,7 @@
15
15
  type="text"
16
16
  :placeholder="placeholder"
17
17
  :value="modelValue"
18
- @input="$emit('update:modelValue', $event.target.value)"
18
+ @input="$emit('update:modelValue', ($event.target as HTMLTextAreaElement)?.value)"
19
19
  >
20
20
  <div class="icon-wrapper">
21
21
  <slot name="postfix-icon" />
@@ -19,7 +19,7 @@
19
19
  :name="name"
20
20
  :value="value"
21
21
  class="appearance-none absolute"
22
- @input="$emit('update:modelValue', $event.target.value)"
22
+ @input="$emit('update:modelValue', ($event.target as HTMLTextAreaElement)?.value)"
23
23
  >
24
24
  <span
25
25
  class="ui-radio_custom block w-md h-md border border-2 border-primary rounded-full relative"
@@ -12,7 +12,7 @@
12
12
  :name="name"
13
13
  :value="value"
14
14
  class="appearance-none absolute"
15
- @input="$emit('update:modelValue', $event.target.value)"
15
+ @input="$emit('update:modelValue', ($event.target as HTMLTextAreaElement)?.value)"
16
16
  >
17
17
 
18
18
  <ui-icon
@@ -33,7 +33,7 @@
33
33
  <script lang="ts" setup>
34
34
  import { computed, ref, watch } from "vue";
35
35
  import UiTypography, { ETypographySizes, ETextWeight } from "../../ui-typography";
36
- import UiIcon, { TIconName } from "../../ui-icon";
36
+ import UiIcon, { type TIconName } from "../../ui-icon";
37
37
  import { ESize } from "../../../_types/sizing";
38
38
  import { EColors } from "../../../_types/colors";
39
39
 
@@ -30,11 +30,11 @@
30
30
  </template>
31
31
 
32
32
  <script lang="ts" setup>
33
- import { ref } from "vue";
33
+ import { ref, type VNodeRef } from "vue";
34
34
 
35
35
  const ripples = ref<{x:number, y:number, id:string}[]>([]);
36
36
  const tiBtn = ref<HTMLDivElement>();
37
- const inputsRefs = ref<Array<HTMLSpanElement | null>>([]);
37
+ const inputsRefs = ref<VNodeRef>();
38
38
 
39
39
  defineProps<{
40
40
  className?: string;
@@ -42,7 +42,7 @@
42
42
  emit("onFiled", generateString);
43
43
  };
44
44
 
45
- const inputHandler = (event:InputEvent, index:number)=>{
45
+ const inputHandler = (event:Event, index:number)=>{
46
46
  if(index < props.inputsCount){
47
47
  inputsRefs.value[index + 1]?.focus();
48
48
  }
@@ -52,7 +52,7 @@
52
52
  }
53
53
  };
54
54
 
55
- const focusHandler = (e:InputEvent) => {
55
+ const focusHandler = (e:FocusEvent) => {
56
56
  if(e.target){
57
57
  (e.target as HTMLInputElement).select();
58
58
  }
@@ -38,7 +38,7 @@
38
38
  import spacings from "../../_spacing.json";
39
39
  import { getCssVariableValue } from "../helper";
40
40
 
41
- const spacingKeys = Object.keys(spacings);
41
+ const spacingKeys = Object.keys(spacings) as Array<keyof typeof spacings>;
42
42
 
43
43
  </script>
44
44
 
package/tsconfig.json CHANGED
@@ -10,11 +10,15 @@
10
10
  "resolveJsonModule": true,
11
11
  "useDefineForClassFields": true,
12
12
  "jsx": "preserve",
13
+ "noImplicitThis": true,
13
14
  "isolatedModules": true,
15
+ "preserveValueImports": true,
16
+ "importsNotUsedAsValues": "error",
14
17
  "importHelpers": true,
15
18
  "moduleResolution": "node",
16
19
  "skipLibCheck": true,
17
20
  "esModuleInterop": true,
21
+ "forceConsistentCasingInFileNames": true,
18
22
  "allowSyntheticDefaultImports": true,
19
23
  "sourceMap": true,
20
24
  "baseUrl": ".",
@@ -22,7 +26,6 @@
22
26
  "esnext",
23
27
  "dom",
24
28
  "dom.iterable",
25
- "scripthost"
26
29
  ]
27
30
  },
28
31
  "include": [