@bobbykim/mcl-forms 0.2.0 → 0.4.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.4.0](https://github.com/bobbykim89/manguito-component-library/compare/@bobbykim/mcl-forms@0.3.0...@bobbykim/mcl-forms@0.4.0) (2024-03-21)
7
+
8
+
9
+ ### Features
10
+
11
+ * **mcl-header:** move deprecated items to deprecated folder in root dir, update configs, init mcl-header-b component ([19aa842](https://github.com/bobbykim89/manguito-component-library/commit/19aa842faa7f1594f7be030b97d5093014efe7cb))
12
+ * tsconfig update, slots and emits update ([c30ff80](https://github.com/bobbykim89/manguito-component-library/commit/c30ff804c961d205ac097e20cd51285a15ca8966))
13
+
14
+
15
+
16
+
17
+
18
+ # [0.3.0](https://github.com/bobbykim89/manguito-component-library/compare/@bobbykim/mcl-forms@0.2.0...@bobbykim/mcl-forms@0.3.0) (2024-02-27)
19
+
20
+
21
+ ### Features
22
+
23
+ * **/components/**/README.md,/deprecated:** update readme files, move deprecated packages to deprecated folder ([c0f8f7d](https://github.com/bobbykim89/manguito-component-library/commit/c0f8f7df158b8fcd99b4e3d191e02e3c8a9c144d))
24
+
25
+
26
+
27
+
28
+
6
29
  # 0.2.0 (2024-02-27)
7
30
 
8
31
 
package/README.md CHANGED
@@ -1,16 +1,59 @@
1
1
  # @bobbykim/mcl-forms
2
2
 
3
- Add description
4
-
5
3
  ## Demo
6
4
 
7
- [MCL Histoire Page](https://manguito-component-library.vercel.app/story/{%story-link%})
5
+ [MCL Storybook Page](https://manguito-component-library.vercel.app/)
6
+
7
+ - [MCL Form Group](https://manguito-component-library.vercel.app/?path=/docs/components-form-mclformgroup--mclformgroup)
8
+ - [MCL Input File](https://manguito-component-library.vercel.app/?path=/docs/components-form-mclinputfile--mclinputfile)
9
+ - [MCL Input Radio](https://manguito-component-library.vercel.app/?path=/docs/components-form-mclinputradio--mclinputradio)
10
+ - [MCL Input Switch](https://manguito-component-library.vercel.app/?path=/docs/components-form-mclinputswitch--mclinputswitch)
11
+ - [MCL Input Text](https://manguito-component-library.vercel.app/?path=/docs/components-form-mclinputtext--mclinputtext)
12
+ - [MCL Select](https://manguito-component-library.vercel.app/?path=/docs/components-form-mclselect--mclselect)
13
+ - [MCL Text Area](https://manguito-component-library.vercel.app/?path=/docs/components-form-mcltextarea--mcltextarea)
8
14
 
9
15
  ## Install
10
16
 
17
+ ```sh
18
+ npm i @bobbykim/mcl-forms
19
+ ```
20
+
11
21
  ## Usage
12
22
 
13
- `import MclForms from "@bobbykim/mcl-forms"`;
23
+ `import { MclFormGroup, MclInputFile, MclInputRadio, MclInputSwitch, MclInputText, MclSelect, MclTextArea } from "@bobbykim/mcl-forms"`;
24
+
25
+ ```vue
26
+ <script setup lang="ts">
27
+ ...
28
+ import { MclFormGroup, MclInputFile, MclInputRadio, MclInputSwitch, MclInputText, MclSelect, MclTextArea } from "@bobbykim/mcl-forms"
29
+ ...
30
+ </script>
31
+
32
+ <template>
33
+ <form-group>
34
+ <mcl-input-file></mcl-input-file>
35
+ </form-group>
36
+ <form-group>
37
+ <mcl-input-radio></mcl-input-radio>
38
+ </form-group>
39
+ <form-group>
40
+ <mcl-input-switch></mcl-input-switch>
41
+ </form-group>
42
+ <form-group>
43
+ <mcl-input-text></mcl-input-text>
44
+ </form-group>
45
+ <form-group>
46
+ <mcl-input-select></mcl-input-select>
47
+ </form-group>
48
+ <form-group>
49
+ <mcl-text-area></mcl-text-area>
50
+ </form-group>
51
+ </template>
52
+ ```
53
+
54
+ ## Dependencies
55
+
56
+ - @bobbykim/manguito-theme
14
57
 
15
58
  ## Maintainer
16
59
 
@@ -62,10 +62,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
62
62
  }, {
63
63
  textColor: ColorPalette;
64
64
  accept: string;
65
- rounded: boolean;
66
65
  displayBorder: boolean;
67
- borderColor: ColorPalette;
68
66
  bgColor: ColorPalette;
67
+ rounded: boolean;
68
+ borderColor: ColorPalette;
69
69
  buttonText: string;
70
70
  buttonTextColor: ColorPalette;
71
71
  buttonColor: ColorPalette;
@@ -2,7 +2,7 @@
2
2
  import type { ColorPalette } from '@bobbykim/manguito-theme'
3
3
  import generateClass from '@bobbykim/manguito-theme'
4
4
  import { computed, ref } from 'vue'
5
- import type { RadioEventType, RadioSizeType } from './index.types'
5
+ import type { RadioSizeType } from './index.types'
6
6
 
7
7
  const props = withDefaults(
8
8
  defineProps<{
@@ -25,7 +25,9 @@ const props = withDefaults(
25
25
  )
26
26
 
27
27
  const radioRef = ref<HTMLInputElement>()
28
- const emit = defineEmits(['change'])
28
+ const emit = defineEmits<{
29
+ (e: 'change', event: Event, value: string | number): void
30
+ }>()
29
31
 
30
32
  const radioClick = () => {
31
33
  radioRef.value?.click()
@@ -64,11 +66,8 @@ const getColorClass = computed(() => {
64
66
  })
65
67
 
66
68
  const handleChange = (e: Event) => {
67
- const customEvent: RadioEventType = {
68
- event: e,
69
- value: (e.target as HTMLInputElement).value,
70
- }
71
- emit('change', customEvent)
69
+ const value = (e.target as HTMLInputElement).value
70
+ emit('change', e, value)
72
71
  }
73
72
  </script>
74
73
 
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
16
16
  value: string;
17
17
  checked: boolean;
18
18
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
- change: (...args: any[]) => void;
19
+ change: (event: Event, value: string | number) => void;
20
20
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
21
21
  id: string;
22
22
  radioSize?: RadioSizeType | undefined;
@@ -33,7 +33,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
33
33
  value: string;
34
34
  checked: boolean;
35
35
  }>>> & {
36
- onChange?: ((...args: any[]) => any) | undefined;
36
+ onChange?: ((event: Event, value: string | number) => any) | undefined;
37
37
  }, {
38
38
  checked: boolean;
39
39
  value: string | number;
@@ -1,5 +1 @@
1
1
  export type RadioSizeType = 'sm' | 'md' | 'lg';
2
- export interface RadioEventType {
3
- event: Event;
4
- value: string;
5
- }
@@ -1,6 +1 @@
1
1
  export type RadioSizeType = 'sm' | 'md' | 'lg'
2
-
3
- export interface RadioEventType {
4
- event: Event
5
- value: string
6
- }
@@ -67,10 +67,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
67
67
  type: InputType;
68
68
  required: boolean;
69
69
  placeholder: string;
70
- rounded: boolean;
71
70
  displayBorder: boolean;
72
- borderColor: ColorPalette;
73
71
  bgColor: ColorPalette;
72
+ rounded: boolean;
73
+ borderColor: ColorPalette;
74
74
  displayShadow: boolean;
75
75
  displayHighlight: boolean;
76
76
  highlightColor: ColorPalette;
@@ -69,10 +69,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
69
69
  }, {
70
70
  required: boolean;
71
71
  placeholder: string;
72
- rounded: boolean;
73
72
  displayBorder: boolean;
74
- borderColor: ColorPalette;
75
73
  bgColor: ColorPalette;
74
+ rounded: boolean;
75
+ borderColor: ColorPalette;
76
76
  displayShadow: boolean;
77
77
  displayHighlight: boolean;
78
78
  highlightColor: ColorPalette;
@@ -58,10 +58,10 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
58
58
  }, {
59
59
  required: boolean;
60
60
  placeholder: string;
61
- rounded: boolean;
62
61
  displayBorder: boolean;
63
- borderColor: ColorPalette;
64
62
  bgColor: ColorPalette;
63
+ rounded: boolean;
64
+ borderColor: ColorPalette;
65
65
  displayShadow: boolean;
66
66
  displayHighlight: boolean;
67
67
  highlightColor: ColorPalette;
package/package.json CHANGED
@@ -1 +1,27 @@
1
- {"name":"@bobbykim/mcl-forms","version":"0.2.0","description":"","type":"module","main":"index.ts","scripts":{"build":"vue-tsc --project tsconfig.vue.json && tsc"},"author":{"name":"Bobby Kim","url":"https://www.devbobbykim.com/"},"homepage":"https://manguito-component-library.vercel.app/","repository":{"type":"git","url":"https://github.com/bobbykim89/manguito-component-library.git"},"publishConfig":{"access":"public"},"license":"MIT","dependencies":{"@bobbykim/manguito-theme":"^0.14.0"},"gitHead":"4d94a8d34988d926c8d465891fd7aa535cffdf33"}
1
+ {
2
+ "name": "@bobbykim/mcl-forms",
3
+ "version": "0.4.0",
4
+ "description": "",
5
+ "type": "module",
6
+ "main": "index.ts",
7
+ "scripts": {
8
+ "build": "vue-tsc --project tsconfig.vue.json && tsc --project tsconfig.ts.json"
9
+ },
10
+ "author": {
11
+ "name": "Bobby Kim",
12
+ "url": "https://www.devbobbykim.com/"
13
+ },
14
+ "homepage": "https://manguito-component-library.vercel.app/",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/bobbykim89/manguito-component-library.git"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "license": "MIT",
23
+ "dependencies": {
24
+ "@bobbykim/manguito-theme": "^0.16.0"
25
+ },
26
+ "gitHead": "5b81953e5108fd166c0b89ebc6a24e6de9499635"
27
+ }
package/tsconfig.json CHANGED
@@ -1,9 +1,5 @@
1
1
  {
2
- "extends": "../../../tsconfig.json",
3
- "include": ["./**/*.ts"],
4
- "exclude": ["node_modules", "./**/*.vue.d.ts", "./**/*.vue"],
5
- "compilerOptions": {
6
- "skipLibCheck": true,
7
- "declaration": true
8
- }
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["./**/*.ts", "./**/*.vue"],
4
+ "exclude": ["node_modules", "./**/*.vue.d.ts"]
9
5
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["./**/*.ts"],
4
+ "exclude": ["node_modules", "./**/*.vue.d.ts", "./**/*.vue"],
5
+ "compilerOptions": {
6
+ "skipLibCheck": true,
7
+ "declaration": true
8
+ }
9
+ }