yuyeon 0.3.1-rc.2 → 0.3.1-rc.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.
Files changed (231) hide show
  1. package/LICENSE +191 -191
  2. package/README.md +15 -15
  3. package/dist/yuyeon.js +1689 -1753
  4. package/dist/yuyeon.umd.cjs +3 -3
  5. package/lib/abstract/items.mjs.map +1 -1
  6. package/lib/components/alert/YAlert.mjs +2 -2
  7. package/lib/components/alert/YAlert.mjs.map +1 -1
  8. package/lib/components/alert/YAlert.scss +77 -77
  9. package/lib/components/app/YApp.mjs +2 -2
  10. package/lib/components/app/YApp.mjs.map +1 -1
  11. package/lib/components/bench/YBench.mjs +2 -2
  12. package/lib/components/bench/YBench.mjs.map +1 -1
  13. package/lib/components/button/YButton.scss +137 -137
  14. package/lib/components/card/YCard.mjs.map +1 -1
  15. package/lib/components/card/YCard.scss +45 -45
  16. package/lib/components/card/YCardBody.mjs.map +1 -1
  17. package/lib/components/card/YCardFooter.mjs.map +1 -1
  18. package/lib/components/card/YCardHeader.mjs.map +1 -1
  19. package/lib/components/checkbox/YCheckbox.mjs.map +1 -1
  20. package/lib/components/checkbox/YInputCheckbox.mjs.map +1 -1
  21. package/lib/components/checkbox/YInputCheckbox.scss +84 -84
  22. package/lib/components/checkbox/index.mjs.map +1 -1
  23. package/lib/components/chip/YChip.scss +36 -36
  24. package/lib/components/date-picker/YDateCalendar.mjs.map +1 -1
  25. package/lib/components/date-picker/YDateCalendar.scss +84 -84
  26. package/lib/components/date-picker/YDatePicker.mjs +2 -2
  27. package/lib/components/date-picker/YDatePicker.mjs.map +1 -1
  28. package/lib/components/date-picker/YDatePickerControl.mjs.map +1 -1
  29. package/lib/components/date-picker/YMonthPicker.mjs.map +1 -1
  30. package/lib/components/date-picker/YYearPicker.mjs.map +1 -1
  31. package/lib/components/dialog/index.mjs.map +1 -1
  32. package/lib/components/divider/YDivider.mjs.map +1 -1
  33. package/lib/components/divider/YDivider.scss +2 -2
  34. package/lib/components/draggable/YDraggable.mjs +2 -2
  35. package/lib/components/draggable/YDraggable.mjs.map +1 -1
  36. package/lib/components/dropdown/YDropdown.mjs.map +1 -1
  37. package/lib/components/dropdown/YDropdown.scss +27 -27
  38. package/lib/components/field-input/index.mjs.map +1 -1
  39. package/lib/components/form/YForm.mjs.map +1 -1
  40. package/lib/components/hover/YHover.mjs +1 -1
  41. package/lib/components/hover/YHover.mjs.map +1 -1
  42. package/lib/components/icon/YIcon.mjs.map +1 -1
  43. package/lib/components/icon/YIcon.scss +18 -18
  44. package/lib/components/icons/YIconCheckbox.mjs.map +1 -1
  45. package/lib/components/icons/YIconClear.mjs.map +1 -1
  46. package/lib/components/icons/YIconDropdown.mjs.map +1 -1
  47. package/lib/components/icons/YIconExpand.mjs.map +1 -1
  48. package/lib/components/icons/YIconPageControl.mjs.map +1 -1
  49. package/lib/components/icons/YIconSort.mjs.map +1 -1
  50. package/lib/components/icons/YIconSort.scss +24 -24
  51. package/lib/components/icons/index.mjs.map +1 -1
  52. package/lib/components/img/YImg.mjs +4 -4
  53. package/lib/components/img/YImg.mjs.map +1 -1
  54. package/lib/components/index.mjs.map +1 -1
  55. package/lib/components/input/YInput.mjs.map +1 -1
  56. package/lib/components/input/YInput.scss +258 -258
  57. package/lib/components/ip-field/YIpv4Field.mjs.map +1 -1
  58. package/lib/components/layer/YLayer.mjs.map +1 -1
  59. package/lib/components/layer/active-stack.mjs.map +1 -1
  60. package/lib/components/layer/base.mjs.map +1 -1
  61. package/lib/components/layer/content.mjs.map +1 -1
  62. package/lib/components/layer/scroll-strategies.mjs.map +1 -1
  63. package/lib/components/list/YList.mjs.map +1 -1
  64. package/lib/components/list/YListItem.mjs.map +1 -1
  65. package/lib/components/loading/YSpinnerRing.mjs.map +1 -1
  66. package/lib/components/menu/YMenu.mjs +2 -2
  67. package/lib/components/menu/YMenu.mjs.map +1 -1
  68. package/lib/components/menu/YMenu.scss +25 -25
  69. package/lib/components/navigation/YNavigation.mjs.map +1 -1
  70. package/lib/components/pagination/YPagination.mjs.map +1 -1
  71. package/lib/components/pagination/YPagination.scss +52 -52
  72. package/lib/components/panel/YDividePanel.mjs.map +1 -1
  73. package/lib/components/plate/YPlate.mjs +2 -2
  74. package/lib/components/plate/YPlate.mjs.map +1 -1
  75. package/lib/components/progress-bar/YProgressBar.mjs.map +1 -1
  76. package/lib/components/progress-bar/YProgressBar.scss +120 -120
  77. package/lib/components/progress-ring/YProgressRing.mjs +2 -2
  78. package/lib/components/progress-ring/YProgressRing.mjs.map +1 -1
  79. package/lib/components/progress-ring/YProgressRing.scss +38 -38
  80. package/lib/components/progress-ring/index.mjs.map +1 -1
  81. package/lib/components/select/YSelect.mjs.map +1 -1
  82. package/lib/components/slider/YSlider.mjs.map +1 -1
  83. package/lib/components/snackbar/YSnackbar.mjs +5 -5
  84. package/lib/components/snackbar/YSnackbar.mjs.map +1 -1
  85. package/lib/components/switch/YSwitch.mjs.map +1 -1
  86. package/lib/components/switch/YSwitch.scss +211 -211
  87. package/lib/components/tab/YTab.mjs.map +1 -1
  88. package/lib/components/tab/YTab.scss +73 -73
  89. package/lib/components/tab/YTabs.mjs.map +1 -1
  90. package/lib/components/tab/YTabs.scss +8 -8
  91. package/lib/components/tab/index.mjs.map +1 -1
  92. package/lib/components/tab/types.mjs.map +1 -1
  93. package/lib/components/table/YDataTableBody.mjs.map +1 -1
  94. package/lib/components/table/YDataTableCell.mjs.map +1 -1
  95. package/lib/components/table/YDataTableHead.mjs.map +1 -1
  96. package/lib/components/table/YDataTableLayer.mjs.map +1 -1
  97. package/lib/components/table/YDataTableRow.mjs.map +1 -1
  98. package/lib/components/table/YTable.mjs.map +1 -1
  99. package/lib/components/table/YTable.scss +157 -157
  100. package/lib/components/table/composibles/header.mjs.map +1 -1
  101. package/lib/components/table/composibles/items.mjs.map +1 -1
  102. package/lib/components/table/composibles/options.mjs.map +1 -1
  103. package/lib/components/table/composibles/pagination.mjs.map +1 -1
  104. package/lib/components/table/composibles/selection.mjs.map +1 -1
  105. package/lib/components/table/composibles/sorted-items.mjs.map +1 -1
  106. package/lib/components/table/composibles/sorting.mjs.map +1 -1
  107. package/lib/components/table/types/header.mjs.map +1 -1
  108. package/lib/components/table/types/index.mjs.map +1 -1
  109. package/lib/components/table/types/row.mjs.map +1 -1
  110. package/lib/components/text-ellipsis/YTextEllipsis.mjs.map +1 -1
  111. package/lib/components/text-ellipsis/YTextEllipsis.scss +43 -43
  112. package/lib/components/text-highlighter/YTextHighlighter.mjs.map +1 -1
  113. package/lib/components/text-interpolation/YTi.mjs.map +1 -1
  114. package/lib/components/textarea/YTextarea.mjs.map +1 -1
  115. package/lib/components/toggle-button/YToggleButton.mjs.map +1 -1
  116. package/lib/components/tooltip/YTooltip.mjs +2 -2
  117. package/lib/components/tooltip/YTooltip.mjs.map +1 -1
  118. package/lib/components/tree-view/YTreeView.scss +81 -81
  119. package/lib/components/tree-view/types.mjs.map +1 -1
  120. package/lib/components/tree-view/util.mjs.map +1 -1
  121. package/lib/composables/choice.mjs.map +1 -1
  122. package/lib/composables/communication.mjs.map +1 -1
  123. package/lib/composables/component.mjs.map +1 -1
  124. package/lib/composables/coordinate/arrangement.mjs.map +1 -1
  125. package/lib/composables/coordinate/index.mjs.map +1 -1
  126. package/lib/composables/coordinate/levitation.mjs +2 -2
  127. package/lib/composables/coordinate/levitation.mjs.map +1 -1
  128. package/lib/composables/coordinate/types.mjs.map +1 -1
  129. package/lib/composables/coordinate/utils/point.mjs.map +1 -1
  130. package/lib/composables/date/factory.mjs.map +1 -1
  131. package/lib/composables/date/index.mjs.map +1 -1
  132. package/lib/composables/date/setting.mjs.map +1 -1
  133. package/lib/composables/date/types.mjs.map +1 -1
  134. package/lib/composables/defaults/index.mjs.map +1 -1
  135. package/lib/composables/defaults/share.mjs.map +1 -1
  136. package/lib/composables/defaults/types.mjs.map +1 -1
  137. package/lib/composables/dimension.mjs.map +1 -1
  138. package/lib/composables/focus.mjs.map +1 -1
  139. package/lib/composables/form.mjs.map +1 -1
  140. package/lib/composables/i18n/index.mjs.map +1 -1
  141. package/lib/composables/i18n/locale.mjs.map +1 -1
  142. package/lib/composables/i18n/rtl.mjs.map +1 -1
  143. package/lib/composables/i18n/share.mjs.map +1 -1
  144. package/lib/composables/icon.mjs.map +1 -1
  145. package/lib/composables/index.mjs.map +1 -1
  146. package/lib/composables/layer-group.mjs.map +1 -1
  147. package/lib/composables/layout.mjs.map +1 -1
  148. package/lib/composables/list-items.mjs.map +1 -1
  149. package/lib/composables/progress.mjs.map +1 -1
  150. package/lib/composables/ref.mjs.map +1 -1
  151. package/lib/composables/resize-observer.mjs.map +1 -1
  152. package/lib/composables/scope.mjs.map +1 -1
  153. package/lib/composables/theme/factory.mjs.map +1 -1
  154. package/lib/composables/theme/index.mjs.map +1 -1
  155. package/lib/composables/theme/setting.mjs.map +1 -1
  156. package/lib/composables/theme/types.mjs.map +1 -1
  157. package/lib/composables/timing.mjs.map +1 -1
  158. package/lib/composables/transition.mjs.map +1 -1
  159. package/lib/composables/validation.mjs.map +1 -1
  160. package/lib/composables/vue-router.mjs.map +1 -1
  161. package/lib/directives/plate-wave/index.mjs +2 -2
  162. package/lib/directives/plate-wave/index.mjs.map +1 -1
  163. package/lib/etc/index.mjs.map +1 -1
  164. package/lib/i18n/built-in.mjs.map +1 -1
  165. package/lib/i18n/config.mjs.map +1 -1
  166. package/lib/i18n/types.mjs.map +1 -1
  167. package/lib/index.mjs.map +1 -1
  168. package/lib/locales/en.mjs.map +1 -1
  169. package/lib/locales/index.mjs.map +1 -1
  170. package/lib/locales/ko.mjs.map +1 -1
  171. package/lib/styles/_elevation.scss +16 -16
  172. package/lib/styles/_palette.scss +1 -1
  173. package/lib/styles/base.scss +130 -130
  174. package/lib/styles/settings/_elevation.scss +20 -20
  175. package/lib/styles/settings/_variables.scss +14 -14
  176. package/lib/styles/theme/dark.scss +11 -11
  177. package/lib/styles/theme/light.scss +11 -11
  178. package/lib/styles/util/_mixin.scss +33 -33
  179. package/lib/styles/util/_var.scss +18 -18
  180. package/lib/util/anchor.mjs.map +1 -1
  181. package/lib/util/collection.mjs.map +1 -1
  182. package/lib/util/color/const.mjs.map +1 -1
  183. package/lib/util/color/index.mjs +12 -12
  184. package/lib/util/color/index.mjs.map +1 -1
  185. package/lib/util/color/types.mjs.map +1 -1
  186. package/lib/util/color/utils/math-utils.mjs +62 -62
  187. package/lib/util/color/utils/math-utils.mjs.map +1 -1
  188. package/lib/util/component/component.mjs.map +1 -1
  189. package/lib/util/component/index.mjs.map +1 -1
  190. package/lib/util/component/inject-self.mjs.map +1 -1
  191. package/lib/util/component/props.mjs.map +1 -1
  192. package/lib/util/component/types.mjs.map +1 -1
  193. package/lib/util/date/index.mjs.map +1 -1
  194. package/lib/util/date/types.mjs.map +1 -1
  195. package/lib/util/debounce.mjs.map +1 -1
  196. package/lib/util/environments.mjs.map +1 -1
  197. package/lib/util/index.mjs.map +1 -1
  198. package/lib/util/reactivity.mjs +3 -3
  199. package/lib/util/reactivity.mjs.map +1 -1
  200. package/lib/util/rect.mjs.map +1 -1
  201. package/lib/util/validation.mjs.map +1 -1
  202. package/package.json +120 -120
  203. package/types/globals.d.ts +20 -20
  204. package/types/shims.d.ts +55 -55
  205. package/lib/components/icon/poly.mjs +0 -57
  206. package/lib/components/icon/poly.mjs.map +0 -1
  207. package/lib/composables/group.mjs +0 -194
  208. package/lib/composables/group.mjs.map +0 -1
  209. package/lib/util/parser.mjs +0 -31
  210. package/lib/util/parser.mjs.map +0 -1
  211. package/lib/util/vue-component/index.mjs +0 -63
  212. package/lib/util/vue-component/index.mjs.map +0 -1
  213. package/lib/util/vue-component/props.mjs +0 -37
  214. package/lib/util/vue-component/props.mjs.map +0 -1
  215. package/lib/util/vue-component/types.mjs +0 -2
  216. package/lib/util/vue-component/types.mjs.map +0 -1
  217. package/lib/util/vue-component.mjs +0 -102
  218. package/lib/util/vue-component.mjs.map +0 -1
  219. package/types/components/select/YSelect.d.ts +0 -7062
  220. package/types/components/table/pagination.d.ts +0 -78
  221. package/types/components/tooltip/YTooltip.d.ts +0 -3711
  222. package/types/util/color/hct/hct_solver.d.ts +0 -146
  223. package/types/util/color/hct/viewing_conditions.d.ts +0 -74
  224. package/types/util/color/palettes/tonal_palette.d.ts +0 -55
  225. package/types/util/color/utils/math_utils.d.ts +0 -82
  226. package/types/util/parser.d.ts +0 -4
  227. package/types/util/vue-component/index.d.ts +0 -10
  228. package/types/util/vue-component/props.d.ts +0 -31
  229. package/types/util/vue-component/types.d.ts +0 -4
  230. package/types/util/vue-component.d.ts +0 -39
  231. /package/types/util/{Rect.d.ts → rect.d.ts} +0 -0
package/package.json CHANGED
@@ -1,120 +1,120 @@
1
- {
2
- "name": "yuyeon",
3
- "version": "0.3.1-rc.2",
4
- "keywords": [
5
- "UI Library",
6
- "Vue"
7
- ],
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/yuyeonUI/yuyeon",
11
- "directory": "packages/yuyeon"
12
- },
13
- "author": "yeonyew",
14
- "license": "Apache-2.0",
15
- "files": [
16
- "dist/",
17
- "lib/",
18
- "types/"
19
- ],
20
- "type": "module",
21
- "exports": {
22
- ".": {
23
- "types": "./types/index.d.ts",
24
- "default": "./lib/index.mjs"
25
- },
26
- "./styles/*": "./lib/styles/*",
27
- "./locales": {
28
- "types": "./types/locales/index.d.ts",
29
- "default": "./lib/locales/index.mjs"
30
- },
31
- "./lib": {
32
- "types": "./types/index.d.ts"
33
- },
34
- "./components": {
35
- "types": "./types/components/index.d.ts",
36
- "module": "./lib/components/index.mjs"
37
- },
38
- "./components/*": "./lib/components/*/index.mjs",
39
- "./composables": {
40
- "types": "./types/composables/index.d.ts",
41
- "module": "./lib/composables/index.mjs",
42
- "default": "./lib/composables/index.mjs"
43
- },
44
- "./util": {
45
- "types": "./types/util/index.d.ts",
46
- "module": "./lib/util/index.mjs"
47
- },
48
- "./shims": "./types/shims.d.ts",
49
- "./types/*": "./types/*",
50
- "./*": "./*"
51
- },
52
- "main": "lib/index.mjs",
53
- "module": "lib/index.mjs",
54
- "types": "types/index.d.ts",
55
- "typesVersions": {
56
- "*": {
57
- "lib/index.mjs": [
58
- "types/index.d.ts"
59
- ],
60
- "*": [
61
- "*",
62
- "types/*",
63
- "types/*.d.ts",
64
- "types/*/index.d.ts"
65
- ]
66
- }
67
- },
68
- "scripts": {
69
- "build": "vue-tsc && vite build && yarn run build:lib",
70
- "build:lib": "cross-env NODE_ENV=lib babel src --out-dir lib --source-maps --extensions \".ts\",\".tsx\" --copy-files --no-copy-ignored --out-file-extension .mjs"
71
- },
72
- "dependencies": {
73
- "motion": "^10.15.5"
74
- },
75
- "devDependencies": {
76
- "@babel/cli": "^7.21.0",
77
- "@babel/core": "^7.21.3",
78
- "@babel/preset-env": "^7.20.2",
79
- "@babel/preset-typescript": "^7.21.0",
80
- "@rollup/plugin-alias": "^4.0.3",
81
- "@rollup/plugin-babel": "^6.0.3",
82
- "@rollup/plugin-node-resolve": "^15.2.3",
83
- "@rollup/plugin-typescript": "^11.0.0",
84
- "@trivago/prettier-plugin-sort-imports": "^4.3.0",
85
- "@types/jest": "^28.1.8",
86
- "@types/node": "^18.19.1",
87
- "@types/resize-observer-browser": "^0.1.7",
88
- "@vitejs/plugin-vue": "^5.0.5",
89
- "@vitejs/plugin-vue-jsx": "^4.0.0",
90
- "@vue/babel-plugin-jsx": "^1.2.2",
91
- "@vue/test-utils": "2.4.6",
92
- "autoprefixer": "^10.4.14",
93
- "babel-plugin-add-import-extension": "1.5.1",
94
- "babel-plugin-module-resolver": "^5.0.0",
95
- "babel-plugin-transform-define": "^2.1.0",
96
- "babel-polyfill": "^6.26.0",
97
- "concurrently": "^4.1.1",
98
- "cross-env": "^7.0.3",
99
- "rollup": "^4.22.4",
100
- "rollup-plugin-dts": "^5.3.0",
101
- "rollup-plugin-sass": "^1.2.19",
102
- "rollup-plugin-sourcemaps": "^0.6.3",
103
- "rollup-plugin-terser": "^7.0.2",
104
- "sass": "^1.63.3",
105
- "vite": "^5.4.6",
106
- "vite-plugin-dts": "^3.9.1",
107
- "vue-router": "^4.3.3",
108
- "vue-tsc": "^2.0.21"
109
- },
110
- "peerDependencies": {
111
- "motion": "^10.15.5",
112
- "vue": "^3.3.0",
113
- "vue-i18n": "^9.0.0 || ^10.0.0"
114
- },
115
- "peerDependenciesMeta": {
116
- "vue-i18n": {
117
- "optional": true
118
- }
119
- }
120
- }
1
+ {
2
+ "name": "yuyeon",
3
+ "version": "0.3.1-rc.4",
4
+ "keywords": [
5
+ "UI Library",
6
+ "Vue"
7
+ ],
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/yuyeonUI/yuyeon",
11
+ "directory": "packages/yuyeon"
12
+ },
13
+ "author": "yeonyew",
14
+ "license": "Apache-2.0",
15
+ "files": [
16
+ "dist/",
17
+ "lib/",
18
+ "types/"
19
+ ],
20
+ "type": "module",
21
+ "exports": {
22
+ ".": {
23
+ "types": "./types/index.d.ts",
24
+ "default": "./lib/index.mjs"
25
+ },
26
+ "./styles/*": "./lib/styles/*",
27
+ "./locales": {
28
+ "types": "./types/locales/index.d.ts",
29
+ "default": "./lib/locales/index.mjs"
30
+ },
31
+ "./lib": {
32
+ "types": "./types/index.d.ts"
33
+ },
34
+ "./components": {
35
+ "types": "./types/components/index.d.ts",
36
+ "module": "./lib/components/index.mjs"
37
+ },
38
+ "./components/*": "./lib/components/*/index.mjs",
39
+ "./composables": {
40
+ "types": "./types/composables/index.d.ts",
41
+ "module": "./lib/composables/index.mjs",
42
+ "default": "./lib/composables/index.mjs"
43
+ },
44
+ "./util": {
45
+ "types": "./types/util/index.d.ts",
46
+ "module": "./lib/util/index.mjs"
47
+ },
48
+ "./shims": "./types/shims.d.ts",
49
+ "./types/*": "./types/*",
50
+ "./*": "./*"
51
+ },
52
+ "main": "lib/index.mjs",
53
+ "module": "lib/index.mjs",
54
+ "types": "types/index.d.ts",
55
+ "typesVersions": {
56
+ "*": {
57
+ "lib/index.mjs": [
58
+ "types/index.d.ts"
59
+ ],
60
+ "*": [
61
+ "*",
62
+ "types/*",
63
+ "types/*.d.ts",
64
+ "types/*/index.d.ts"
65
+ ]
66
+ }
67
+ },
68
+ "scripts": {
69
+ "build": "vue-tsc && vite build && yarn run build:lib",
70
+ "build:lib": "cross-env NODE_ENV=lib babel src --out-dir lib --source-maps --extensions \".ts\",\".tsx\" --copy-files --no-copy-ignored --out-file-extension .mjs"
71
+ },
72
+ "dependencies": {
73
+ "motion": "^10.15.5"
74
+ },
75
+ "devDependencies": {
76
+ "@babel/cli": "^7.21.0",
77
+ "@babel/core": "^7.21.3",
78
+ "@babel/preset-env": "^7.20.2",
79
+ "@babel/preset-typescript": "^7.21.0",
80
+ "@rollup/plugin-alias": "^4.0.3",
81
+ "@rollup/plugin-babel": "^6.0.3",
82
+ "@rollup/plugin-node-resolve": "^15.2.3",
83
+ "@rollup/plugin-typescript": "^11.0.0",
84
+ "@trivago/prettier-plugin-sort-imports": "^4.3.0",
85
+ "@types/jest": "^28.1.8",
86
+ "@types/node": "^18.19.1",
87
+ "@types/resize-observer-browser": "^0.1.7",
88
+ "@vitejs/plugin-vue": "^5.0.5",
89
+ "@vitejs/plugin-vue-jsx": "^4.0.0",
90
+ "@vue/babel-plugin-jsx": "^1.2.2",
91
+ "@vue/test-utils": "2.4.6",
92
+ "autoprefixer": "^10.4.14",
93
+ "babel-plugin-add-import-extension": "1.5.1",
94
+ "babel-plugin-module-resolver": "^5.0.0",
95
+ "babel-plugin-transform-define": "^2.1.0",
96
+ "babel-polyfill": "^6.26.0",
97
+ "concurrently": "^4.1.1",
98
+ "cross-env": "^7.0.3",
99
+ "rollup": "^4.22.4",
100
+ "rollup-plugin-dts": "^5.3.0",
101
+ "rollup-plugin-sass": "^1.2.19",
102
+ "rollup-plugin-sourcemaps": "^0.6.3",
103
+ "rollup-plugin-terser": "^7.0.2",
104
+ "sass": "^1.63.3",
105
+ "vite": "^5.4.6",
106
+ "vite-plugin-dts": "^3.9.1",
107
+ "vue-router": "^4.3.3",
108
+ "vue-tsc": "^2.0.21"
109
+ },
110
+ "peerDependencies": {
111
+ "motion": "^10.15.5",
112
+ "vue": "^3.3.0",
113
+ "vue-i18n": "^9.0.0 || ^10.0.0"
114
+ },
115
+ "peerDependenciesMeta": {
116
+ "vue-i18n": {
117
+ "optional": true
118
+ }
119
+ }
120
+ }
@@ -1,21 +1,21 @@
1
1
  import { VNode } from 'vue';
2
-
3
-
4
- declare global {
5
- namespace JSX {
6
- interface Element extends VNode {}
7
-
8
- interface IntrinsicAttributes {
9
- [name: string]: any
10
- }
11
- }
12
- }
13
-
14
- declare module '@vue/runtime-core' {
15
- export interface ComponentCustomProperties {
16
- }
17
-
18
- export interface ComponentInternalInstance {
19
- provides: Record<string, unknown>
20
- }
21
- }
2
+
3
+
4
+ declare global {
5
+ namespace JSX {
6
+ interface Element extends VNode {}
7
+
8
+ interface IntrinsicAttributes {
9
+ [name: string]: any
10
+ }
11
+ }
12
+ }
13
+
14
+ declare module '@vue/runtime-core' {
15
+ export interface ComponentCustomProperties {
16
+ }
17
+
18
+ export interface ComponentInternalInstance {
19
+ provides: Record<string, unknown>
20
+ }
21
+ }
package/types/shims.d.ts CHANGED
@@ -1,56 +1,56 @@
1
1
  import { YAlert, YApp, YBadge, YButton, YCard, YCardBody, YCardFooter, YCardHeader, YCheckbox, YChip, YDataTable, YDataTableServer, YDateCalendar, YDatePicker, YDialog, YDividePanel, YDivider, YDropdown, YExpandHTransition, YExpandVTransition, YFieldInput, YForm, YHover, YIcon, YInput, YInputCheckbox, YIpv4Field, YLayer, YList, YListItem, YMenu, YMonthPicker, YPagination, YProgressBar, YSelect, YSnackbar, YSpinnerRing, YSwitch, YTab, YTable, YTabs, YTextHighlighter, YTextarea, YTi, YTooltip, YTreeView, YTreeViewNode, YProgressRing } from 'yuyeon/components';
2
-
3
-
4
- declare module '@vue/runtime-core' {
5
- export interface GlobalComponents {
6
- // @define-components
7
- YApp: typeof YApp;
8
- YButton: typeof YButton;
9
- YChip: typeof YChip;
10
- YInput: typeof YInput;
11
- YFieldInput: typeof YFieldInput;
12
- YTextarea: typeof YTextarea;
13
- YForm: typeof YForm;
14
- YCard: typeof YCard;
15
- YCardBody: typeof YCardBody;
16
- YCardHeader: typeof YCardHeader;
17
- YCardFooter: typeof YCardFooter;
18
- YDialog: typeof YDialog;
19
- YLayer: typeof YLayer;
20
- YSnackbar: typeof YSnackbar;
21
- YProgressBar: typeof YProgressBar;
22
- YSpinnerRing: typeof YSpinnerRing;
23
- YTooltip: typeof YTooltip;
24
- YExpandVTransition: typeof YExpandVTransition;
25
- YExpandHTransition: typeof YExpandHTransition;
26
- YDividePanel: typeof YDividePanel;
27
- YList: typeof YList;
28
- YListItem: typeof YListItem;
29
- YTreeView: typeof YTreeView;
30
- YTreeViewNode: typeof YTreeViewNode;
31
- YDataTable: typeof YDataTable;
32
- YTable: typeof YTable;
33
- YDataTableServer: typeof YDataTableServer;
34
- YMenu: typeof YMenu;
35
- YPagination: typeof YPagination;
36
- YInputCheckbox: typeof YInputCheckbox;
37
- YCheckbox: typeof YCheckbox;
38
- YSwitch: typeof YSwitch;
39
- YDropdown: typeof YDropdown;
40
- YSelect: typeof YSelect;
41
- YAlert: typeof YAlert;
42
- YTabs: typeof YTabs;
43
- YTab: typeof YTab;
44
- YDivider: typeof YDivider;
45
- YDateCalendar: typeof YDateCalendar;
46
- YIcon: typeof YIcon;
47
- YDatePicker: typeof YDatePicker;
48
- YMonthPicker: typeof YMonthPicker;
49
- YBadge: typeof YBadge;
50
- YIpv4Field: typeof YIpv4Field;
51
- YHover: typeof YHover;
52
- YTi: typeof YTi;
53
- YTextHighlighter: typeof YTextHighlighter;
54
- YProgressRing: typeof YProgressRing;
55
- }
56
- }
2
+
3
+
4
+ declare module '@vue/runtime-core' {
5
+ export interface GlobalComponents {
6
+ // @define-components
7
+ YApp: typeof YApp;
8
+ YButton: typeof YButton;
9
+ YChip: typeof YChip;
10
+ YInput: typeof YInput;
11
+ YFieldInput: typeof YFieldInput;
12
+ YTextarea: typeof YTextarea;
13
+ YForm: typeof YForm;
14
+ YCard: typeof YCard;
15
+ YCardBody: typeof YCardBody;
16
+ YCardHeader: typeof YCardHeader;
17
+ YCardFooter: typeof YCardFooter;
18
+ YDialog: typeof YDialog;
19
+ YLayer: typeof YLayer;
20
+ YSnackbar: typeof YSnackbar;
21
+ YProgressBar: typeof YProgressBar;
22
+ YSpinnerRing: typeof YSpinnerRing;
23
+ YTooltip: typeof YTooltip;
24
+ YExpandVTransition: typeof YExpandVTransition;
25
+ YExpandHTransition: typeof YExpandHTransition;
26
+ YDividePanel: typeof YDividePanel;
27
+ YList: typeof YList;
28
+ YListItem: typeof YListItem;
29
+ YTreeView: typeof YTreeView;
30
+ YTreeViewNode: typeof YTreeViewNode;
31
+ YDataTable: typeof YDataTable;
32
+ YTable: typeof YTable;
33
+ YDataTableServer: typeof YDataTableServer;
34
+ YMenu: typeof YMenu;
35
+ YPagination: typeof YPagination;
36
+ YInputCheckbox: typeof YInputCheckbox;
37
+ YCheckbox: typeof YCheckbox;
38
+ YSwitch: typeof YSwitch;
39
+ YDropdown: typeof YDropdown;
40
+ YSelect: typeof YSelect;
41
+ YAlert: typeof YAlert;
42
+ YTabs: typeof YTabs;
43
+ YTab: typeof YTab;
44
+ YDivider: typeof YDivider;
45
+ YDateCalendar: typeof YDateCalendar;
46
+ YIcon: typeof YIcon;
47
+ YDatePicker: typeof YDatePicker;
48
+ YMonthPicker: typeof YMonthPicker;
49
+ YBadge: typeof YBadge;
50
+ YIpv4Field: typeof YIpv4Field;
51
+ YHover: typeof YHover;
52
+ YTi: typeof YTi;
53
+ YTextHighlighter: typeof YTextHighlighter;
54
+ YProgressRing: typeof YProgressRing;
55
+ }
56
+ }
@@ -1,57 +0,0 @@
1
- import { createVNode as _createVNode } from "vue";
2
- import { defineComponent } from 'vue';
3
- import { IconValue } from "../../composables/icon.mjs";
4
- import { propsFactory } from "../../util/index.mjs";
5
- export const pressIconPropsOptions = propsFactory({
6
- icon: {
7
- type: IconValue
8
- },
9
- tag: {
10
- type: String,
11
- required: true
12
- }
13
- }, 'icon');
14
- export const YComponentIcon = defineComponent({
15
- name: 'YComponentIcon',
16
- props: pressIconPropsOptions(),
17
- setup(props, _ref) {
18
- let {
19
- slots
20
- } = _ref;
21
- return () => {
22
- const Icon = props.icon;
23
- return _createVNode(props.tag, null, {
24
- default: () => [props.icon ? _createVNode(Icon, null, null) : slots.default?.()]
25
- });
26
- };
27
- }
28
- });
29
- export const YSvgIcon = defineComponent({
30
- name: 'YSvgIcon',
31
- inheritAttrs: false,
32
- props: pressIconPropsOptions(),
33
- setup(props, _ref2) {
34
- let {
35
- attrs
36
- } = _ref2;
37
- return () => {
38
- return _createVNode(props.tag, attrs, {
39
- default: () => [_createVNode("svg", {
40
- "class": "y-icon__svg",
41
- "xmlns": "http://www.w3.org/2000/svg",
42
- "viewBox": "0 0 24 24",
43
- "role": "img",
44
- "aria-hidden": "true"
45
- }, [Array.isArray(props.icon) ? props.icon.map(path => Array.isArray(path) ? _createVNode("path", {
46
- "d": path[0],
47
- "fill-opacity": path[1]
48
- }, null) : _createVNode("path", {
49
- "d": path
50
- }, null)) : _createVNode("path", {
51
- "d": props.icon
52
- }, null)])]
53
- });
54
- };
55
- }
56
- });
57
- //# sourceMappingURL=poly.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"poly.mjs","names":["defineComponent","IconValue","propsFactory","pressIconPropsOptions","icon","type","tag","String","required","YComponentIcon","name","props","setup","_ref","slots","Icon","_createVNode","default","YSvgIcon","inheritAttrs","_ref2","attrs","Array","isArray","map","path"],"sources":["../../../src/components/icon/poly.tsx"],"sourcesContent":["import { defineComponent } from 'vue';\n\nimport { IconValue } from '../../composables/icon';\nimport { JSXComponent } from '../../types';\nimport { propsFactory } from '../../util';\n\nexport const pressIconPropsOptions = propsFactory(\n {\n icon: {\n type: IconValue,\n },\n tag: {\n type: String,\n required: true,\n },\n },\n 'icon',\n);\n\nexport const YComponentIcon = defineComponent({\n name: 'YComponentIcon',\n props: pressIconPropsOptions(),\n setup(props, { slots }) {\n return () => {\n const Icon = props.icon as JSXComponent;\n return <props.tag>{props.icon ? <Icon /> : slots.default?.()}</props.tag>;\n };\n },\n});\nexport type YComponentIcon = InstanceType<typeof YComponentIcon>;\n\nexport const YSvgIcon = defineComponent({\n name: 'YSvgIcon',\n inheritAttrs: false,\n props: pressIconPropsOptions(),\n setup(props, { attrs }) {\n return () => {\n return (\n <props.tag {...attrs}>\n <svg\n class=\"y-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n role=\"img\"\n aria-hidden=\"true\"\n >\n {Array.isArray(props.icon) ? (\n props.icon.map((path) =>\n Array.isArray(path) ? (\n <path d={path[0] as string} fill-opacity={path[1]}></path>\n ) : (\n <path d={path as string}></path>\n ),\n )\n ) : (\n <path d={props.icon as string}></path>\n )}\n </svg>\n </props.tag>\n );\n };\n },\n});\nexport type YSvgIcon = InstanceType<typeof YSvgIcon>;\n"],"mappings":";AAAA,SAASA,eAAe,QAAQ,KAAK;AAAC,SAE7BC,SAAS;AAAA,SAETC,YAAY;AAErB,OAAO,MAAMC,qBAAqB,GAAGD,YAAY,CAC/C;EACEE,IAAI,EAAE;IACJC,IAAI,EAAEJ;EACR,CAAC;EACDK,GAAG,EAAE;IACHD,IAAI,EAAEE,MAAM;IACZC,QAAQ,EAAE;EACZ;AACF,CAAC,EACD,MACF,CAAC;AAED,OAAO,MAAMC,cAAc,GAAGT,eAAe,CAAC;EAC5CU,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAER,qBAAqB,CAAC,CAAC;EAC9BS,KAAKA,CAACD,KAAK,EAAAE,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACpB,OAAO,MAAM;MACX,MAAME,IAAI,GAAGJ,KAAK,CAACP,IAAoB;MACvC,OAAAY,YAAA,CAAAL,KAAA,CAAAL,GAAA;QAAAW,OAAA,EAAAA,CAAA,MAAmBN,KAAK,CAACP,IAAI,GAAAY,YAAA,CAAAD,IAAA,gBAAcD,KAAK,CAACG,OAAO,GAAG,CAAC;MAAA;IAC9D,CAAC;EACH;AACF,CAAC,CAAC;AAGF,OAAO,MAAMC,QAAQ,GAAGlB,eAAe,CAAC;EACtCU,IAAI,EAAE,UAAU;EAChBS,YAAY,EAAE,KAAK;EACnBR,KAAK,EAAER,qBAAqB,CAAC,CAAC;EAC9BS,KAAKA,CAACD,KAAK,EAAAS,KAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,KAAA;IACpB,OAAO,MAAM;MACX,OAAAJ,YAAA,CAAAL,KAAA,CAAAL,GAAA,EACiBe,KAAK;QAAAJ,OAAA,EAAAA,CAAA,MAAAD,YAAA;UAAA,SAEV,aAAa;UAAA,SACb,4BAA4B;UAAA,WAC1B,WAAW;UAAA,QACd,KAAK;UAAA,eACE;QAAM,IAEjBM,KAAK,CAACC,OAAO,CAACZ,KAAK,CAACP,IAAI,CAAC,GACxBO,KAAK,CAACP,IAAI,CAACoB,GAAG,CAAEC,IAAI,IAClBH,KAAK,CAACC,OAAO,CAACE,IAAI,CAAC,GAAAT,YAAA;UAAA,KACRS,IAAI,CAAC,CAAC,CAAC;UAAA,gBAA0BA,IAAI,CAAC,CAAC;QAAC,WAAAT,YAAA;UAAA,KAExCS;QAAI,QAEjB,CAAC,GAAAT,YAAA;UAAA,KAEQL,KAAK,CAACP;QAAI,QACpB;MAAA;IAIT,CAAC;EACH;AACF,CAAC,CAAC"}
@@ -1,194 +0,0 @@
1
- import { computed, getCurrentInstance, inject, onBeforeUnmount, onMounted, provide, reactive, toRef, watch } from 'vue';
2
- import { wrapInArray } from "../util/array.mjs";
3
- import { deepEqual } from "../util/common.mjs";
4
- import { getUid, propsFactory } from "../util/vue-component.mjs";
5
- import { useModelDuplex } from "./communication.mjs";
6
- export const pressGroupPropsOptions = propsFactory({
7
- modelValue: {
8
- type: null,
9
- default: undefined
10
- },
11
- multiple: Boolean,
12
- mandatory: [Boolean, String],
13
- max: Number,
14
- selectedClass: String,
15
- disabled: Boolean
16
- }, 'group');
17
- export const pressGroupItemPropsOptions = propsFactory({
18
- value: null,
19
- disabled: Boolean,
20
- selectedClass: String
21
- }, 'group-item');
22
- export function useGroupItem(props, injectKey) {
23
- let required = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
24
- const vm = getCurrentInstance();
25
- if (!vm) {
26
- throw new Error('useGroupItem composable must be used inside a component setup function');
27
- }
28
- const id = getUid();
29
- provide(Symbol.for(`${injectKey.description}:id`), id);
30
- const group = inject(injectKey, null);
31
- if (!group) {
32
- if (!required) return group;
33
- throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${injectKey.description}`);
34
- }
35
- const value = toRef(props, 'value');
36
- const disabled = computed(() => !!(group.disabled.value || props.disabled));
37
- group.register({
38
- id,
39
- value,
40
- disabled
41
- }, vm);
42
- onBeforeUnmount(() => {
43
- group.unregister(id);
44
- });
45
- const isSelected = computed(() => {
46
- return group.isSelected(id);
47
- });
48
- const selectedClass = computed(() => isSelected.value && [group.selectedClass.value, props.selectedClass]);
49
- watch(isSelected, value => {
50
- vm.emit('group:selected', {
51
- value
52
- });
53
- });
54
- return {
55
- id,
56
- isSelected,
57
- toggle: () => group.select(id, !isSelected.value),
58
- select: value => group.select(id, value),
59
- selectedClass,
60
- value,
61
- disabled,
62
- group
63
- };
64
- }
65
- export function useGroup(props, injectKey) {
66
- let isUnmounted = false;
67
- const items = reactive([]);
68
- const selected = useModelDuplex(props, 'modelValue', [], v => {
69
- if (v == null) return [];
70
- return getIds(items, wrapInArray(v));
71
- }, v => {
72
- const arr = getValues(items, v);
73
- return props.multiple ? arr : arr[0];
74
- });
75
- const groupVm = getCurrentInstance();
76
- function register(item, vm) {
77
- // Is there a better way to fix this typing?
78
- const unwrapped = item;
79
- const key = Symbol.for(`${injectKey.description}:id`);
80
- const children = findChildrenWithProvide(key, groupVm?.vnode);
81
- const index = children.indexOf(vm);
82
- if (index > -1) {
83
- items.splice(index, 0, unwrapped);
84
- } else {
85
- items.push(unwrapped);
86
- }
87
- }
88
- function unregister(id) {
89
- if (isUnmounted) return;
90
- forceMandatoryValue();
91
- const index = items.findIndex(item => item.id === id);
92
- items.splice(index, 1);
93
- }
94
- function forceMandatoryValue() {
95
- const item = items.find(item => !item.disabled);
96
- if (item && props.mandatory === 'force' && !selected.value.length) {
97
- selected.value = [item.id];
98
- }
99
- }
100
- onMounted(() => {
101
- forceMandatoryValue();
102
- });
103
- onBeforeUnmount(() => {
104
- isUnmounted = true;
105
- });
106
- function select(id, value) {
107
- const item = items.find(item => item.id === id);
108
- if (value && item?.disabled) return;
109
- if (props.multiple) {
110
- const internalValue = selected.value.slice();
111
- const index = internalValue.findIndex(v => v === id);
112
- const isSelected = ~index;
113
- value = value ?? !isSelected;
114
-
115
- // We can't remove value if group is
116
- // mandatory, value already exists,
117
- // and it is the only value
118
- if (isSelected && props.mandatory && internalValue.length <= 1) return;
119
-
120
- // We can't add value if it would
121
- // cause max limit to be exceeded
122
- if (!isSelected && props.max != null && internalValue.length + 1 > props.max) return;
123
- if (index < 0 && value) internalValue.push(id);else if (index >= 0 && !value) internalValue.splice(index, 1);
124
- selected.value = internalValue;
125
- } else {
126
- const isSelected = selected.value.includes(id);
127
- if (props.mandatory && isSelected) return;
128
- selected.value = value ?? !isSelected ? [id] : [];
129
- }
130
- }
131
- function step(offset) {
132
- if (props.multiple) {}
133
- if (!selected.value.length) {
134
- const item = items.find(item => !item.disabled);
135
- item && (selected.value = [item.id]);
136
- } else {
137
- const currentId = selected.value[0];
138
- const currentIndex = items.findIndex(i => i.id === currentId);
139
- let newIndex = (currentIndex + offset) % items.length;
140
- let newItem = items[newIndex];
141
- while (newItem.disabled && newIndex !== currentIndex) {
142
- newIndex = (newIndex + offset) % items.length;
143
- newItem = items[newIndex];
144
- }
145
- if (newItem.disabled) return;
146
- selected.value = [items[newIndex].id];
147
- }
148
- }
149
- const state = {
150
- register,
151
- unregister,
152
- selected,
153
- select,
154
- disabled: toRef(props, 'disabled'),
155
- prev: () => step(items.length - 1),
156
- next: () => step(1),
157
- isSelected: id => selected.value.includes(id),
158
- selectedClass: computed(() => props.selectedClass),
159
- items: computed(() => items),
160
- getItemIndex: value => getItemIndex(items, value)
161
- };
162
- provide(injectKey, state);
163
- return state;
164
- }
165
- function getItemIndex(items, value) {
166
- const ids = getIds(items, [value]);
167
- if (!ids.length) return -1;
168
- return items.findIndex(item => item.id === ids[0]);
169
- }
170
- function getIds(items, modelValue) {
171
- const ids = [];
172
- modelValue.forEach(value => {
173
- const item = items.find(item => deepEqual(value, item.value));
174
- const itemByIndex = items[value];
175
- if (item?.value != null) {
176
- ids.push(item.id);
177
- } else if (itemByIndex != null) {
178
- ids.push(itemByIndex.id);
179
- }
180
- });
181
- return ids;
182
- }
183
- function getValues(items, ids) {
184
- const values = [];
185
- ids.forEach(id => {
186
- const itemIndex = items.findIndex(item => item.id === id);
187
- if (~itemIndex) {
188
- const item = items[itemIndex];
189
- values.push(item.value != null ? item.value : itemIndex);
190
- }
191
- });
192
- return values;
193
- }
194
- //# sourceMappingURL=group.mjs.map