yuyeon 0.2.1-rc.2 → 0.2.1-rc.3

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.
Files changed (31) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/yuyeon.js +4873 -4894
  3. package/dist/yuyeon.umd.cjs +3 -3
  4. package/lib/components/chip/YChip.mjs +50 -42
  5. package/lib/components/chip/YChip.mjs.map +1 -1
  6. package/lib/components/progress-bar/YProgressBar.mjs +38 -50
  7. package/lib/components/progress-bar/YProgressBar.mjs.map +1 -1
  8. package/lib/components/progress-bar/YProgressBar.scss +4 -0
  9. package/lib/composables/progress.mjs +7 -2
  10. package/lib/composables/progress.mjs.map +1 -1
  11. package/lib/index.mjs +1 -1
  12. package/lib/index.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/types/components/chip/YChip.d.ts +32 -17
  15. package/types/components/dialog/YDialog.d.ts +77 -77
  16. package/types/components/dropdown/YDropdown.d.ts +52 -52
  17. package/types/components/layer/YLayer.d.ts +10 -10
  18. package/types/components/menu/YMenu.d.ts +6 -6
  19. package/types/components/pagination/YPagination.d.ts +5 -5
  20. package/types/components/progress-bar/YProgressBar.d.ts +3 -8
  21. package/types/components/select/YSelect.d.ts +274 -274
  22. package/types/components/snackbar/YSnackbar.d.ts +8 -8
  23. package/types/components/table/YDataTable.d.ts +7 -7
  24. package/types/components/table/YDataTableCell.d.ts +1 -1
  25. package/types/components/table/YDataTableServer.d.ts +7 -7
  26. package/types/components/table/composibles/header.d.ts +8 -8
  27. package/types/components/tooltip/YTooltip.d.ts +14 -14
  28. package/types/composables/coordinate/index.d.ts +8 -8
  29. package/types/composables/progress.d.ts +1 -0
  30. package/types/index.d.ts +1 -1
  31. package/types/util/anchor.d.ts +1 -1
@@ -1,43 +1,53 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { rgbFromHex } from "../../util/color/index.mjs";
3
- import { hasOwnProperty } from "../../util/common.mjs";
4
- import { defineComponent } from "../../util/component/index.mjs";
2
+ import { computed } from 'vue';
3
+ import { useRender } from "../../composables/index.mjs";
4
+ import { isColorValue, rgbFromHex } from "../../util/color/index.mjs";
5
+ import { defineComponent, hasEventProp, propsFactory } from "../../util/component/index.mjs";
5
6
  import "./YChip.scss";
7
+ export const pressYChipPropsOptions = propsFactory({
8
+ color: String,
9
+ background: String,
10
+ backgroundOpacity: {
11
+ type: Number,
12
+ default: 0.14
13
+ },
14
+ small: Boolean
15
+ }, 'YChip');
6
16
  export const YChip = defineComponent({
7
17
  name: 'YChip',
8
18
  props: {
9
- color: String,
10
- background: String,
11
- small: Boolean,
12
- bgOpacity: {
13
- type: Number,
14
- default: 0.14
15
- }
19
+ ...pressYChipPropsOptions()
16
20
  },
17
- computed: {
18
- clickable() {
19
- return hasOwnProperty(this.$attrs, 'onClick');
20
- },
21
- classes() {
22
- return {
23
- 'y-chip': true,
24
- 'y-chip--small': this.small,
25
- 'y-chip--clickable': this.clickable
26
- };
27
- },
28
- backgroundColor() {
29
- const color = this.background ?? this.color;
30
- return this.colorRgb(color);
31
- },
32
- styles() {
21
+ setup(props, _ref) {
22
+ let {
23
+ slots,
24
+ emit
25
+ } = _ref;
26
+ const clickable = computed(() => {
27
+ return hasEventProp(props, 'click');
28
+ });
29
+ const styles = computed(() => {
30
+ let {
31
+ color,
32
+ background
33
+ } = props;
34
+ if (!background) background = color;
35
+ if (color && !isColorValue(color)) {
36
+ color = `var(--y-theme-${color})`;
37
+ }
38
+ if (background) {
39
+ if (isColorValue(background)) {
40
+ background = colorRgb(background);
41
+ } else if (!background.startsWith('var(')) {
42
+ background = `var(--y-theme-${background}-rgb)`;
43
+ }
44
+ }
33
45
  return {
34
- color: this.color,
35
- background: `rgba(${this.backgroundColor}, ${this.bgOpacity})`
46
+ color,
47
+ background: `rgba(${background}, ${props.backgroundOpacity})`
36
48
  };
37
- }
38
- },
39
- methods: {
40
- colorRgb(color) {
49
+ });
50
+ function colorRgb(color) {
41
51
  if (color?.startsWith('#')) {
42
52
  return rgbFromHex(color)?.join(',') || '';
43
53
  }
@@ -52,18 +62,16 @@ export const YChip = defineComponent({
52
62
  }
53
63
  return '';
54
64
  }
55
- },
56
- render() {
57
- const {
58
- classes,
59
- styles
60
- } = this;
61
- return _createVNode("span", {
62
- "class": classes,
63
- "style": styles
65
+ useRender(() => _createVNode("span", {
66
+ "class": ['y-chip', {
67
+ 'y-chip--small': props.small,
68
+ 'y-chip--clickable': clickable.value
69
+ }],
70
+ "style": styles.value
64
71
  }, [_createVNode("span", {
65
72
  "class": "y-chip__content"
66
- }, [this.$slots.default?.()])]);
73
+ }, [slots.default?.()])]));
74
+ return {};
67
75
  }
68
76
  });
69
77
  //# sourceMappingURL=YChip.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"YChip.mjs","names":["rgbFromHex","hasOwnProperty","defineComponent","YChip","name","props","color","String","background","small","Boolean","bgOpacity","type","Number","default","computed","clickable","$attrs","classes","backgroundColor","colorRgb","styles","methods","startsWith","join","RGBA_REGEX","test","value","exec","valueArray","trim","split","splice","render","_createVNode","$slots"],"sources":["../../../src/components/chip/YChip.tsx"],"sourcesContent":["import { rgbFromHex } from '@/util/color';\nimport { hasOwnProperty } from '@/util/common';\nimport { defineComponent } from '@/util/component';\n\nimport './YChip.scss';\n\nexport const YChip = defineComponent({\n name: 'YChip',\n props: {\n color: String,\n background: String,\n small: Boolean,\n bgOpacity: {\n type: Number,\n default: 0.14,\n },\n },\n computed: {\n clickable() {\n return hasOwnProperty(this.$attrs, 'onClick');\n },\n classes() {\n return {\n 'y-chip': true,\n 'y-chip--small': this.small,\n 'y-chip--clickable': this.clickable,\n };\n },\n backgroundColor() {\n const color = (this.background as string) ?? this.color;\n return this.colorRgb(color);\n },\n styles() {\n return {\n color: this.color,\n background: `rgba(${this.backgroundColor}, ${this.bgOpacity})`,\n };\n },\n },\n methods: {\n colorRgb(color: string): string {\n if (color?.startsWith('#')) {\n return rgbFromHex(color)?.join(',') || '';\n }\n const RGBA_REGEX = /rgb(a?)\\((?<v>.*)\\)/;\n if (RGBA_REGEX.test(color)) {\n const value = RGBA_REGEX.exec(color)?.[2] || '';\n if (value) {\n const valueArray = value.trim().split(',');\n valueArray.splice(3, 1);\n return valueArray.join(',');\n }\n }\n return '';\n },\n },\n render() {\n const { classes, styles } = this;\n return (\n <span class={classes} style={styles}>\n <span class=\"y-chip__content\">{this.$slots.default?.()}</span>\n </span>\n );\n },\n});\n\nexport type YChip = InstanceType<typeof YChip>;\n"],"mappings":";SAASA,UAAU;AAAA,SACVC,cAAc;AAAA,SACdC,eAAe;AAExB;AAEA,OAAO,MAAMC,KAAK,GAAGD,eAAe,CAAC;EACnCE,IAAI,EAAE,OAAO;EACbC,KAAK,EAAE;IACLC,KAAK,EAAEC,MAAM;IACbC,UAAU,EAAED,MAAM;IAClBE,KAAK,EAAEC,OAAO;IACdC,SAAS,EAAE;MACTC,IAAI,EAAEC,MAAM;MACZC,OAAO,EAAE;IACX;EACF,CAAC;EACDC,QAAQ,EAAE;IACRC,SAASA,CAAA,EAAG;MACV,OAAOf,cAAc,CAAC,IAAI,CAACgB,MAAM,EAAE,SAAS,CAAC;IAC/C,CAAC;IACDC,OAAOA,CAAA,EAAG;MACR,OAAO;QACL,QAAQ,EAAE,IAAI;QACd,eAAe,EAAE,IAAI,CAACT,KAAK;QAC3B,mBAAmB,EAAE,IAAI,CAACO;MAC5B,CAAC;IACH,CAAC;IACDG,eAAeA,CAAA,EAAG;MAChB,MAAMb,KAAK,GAAI,IAAI,CAACE,UAAU,IAAe,IAAI,CAACF,KAAK;MACvD,OAAO,IAAI,CAACc,QAAQ,CAACd,KAAK,CAAC;IAC7B,CAAC;IACDe,MAAMA,CAAA,EAAG;MACP,OAAO;QACLf,KAAK,EAAE,IAAI,CAACA,KAAK;QACjBE,UAAU,EAAG,QAAO,IAAI,CAACW,eAAgB,KAAI,IAAI,CAACR,SAAU;MAC9D,CAAC;IACH;EACF,CAAC;EACDW,OAAO,EAAE;IACPF,QAAQA,CAACd,KAAa,EAAU;MAC9B,IAAIA,KAAK,EAAEiB,UAAU,CAAC,GAAG,CAAC,EAAE;QAC1B,OAAOvB,UAAU,CAACM,KAAK,CAAC,EAAEkB,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;MAC3C;MACA,MAAMC,UAAU,GAAG,qBAAqB;MACxC,IAAIA,UAAU,CAACC,IAAI,CAACpB,KAAK,CAAC,EAAE;QAC1B,MAAMqB,KAAK,GAAGF,UAAU,CAACG,IAAI,CAACtB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;QAC/C,IAAIqB,KAAK,EAAE;UACT,MAAME,UAAU,GAAGF,KAAK,CAACG,IAAI,CAAC,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC;UAC1CF,UAAU,CAACG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;UACvB,OAAOH,UAAU,CAACL,IAAI,CAAC,GAAG,CAAC;QAC7B;MACF;MACA,OAAO,EAAE;IACX;EACF,CAAC;EACDS,MAAMA,CAAA,EAAG;IACP,MAAM;MAAEf,OAAO;MAAEG;IAAO,CAAC,GAAG,IAAI;IAChC,OAAAa,YAAA;MAAA,SACehB,OAAO;MAAA,SAASG;IAAM,IAAAa,YAAA;MAAA;IAAA,IACF,IAAI,CAACC,MAAM,CAACrB,OAAO,GAAG,CAAC;EAG5D;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"YChip.mjs","names":["computed","useRender","isColorValue","rgbFromHex","defineComponent","hasEventProp","propsFactory","pressYChipPropsOptions","color","String","background","backgroundOpacity","type","Number","default","small","Boolean","YChip","name","props","setup","_ref","slots","emit","clickable","styles","colorRgb","startsWith","join","RGBA_REGEX","test","value","exec","valueArray","trim","split","splice","_createVNode"],"sources":["../../../src/components/chip/YChip.tsx"],"sourcesContent":["import { computed } from 'vue';\n\nimport { useRender } from '@/composables';\nimport { isColorValue, rgbFromHex } from '@/util/color';\nimport { defineComponent, hasEventProp, propsFactory } from '@/util/component';\n\nimport './YChip.scss';\n\nexport const pressYChipPropsOptions = propsFactory(\n {\n color: String,\n background: String,\n backgroundOpacity: {\n type: Number,\n default: 0.14,\n },\n small: Boolean,\n },\n 'YChip',\n);\n\nexport const YChip = defineComponent({\n name: 'YChip',\n props: {\n ...pressYChipPropsOptions(),\n },\n setup(props, { slots, emit }) {\n const clickable = computed(() => {\n return hasEventProp(props, 'click');\n });\n\n const styles = computed(() => {\n let { color, background } = props;\n if (!background) background = color;\n\n if (color && !isColorValue(color)) {\n color = `var(--y-theme-${color})`;\n }\n\n if (background) {\n if (isColorValue(background)) {\n background = colorRgb(background);\n } else if (!background.startsWith('var(')) {\n background = `var(--y-theme-${background}-rgb)`;\n }\n }\n\n return {\n color,\n background: `rgba(${background}, ${props.backgroundOpacity})`,\n };\n });\n\n function colorRgb(color: string): string {\n if (color?.startsWith('#')) {\n return rgbFromHex(color)?.join(',') || '';\n }\n const RGBA_REGEX = /rgb(a?)\\((?<v>.*)\\)/;\n if (RGBA_REGEX.test(color)) {\n const value = RGBA_REGEX.exec(color)?.[2] || '';\n if (value) {\n const valueArray = value.trim().split(',');\n valueArray.splice(3, 1);\n return valueArray.join(',');\n }\n }\n return '';\n }\n\n useRender(() => (\n <span\n class={[\n 'y-chip',\n {\n 'y-chip--small': props.small,\n 'y-chip--clickable': clickable.value,\n },\n ]}\n style={styles.value}\n >\n <span class=\"y-chip__content\">{slots.default?.()}</span>\n </span>\n ));\n\n return {};\n },\n});\n\nexport type YChip = InstanceType<typeof YChip>;\n"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,KAAK;AAAC,SAEtBC,SAAS;AAAA,SACTC,YAAY,EAAEC,UAAU;AAAA,SACxBC,eAAe,EAAEC,YAAY,EAAEC,YAAY;AAEpD;AAEA,OAAO,MAAMC,sBAAsB,GAAGD,YAAY,CAChD;EACEE,KAAK,EAAEC,MAAM;EACbC,UAAU,EAAED,MAAM;EAClBE,iBAAiB,EAAE;IACjBC,IAAI,EAAEC,MAAM;IACZC,OAAO,E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C,UAAU,GAAG,qBAAqB;MACxC,IAAIA,UAAU,CAACC,IAAI,CAACtB,KAAK,CAAC,EAAE;QAC1B,MAAMuB,KAAK,GAAGF,UAAU,CAACG,IAAI,CAACxB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;QAC/C,IAAIuB,KAAK,EAAE;UACT,MAAME,UAAU,GAAGF,KAAK,CAACG,IAAI,CAAC,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC;UAC1CF,UAAU,CAACG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;UACvB,OAAOH,UAAU,CAACL,IAAI,CAAC,GAAG,CAAC;QAC7B;MACF;MACA,OAAO,EAAE;IACX;IAEA3B,SAAS,CAAC,MAAAoC,YAAA;MAAA,SAEC,CACL,QAAQ,EACR;QACE,eAAe,EAAElB,KAAK,CAACJ,KAAK;QAC5B,mBAAmB,EAAES,SAAS,CAACO;MACjC,CAAC,CACF;MAAA,SACMN,MAAM,CAACM;IAAK,IAAAM,YAAA;MAAA;IAAA,IAEYf,KAAK,CAACR,OAAO,GAAG,CAAC,IAEnD,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue";
2
+ import { computed } from 'vue';
3
+ import { useRender } from "../../composables/index.mjs";
2
4
  import { useProgress } from "../../composables/progress.mjs";
3
5
  import { isColorValue } from "../../util/color/index.mjs";
4
6
  import { defineComponent } from "../../util/component/index.mjs";
@@ -37,76 +39,58 @@ export const YProgressBar = defineComponent({
37
39
  indeterminate: Boolean,
38
40
  reverse: Boolean
39
41
  },
40
- setup(props) {
42
+ setup(props, _ref) {
43
+ let {
44
+ slots
45
+ } = _ref;
41
46
  const {
42
- numValue
47
+ numValue,
48
+ delta
43
49
  } = useProgress(props);
44
- return {
45
- numValue
46
- };
47
- },
48
- data() {
49
- return {
50
- delta: 0
51
- };
52
- },
53
- computed: {
54
- classes() {
50
+ const classes = computed(() => {
55
51
  let noTransition = false;
56
- if (this.noRewindTransition && this.delta < 0) {
52
+ if (props.noRewindTransition && delta.value < 0) {
57
53
  noTransition = true;
58
54
  }
59
55
  return {
60
56
  'y-progress--no-trans': noTransition,
61
- 'y-progress--outlined': !!this.outlined,
62
- 'y-progress--indeterminate': !!this.indeterminate,
63
- 'y-progress-bar--rounded': !!this.rounded,
64
- 'y-progress-bar--reverse': !!this.reverse
57
+ 'y-progress--outlined': props.outlined,
58
+ 'y-progress--indeterminate': props.indeterminate,
59
+ 'y-progress-bar--rounded': props.rounded,
60
+ 'y-progress-bar--reverse': props.reverse
65
61
  };
66
- },
67
- leadColor() {
68
- let color = this.color ?? '';
62
+ });
63
+ const leadColor = computed(() => {
64
+ let color = props.color ?? '';
69
65
  if (!isColorValue(color)) {
70
66
  color = `var(--y-theme-${color})`;
71
67
  }
72
68
  return color;
73
- },
74
- styles() {
69
+ });
70
+ const styles = computed(() => {
75
71
  let minWidth;
76
- if (this.innerText && this.numValue < 5 && this.numValue > 0) {
72
+ if (props.innerText && numValue.value < 5 && numValue.value > 0) {
77
73
  minWidth = '2rem';
78
74
  }
79
75
  return {
80
- width: `${this.numValue}%`,
76
+ width: `${numValue.value}%`,
81
77
  minWidth
82
78
  };
83
- }
84
- },
85
- render() {
86
- const {
87
- classes,
88
- numValue,
89
- height,
90
- outlineColor,
91
- textColor,
92
- styles,
93
- innerText
94
- } = this;
95
- const slots = this.$slots;
96
- return _createVNode("div", {
79
+ });
80
+ useRender(() => _createVNode("div", {
97
81
  "class": {
98
82
  'y-progress y-progress-bar': true,
99
- ...classes
83
+ ...classes.value
100
84
  },
101
85
  "role": "progressbar",
102
86
  "aria-valuemin": "0",
103
87
  "aria-valuemax": "100",
104
- "aria-valuenow": numValue,
88
+ "aria-valuenow": numValue.value,
105
89
  "style": {
106
- '--y-progress-bar__height': height !== undefined ? `${height}px` : undefined,
107
- '--y-progress-bar__outline-color': outlineColor !== undefined ? outlineColor : undefined,
108
- '--y-progress-bar__color': this.leadColor,
109
- '--y-progress-bar__value': this.numValue
90
+ '--y-progress-bar__height': props.height !== undefined ? `${props.height}px` : undefined,
91
+ '--y-progress-bar__outline-color': props.outlineColor !== undefined ? props.outlineColor : undefined,
92
+ '--y-progress-bar__color': leadColor.value,
93
+ '--y-progress-bar__value': numValue.value
110
94
  }
111
95
  }, [_createVNode("div", {
112
96
  "class": "y-progress__track"
@@ -114,16 +98,20 @@ export const YProgressBar = defineComponent({
114
98
  "class": "y-progress__tube"
115
99
  }, [_createVNode("div", {
116
100
  "class": "y-progress__lead",
117
- "style": styles
118
- }, [slots['lead-inner'] ? slots['lead-inner']() : innerText && _createVNode("div", {
101
+ "style": styles.value
102
+ }, [slots['lead-inner'] ? slots['lead-inner']() : props.innerText && _createVNode("div", {
119
103
  "class": {
120
104
  'y-progress__lead-inner': true,
121
- 'y-progress__lead-inner--fixed': numValue < 3
105
+ 'y-progress__lead-inner--fixed': numValue.value < 3
122
106
  },
123
107
  "style": {
124
- color: textColor
108
+ color: props.textColor
125
109
  }
126
- }, [_createVNode("span", null, [numValue, _createTextVNode(" %")])])])])]);
110
+ }, [_createVNode("span", null, [numValue, _createTextVNode(" %")])])])])]));
111
+ return {
112
+ numValue,
113
+ delta
114
+ };
127
115
  }
128
116
  });
129
117
  //# sourceMappingURL=YProgressBar.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"YProgressBar.mjs","names":["useProgress","isColorValue","defineComponent","YProgressBar","name","props","value","type","Number","rounded","Boolean","height","noRewindTransition","outlined","innerText","color","String","default","textColor","outlineColor","indeterminate","reverse","setup","numValue","data","delta","computed","classes","noTransition","leadColor","styles","minWidth","width","render","slots","$slots","_createVNode","undefined","_createTextVNode"],"sources":["../../../src/components/progress-bar/YProgressBar.tsx"],"sourcesContent":["import { type PropType, type StyleValue } from 'vue';\n\nimport { useProgress } from '@/composables/progress';\nimport { isColorValue } from '@/util/color';\nimport { defineComponent } from '@/util/component';\n\nimport './YProgressBar.scss';\n\nexport const YProgressBar = defineComponent({\n name: 'YProgressBar',\n props: {\n value: {\n type: Number as PropType<number>,\n },\n rounded: {\n type: Boolean as PropType<boolean>,\n },\n height: {\n type: Number as PropType<number>,\n },\n noRewindTransition: {\n type: Boolean as PropType<boolean>,\n },\n outlined: {\n type: Boolean as PropType<boolean>,\n },\n innerText: {\n type: Boolean as PropType<boolean>,\n },\n color: {\n type: String as PropType<string>,\n default: 'primary',\n },\n textColor: {\n type: String as PropType<string>,\n },\n outlineColor: {\n type: String as PropType<string>,\n },\n indeterminate: Boolean,\n reverse: Boolean,\n },\n setup(props) {\n const { numValue } = useProgress(props);\n\n return {\n numValue,\n };\n },\n data() {\n return {\n delta: 0,\n };\n },\n computed: {\n classes(): Record<string, boolean> {\n let noTransition = false;\n if (this.noRewindTransition && this.delta < 0) {\n noTransition = true;\n }\n return {\n 'y-progress--no-trans': noTransition,\n 'y-progress--outlined': !!this.outlined,\n 'y-progress--indeterminate': !!this.indeterminate,\n 'y-progress-bar--rounded': !!this.rounded,\n 'y-progress-bar--reverse': !!this.reverse,\n };\n },\n leadColor(): string {\n let color = this.color ?? '';\n if (!isColorValue(color)) {\n color = `var(--y-theme-${color})`;\n }\n return color;\n },\n styles(): StyleValue {\n let minWidth;\n if (this.innerText && this.numValue < 5 && this.numValue > 0) {\n minWidth = '2rem';\n }\n return {\n width: `${this.numValue}%`,\n minWidth,\n };\n },\n },\n render() {\n const {\n classes,\n numValue,\n height,\n outlineColor,\n textColor,\n styles,\n innerText,\n } = this;\n const slots = this.$slots;\n return (\n <div\n class={{ 'y-progress y-progress-bar': true, ...classes }}\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow={numValue}\n style={{\n '--y-progress-bar__height':\n height !== undefined ? `${height}px` : undefined,\n '--y-progress-bar__outline-color':\n outlineColor !== undefined ? outlineColor : undefined,\n '--y-progress-bar__color': this.leadColor,\n '--y-progress-bar__value': this.numValue,\n }}\n >\n <div class=\"y-progress__track\"></div>\n <div class=\"y-progress__tube\">\n <div class=\"y-progress__lead\" style={styles}>\n {slots['lead-inner']\n ? slots['lead-inner']()\n : innerText && (\n <div\n class={{\n 'y-progress__lead-inner': true,\n 'y-progress__lead-inner--fixed': numValue < 3,\n }}\n style={{ color: textColor }}\n >\n <span>{numValue} %</span>\n </div>\n )}\n </div>\n </div>\n </div>\n );\n },\n});\n\nexport type YProgressBar = InstanceType<typeof YProgressBar>;\n"],"mappings":";SAESA,WAAW;AAAA,SACXC,YAAY;AAAA,SACZC,eAAe;AAExB;AAEA,OAAO,MAAMC,YAAY,GAAGD,eAAe,CAAC;EAC1CE,IAAI,EAAE,cAAc;EACpBC,KAAK,EAAE;IACLC,KAAK,EAAE;MACLC,IAAI,EAAEC;IACR,CAAC;IACDC,OAAO,EAAE;MACPF,IAAI,EAAEG;IACR,CAAC;IACDC,MAAM,EAAE;MACNJ,IAAI,EAAEC;IACR,CAAC;IACDI,kBAAkB,EAAE;MAClBL,IAAI,EAAEG;IACR,CAAC;IACDG,QAAQ,EAAE;MACRN,IAAI,EAAEG;IACR,CAAC;IACDI,SAAS,EAAE;MACTP,IAAI,EAAEG;IACR,CAAC;IACDK,KAAK,EAAE;MACLR,IAAI,EAAES,MAA0B;MAChCC,OAAO,EAAE;IACX,CAAC;IACDC,SAAS,EAAE;MACTX,IAAI,EAAES;IACR,CAAC;IACDG,YAAY,EAAE;MACZZ,IAAI,EAAES;IACR,CAAC;IACDI,aAAa,EAAEV,OAAO;IACtBW,OAAO,EAAEX;EACX,CAAC;EACDY,KAAKA,CAACjB,KAAK,EAAE;IACX,MAAM;MAAEkB;IAAS,CAAC,GAAGvB,WAAW,CAACK,KAAK,CAAC;IAEvC,OAAO;MACLkB;IACF,CAAC;EACH,CAAC;EACDC,IAAIA,CAAA,EAAG;IACL,OAAO;MACLC,KAAK,EAAE;IACT,CAAC;EACH,CAAC;EACDC,QAAQ,EAAE;IACRC,OAAOA,CAAA,EAA4B;MACjC,IAAIC,Y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0B,SAAS,GAAI,GAAE1B,MAAO,IAAG,GAAG0B,SAAS;QAClD,iCAAiC,EAC/BlB,YAAY,KAAKkB,SAAS,GAAGlB,YAAY,GAAGkB,SAAS;QACvD,yBAAyB,EAAE,IAAI,CAACR,SAAS;QACzC,yBAAyB,EAAE,IAAI,CAACN;MAClC;IAAC,IAAAa,YAAA;MAAA;IAAA,UAAAA,YAAA;MAAA;IAAA,IAAAA,YAAA;MAAA;MAAA,SAIsCN;IAAM,IACxCI,KAAK,CAAC,YAAY,CAAC,GAChBA,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,GACrBpB,SAAS,IAAAsB,YAAA;MAAA,SAEE;QACL,wBAAwB,EAAE,IAAI;QAC9B,+BAA+B,EAAEb,QAAQ,GAAG;MAC9C,CAAC;MAAA,SACM;QAAER,KAAK,EAAEG;MAAU;IAAC,IAAAkB,YAAA,gBAEpBb,QAAQ,EAAAe,gBAAA,UAElB;EAKf;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"YProgressBar.mjs","names":["computed","useRender","useProgress","isColorValue","defineComponent","YProgressBar","name","props","value","type","Number","rounded","Boolean","height","noRewindTransition","outlined","innerText","color","String","default","textColor","outlineColor","indeterminate","reverse","setup","_ref","slots","numValue","delta","classes","noTransition","leadColor","styles","minWidth","width","_createVNode","undefined","_createTextVNode"],"sources":["../../../src/components/progress-bar/YProgressBar.tsx"],"sourcesContent":["import { type PropType, computed, shallowRef } from 'vue';\n\nimport { useRender } from '@/composables';\nimport { useProgress } from '@/composables/progress';\nimport { isColorValue } from '@/util/color';\nimport { defineComponent } from '@/util/component';\n\nimport './YProgressBar.scss';\n\nexport const YProgressBar = defineComponent({\n name: 'YProgressBar',\n props: {\n value: {\n type: Number as PropType<number>,\n },\n rounded: {\n type: Boolean as PropType<boolean>,\n },\n height: {\n type: Number as PropType<number>,\n },\n noRewindTransition: {\n type: Boolean as PropType<boolean>,\n },\n outlined: {\n type: Boolean as PropType<boolean>,\n },\n innerText: {\n type: Boolean as PropType<boolean>,\n },\n color: {\n type: String as PropType<string>,\n default: 'primary',\n },\n textColor: {\n type: String as PropType<string>,\n },\n outlineColor: {\n type: String as PropType<string>,\n },\n indeterminate: Boolean,\n reverse: Boolean,\n },\n setup(props, { slots }) {\n const { numValue, delta } = useProgress(props);\n\n const classes = computed(() => {\n let noTransition = false;\n if (props.noRewindTransition && delta.value < 0) {\n noTransition = true;\n }\n\n return {\n 'y-progress--no-trans': noTransition,\n 'y-progress--outlined': props.outlined,\n 'y-progress--indeterminate': props.indeterminate,\n 'y-progress-bar--rounded': props.rounded,\n 'y-progress-bar--reverse': props.reverse,\n };\n });\n\n const leadColor = computed(() => {\n let color = props.color ?? '';\n if (!isColorValue(color)) {\n color = `var(--y-theme-${color})`;\n }\n return color;\n });\n\n const styles = computed(() => {\n let minWidth;\n if (props.innerText && numValue.value < 5 && numValue.value > 0) {\n minWidth = '2rem';\n }\n return {\n width: `${numValue.value}%`,\n minWidth,\n };\n });\n\n useRender(() => (\n <div\n class={{ 'y-progress y-progress-bar': true, ...classes.value }}\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow={numValue.value}\n style={{\n '--y-progress-bar__height':\n props.height !== undefined ? `${props.height}px` : undefined,\n '--y-progress-bar__outline-color':\n props.outlineColor !== undefined ? props.outlineColor : undefined,\n '--y-progress-bar__color': leadColor.value,\n '--y-progress-bar__value': numValue.value,\n }}\n >\n <div class=\"y-progress__track\"></div>\n <div class=\"y-progress__tube\">\n <div class=\"y-progress__lead\" style={styles.value}>\n {slots['lead-inner']\n ? slots['lead-inner']()\n : props.innerText && (\n <div\n class={{\n 'y-progress__lead-inner': true,\n 'y-progress__lead-inner--fixed': numValue.value < 3,\n }}\n style={{ color: props.textColor }}\n >\n <span>{numValue} %</span>\n </div>\n )}\n </div>\n </div>\n </div>\n ));\n\n return {\n numValue,\n delta,\n };\n },\n});\n\nexport type YProgressBar = InstanceType<typeof YProgressBar>;\n"],"mappings":";AAA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K,CAAC,YAAY,CAAC,GAChBA,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,GACrBnB,KAAK,CAACS,SAAS,IAAAmB,YAAA;MAAA,SAEJ;QACL,wBAAwB,EAAE,IAAI;QAC9B,+BAA+B,EAAER,QAAQ,CAACnB,KAAK,GAAG;MACpD,CAAC;MAAA,SACM;QAAES,KAAK,EAAEV,KAAK,CAACa;MAAU;IAAC,IAAAe,YAAA,gBAE1BR,QAAQ,EAAAU,gBAAA,UAElB,MAIZ,CAAC;IAEF,OAAO;MACLV,QAAQ;MACRC;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
@@ -113,4 +113,8 @@
113
113
  &--indeterminate &__lead {
114
114
  visibility: hidden;
115
115
  }
116
+
117
+ &--no-trans &__lead {
118
+ transition: none;
119
+ }
116
120
  }
@@ -1,5 +1,6 @@
1
- import { computed } from 'vue';
1
+ import { computed, shallowRef, watch } from 'vue';
2
2
  export function useProgress(props) {
3
+ const delta = shallowRef(0);
3
4
  const numValue = computed(() => {
4
5
  const {
5
6
  value
@@ -13,8 +14,12 @@ export function useProgress(props) {
13
14
  }
14
15
  return numValue;
15
16
  });
17
+ watch(numValue, (neo, old) => {
18
+ delta.value = neo - old;
19
+ });
16
20
  return {
17
- numValue
21
+ numValue,
22
+ delta
18
23
  };
19
24
  }
20
25
  //# sourceMappingURL=progress.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress.mjs","names":["computed","useProgress","props","numValue","value","Number","isNaN"],"sources":["../../src/composables/progress.ts"],"sourcesContent":["import { computed } from 'vue';\n\nexport function useProgress(props: any) {\n const numValue = computed(() => {\n const { value } = props;\n const numValue = Number(value);\n if (Number.isNaN(numValue) || numValue < 0) {\n return 0;\n }\n if (numValue > 100) {\n return 100;\n }\n return numValue;\n });\n\n return {\n numValue,\n };\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,KAAK;AAE9B,OAAO,SAASC,WAAWA,CAACC,KAAU,EAAE;EACtC,MAAMC,QAAQ,GAAGH,QAAQ,CAAC,MAAM;IAC9B,MAAM;MAAEI;IAAM,CAAC,GAAGF,KAAK;IACvB,MAAMC,QAAQ,GAAGE,MAAM,CAACD,KAAK,CAAC;IAC9B,IAAIC,MAAM,CAACC,KAAK,CAACH,QAAQ,CAAC,IAAIA,QAAQ,GAAG,CAAC,EAAE;MAC1C,OAAO,CAAC;IACV;IACA,IAAIA,QAAQ,GAAG,GAAG,EAAE;MAClB,OAAO,GAAG;IACZ;IACA,OAAOA,QAAQ;EACjB,CAAC,CAAC;EAEF,OAAO;IACLA;EACF,CAAC;AACH"}
1
+ {"version":3,"file":"progress.mjs","names":["computed","shallowRef","watch","useProgress","props","delta","numValue","value","Number","isNaN","neo","old"],"sources":["../../src/composables/progress.ts"],"sourcesContent":["import { computed, shallowRef, watch } from 'vue';\n\nexport function useProgress(props: any) {\n const delta = shallowRef(0);\n\n const numValue = computed(() => {\n const { value } = props;\n const numValue = Number(value);\n if (Number.isNaN(numValue) || numValue < 0) {\n return 0;\n }\n if (numValue > 100) {\n return 100;\n }\n return numValue;\n });\n\n watch(numValue, (neo, old) => {\n delta.value = neo - old;\n });\n\n return {\n numValue,\n delta,\n };\n}\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAEjD,OAAO,SAASC,WAAWA,CAACC,KAAU,EAAE;EACtC,MAAMC,KAAK,GAAGJ,UAAU,CAAC,CAAC,CAAC;EAE3B,MAAMK,QAAQ,GAAGN,QAAQ,CAAC,MAAM;IAC9B,MAAM;MAAEO;IAAM,CAAC,GAAGH,KAAK;IACvB,MAAME,QAAQ,GAAGE,MAAM,CAACD,KAAK,CAAC;IAC9B,IAAIC,MAAM,CAACC,KAAK,CAACH,QAAQ,CAAC,IAAIA,QAAQ,GAAG,CAAC,EAAE;MAC1C,OAAO,CAAC;IACV;IACA,IAAIA,QAAQ,GAAG,GAAG,EAAE;MAClB,OAAO,GAAG;IACZ;IACA,OAAOA,QAAQ;EACjB,CAAC,CAAC;EAEFJ,KAAK,CAACI,QAAQ,EAAE,CAACI,GAAG,EAAEC,GAAG,KAAK;IAC5BN,KAAK,CAACE,KAAK,GAAGG,GAAG,GAAGC,GAAG;EACzB,CAAC,CAAC;EAEF,OAAO;IACLL,QAAQ;IACRD;EACF,CAAC;AACH"}
package/lib/index.mjs CHANGED
@@ -33,7 +33,7 @@ export function init() {
33
33
  date: dateModule,
34
34
  defaults: defaultsModule
35
35
  });
36
- Object.keys(components).forEach(componentName => {
36
+ Object.keys(options?.components ?? components).forEach(componentName => {
37
37
  const comp = components[componentName];
38
38
  if (typeof comp === 'object' && 'name' in comp) app.component(componentName, comp);
39
39
  });
package/lib/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["getCurrentInstance","nextTick","reactive","components","YUYEON_DATE_KEY","YUYEON_DATE_OPTIONS_KEY","createDateModule","createDefaultsModule","YUYEON_DEFAULTS_KEY","createI18nModule","YUYEON_I18N_KEY","YUYEON_ICON_KEY","createIconModule","YUYEON_THEME_KEY","createThemeModule","useTheme","PlateWave","YUYEON_LOGO","defaultOptions","credit","init","options","arguments","length","undefined","defaultsModule","defaults","themeModule","theme","i18nModule","i18n","dateModule","date","localeModule","iconModule","icon","install","app","yuyeon","root","instance","rtlModule","Object","keys","forEach","componentName","comp","component","directive","provide","config","globalProperties","$yuyeon","_container","_instance","classList","add","setAttribute","console","log","unmount","mount","vm","scope","stop","useYuyeon","Error","appContext"],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Component, ComponentInternalInstance } from 'vue';\nimport { getCurrentInstance, nextTick, reactive } from 'vue';\n\nimport * as components from '@/components';\nimport {\n YUYEON_DATE_KEY,\n YUYEON_DATE_OPTIONS_KEY,\n createDateModule,\n} from '@/composables/date';\nimport { createDefaultsModule } from '@/composables/defaults';\nimport { YUYEON_DEFAULTS_KEY } from '@/composables/defaults/share';\nimport { createI18nModule } from '@/composables/i18n';\nimport { YUYEON_I18N_KEY } from '@/composables/i18n/share';\nimport { YUYEON_ICON_KEY, createIconModule } from '@/composables/icon';\nimport {\n YUYEON_THEME_KEY,\n createThemeModule,\n useTheme,\n} from '@/composables/theme';\nimport PlateWave from '@/directives/plate-wave';\nimport { YUYEON_LOGO } from '@/etc';\n\nimport './styles/base.scss';\n\nconst defaultOptions = {\n credit: true,\n};\n\ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $yuyeon: any;\n }\n}\n\nexport function init(options: any = defaultOptions) {\n const defaultsModule = createDefaultsModule(options?.defaults);\n const themeModule = createThemeModule(options?.theme);\n const i18nModule = createI18nModule(options?.i18n);\n const dateModule = createDateModule(options?.date, i18nModule.localeModule);\n const iconModule = createIconModule(options?.icon);\n const install = (app: App): any => {\n themeModule.install(app);\n\n const yuyeon = reactive({\n app: null as ComponentInternalInstance | null,\n root: null as HTMLElement | null,\n theme: themeModule.instance,\n i18n: {\n ...i18nModule.localeModule,\n ...i18nModule.rtlModule,\n },\n date: dateModule,\n defaults: defaultsModule,\n });\n\n Object.keys(components).forEach((componentName) => {\n const comp = components[componentName as keyof typeof components];\n if (typeof comp === 'object' && 'name' in comp)\n app.component(componentName, comp as Component);\n });\n\n app.directive('plate-wave', PlateWave);\n\n app.provide(YUYEON_DEFAULTS_KEY, defaultsModule);\n app.provide(YUYEON_THEME_KEY, themeModule.instance);\n app.provide(YUYEON_ICON_KEY, iconModule);\n app.provide(YUYEON_I18N_KEY, {\n ...i18nModule.localeModule,\n ...i18nModule.rtlModule,\n });\n app.provide(YUYEON_DATE_OPTIONS_KEY, dateModule.options);\n app.provide(YUYEON_DATE_KEY, dateModule.instance);\n\n app.config.globalProperties.$yuyeon = yuyeon;\n\n nextTick(() => {\n yuyeon.root = app._container;\n yuyeon.app = app._instance as any;\n if (yuyeon.root) {\n yuyeon.root.classList.add('y-root');\n yuyeon.root.setAttribute('data-y-root', '');\n themeModule.init(yuyeon);\n }\n });\n\n if (options?.credit) {\n console.log(YUYEON_LOGO);\n }\n const { unmount, mount } = app;\n app.mount = (...args) => {\n const vm = mount(...args);\n if (!yuyeon.app) {\n yuyeon.app = app._instance as any;\n }\n if (!yuyeon.root) {\n nextTick(() => {\n yuyeon.root = app._container;\n if (yuyeon.root) {\n yuyeon.root.classList.add('y-root');\n yuyeon.root.setAttribute('data-y-root', '');\n themeModule.init(yuyeon);\n }\n });\n }\n app.mount = mount;\n return vm;\n };\n app.unmount = () => {\n unmount();\n themeModule.scope.stop();\n app.unmount = unmount;\n };\n };\n\n return {\n install,\n };\n}\n\nexport function useYuyeon() {\n const vm = getCurrentInstance();\n if (!vm) throw new Error('[yuyeon] Called outside of setup context');\n\n return vm.appContext.config.globalProperties.$yuyeon;\n}\n\nexport { useTheme };\n"],"mappings":"AACA,SAASA,kBAAkB,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,KAAK;AAAC,OAEtD,KAAKC,UAAU;AAAA,SAEpBC,eAAe,EACfC,uBAAuB,EACvBC,gBAAgB;AAAA,SAETC,oBAAoB;AAAA,SACpBC,mBAAmB;AAAA,SACnBC,gBAAgB;AAAA,SAChBC,eAAe;AAAA,SACfC,eAAe,EAAEC,gBAAgB;AAAA,SAExCC,gBAAgB,EAChBC,iBAAiB,EACjBC,QAAQ;AAAA,OAEHC,SAAS;AAAA,SACPC,WAAW;AAEpB;AAEA,MAAMC,cAAc,GAAG;EACrBC,MAAM,EAAE;AACV,CAAC;AAQD,OAAO,SAASC,IAAIA,CAAA,EAAgC;EAAA,IAA/BC,OAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGJ,cAAc;EAChD,MAAMO,cAAc,GAAGlB,oBAAoB,CAACc,OAAO,EAAEK,QAAQ,CAAC;EAC9D,MAAMC,WAAW,GAAGb,iBAAiB,CAACO,OAAO,EAAEO,KAAK,CAAC;EACrD,MAAMC,UAAU,GAAGpB,gBAAgB,CAACY,OAAO,EAAES,IAAI,CAAC;EAClD,MAAMC,UAAU,GAAG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ACF,CAAC,CAAC;MACJ;MACAD,GAAG,CAACwB,KAAK,GAAGA,KAAK;MACjB,OAAOC,EAAE;IACX,CAAC;IACDzB,GAAG,CAACuB,OAAO,GAAG,MAAM;MAClBA,OAAO,CAAC,CAAC;MACTjC,WAAW,CAACoC,KAAK,CAACC,IAAI,CAAC,CAAC;MACxB3B,GAAG,CAACuB,OAAO,GAAGA,OAAO;IACvB,CAAC;EACH,CAAC;EAED,OAAO;IACLxB;EACF,CAAC;AACH;AAEA,OAAO,SAAS6B,SAASA,CAAA,EAAG;EAC1B,MAAMH,EAAE,GAAG9D,kBAAkB,CAAC,CAAC;EAC/B,IAAI,CAAC8D,EAAE,EAAE,MAAM,IAAII,KAAK,CAAC,0CAA0C,CAAC;EAEpE,OAAOJ,EAAE,CAACK,UAAU,CAACjB,MAAM,CAACC,gBAAgB,CAACC,OAAO;AACtD;AAEA,SAASrC,QAAQ"}
1
+ {"version":3,"file":"index.mjs","names":["getCurrentInstance","nextTick","reactive","components","YUYEON_DATE_KEY","YUYEON_DATE_OPTIONS_KEY","createDateModule","createDefaultsModule","YUYEON_DEFAULTS_KEY","createI18nModule","YUYEON_I18N_KEY","YUYEON_ICON_KEY","createIconModule","YUYEON_THEME_KEY","createThemeModule","useTheme","PlateWave","YUYEON_LOGO","defaultOptions","credit","init","options","arguments","length","undefined","defaultsModule","defaults","themeModule","theme","i18nModule","i18n","dateModule","date","localeModule","iconModule","icon","install","app","yuyeon","root","instance","rtlModule","Object","keys","forEach","componentName","comp","component","directive","provide","config","globalProperties","$yuyeon","_container","_instance","classList","add","setAttribute","console","log","unmount","mount","vm","scope","stop","useYuyeon","Error","appContext"],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Component, ComponentInternalInstance } from 'vue';\nimport { getCurrentInstance, nextTick, reactive } from 'vue';\n\nimport * as components from '@/components';\nimport {\n YUYEON_DATE_KEY,\n YUYEON_DATE_OPTIONS_KEY,\n createDateModule,\n} from '@/composables/date';\nimport { createDefaultsModule } from '@/composables/defaults';\nimport { YUYEON_DEFAULTS_KEY } from '@/composables/defaults/share';\nimport { createI18nModule } from '@/composables/i18n';\nimport { YUYEON_I18N_KEY } from '@/composables/i18n/share';\nimport { YUYEON_ICON_KEY, createIconModule } from '@/composables/icon';\nimport {\n YUYEON_THEME_KEY,\n createThemeModule,\n useTheme,\n} from '@/composables/theme';\nimport PlateWave from '@/directives/plate-wave';\nimport { YUYEON_LOGO } from '@/etc';\n\nimport './styles/base.scss';\n\nconst defaultOptions = {\n credit: true,\n};\n\ndeclare module 'vue' {\n interface ComponentCustomProperties {\n $yuyeon: any;\n }\n}\n\nexport function init(options: any = defaultOptions) {\n const defaultsModule = createDefaultsModule(options?.defaults);\n const themeModule = createThemeModule(options?.theme);\n const i18nModule = createI18nModule(options?.i18n);\n const dateModule = createDateModule(options?.date, i18nModule.localeModule);\n const iconModule = createIconModule(options?.icon);\n const install = (app: App) => {\n themeModule.install(app);\n\n const yuyeon = reactive({\n app: null as ComponentInternalInstance | null,\n root: null as HTMLElement | null,\n theme: themeModule.instance,\n i18n: {\n ...i18nModule.localeModule,\n ...i18nModule.rtlModule,\n },\n date: dateModule,\n defaults: defaultsModule,\n });\n\n Object.keys(options?.components ?? components).forEach((componentName) => {\n const comp = components[componentName as keyof typeof components];\n if (typeof comp === 'object' && 'name' in comp)\n app.component(componentName, comp as Component);\n });\n\n app.directive('plate-wave', PlateWave);\n\n app.provide(YUYEON_DEFAULTS_KEY, defaultsModule);\n app.provide(YUYEON_THEME_KEY, themeModule.instance);\n app.provide(YUYEON_ICON_KEY, iconModule);\n app.provide(YUYEON_I18N_KEY, {\n ...i18nModule.localeModule,\n ...i18nModule.rtlModule,\n });\n app.provide(YUYEON_DATE_OPTIONS_KEY, dateModule.options);\n app.provide(YUYEON_DATE_KEY, dateModule.instance);\n\n app.config.globalProperties.$yuyeon = yuyeon;\n\n nextTick(() => {\n yuyeon.root = app._container;\n yuyeon.app = app._instance as any;\n if (yuyeon.root) {\n yuyeon.root.classList.add('y-root');\n yuyeon.root.setAttribute('data-y-root', '');\n themeModule.init(yuyeon);\n }\n });\n\n if (options?.credit) {\n console.log(YUYEON_LOGO);\n }\n const { unmount, mount } = app;\n app.mount = (...args) => {\n const vm = mount(...args);\n if (!yuyeon.app) {\n yuyeon.app = app._instance as any;\n }\n if (!yuyeon.root) {\n nextTick(() => {\n yuyeon.root = app._container;\n if (yuyeon.root) {\n yuyeon.root.classList.add('y-root');\n yuyeon.root.setAttribute('data-y-root', '');\n themeModule.init(yuyeon);\n }\n });\n }\n app.mount = mount;\n return vm;\n };\n app.unmount = () => {\n unmount();\n themeModule.scope.stop();\n app.unmount = unmount;\n };\n };\n\n return {\n install,\n };\n}\n\nexport function useYuyeon() {\n const vm = getCurrentInstance();\n if (!vm) throw new Error('[yuyeon] Called outside of setup context');\n\n return vm.appContext.config.globalProperties.$yuyeon;\n}\n\nexport { useTheme };\n"],"mappings":"AACA,SAASA,kBAAkB,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,KAAK;AAAC,OAEtD,KAAKC,UAAU;AAAA,SAEpBC,eAAe,EACfC,uBAAuB,EACvBC,gBAAgB;AAAA,SAETC,oBAAoB;AAAA,SACpBC,mBAAmB;AAAA,SACnBC,gBAAgB;AAAA,SAChBC,eAAe;AAAA,SACfC,eAAe,EAAEC,gBAAgB;AAAA,SAExCC,gBAAgB,EAChBC,iBAAiB,EACjBC,QAAQ;AAAA,OAEHC,SAAS;AAAA,SACPC,WAAW;AAEpB;AAEA,MAAMC,cAAc,GAAG;EACrBC,MAAM,EAAE;AACV,CAAC;AAQD,OAAO,SAASC,IAAIA,CAAA,EAAgC;EAAA,IAA/BC,OAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGJ,cAAc;EAChD,MAAMO,cAAc,GAAGlB,oBAAoB,CAACc,OAAO,EAAEK,QAAQ,CAAC;EAC9D,MAAMC,WAAW,GAAGb,iBAAiB,CAACO,OAAO,EAA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Q,CAAC;YACnClB,MAAM,CAACC,IAAI,CAACkB,YAAY,CAAC,aAAa,EAAE,EAAE,CAAC;YAC3C9B,WAAW,CAACP,IAAI,CAACkB,MAAM,CAAC;UAC1B;QACF,CAAC,CAAC;MACJ;MACAD,GAAG,CAACwB,KAAK,GAAGA,KAAK;MACjB,OAAOC,EAAE;IACX,CAAC;IACDzB,GAAG,CAACuB,OAAO,GAAG,MAAM;MAClBA,OAAO,CAAC,CAAC;MACTjC,WAAW,CAACoC,KAAK,CAACC,IAAI,CAAC,CAAC;MACxB3B,GAAG,CAACuB,OAAO,GAAGA,OAAO;IACvB,CAAC;EACH,CAAC;EAED,OAAO;IACLxB;EACF,CAAC;AACH;AAEA,OAAO,SAAS6B,SAASA,CAAA,EAAG;EAC1B,MAAMH,EAAE,GAAG9D,kBAAkB,CAAC,CAAC;EAC/B,IAAI,CAAC8D,EAAE,EAAE,MAAM,IAAII,KAAK,CAAC,0CAA0C,CAAC;EAEpE,OAAOJ,EAAE,CAACK,UAAU,CAACjB,MAAM,CAACC,gBAAgB,CAACC,OAAO;AACtD;AAEA,SAASrC,QAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuyeon",
3
- "version": "0.2.1-rc.2",
3
+ "version": "0.2.1-rc.3",
4
4
  "keywords": [
5
5
  "UI Library",
6
6
  "Vue"
@@ -1,25 +1,40 @@
1
1
 
2
+ export declare const pressYChipPropsOptions: <Defaults extends {
3
+ color?: unknown;
4
+ background?: unknown;
5
+ backgroundOpacity?: unknown;
6
+ small?: unknown;
7
+ } = {}>(defaults?: Defaults | undefined) => {
8
+ color: unknown extends Defaults["color"] ? StringConstructor : {
9
+ type: import('vue').PropType<unknown extends Defaults["color"] ? string : string | Defaults["color"]>;
10
+ default: unknown extends Defaults["color"] ? string : string | Defaults["color"];
11
+ };
12
+ background: unknown extends Defaults["background"] ? StringConstructor : {
13
+ type: import('vue').PropType<unknown extends Defaults["background"] ? string : string | Defaults["background"]>;
14
+ default: unknown extends Defaults["background"] ? string : string | Defaults["background"];
15
+ };
16
+ backgroundOpacity: unknown extends Defaults["backgroundOpacity"] ? {
17
+ type: NumberConstructor;
18
+ default: number;
19
+ } : Omit<{
20
+ type: NumberConstructor;
21
+ default: number;
22
+ }, "type" | "default"> & {
23
+ type: import('vue').PropType<unknown extends Defaults["backgroundOpacity"] ? number : number | Defaults["backgroundOpacity"]>;
24
+ default: unknown extends Defaults["backgroundOpacity"] ? number : number | Defaults["backgroundOpacity"];
25
+ };
26
+ small: unknown extends Defaults["small"] ? BooleanConstructor : {
27
+ type: import('vue').PropType<unknown extends Defaults["small"] ? boolean : boolean | Defaults["small"]>;
28
+ default: unknown extends Defaults["small"] ? boolean : boolean | Defaults["small"];
29
+ };
30
+ };
2
31
  export declare const YChip: import('vue').DefineComponent<{
3
32
  color: StringConstructor;
4
33
  background: StringConstructor;
5
- small: BooleanConstructor;
6
- bgOpacity: {
34
+ backgroundOpacity: {
7
35
  type: NumberConstructor;
8
36
  default: number;
9
37
  };
10
- }, unknown, {}, {
11
- clickable(): boolean;
12
- classes(): {
13
- 'y-chip': boolean;
14
- 'y-chip--small': boolean;
15
- 'y-chip--clickable': boolean;
16
- };
17
- backgroundColor(): string;
18
- styles(): {
19
- color: string | undefined;
20
- background: string;
21
- };
22
- }, {
23
- colorRgb(color: string): string;
24
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string>;
38
+ small: BooleanConstructor;
39
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string>;
25
40
  export type YChip = InstanceType<typeof YChip>;