yuyeon 0.0.38-rc5 → 0.0.38-rc7

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.
@@ -1,15 +1,15 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { computed, defineComponent, ref, withModifiers } from 'vue';
2
+ import { computed, defineComponent, ref, watch, withModifiers } from 'vue';
3
3
  import { useRender } from "../../composables/component.mjs";
4
4
  import { getUid } from "../../util/vue-component.mjs";
5
- import "./YCheckbox.scss";
6
5
  import YInputCheckbox from "./YInputCheckbox.mjs";
6
+ import "./YCheckbox.scss";
7
7
  export default defineComponent({
8
8
  name: 'YCheckbox',
9
9
  components: {
10
10
  YInputCheckbox
11
11
  },
12
- emits: ['focus', 'blur', 'update:modelValue'],
12
+ emits: ['focus', 'blur', 'click', 'update:modelValue', 'change'],
13
13
  props: {
14
14
  modelValue: [Boolean, Array],
15
15
  value: [String, Number, Object],
@@ -31,9 +31,14 @@ export default defineComponent({
31
31
  slots
32
32
  } = _ref;
33
33
  const focused = ref(false);
34
- const innerValue = ref(false);
34
+ const checked = ref(false);
35
35
  const counterId = (getUid() ?? '').toString();
36
36
  const inputId = `input-${counterId}`;
37
+ if (Array.isArray(props.modelValue)) {
38
+ inputByProp();
39
+ } else {
40
+ checked.value = !!props.modelValue;
41
+ }
37
42
  function onFocus(e) {
38
43
  focused.value = true;
39
44
  emit('focus', e);
@@ -43,20 +48,22 @@ export default defineComponent({
43
48
  emit('blur', e);
44
49
  }
45
50
  function onClick(e) {
51
+ emit('click', e);
46
52
  if (props.disabled || props.readonly) return;
47
- innerValue.value = !innerValue.value;
48
- emit('update:modelValue', innerValue.value, e);
53
+ const check = !checked.value;
54
+ checked.value = check;
55
+ emit('change', check);
49
56
  }
50
- function inputByValue() {
57
+ function inputByProp() {
51
58
  if (Array.isArray(props.modelValue)) {
52
59
  const found = props.modelValue?.find(inp => inp === props.value);
53
60
  if (found !== undefined) {
54
- innerValue.value = true;
61
+ checked.value = true;
55
62
  } else {
56
- innerValue.value = false;
63
+ checked.value = false;
57
64
  }
58
65
  } else if (typeof props.modelValue === 'boolean') {
59
- innerValue.value = props.modelValue;
66
+ checked.value = props.modelValue;
60
67
  }
61
68
  }
62
69
  const classes = computed(() => {
@@ -82,11 +89,25 @@ export default defineComponent({
82
89
  const isMultipleInput = computed(() => {
83
90
  return Array.isArray(props.modelValue);
84
91
  });
85
- const multipleInputIndex = computed(() => {
92
+ function getMultipleInputIndex() {
86
93
  if (!isMultipleInput.value) {
87
94
  return -1;
88
95
  }
89
96
  return props.modelValue.findIndex(v => v === props.value);
97
+ }
98
+ watch(checked, neo => {
99
+ if (Array.isArray(props.modelValue)) {
100
+ const value = props.modelValue.slice();
101
+ const index = getMultipleInputIndex();
102
+ if (neo && index === -1) {
103
+ value.push(props.value);
104
+ } else if (!neo && index !== -1) {
105
+ value.splice(index, 1);
106
+ }
107
+ emit('update:modelValue', value);
108
+ } else {
109
+ emit('update:modelValue', neo);
110
+ }
90
111
  });
91
112
  useRender(() => {
92
113
  return _createVNode("div", {
@@ -106,7 +127,7 @@ export default defineComponent({
106
127
  "onFocus": onFocus,
107
128
  "onBlur": onBlur,
108
129
  "id": counterId,
109
- "value": innerValue.value,
130
+ "value": checked.value,
110
131
  "icon": computedIcon.value,
111
132
  "color": props.color,
112
133
  "disabled": props.disabled,
@@ -127,24 +148,8 @@ export default defineComponent({
127
148
  }, [slots.label ? slots.label?.() : props.label])]), slots.trailing?.()]);
128
149
  });
129
150
  return {
130
- innerValue,
131
- inputByValue
151
+ checked
132
152
  };
133
- },
134
- created() {
135
- if (Array.isArray(this.modelValue)) {
136
- this.inputByValue();
137
- } else {
138
- this.innerValue = !!this.modelValue;
139
- }
140
- },
141
- watch: {
142
- inputValue: {
143
- handler() {
144
- this.inputByValue();
145
- },
146
- immediate: true
147
- }
148
153
  }
149
154
  });
150
155
  //# sourceMappingURL=YCheckbox.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"YCheckbox.mjs","names":["computed","defineComponent","ref","withModifiers","useRender","getUid","YInputCheckbox","name","components","emits","props","modelValue","Boolean","Array","value","String","Number","Object","label","reverse","icon","type","color","default","disabled","readonly","setup","_ref","emit","slots","focused","innerValue","counterId","toString","inputId","onFocus","e","onBlur","onClick","inputByValue","isArray","found","find","inp","undefined","classes","computedIcon","isMultipleInput","multipleInputIndex","findIndex","v","_createVNode","leading","stopPropagation","_len","arguments","length","args","_key","_len2","_key2","trailing","created","watch","inputValue","handler","immediate"],"sources":["../../../src/components/checkbox/YCheckbox.tsx"],"sourcesContent":["import { PropType, computed, defineComponent, ref, withModifiers } from 'vue';\r\n\r\nimport { useRender } from '../../composables/component';\r\nimport { getUid } from '../../util/vue-component';\r\n\r\nimport './YCheckbox.scss';\r\nimport YInputCheckbox from './YInputCheckbox';\r\n\r\nexport default defineComponent({\r\n name: 'YCheckbox',\r\n components: { YInputCheckbox },\r\n emits: ['focus', 'blur', 'update:modelValue'],\r\n props: {\r\n modelValue: [Boolean, Array] as PropType<boolean | any[]>,\r\n value: [String, Number, Object] as PropType<any>,\r\n label: String as PropType<string>,\r\n reverse: Boolean as PropType<boolean>,\r\n icon: {\r\n type: [Object, String] as PropType<\r\n { checked?: string; unchecked?: string } | string\r\n >,\r\n },\r\n color: {\r\n type: String as PropType<string>,\r\n default: () => 'primary',\r\n },\r\n disabled: Boolean as PropType<boolean>,\r\n readonly: Boolean as PropType<boolean>,\r\n },\r\n setup(props, { emit, slots }) {\r\n const focused = ref(false);\r\n const innerValue = ref(false);\r\n const counterId = (getUid() ?? '').toString();\r\n const inputId = `input-${counterId}`;\r\n\r\n function onFocus(e: FocusEvent) {\r\n focused.value = true;\r\n emit('focus', e);\r\n }\r\n\r\n function onBlur(e: FocusEvent) {\r\n focused.value = false;\r\n emit('blur', e);\r\n }\r\n\r\n function onClick(e: Event, ...args: any[]) {\r\n if (props.disabled || props.readonly) return;\r\n innerValue.value = !innerValue.value;\r\n emit('update:modelValue', innerValue.value, e);\r\n }\r\n\r\n function inputByValue() {\r\n if (Array.isArray(props.modelValue)) {\r\n const found = props.modelValue?.find((inp: any) => inp === props.value);\r\n\r\n if (found !== undefined) {\r\n innerValue.value = true;\r\n } else {\r\n innerValue.value = false;\r\n }\r\n } else if (typeof props.modelValue === 'boolean') {\r\n innerValue.value = props.modelValue;\r\n }\r\n }\r\n\r\n const classes = computed<Record<string, boolean>>(() => {\r\n const { reverse, disabled, readonly } = props;\r\n return {\r\n 'y-checkbox': true,\r\n 'y-checkbox--reverse': !!reverse,\r\n 'y-checkbox--focused': focused.value,\r\n 'y-checkbox--disabled': !!disabled,\r\n 'y-checkbox--readonly': !!readonly,\r\n };\r\n });\r\n\r\n const computedIcon = computed<string | undefined>(() => {\r\n if (typeof props.icon === 'string') {\r\n return props.icon;\r\n }\r\n return undefined;\r\n });\r\n\r\n const isMultipleInput = computed<boolean>(() => {\r\n return Array.isArray(props.modelValue);\r\n });\r\n\r\n const multipleInputIndex = computed<number>(() => {\r\n if (!isMultipleInput.value) {\r\n return -1;\r\n }\r\n return (props.modelValue as any[]).findIndex(\r\n (v: any) => v === props.value,\r\n );\r\n });\r\n\r\n useRender(() => {\r\n return (\r\n <div class={[{...classes.value}]}>\r\n {slots.leading?.()}\r\n <div class=\"y-checkbox__slot\">\r\n <YInputCheckbox\r\n onClick={(e: Event, ...args: any[]) => {\r\n e.stopPropagation();\r\n onClick(e, ...args);\r\n }}\r\n onFocus={onFocus}\r\n onBlur={onBlur}\r\n id={counterId}\r\n value={innerValue.value}\r\n icon={computedIcon.value}\r\n color={props.color}\r\n disabled={props.disabled}\r\n readonly={props.readonly}\r\n >\r\n {slots.icon && {\r\n icon: (...args: any[]) => slots.icon?.(...args),\r\n }}\r\n </YInputCheckbox>\r\n <label\r\n onClick={withModifiers(() => {}, ['stop'])}\r\n class=\"y-checkbox__label\"\r\n for={inputId}\r\n >\r\n {slots.label ? slots.label?.() : props.label}\r\n </label>\r\n </div>\r\n {slots.trailing?.()}\r\n </div>\r\n );\r\n });\r\n\r\n return {\r\n innerValue,\r\n inputByValue,\r\n };\r\n },\r\n created() {\r\n if (Array.isArray(this.modelValue)) {\r\n this.inputByValue();\r\n } else {\r\n this.innerValue = !!this.modelValue;\r\n }\r\n },\r\n watch: {\r\n inputValue: {\r\n handler() {\r\n this.inputByValue();\r\n },\r\n immediate: true,\r\n },\r\n },\r\n});\r\n"],"mappings":";AAAA,SAAmBA,QAAQ,EAAEC,eAAe,EAAEC,GAAG,EAAEC,aAAa,QAAQ,KAAK;AAAC,SAErEC,SAAS;AAAA,SACTC,MAAM;AAEf;AAA0B,OACnBC,cAAc;AAErB,eAAeL,eAAe,CAAC;EAC7BM,IAAI,EAAE,WAAW;EACjBC,UAAU,EAAE;IAAEF;EAAe,CAAC;EAC9BG,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,mBAAmB,CAAC;EAC7CC,KAAK,EAAE;IACLC,UAAU,EAAE,CAACC,OAAO,EAAEC,KAAK,CAA8B;IACzDC,KAAK,EAAE,CAACC,MAAM,EAAEC,MAAM,EAAEC,MAAM,CAAkB;IAChDC,KAAK,EAAEH,MAA0B;IACjCI,OAAO,EAAEP,OAA4B;IACrCQ,IAAI,EAAE;MACJC,IAAI,EAAE,CAACJ,MAAM,EAAEF,MAAM;IAGvB,CAAC;IACDO,KAAK,EAAE;MACLD,IAAI,EAAEN,MAA0B;MAChCQ,OAAO,EAAEA,CAAA,KAAM;IACjB,CAAC;IACDC,QAAQ,EAAEZ,OAA4B;IACtCa,QAAQ,EAAEb;EACZ,CAAC;EACDc,KAAKA,CAAChB,KAAK,EAAAiB,IAAA,EAAmB;IAAA,IAAjB;MAAEC,IAAI;MAAEC;IAAM,CAAC,GAAAF,IAAA;IAC1B,MAAMG,OAAO,GAAG5B,GAAG,CAAC,KAAK,CAAC;IAC1B,MAAM6B,UAAU,GAAG7B,GAAG,CAAC,KAAK,CAAC;IAC7B,MAAM8B,SAAS,GAAG,CAAC3B,MAAM,CAAC,CAAC,I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ACrC;EACF,CAAC;EACDoD,KAAK,EAAE;IACLC,UAAU,EAAE;MACVC,OAAOA,CAAA,EAAG;QACR,IAAI,CAAC1B,YAAY,CAAC,CAAC;MACrB,CAAC;MACD2B,SAAS,EAAE;IACb;EACF;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"YCheckbox.mjs","names":["computed","defineComponent","ref","watch","withModifiers","useRender","getUid","YInputCheckbox","name","components","emits","props","modelValue","Boolean","Array","value","String","Number","Object","label","reverse","icon","type","color","default","disabled","readonly","setup","_ref","emit","slots","focused","checked","counterId","toString","inputId","isArray","inputByProp","onFocus","e","onBlur","onClick","check","found","find","inp","undefined","classes","computedIcon","isMultipleInput","getMultipleInputIndex","findIndex","v","neo","slice","index","push","splice","_createVNode","leading","stopPropagation","_len","arguments","length","args","_key","_len2","_key2","trailing"],"sources":["../../../src/components/checkbox/YCheckbox.tsx"],"sourcesContent":["import {\n PropType,\n computed,\n defineComponent,\n ref,\n watch,\n withModifiers,\n} from 'vue';\n\nimport { useRender } from '../../composables/component';\nimport { getUid } from '../../util/vue-component';\nimport YInputCheckbox from './YInputCheckbox';\n\nimport './YCheckbox.scss';\n\nexport default defineComponent({\n name: 'YCheckbox',\n components: { YInputCheckbox },\n emits: ['focus', 'blur', 'click', 'update:modelValue', 'change'],\n props: {\n modelValue: [Boolean, Array] as PropType<boolean | any[]>,\n value: [String, Number, Object] as PropType<any>,\n label: String as PropType<string>,\n reverse: Boolean as PropType<boolean>,\n icon: {\n type: [Object, String] as PropType<\n { checked?: string; unchecked?: string } | string\n >,\n },\n color: {\n type: String as PropType<string>,\n default: () => 'primary',\n },\n disabled: Boolean as PropType<boolean>,\n readonly: Boolean as PropType<boolean>,\n },\n setup(props, { emit, slots }) {\n const focused = ref(false);\n const checked = ref(false);\n const counterId = (getUid() ?? '').toString();\n const inputId = `input-${counterId}`;\n\n if (Array.isArray(props.modelValue)) {\n inputByProp();\n } else {\n checked.value = !!props.modelValue;\n }\n\n function onFocus(e: FocusEvent) {\n focused.value = true;\n emit('focus', e);\n }\n\n function onBlur(e: FocusEvent) {\n focused.value = false;\n emit('blur', e);\n }\n\n function onClick(e: Event, ...args: any[]) {\n emit('click', e);\n if (props.disabled || props.readonly) return;\n const check = !checked.value;\n checked.value = check;\n emit('change', check);\n }\n\n function inputByProp() {\n if (Array.isArray(props.modelValue)) {\n const found = props.modelValue?.find((inp: any) => inp === props.value);\n\n if (found !== undefined) {\n checked.value = true;\n } else {\n checked.value = false;\n }\n } else if (typeof props.modelValue === 'boolean') {\n checked.value = props.modelValue;\n }\n }\n\n const classes = computed<Record<string, boolean>>(() => {\n const { reverse, disabled, readonly } = props;\n return {\n 'y-checkbox': true,\n 'y-checkbox--reverse': !!reverse,\n 'y-checkbox--focused': focused.value,\n 'y-checkbox--disabled': !!disabled,\n 'y-checkbox--readonly': !!readonly,\n };\n });\n\n const computedIcon = computed<string | undefined>(() => {\n if (typeof props.icon === 'string') {\n return props.icon;\n }\n return undefined;\n });\n\n const isMultipleInput = computed<boolean>(() => {\n return Array.isArray(props.modelValue);\n });\n\n function getMultipleInputIndex() {\n if (!isMultipleInput.value) {\n return -1;\n }\n return (props.modelValue as any[]).findIndex(\n (v: any) => v === props.value,\n );\n }\n\n watch(checked, (neo) => {\n if (Array.isArray(props.modelValue)) {\n const value = props.modelValue.slice();\n const index = getMultipleInputIndex();\n if (neo && index === -1) {\n value.push(props.value);\n } else if (!neo && index !== -1) {\n value.splice(index, 1);\n }\n emit('update:modelValue', value);\n } else {\n emit('update:modelValue', neo);\n }\n });\n\n useRender(() => {\n return (\n <div class={[{ ...classes.value }]}>\n {slots.leading?.()}\n <div class=\"y-checkbox__slot\">\n <YInputCheckbox\n onClick={(e: Event, ...args: any[]) => {\n e.stopPropagation();\n onClick(e, ...args);\n }}\n onFocus={onFocus}\n onBlur={onBlur}\n id={counterId}\n value={checked.value}\n icon={computedIcon.value}\n color={props.color}\n disabled={props.disabled}\n readonly={props.readonly}\n >\n {slots.icon && {\n icon: (...args: any[]) => slots.icon?.(...args),\n }}\n </YInputCheckbox>\n <label\n onClick={withModifiers(() => {}, ['stop'])}\n class=\"y-checkbox__label\"\n for={inputId}\n >\n {slots.label ? slots.label?.() : props.label}\n </label>\n </div>\n {slots.trailing?.()}\n </div>\n );\n });\n\n return {\n checked,\n };\n },\n});\n"],"mappings":";AAAA,SAEEA,QAAQ,EACRC,eAAe,EACfC,GAAG,EACHC,KAAK,EACLC,aAAa,QACR,KAAK;AAAC,SAEJC,SAAS;AAAA,SACTC,MAAM;AAAA,OACRC,cAAc;AAErB;AAEA,eAAeN,eAAe,CAAC;EAC7BO,IAAI,EAAE,WAAW;EACjBC,UAAU,EAAE;IAAEF;EAAe,CAAC;EAC9BG,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,QAAQ,CAAC;EAChEC,KAAK,EAAE;IACLC,UAAU,EAAE,CAACC,OAAO,EAAEC,KAAK,CAA8B;IACzDC,KAAK,EAAE,CAACC,MAAM,EAAEC,MAAM,EAAEC,MAAM,CAAkB;IAChDC,KAAK,EAAEH,MAA0B;IACjCI,OAAO,EAAEP,OAA4B;IACrCQ,IAAI,EAAE;MACJC,IAAI,EAAE,CAACJ,MAAM,EAAEF,MAAM;IAGvB,CAAC;IACDO,KAAK,EAAE;MACLD,IAAI,EAAEN,MAA0B;MAChCQ,OAAO,EAAEA,CAAA,KAAM;IACjB,CAAC;IACDC,QAAQ,EAAEZ,OAA4B;IACtCa,QAAQ,EAAEb;EACZ,CAAC;EACDc,KAAKA,CAAChB,KAAK,EAAAiB,IAAA,EAAmB;IAAA,IAAjB;MAAEC,IAAI;MAAEC;IAAM,CAAC,GAAAF,IAAA;IAC1B,MAAMG,OAAO,GAAG7B,GAAG,CAAC,KAAK,CAAC;IAC1B,MAAM8B,OAAO,GAAG9B,GAAG,CAAC,KAAK,CAAC;IAC1B,MAAM+B,SAAS,GAAG,CAAC3B,MAAM,CAAC,CAAC,IAAI,EAAE,EAA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AA,GAAAJ,SAAA,CAAAC,MAAA,EAAIC,IAAI,OAAAlD,KAAA,CAAAoD,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;cAAJH,IAAI,CAAAG,KAAA,IAAAL,SAAA,CAAAK,KAAA;YAAA;YAAA,OAAYrC,KAAK,CAACT,IAAI,GAAG,GAAG2C,IAAI,CAAC;UAAA;QACjD,CAAC;MAAA,IAAAN,YAAA;QAAA,WAGQtD,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAAA,SACpC,mBAAmB;QAAA,OACpB+B;MAAO,IAEXL,KAAK,CAACX,KAAK,GAAGW,KAAK,CAACX,KAAK,GAAG,CAAC,GAAGR,KAAK,CAACQ,KAAK,MAG/CW,KAAK,CAACsC,QAAQ,GAAG,CAAC;IAGzB,CAAC,CAAC;IAEF,OAAO;MACLpC;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuyeon",
3
- "version": "0.0.38-rc5",
3
+ "version": "0.0.38-rc7",
4
4
  "keywords": [
5
5
  "UI Library",
6
6
  "Vue"
@@ -17,9 +17,8 @@ declare const _default: import("vue").DefineComponent<{
17
17
  disabled: PropType<boolean>;
18
18
  readonly: PropType<boolean>;
19
19
  }, {
20
- innerValue: import("vue").Ref<boolean>;
21
- inputByValue: () => void;
22
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "blur" | "update:modelValue")[], "focus" | "blur" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
+ checked: import("vue").Ref<boolean>;
21
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "click" | "blur" | "update:modelValue" | "change")[], "focus" | "click" | "blur" | "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
22
  modelValue: PropType<boolean | any[]>;
24
23
  value: PropType<any>;
25
24
  label: PropType<string>;
@@ -38,8 +37,10 @@ declare const _default: import("vue").DefineComponent<{
38
37
  readonly: PropType<boolean>;
39
38
  }>> & {
40
39
  onFocus?: ((...args: any[]) => any) | undefined;
40
+ onClick?: ((...args: any[]) => any) | undefined;
41
41
  onBlur?: ((...args: any[]) => any) | undefined;
42
42
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
43
+ onChange?: ((...args: any[]) => any) | undefined;
43
44
  }, {
44
45
  color: string;
45
46
  }, {}>;