hys-ui 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE +19 -0
  3. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  4. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1055 -753
  5. package/dist/components/HysDataGrid/gridColumnLayout.js +46 -0
  6. package/dist/components/HysDataGrid/gridPresentation.js +17 -0
  7. package/dist/components/HysDataGrid/useGridContextMenu.js +33 -0
  8. package/dist/components/HysDatePicker/HysDatePicker.vue.js +102 -48
  9. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
  10. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +874 -532
  11. package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +2 -2
  12. package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +209 -168
  13. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +102 -48
  14. package/dist/components/HysDescriptions/HysDescriptions.vue.js +7 -0
  15. package/dist/components/HysDescriptions/HysDescriptions2.vue.js +146 -0
  16. package/dist/components/HysForm/HysForm2.vue.js +9 -8
  17. package/dist/components/HysIcon/HysIcon.vue.js +373 -0
  18. package/dist/components/HysIcon/HysIcon2.vue.js +5 -0
  19. package/dist/components/HysIcon/IconGraphic/IconGraphic.vue.js +147 -0
  20. package/dist/components/HysIcon/IconGraphic/IconGraphic2.vue.js +4 -0
  21. package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.js +7 -0
  22. package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel2.vue.js +440 -0
  23. package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.js +29 -0
  24. package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic2.vue.js +4 -0
  25. package/dist/components/HysIcon/IconTooltip/IconTooltip.vue.js +19 -0
  26. package/dist/components/HysIcon/IconTooltip/IconTooltip2.vue.js +4 -0
  27. package/dist/components/HysIcon/builtins/access.js +180 -0
  28. package/dist/components/HysIcon/builtins/actions.js +327 -0
  29. package/dist/components/HysIcon/builtins/business.js +364 -0
  30. package/dist/components/HysIcon/builtins/catalog/access-1.json.js +51 -0
  31. package/dist/components/HysIcon/builtins/catalog/access-2.json.js +35 -0
  32. package/dist/components/HysIcon/builtins/catalog/accessibility.json.js +26 -0
  33. package/dist/components/HysIcon/builtins/catalog/arrows-1.json.js +45 -0
  34. package/dist/components/HysIcon/builtins/catalog/arrows-2.json.js +46 -0
  35. package/dist/components/HysIcon/builtins/catalog/arrows-3.json.js +42 -0
  36. package/dist/components/HysIcon/builtins/catalog/charts-1.json.js +50 -0
  37. package/dist/components/HysIcon/builtins/catalog/charts-2.json.js +13 -0
  38. package/dist/components/HysIcon/builtins/catalog/commerce.json.js +43 -0
  39. package/dist/components/HysIcon/builtins/catalog/communication-1.json.js +49 -0
  40. package/dist/components/HysIcon/builtins/catalog/communication-2.json.js +37 -0
  41. package/dist/components/HysIcon/builtins/catalog/design-1.json.js +61 -0
  42. package/dist/components/HysIcon/builtins/catalog/design-2.json.js +27 -0
  43. package/dist/components/HysIcon/builtins/catalog/development-1.json.js +58 -0
  44. package/dist/components/HysIcon/builtins/catalog/development-2.json.js +60 -0
  45. package/dist/components/HysIcon/builtins/catalog/development-3.json.js +25 -0
  46. package/dist/components/HysIcon/builtins/catalog/devices-1.json.js +52 -0
  47. package/dist/components/HysIcon/builtins/catalog/devices-2.json.js +55 -0
  48. package/dist/components/HysIcon/builtins/catalog/devices-3.json.js +23 -0
  49. package/dist/components/HysIcon/builtins/catalog/education.json.js +34 -0
  50. package/dist/components/HysIcon/builtins/catalog/emoji.json.js +24 -0
  51. package/dist/components/HysIcon/builtins/catalog/files-1.json.js +45 -0
  52. package/dist/components/HysIcon/builtins/catalog/files-2.json.js +47 -0
  53. package/dist/components/HysIcon/builtins/catalog/files-3.json.js +8 -0
  54. package/dist/components/HysIcon/builtins/catalog/food-1.json.js +67 -0
  55. package/dist/components/HysIcon/builtins/catalog/food-2.json.js +40 -0
  56. package/dist/components/HysIcon/builtins/catalog/home.json.js +36 -0
  57. package/dist/components/HysIcon/builtins/catalog/layout-1.json.js +46 -0
  58. package/dist/components/HysIcon/builtins/catalog/layout-2.json.js +45 -0
  59. package/dist/components/HysIcon/builtins/catalog/manifest.json.js +4 -0
  60. package/dist/components/HysIcon/builtins/catalog/maps-1.json.js +61 -0
  61. package/dist/components/HysIcon/builtins/catalog/maps-2.json.js +24 -0
  62. package/dist/components/HysIcon/builtins/catalog/media-1.json.js +57 -0
  63. package/dist/components/HysIcon/builtins/catalog/media-2.json.js +13 -0
  64. package/dist/components/HysIcon/builtins/catalog/medical.json.js +30 -0
  65. package/dist/components/HysIcon/builtins/catalog/nature.json.js +54 -0
  66. package/dist/components/HysIcon/builtins/catalog/recreation.json.js +51 -0
  67. package/dist/components/HysIcon/builtins/catalog/shapes.json.js +54 -0
  68. package/dist/components/HysIcon/builtins/catalog/text-1.json.js +52 -0
  69. package/dist/components/HysIcon/builtins/catalog/text-2.json.js +54 -0
  70. package/dist/components/HysIcon/builtins/catalog/text-3.json.js +58 -0
  71. package/dist/components/HysIcon/builtins/catalog/text-4.json.js +41 -0
  72. package/dist/components/HysIcon/builtins/catalog/time.json.js +39 -0
  73. package/dist/components/HysIcon/builtins/catalog/transport-1.json.js +57 -0
  74. package/dist/components/HysIcon/builtins/catalog/transport-2.json.js +7 -0
  75. package/dist/components/HysIcon/builtins/catalog/weather.json.js +46 -0
  76. package/dist/components/HysIcon/builtins/communication.js +314 -0
  77. package/dist/components/HysIcon/builtins/documents.js +315 -0
  78. package/dist/components/HysIcon/builtins/extendedCatalog.js +75 -0
  79. package/dist/components/HysIcon/builtins/iconInCategory.js +11 -0
  80. package/dist/components/HysIcon/builtins/media.js +255 -0
  81. package/dist/components/HysIcon/builtins/navigation.js +276 -0
  82. package/dist/components/HysIcon/builtins/technology.js +189 -0
  83. package/dist/components/HysIcon/iconBuiltins.js +228 -0
  84. package/dist/components/HysIcon/iconConfig.js +30 -0
  85. package/dist/components/HysIcon/iconRegistry.js +183 -0
  86. package/dist/components/HysIcon/iconSafety.js +191 -0
  87. package/dist/components/HysIcon/iconStyle.js +70 -0
  88. package/dist/components/HysIcon/useIconResource.js +75 -0
  89. package/dist/components/HysPopconfirm/HysPopconfirm.vue.js +7 -0
  90. package/dist/components/HysPopconfirm/HysPopconfirm2.vue.js +346 -0
  91. package/dist/components/HysPopconfirm/usePopconfirmAction.js +32 -0
  92. package/dist/components/HysResult/HysResult.vue.js +7 -0
  93. package/dist/components/HysResult/HysResult2.vue.js +124 -0
  94. package/dist/components/HysSpace/HysSpace.vue.js +7 -0
  95. package/dist/components/HysSpace/HysSpace2.vue.js +79 -0
  96. package/dist/components/HysSpace/spaceItems.js +17 -0
  97. package/dist/components/HysSpin/HysSpin.vue.js +7 -0
  98. package/dist/components/HysSpin/HysSpin2.vue.js +427 -0
  99. package/dist/components/HysSpin/SpinGlyph/SpinGlyph.vue.js +334 -0
  100. package/dist/components/HysSpin/SpinGlyph/SpinGlyph2.vue.js +5 -0
  101. package/dist/components/HysSpin/SpinPortal/SpinPortal.vue.js +7 -0
  102. package/dist/components/HysSpin/SpinPortal/SpinPortal2.vue.js +66 -0
  103. package/dist/components/HysSpin/SpinPortal/spinTarget.js +57 -0
  104. package/dist/components/HysSpin/spinCatalog.js +35 -0
  105. package/dist/components/HysSpin/spinConfig.js +32 -0
  106. package/dist/components/HysSpin/spinService.js +160 -0
  107. package/dist/components/HysSpin/spinStyle.js +39 -0
  108. package/dist/components/HysSpin/useHysSpinTask.js +92 -0
  109. package/dist/components/HysSpin/useSpinFullscreen.js +60 -0
  110. package/dist/components/HysSpin/useSpinVisibility.js +59 -0
  111. package/dist/components/HysSplitPane/HysSplitPane.vue.js +285 -204
  112. package/dist/components/HysSplitPane/splitPaneResize.js +75 -0
  113. package/dist/components/HysTabPane/HysTabPane.vue.js +49 -0
  114. package/dist/components/HysTabPane/HysTabPane2.vue.js +4 -0
  115. package/dist/components/HysTable/HysTable.vue.js +3 -3
  116. package/dist/components/HysTable/HysTable2.vue.js +412 -383
  117. package/dist/components/HysTable/tableSearch.js +24 -0
  118. package/dist/components/HysTabs/HysTabs.vue.js +172 -5
  119. package/dist/components/HysTabs/HysTabs2.vue.js +2 -275
  120. package/dist/components/HysTabs/TabsMore/TabsMore.vue.js +7 -0
  121. package/dist/components/HysTabs/TabsMore/TabsMore2.vue.js +133 -0
  122. package/dist/components/HysTabs/TabsPanels/TabsPanels.vue.js +161 -0
  123. package/dist/components/HysTabs/TabsPanels/TabsPanels2.vue.js +4 -0
  124. package/dist/components/HysTabs/TabsPrompts/TabsPrompts.vue.js +4 -0
  125. package/dist/components/HysTabs/TabsPrompts/TabsPrompts2.vue.js +88 -0
  126. package/dist/components/HysTabs/TabsSlot/TabsSlot.js +13 -0
  127. package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.js +7 -0
  128. package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench2.vue.js +687 -0
  129. package/dist/components/HysTabs/tabsConfig.js +35 -0
  130. package/dist/components/HysTabs/tabsItems.js +79 -0
  131. package/dist/components/HysTabs/tabsPersistence.js +118 -0
  132. package/dist/components/HysTabs/useHysRouteTabs.js +77 -0
  133. package/dist/components/HysTabs/useTabsDragGhost.js +47 -0
  134. package/dist/components/HysTabs/useTabsNav.js +127 -0
  135. package/dist/components/HysTabs/useTabsOverlays.js +52 -0
  136. package/dist/components/HysTabs/useTabsPanels.js +101 -0
  137. package/dist/components/HysTabs/useTabsPointer.js +131 -0
  138. package/dist/components/HysTabs/useTabsState.js +263 -0
  139. package/dist/composables/datePicker.js +153 -94
  140. package/dist/composables/datePickerModel.js +156 -0
  141. package/dist/composables/datePickerPanels.js +78 -0
  142. package/dist/composables/datePickerRules.js +166 -0
  143. package/dist/composables/floatingPosition.js +32 -13
  144. package/dist/composables/formLayout.js +20 -42
  145. package/dist/composables/popupSurfaceStyle.js +30 -0
  146. package/dist/composables/useContainerWidth.js +24 -0
  147. package/dist/composables/useDatePicker.js +274 -381
  148. package/dist/composables/useFloating.js +42 -41
  149. package/dist/composables/usePageVisibility.js +19 -0
  150. package/dist/composables/usePopupSurface.js +153 -162
  151. package/dist/composables/usePopupSurfaceInteractions.js +91 -90
  152. package/dist/composables/useSplitPaneDrag.js +29 -26
  153. package/dist/composables/useSvgInstanceId.js +15 -0
  154. package/dist/composables/useTable.js +321 -306
  155. package/dist/composables/useTabularRowNavigation.js +46 -0
  156. package/dist/index.js +229 -185
  157. package/dist/internal/MultiSplitPane.vue.js +246 -205
  158. package/dist/internal/PopupSurfacePanel.vue.js +2 -2
  159. package/dist/internal/PopupSurfacePanel2.vue.js +35 -30
  160. package/dist/style.css +1 -1
  161. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +40 -2
  162. package/dist/types/components/HysDataGrid/gridColumnLayout.d.ts +22 -0
  163. package/dist/types/components/HysDataGrid/gridPresentation.d.ts +47 -0
  164. package/dist/types/components/HysDataGrid/useGridContextMenu.d.ts +14 -0
  165. package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +6 -9
  166. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +12 -0
  167. package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +6 -0
  168. package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +6 -9
  169. package/dist/types/components/HysDescriptions/HysDescriptions.vue.d.ts +20 -0
  170. package/dist/types/components/HysDescriptions/descriptionsTypes.d.ts +54 -0
  171. package/dist/types/components/HysForm/HysForm.vue.d.ts +1 -1
  172. package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +1 -1
  173. package/dist/types/components/HysIcon/HysIcon.vue.d.ts +76 -0
  174. package/dist/types/components/HysIcon/IconGraphic/IconGraphic.vue.d.ts +43 -0
  175. package/dist/types/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.d.ts +17 -0
  176. package/dist/types/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.d.ts +10 -0
  177. package/dist/types/components/HysIcon/IconTooltip/IconTooltip.vue.d.ts +11 -0
  178. package/dist/types/components/HysIcon/builtins/access.d.ts +15 -0
  179. package/dist/types/components/HysIcon/builtins/actions.d.ts +30 -0
  180. package/dist/types/components/HysIcon/builtins/business.d.ts +31 -0
  181. package/dist/types/components/HysIcon/builtins/communication.d.ts +27 -0
  182. package/dist/types/components/HysIcon/builtins/documents.d.ts +29 -0
  183. package/dist/types/components/HysIcon/builtins/extendedCatalog.d.ts +2 -0
  184. package/dist/types/components/HysIcon/builtins/iconInCategory.d.ts +2 -0
  185. package/dist/types/components/HysIcon/builtins/media.d.ts +24 -0
  186. package/dist/types/components/HysIcon/builtins/navigation.d.ts +30 -0
  187. package/dist/types/components/HysIcon/builtins/technology.d.ts +18 -0
  188. package/dist/types/components/HysIcon/iconBuiltins.d.ts +2 -0
  189. package/dist/types/components/HysIcon/iconConfig.d.ts +10 -0
  190. package/dist/types/components/HysIcon/iconRegistry.d.ts +5 -0
  191. package/dist/types/components/HysIcon/iconSafety.d.ts +8 -0
  192. package/dist/types/components/HysIcon/iconStyle.d.ts +6 -0
  193. package/dist/types/components/HysIcon/iconTypes.d.ts +192 -0
  194. package/dist/types/components/HysIcon/useIconResource.d.ts +14 -0
  195. package/dist/types/components/HysPopconfirm/HysPopconfirm.vue.d.ts +85 -0
  196. package/dist/types/components/HysPopconfirm/popconfirmTypes.d.ts +72 -0
  197. package/dist/types/components/HysPopconfirm/usePopconfirmAction.d.ts +6 -0
  198. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
  199. package/dist/types/components/HysResult/HysResult.vue.d.ts +22 -0
  200. package/dist/types/components/HysResult/resultTypes.d.ts +32 -0
  201. package/dist/types/components/HysSpace/HysSpace.vue.d.ts +15 -0
  202. package/dist/types/components/HysSpace/spaceItems.d.ts +9 -0
  203. package/dist/types/components/HysSpace/spaceTypes.d.ts +20 -0
  204. package/dist/types/components/HysSpin/HysSpin.vue.d.ts +84 -0
  205. package/dist/types/components/HysSpin/SpinGlyph/SpinGlyph.vue.d.ts +16 -0
  206. package/dist/types/components/HysSpin/SpinPortal/SpinPortal.vue.d.ts +21 -0
  207. package/dist/types/components/HysSpin/SpinPortal/spinTarget.d.ts +3 -0
  208. package/dist/types/components/HysSpin/spinCatalog.d.ts +122 -0
  209. package/dist/types/components/HysSpin/spinConfig.d.ts +10 -0
  210. package/dist/types/components/HysSpin/spinService.d.ts +7 -0
  211. package/dist/types/components/HysSpin/spinStyle.d.ts +5 -0
  212. package/dist/types/components/HysSpin/spinTypes.d.ts +133 -0
  213. package/dist/types/components/HysSpin/useHysSpinTask.d.ts +4 -0
  214. package/dist/types/components/HysSpin/useSpinFullscreen.d.ts +17 -0
  215. package/dist/types/components/HysSpin/useSpinVisibility.d.ts +10 -0
  216. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +25 -2
  217. package/dist/types/components/HysSplitPane/splitPaneResize.d.ts +17 -0
  218. package/dist/types/components/HysTabPane/HysTabPane.vue.d.ts +11 -0
  219. package/dist/types/components/HysTable/HysTable.vue.d.ts +16 -10
  220. package/dist/types/components/HysTable/tableSearch.d.ts +2 -0
  221. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +83 -74
  222. package/dist/types/components/HysTabs/TabsMore/TabsMore.vue.d.ts +14 -0
  223. package/dist/types/components/HysTabs/TabsPanels/TabsPanels.vue.d.ts +17 -0
  224. package/dist/types/components/HysTabs/TabsPrompts/TabsPrompts.vue.d.ts +7 -0
  225. package/dist/types/components/HysTabs/TabsSlot/TabsSlot.d.ts +9 -0
  226. package/dist/types/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.d.ts +32 -0
  227. package/dist/types/components/HysTabs/tabsConfig.d.ts +4 -0
  228. package/dist/types/components/HysTabs/tabsItems.d.ts +14 -0
  229. package/dist/types/components/HysTabs/tabsPersistence.d.ts +6 -0
  230. package/dist/types/components/HysTabs/tabsTypes.d.ts +236 -0
  231. package/dist/types/components/HysTabs/useHysRouteTabs.d.ts +22 -0
  232. package/dist/types/components/HysTabs/useTabsDragGhost.d.ts +22 -0
  233. package/dist/types/components/HysTabs/useTabsNav.d.ts +20 -0
  234. package/dist/types/components/HysTabs/useTabsOverlays.d.ts +54 -0
  235. package/dist/types/components/HysTabs/useTabsPanels.d.ts +14 -0
  236. package/dist/types/components/HysTabs/useTabsPointer.d.ts +30 -0
  237. package/dist/types/components/HysTabs/useTabsState.d.ts +32 -0
  238. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +2 -2
  239. package/dist/types/components/HysToast/toastPresentation.d.ts +1 -1
  240. package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +2 -2
  241. package/dist/types/composables/dataGrid.d.ts +34 -0
  242. package/dist/types/composables/datePicker.d.ts +14 -214
  243. package/dist/types/composables/datePickerModel.d.ts +63 -0
  244. package/dist/types/composables/datePickerPanels.d.ts +23 -0
  245. package/dist/types/composables/datePickerRules.d.ts +31 -0
  246. package/dist/types/composables/datePickerTypes.d.ts +277 -0
  247. package/dist/types/composables/floatingPosition.d.ts +1 -1
  248. package/dist/types/composables/formLayout.d.ts +1 -2
  249. package/dist/types/composables/popupSurfaceStyle.d.ts +7 -0
  250. package/dist/types/composables/table.d.ts +10 -1
  251. package/dist/types/composables/toastQueue.d.ts +4 -4
  252. package/dist/types/composables/toastQueueModel.d.ts +2 -2
  253. package/dist/types/composables/useColorPicker.d.ts +2 -4
  254. package/dist/types/composables/useContainerWidth.d.ts +2 -0
  255. package/dist/types/composables/useContextMenu.d.ts +2 -4
  256. package/dist/types/composables/useDatePicker.d.ts +20 -11
  257. package/dist/types/composables/useFloating.d.ts +4 -5
  258. package/dist/types/composables/usePageVisibility.d.ts +1 -0
  259. package/dist/types/composables/usePopupSurface.d.ts +9 -3
  260. package/dist/types/composables/usePopupSurfaceInteractions.d.ts +4 -2
  261. package/dist/types/composables/useSplitPaneDrag.d.ts +2 -2
  262. package/dist/types/composables/useSvgInstanceId.d.ts +1 -0
  263. package/dist/types/composables/useTable.d.ts +2 -0
  264. package/dist/types/composables/useTabularRowNavigation.d.ts +18 -0
  265. package/dist/types/index.d.ts +31 -3
  266. package/dist/types/internal/MultiSplitPane.vue.d.ts +10 -1
  267. package/dist/types/internal/PopupSurfacePanel.vue.d.ts +3 -0
  268. package/package.json +1 -1
@@ -0,0 +1,166 @@
1
+ import { calendarISO as L } from "./calendar.js";
2
+ import { datePeriod as _, dateShift as P, dateWeek as B, dateNative as G, DATE_MIN as J, DATE_MAX as K } from "./datePicker.js";
3
+ function p({
4
+ props: l,
5
+ range: D,
6
+ multiple: Q,
7
+ time: U,
8
+ unit: i,
9
+ first: k,
10
+ weekContains: N,
11
+ selected: Y,
12
+ draft: c,
13
+ stage: Z,
14
+ minPoint: h,
15
+ maxPoint: x
16
+ }) {
17
+ function E(e, d, s = c.value[0]) {
18
+ return {
19
+ range: d ? "end" : "start",
20
+ from: D.value && s ? G(s) : null,
21
+ iso: L(e)
22
+ };
23
+ }
24
+ function V(e) {
25
+ return Array.isArray(l.disabled) && !!l.disabled[e];
26
+ }
27
+ function M(e, d = 0, s = !0, u = c.value[0]) {
28
+ var a;
29
+ if (!Number.isFinite(e) || e < J || e > K || h.value && e < h.value.day || x.value && e > x.value.day || (a = l.disabledDate) != null && a.call(
30
+ l,
31
+ new Date(e * 864e5),
32
+ E(e, d, u)
33
+ ))
34
+ return !1;
35
+ if (D.value && s && d === 1 && c.value[0]) {
36
+ const t = i.value === "week" ? Math.abs(
37
+ _(e, "week", k.value)[0] - _(c.value[0].day, "week", k.value)[0]
38
+ ) + 7 : Math.abs(e - c.value[0].day) + 1;
39
+ if (l.minRangeDays && t < l.minRangeDays || l.maxRangeDays && t > l.maxRangeDays)
40
+ return !1;
41
+ }
42
+ return !0;
43
+ }
44
+ function W(e, d, s = Z.value === "end" ? 1 : 0, u = !0, a = c.value[0]) {
45
+ var n, b, r;
46
+ if (i.value === "week" && d - e <= 6) {
47
+ if ((n = l.disabledWeek) != null && n.call(l, B(e, k.value, N.value)))
48
+ return !1;
49
+ if (l.weekValidation === "full") {
50
+ if (d - e !== 6) return !1;
51
+ for (let m = e; m <= d; m++)
52
+ if (!M(m, s, u, a)) return !1;
53
+ return !0;
54
+ }
55
+ }
56
+ const t = Math.max(e, ((b = h.value) == null ? void 0 : b.day) ?? J), y = Math.min(d, ((r = x.value) == null ? void 0 : r.day) ?? K);
57
+ for (let m = t; m <= y; m++)
58
+ if (M(m, s, u, a)) return !0;
59
+ return !1;
60
+ }
61
+ function I(e, d, s = c.value[0]) {
62
+ var R, A, j, q, z;
63
+ const u = E(e.day, d, s), a = (R = l.disabledTime) == null ? void 0 : R.call(l, G(e), u), t = (A = l.disabledHours) == null ? void 0 : A.call(l, u.range, u.from), y = (j = a == null ? void 0 : a.disabledHours) == null ? void 0 : j.call(a), n = ((q = h.value) == null ? void 0 : q.day) === e.day ? h.value.second : 0, b = ((z = x.value) == null ? void 0 : z.day) === e.day ? F() : 86399;
64
+ function r(v, f) {
65
+ return v + f - 1 < n || v > b;
66
+ }
67
+ const m = Array.from({ length: 24 }, (v, f) => f).filter(
68
+ (v) => r(v * 3600, 3600)
69
+ ), w = Array.from({ length: 60 }, (v, f) => f);
70
+ return {
71
+ hours: [
72
+ ...m,
73
+ ...(a == null ? void 0 : a.hours) ?? [],
74
+ ...y ?? [],
75
+ ...t ?? []
76
+ ],
77
+ minutes: (v) => {
78
+ var f, S, T;
79
+ return [
80
+ ...w.filter(
81
+ (H) => r(v * 3600 + H * 60, 60)
82
+ ),
83
+ ...((f = a == null ? void 0 : a.minutes) == null ? void 0 : f.call(a, v)) ?? [],
84
+ ...((S = a == null ? void 0 : a.disabledMinutes) == null ? void 0 : S.call(a, v)) ?? [],
85
+ ...((T = l.disabledMinutes) == null ? void 0 : T.call(l, v, u.range, u.from)) ?? []
86
+ ];
87
+ },
88
+ seconds: (v, f) => {
89
+ var S, T, H;
90
+ return [
91
+ ...w.filter(
92
+ (C) => r(v * 3600 + f * 60 + C, 1)
93
+ ),
94
+ ...((S = a == null ? void 0 : a.seconds) == null ? void 0 : S.call(a, v, f)) ?? [],
95
+ ...((T = a == null ? void 0 : a.disabledSeconds) == null ? void 0 : T.call(a, v, f)) ?? [],
96
+ ...((H = l.disabledSeconds) == null ? void 0 : H.call(l, v, f, u.range, u.from)) ?? []
97
+ ];
98
+ }
99
+ };
100
+ }
101
+ function F() {
102
+ var e;
103
+ return typeof l.max == "string" && !/[T :]/.test(l.max) ? 86399 : ((e = x.value) == null ? void 0 : e.second) ?? 0;
104
+ }
105
+ function O(e, d, s = c.value[0]) {
106
+ var w, R, A;
107
+ const u = I(e, d, s), a = Math.floor(e.second / 3600), t = Math.floor(e.second / 60) % 60, y = e.second % 60;
108
+ if ((w = u.hours) != null && w.includes(a) || (R = u.minutes) != null && R.call(u, a).includes(t) || (A = u.seconds) != null && A.call(u, a, t).includes(y))
109
+ return !1;
110
+ const n = e.day * 86400 + e.second, b = h.value, r = x.value, m = F();
111
+ return !(b && n < b.day * 86400 + b.second || r && n > r.day * 86400 + m);
112
+ }
113
+ function $(e, d = !0) {
114
+ var s;
115
+ if (D.value) {
116
+ if (e.length !== 2 || e.some((t, y) => {
117
+ var n;
118
+ return !t && !((n = l.allowEmpty) != null && n[y]);
119
+ })) return !1;
120
+ const [u, a] = e;
121
+ if (u && a && u.day * 86400 + u.second > a.day * 86400 + a.second)
122
+ return !1;
123
+ if (u && a) {
124
+ const t = i.value === "week" ? _(a.day, "week", k.value)[1] : a.day, y = t - u.day + 1;
125
+ if (l.minRangeDays && y < l.minRangeDays || l.maxRangeDays && y > l.maxRangeDays)
126
+ return !1;
127
+ if (l.rangeValidation === "continuous") {
128
+ if (a.day > P(u.day, 1200)) return !1;
129
+ for (let n = u.day; n <= t; n++)
130
+ if (!M(n, n === u.day ? 0 : 1, !1, u) || i.value === "week" && (n - u.day) % 7 === 0 && ((s = l.disabledWeek) != null && s.call(
131
+ l,
132
+ B(n, k.value, N.value)
133
+ )))
134
+ return !1;
135
+ }
136
+ }
137
+ if (d && e.some((t, y) => V(y) && !X(t, Y.value[y])))
138
+ return !1;
139
+ } else if (!e.length || !Q.value && e.length !== 1 || l.maxDates && e.length > l.maxDates)
140
+ return !1;
141
+ return e.every(
142
+ (u, a) => !u || (i.value === "date" ? M(u.day, D.value ? a : 0, !1, e[0] ?? null) : W(
143
+ ..._(u.day, i.value, k.value),
144
+ D.value ? a : 0,
145
+ !1,
146
+ e[0] ?? null
147
+ )) && (!U.value || O(u, D.value ? a : 0, e[0] ?? null))
148
+ );
149
+ }
150
+ function X(e, d) {
151
+ return !e && !d || !!e && !!d && e.day === d.day && e.second === d.second;
152
+ }
153
+ return {
154
+ context: E,
155
+ locked: V,
156
+ available: M,
157
+ periodAvailable: W,
158
+ timeDisabled: I,
159
+ validTime: O,
160
+ valid: $,
161
+ samePoint: X
162
+ };
163
+ }
164
+ export {
165
+ p as useDatePickerRules
166
+ };
@@ -1,18 +1,37 @@
1
- function B(t, x, u, y, o, e, F) {
2
- const { width: f, height: n } = u, m = Math.min(x.width, Math.max(0, f - 2 * e)), s = Math.min(x.height, Math.max(0, n - 2 * e)), [j, l] = y.split("-"), b = {
3
- top: t.top - o,
4
- bottom: n - t.bottom - o,
5
- left: t.left - o,
6
- right: f - t.right - o
7
- }, k = { top: "bottom", bottom: "top", left: "right", right: "left" }, i = j, M = i === "top" || i === "bottom", c = k[i], h = F && b[i] < (M ? s : m) && b[c] > b[i] ? c : i, v = (p, r, w) => l === "start" ? p : l === "end" ? r - w : (p + r - w) / 2, q = M ? v(t.left, t.right, m) : h === "left" ? t.left - m - o : t.right + o, A = M ? h === "top" ? t.top - s - o : t.bottom + o : v(t.top, t.bottom, s);
1
+ function N(t, w, G, u, e, o, c, x) {
2
+ const { width: f, height: h } = G, s = Math.min(w.width, Math.max(0, f - 2 * o)), m = Math.min(w.height, Math.max(0, h - 2 * o)), [H, y] = u.split("-"), v = {
3
+ top: t.top - e,
4
+ bottom: h - t.bottom - e,
5
+ left: t.left - e,
6
+ right: f - t.right - e
7
+ }, I = {
8
+ top: "bottom",
9
+ bottom: "top",
10
+ left: "right",
11
+ right: "left"
12
+ }, l = H, J = l === "top" || l === "bottom", F = I[l], j = c && v[l] < (J ? m : s) && v[F] > v[l] ? F : l;
13
+ function p(r) {
14
+ const [i, q] = r.split("-"), A = i === "top" || i === "bottom", B = (C, D, E) => q === "start" ? C : q === "end" ? D - E : (C + D - E) / 2, M = A ? B(t.left, t.right, s) : i === "left" ? t.left - s - e : t.right + e, b = A ? i === "top" ? t.top - m - e : t.bottom + e : B(t.top, t.bottom, m), L = Math.max(0, o - M, M + s + o - f) + Math.max(0, o - b, b + m + o - h);
15
+ return { x: M, y: b, overflow: L, placement: r };
16
+ }
17
+ const K = y ? j + "-" + y : j;
18
+ let n = p(
19
+ c && x ? u : K
20
+ );
21
+ if (c && x)
22
+ for (const r of x) {
23
+ if (!n.overflow) break;
24
+ const i = p(r);
25
+ i.overflow < n.overflow && (n = i);
26
+ }
8
27
  return {
9
- width: m,
10
- height: s,
11
- x: Math.max(e, Math.min(q, f - m - e)),
12
- y: Math.max(e, Math.min(A, n - s - e)),
13
- placement: l ? h + "-" + l : h
28
+ width: s,
29
+ height: m,
30
+ x: Math.max(o, Math.min(n.x, f - s - o)),
31
+ y: Math.max(o, Math.min(n.y, h - m - o)),
32
+ placement: n.placement
14
33
  };
15
34
  }
16
35
  export {
17
- B as positionFloating
36
+ N as positionFloating
18
37
  };
@@ -1,5 +1,4 @@
1
- import { ref as d, watch as a, onMounted as u, onActivated as c, onDeactivated as m, onBeforeUnmount as p, computed as h } from "vue";
2
- const s = [
1
+ const e = [
3
2
  ["xs", 0],
4
3
  ["sm", 576],
5
4
  ["md", 768],
@@ -7,51 +6,30 @@ const s = [
7
6
  ["xl", 1200],
8
7
  ["xxl", 1600]
9
8
  ];
10
- function v(t, r, e = 1) {
11
- let o = typeof t == "number" ? t : e;
12
- if (t && typeof t == "object")
13
- for (const [n, i] of s)
14
- r >= i && t[n] !== void 0 && (o = t[n]);
15
- return Math.max(1, Math.min(24, Math.floor(Number(o) || e)));
9
+ function m(o, s, t = 1) {
10
+ let n = typeof o == "number" ? o : t;
11
+ if (o && typeof o == "object")
12
+ for (const [r, f] of e)
13
+ s >= f && o[r] !== void 0 && (n = o[r]);
14
+ return Math.max(1, Math.min(24, Math.floor(Number(n) || t)));
16
15
  }
17
- function l(t, r) {
18
- if (!t) return;
19
- let e = { span: t.span, offset: t.offset };
20
- for (const [o, n] of s)
21
- if (r >= n && t[o] !== void 0) {
22
- const i = t[o];
23
- e = {
24
- ...e,
25
- ...typeof i == "number" ? { span: i } : i
16
+ function i(o, s) {
17
+ if (!o) return;
18
+ let t = { span: o.span, offset: o.offset };
19
+ for (const [n, r] of e)
20
+ if (s >= r && o[n] !== void 0) {
21
+ const f = o[n];
22
+ t = {
23
+ ...t,
24
+ ...typeof f == "number" ? { span: f } : f
26
25
  };
27
26
  }
28
27
  return {
29
- span: Math.max(0, Math.min(24, Math.floor(e.span ?? 24))),
30
- offset: Math.max(0, Math.min(23, Math.floor(e.offset ?? 0)))
28
+ span: Math.max(0, Math.min(24, Math.floor(t.span ?? 24))),
29
+ offset: Math.max(0, Math.min(23, Math.floor(t.offset ?? 0)))
31
30
  };
32
31
  }
33
- function M(t) {
34
- const r = d(0);
35
- let e, o = !0;
36
- const n = () => {
37
- t.value && (r.value = t.value.clientWidth || t.value.getBoundingClientRect().width);
38
- };
39
- function i() {
40
- f(), !(!o || !t.value) && (n(), typeof ResizeObserver < "u" ? (e = new ResizeObserver(n), e.observe(t.value)) : typeof window < "u" && window.addEventListener("resize", n));
41
- }
42
- function f() {
43
- e == null || e.disconnect(), e = void 0, typeof window < "u" && window.removeEventListener("resize", n);
44
- }
45
- return a(t, i), u(i), c(() => {
46
- o = !0, i();
47
- }), m(() => {
48
- o = !1, f();
49
- }), p(() => {
50
- o = !1, f();
51
- }), h(() => r.value);
52
- }
53
32
  export {
54
- l as resolveFormCol,
55
- v as resolveFormGrid,
56
- M as useFormWidth
33
+ i as resolveFormCol,
34
+ m as resolveFormGrid
57
35
  };
@@ -0,0 +1,30 @@
1
+ import { computed as o } from "vue";
2
+ function r(t) {
3
+ return typeof t != "number" ? t : Number.isFinite(t) ? Math.max(0, t) + "px" : void 0;
4
+ }
5
+ function c(t, e) {
6
+ return r(t.maxWidth) ?? (e === "tooltip" ? "320px" : "360px");
7
+ }
8
+ function m(t, e, u) {
9
+ const h = o(() => {
10
+ const i = (t.effect ?? (e === "tooltip" ? "dark" : "light")) === "dark";
11
+ return {
12
+ ...t.overlayStyle,
13
+ ...u.value,
14
+ "--hys-ui-popup-surface": t.color || (i ? "#172744" : "var(--hys-ui-surface,var(--hys-ui-theme-surface))"),
15
+ "--hys-ui-popup-color": t.textColor || (i ? "#fff" : "var(--hys-ui-text,var(--hys-ui-theme-text))"),
16
+ "--hys-ui-popup-border": t.color || (i ? "#172744" : "var(--hys-ui-border,var(--hys-ui-theme-border))"),
17
+ overflow: "visible",
18
+ maxWidth: `min(${c(t, e)},calc(100vw - 20px))`,
19
+ minWidth: t.width !== void 0 ? "0" : void 0
20
+ };
21
+ }), a = o(() => ({
22
+ ...t.contentStyle,
23
+ maxHeight: t.maxHeight !== void 0 ? `min(${r(t.maxHeight)},calc(100vh - 20px))` : "calc(100vh - 20px)"
24
+ }));
25
+ return { style: h, contentStyle: a };
26
+ }
27
+ export {
28
+ c as popupMaximumWidth,
29
+ m as usePopupSurfaceStyle
30
+ };
@@ -0,0 +1,24 @@
1
+ import { ref as r, watch as f, onMounted as a, onActivated as s, onDeactivated as v, onBeforeUnmount as c, computed as w } from "vue";
2
+ function p(e) {
3
+ const u = r(0);
4
+ let t, i = !0;
5
+ const n = () => {
6
+ e.value && (u.value = e.value.clientWidth || e.value.getBoundingClientRect().width);
7
+ };
8
+ function o() {
9
+ t == null || t.disconnect(), t = void 0, typeof window < "u" && window.removeEventListener("resize", n);
10
+ }
11
+ function d() {
12
+ o(), !(!i || !e.value) && (n(), typeof ResizeObserver < "u" ? (t = new ResizeObserver(n), t.observe(e.value)) : typeof window < "u" && window.addEventListener("resize", n));
13
+ }
14
+ return f(e, d), a(d), s(() => {
15
+ i = !0, d();
16
+ }), v(() => {
17
+ i = !1, o();
18
+ }), c(() => {
19
+ i = !1, o();
20
+ }), w(() => u.value);
21
+ }
22
+ export {
23
+ p as useContainerWidth
24
+ };