orion-design 0.1.31 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. package/README.md +5 -5
  2. package/dist/Throne/hooks/use-throne-context.d.ts +5 -0
  3. package/dist/Throne/hooks/use-throne-context.js +15 -0
  4. package/dist/Throne/hooks/use-throne-context.js.map +1 -0
  5. package/dist/Throne/index.d.ts +1 -1
  6. package/dist/Throne/index.js +14 -30
  7. package/dist/Throne/index.js.map +1 -1
  8. package/dist/components/Button/ButtonGroup/ButtonGroup.d.ts +2 -0
  9. package/dist/components/Button/index.js +36 -41
  10. package/dist/components/Button/index.js.map +1 -1
  11. package/dist/components/Flex/index.js +89 -122
  12. package/dist/components/Flex/index.js.map +1 -1
  13. package/dist/components/Form/FileInput/FileInput.vue.d.ts +4 -4
  14. package/dist/components/Form/Form.js +2 -2
  15. package/dist/components/Form/Form.js.map +1 -1
  16. package/dist/components/Form/LovInput/LovInput.js +2 -2
  17. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  18. package/dist/components/Form/LovInput/LovInput.vue.d.ts +894 -0
  19. package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
  20. package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
  21. package/dist/components/Form/LovInput/index.js +4 -4
  22. package/dist/components/Form/MultiTableSelect/MultiTableSelect.d.ts +26 -0
  23. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js +5 -0
  24. package/dist/components/Form/MultiTableSelect/MultiTableSelect.js.map +1 -0
  25. package/dist/components/Form/MultiTableSelect/MultiTableSelect.vue.d.ts +6249 -0
  26. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.d.ts +1 -0
  27. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js +9 -0
  28. package/dist/components/Form/MultiTableSelect/hooks/useMultiTableSelect.js.map +1 -0
  29. package/dist/components/Form/MultiTableSelect/index.d.ts +2 -0
  30. package/dist/components/Form/MultiTableSelect/index.js +7 -0
  31. package/dist/components/Form/MultiTableSelect/index.js.map +1 -0
  32. package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
  33. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
  34. package/dist/components/Form/hooks/index.js +69 -127
  35. package/dist/components/Form/hooks/index.js.map +1 -1
  36. package/dist/components/Form/index.d.ts +3 -0
  37. package/dist/components/Form/index.js +790 -829
  38. package/dist/components/Form/index.js.map +1 -1
  39. package/dist/components/Form/utils/index.js +18 -30
  40. package/dist/components/Form/utils/index.js.map +1 -1
  41. package/dist/components/LovTable/LovPagetable.vue.d.ts +510 -6
  42. package/dist/components/LovTable/LovQuerytable.vue.d.ts +468 -4
  43. package/dist/components/LovTable/index.d.ts +489 -5
  44. package/dist/components/LovTable/index.js +104 -179
  45. package/dist/components/LovTable/index.js.map +1 -1
  46. package/dist/components/Modal/index.js +56 -111
  47. package/dist/components/Modal/index.js.map +1 -1
  48. package/dist/components/Modal/types.d.ts +1 -1
  49. package/dist/components/Modal/types.js +3 -4
  50. package/dist/components/Modal/types.js.map +1 -1
  51. package/dist/components/Modal/useModal.js +5 -5
  52. package/dist/components/Modal/useModal.js.map +1 -1
  53. package/dist/components/MultiTableSelectPagetable/MultiTableSelectPagetable.vue.d.ts +880 -0
  54. package/dist/components/MultiTableSelectPagetable/index.d.ts +462 -0
  55. package/dist/components/MultiTableSelectPagetable/index.js +164 -0
  56. package/dist/components/MultiTableSelectPagetable/index.js.map +1 -0
  57. package/dist/components/Pagetable/Pagetable.d.ts +96 -3
  58. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +14 -1
  59. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +14 -1
  60. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +1 -1
  61. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +14 -1
  62. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +14 -1
  63. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +14 -1
  64. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +14 -1
  65. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +14 -1
  66. package/dist/components/Pagetable/hooks/useCode.d.ts +2 -0
  67. package/dist/components/Pagetable/hooks/useCode.js +24 -0
  68. package/dist/components/Pagetable/hooks/useCode.js.map +1 -0
  69. package/dist/components/Pagetable/hooks/useColumns.js +85 -88
  70. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  71. package/dist/components/Pagetable/index.d.ts +159 -2
  72. package/dist/components/Pagetable/index.js +601 -684
  73. package/dist/components/Pagetable/index.js.map +1 -1
  74. package/dist/components/Pagetable/utils/index.js +54 -92
  75. package/dist/components/Pagetable/utils/index.js.map +1 -1
  76. package/dist/components/Querytable/Querytable.d.ts +80 -2
  77. package/dist/components/Querytable/columns/QuerytableColumnButtongroup.d.ts +14 -1
  78. package/dist/components/Querytable/columns/QuerytableColumnDate.d.ts +14 -1
  79. package/dist/components/Querytable/columns/QuerytableColumnDiy.d.ts +1 -1
  80. package/dist/components/Querytable/columns/QuerytableColumnLink.d.ts +14 -1
  81. package/dist/components/Querytable/columns/QuerytableColumnMultiselect.d.ts +14 -1
  82. package/dist/components/Querytable/columns/QuerytableColumnNumber.d.ts +14 -1
  83. package/dist/components/Querytable/columns/QuerytableColumnSingleselect.d.ts +14 -1
  84. package/dist/components/Querytable/columns/QuerytableColumnString.d.ts +14 -1
  85. package/dist/components/Querytable/hooks/useColumns.js +79 -82
  86. package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
  87. package/dist/components/Querytable/index.d.ts +147 -1
  88. package/dist/components/Querytable/index.js +526 -579
  89. package/dist/components/Querytable/index.js.map +1 -1
  90. package/dist/components/Querytable/utils/index.js +54 -92
  91. package/dist/components/Querytable/utils/index.js.map +1 -1
  92. package/dist/components/RichTextEditor/index.js +74 -100
  93. package/dist/components/RichTextEditor/index.js.map +1 -1
  94. package/dist/components/Tabs/constants.js +2 -2
  95. package/dist/components/Tabs/constants.js.map +1 -1
  96. package/dist/components/Tabs/index.js +358 -603
  97. package/dist/components/Tabs/index.js.map +1 -1
  98. package/dist/components/Tabs/tab-bar.js +6 -6
  99. package/dist/components/Tabs/tab-bar.js.map +1 -1
  100. package/dist/components/Tabs/tab-pane.js +3 -3
  101. package/dist/components/Tabs/tab-pane.js.map +1 -1
  102. package/dist/components/Throne/ThroneContextProvider.d.ts +25 -0
  103. package/dist/components/_constants/aria.js +2 -2
  104. package/dist/components/_constants/aria.js.map +1 -1
  105. package/dist/components/_constants/event.js +4 -6
  106. package/dist/components/_constants/event.js.map +1 -1
  107. package/dist/components/_constants/index.js +6 -6
  108. package/dist/components/_hooks/index.js +7 -7
  109. package/dist/components/_hooks/use-namespace/index.js +39 -74
  110. package/dist/components/_hooks/use-namespace/index.js.map +1 -1
  111. package/dist/components/_hooks/use-ordered-children/index.js +19 -29
  112. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
  113. package/dist/components/_util/arrays.js +5 -9
  114. package/dist/components/_util/arrays.js.map +1 -1
  115. package/dist/components/_util/browser.js +6 -6
  116. package/dist/components/_util/browser.js.map +1 -1
  117. package/dist/components/_util/classNames.js +17 -22
  118. package/dist/components/_util/classNames.js.map +1 -1
  119. package/dist/components/_util/dom/aria.js +39 -74
  120. package/dist/components/_util/dom/aria.js.map +1 -1
  121. package/dist/components/_util/dom/element.js +8 -9
  122. package/dist/components/_util/dom/element.js.map +1 -1
  123. package/dist/components/_util/dom/event.js +7 -14
  124. package/dist/components/_util/dom/event.js.map +1 -1
  125. package/dist/components/_util/dom/index.js +36 -36
  126. package/dist/components/_util/dom/position.js +25 -49
  127. package/dist/components/_util/dom/position.js.map +1 -1
  128. package/dist/components/_util/dom/scroll.js +61 -103
  129. package/dist/components/_util/dom/scroll.js.map +1 -1
  130. package/dist/components/_util/dom/style.js +50 -65
  131. package/dist/components/_util/dom/style.js.map +1 -1
  132. package/dist/components/_util/easings.js +4 -8
  133. package/dist/components/_util/easings.js.map +1 -1
  134. package/dist/components/_util/error.js +11 -12
  135. package/dist/components/_util/error.js.map +1 -1
  136. package/dist/components/_util/functions.js +3 -3
  137. package/dist/components/_util/i18n.js +2 -2
  138. package/dist/components/_util/i18n.js.map +1 -1
  139. package/dist/components/_util/index.js +137 -137
  140. package/dist/components/_util/isValid.js +2 -4
  141. package/dist/components/_util/isValid.js.map +1 -1
  142. package/dist/components/_util/objects.js +14 -18
  143. package/dist/components/_util/objects.js.map +1 -1
  144. package/dist/components/_util/props-util/index.js +20 -46
  145. package/dist/components/_util/props-util/index.js.map +1 -1
  146. package/dist/components/_util/props-util/initDefaultProps.js +10 -18
  147. package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
  148. package/dist/components/_util/raf.js +4 -5
  149. package/dist/components/_util/raf.js.map +1 -1
  150. package/dist/components/_util/rand.js +3 -4
  151. package/dist/components/_util/rand.js.map +1 -1
  152. package/dist/components/_util/strings.js +8 -9
  153. package/dist/components/_util/strings.js.map +1 -1
  154. package/dist/components/_util/throttleByRaf.js +10 -16
  155. package/dist/components/_util/throttleByRaf.js.map +1 -1
  156. package/dist/components/_util/type.js +38 -41
  157. package/dist/components/_util/type.js.map +1 -1
  158. package/dist/components/_util/types.js +22 -41
  159. package/dist/components/_util/types.js.map +1 -1
  160. package/dist/components/_util/typescript.js +2 -2
  161. package/dist/components/_util/typescript.js.map +1 -1
  162. package/dist/components/_util/util.js +43 -85
  163. package/dist/components/_util/util.js.map +1 -1
  164. package/dist/components/_util/vue/global-node.js +15 -27
  165. package/dist/components/_util/vue/global-node.js.map +1 -1
  166. package/dist/components/_util/vue/icon.js +25 -29
  167. package/dist/components/_util/vue/icon.js.map +1 -1
  168. package/dist/components/_util/vue/index.js +41 -41
  169. package/dist/components/_util/vue/install.js +18 -35
  170. package/dist/components/_util/vue/install.js.map +1 -1
  171. package/dist/components/_util/vue/props/index.js +6 -6
  172. package/dist/components/_util/vue/props/runtime.js +30 -46
  173. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  174. package/dist/components/_util/vue/refs.js +6 -12
  175. package/dist/components/_util/vue/refs.js.map +1 -1
  176. package/dist/components/_util/vue/size.js +3 -5
  177. package/dist/components/_util/vue/size.js.map +1 -1
  178. package/dist/components/_util/vue/validator.js +4 -5
  179. package/dist/components/_util/vue/validator.js.map +1 -1
  180. package/dist/components/_util/vue/vnode.js +54 -100
  181. package/dist/components/_util/vue/vnode.js.map +1 -1
  182. package/dist/components/_util/vue-types/index.js +220 -231
  183. package/dist/components/_util/vue-types/index.js.map +1 -1
  184. package/dist/components/components.d.ts +2 -0
  185. package/dist/components/components.js +24 -20
  186. package/dist/components/components.js.map +1 -1
  187. package/dist/components/index.js +43 -38
  188. package/dist/components/index.js.map +1 -1
  189. package/dist/components-DP9bnDLm.js +48 -0
  190. package/dist/components-DP9bnDLm.js.map +1 -0
  191. package/dist/error/OrionError.js +4 -8
  192. package/dist/error/OrionError.js.map +1 -1
  193. package/dist/{index-C6P_0wAy.js → index-ChkLOmNK.js} +76 -46
  194. package/dist/{index-C6P_0wAy.js.map → index-ChkLOmNK.js.map} +1 -1
  195. package/dist/index.css +1 -797
  196. package/dist/index.d.ts +1 -0
  197. package/dist/index.js +46 -36
  198. package/dist/index.js.map +1 -1
  199. package/dist/print/LodopFuncs.js +43 -101
  200. package/dist/print/LodopFuncs.js.map +1 -1
  201. package/dist/print/index.js +108 -200
  202. package/dist/print/index.js.map +1 -1
  203. package/dist/request/ErrorHandlerChain.js +14 -17
  204. package/dist/request/ErrorHandlerChain.js.map +1 -1
  205. package/dist/request/RequestFilterChain.js +13 -16
  206. package/dist/request/RequestFilterChain.js.map +1 -1
  207. package/dist/request/ResponseParserChain.js +14 -17
  208. package/dist/request/ResponseParserChain.js.map +1 -1
  209. package/dist/request/disivion/DateSerializer.js +22 -47
  210. package/dist/request/disivion/DateSerializer.js.map +1 -1
  211. package/dist/request/disivion/DivisionErrorHandler.js +25 -40
  212. package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
  213. package/dist/request/disivion/DivisionResponseParser.js +10 -16
  214. package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
  215. package/dist/request/disivion/index.js +201 -305
  216. package/dist/request/disivion/index.js.map +1 -1
  217. package/dist/request/error/BizExceptionResponseError.js +5 -11
  218. package/dist/request/error/BizExceptionResponseError.js.map +1 -1
  219. package/dist/request/error/ExceptionResponseError.js +5 -11
  220. package/dist/request/error/ExceptionResponseError.js.map +1 -1
  221. package/dist/request/error/ResponseError.js +4 -9
  222. package/dist/request/error/ResponseError.js.map +1 -1
  223. package/dist/request/error/SessionExceptionResponseError.js +5 -11
  224. package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
  225. package/dist/request/index.js +11 -11
  226. package/dist/utils/DateUtil.js +33 -48
  227. package/dist/utils/DateUtil.js.map +1 -1
  228. package/dist/utils/NumberUtil.js +6 -6
  229. package/dist/utils/NumberUtil.js.map +1 -1
  230. package/dist/utils/cloneDeep.js +2 -2
  231. package/dist/utils/delay.js +3 -3
  232. package/dist/utils/delay.js.map +1 -1
  233. package/dist/utils/functions.js +3 -3
  234. package/dist/utils/index.js +12 -12
  235. package/dist/utils/md5.js +93 -191
  236. package/dist/utils/md5.js.map +1 -1
  237. package/dist/utils/uuid.js +25 -35
  238. package/dist/utils/uuid.js.map +1 -1
  239. package/dist/version/index.js +2 -2
  240. package/dist/version/version.d.ts +1 -1
  241. package/dist/version/version.js +2 -2
  242. package/dist/version/version.js.map +1 -1
  243. package/package.json +1 -1
  244. package/dist/_commonjsHelpers-DWwsNxpa.js +0 -9
  245. package/dist/_commonjsHelpers-DWwsNxpa.js.map +0 -1
  246. package/dist/components-8oZ2kpUC.js +0 -27
  247. package/dist/components-8oZ2kpUC.js.map +0 -1
  248. package/dist/components-B3d9m_tn.js +0 -27
  249. package/dist/components-B3d9m_tn.js.map +0 -1
  250. package/dist/functions-BeMkokbY.js +0 -63
  251. package/dist/functions-BeMkokbY.js.map +0 -1
  252. package/dist/index-BOKLZnqH.js +0 -54
  253. package/dist/index-BOKLZnqH.js.map +0 -1
  254. package/dist/index-D1m0KTpK.js +0 -69
  255. package/dist/index-D1m0KTpK.js.map +0 -1
  256. package/dist/index-DR5ZP7mD.js +0 -160
  257. package/dist/index-DR5ZP7mD.js.map +0 -1
  258. package/dist/index-DkwIULcN.js +0 -200
  259. package/dist/index-DkwIULcN.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"scroll.js","sources":["../../../../src/components/_util/dom/scroll.ts"],"sourcesContent":["import { isClient } from '../browser'\r\nimport { easeInOutCubic } from '../easings'\r\nimport { isWindow } from '../types'\r\nimport { cAF, rAF } from '../raf'\r\nimport { getStyle } from './style'\r\n\r\nexport const isScroll = (el: HTMLElement, isVertical?: boolean): boolean => {\r\n if (!isClient) return false\r\n\r\n const key = (\r\n {\r\n undefined: 'overflow',\r\n true: 'overflow-y',\r\n false: 'overflow-x',\r\n } as const\r\n )[String(isVertical)]!\r\n const overflow = getStyle(el, key)\r\n return ['scroll', 'auto', 'overlay'].some((s) => overflow.includes(s))\r\n}\r\n\r\nexport const getScrollContainer = (\r\n el: HTMLElement,\r\n isVertical?: boolean\r\n): Window | HTMLElement | undefined => {\r\n if (!isClient) return\r\n\r\n let parent: HTMLElement = el\r\n while (parent) {\r\n if ([window, document, document.documentElement].includes(parent))\r\n return window\r\n\r\n if (isScroll(parent, isVertical)) return parent\r\n\r\n parent = parent.parentNode as HTMLElement\r\n }\r\n\r\n return parent\r\n}\r\n\r\nlet scrollBarWidth: number\r\nexport const getScrollBarWidth = (namespace: string): number => {\r\n if (!isClient) return 0\r\n if (scrollBarWidth !== undefined) return scrollBarWidth\r\n\r\n const outer = document.createElement('div')\r\n outer.className = `${namespace}-scrollbar__wrap`\r\n outer.style.visibility = 'hidden'\r\n outer.style.width = '100px'\r\n outer.style.position = 'absolute'\r\n outer.style.top = '-9999px'\r\n document.body.appendChild(outer)\r\n\r\n const widthNoScroll = outer.offsetWidth\r\n outer.style.overflow = 'scroll'\r\n\r\n const inner = document.createElement('div')\r\n inner.style.width = '100%'\r\n outer.appendChild(inner)\r\n\r\n const widthWithScroll = inner.offsetWidth\r\n outer.parentNode?.removeChild(outer)\r\n scrollBarWidth = widthNoScroll - widthWithScroll\r\n\r\n return scrollBarWidth\r\n}\r\n\r\n/**\r\n * Scroll with in the container element, positioning the **selected** element at the top\r\n * of the container\r\n */\r\nexport function scrollIntoView(\r\n container: HTMLElement,\r\n selected: HTMLElement\r\n): void {\r\n if (!isClient) return\r\n\r\n if (!selected) {\r\n container.scrollTop = 0\r\n return\r\n }\r\n\r\n const offsetParents: HTMLElement[] = []\r\n let pointer = selected.offsetParent\r\n while (\r\n pointer !== null &&\r\n container !== pointer &&\r\n container.contains(pointer)\r\n ) {\r\n offsetParents.push(pointer as HTMLElement)\r\n pointer = (pointer as HTMLElement).offsetParent\r\n }\r\n const top =\r\n selected.offsetTop +\r\n offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0)\r\n const bottom = top + selected.offsetHeight\r\n const viewRectTop = container.scrollTop\r\n const viewRectBottom = viewRectTop + container.clientHeight\r\n\r\n if (top < viewRectTop) {\r\n container.scrollTop = top\r\n } else if (bottom > viewRectBottom) {\r\n container.scrollTop = bottom - container.clientHeight\r\n }\r\n}\r\n\r\nexport function animateScrollTo(\r\n container: HTMLElement | Window,\r\n from: number,\r\n to: number,\r\n duration: number,\r\n callback?: unknown\r\n) {\r\n const startTime = Date.now()\r\n\r\n let handle: number | undefined\r\n const scroll = () => {\r\n const timestamp = Date.now()\r\n const time = timestamp - startTime\r\n const nextScrollTop = easeInOutCubic(\r\n time > duration ? duration : time,\r\n from,\r\n to,\r\n duration\r\n )\r\n\r\n if (isWindow(container)) {\r\n container.scrollTo(window.pageXOffset, nextScrollTop)\r\n } else {\r\n container.scrollTop = nextScrollTop\r\n }\r\n if (time < duration) {\r\n handle = rAF(scroll)\r\n } else if (typeof callback === 'function') {\r\n callback()\r\n }\r\n }\r\n\r\n scroll()\r\n\r\n return () => {\r\n handle && cAF(handle)\r\n }\r\n}\r\n\r\nexport const getScrollElement = (\r\n target: HTMLElement,\r\n container: HTMLElement | Window\r\n) => {\r\n if (isWindow(container)) {\r\n return target.ownerDocument.documentElement\r\n }\r\n return container\r\n}\r\n\r\nexport const getScrollTop = (container: HTMLElement | Window) => {\r\n if (isWindow(container)) {\r\n return window.scrollY\r\n }\r\n return container.scrollTop\r\n}\r\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"scroll.js","sources":["../../../../src/components/_util/dom/scroll.ts"],"sourcesContent":["import { isClient } from '../browser'\r\nimport { easeInOutCubic } from '../easings'\r\nimport { isWindow } from '../types'\r\nimport { cAF, rAF } from '../raf'\r\nimport { getStyle } from './style'\r\n\r\nexport const isScroll = (el: HTMLElement, isVertical?: boolean): boolean => {\r\n if (!isClient) return false\r\n\r\n const key = (\r\n {\r\n undefined: 'overflow',\r\n true: 'overflow-y',\r\n false: 'overflow-x',\r\n } as const\r\n )[String(isVertical)]!\r\n const overflow = getStyle(el, key)\r\n return ['scroll', 'auto', 'overlay'].some((s) => overflow.includes(s))\r\n}\r\n\r\nexport const getScrollContainer = (\r\n el: HTMLElement,\r\n isVertical?: boolean\r\n): Window | HTMLElement | undefined => {\r\n if (!isClient) return\r\n\r\n let parent: HTMLElement = el\r\n while (parent) {\r\n if ([window, document, document.documentElement].includes(parent))\r\n return window\r\n\r\n if (isScroll(parent, isVertical)) return parent\r\n\r\n parent = parent.parentNode as HTMLElement\r\n }\r\n\r\n return parent\r\n}\r\n\r\nlet scrollBarWidth: number\r\nexport const getScrollBarWidth = (namespace: string): number => {\r\n if (!isClient) return 0\r\n if (scrollBarWidth !== undefined) return scrollBarWidth\r\n\r\n const outer = document.createElement('div')\r\n outer.className = `${namespace}-scrollbar__wrap`\r\n outer.style.visibility = 'hidden'\r\n outer.style.width = '100px'\r\n outer.style.position = 'absolute'\r\n outer.style.top = '-9999px'\r\n document.body.appendChild(outer)\r\n\r\n const widthNoScroll = outer.offsetWidth\r\n outer.style.overflow = 'scroll'\r\n\r\n const inner = document.createElement('div')\r\n inner.style.width = '100%'\r\n outer.appendChild(inner)\r\n\r\n const widthWithScroll = inner.offsetWidth\r\n outer.parentNode?.removeChild(outer)\r\n scrollBarWidth = widthNoScroll - widthWithScroll\r\n\r\n return scrollBarWidth\r\n}\r\n\r\n/**\r\n * Scroll with in the container element, positioning the **selected** element at the top\r\n * of the container\r\n */\r\nexport function scrollIntoView(\r\n container: HTMLElement,\r\n selected: HTMLElement\r\n): void {\r\n if (!isClient) return\r\n\r\n if (!selected) {\r\n container.scrollTop = 0\r\n return\r\n }\r\n\r\n const offsetParents: HTMLElement[] = []\r\n let pointer = selected.offsetParent\r\n while (\r\n pointer !== null &&\r\n container !== pointer &&\r\n container.contains(pointer)\r\n ) {\r\n offsetParents.push(pointer as HTMLElement)\r\n pointer = (pointer as HTMLElement).offsetParent\r\n }\r\n const top =\r\n selected.offsetTop +\r\n offsetParents.reduce((prev, curr) => prev + curr.offsetTop, 0)\r\n const bottom = top + selected.offsetHeight\r\n const viewRectTop = container.scrollTop\r\n const viewRectBottom = viewRectTop + container.clientHeight\r\n\r\n if (top < viewRectTop) {\r\n container.scrollTop = top\r\n } else if (bottom > viewRectBottom) {\r\n container.scrollTop = bottom - container.clientHeight\r\n }\r\n}\r\n\r\nexport function animateScrollTo(\r\n container: HTMLElement | Window,\r\n from: number,\r\n to: number,\r\n duration: number,\r\n callback?: unknown\r\n) {\r\n const startTime = Date.now()\r\n\r\n let handle: number | undefined\r\n const scroll = () => {\r\n const timestamp = Date.now()\r\n const time = timestamp - startTime\r\n const nextScrollTop = easeInOutCubic(\r\n time > duration ? duration : time,\r\n from,\r\n to,\r\n duration\r\n )\r\n\r\n if (isWindow(container)) {\r\n container.scrollTo(window.pageXOffset, nextScrollTop)\r\n } else {\r\n container.scrollTop = nextScrollTop\r\n }\r\n if (time < duration) {\r\n handle = rAF(scroll)\r\n } else if (typeof callback === 'function') {\r\n callback()\r\n }\r\n }\r\n\r\n scroll()\r\n\r\n return () => {\r\n handle && cAF(handle)\r\n }\r\n}\r\n\r\nexport const getScrollElement = (\r\n target: HTMLElement,\r\n container: HTMLElement | Window\r\n) => {\r\n if (isWindow(container)) {\r\n return target.ownerDocument.documentElement\r\n }\r\n return container\r\n}\r\n\r\nexport const getScrollTop = (container: HTMLElement | Window) => {\r\n if (isWindow(container)) {\r\n return window.scrollY\r\n }\r\n return container.scrollTop\r\n}\r\n"],"names":["isScroll","el","isVertical","isClient","key","overflow","getStyle","s","getScrollContainer","parent","scrollBarWidth","getScrollBarWidth","namespace","outer","widthNoScroll","inner","widthWithScroll","_a","scrollIntoView","container","selected","offsetParents","pointer","top","prev","curr","bottom","viewRectTop","viewRectBottom","animateScrollTo","from","to","duration","callback","startTime","handle","scroll","time","nextScrollTop","easeInOutCubic","isWindow","rAF","cAF","getScrollElement","target","getScrollTop"],"mappings":"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"}
@@ -1,73 +1,58 @@
1
- import { isNumber, isStringNumber } from "../types.js";
2
- import { c as camelize, d as isObject, e as isString } from "../../../functions-BeMkokbY.js";
3
- import { entriesOf, keysOf } from "../objects.js";
4
- import { debugWarn } from "../error.js";
5
- import { i as isClient } from "../../../index-D1m0KTpK.js";
6
- const SCOPE = "utils/dom/style";
7
- const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
8
- const hasClass = (el, cls) => {
9
- if (!el || !cls) return false;
10
- if (cls.includes(" ")) throw new Error("className should not contain space.");
11
- return el.classList.contains(cls);
12
- };
13
- const addClass = (el, cls) => {
14
- if (!el || !cls.trim()) return;
15
- el.classList.add(...classNameToArray(cls));
16
- };
17
- const removeClass = (el, cls) => {
18
- if (!el || !cls.trim()) return;
19
- el.classList.remove(...classNameToArray(cls));
20
- };
21
- const getStyle = (element, styleName) => {
22
- var _a;
23
- if (!isClient || !element || !styleName) return "";
24
- let key = camelize(styleName);
25
- if (key === "float") key = "cssFloat";
1
+ import { isNumber as u, isStringNumber as d } from "../types.js";
2
+ import { c as f, d as c, e as m } from "../../../functions-DzLqXvGt.js";
3
+ import { entriesOf as p, keysOf as b } from "../objects.js";
4
+ import { debugWarn as g } from "../error.js";
5
+ import { i as l } from "../../../index-C9tCD90X.js";
6
+ const y = "utils/dom/style", e = (r = "") => r.split(" ").filter((t) => !!t.trim()), w = (r, t) => {
7
+ if (!r || !t) return !1;
8
+ if (t.includes(" ")) throw new Error("className should not contain space.");
9
+ return r.classList.contains(t);
10
+ }, L = (r, t) => {
11
+ !r || !t.trim() || r.classList.add(...e(t));
12
+ }, x = (r, t) => {
13
+ !r || !t.trim() || r.classList.remove(...e(t));
14
+ }, $ = (r, t) => {
15
+ var i;
16
+ if (!l || !r || !t) return "";
17
+ let s = f(t);
18
+ s === "float" && (s = "cssFloat");
26
19
  try {
27
- const style = element.style[key];
28
- if (style) return style;
29
- const computed = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(element, "");
30
- return computed ? computed[key] : "";
20
+ const o = r.style[s];
21
+ if (o) return o;
22
+ const n = (i = document.defaultView) == null ? void 0 : i.getComputedStyle(r, "");
23
+ return n ? n[s] : "";
31
24
  } catch {
32
- return element.style[key];
33
- }
34
- };
35
- const setStyle = (element, styleName, value) => {
36
- if (!element || !styleName) return;
37
- if (isObject(styleName)) {
38
- entriesOf(styleName).forEach(
39
- ([prop, value2]) => setStyle(element, prop, value2)
40
- );
41
- } else {
42
- const key = camelize(styleName);
43
- element.style[key] = value;
44
- }
45
- };
46
- const removeStyle = (element, style) => {
47
- if (!element || !style) return;
48
- if (isObject(style)) {
49
- keysOf(style).forEach((prop) => removeStyle(element, prop));
50
- } else {
51
- setStyle(element, style, "");
25
+ return r.style[s];
52
26
  }
27
+ }, a = (r, t, s) => {
28
+ if (!(!r || !t))
29
+ if (c(t))
30
+ p(t).forEach(
31
+ ([i, o]) => a(r, i, o)
32
+ );
33
+ else {
34
+ const i = f(t);
35
+ r.style[i] = s;
36
+ }
37
+ }, S = (r, t) => {
38
+ !r || !t || (c(t) ? b(t).forEach((s) => S(r, s)) : a(r, t, ""));
53
39
  };
54
- function addUnit(value, defaultUnit = "px") {
55
- if (!value) return "";
56
- if (isNumber(value) || isStringNumber(value)) {
57
- return `${value}${defaultUnit}`;
58
- } else if (isString(value)) {
59
- return value;
60
- }
61
- debugWarn(SCOPE, "binding value must be a string or number");
40
+ function j(r, t = "px") {
41
+ if (!r) return "";
42
+ if (u(r) || d(r))
43
+ return `${r}${t}`;
44
+ if (m(r))
45
+ return r;
46
+ g(y, "binding value must be a string or number");
62
47
  }
63
48
  export {
64
- addClass,
65
- addUnit,
66
- classNameToArray,
67
- getStyle,
68
- hasClass,
69
- removeClass,
70
- removeStyle,
71
- setStyle
49
+ L as addClass,
50
+ j as addUnit,
51
+ e as classNameToArray,
52
+ $ as getStyle,
53
+ w as hasClass,
54
+ x as removeClass,
55
+ S as removeStyle,
56
+ a as setStyle
72
57
  };
73
58
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../src/components/_util/dom/style.ts"],"sourcesContent":["import { isNumber, isObject, isString, isStringNumber } from '../types'\r\nimport { isClient } from '../browser'\r\nimport { camelize } from '../strings'\r\nimport { entriesOf, keysOf } from '../objects'\r\nimport { debugWarn } from '../error'\r\nimport type { CSSProperties } from 'vue'\r\n\r\nconst SCOPE = 'utils/dom/style'\r\n\r\nexport const classNameToArray = (cls = '') =>\r\n cls.split(' ').filter((item) => !!item.trim())\r\n\r\nexport const hasClass = (el: Element, cls: string): boolean => {\r\n if (!el || !cls) return false\r\n if (cls.includes(' ')) throw new Error('className should not contain space.')\r\n return el.classList.contains(cls)\r\n}\r\n\r\nexport const addClass = (el: Element, cls: string) => {\r\n if (!el || !cls.trim()) return\r\n el.classList.add(...classNameToArray(cls))\r\n}\r\n\r\nexport const removeClass = (el: Element, cls: string) => {\r\n if (!el || !cls.trim()) return\r\n el.classList.remove(...classNameToArray(cls))\r\n}\r\n\r\nexport const getStyle = (\r\n element: HTMLElement,\r\n styleName: keyof CSSProperties\r\n): string => {\r\n if (!isClient || !element || !styleName) return ''\r\n\r\n let key = camelize(styleName)\r\n if (key === 'float') key = 'cssFloat'\r\n try {\r\n const style = (element.style as any)[key]\r\n if (style) return style\r\n const computed: any = document.defaultView?.getComputedStyle(element, '')\r\n return computed ? computed[key] : ''\r\n } catch {\r\n return (element.style as any)[key]\r\n }\r\n}\r\n\r\nexport const setStyle = (\r\n element: HTMLElement,\r\n styleName: CSSProperties | keyof CSSProperties,\r\n value?: string | number\r\n) => {\r\n if (!element || !styleName) return\r\n\r\n if (isObject(styleName)) {\r\n entriesOf(styleName).forEach(([prop, value]) =>\r\n setStyle(element, prop, value)\r\n )\r\n } else {\r\n const key: any = camelize(styleName)\r\n element.style[key] = value as any\r\n }\r\n}\r\n\r\nexport const removeStyle = (\r\n element: HTMLElement,\r\n style: CSSProperties | keyof CSSProperties\r\n) => {\r\n if (!element || !style) return\r\n\r\n if (isObject(style)) {\r\n keysOf(style).forEach((prop) => removeStyle(element, prop))\r\n } else {\r\n setStyle(element, style, '')\r\n }\r\n}\r\n\r\nexport function addUnit(value?: string | number, defaultUnit = 'px') {\r\n if (!value) return ''\r\n if (isNumber(value) || isStringNumber(value)) {\r\n return `${value}${defaultUnit}`\r\n } else if (isString(value)) {\r\n return value\r\n }\r\n debugWarn(SCOPE, 'binding value must be a string or number')\r\n}\r\n"],"names":["value"],"mappings":";;;;;AAOA,MAAM,QAAQ;AAEP,MAAM,mBAAmB,CAAC,MAAM,OACrC,IAAI,MAAM,GAAG,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,MAAM;AAElC,MAAA,WAAW,CAAC,IAAa,QAAyB;AAC7D,MAAI,CAAC,MAAM,CAAC,IAAY,QAAA;AACxB,MAAI,IAAI,SAAS,GAAG,EAAS,OAAA,IAAI,MAAM,qCAAqC;AACrE,SAAA,GAAG,UAAU,SAAS,GAAG;AAClC;AAEa,MAAA,WAAW,CAAC,IAAa,QAAgB;AACpD,MAAI,CAAC,MAAM,CAAC,IAAI,KAAQ,EAAA;AACxB,KAAG,UAAU,IAAI,GAAG,iBAAiB,GAAG,CAAC;AAC3C;AAEa,MAAA,cAAc,CAAC,IAAa,QAAgB;AACvD,MAAI,CAAC,MAAM,CAAC,IAAI,KAAQ,EAAA;AACxB,KAAG,UAAU,OAAO,GAAG,iBAAiB,GAAG,CAAC;AAC9C;AAEa,MAAA,WAAW,CACtB,SACA,cACW;;AACX,MAAI,CAAC,YAAY,CAAC,WAAW,CAAC,UAAkB,QAAA;AAE5C,MAAA,MAAM,SAAS,SAAS;AACxB,MAAA,QAAQ,QAAe,OAAA;AACvB,MAAA;AACI,UAAA,QAAS,QAAQ,MAAc,GAAG;AACxC,QAAI,MAAc,QAAA;AAClB,UAAM,YAAgB,cAAS,gBAAT,mBAAsB,iBAAiB,SAAS;AAC/D,WAAA,WAAW,SAAS,GAAG,IAAI;AAAA,EAAA,QAC5B;AACE,WAAA,QAAQ,MAAc,GAAG;AAAA,EACnC;AACF;AAEO,MAAM,WAAW,CACtB,SACA,WACA,UACG;AACC,MAAA,CAAC,WAAW,CAAC,UAAW;AAExB,MAAA,SAAS,SAAS,GAAG;AACvB,cAAU,SAAS,EAAE;AAAA,MAAQ,CAAC,CAAC,MAAMA,MAAK,MACxC,SAAS,SAAS,MAAMA,MAAK;AAAA,IAAA;AAAA,EAC/B,OACK;AACC,UAAA,MAAW,SAAS,SAAS;AAC3B,YAAA,MAAM,GAAG,IAAI;AAAA,EACvB;AACF;AAEa,MAAA,cAAc,CACzB,SACA,UACG;AACC,MAAA,CAAC,WAAW,CAAC,MAAO;AAEpB,MAAA,SAAS,KAAK,GAAG;AACZ,WAAA,KAAK,EAAE,QAAQ,CAAC,SAAS,YAAY,SAAS,IAAI,CAAC;AAAA,EAAA,OACrD;AACI,aAAA,SAAS,OAAO,EAAE;AAAA,EAC7B;AACF;AAEgB,SAAA,QAAQ,OAAyB,cAAc,MAAM;AAC/D,MAAA,CAAC,MAAc,QAAA;AACnB,MAAI,SAAS,KAAK,KAAK,eAAe,KAAK,GAAG;AACrC,WAAA,GAAG,KAAK,GAAG,WAAW;AAAA,EAAA,WACpB,SAAS,KAAK,GAAG;AACnB,WAAA;AAAA,EACT;AACA,YAAU,OAAO,0CAA0C;AAC7D;"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/_util/dom/style.ts"],"sourcesContent":["import { isNumber, isObject, isString, isStringNumber } from '../types'\r\nimport { isClient } from '../browser'\r\nimport { camelize } from '../strings'\r\nimport { entriesOf, keysOf } from '../objects'\r\nimport { debugWarn } from '../error'\r\nimport type { CSSProperties } from 'vue'\r\n\r\nconst SCOPE = 'utils/dom/style'\r\n\r\nexport const classNameToArray = (cls = '') =>\r\n cls.split(' ').filter((item) => !!item.trim())\r\n\r\nexport const hasClass = (el: Element, cls: string): boolean => {\r\n if (!el || !cls) return false\r\n if (cls.includes(' ')) throw new Error('className should not contain space.')\r\n return el.classList.contains(cls)\r\n}\r\n\r\nexport const addClass = (el: Element, cls: string) => {\r\n if (!el || !cls.trim()) return\r\n el.classList.add(...classNameToArray(cls))\r\n}\r\n\r\nexport const removeClass = (el: Element, cls: string) => {\r\n if (!el || !cls.trim()) return\r\n el.classList.remove(...classNameToArray(cls))\r\n}\r\n\r\nexport const getStyle = (\r\n element: HTMLElement,\r\n styleName: keyof CSSProperties\r\n): string => {\r\n if (!isClient || !element || !styleName) return ''\r\n\r\n let key = camelize(styleName)\r\n if (key === 'float') key = 'cssFloat'\r\n try {\r\n const style = (element.style as any)[key]\r\n if (style) return style\r\n const computed: any = document.defaultView?.getComputedStyle(element, '')\r\n return computed ? computed[key] : ''\r\n } catch {\r\n return (element.style as any)[key]\r\n }\r\n}\r\n\r\nexport const setStyle = (\r\n element: HTMLElement,\r\n styleName: CSSProperties | keyof CSSProperties,\r\n value?: string | number\r\n) => {\r\n if (!element || !styleName) return\r\n\r\n if (isObject(styleName)) {\r\n entriesOf(styleName).forEach(([prop, value]) =>\r\n setStyle(element, prop, value)\r\n )\r\n } else {\r\n const key: any = camelize(styleName)\r\n element.style[key] = value as any\r\n }\r\n}\r\n\r\nexport const removeStyle = (\r\n element: HTMLElement,\r\n style: CSSProperties | keyof CSSProperties\r\n) => {\r\n if (!element || !style) return\r\n\r\n if (isObject(style)) {\r\n keysOf(style).forEach((prop) => removeStyle(element, prop))\r\n } else {\r\n setStyle(element, style, '')\r\n }\r\n}\r\n\r\nexport function addUnit(value?: string | number, defaultUnit = 'px') {\r\n if (!value) return ''\r\n if (isNumber(value) || isStringNumber(value)) {\r\n return `${value}${defaultUnit}`\r\n } else if (isString(value)) {\r\n return value\r\n }\r\n debugWarn(SCOPE, 'binding value must be a string or number')\r\n}\r\n"],"names":["SCOPE","classNameToArray","cls","item","hasClass","el","addClass","removeClass","getStyle","element","styleName","isClient","key","camelize","style","computed","_a","setStyle","value","isObject","entriesOf","prop","removeStyle","keysOf","addUnit","defaultUnit","isNumber","isStringNumber","isString","debugWarn"],"mappings":";;;;;AAOA,MAAMA,IAAQ,mBAEDC,IAAmB,CAACC,IAAM,OACrCA,EAAI,MAAM,GAAG,EAAE,OAAO,CAACC,MAAS,CAAC,CAACA,EAAK,MAAM,GAElCC,IAAW,CAACC,GAAaH,MAAyB;AAC7D,MAAI,CAACG,KAAM,CAACH,EAAY,QAAA;AACxB,MAAIA,EAAI,SAAS,GAAG,EAAS,OAAA,IAAI,MAAM,qCAAqC;AACrE,SAAAG,EAAG,UAAU,SAASH,CAAG;AAClC,GAEaI,IAAW,CAACD,GAAaH,MAAgB;AACpD,EAAI,CAACG,KAAM,CAACH,EAAI,KAAQ,KACxBG,EAAG,UAAU,IAAI,GAAGJ,EAAiBC,CAAG,CAAC;AAC3C,GAEaK,IAAc,CAACF,GAAaH,MAAgB;AACvD,EAAI,CAACG,KAAM,CAACH,EAAI,KAAQ,KACxBG,EAAG,UAAU,OAAO,GAAGJ,EAAiBC,CAAG,CAAC;AAC9C,GAEaM,IAAW,CACtBC,GACAC,MACW;;AACX,MAAI,CAACC,KAAY,CAACF,KAAW,CAACC,EAAkB,QAAA;AAE5C,MAAAE,IAAMC,EAASH,CAAS;AACxB,EAAAE,MAAQ,YAAeA,IAAA;AACvB,MAAA;AACI,UAAAE,IAASL,EAAQ,MAAcG,CAAG;AACxC,QAAIE,EAAc,QAAAA;AAClB,UAAMC,KAAgBC,IAAA,SAAS,gBAAT,gBAAAA,EAAsB,iBAAiBP,GAAS;AAC/D,WAAAM,IAAWA,EAASH,CAAG,IAAI;AAAA,EAAA,QAC5B;AACE,WAAAH,EAAQ,MAAcG,CAAG;AAAA,EACnC;AACF,GAEaK,IAAW,CACtBR,GACAC,GACAQ,MACG;AACC,MAAA,GAACT,KAAW,CAACC;AAEb,QAAAS,EAAST,CAAS;AACpB,MAAAU,EAAUV,CAAS,EAAE;AAAA,QAAQ,CAAC,CAACW,GAAMH,CAAK,MACxCD,EAASR,GAASY,GAAMH,CAAK;AAAA,MAAA;AAAA,SAE1B;AACC,YAAAN,IAAWC,EAASH,CAAS;AAC3B,MAAAD,EAAA,MAAMG,CAAG,IAAIM;AAAA,IACvB;AACF,GAEaI,IAAc,CACzBb,GACAK,MACG;AACC,EAAA,CAACL,KAAW,CAACK,MAEbK,EAASL,CAAK,IACTS,EAAAT,CAAK,EAAE,QAAQ,CAACO,MAASC,EAAYb,GAASY,CAAI,CAAC,IAEjDJ,EAAAR,GAASK,GAAO,EAAE;AAE/B;AAEgB,SAAAU,EAAQN,GAAyBO,IAAc,MAAM;AAC/D,MAAA,CAACP,EAAc,QAAA;AACnB,MAAIQ,EAASR,CAAK,KAAKS,EAAeT,CAAK;AAClC,WAAA,GAAGA,CAAK,GAAGO,CAAW;AAC/B,MAAWG,EAASV,CAAK;AAChB,WAAAA;AAET,EAAAW,EAAU7B,GAAO,0CAA0C;AAC7D;"}
@@ -1,12 +1,8 @@
1
- function easeInOutCubic(t, b, c, d) {
2
- const cc = c - b;
3
- t /= d / 2;
4
- if (t < 1) {
5
- return cc / 2 * t * t * t + b;
6
- }
7
- return cc / 2 * ((t -= 2) * t * t + 2) + b;
1
+ function i(n, c, r, u) {
2
+ const e = r - c;
3
+ return n /= u / 2, n < 1 ? e / 2 * n * n * n + c : e / 2 * ((n -= 2) * n * n + 2) + c;
8
4
  }
9
5
  export {
10
- easeInOutCubic
6
+ i as easeInOutCubic
11
7
  };
12
8
  //# sourceMappingURL=easings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"easings.js","sources":["../../../src/components/_util/easings.ts"],"sourcesContent":["export function easeInOutCubic(t: number, b: number, c: number, d: number) {\r\n const cc = c - b\r\n t /= d / 2\r\n if (t < 1) {\r\n return (cc / 2) * t * t * t + b\r\n }\r\n return (cc / 2) * ((t -= 2) * t * t + 2) + b\r\n}\r\n"],"names":[],"mappings":"AAAO,SAAS,eAAe,GAAW,GAAW,GAAW,GAAW;AACzE,QAAM,KAAK,IAAI;AACf,OAAK,IAAI;AACT,MAAI,IAAI,GAAG;AACT,WAAQ,KAAK,IAAK,IAAI,IAAI,IAAI;AAAA,EAChC;AACA,SAAQ,KAAK,MAAO,KAAK,KAAK,IAAI,IAAI,KAAK;AAC7C;"}
1
+ {"version":3,"file":"easings.js","sources":["../../../src/components/_util/easings.ts"],"sourcesContent":["export function easeInOutCubic(t: number, b: number, c: number, d: number) {\r\n const cc = c - b\r\n t /= d / 2\r\n if (t < 1) {\r\n return (cc / 2) * t * t * t + b\r\n }\r\n return (cc / 2) * ((t -= 2) * t * t + 2) + b\r\n}\r\n"],"names":["easeInOutCubic","t","b","c","d","cc"],"mappings":"AAAO,SAASA,EAAeC,GAAWC,GAAWC,GAAWC,GAAW;AACzE,QAAMC,IAAKF,IAAID;AAEf,SADAD,KAAKG,IAAI,GACLH,IAAI,IACEI,IAAK,IAAKJ,IAAIA,IAAIA,IAAIC,IAExBG,IAAK,MAAOJ,KAAK,KAAKA,IAAIA,IAAI,KAAKC;AAC7C;"}
@@ -1,23 +1,22 @@
1
- import { e as isString } from "../../functions-BeMkokbY.js";
1
+ import { e } from "../../functions-DzLqXvGt.js";
2
2
  import "lodash-es";
3
3
  import "vue";
4
- class ElementPlusError extends Error {
5
- constructor(m) {
6
- super(m);
7
- this.name = "ElementPlusError";
4
+ class n extends Error {
5
+ constructor(o) {
6
+ super(o), this.name = "ElementPlusError";
8
7
  }
9
8
  }
10
- function throwError(scope, m) {
11
- throw new ElementPlusError(`[${scope}] ${m}`);
9
+ function E(r, o) {
10
+ throw new n(`[${r}] ${o}`);
12
11
  }
13
- function debugWarn(scope, message) {
12
+ function c(r, o) {
14
13
  if (process.env.NODE_ENV !== "production") {
15
- const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
16
- console.warn(error);
14
+ const t = e(r) ? new n(`[${r}] ${o}`) : r;
15
+ console.warn(t);
17
16
  }
18
17
  }
19
18
  export {
20
- debugWarn,
21
- throwError
19
+ c as debugWarn,
20
+ E as throwError
22
21
  };
23
22
  //# sourceMappingURL=error.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sources":["../../../src/components/_util/error.ts"],"sourcesContent":["import { isString } from './types'\r\n\r\nclass ElementPlusError extends Error {\r\n constructor(m: string) {\r\n super(m)\r\n this.name = 'ElementPlusError'\r\n }\r\n}\r\n\r\nexport function throwError(scope: string, m: string): never {\r\n throw new ElementPlusError(`[${scope}] ${m}`)\r\n}\r\n\r\nexport function debugWarn(err: Error): void\r\nexport function debugWarn(scope: string, message: string): void\r\nexport function debugWarn(scope: string | Error, message?: string): void {\r\n if (process.env.NODE_ENV !== 'production') {\r\n const error: Error = isString(scope)\r\n ? new ElementPlusError(`[${scope}] ${message}`)\r\n : scope\r\n // eslint-disable-next-line no-console\r\n console.warn(error)\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAEA,MAAM,yBAAyB,MAAM;AAAA,EACnC,YAAY,GAAW;AACrB,UAAM,CAAC;AACP,SAAK,OAAO;AAAA,EACd;AACF;AAEgB,SAAA,WAAW,OAAe,GAAkB;AAC1D,QAAM,IAAI,iBAAiB,IAAI,KAAK,KAAK,CAAC,EAAE;AAC9C;AAIgB,SAAA,UAAU,OAAuB,SAAwB;AACnE,MAAA,QAAQ,IAAI,aAAa,cAAc;AACnC,UAAA,QAAe,SAAS,KAAK,IAC/B,IAAI,iBAAiB,IAAI,KAAK,KAAK,OAAO,EAAE,IAC5C;AAEJ,YAAQ,KAAK,KAAK;AAAA,EACpB;AACF;"}
1
+ {"version":3,"file":"error.js","sources":["../../../src/components/_util/error.ts"],"sourcesContent":["import { isString } from './types'\r\n\r\nclass ElementPlusError extends Error {\r\n constructor(m: string) {\r\n super(m)\r\n this.name = 'ElementPlusError'\r\n }\r\n}\r\n\r\nexport function throwError(scope: string, m: string): never {\r\n throw new ElementPlusError(`[${scope}] ${m}`)\r\n}\r\n\r\nexport function debugWarn(err: Error): void\r\nexport function debugWarn(scope: string, message: string): void\r\nexport function debugWarn(scope: string | Error, message?: string): void {\r\n if (process.env.NODE_ENV !== 'production') {\r\n const error: Error = isString(scope)\r\n ? new ElementPlusError(`[${scope}] ${message}`)\r\n : scope\r\n // eslint-disable-next-line no-console\r\n console.warn(error)\r\n }\r\n}\r\n"],"names":["ElementPlusError","m","throwError","scope","debugWarn","message","error","isString"],"mappings":";;;AAEA,MAAMA,UAAyB,MAAM;AAAA,EACnC,YAAYC,GAAW;AACrB,UAAMA,CAAC,GACP,KAAK,OAAO;AAAA,EACd;AACF;AAEgB,SAAAC,EAAWC,GAAeF,GAAkB;AAC1D,QAAM,IAAID,EAAiB,IAAIG,CAAK,KAAKF,CAAC,EAAE;AAC9C;AAIgB,SAAAG,EAAUD,GAAuBE,GAAwB;AACnE,MAAA,QAAQ,IAAI,aAAa,cAAc;AACnC,UAAAC,IAAeC,EAASJ,CAAK,IAC/B,IAAIH,EAAiB,IAAIG,CAAK,KAAKE,CAAO,EAAE,IAC5CF;AAEJ,YAAQ,KAAKG,CAAK;AAAA,EACpB;AACF;"}
@@ -1,6 +1,6 @@
1
- import { N, t } from "../../functions-BeMkokbY.js";
1
+ import { N as t, t as e } from "../../functions-DzLqXvGt.js";
2
2
  export {
3
- N as NOOP,
4
- t as toRawType
3
+ t as NOOP,
4
+ e as toRawType
5
5
  };
6
6
  //# sourceMappingURL=functions.js.map
@@ -1,5 +1,5 @@
1
- const isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text);
1
+ const u = (t) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t);
2
2
  export {
3
- isKorean
3
+ u as isKorean
4
4
  };
5
5
  //# sourceMappingURL=i18n.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","sources":["../../../src/components/_util/i18n.ts"],"sourcesContent":["export const isKorean = (text: string) =>\r\n /([\\uAC00-\\uD7AF\\u3130-\\u318F])+/gi.test(text)\r\n"],"names":[],"mappings":"AAAO,MAAM,WAAW,CAAC,SACvB,oCAAoC,KAAK,IAAI;"}
1
+ {"version":3,"file":"i18n.js","sources":["../../../src/components/_util/i18n.ts"],"sourcesContent":["export const isKorean = (text: string) =>\r\n /([\\uAC00-\\uD7AF\\u3130-\\u318F])+/gi.test(text)\r\n"],"names":["isKorean","text"],"mappings":"AAAO,MAAMA,IAAW,CAACC,MACvB,oCAAoC,KAAKA,CAAI;"}
@@ -1,140 +1,140 @@
1
- import { attemptFocus, focusNode, getSibling, isFocusable, isLeaf, isVisible, obtainAllFocusableElements, triggerEvent } from "./dom/aria.js";
2
- import { composeEventHandlers, whenMouse } from "./dom/event.js";
3
- import { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from "./dom/position.js";
4
- import { animateScrollTo, getScrollBarWidth, getScrollContainer, getScrollElement, getScrollTop, isScroll, scrollIntoView } from "./dom/scroll.js";
5
- import { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from "./dom/style.js";
6
- import { getElement } from "./dom/element.js";
7
- import { changeGlobalNodesTarget, createGlobalNode, removeGlobalNode } from "./vue/global-node.js";
8
- import { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsMap, iconPropType } from "./vue/icon.js";
9
- import { withInstall, withInstallDirective, withInstallFunction, withNoopInstall } from "./vue/install.js";
10
- import { buildProp, buildProps, definePropType, epPropKey, isEpProp } from "./vue/props/runtime.js";
11
- import { composeRefs } from "./vue/refs.js";
12
- import { getComponentSize } from "./vue/size.js";
13
- import { isValidComponentSize, isValidDatePickType } from "./vue/validator.js";
14
- import { PatchFlags, ensureOnlyChild, flattedChildren, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from "./vue/vnode.js";
15
- import { castArray, unique } from "./arrays.js";
16
- import { isFirefox } from "./browser.js";
17
- import { debugWarn, throwError } from "./error.js";
18
- import { N, c, h, a, i, f, b, d, k, g, e, j, a as a2, t } from "../../functions-BeMkokbY.js";
19
- import { isKorean } from "./i18n.js";
20
- import { entriesOf, getProp, keysOf } from "./objects.js";
21
- import { cAF, rAF } from "./raf.js";
22
- import { generateId, getRandomInt } from "./rand.js";
23
- import { capitalize, escapeStringRegexp } from "./strings.js";
24
- import { isBoolean, isElement, isEmpty, isNumber, isPropAbsent, isStringNumber, isUndefined, isWindow } from "./types.js";
25
- import { mutable } from "./typescript.js";
26
- import { throttleByRaf } from "./throttleByRaf.js";
27
- import { easeInOutCubic } from "./easings.js";
28
- import { castArray as castArray2 } from "lodash-es";
29
- import { i as i2, a as a3 } from "../../index-D1m0KTpK.js";
30
- import { isVNode } from "vue";
1
+ import { attemptFocus as r, focusNode as t, getSibling as s, isFocusable as a, isLeaf as i, isVisible as l, obtainAllFocusableElements as n, triggerEvent as p } from "./dom/aria.js";
2
+ import { composeEventHandlers as f, whenMouse as c } from "./dom/event.js";
3
+ import { getClientXY as x, getOffsetTop as g, getOffsetTopDistance as b, isInContainer as y } from "./dom/position.js";
4
+ import { animateScrollTo as C, getScrollBarWidth as h, getScrollContainer as S, getScrollElement as N, getScrollTop as P, isScroll as T, scrollIntoView as O } from "./dom/scroll.js";
5
+ import { addClass as I, addUnit as w, classNameToArray as E, getStyle as A, hasClass as V, removeClass as v, removeStyle as k, setStyle as z } from "./dom/style.js";
6
+ import { getElement as B } from "./dom/element.js";
7
+ import { changeGlobalNodesTarget as j, createGlobalNode as G, removeGlobalNode as M } from "./vue/global-node.js";
8
+ import { CloseComponents as K, TypeComponents as U, TypeComponentsMap as q, ValidateComponentsMap as H, iconPropType as L } from "./vue/icon.js";
9
+ import { withInstall as Y, withInstallDirective as J, withInstallFunction as Q, withNoopInstall as Z } from "./vue/install.js";
10
+ import { buildProp as $, buildProps as ee, definePropType as oe, epPropKey as re, isEpProp as te } from "./vue/props/runtime.js";
11
+ import { composeRefs as ae } from "./vue/refs.js";
12
+ import { getComponentSize as le } from "./vue/size.js";
13
+ import { isValidComponentSize as pe, isValidDatePickType as me } from "./vue/validator.js";
14
+ import { PatchFlags as ce, ensureOnlyChild as de, flattedChildren as xe, getFirstValidNode as ge, getNormalizedProps as be, isComment as ye, isFragment as ue, isTemplate as Ce, isText as he, isValidElementNode as Se, renderBlock as Ne, renderIf as Pe } from "./vue/vnode.js";
15
+ import { castArray as Oe, unique as Fe } from "./arrays.js";
16
+ import { isFirefox as we } from "./browser.js";
17
+ import { debugWarn as Ae, throwError as Ve } from "./error.js";
18
+ import { N as ke, c as ze, h as Re, a as Be, i as De, f as je, b as Ge, d as Me, k as We, g as Ke, e as Ue, j as qe, a as He, t as Le } from "../../functions-DzLqXvGt.js";
19
+ import { isKorean as Ye } from "./i18n.js";
20
+ import { entriesOf as Qe, getProp as Ze, keysOf as _e } from "./objects.js";
21
+ import { cAF as eo, rAF as oo } from "./raf.js";
22
+ import { generateId as to, getRandomInt as so } from "./rand.js";
23
+ import { capitalize as io, escapeStringRegexp as lo } from "./strings.js";
24
+ import { isBoolean as po, isElement as mo, isEmpty as fo, isNumber as co, isPropAbsent as xo, isStringNumber as go, isUndefined as bo, isWindow as yo } from "./types.js";
25
+ import { mutable as Co } from "./typescript.js";
26
+ import { throttleByRaf as So } from "./throttleByRaf.js";
27
+ import { easeInOutCubic as Po } from "./easings.js";
28
+ import { castArray as Oo } from "lodash-es";
29
+ import { i as Io, a as wo } from "../../index-C9tCD90X.js";
30
+ import { isVNode as Ao } from "vue";
31
31
  export {
32
- CloseComponents,
33
- N as NOOP,
34
- PatchFlags,
35
- TypeComponents,
36
- TypeComponentsMap,
37
- ValidateComponentsMap,
38
- addClass,
39
- addUnit,
40
- animateScrollTo,
41
- attemptFocus,
42
- buildProp,
43
- buildProps,
44
- cAF,
45
- c as camelize,
46
- capitalize,
47
- castArray,
48
- changeGlobalNodesTarget,
49
- classNameToArray,
50
- composeEventHandlers,
51
- composeRefs,
52
- createGlobalNode,
53
- debugWarn,
54
- definePropType,
55
- easeInOutCubic,
56
- castArray2 as ensureArray,
57
- ensureOnlyChild,
58
- entriesOf,
59
- epPropKey,
60
- escapeStringRegexp,
61
- flattedChildren,
62
- focusNode,
63
- generateId,
64
- getClientXY,
65
- getComponentSize,
66
- getElement,
67
- getFirstValidNode,
68
- getNormalizedProps,
69
- getOffsetTop,
70
- getOffsetTopDistance,
71
- getProp,
72
- getRandomInt,
73
- getScrollBarWidth,
74
- getScrollContainer,
75
- getScrollElement,
76
- getScrollTop,
77
- getSibling,
78
- getStyle,
79
- hasClass,
80
- h as hasOwn,
81
- a as hyphenate,
82
- iconPropType,
83
- i as isArray,
84
- isBoolean,
85
- i2 as isClient,
86
- isComment,
87
- f as isDate,
88
- isElement,
89
- isEmpty,
90
- isEpProp,
91
- isFirefox,
92
- isFocusable,
93
- isFragment,
94
- b as isFunction,
95
- a3 as isIOS,
96
- isInContainer,
97
- isKorean,
98
- isLeaf,
99
- isNumber,
100
- d as isObject,
101
- k as isPlainObject,
102
- g as isPromise,
103
- isPropAbsent,
104
- isScroll,
105
- e as isString,
106
- isStringNumber,
107
- j as isSymbol,
108
- isTemplate,
109
- isText,
110
- isUndefined,
111
- isVNode,
112
- isValidComponentSize,
113
- isValidDatePickType,
114
- isValidElementNode,
115
- isVisible,
116
- isWindow,
117
- a2 as kebabCase,
118
- keysOf,
119
- mutable,
120
- obtainAllFocusableElements,
121
- rAF,
122
- removeClass,
123
- removeGlobalNode,
124
- removeStyle,
125
- renderBlock,
126
- renderIf,
127
- scrollIntoView,
128
- setStyle,
129
- throttleByRaf,
130
- throwError,
131
- t as toRawType,
132
- triggerEvent,
133
- unique,
134
- whenMouse,
135
- withInstall,
136
- withInstallDirective,
137
- withInstallFunction,
138
- withNoopInstall
32
+ K as CloseComponents,
33
+ ke as NOOP,
34
+ ce as PatchFlags,
35
+ U as TypeComponents,
36
+ q as TypeComponentsMap,
37
+ H as ValidateComponentsMap,
38
+ I as addClass,
39
+ w as addUnit,
40
+ C as animateScrollTo,
41
+ r as attemptFocus,
42
+ $ as buildProp,
43
+ ee as buildProps,
44
+ eo as cAF,
45
+ ze as camelize,
46
+ io as capitalize,
47
+ Oe as castArray,
48
+ j as changeGlobalNodesTarget,
49
+ E as classNameToArray,
50
+ f as composeEventHandlers,
51
+ ae as composeRefs,
52
+ G as createGlobalNode,
53
+ Ae as debugWarn,
54
+ oe as definePropType,
55
+ Po as easeInOutCubic,
56
+ Oo as ensureArray,
57
+ de as ensureOnlyChild,
58
+ Qe as entriesOf,
59
+ re as epPropKey,
60
+ lo as escapeStringRegexp,
61
+ xe as flattedChildren,
62
+ t as focusNode,
63
+ to as generateId,
64
+ x as getClientXY,
65
+ le as getComponentSize,
66
+ B as getElement,
67
+ ge as getFirstValidNode,
68
+ be as getNormalizedProps,
69
+ g as getOffsetTop,
70
+ b as getOffsetTopDistance,
71
+ Ze as getProp,
72
+ so as getRandomInt,
73
+ h as getScrollBarWidth,
74
+ S as getScrollContainer,
75
+ N as getScrollElement,
76
+ P as getScrollTop,
77
+ s as getSibling,
78
+ A as getStyle,
79
+ V as hasClass,
80
+ Re as hasOwn,
81
+ Be as hyphenate,
82
+ L as iconPropType,
83
+ De as isArray,
84
+ po as isBoolean,
85
+ Io as isClient,
86
+ ye as isComment,
87
+ je as isDate,
88
+ mo as isElement,
89
+ fo as isEmpty,
90
+ te as isEpProp,
91
+ we as isFirefox,
92
+ a as isFocusable,
93
+ ue as isFragment,
94
+ Ge as isFunction,
95
+ wo as isIOS,
96
+ y as isInContainer,
97
+ Ye as isKorean,
98
+ i as isLeaf,
99
+ co as isNumber,
100
+ Me as isObject,
101
+ We as isPlainObject,
102
+ Ke as isPromise,
103
+ xo as isPropAbsent,
104
+ T as isScroll,
105
+ Ue as isString,
106
+ go as isStringNumber,
107
+ qe as isSymbol,
108
+ Ce as isTemplate,
109
+ he as isText,
110
+ bo as isUndefined,
111
+ Ao as isVNode,
112
+ pe as isValidComponentSize,
113
+ me as isValidDatePickType,
114
+ Se as isValidElementNode,
115
+ l as isVisible,
116
+ yo as isWindow,
117
+ He as kebabCase,
118
+ _e as keysOf,
119
+ Co as mutable,
120
+ n as obtainAllFocusableElements,
121
+ oo as rAF,
122
+ v as removeClass,
123
+ M as removeGlobalNode,
124
+ k as removeStyle,
125
+ Ne as renderBlock,
126
+ Pe as renderIf,
127
+ O as scrollIntoView,
128
+ z as setStyle,
129
+ So as throttleByRaf,
130
+ Ve as throwError,
131
+ Le as toRawType,
132
+ p as triggerEvent,
133
+ Fe as unique,
134
+ c as whenMouse,
135
+ Y as withInstall,
136
+ J as withInstallDirective,
137
+ Q as withInstallFunction,
138
+ Z as withNoopInstall
139
139
  };
140
140
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,5 @@
1
- const isValid = (value) => {
2
- return value !== void 0 && value !== null && value !== "";
3
- };
1
+ const d = (t) => t != null && t !== "";
4
2
  export {
5
- isValid as default
3
+ d as default
6
4
  };
7
5
  //# sourceMappingURL=isValid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isValid.js","sources":["../../../src/components/_util/isValid.ts"],"sourcesContent":["const isValid = (value: any): boolean => {\r\n return value !== undefined && value !== null && value !== ''\r\n}\r\nexport default isValid\r\n"],"names":[],"mappings":"AAAM,MAAA,UAAU,CAAC,UAAwB;AACvC,SAAO,UAAU,UAAa,UAAU,QAAQ,UAAU;AAC5D;"}
1
+ {"version":3,"file":"isValid.js","sources":["../../../src/components/_util/isValid.ts"],"sourcesContent":["const isValid = (value: any): boolean => {\r\n return value !== undefined && value !== null && value !== ''\r\n}\r\nexport default isValid\r\n"],"names":["isValid","value"],"mappings":"AAAM,MAAAA,IAAU,CAACC,MACeA,KAAU,QAAQA,MAAU;"}