@farris/ui-vue 1.7.0-beta.4 → 1.7.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 (563) hide show
  1. package/components/accordion/index.esm.js +61 -312
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +56 -1481
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +8 -752
  6. package/components/binding-selector/index.umd.cjs +1 -1
  7. package/components/button-edit/index.esm.js +358 -351
  8. package/components/button-edit/index.umd.cjs +1 -1
  9. package/components/button-group/index.esm.js +110 -266
  10. package/components/button-group/index.umd.cjs +1 -1
  11. package/components/calendar/index.esm.js +1371 -1284
  12. package/components/calendar/index.umd.cjs +30 -30
  13. package/components/code-editor/index.esm.js +169 -237
  14. package/components/code-editor/index.umd.cjs +3 -3
  15. package/components/collection-property-editor/index.esm.js +382 -351
  16. package/components/collection-property-editor/index.umd.cjs +2 -2
  17. package/components/color-picker/index.esm.js +502 -812
  18. package/components/color-picker/index.umd.cjs +1 -1
  19. package/components/combo-list/index.esm.js +197 -183
  20. package/components/combo-list/index.umd.cjs +1 -1
  21. package/components/combo-tree/index.esm.js +199 -364
  22. package/components/combo-tree/index.umd.cjs +1 -1
  23. package/components/comment/index.esm.js +1501 -1465
  24. package/components/comment/index.umd.cjs +6 -6
  25. package/components/common/index.esm.js +136 -100
  26. package/components/common/index.umd.cjs +1 -1
  27. package/components/component/index.css +1 -1
  28. package/components/component/index.esm.js +2662 -3647
  29. package/components/component/index.umd.cjs +1 -8
  30. package/components/condition/index.esm.js +492 -2449
  31. package/components/condition/index.umd.cjs +1 -8
  32. package/components/content-container/index.esm.js +252 -241
  33. package/components/content-container/index.umd.cjs +1 -1
  34. package/components/data-grid/index.esm.js +505 -409
  35. package/components/data-grid/index.umd.cjs +1 -1
  36. package/components/data-view/index.esm.js +3326 -3258
  37. package/components/data-view/index.umd.cjs +1 -1
  38. package/components/date-picker/index.esm.js +1709 -1634
  39. package/components/date-picker/index.umd.cjs +1 -1
  40. package/components/designer-canvas/index.css +1 -1
  41. package/components/designer-canvas/index.esm.js +2693 -3021
  42. package/components/designer-canvas/index.umd.cjs +1 -1
  43. package/components/designer-outline/index.esm.js +102 -98
  44. package/components/designer-outline/index.umd.cjs +1 -1
  45. package/components/drawer/index.esm.js +409 -358
  46. package/components/drawer/index.umd.cjs +2 -2
  47. package/components/dropdown/index.esm.js +124 -373
  48. package/components/dropdown/index.umd.cjs +2 -2
  49. package/components/dynamic-form/index.esm.js +760 -573
  50. package/components/dynamic-form/index.umd.cjs +1 -1
  51. package/components/dynamic-resolver/index.esm.js +354 -327
  52. package/components/dynamic-resolver/index.umd.cjs +2 -2
  53. package/components/dynamic-view/index.esm.js +413 -359
  54. package/components/dynamic-view/index.umd.cjs +1 -1
  55. package/components/event-parameter/index.esm.js +1 -1
  56. package/components/event-parameter/index.umd.cjs +1 -1
  57. package/components/events-editor/index.css +1 -1
  58. package/components/events-editor/index.esm.js +1535 -1941
  59. package/components/events-editor/index.umd.cjs +3 -3
  60. package/components/expression-editor/index.css +1 -1
  61. package/components/expression-editor/index.esm.js +2 -7317
  62. package/components/expression-editor/index.umd.cjs +1 -427
  63. package/components/field-selector/index.esm.js +13 -13
  64. package/components/field-selector/index.umd.cjs +1 -1
  65. package/components/fieldset/index.esm.js +140 -123
  66. package/components/fieldset/index.umd.cjs +1 -1
  67. package/components/filter-bar/index.esm.js +1021 -1012
  68. package/components/filter-bar/index.umd.cjs +2 -2
  69. package/components/filter-condition-editor/index.css +1 -1
  70. package/components/filter-condition-editor/index.esm.js +448 -9000
  71. package/components/filter-condition-editor/index.umd.cjs +1 -427
  72. package/components/html-template/index.esm.js +167 -147
  73. package/components/html-template/index.umd.cjs +1 -1
  74. package/components/image/index.esm.js +372 -352
  75. package/components/image/index.umd.cjs +2 -2
  76. package/components/image-cropper/index.esm.js +361 -615
  77. package/components/image-cropper/index.umd.cjs +1 -1
  78. package/components/json-editor/index.esm.js +247 -325
  79. package/components/json-editor/index.umd.cjs +1 -1
  80. package/components/language-textbox/index.esm.js +835 -421
  81. package/components/language-textbox/index.umd.cjs +2 -2
  82. package/components/layout/index.esm.js +163 -549
  83. package/components/layout/index.umd.cjs +1 -1
  84. package/components/list-nav/index.esm.js +39 -836
  85. package/components/list-nav/index.umd.cjs +1 -1
  86. package/components/list-view/index.esm.js +690 -474
  87. package/components/list-view/index.umd.cjs +6 -8
  88. package/components/loading/index.esm.js +128 -97
  89. package/components/loading/index.umd.cjs +2 -2
  90. package/components/locale/index.esm.js +361 -340
  91. package/components/locale/index.umd.cjs +5 -5
  92. package/components/lookup/index.css +1 -1
  93. package/components/lookup/index.esm.js +3396 -3368
  94. package/components/lookup/index.umd.cjs +1 -1
  95. package/components/mapping-editor/index.css +1 -1
  96. package/components/mapping-editor/index.esm.js +1684 -1584
  97. package/components/mapping-editor/index.umd.cjs +1 -1
  98. package/components/menu-lookup/index.esm.js +586 -609
  99. package/components/menu-lookup/index.umd.cjs +6 -6
  100. package/components/message-box/index.css +1 -1
  101. package/components/message-box/index.esm.js +357 -353
  102. package/components/message-box/index.umd.cjs +1 -1
  103. package/components/modal/index.esm.js +325 -318
  104. package/components/modal/index.umd.cjs +1 -1
  105. package/components/nav/index.esm.js +31 -311
  106. package/components/nav/index.umd.cjs +1 -1
  107. package/components/number-range/index.esm.js +189 -1633
  108. package/components/number-range/index.umd.cjs +1 -1
  109. package/components/number-spinner/index.esm.js +195 -175
  110. package/components/number-spinner/index.umd.cjs +1 -1
  111. package/components/order/index.esm.js +761 -1057
  112. package/components/order/index.umd.cjs +7 -9
  113. package/components/page-footer/index.esm.js +48 -331
  114. package/components/page-footer/index.umd.cjs +1 -1
  115. package/components/page-header/index.esm.js +92 -73
  116. package/components/page-header/index.umd.cjs +1 -1
  117. package/components/pagination/index.esm.js +195 -472
  118. package/components/pagination/index.umd.cjs +1 -1
  119. package/components/popover/index.esm.js +77 -76
  120. package/components/popover/index.umd.cjs +1 -1
  121. package/components/progress/index.esm.js +148 -353
  122. package/components/progress/index.umd.cjs +3 -3
  123. package/components/property-editor/index.esm.js +74 -68
  124. package/components/property-editor/index.umd.cjs +1 -1
  125. package/components/property-panel/index.esm.js +872 -1800
  126. package/components/property-panel/index.umd.cjs +5 -12
  127. package/components/query-solution/index.css +1 -1
  128. package/components/query-solution/index.esm.js +4223 -6205
  129. package/components/query-solution/index.umd.cjs +6 -13
  130. package/components/response-layout/index.esm.js +206 -170
  131. package/components/response-layout/index.umd.cjs +1 -1
  132. package/components/response-layout-editor/index.esm.js +1 -1
  133. package/components/response-layout-editor/index.umd.cjs +1 -1
  134. package/components/response-toolbar/index.esm.js +378 -359
  135. package/components/response-toolbar/index.umd.cjs +1 -1
  136. package/components/schema-selector/index.esm.js +2491 -2653
  137. package/components/schema-selector/index.umd.cjs +8 -10
  138. package/components/search-box/index.esm.js +79 -240
  139. package/components/search-box/index.umd.cjs +1 -1
  140. package/components/section/index.esm.js +304 -289
  141. package/components/section/index.umd.cjs +2 -2
  142. package/components/smoke-detector/index.esm.js +8 -179
  143. package/components/smoke-detector/index.umd.cjs +1 -1
  144. package/components/sort-condition-editor/index.esm.js +4 -9421
  145. package/components/sort-condition-editor/index.umd.cjs +1 -427
  146. package/components/splitter/index.esm.js +142 -1171
  147. package/components/splitter/index.umd.cjs +1 -1
  148. package/components/step/index.esm.js +48 -47
  149. package/components/step/index.umd.cjs +1 -1
  150. package/components/tabs/index.esm.js +460 -513
  151. package/components/tabs/index.umd.cjs +1 -1
  152. package/components/text/index.esm.js +73 -217
  153. package/components/text/index.umd.cjs +1 -1
  154. package/components/time-picker/index.esm.js +380 -375
  155. package/components/time-picker/index.umd.cjs +1 -1
  156. package/components/tooltip/index.esm.js +40 -40
  157. package/components/tooltip/index.umd.cjs +1 -1
  158. package/components/transfer/index.esm.js +551 -771
  159. package/components/transfer/index.umd.cjs +6 -8
  160. package/components/tree-grid/index.esm.js +250 -235
  161. package/components/tree-grid/index.umd.cjs +1 -1
  162. package/components/tree-view/index.esm.js +157 -314
  163. package/components/tree-view/index.umd.cjs +1 -1
  164. package/components/uploader/index.esm.js +634 -1125
  165. package/components/uploader/index.umd.cjs +2 -2
  166. package/components/verify-detail/index.esm.js +106 -359
  167. package/components/verify-detail/index.umd.cjs +1 -1
  168. package/components/video/index.esm.js +89 -222
  169. package/components/video/index.umd.cjs +1 -1
  170. package/components/weather/index.esm.js +199 -290
  171. package/components/weather/index.umd.cjs +1 -1
  172. package/designer/accordion/index.esm.js +257 -0
  173. package/designer/accordion/index.umd.cjs +1 -0
  174. package/designer/avatar/index.esm.js +227 -0
  175. package/designer/avatar/index.umd.cjs +1 -0
  176. package/designer/binding-selector/index.esm.js +792 -0
  177. package/designer/binding-selector/index.umd.cjs +1 -0
  178. package/designer/button-edit/index.esm.js +210 -203
  179. package/designer/button-edit/index.umd.cjs +1 -1
  180. package/designer/button-group/index.esm.js +282 -0
  181. package/designer/button-group/index.umd.cjs +1 -0
  182. package/designer/checkbox/index.esm.js +51 -45
  183. package/designer/checkbox/index.umd.cjs +1 -1
  184. package/designer/checkbox-group/index.esm.js +89 -83
  185. package/designer/checkbox-group/index.umd.cjs +1 -1
  186. package/designer/code-editor/index.esm.js +75 -0
  187. package/designer/code-editor/index.umd.cjs +1 -0
  188. package/designer/color-picker/index.esm.js +1096 -0
  189. package/designer/color-picker/index.umd.cjs +1 -0
  190. package/designer/combo-list/index.esm.js +1095 -0
  191. package/designer/combo-list/index.umd.cjs +1 -0
  192. package/designer/combo-tree/index.esm.js +186 -0
  193. package/designer/combo-tree/index.umd.cjs +1 -0
  194. package/designer/component/index.css +1 -0
  195. package/designer/component/index.esm.js +5002 -0
  196. package/designer/component/index.umd.cjs +1 -0
  197. package/designer/condition/index.esm.js +1899 -0
  198. package/designer/condition/index.umd.cjs +1 -0
  199. package/designer/data-grid/index.esm.js +5580 -6213
  200. package/designer/data-grid/index.umd.cjs +10 -17
  201. package/designer/data-view/index.esm.js +212 -191
  202. package/designer/data-view/index.umd.cjs +2 -2
  203. package/designer/date-picker/index.esm.js +621 -607
  204. package/designer/date-picker/index.umd.cjs +1 -1
  205. package/designer/drawer/index.css +1 -1
  206. package/designer/drawer/index.esm.js +869 -620
  207. package/designer/drawer/index.umd.cjs +2 -2
  208. package/designer/dropdown/index.esm.js +261 -0
  209. package/designer/dropdown/index.umd.cjs +1 -0
  210. package/designer/dynamic-form/index.esm.js +1166 -1384
  211. package/designer/dynamic-form/index.umd.cjs +1 -8
  212. package/designer/expression-editor/index.css +1 -0
  213. package/designer/expression-editor/index.esm.js +7006 -0
  214. package/designer/expression-editor/index.umd.cjs +427 -0
  215. package/designer/farris-designer.all.esm.js +10309 -10617
  216. package/designer/farris-designer.all.umd.cjs +17 -19
  217. package/designer/filter-condition-editor/index.css +1 -0
  218. package/designer/filter-condition-editor/index.esm.js +4795 -0
  219. package/designer/filter-condition-editor/index.umd.cjs +1 -0
  220. package/designer/html-template/index.esm.js +718 -0
  221. package/designer/html-template/index.umd.cjs +1 -0
  222. package/designer/image-cropper/index.esm.js +765 -0
  223. package/designer/image-cropper/index.umd.cjs +1 -0
  224. package/designer/index.css +1 -1
  225. package/designer/input-group/index.esm.js +72 -66
  226. package/designer/input-group/index.umd.cjs +1 -1
  227. package/designer/json-editor/index.esm.js +83 -0
  228. package/designer/json-editor/index.umd.cjs +1 -0
  229. package/designer/language-textbox/index.esm.js +783 -0
  230. package/designer/language-textbox/index.umd.cjs +8 -0
  231. package/designer/layout/index.esm.js +430 -0
  232. package/designer/layout/index.umd.cjs +1 -0
  233. package/designer/list-nav/index.esm.js +802 -0
  234. package/designer/list-nav/index.umd.cjs +1 -0
  235. package/designer/list-view/index.esm.js +864 -844
  236. package/designer/list-view/index.umd.cjs +7 -9
  237. package/designer/lookup/index.esm.js +2083 -0
  238. package/designer/lookup/index.umd.cjs +1 -0
  239. package/designer/menu-lookup/index.esm.js +46 -0
  240. package/designer/menu-lookup/index.umd.cjs +1 -0
  241. package/designer/modal/index.esm.js +137 -29
  242. package/designer/modal/index.umd.cjs +1 -1
  243. package/designer/nav/index.esm.js +284 -0
  244. package/designer/nav/index.umd.cjs +1 -0
  245. package/designer/number-range/index.esm.js +1616 -0
  246. package/designer/number-range/index.umd.cjs +1 -0
  247. package/designer/number-spinner/index.esm.js +19 -17
  248. package/designer/number-spinner/index.umd.cjs +1 -1
  249. package/designer/order/index.css +1 -0
  250. package/designer/order/index.esm.js +2196 -0
  251. package/designer/order/index.umd.cjs +18 -0
  252. package/designer/page-footer/index.esm.js +290 -0
  253. package/designer/page-footer/index.umd.cjs +1 -0
  254. package/designer/page-header/index.esm.js +1003 -0
  255. package/designer/page-header/index.umd.cjs +1 -0
  256. package/designer/pagination/index.esm.js +591 -0
  257. package/designer/pagination/index.umd.cjs +1 -0
  258. package/designer/progress/index.esm.js +213 -0
  259. package/designer/progress/index.umd.cjs +1 -0
  260. package/designer/radio-group/index.esm.js +978 -949
  261. package/designer/radio-group/index.umd.cjs +1 -1
  262. package/designer/response-layout-editor/index.esm.js +1 -1
  263. package/designer/response-layout-editor/index.umd.cjs +1 -1
  264. package/designer/response-toolbar/index.esm.js +1471 -1416
  265. package/designer/response-toolbar/index.umd.cjs +1 -1
  266. package/designer/search-box/index.esm.js +245 -0
  267. package/designer/search-box/index.umd.cjs +1 -0
  268. package/designer/section/index.esm.js +83 -78
  269. package/designer/section/index.umd.cjs +1 -1
  270. package/designer/smoke-detector/index.css +1 -0
  271. package/designer/smoke-detector/index.esm.js +178 -0
  272. package/designer/smoke-detector/index.umd.cjs +1 -0
  273. package/designer/sort-condition-editor/index.esm.js +138 -0
  274. package/designer/sort-condition-editor/index.umd.cjs +1 -0
  275. package/designer/splitter/index.esm.js +1120 -0
  276. package/designer/splitter/index.umd.cjs +1 -0
  277. package/designer/step/index.esm.js +226 -0
  278. package/designer/step/index.umd.cjs +1 -0
  279. package/designer/switch/index.esm.js +10 -10
  280. package/designer/switch/index.umd.cjs +1 -1
  281. package/designer/tabs/index.css +1 -1
  282. package/designer/tabs/index.esm.js +2447 -2698
  283. package/designer/tabs/index.umd.cjs +2 -2
  284. package/designer/text/index.esm.js +147 -0
  285. package/designer/text/index.umd.cjs +1 -0
  286. package/designer/time-picker/index.esm.js +101 -100
  287. package/designer/time-picker/index.umd.cjs +1 -1
  288. package/designer/transfer/index.esm.js +254 -0
  289. package/designer/transfer/index.umd.cjs +1 -0
  290. package/designer/tree-grid/index.esm.js +473 -810
  291. package/designer/tree-grid/index.umd.cjs +1 -1
  292. package/designer/tree-view/index.esm.js +313 -0
  293. package/designer/tree-view/index.umd.cjs +1 -0
  294. package/designer/uploader/index.esm.js +1190 -0
  295. package/designer/uploader/index.umd.cjs +2 -0
  296. package/designer/verify-detail/index.esm.js +258 -0
  297. package/designer/verify-detail/index.umd.cjs +1 -0
  298. package/designer/video/index.esm.js +136 -0
  299. package/designer/video/index.umd.cjs +1 -0
  300. package/designer/weather/index.css +1 -0
  301. package/designer/weather/index.esm.js +6244 -0
  302. package/designer/weather/index.umd.cjs +14 -0
  303. package/farris.all.esm.js +69941 -70514
  304. package/farris.all.umd.cjs +117 -117
  305. package/index.css +1 -1
  306. package/locales/filter-bar/ui/en.json +2 -1
  307. package/locales/filter-bar/ui/zh-CHS.json +2 -1
  308. package/locales/filter-bar/ui/zh-CHT.json +2 -1
  309. package/locales/query-solution/ui/en.json +1 -1
  310. package/locales/query-solution/ui/zh-CHS.json +1 -1
  311. package/locales/query-solution/ui/zh-CHT.json +1 -1
  312. package/locales/ui/en.json +3 -2
  313. package/locales/ui/zh-CHS.json +3 -2
  314. package/locales/ui/zh-CHT.json +3 -2
  315. package/package.json +1 -1
  316. package/types/accordion/designer.d.ts +44 -0
  317. package/types/accordion/src/accordion.props.d.ts +0 -1
  318. package/types/accordion/src/components/accordion-item.props.d.ts +0 -1
  319. package/types/avatar/designer.d.ts +29 -0
  320. package/types/avatar/src/avatar.props.d.ts +0 -1
  321. package/types/avatar/src/property-config/avatar.property-config.d.ts +1 -1
  322. package/types/{expression-editor/index.d.ts → binding-selector/designer.d.ts} +6 -6
  323. package/types/binding-selector/index.d.ts +0 -54
  324. package/types/binding-selector/src/binding-selector.props.d.ts +0 -1
  325. package/types/button-group/designer.d.ts +29 -0
  326. package/types/button-group/index.d.ts +15 -0
  327. package/types/button-group/src/button-group.props.d.ts +0 -1
  328. package/types/calendar/src/calendar.props.d.ts +1 -0
  329. package/types/calendar/src/components/month/month-view.component.d.ts +6 -6
  330. package/types/calendar/src/composition/use-calendar-events.d.ts +1 -1
  331. package/types/calendar/src/composition/use-locales.d.ts +1 -0
  332. package/types/calendar/src/property-config/calendar.property-config.d.ts +2 -0
  333. package/types/capsule/src/capsule-item.component.d.ts +6 -6
  334. package/types/checkbox/designer.d.ts +2 -0
  335. package/types/checkbox-group/designer.d.ts +2 -0
  336. package/types/code-editor/designer.d.ts +5 -0
  337. package/types/code-editor/index.d.ts +0 -1
  338. package/types/code-editor/src/code-textbox.component.d.ts +6 -6
  339. package/types/code-editor/src/code-textbox.props.d.ts +0 -2
  340. package/types/color-picker/designer.d.ts +29 -0
  341. package/types/color-picker/index.d.ts +0 -15
  342. package/types/color-picker/src/color-picker.props.d.ts +0 -1
  343. package/types/combo-list/designer.d.ts +29 -0
  344. package/types/combo-list/src/combo-list.props.d.ts +1 -0
  345. package/types/combo-list/src/designer/combo-list.design.props.d.ts +6 -0
  346. package/types/combo-tree/designer.d.ts +5 -0
  347. package/types/combo-tree/src/combo-tree.props.d.ts +0 -1
  348. package/types/combo-tree/src/components/tree-container.component.d.ts +7 -7
  349. package/types/comment/src/comment.props.d.ts +4 -0
  350. package/types/comment/src/designer/comment.design.props.d.ts +4 -0
  351. package/types/common/index.d.ts +1 -0
  352. package/types/common/utils/use-mobile.d.ts +1 -0
  353. package/types/component/designer.d.ts +35 -0
  354. package/types/component/index.d.ts +0 -2
  355. package/types/component/src/component.props.d.ts +0 -8
  356. package/types/component/src/composition/field-tree-builder.d.ts +1 -0
  357. package/types/components.d.ts +2 -6
  358. package/types/condition/designer.d.ts +56 -0
  359. package/types/condition/index.d.ts +0 -55
  360. package/types/content-container/index.d.ts +3 -2
  361. package/types/content-container/src/content-container.props.d.ts +1 -0
  362. package/types/data-grid/designer.d.ts +2 -0
  363. package/types/data-grid/index.d.ts +5 -2
  364. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  365. package/types/data-grid/src/designer/grid-field-editor.props.d.ts +1 -0
  366. package/types/data-view/composition/types.d.ts +7 -1
  367. package/types/data-view/composition/use-mobile.d.ts +3 -0
  368. package/types/data-view/designer/property-config/use-command-option.d.ts +11 -0
  369. package/types/data-view/index.d.ts +1 -0
  370. package/types/designer-canvas/src/composition/designer-canvas-changed.d.ts +3 -3
  371. package/types/designer-canvas/src/composition/dg-control.d.ts +8 -0
  372. package/types/designer-outline/src/designer-outline.component.d.ts +3 -3
  373. package/types/designer-outline/src/types.d.ts +5 -1
  374. package/types/drawer/designer.d.ts +12 -0
  375. package/types/drawer/src/designer/drawer-toolbar.design.props.d.ts +12 -0
  376. package/types/drawer/src/designer/drawer.design.component.d.ts +8 -0
  377. package/types/drawer/src/designer/drawer.design.props.d.ts +4 -0
  378. package/types/drawer/src/schema/schema-mapper.d.ts +1 -0
  379. package/types/drawer/src/schema/schema-resolver.d.ts +1 -0
  380. package/types/dropdown/designer.d.ts +6 -0
  381. package/types/dropdown/index.d.ts +27 -6
  382. package/types/dropdown/src/dropdown.item.component.d.ts +2 -2
  383. package/types/dropdown/src/dropdown.props.d.ts +0 -1
  384. package/types/dynamic-form/designer.d.ts +3 -1
  385. package/types/dynamic-form/index.d.ts +4 -3
  386. package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +6 -6
  387. package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +11 -0
  388. package/types/dynamic-resolver/index.d.ts +3 -0
  389. package/types/dynamic-resolver/src/props-resolver.d.ts +2 -0
  390. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
  391. package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
  392. package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
  393. package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
  394. package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
  395. package/types/dynamic-view/src/components/maps.d.ts +883 -1
  396. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  397. package/types/dynamic-view/src/types.d.ts +4 -0
  398. package/types/expression-editor/designer.d.ts +9 -0
  399. package/types/field-selector/index.d.ts +2 -1
  400. package/types/fieldset/index.d.ts +3 -2
  401. package/types/fieldset/src/fieldset.props.d.ts +1 -0
  402. package/types/filter-bar/src/composition/types.d.ts +1 -1
  403. package/types/filter-bar/src/composition/use-size.d.ts +2 -2
  404. package/types/filter-bar/src/locale/locale.d.ts +1 -0
  405. package/types/filter-condition-editor/designer.d.ts +10 -0
  406. package/types/filter-condition-editor/index.d.ts +0 -9
  407. package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
  408. package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
  409. package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +0 -1
  410. package/types/html-template/designer.d.ts +31 -0
  411. package/types/html-template/src/designer/html-template.design.props.d.ts +9 -0
  412. package/types/html-template/src/html-template.props.d.ts +2 -0
  413. package/types/image-cropper/designer.d.ts +4 -0
  414. package/types/image-cropper/src/image-cropper.props.d.ts +0 -1
  415. package/types/index.d.ts +0 -1
  416. package/types/input-group/designer.d.ts +2 -0
  417. package/types/json-editor/designer.d.ts +5 -0
  418. package/types/json-editor/src/components/editable-combo/editable-combo.component.d.ts +3 -3
  419. package/types/json-editor/src/components/editable-combo/popup-container.component.d.ts +3 -3
  420. package/types/json-editor/src/json-editor.props.d.ts +0 -1
  421. package/types/language-textbox/index.d.ts +6 -6
  422. package/types/language-textbox/src/language-textbox.component.d.ts +2 -2
  423. package/types/language-textbox/src/language-textbox.props.d.ts +1 -0
  424. package/types/layout/index.d.ts +1 -0
  425. package/types/layout/src/components/layout-pane.props.d.ts +0 -1
  426. package/types/layout/src/layout.props.d.ts +0 -1
  427. package/types/list-nav/index.d.ts +24 -5
  428. package/types/list-nav/src/list-nav.props.d.ts +0 -1
  429. package/types/list-view/index.d.ts +1 -0
  430. package/types/list-view/src/composition/use-draggable.d.ts +1 -1
  431. package/types/list-view/src/designer/list-view.design.props.d.ts +1 -0
  432. package/types/list-view/src/list-view-table.props.d.ts +1 -0
  433. package/types/loading/index.d.ts +6 -6
  434. package/types/loading/src/loading.component.d.ts +3 -3
  435. package/types/lookup/index.d.ts +1 -1
  436. package/types/lookup/src/components/popup-container.component.d.ts +6 -6
  437. package/types/lookup/src/lookup.props.d.ts +1 -0
  438. package/types/lookup/src/property-config/external-lookup.property-config.d.ts +1 -0
  439. package/types/lookup/src/property-config/lookup.property-config.d.ts +1 -0
  440. package/types/menu-lookup/designer.d.ts +5 -0
  441. package/types/menu-lookup/src/menu-lookup.props.d.ts +0 -1
  442. package/types/message-box/index.d.ts +6 -6
  443. package/types/message-box/src/message-box.component.d.ts +3 -3
  444. package/types/modal/designer.d.ts +2 -0
  445. package/types/modal/index.d.ts +30 -24
  446. package/types/modal/src/modal.component.d.ts +15 -12
  447. package/types/modal/src/modal.props.d.ts +4 -0
  448. package/types/nav/designer.d.ts +6 -0
  449. package/types/nav/index.d.ts +24 -20
  450. package/types/nav/src/nav.props.d.ts +0 -1
  451. package/types/notify/index.d.ts +3 -3
  452. package/types/notify/src/notify.component.d.ts +2 -2
  453. package/types/number-range/designer.d.ts +29 -0
  454. package/types/number-range/src/number-range.props.d.ts +0 -1
  455. package/types/number-spinner/src/composition/types.d.ts +1 -0
  456. package/types/order/designer.d.ts +6 -0
  457. package/types/order/index.d.ts +36 -5
  458. package/types/order/src/designer/order.design.component.d.ts +1 -1
  459. package/types/order/src/order.props.d.ts +0 -1
  460. package/types/page-footer/designer.d.ts +6 -0
  461. package/types/page-footer/index.d.ts +0 -2
  462. package/types/page-footer/src/page-footer.props.d.ts +0 -1
  463. package/types/page-header/index.d.ts +3 -2
  464. package/types/page-header/src/designer/page-header.design.props.d.ts +20 -0
  465. package/types/page-header/src/page-header.props.d.ts +2 -0
  466. package/types/pagination/designer.d.ts +29 -0
  467. package/types/pagination/index.d.ts +15 -0
  468. package/types/pagination/src/pagination.props.d.ts +0 -1
  469. package/types/popover/index.d.ts +3 -3
  470. package/types/popover/src/composition/use-resize.d.ts +1 -1
  471. package/types/popover/src/popover.component.d.ts +2 -2
  472. package/types/progress/designer.d.ts +29 -0
  473. package/types/progress/src/progress.props.d.ts +0 -1
  474. package/types/property-panel/src/property-panel.component.d.ts +3 -3
  475. package/types/query-solution/index.d.ts +4 -4
  476. package/types/query-solution/src/composition/types.d.ts +8 -2
  477. package/types/query-solution/src/composition/use-header.d.ts +2 -2
  478. package/types/query-solution/src/composition/use-solution-utils.d.ts +1 -1
  479. package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
  480. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -0
  481. package/types/query-solution/src/designer/solution-preset-config/solution-preset.props.d.ts +1 -0
  482. package/types/query-solution/src/query-solution.props.d.ts +1 -0
  483. package/types/radio-group/designer.d.ts +4 -1
  484. package/types/radio-group/src/designer/item-collection-editor.props.d.ts +1 -0
  485. package/types/response-layout/index.d.ts +3 -2
  486. package/types/response-layout/src/component/response-layout-item.props.d.ts +1 -0
  487. package/types/response-layout/src/property-config/response-layout-splitter/response-layout-splitter.props.d.ts +1 -0
  488. package/types/response-layout/src/response-layout.props.d.ts +1 -0
  489. package/types/response-toolbar/designer.d.ts +2 -1
  490. package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +1 -0
  491. package/types/search-box/designer.d.ts +52 -0
  492. package/types/search-box/index.d.ts +1 -17
  493. package/types/search-box/src/components/search-box-container.component.d.ts +3 -3
  494. package/types/search-box/src/search-box.props.d.ts +0 -1
  495. package/types/section/designer.d.ts +1 -0
  496. package/types/smoke-detector/designer.d.ts +6 -0
  497. package/types/smoke-detector/index.d.ts +0 -2
  498. package/types/smoke-detector/src/smoke-detector.props.d.ts +0 -1
  499. package/types/sort-condition-editor/designer.d.ts +9 -0
  500. package/types/sort-condition-editor/index.d.ts +2 -7
  501. package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +0 -1
  502. package/types/splitter/designer.d.ts +32 -0
  503. package/types/splitter/index.d.ts +1 -0
  504. package/types/splitter/src/components/splitter-pane.props.d.ts +0 -1
  505. package/types/splitter/src/splitter.props.d.ts +0 -1
  506. package/types/step/designer.d.ts +6 -0
  507. package/types/tabs/designer.d.ts +1 -0
  508. package/types/tabs/index.d.ts +0 -1
  509. package/types/tabs/src/composition/types.d.ts +1 -0
  510. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +1 -0
  511. package/types/tags/index.d.ts +3 -3
  512. package/types/tags/src/tags.component.d.ts +1 -1
  513. package/types/text/designer.d.ts +6 -0
  514. package/types/text/index.d.ts +24 -20
  515. package/types/text/src/text.props.d.ts +0 -1
  516. package/types/time-picker/src/components/time.component.d.ts +3 -3
  517. package/types/transfer/designer.d.ts +35 -0
  518. package/types/transfer/src/transfer.props.d.ts +0 -1
  519. package/types/tree-view/designer.d.ts +29 -0
  520. package/types/tree-view/src/tree-view.props.d.ts +0 -1
  521. package/types/uploader/designer.d.ts +141 -0
  522. package/types/uploader/index.d.ts +6 -6
  523. package/types/uploader/src/components/upload-progress.component.d.ts +3 -3
  524. package/types/uploader/src/uploader.component.d.ts +3 -3
  525. package/types/uploader/src/uploader.props.d.ts +0 -1
  526. package/types/verify-detail/designer.d.ts +6 -0
  527. package/types/verify-detail/index.d.ts +58 -5
  528. package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
  529. package/types/verify-detail/src/verify-detail.props.d.ts +0 -1
  530. package/types/video/designer.d.ts +6 -0
  531. package/types/video/index.d.ts +24 -20
  532. package/types/video/src/video.props.d.ts +0 -1
  533. package/components/sort-condition-editor/index.css +0 -1
  534. package/package.zip +0 -0
  535. package/types/designer-toolbox/index.d.ts +0 -3
  536. package/types/designer-toolbox/src/toolbox.component.d.ts +0 -14
  537. package/types/designer-toolbox/src/toolbox.props.d.ts +0 -29
  538. package/types/designer-toolbox/src/types.d.ts +0 -21
  539. package/types/designer.d.ts +0 -13
  540. package/types/flow-canvas/index.d.ts +0 -3
  541. package/types/flow-canvas/src/components/flow-node-item.component.d.ts +0 -8
  542. package/types/flow-canvas/src/components/flow-node-item.props.d.ts +0 -3
  543. package/types/flow-canvas/src/composition/types.d.ts +0 -42
  544. package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +0 -2
  545. package/types/flow-canvas/src/composition/use-connections.d.ts +0 -2
  546. package/types/flow-canvas/src/composition/use-curve.d.ts +0 -4
  547. package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +0 -2
  548. package/types/flow-canvas/src/composition/use-drawing.d.ts +0 -4
  549. package/types/flow-canvas/src/flow-canvas.component.d.ts +0 -8
  550. package/types/flow-canvas/src/flow-canvas.props.d.ts +0 -3
  551. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +0 -2
  552. package/types/layout/src/designer/layout-pane.design.component.d.ts +0 -8
  553. package/types/layout/src/designer/layout-use-designer-rules.d.ts +0 -2
  554. package/types/layout/src/designer/layout.design.component.d.ts +0 -8
  555. package/types/layout/src/schema/schema-mapper.d.ts +0 -2
  556. package/types/layout/src/schema/schema-resolver.d.ts +0 -2
  557. package/types/list-nav/src/designer/use-designer-rules.d.ts +0 -2
  558. package/types/list-nav/src/property-config/list-nav.property-config.d.ts +0 -8
  559. package/types/list-nav/src/schema/schema-mapper.d.ts +0 -2
  560. package/types/list-nav/src/schema/schema-resolver.d.ts +0 -2
  561. /package/{components → designer}/condition/index.css +0 -0
  562. /package/{components → designer}/uploader/index.css +0 -0
  563. /package/types/{list-nav/src/designer/list-nav.design.component.d.ts → dynamic-form/src/component/form-control/form-control.component.d.ts} +0 -0
@@ -1,117 +1,9 @@
1
- var He = Object.defineProperty;
2
- var xe = (u, e, i) => e in u ? He(u, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : u[e] = i;
3
- var n = (u, e, i) => xe(u, typeof e != "symbol" ? e + "" : e, i);
4
- import { ref as b, defineComponent as Z, onMounted as K, watch as E, createVNode as y, withModifiers as Q, createTextVNode as fe, computed as O, onBeforeMount as we, withDirectives as q, vShow as J, vModelText as ye, inject as Be } from "vue";
5
- import { resolveAppearance as Me, createPropsResolver as $e } from "../dynamic-resolver/index.esm.js";
6
- import { useDesignerComponent as Re } from "../designer-canvas/index.esm.js";
7
- import { withInstall as Ve } from "../common/index.esm.js";
8
- const Ne = "https://json-schema.org/draft/2020-12/schema", Ee = "https://farris-design.gitee.io/color-picker.schema.json", Ae = "color-picker", Oe = "A Farris Component", Le = "object", je = {
9
- id: {
10
- description: "The unique identifier for color picker",
11
- type: "string"
12
- },
13
- type: {
14
- description: "The type string of color picker",
15
- type: "string",
16
- default: "color-picker"
17
- },
18
- appearance: {
19
- description: "",
20
- type: "object",
21
- properties: {
22
- class: {
23
- type: "string"
24
- },
25
- style: {
26
- type: "string"
27
- }
28
- },
29
- default: {}
30
- },
31
- binding: {
32
- description: "",
33
- type: "object",
34
- default: {}
35
- },
36
- disable: {
37
- type: "string",
38
- default: !1
39
- },
40
- editable: {
41
- description: "",
42
- type: "boolean",
43
- default: !0
44
- },
45
- placeholder: {
46
- description: "",
47
- type: "string",
48
- default: ""
49
- },
50
- readonly: {
51
- description: "",
52
- type: "boolean",
53
- default: !1
54
- },
55
- require: {
56
- description: "",
57
- type: "boolean",
58
- default: !1
59
- },
60
- tabindex: {
61
- description: "",
62
- type: "number",
63
- default: -1
64
- },
65
- visible: {
66
- description: "",
67
- type: "boolean",
68
- default: !0
69
- }
70
- }, Fe = [
71
- "id",
72
- "type"
73
- ], Ue = {
74
- $schema: Ne,
75
- $id: Ee,
76
- title: Ae,
77
- description: Oe,
78
- type: Le,
79
- properties: je,
80
- required: Fe
81
- };
82
- function qe(u, e, i) {
83
- return e;
84
- }
85
- const De = /* @__PURE__ */ new Map([
86
- ["appearance", Me]
87
- ]), Xe = "color-picker", Ce = "A Farris Component", Ye = "object", Ge = {
88
- basic: {
89
- description: "Basic Infomation",
90
- title: "基本信息",
91
- properties: {
92
- id: {
93
- description: "组件标识",
94
- title: "标识",
95
- type: "string",
96
- readonly: !0
97
- },
98
- type: {
99
- description: "组件类型",
100
- title: "控件类型",
101
- type: "select",
102
- editor: {
103
- type: "waiting for modification",
104
- enum: []
105
- }
106
- }
107
- }
108
- }
109
- }, We = {
110
- title: Xe,
111
- description: Ce,
112
- type: Ye,
113
- categories: Ge
114
- }, ve = {
1
+ var ft = Object.defineProperty;
2
+ var vt = (c, t, i) => t in c ? ft(c, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[t] = i;
3
+ var e = (c, t, i) => vt(c, typeof t != "symbol" ? t + "" : t, i);
4
+ import { withInstall as mt } from "../common/index.esm.js";
5
+ import { ref as k, defineComponent as U, onMounted as G, watch as $, createVNode as y, withModifiers as j, createTextVNode as st, computed as L, onBeforeMount as yt, withDirectives as Y, vShow as C, vModelText as kt } from "vue";
6
+ const bt = {
115
7
  /** 初始颜色 */
116
8
  color: { type: String, default: "#e1e2e3" },
117
9
  /** 禁用 */
@@ -123,12 +15,12 @@ const De = /* @__PURE__ */ new Map([
123
15
  /** 颜色值变化事件 */
124
16
  onValueChanged: { type: Function, default: () => {
125
17
  } }
126
- }, ke = $e(ve, Ue, De, qe, We);
127
- class ie {
18
+ };
19
+ class W {
128
20
  }
129
- class pe extends ie {
130
- constructor(e, i, t, r) {
131
- super(), this.cyan = e, this.magenta = i, this.yellow = t, this.black = r;
21
+ class T extends W {
22
+ constructor(t, i, s, r) {
23
+ super(), this.cyan = t, this.magenta = i, this.yellow = s, this.black = r;
132
24
  }
133
25
  toString() {
134
26
  return `cmyk(${this.getCyan()}%, ${this.getMagenta()}%, ${this.getYellow()}%, ${this.getBlack()}%)`;
@@ -146,12 +38,12 @@ class pe extends ie {
146
38
  return Math.round(this.black);
147
39
  }
148
40
  }
149
- class ee extends ie {
150
- constructor(e, i, t, r) {
151
- super(), this.hue = e, this.saturation = i, this.lightness = t, this.alpha = r;
41
+ class F extends W {
42
+ constructor(t, i, s, r) {
43
+ super(), this.hue = t, this.saturation = i, this.lightness = s, this.alpha = r;
152
44
  }
153
- toString(e = !0) {
154
- return e ? `hsla(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%, ${this.getAlpha()})` : `hsl(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%)`;
45
+ toString(t = !0) {
46
+ return t ? `hsla(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%, ${this.getAlpha()})` : `hsl(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%)`;
155
47
  }
156
48
  getHue() {
157
49
  return Math.round(this.hue);
@@ -166,12 +58,12 @@ class ee extends ie {
166
58
  return Math.round(this.alpha * 100) / 100;
167
59
  }
168
60
  }
169
- class te extends ie {
170
- constructor(e, i, t, r) {
171
- super(), this.hue = e, this.saturation = i, this.value = t, this.alpha = r;
61
+ class q extends W {
62
+ constructor(t, i, s, r) {
63
+ super(), this.hue = t, this.saturation = i, this.value = s, this.alpha = r;
172
64
  }
173
- toString(e = !0) {
174
- return e ? `hsva(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%, ${this.getAlpha()})` : `hsv(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%)`;
65
+ toString(t = !0) {
66
+ return t ? `hsva(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%, ${this.getAlpha()})` : `hsv(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%)`;
175
67
  }
176
68
  getHue() {
177
69
  return Math.round(this.hue);
@@ -186,12 +78,12 @@ class te extends ie {
186
78
  return Math.round(this.alpha * 100) / 100;
187
79
  }
188
80
  }
189
- class s extends ie {
190
- constructor(e, i, t, r) {
191
- super(), this.red = e, this.green = i, this.blue = t, this.alpha = r;
81
+ class a extends W {
82
+ constructor(t, i, s, r) {
83
+ super(), this.red = t, this.green = i, this.blue = s, this.alpha = r;
192
84
  }
193
- toString(e = !0) {
194
- return e ? `rgba(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()}, ${this.getAlpha()})` : `rgb(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()})`;
85
+ toString(t = !0) {
86
+ return t ? `rgba(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()}, ${this.getAlpha()})` : `rgb(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()})`;
195
87
  }
196
88
  getRed() {
197
89
  return Math.round(this.red);
@@ -206,12 +98,12 @@ class s extends ie {
206
98
  return Math.round(this.alpha * 100) / 100;
207
99
  }
208
100
  }
209
- const a = class a {
101
+ const n = class n {
210
102
  };
211
- n(a, "transparent", new s(0, 0, 0, 0)), n(a, "aliceblue", new s(240, 248, 255, 1)), n(a, "antiquewhite", new s(250, 235, 215, 1)), n(a, "aqua", new s(0, 255, 255, 1)), n(a, "aquamarine", new s(127, 255, 212, 1)), n(a, "azure", new s(240, 255, 255, 1)), n(a, "beige", new s(245, 245, 220, 1)), n(a, "bisque", new s(255, 228, 196, 1)), n(a, "black", new s(0, 0, 0, 1)), n(a, "blanchedalmond", new s(255, 235, 205, 1)), n(a, "blue", new s(0, 0, 255, 1)), n(a, "blueviolet", new s(138, 43, 226, 1)), n(a, "brown", new s(165, 42, 42, 1)), n(a, "burlywood", new s(222, 184, 135, 1)), n(a, "cadetblue", new s(95, 158, 160, 1)), n(a, "chartreuse", new s(127, 255, 0, 1)), n(a, "chocolate", new s(210, 105, 30, 1)), n(a, "coral", new s(255, 127, 80, 1)), n(a, "cornflowerblue", new s(100, 149, 237, 1)), n(a, "cornsilk", new s(255, 248, 220, 1)), n(a, "crimson", new s(220, 20, 60, 1)), n(a, "cyan", new s(0, 255, 255, 1)), n(a, "darkblue", new s(0, 0, 139, 1)), n(a, "darkcyan", new s(0, 139, 139, 1)), n(a, "darkgoldenrod", new s(184, 134, 11, 1)), n(a, "darkgray", new s(169, 169, 169, 1)), n(a, "darkgreen", new s(0, 100, 0, 1)), n(a, "darkgrey", a.darkgray), n(a, "darkkhaki", new s(189, 183, 107, 1)), n(a, "darkmagenta", new s(139, 0, 139, 1)), n(a, "darkolivegreen", new s(85, 107, 47, 1)), n(a, "darkorange", new s(255, 140, 0, 1)), n(a, "darkorchid", new s(153, 50, 204, 1)), n(a, "darkred", new s(139, 0, 0, 1)), n(a, "darksalmon", new s(233, 150, 122, 1)), n(a, "darkseagreen", new s(143, 188, 143, 1)), n(a, "darkslateblue", new s(72, 61, 139, 1)), n(a, "darkslategray", new s(47, 79, 79, 1)), n(a, "darkslategrey", a.darkslategray), n(a, "darkturquoise", new s(0, 206, 209, 1)), n(a, "darkviolet", new s(148, 0, 211, 1)), n(a, "deeppink", new s(255, 20, 147, 1)), n(a, "deepskyblue", new s(0, 191, 255, 1)), n(a, "dimgray", new s(105, 105, 105, 1)), n(a, "dimgrey", a.dimgray), n(a, "dodgerblue", new s(30, 144, 255, 1)), n(a, "firebrick", new s(178, 34, 34, 1)), n(a, "floralwhite", new s(255, 250, 240, 1)), n(a, "forestgreen", new s(34, 139, 34, 1)), n(a, "fuchsia", new s(255, 0, 255, 1)), n(a, "gainsboro", new s(220, 220, 220, 1)), n(a, "ghostwhite", new s(248, 248, 255, 1)), n(a, "gold", new s(255, 215, 0, 1)), n(a, "goldenrod", new s(218, 165, 32, 1)), n(a, "gray", new s(128, 128, 128, 1)), n(a, "grey", a.gray), n(a, "green", new s(0, 128, 0, 1)), n(a, "greenyellow", new s(173, 255, 47, 1)), n(a, "honeydew", new s(240, 255, 240, 1)), n(a, "hotpink", new s(255, 105, 180, 1)), n(a, "indianred", new s(205, 92, 92, 1)), n(a, "indigo", new s(75, 0, 130, 1)), n(a, "ivory", new s(255, 255, 240, 1)), n(a, "khaki", new s(240, 230, 140, 1)), n(a, "lavender", new s(230, 230, 250, 1)), n(a, "lavenderblush", new s(255, 240, 245, 1)), n(a, "lawngreen", new s(124, 252, 0, 1)), n(a, "lemonchiffon", new s(255, 250, 205, 1)), n(a, "lightblue", new s(173, 216, 230, 1)), n(a, "lightcoral", new s(240, 128, 128, 1)), n(a, "lightcyan", new s(224, 255, 255, 1)), n(a, "lightgoldenrodyellow", new s(250, 250, 210, 1)), n(a, "lightgray", new s(211, 211, 211, 1)), n(a, "lightgreen", new s(144, 238, 144, 1)), n(a, "lightgrey", a.lightgray), n(a, "lightpink", new s(255, 182, 193, 1)), n(a, "lightsalmon", new s(255, 160, 122, 1)), n(a, "lightseagreen", new s(32, 178, 170, 1)), n(a, "lightskyblue", new s(135, 206, 250, 1)), n(a, "lightslategray", new s(119, 136, 153, 1)), n(a, "lightslategrey", a.lightslategray), n(a, "lightsteelblue", new s(176, 196, 222, 1)), n(a, "lightyellow", new s(255, 255, 224, 1)), n(a, "lime", new s(0, 255, 0, 1)), n(a, "limegreen", new s(50, 205, 50, 1)), n(a, "linen", new s(250, 240, 230, 1)), n(a, "magenta", new s(255, 0, 255, 1)), n(a, "maroon", new s(128, 0, 0, 1)), n(a, "mediumaquamarine", new s(102, 205, 170, 1)), n(a, "mediumblue", new s(0, 0, 205, 1)), n(a, "mediumorchid", new s(186, 85, 211, 1)), n(a, "mediumpurple", new s(147, 112, 219, 1)), n(a, "mediumseagreen", new s(60, 179, 113, 1)), n(a, "mediumslateblue", new s(123, 104, 238, 1)), n(a, "mediumspringgreen", new s(0, 250, 154, 1)), n(a, "mediumturquoise", new s(72, 209, 204, 1)), n(a, "mediumvioletred", new s(199, 21, 133, 1)), n(a, "midnightblue", new s(25, 25, 112, 1)), n(a, "mintcream", new s(245, 255, 250, 1)), n(a, "mistyrose", new s(255, 228, 225, 1)), n(a, "moccasin", new s(255, 228, 181, 1)), n(a, "navajowhite", new s(255, 222, 173, 1)), n(a, "navy", new s(0, 0, 128, 1)), n(a, "oldlace", new s(253, 245, 230, 1)), n(a, "olive", new s(128, 128, 0, 1)), n(a, "olivedrab", new s(107, 142, 35, 1)), n(a, "orange", new s(255, 165, 0, 1)), n(a, "orangered", new s(255, 69, 0, 1)), n(a, "orchid", new s(218, 112, 214, 1)), n(a, "palegoldenrod", new s(238, 232, 170, 1)), n(a, "palegreen", new s(152, 251, 152, 1)), n(a, "paleturquoise", new s(175, 238, 238, 1)), n(a, "palevioletred", new s(219, 112, 147, 1)), n(a, "papayawhip", new s(255, 239, 213, 1)), n(a, "peachpuff", new s(255, 218, 185, 1)), n(a, "peru", new s(205, 133, 63, 1)), n(a, "pink", new s(255, 192, 203, 1)), n(a, "plum", new s(221, 160, 221, 1)), n(a, "powderblue", new s(176, 224, 230, 1)), n(a, "purple", new s(128, 0, 128, 1)), n(a, "red", new s(255, 0, 0, 1)), n(a, "rosybrown", new s(188, 143, 143, 1)), n(a, "royalblue", new s(65, 105, 225, 1)), n(a, "saddlebrown", new s(139, 69, 19, 1)), n(a, "salmon", new s(250, 128, 114, 1)), n(a, "sandybrown", new s(244, 164, 96, 1)), n(a, "seagreen", new s(46, 139, 87, 1)), n(a, "seashell", new s(255, 245, 238, 1)), n(a, "sienna", new s(160, 82, 45, 1)), n(a, "silver", new s(192, 192, 192, 1)), n(a, "skyblue", new s(135, 206, 235, 1)), n(a, "slateblue", new s(106, 90, 205, 1)), n(a, "slategray", new s(112, 128, 144, 1)), n(a, "slategrey", a.slategray), n(a, "snow", new s(255, 250, 250, 1)), n(a, "springgreen", new s(0, 255, 127, 1)), n(a, "steelblue", new s(70, 130, 180, 1)), n(a, "tan", new s(210, 180, 140, 1)), n(a, "teal", new s(0, 128, 128, 1)), n(a, "thistle", new s(216, 191, 216, 1)), n(a, "tomato", new s(255, 99, 71, 1)), n(a, "turquoise", new s(64, 224, 208, 1)), n(a, "violet", new s(238, 130, 238, 1)), n(a, "wheat", new s(245, 222, 179, 1)), n(a, "white", new s(255, 255, 255, 1)), n(a, "whitesmoke", new s(245, 245, 245, 1)), n(a, "yellow", new s(255, 255, 0, 1)), n(a, "yellowgreen", new s(154, 205, 50, 1));
212
- let ge = a;
213
- class I {
214
- constructor(e) {
103
+ e(n, "transparent", new a(0, 0, 0, 0)), e(n, "aliceblue", new a(240, 248, 255, 1)), e(n, "antiquewhite", new a(250, 235, 215, 1)), e(n, "aqua", new a(0, 255, 255, 1)), e(n, "aquamarine", new a(127, 255, 212, 1)), e(n, "azure", new a(240, 255, 255, 1)), e(n, "beige", new a(245, 245, 220, 1)), e(n, "bisque", new a(255, 228, 196, 1)), e(n, "black", new a(0, 0, 0, 1)), e(n, "blanchedalmond", new a(255, 235, 205, 1)), e(n, "blue", new a(0, 0, 255, 1)), e(n, "blueviolet", new a(138, 43, 226, 1)), e(n, "brown", new a(165, 42, 42, 1)), e(n, "burlywood", new a(222, 184, 135, 1)), e(n, "cadetblue", new a(95, 158, 160, 1)), e(n, "chartreuse", new a(127, 255, 0, 1)), e(n, "chocolate", new a(210, 105, 30, 1)), e(n, "coral", new a(255, 127, 80, 1)), e(n, "cornflowerblue", new a(100, 149, 237, 1)), e(n, "cornsilk", new a(255, 248, 220, 1)), e(n, "crimson", new a(220, 20, 60, 1)), e(n, "cyan", new a(0, 255, 255, 1)), e(n, "darkblue", new a(0, 0, 139, 1)), e(n, "darkcyan", new a(0, 139, 139, 1)), e(n, "darkgoldenrod", new a(184, 134, 11, 1)), e(n, "darkgray", new a(169, 169, 169, 1)), e(n, "darkgreen", new a(0, 100, 0, 1)), e(n, "darkgrey", n.darkgray), e(n, "darkkhaki", new a(189, 183, 107, 1)), e(n, "darkmagenta", new a(139, 0, 139, 1)), e(n, "darkolivegreen", new a(85, 107, 47, 1)), e(n, "darkorange", new a(255, 140, 0, 1)), e(n, "darkorchid", new a(153, 50, 204, 1)), e(n, "darkred", new a(139, 0, 0, 1)), e(n, "darksalmon", new a(233, 150, 122, 1)), e(n, "darkseagreen", new a(143, 188, 143, 1)), e(n, "darkslateblue", new a(72, 61, 139, 1)), e(n, "darkslategray", new a(47, 79, 79, 1)), e(n, "darkslategrey", n.darkslategray), e(n, "darkturquoise", new a(0, 206, 209, 1)), e(n, "darkviolet", new a(148, 0, 211, 1)), e(n, "deeppink", new a(255, 20, 147, 1)), e(n, "deepskyblue", new a(0, 191, 255, 1)), e(n, "dimgray", new a(105, 105, 105, 1)), e(n, "dimgrey", n.dimgray), e(n, "dodgerblue", new a(30, 144, 255, 1)), e(n, "firebrick", new a(178, 34, 34, 1)), e(n, "floralwhite", new a(255, 250, 240, 1)), e(n, "forestgreen", new a(34, 139, 34, 1)), e(n, "fuchsia", new a(255, 0, 255, 1)), e(n, "gainsboro", new a(220, 220, 220, 1)), e(n, "ghostwhite", new a(248, 248, 255, 1)), e(n, "gold", new a(255, 215, 0, 1)), e(n, "goldenrod", new a(218, 165, 32, 1)), e(n, "gray", new a(128, 128, 128, 1)), e(n, "grey", n.gray), e(n, "green", new a(0, 128, 0, 1)), e(n, "greenyellow", new a(173, 255, 47, 1)), e(n, "honeydew", new a(240, 255, 240, 1)), e(n, "hotpink", new a(255, 105, 180, 1)), e(n, "indianred", new a(205, 92, 92, 1)), e(n, "indigo", new a(75, 0, 130, 1)), e(n, "ivory", new a(255, 255, 240, 1)), e(n, "khaki", new a(240, 230, 140, 1)), e(n, "lavender", new a(230, 230, 250, 1)), e(n, "lavenderblush", new a(255, 240, 245, 1)), e(n, "lawngreen", new a(124, 252, 0, 1)), e(n, "lemonchiffon", new a(255, 250, 205, 1)), e(n, "lightblue", new a(173, 216, 230, 1)), e(n, "lightcoral", new a(240, 128, 128, 1)), e(n, "lightcyan", new a(224, 255, 255, 1)), e(n, "lightgoldenrodyellow", new a(250, 250, 210, 1)), e(n, "lightgray", new a(211, 211, 211, 1)), e(n, "lightgreen", new a(144, 238, 144, 1)), e(n, "lightgrey", n.lightgray), e(n, "lightpink", new a(255, 182, 193, 1)), e(n, "lightsalmon", new a(255, 160, 122, 1)), e(n, "lightseagreen", new a(32, 178, 170, 1)), e(n, "lightskyblue", new a(135, 206, 250, 1)), e(n, "lightslategray", new a(119, 136, 153, 1)), e(n, "lightslategrey", n.lightslategray), e(n, "lightsteelblue", new a(176, 196, 222, 1)), e(n, "lightyellow", new a(255, 255, 224, 1)), e(n, "lime", new a(0, 255, 0, 1)), e(n, "limegreen", new a(50, 205, 50, 1)), e(n, "linen", new a(250, 240, 230, 1)), e(n, "magenta", new a(255, 0, 255, 1)), e(n, "maroon", new a(128, 0, 0, 1)), e(n, "mediumaquamarine", new a(102, 205, 170, 1)), e(n, "mediumblue", new a(0, 0, 205, 1)), e(n, "mediumorchid", new a(186, 85, 211, 1)), e(n, "mediumpurple", new a(147, 112, 219, 1)), e(n, "mediumseagreen", new a(60, 179, 113, 1)), e(n, "mediumslateblue", new a(123, 104, 238, 1)), e(n, "mediumspringgreen", new a(0, 250, 154, 1)), e(n, "mediumturquoise", new a(72, 209, 204, 1)), e(n, "mediumvioletred", new a(199, 21, 133, 1)), e(n, "midnightblue", new a(25, 25, 112, 1)), e(n, "mintcream", new a(245, 255, 250, 1)), e(n, "mistyrose", new a(255, 228, 225, 1)), e(n, "moccasin", new a(255, 228, 181, 1)), e(n, "navajowhite", new a(255, 222, 173, 1)), e(n, "navy", new a(0, 0, 128, 1)), e(n, "oldlace", new a(253, 245, 230, 1)), e(n, "olive", new a(128, 128, 0, 1)), e(n, "olivedrab", new a(107, 142, 35, 1)), e(n, "orange", new a(255, 165, 0, 1)), e(n, "orangered", new a(255, 69, 0, 1)), e(n, "orchid", new a(218, 112, 214, 1)), e(n, "palegoldenrod", new a(238, 232, 170, 1)), e(n, "palegreen", new a(152, 251, 152, 1)), e(n, "paleturquoise", new a(175, 238, 238, 1)), e(n, "palevioletred", new a(219, 112, 147, 1)), e(n, "papayawhip", new a(255, 239, 213, 1)), e(n, "peachpuff", new a(255, 218, 185, 1)), e(n, "peru", new a(205, 133, 63, 1)), e(n, "pink", new a(255, 192, 203, 1)), e(n, "plum", new a(221, 160, 221, 1)), e(n, "powderblue", new a(176, 224, 230, 1)), e(n, "purple", new a(128, 0, 128, 1)), e(n, "red", new a(255, 0, 0, 1)), e(n, "rosybrown", new a(188, 143, 143, 1)), e(n, "royalblue", new a(65, 105, 225, 1)), e(n, "saddlebrown", new a(139, 69, 19, 1)), e(n, "salmon", new a(250, 128, 114, 1)), e(n, "sandybrown", new a(244, 164, 96, 1)), e(n, "seagreen", new a(46, 139, 87, 1)), e(n, "seashell", new a(255, 245, 238, 1)), e(n, "sienna", new a(160, 82, 45, 1)), e(n, "silver", new a(192, 192, 192, 1)), e(n, "skyblue", new a(135, 206, 235, 1)), e(n, "slateblue", new a(106, 90, 205, 1)), e(n, "slategray", new a(112, 128, 144, 1)), e(n, "slategrey", n.slategray), e(n, "snow", new a(255, 250, 250, 1)), e(n, "springgreen", new a(0, 255, 127, 1)), e(n, "steelblue", new a(70, 130, 180, 1)), e(n, "tan", new a(210, 180, 140, 1)), e(n, "teal", new a(0, 128, 128, 1)), e(n, "thistle", new a(216, 191, 216, 1)), e(n, "tomato", new a(255, 99, 71, 1)), e(n, "turquoise", new a(64, 224, 208, 1)), e(n, "violet", new a(238, 130, 238, 1)), e(n, "wheat", new a(245, 222, 179, 1)), e(n, "white", new a(255, 255, 255, 1)), e(n, "whitesmoke", new a(245, 245, 245, 1)), e(n, "yellow", new a(255, 255, 0, 1)), e(n, "yellowgreen", new a(154, 205, 50, 1));
104
+ let _ = n;
105
+ class P {
106
+ constructor(t) {
215
107
  /**
216
108
  * base color used to calculate other
217
109
  * default color
@@ -219,51 +111,51 @@ class I {
219
111
  * hsl(0, 100%, 50%)
220
112
  * 初始色#ff0000
221
113
  */
222
- n(this, "hsva", new te(0, 1, 1, 1));
223
- n(this, "rgba", new s(255, 0, 0, 1));
224
- e && this.stringToColor(e);
114
+ e(this, "hsva", new q(0, 1, 1, 1));
115
+ e(this, "rgba", new a(255, 0, 0, 1));
116
+ t && this.stringToColor(t);
225
117
  }
226
- static from(e) {
227
- return typeof e == "string" ? new I(e) : e instanceof I ? e.clone() : e instanceof s ? new I().setRgba(e.red, e.green, e.blue, e.alpha) : e instanceof te ? new I().setHsva(e.hue, e.saturation, e.value, e.alpha) : e instanceof ee ? new I().setHsla(e.hue, e.saturation, e.lightness, e.alpha) : new I(e);
118
+ static from(t) {
119
+ return typeof t == "string" ? new P(t) : t instanceof P ? t.clone() : t instanceof a ? new P().setRgba(t.red, t.green, t.blue, t.alpha) : t instanceof q ? new P().setHsva(t.hue, t.saturation, t.value, t.alpha) : t instanceof F ? new P().setHsla(t.hue, t.saturation, t.lightness, t.alpha) : new P(t);
228
120
  }
229
121
  /**
230
122
  * make from existing color new color object
231
123
  */
232
124
  clone() {
233
- return I.from(this.getRgba());
125
+ return P.from(this.getRgba());
234
126
  }
235
127
  /**
236
128
  * define Color from hex, rgb, rgba, hsl, hsla or cmyk string
237
129
  */
238
- setFromString(e) {
239
- return this.stringToColor(e);
130
+ setFromString(t) {
131
+ return this.stringToColor(t);
240
132
  }
241
133
  /**
242
134
  * define Color from HSV values
243
135
  */
244
- setHsva(e, i = 100, t = 100, r = 1) {
245
- return e != null && (this.hsva.hue = e), i != null && (this.hsva.saturation = i), t != null && (this.hsva.value = t), r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.hsva.alpha = r), this.rgba = this.hsvaToRgba(this.hsva), this;
136
+ setHsva(t, i = 100, s = 100, r = 1) {
137
+ return t != null && (this.hsva.hue = t), i != null && (this.hsva.saturation = i), s != null && (this.hsva.value = s), r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.hsva.alpha = r), this.rgba = this.hsvaToRgba(this.hsva), this;
246
138
  }
247
139
  /**
248
140
  * define Color from RGBa
249
141
  */
250
- setRgba(e, i, t, r = 1) {
251
- return e != null && (this.rgba.red = e), i != null && (this.rgba.green = i), t != null && (this.rgba.blue = t), r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.rgba.alpha = r), this.hsva = this.rgbaToHsva(this.rgba), this;
142
+ setRgba(t, i, s, r = 1) {
143
+ return t != null && (this.rgba.red = t), i != null && (this.rgba.green = i), s != null && (this.rgba.blue = s), r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.rgba.alpha = r), this.hsva = this.rgbaToHsva(this.rgba), this;
252
144
  }
253
145
  /**
254
146
  * define Color from HSLa
255
147
  */
256
- setHsla(e, i, t, r = 1) {
148
+ setHsla(t, i, s, r = 1) {
257
149
  r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.rgba.alpha = r);
258
- const k = new ee(e, i, t, r);
259
- return this.rgba = this.hslaToRgba(k), this.hsva = this.rgbaToHsva(this.rgba), this;
150
+ const v = new F(t, i, s, r);
151
+ return this.rgba = this.hslaToRgba(v), this.hsva = this.rgbaToHsva(this.rgba), this;
260
152
  }
261
153
  /**
262
154
  * return hexadecimal value formatted as '#341d2a' or '#341d2aFF' if alhpa channel is enabled
263
155
  */
264
- toHexString(e = !1) {
156
+ toHexString(t = !1) {
265
157
  let i = "#" + (16777216 | this.rgba.getRed() << 16 | this.rgba.getGreen() << 8 | this.rgba.getBlue()).toString(16).substr(1);
266
- return e && (i += (256 | Math.round(this.rgba.alpha * 255)).toString(16).substr(1)), i.toUpperCase();
158
+ return t && (i += (256 | Math.round(this.rgba.alpha * 255)).toString(16).substr(1)), i.toUpperCase();
267
159
  }
268
160
  /**
269
161
  * return rgba string formatted as rgba(52, 29, 42, 1)
@@ -308,10 +200,10 @@ class I {
308
200
  return this.getCmyk().toString();
309
201
  }
310
202
  getHsva() {
311
- return new te(this.hsva.hue, this.hsva.saturation, this.hsva.value, this.hsva.alpha);
203
+ return new q(this.hsva.hue, this.hsva.saturation, this.hsva.value, this.hsva.alpha);
312
204
  }
313
205
  getRgba() {
314
- return new s(this.rgba.red, this.rgba.green, this.rgba.blue, this.rgba.alpha);
206
+ return new a(this.rgba.red, this.rgba.green, this.rgba.blue, this.rgba.alpha);
315
207
  }
316
208
  getHsla() {
317
209
  return this.rgbaToHsla(this.rgba);
@@ -319,78 +211,78 @@ class I {
319
211
  getCmyk() {
320
212
  return this.rgbaToCmyk(this.rgba);
321
213
  }
322
- hsvaToHsla(e) {
323
- const { hue: i } = e, t = e.saturation / 100, r = e.value / 100, k = (2 - t) * e.value / 2, l = t * r / (k <= 1 ? k : 2 - k) || 0;
324
- return new ee(i, k * 100, l * 100, e.alpha);
214
+ hsvaToHsla(t) {
215
+ const { hue: i } = t, s = t.saturation / 100, r = t.value / 100, v = (2 - s) * t.value / 2, u = s * r / (v <= 1 ? v : 2 - v) || 0;
216
+ return new F(i, v * 100, u * 100, t.alpha);
325
217
  }
326
- hslaToHsva(e) {
327
- const { hue: i } = e, t = e.lightness / 100 * 2, r = e.saturation / 100 * (t <= 1 ? t : 2 - t), k = (t + r) / 2, l = 2 * r / (t + r) || 0;
328
- return new te(i, l, k, e.alpha);
218
+ hslaToHsva(t) {
219
+ const { hue: i } = t, s = t.lightness / 100 * 2, r = t.saturation / 100 * (s <= 1 ? s : 2 - s), v = (s + r) / 2, u = 2 * r / (s + r) || 0;
220
+ return new q(i, u, v, t.alpha);
329
221
  }
330
- rgbaToHsva(e) {
331
- const i = e.red / 255, t = e.green / 255, r = e.blue / 255, { alpha: k } = e, l = Math.max(i, t, r), g = Math.min(i, t, r), w = l - g;
332
- let m = 0, h = l === 0 ? 0 : w / l, d = l;
333
- if (l !== g) {
334
- switch (l) {
222
+ rgbaToHsva(t) {
223
+ const i = t.red / 255, s = t.green / 255, r = t.blue / 255, { alpha: v } = t, u = Math.max(i, s, r), d = Math.min(i, s, r), p = u - d;
224
+ let g = 0, l = u === 0 ? 0 : p / u, o = u;
225
+ if (u !== d) {
226
+ switch (u) {
335
227
  case i:
336
- m = (t - r) / w + (t < r ? 6 : 0);
228
+ g = (s - r) / p + (s < r ? 6 : 0);
337
229
  break;
338
- case t:
339
- m = 2 + (r - i) / w;
230
+ case s:
231
+ g = 2 + (r - i) / p;
340
232
  break;
341
233
  case r:
342
- m = 4 + (i - t) / w;
234
+ g = 4 + (i - s) / p;
343
235
  break;
344
236
  }
345
- m /= 6;
237
+ g /= 6;
346
238
  }
347
- return m *= 360, h *= 100, d *= 100, new te(m, h, d, k);
239
+ return g *= 360, l *= 100, o *= 100, new q(g, l, o, v);
348
240
  }
349
- hsvaToRgba(e) {
350
- let i = 1, t = 0, r = 0;
351
- const k = e.saturation / 100, l = e.value / 100, { alpha: g } = e, w = e.hue / 60, m = Math.floor(w), h = w - m, d = (1 - k) * l, v = (1 - k * h) * l, P = (1 - k * (1 - h)) * l;
352
- switch (m) {
241
+ hsvaToRgba(t) {
242
+ let i = 1, s = 0, r = 0;
243
+ const v = t.saturation / 100, u = t.value / 100, { alpha: d } = t, p = t.hue / 60, g = Math.floor(p), l = p - g, o = (1 - v) * u, f = (1 - v * l) * u, b = (1 - v * (1 - l)) * u;
244
+ switch (g) {
353
245
  case 6:
354
246
  case 0:
355
- i = l, t = P, r = d;
247
+ i = u, s = b, r = o;
356
248
  break;
357
249
  case 1:
358
- i = v, t = l, r = d;
250
+ i = f, s = u, r = o;
359
251
  break;
360
252
  case 2:
361
- i = d, t = l, r = P;
253
+ i = o, s = u, r = b;
362
254
  break;
363
255
  case 3:
364
- i = d, t = v, r = l;
256
+ i = o, s = f, r = u;
365
257
  break;
366
258
  case 4:
367
- i = P, t = d, r = l;
259
+ i = b, s = o, r = u;
368
260
  break;
369
261
  case 5:
370
- i = l, t = d, r = v;
262
+ i = u, s = o, r = f;
371
263
  break;
372
264
  }
373
- return i *= 255, t *= 255, r *= 255, new s(i, t, r, g);
374
- }
375
- rgbaToHsla(e) {
376
- const i = e.red / 255, t = e.green / 255, r = e.blue / 255, { alpha: k } = e, l = Math.max(i, t, r), g = Math.min(i, t, r);
377
- let w = 0, m = 0, h = (l + g) / 2;
378
- const d = l - g;
379
- if (l !== g) {
380
- switch (m = h > 0.5 ? d / (2 - l - g) : d / (l + g), l) {
265
+ return i *= 255, s *= 255, r *= 255, new a(i, s, r, d);
266
+ }
267
+ rgbaToHsla(t) {
268
+ const i = t.red / 255, s = t.green / 255, r = t.blue / 255, { alpha: v } = t, u = Math.max(i, s, r), d = Math.min(i, s, r);
269
+ let p = 0, g = 0, l = (u + d) / 2;
270
+ const o = u - d;
271
+ if (u !== d) {
272
+ switch (g = l > 0.5 ? o / (2 - u - d) : o / (u + d), u) {
381
273
  case i:
382
- w = (t - r) / d + (t < r ? 6 : 0);
274
+ p = (s - r) / o + (s < r ? 6 : 0);
383
275
  break;
384
- case t:
385
- w = (r - i) / d + 2;
276
+ case s:
277
+ p = (r - i) / o + 2;
386
278
  break;
387
279
  case r:
388
- w = (i - t) / d + 4;
280
+ p = (i - s) / o + 4;
389
281
  break;
390
282
  }
391
- w /= 6;
283
+ p /= 6;
392
284
  }
393
- return w *= 360, m *= 100, h *= 100, new ee(w, m, h, k);
285
+ return p *= 360, g *= 100, l *= 100, new F(p, g, l, v);
394
286
  }
395
287
  /**
396
288
  * convert rgb color from HSLa
@@ -399,17 +291,17 @@ class I {
399
291
  * saturation = 0 => 1
400
292
  * lightness = 0 => 1
401
293
  */
402
- hslaToRgba(e) {
403
- const i = e.hue / 360, t = e.saturation / 100, r = e.lightness / 100, { alpha: k } = e;
404
- let l = r, g = r, w = r;
405
- if (t !== 0) {
406
- const m = r < 0.5 ? r * (1 + t) : r + t - r * t, h = 2 * r - m;
407
- l = this.hueToRgb(h, m, i + 1 / 3), g = this.hueToRgb(h, m, i), w = this.hueToRgb(h, m, i - 1 / 3);
294
+ hslaToRgba(t) {
295
+ const i = t.hue / 360, s = t.saturation / 100, r = t.lightness / 100, { alpha: v } = t;
296
+ let u = r, d = r, p = r;
297
+ if (s !== 0) {
298
+ const g = r < 0.5 ? r * (1 + s) : r + s - r * s, l = 2 * r - g;
299
+ u = this.hueToRgb(l, g, i + 1 / 3), d = this.hueToRgb(l, g, i), p = this.hueToRgb(l, g, i - 1 / 3);
408
300
  }
409
- return l *= 255, g *= 255, w *= 255, new s(l, g, w, k);
301
+ return u *= 255, d *= 255, p *= 255, new a(u, d, p, v);
410
302
  }
411
- hueToRgb(e, i, t) {
412
- return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? e + (i - e) * 6 * t : t < 1 / 2 ? i : t < 2 / 3 ? e + (i - e) * (2 / 3 - t) * 6 : e;
303
+ hueToRgb(t, i, s) {
304
+ return s < 0 && (s += 1), s > 1 && (s -= 1), s < 1 / 6 ? t + (i - t) * 6 * s : s < 1 / 2 ? i : s < 2 / 3 ? t + (i - t) * (2 / 3 - s) * 6 : t;
413
305
  }
414
306
  /**
415
307
  * The Red, Green, Blue values are given in the range of 0..255,
@@ -424,10 +316,10 @@ class I {
424
316
  * Green = 255 × 1 - min(1 - Magenta ÷ 100) × (1 - Black)
425
317
  * Blue = 255 × 1 - min(1 - Yellow ÷ 100) × (1 - Black)
426
318
  */
427
- cmykToRgba(e) {
428
- const i = e.black / 100, t = e.cyan / 100, r = e.magenta / 100, k = e.yellow / 100;
429
- let l = Math.min(1, (1 - t) * (1 - i)), g = Math.min(1, (1 - r) * (1 - i)), w = Math.min(1, (1 - k) * (1 - i));
430
- return l *= 255, g *= 255, w *= 255, new s(l, g, w, 1);
319
+ cmykToRgba(t) {
320
+ const i = t.black / 100, s = t.cyan / 100, r = t.magenta / 100, v = t.yellow / 100;
321
+ let u = Math.min(1, (1 - s) * (1 - i)), d = Math.min(1, (1 - r) * (1 - i)), p = Math.min(1, (1 - v) * (1 - i));
322
+ return u *= 255, d *= 255, p *= 255, new a(u, d, p, 1);
431
323
  }
432
324
  /**
433
325
  * The max number of R, G, B values are 255, first of all, we divided them by 255 to become the number
@@ -452,118 +344,118 @@ class I {
452
344
  * The yellow color(Y) is calculated from the blue and black colors:
453
345
  * Y = (1 - Bc - K) ÷ ( 1 - K)
454
346
  */
455
- rgbaToCmyk(e) {
456
- const i = e.red / 255, t = e.green / 255, r = e.blue / 255;
457
- let k = 1 - i, l = 1 - t, g = 1 - r, w = Math.min(k, l, g);
458
- return w === 1 ? new pe(0, 0, 0, 1) : (k = (k - w) / (1 - w), l = (l - w) / (1 - w), g = (g - w) / (1 - w), w *= 100, k *= 100, l *= 100, g *= 100, new pe(k, l, g, w));
347
+ rgbaToCmyk(t) {
348
+ const i = t.red / 255, s = t.green / 255, r = t.blue / 255;
349
+ let v = 1 - i, u = 1 - s, d = 1 - r, p = Math.min(v, u, d);
350
+ return p === 1 ? new T(0, 0, 0, 1) : (v = (v - p) / (1 - p), u = (u - p) / (1 - p), d = (d - p) / (1 - p), p *= 100, v *= 100, u *= 100, d *= 100, new T(v, u, d, p));
459
351
  }
460
- roundNumber(e) {
461
- return Math.round(e * 100) / 100;
352
+ roundNumber(t) {
353
+ return Math.round(t * 100) / 100;
462
354
  }
463
- stringToColor(e) {
464
- const i = e.replace(/ /g, "").toLowerCase();
465
- let t = ge[e] || null;
355
+ stringToColor(t) {
356
+ const i = t.replace(/ /g, "").toLowerCase();
357
+ let s = _[t] || null;
466
358
  if (i[0] === "#") {
467
- let l = i.substr(1);
468
- const { length: g } = l;
469
- let w = 1, m;
470
- if (g === 3)
471
- m = l.split("").map((h) => h + h);
472
- else if (g === 6)
473
- m = l.match(/.{2}/g);
474
- else if (g === 8) {
475
- const h = l.substr(-2);
476
- l = l.substr(0, g - 2), w = this.roundNumber(parseInt(h || "FF", 16) / 255), m = l.match(/.{2}/g);
359
+ let u = i.substr(1);
360
+ const { length: d } = u;
361
+ let p = 1, g;
362
+ if (d === 3)
363
+ g = u.split("").map((l) => l + l);
364
+ else if (d === 6)
365
+ g = u.match(/.{2}/g);
366
+ else if (d === 8) {
367
+ const l = u.substr(-2);
368
+ u = u.substr(0, d - 2), p = this.roundNumber(parseInt(l || "FF", 16) / 255), g = u.match(/.{2}/g);
477
369
  }
478
- m && m.length === 3 && (t = new s(parseInt(m[0], 16), parseInt(m[1], 16), parseInt(m[2], 16), w));
370
+ g && g.length === 3 && (s = new a(parseInt(g[0], 16), parseInt(g[1], 16), parseInt(g[2], 16), p));
479
371
  }
480
- const r = i.indexOf("("), k = i.indexOf(")");
481
- if (r !== -1 && k + 1 === i.length) {
482
- const l = i.substr(0, r), g = i.substr(r + 1, k - (r + 1)).split(",");
483
- let w = 1, m, h;
484
- switch (l) {
372
+ const r = i.indexOf("("), v = i.indexOf(")");
373
+ if (r !== -1 && v + 1 === i.length) {
374
+ const u = i.substr(0, r), d = i.substr(r + 1, v - (r + 1)).split(",");
375
+ let p = 1, g, l;
376
+ switch (u) {
485
377
  case "rgba":
486
- w = parseFloat(g.pop());
378
+ p = parseFloat(d.pop());
487
379
  case "rgb":
488
- t = new s(parseInt(g[0], 10), parseInt(g[1], 10), parseInt(g[2], 10), w);
380
+ s = new a(parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10), p);
489
381
  break;
490
382
  case "hsla":
491
- w = parseFloat(g.pop());
383
+ p = parseFloat(d.pop());
492
384
  break;
493
385
  case "hsl":
494
- m = new ee(
495
- parseInt(g[0], 10),
496
- parseInt(g[1], 10),
497
- parseInt(g[2], 10),
498
- w
499
- ), t = this.hslaToRgba(m);
386
+ g = new F(
387
+ parseInt(d[0], 10),
388
+ parseInt(d[1], 10),
389
+ parseInt(d[2], 10),
390
+ p
391
+ ), s = this.hslaToRgba(g);
500
392
  break;
501
393
  case "cmyk":
502
- h = new pe(
503
- parseInt(g[0], 10),
504
- parseInt(g[1], 10),
505
- parseInt(g[2], 10),
506
- parseInt(g[3], 10)
507
- ), t = this.cmykToRgba(h);
394
+ l = new T(
395
+ parseInt(d[0], 10),
396
+ parseInt(d[1], 10),
397
+ parseInt(d[2], 10),
398
+ parseInt(d[3], 10)
399
+ ), s = this.cmykToRgba(l);
508
400
  break;
509
401
  }
510
402
  }
511
- return t && (this.rgba = t, this.hsva = this.rgbaToHsva(t)), this;
403
+ return s && (this.rgba = s, this.hsva = this.rgbaToHsva(s)), this;
512
404
  }
513
405
  }
514
- var B = /* @__PURE__ */ ((u) => (u.hex = "hex", u.hexa = "hexa", u.rgba = "rgba", u.rgb = "rgb", u.hsla = "hsla", u.hsl = "hsl", u.cmyk = "cmyk", u))(B || {});
515
- class me {
516
- constructor(e) {
406
+ var x = /* @__PURE__ */ ((c) => (c.hex = "hex", c.hexa = "hexa", c.rgba = "rgba", c.rgb = "rgb", c.hsla = "hsla", c.hsl = "hsl", c.cmyk = "cmyk", c))(x || {});
407
+ class it {
408
+ constructor(t) {
517
409
  /** 所选颜色值 */
518
- n(this, "modelValue", null);
410
+ e(this, "modelValue", null);
519
411
  /** 色调颜色值 */
520
- n(this, "hueValue", null);
412
+ e(this, "hueValue", null);
521
413
  /** 初始颜色值 */
522
- n(this, "initValue", null);
523
- n(this, "valueChanged", b());
524
- n(this, "initType", null);
414
+ e(this, "initValue", null);
415
+ e(this, "valueChanged", k());
416
+ e(this, "initType", null);
525
417
  // 此处没有监听变量变更后操作的方法 TODO
526
- n(this, "alphaChannelVisibilityChanges", b());
527
- n(this, "colorPresets", []);
528
- const i = e[0], t = I.from(i);
529
- this.setValue(t), this.setHueColor(t);
418
+ e(this, "alphaChannelVisibilityChanges", k());
419
+ e(this, "colorPresets", []);
420
+ const i = t[0], s = P.from(i);
421
+ this.setValue(s), this.setHueColor(s);
530
422
  }
531
423
  /** 设置值 */
532
- setValueFrom(e, i, t) {
533
- const r = I.from(e);
534
- return this.initValue || (this.initValue = I.from(e)), typeof e == "string" && this.finOutInputType(e), this.setHueColor(r), this.setValue(r), this;
424
+ setValueFrom(t, i, s) {
425
+ const r = P.from(t);
426
+ return this.initValue || (this.initValue = P.from(t)), typeof t == "string" && this.finOutInputType(t), this.setHueColor(r), this.setValue(r), this;
535
427
  }
536
- setHueColor(e) {
537
- (this.hueValue && e.getHsva().hue > 0 || !this.hueValue) && (this.hueValue = new I().setHsva(e.getHsva().hue));
428
+ setHueColor(t) {
429
+ (this.hueValue && t.getHsva().hue > 0 || !this.hueValue) && (this.hueValue = new P().setHsva(t.getHsva().hue));
538
430
  }
539
431
  get hue() {
540
432
  return this.hueValue;
541
433
  }
542
- set hue(e) {
543
- this.hueValue = e;
434
+ set hue(t) {
435
+ this.hueValue = t;
544
436
  }
545
- setValue(e) {
437
+ setValue(t) {
546
438
  var i;
547
- return this.modelValue = e, (e == null ? void 0 : e.toRgbaString()) === ((i = this.valueChanged.value) == null ? void 0 : i.toRgbaString()) && (this.valueChanged.value = e), this;
439
+ return this.modelValue = t, (t == null ? void 0 : t.toRgbaString()) === ((i = this.valueChanged.value) == null ? void 0 : i.toRgbaString()) && (this.valueChanged.value = t), this;
548
440
  }
549
441
  get value() {
550
442
  return this.modelValue;
551
443
  }
552
- set value(e) {
553
- this.setValue(e);
444
+ set value(t) {
445
+ this.setValue(t);
554
446
  }
555
447
  reset() {
556
- let e;
557
- return this.initValue ? (e = this.initValue.clone(), this.setHueColor(e)) : (e = I.from(new s(255, 0, 0, 1)), this.hueValue = new I().setHsva(e.getHsva().hue)), this.setValue(e), this;
448
+ let t;
449
+ return this.initValue ? (t = this.initValue.clone(), this.setHueColor(t)) : (t = P.from(new a(255, 0, 0, 1)), this.hueValue = new P().setHsva(t.getHsva().hue)), this.setValue(t), this;
558
450
  }
559
451
  showAlphaChannel() {
560
452
  return this.alphaChannelVisibilityChanges.value = !0, this;
561
453
  }
562
- finOutInputType(e) {
563
- const i = e.replace(/ /g, "").toLowerCase();
454
+ finOutInputType(t) {
455
+ const i = t.replace(/ /g, "").toLowerCase();
564
456
  i[0] === "#" && (this.initType = "hex", i.length > 7 && (this.initType = "hexa"));
565
- const t = i.indexOf("(");
566
- switch (i.substr(0, t)) {
457
+ const s = i.indexOf("(");
458
+ switch (i.substr(0, s)) {
567
459
  case "rgba":
568
460
  this.initType = "rgba";
569
461
  break;
@@ -582,13 +474,13 @@ class me {
582
474
  }
583
475
  }
584
476
  /** 设置预定义颜色 */
585
- setColorPresets(e) {
586
- return this.colorPresets = this.setPresets(e), this;
477
+ setColorPresets(t) {
478
+ return this.colorPresets = this.setPresets(t), this;
587
479
  }
588
- setPresets(e) {
480
+ setPresets(t) {
589
481
  const i = [];
590
- return e.map((t) => {
591
- Array.isArray(t) ? i.push(this.setPresets(t)) : i.push(new I(t));
482
+ return t.map((s) => {
483
+ Array.isArray(s) ? i.push(this.setPresets(s)) : i.push(new P(s));
592
484
  }), i;
593
485
  }
594
486
  get presets() {
@@ -599,101 +491,101 @@ class me {
599
491
  }
600
492
  }
601
493
  /** 确定输入颜色类型 */
602
- n(me, "finOutInputType");
603
- function V(u, e) {
604
- if (!u)
494
+ e(it, "finOutInputType");
495
+ function O(c, t) {
496
+ if (!c)
605
497
  return "";
606
- switch (e) {
607
- case B.hex:
608
- return u.toHexString();
609
- case B.hexa:
610
- return u.toHexString(!0);
611
- case B.rgb:
612
- return u.toRgbString();
613
- case B.rgba:
614
- return u.toRgbaString();
615
- case B.hsl:
616
- return u.toHslString();
617
- case B.hsla:
618
- return u.toHslaString();
498
+ switch (t) {
499
+ case x.hex:
500
+ return c.toHexString();
501
+ case x.hexa:
502
+ return c.toHexString(!0);
503
+ case x.rgb:
504
+ return c.toRgbString();
505
+ case x.rgba:
506
+ return c.toRgbaString();
507
+ case x.hsl:
508
+ return c.toHslString();
509
+ case x.hsla:
510
+ return c.toHslaString();
619
511
  default:
620
- return u.toRgbaString();
512
+ return c.toRgbaString();
621
513
  }
622
514
  }
623
- const ze = {
515
+ const Pt = {
624
516
  color: { type: Object, default: "" },
625
517
  hue: { type: Object, default: "" },
626
518
  randomId: { type: String, default: "" },
627
519
  allowColorNull: { type: Boolean, default: !1 }
628
- }, be = /* @__PURE__ */ Z({
520
+ }, Ht = /* @__PURE__ */ U({
629
521
  name: "SvPanel",
630
- props: ze,
522
+ props: Pt,
631
523
  emits: ["update:color"],
632
- setup(u, e) {
633
- const i = b(null), t = b(null), r = b(u.randomId), k = b(u.allowColorNull);
634
- function l() {
635
- return u.hue ? u.hue.toRgbaString() : "#3f51b5";
636
- }
637
- function g(d, v) {
638
- var P, p;
639
- d = Math.max(0, Math.min(d, 100)), v = Math.max(0, Math.min(v, 100)), i.value && ((P = i.value.style) == null || P.setProperty("top", `${100 - v}%`), (p = i.value.style) == null || p.setProperty("left", `${d}%`));
640
- }
641
- function w() {
642
- const d = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
643
- d.className = "btn btn-secondary";
644
- const v = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
645
- v.style.borderColor = "#dcdfe6";
646
- }
647
- function m({
648
- x: d,
649
- y: v,
650
- height: P,
651
- width: p
524
+ setup(c, t) {
525
+ const i = k(null), s = k(null), r = k(c.randomId), v = k(c.allowColorNull);
526
+ function u() {
527
+ return c.hue ? c.hue.toRgbaString() : "#3f51b5";
528
+ }
529
+ function d(o, f) {
530
+ var b, w;
531
+ o = Math.max(0, Math.min(o, 100)), f = Math.max(0, Math.min(f, 100)), i.value && ((b = i.value.style) == null || b.setProperty("top", `${100 - f}%`), (w = i.value.style) == null || w.setProperty("left", `${o}%`));
532
+ }
533
+ function p() {
534
+ const o = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
535
+ o.className = "btn btn-secondary";
536
+ const f = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
537
+ f.style.borderColor = "#dcdfe6";
538
+ }
539
+ function g({
540
+ x: o,
541
+ y: f,
542
+ height: b,
543
+ width: w
652
544
  }) {
653
- const c = d * 100 / p, M = -(v * 100 / P) + 100;
654
- g(c, M);
655
- const S = u.color == null ? "transparent" : u.color, H = I.from(S);
656
- if (w(), H != null) {
657
- const $ = u.hue.getHsva(), F = H.getHsva(), A = new I().setHsva($.hue, c, M, F.alpha);
658
- e.emit("update:color", A);
545
+ const m = o * 100 / w, M = -(f * 100 / b) + 100;
546
+ d(m, M);
547
+ const H = c.color == null ? "transparent" : c.color, I = P.from(H);
548
+ if (p(), I != null) {
549
+ const B = c.hue.getHsva(), V = I.getHsva(), N = new P().setHsva(B.hue, m, M, V.alpha);
550
+ t.emit("update:color", N);
659
551
  }
660
- !H && k.value && e.emit("update:color", null);
552
+ !I && v.value && t.emit("update:color", null);
661
553
  }
662
- function h(d) {
663
- if (t.value) {
554
+ function l(o) {
555
+ if (s.value) {
664
556
  const {
665
- width: v,
666
- height: P,
667
- top: p,
668
- left: c
669
- } = t.value.getBoundingClientRect(), {
557
+ width: f,
558
+ height: b,
559
+ top: w,
560
+ left: m
561
+ } = s.value.getBoundingClientRect(), {
670
562
  pageX: M,
671
- pageY: S
672
- } = "touches" in d ? d.touches[0] : d, H = Math.max(0, Math.min(M - (c + window.pageXOffset), v)), $ = Math.max(0, Math.min(S - (p + window.pageYOffset), P));
673
- m({
674
- x: H,
675
- y: $,
676
- height: P,
677
- width: v
563
+ pageY: H
564
+ } = "touches" in o ? o.touches[0] : o, I = Math.max(0, Math.min(M - (m + window.pageXOffset), f)), B = Math.max(0, Math.min(H - (w + window.pageYOffset), b));
565
+ g({
566
+ x: I,
567
+ y: B,
568
+ height: b,
569
+ width: f
678
570
  });
679
571
  }
680
572
  }
681
- return K(() => {
682
- const d = u.color.getHsva();
683
- g(d.saturation, d.value);
684
- }), E(() => u.color, (d) => {
685
- d.getHsva();
686
- }), E(() => u.color, (d) => {
687
- const v = d.getHsva();
688
- g(v.saturation, v.value);
573
+ return G(() => {
574
+ const o = c.color.getHsva();
575
+ d(o.saturation, o.value);
576
+ }), $(() => c.color, (o) => {
577
+ o.getHsva();
578
+ }), $(() => c.color, (o) => {
579
+ const f = o.getHsva();
580
+ d(f.saturation, f.value);
689
581
  }), () => y("div", {
690
582
  class: "f-sv-panel-component",
691
- ref: t,
583
+ ref: s,
692
584
  style: {
693
- backgroundColor: l()
585
+ backgroundColor: u()
694
586
  },
695
- onMousedown: Q((d) => h(d), ["prevent"]),
696
- onTouchstart: Q((d) => h(d), ["prevent"])
587
+ onMousedown: j((o) => l(o), ["prevent"]),
588
+ onTouchstart: j((o) => l(o), ["prevent"])
697
589
  }, [y("div", {
698
590
  class: "color-svpanel__white"
699
591
  }, null), y("div", {
@@ -703,603 +595,401 @@ const ze = {
703
595
  ref: i
704
596
  }, [y("div", null, null)])]);
705
597
  }
706
- }), Je = {
598
+ }), St = {
707
599
  color: { type: Object, default: "" },
708
600
  hue: { type: Object, default: "" },
709
601
  allowColorNull: { type: Boolean, default: !1 },
710
602
  onChange: { type: Function }
711
- }, Pe = /* @__PURE__ */ Z({
603
+ }, It = /* @__PURE__ */ U({
712
604
  name: "Hue",
713
- props: Je,
605
+ props: St,
714
606
  emits: ["update:color", "update:hue"],
715
- setup(u, e) {
716
- const i = b(u.hue), t = b(u.allowColorNull), r = [];
717
- function k(p) {
718
- p.preventDefault(), g(p);
719
- }
720
- const l = b(null);
721
- function g(p) {
722
- if (l.value) {
607
+ setup(c, t) {
608
+ const i = k(c.hue), s = k(c.allowColorNull), r = [];
609
+ function v(w) {
610
+ w.preventDefault(), d(w);
611
+ }
612
+ const u = k(null);
613
+ function d(w) {
614
+ if (u.value) {
723
615
  const {
724
- width: c,
616
+ width: m,
725
617
  height: M,
726
- top: S,
727
- left: H
728
- } = l.value.getBoundingClientRect(), {
729
- pageX: $,
730
- pageY: F
731
- } = "touches" in p ? p.touches[0] : p, A = Math.max(0, Math.min($ - (H + window.pageXOffset), c)), X = Math.max(0, Math.min(F - (S + window.pageYOffset), M));
732
- P({
733
- x: A,
618
+ top: H,
619
+ left: I
620
+ } = u.value.getBoundingClientRect(), {
621
+ pageX: B,
622
+ pageY: V
623
+ } = "touches" in w ? w.touches[0] : w, N = Math.max(0, Math.min(B - (I + window.pageXOffset), m)), X = Math.max(0, Math.min(V - (H + window.pageYOffset), M));
624
+ b({
625
+ x: N,
734
626
  y: X,
735
627
  height: M,
736
- width: c
628
+ width: m
737
629
  });
738
630
  }
739
631
  }
740
- function w() {
741
- r.forEach((p) => p()), r.length = 0;
632
+ function p() {
633
+ r.forEach((w) => w()), r.length = 0;
742
634
  }
743
- function m(p) {
744
- k(p), document.addEventListener("mouseup", w), document.addEventListener("touchend", w), document.addEventListener("touchmove", k);
635
+ function g(w) {
636
+ v(w), document.addEventListener("mouseup", p), document.addEventListener("touchend", p), document.addEventListener("touchmove", v);
745
637
  }
746
- const h = (p) => {
747
- m(p), p.stopPropagation();
638
+ const l = (w) => {
639
+ g(w), w.stopPropagation();
748
640
  };
749
- K(() => {
641
+ G(() => {
750
642
  document.querySelectorAll(".f-hue-component").forEach((M) => {
751
- M.addEventListener("mousedown", h), M.addEventListener("touchstart", h);
643
+ M.addEventListener("mousedown", l), M.addEventListener("touchstart", l);
752
644
  });
753
- const c = u.color.getHsva();
754
- v(c.hue);
645
+ const m = c.color.getHsva();
646
+ f(m.hue);
755
647
  });
756
- const d = b(null);
757
- function v(p) {
758
- var S;
759
- const c = Math.max(0, Math.min(p / 360 * 100, 100));
760
- d.value && ((S = d.value.style) == null || S.setProperty("top", `${c}%`));
761
- }
762
- function P({
763
- x: p,
764
- y: c,
648
+ const o = k(null);
649
+ function f(w) {
650
+ var H;
651
+ const m = Math.max(0, Math.min(w / 360 * 100, 100));
652
+ o.value && ((H = o.value.style) == null || H.setProperty("top", `${m}%`));
653
+ }
654
+ function b({
655
+ x: w,
656
+ y: m,
765
657
  height: M,
766
- width: S
658
+ width: H
767
659
  }) {
768
- const H = c / M * 360;
769
- v(H);
770
- const $ = u.color.getHsva(), F = new I().setHsva(H, $.saturation, $.value, $.alpha), A = new I().setHsva(H, 100, 100, $.alpha);
771
- (u.color != null || u.color == null && t.value) && (e.emit("update:hue", A), e.emit("update:color", F));
772
- }
773
- return E(i, (p) => {
774
- const c = p.getHsva();
775
- v(c.hue);
776
- }), E(() => u.color, (p) => {
777
- const c = p.getHsva();
778
- v(c.hue);
660
+ const I = m / M * 360;
661
+ f(I);
662
+ const B = c.color.getHsva(), V = new P().setHsva(I, B.saturation, B.value, B.alpha), N = new P().setHsva(I, 100, 100, B.alpha);
663
+ (c.color != null || c.color == null && s.value) && (t.emit("update:hue", N), t.emit("update:color", V));
664
+ }
665
+ return $(i, (w) => {
666
+ const m = w.getHsva();
667
+ f(m.hue);
668
+ }), $(() => c.color, (w) => {
669
+ const m = w.getHsva();
670
+ f(m.hue);
779
671
  }), () => y("div", {
780
672
  class: "f-hue-component",
781
- ref: l,
782
- onMousedown: Q((p) => g(p), ["prevent"]),
783
- onTouchstart: Q((p) => g(p), ["prevent"])
673
+ ref: u,
674
+ onMousedown: j((w) => d(w), ["prevent"]),
675
+ onTouchstart: j((w) => d(w), ["prevent"])
784
676
  }, [y("div", {
785
677
  class: "color-hue-slider__bar"
786
678
  }, null), y("div", {
787
679
  class: "color-hue-slider__thumb",
788
- ref: d
680
+ ref: o
789
681
  }, null)]);
790
682
  }
791
- }), Ke = {
683
+ }), Mt = {
792
684
  color: { type: Object, default: "" },
793
685
  randomId: { type: String, default: "" },
794
686
  allowColorNull: { type: Boolean, default: !1 }
795
- }, Ie = /* @__PURE__ */ Z({
687
+ }, xt = /* @__PURE__ */ U({
796
688
  name: "Alpha",
797
- props: Ke,
689
+ props: Mt,
798
690
  emits: ["update:color"],
799
- setup(u, e) {
800
- const i = b(null), t = b(null), r = b(u.randomId), k = b(u.allowColorNull), l = (h) => {
801
- var P;
802
- const d = Math.max(0, Math.min(h * 100, 100));
803
- t.value && ((P = t.value.style) == null || P.setProperty("left", `${d}%`));
691
+ setup(c, t) {
692
+ const i = k(null), s = k(null), r = k(c.randomId), v = k(c.allowColorNull), u = (l) => {
693
+ var b;
694
+ const o = Math.max(0, Math.min(l * 100, 100));
695
+ s.value && ((b = s.value.style) == null || b.setProperty("left", `${o}%`));
804
696
  };
805
- function g(h) {
697
+ function d(l) {
806
698
  if (i.value) {
807
699
  const {
808
- width: d,
809
- height: v,
810
- top: P,
811
- left: p
700
+ width: o,
701
+ height: f,
702
+ top: b,
703
+ left: w
812
704
  } = i.value.getBoundingClientRect(), {
813
- pageX: c,
705
+ pageX: m,
814
706
  pageY: M
815
- } = "touches" in h ? h.touches[0] : h, S = Math.max(0, Math.min(c - (p + window.pageXOffset), d));
816
- m({
817
- x: S,
818
- width: d
707
+ } = "touches" in l ? l.touches[0] : l, H = Math.max(0, Math.min(m - (w + window.pageXOffset), o));
708
+ g({
709
+ x: H,
710
+ width: o
819
711
  });
820
712
  }
821
713
  }
822
- function w() {
823
- const h = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
824
- h.className = "btn btn-secondary";
825
- const d = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
826
- d.style.borderColor = "#dcdfe6";
714
+ function p() {
715
+ const l = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
716
+ l.className = "btn btn-secondary";
717
+ const o = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
718
+ o.style.borderColor = "#dcdfe6";
827
719
  }
828
- const m = ({
829
- x: h,
830
- width: d
720
+ const g = ({
721
+ x: l,
722
+ width: o
831
723
  }) => {
832
- const v = h / d;
833
- l(v), w();
834
- const P = u.color.getHsva(), p = new I().setHsva(P.hue, P.saturation, P.value, v);
835
- u.color != null ? e.emit("update:color", p) : u.color == null && k.value && e.emit("update:color", null);
724
+ const f = l / o;
725
+ u(f), p();
726
+ const b = c.color.getHsva(), w = new P().setHsva(b.hue, b.saturation, b.value, f);
727
+ c.color != null ? t.emit("update:color", w) : c.color == null && v.value && t.emit("update:color", null);
836
728
  };
837
- return K(() => {
838
- const h = u.color.getHsva();
839
- l(h.alpha);
840
- }), E(() => u.color, (h) => {
841
- const d = h.getHsva();
842
- l(d.alpha);
729
+ return G(() => {
730
+ const l = c.color.getHsva();
731
+ u(l.alpha);
732
+ }), $(() => c.color, (l) => {
733
+ const o = l.getHsva();
734
+ u(o.alpha);
843
735
  }), () => y("div", {
844
736
  class: "f-alpha-component",
845
737
  ref: i,
846
- onMousedown: Q((h) => g(h), ["prevent"]),
847
- onTouchstart: Q((h) => g(h), ["prevent"])
738
+ onMousedown: j((l) => d(l), ["prevent"]),
739
+ onTouchstart: j((l) => d(l), ["prevent"])
848
740
  }, [y("div", {
849
741
  class: "color-alpha-slider__bar"
850
- }, [fe(" ")]), y("div", {
742
+ }, [st(" ")]), y("div", {
851
743
  class: "color-alpha-slider__thumb",
852
- ref: t
744
+ ref: s
853
745
  }, null)]);
854
746
  }
855
- }), Qe = {
747
+ }), Bt = {
856
748
  color: { type: Object, default: "" },
857
749
  hue: { type: Object, default: "" },
858
750
  colorPresets: { type: Object, default: "" },
859
751
  randomId: { type: String, default: "" }
860
- }, Se = /* @__PURE__ */ Z({
752
+ }, Rt = /* @__PURE__ */ U({
861
753
  name: "Preset",
862
- props: Qe,
754
+ props: Bt,
863
755
  emits: ["update:hue", "update:color"],
864
- setup(u, e) {
865
- const i = b(new I()), t = b(u.colorPresets), r = b(u.randomId);
866
- function k() {
867
- const m = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
868
- m.className = "btn btn-secondary";
869
- const h = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
870
- h.style.borderColor = "#dcdfe6";
871
- }
872
- function l(m) {
873
- k();
874
- const h = m.getRgba(), d = m.getHsva(), v = new I().setRgba(h.red, h.green, h.blue, h.alpha), P = new I().setHsva(d.hue);
875
- i.value = m, e.emit("update:hue", P), e.emit("update:color", v);
876
- }
877
- function g(m) {
878
- const h = i.value.getRgba().toString(), d = i.value.getHsva().toString(), v = m.getRgba().toString() === h && m.getHsva().toString() === d;
756
+ setup(c, t) {
757
+ const i = k(new P()), s = k(c.colorPresets), r = k(c.randomId);
758
+ function v() {
759
+ const g = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
760
+ g.className = "btn btn-secondary";
761
+ const l = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
762
+ l.style.borderColor = "#dcdfe6";
763
+ }
764
+ function u(g) {
765
+ v();
766
+ const l = g.getRgba(), o = g.getHsva(), f = new P().setRgba(l.red, l.green, l.blue, l.alpha), b = new P().setHsva(o.hue);
767
+ i.value = g, t.emit("update:hue", b), t.emit("update:color", f);
768
+ }
769
+ function d(g) {
770
+ const l = i.value.getRgba().toString(), o = i.value.getHsva().toString(), f = g.getRgba().toString() === l && g.getHsva().toString() === o;
879
771
  return {
880
- "color-preset__color-selector": v,
881
- selected: v
772
+ "color-preset__color-selector": f,
773
+ selected: f
882
774
  };
883
775
  }
884
- function w(m, h) {
776
+ function p(g, l) {
885
777
  return y("div", {
886
778
  class: "color-preset__color-selector"
887
779
  }, [y("div", {
888
- key: h,
889
- class: g(m),
780
+ key: l,
781
+ class: d(g),
890
782
  style: {
891
- backgroundColor: m.toRgbString()
783
+ backgroundColor: g.toRgbString()
892
784
  },
893
- onClick: () => l(m)
785
+ onClick: () => u(g)
894
786
  }, null)]);
895
787
  }
896
788
  return () => y("div", {
897
789
  class: "f-preset-component"
898
790
  }, [y("div", {
899
791
  class: "color-preset__colors"
900
- }, [t.value.map((m, h) => w(m, h))])]);
792
+ }, [s.value.map((g, l) => p(g, l))])]);
901
793
  }
902
- }), se = /* @__PURE__ */ Z({
794
+ }), $t = /* @__PURE__ */ U({
903
795
  name: "FColorPicker",
904
- props: ve,
796
+ props: bt,
905
797
  emits: ["valueChanged", "activeChange", "update:color", "update:hue"],
906
- setup(u, e) {
907
- const i = b(new I(u.color)), t = b(u.color), r = b(u.disabled), k = b(u.color), l = b(u.allowColorNull), g = b(u.presets), w = b(!1), m = b(!1), h = b(!1), d = b("HEX"), v = Math.floor(Math.random() * 1e3).toString();
908
- let P = -1, p;
909
- const c = new me("#000000"), M = b(u.color);
910
- let S, H;
911
- const $ = b(null), F = b(null), A = b(null), X = O(() => !p && c && c.initType ? c.initType : p), R = O({
798
+ setup(c, t) {
799
+ const i = k(new P(c.color)), s = k(c.color), r = k(c.disabled), v = k(c.color), u = k(c.allowColorNull), d = k(c.presets), p = k(!1), g = k(!1), l = k(!1), o = k("HEX"), f = Math.floor(Math.random() * 1e3).toString();
800
+ let b = -1, w;
801
+ const m = new it("#000000"), M = k(c.color);
802
+ let H, I;
803
+ const B = k(null), V = k(null), N = k(null), X = L(() => !w && m && m.initType ? m.initType : w), R = L({
912
804
  get() {
913
- return p && t.value !== null ? (_(p), V(new I(t.value), B[p])) : t.value;
805
+ return w && s.value !== null ? (Q(w), O(new P(s.value), x[w])) : s.value;
914
806
  },
915
- set(f) {
916
- f !== null && (U(f), W(f));
807
+ set(h) {
808
+ h !== null && (E(h), nt(h));
917
809
  }
918
- }), C = b(R.value), N = O(() => P > -1), Y = O(() => g.value.length > 0), re = O(() => ({
919
- "background-color": k.value
920
- })), ne = O(() => m.value && w.value ? "display:flex" : "display:none"), G = [{
810
+ }), z = k(R.value), rt = L(() => b > -1), tt = L(() => d.value.length > 0), ut = L(() => ({
811
+ "background-color": v.value
812
+ })), ct = L(() => g.value && p.value ? "display:flex" : "display:none"), D = [{
921
813
  text: "HEX",
922
- type: B.hex
814
+ type: x.hex
923
815
  }, {
924
816
  text: "RGBA",
925
- type: B.rgba
817
+ type: x.rgba
926
818
  }];
927
- function le() {
928
- const f = document.getElementById("farris-color-picker-panel");
929
- f.id = `farris-color-picker-panel-${v}`;
930
- const o = document.getElementById("farris-color-picker-plus-sure");
931
- o.id = `farris-color-picker-plus-sure-${v}`;
932
- const x = document.getElementById("farris-color-picker-plus-input");
933
- x.id = `farris-color-picker-plus-input-${v}`, H = document.getElementById(`farris-color-picker-plus-sure-${v}`), S = document.getElementById(`farris-color-picker-panel-${v}`), S.className = "color-picker-panel disabled";
934
- }
935
- function D() {
936
- if (!l.value && !t.value) {
937
- document.getElementById(`farris-color-picker-plus-sure-${v}`).classList.toggle("disabled");
938
- const o = document.getElementById(`farris-color-picker-plus-input-${v}`);
939
- o.style.borderColor = "red";
819
+ function lt() {
820
+ const h = document.getElementById("farris-color-picker-panel");
821
+ h.id = `farris-color-picker-panel-${f}`;
822
+ const S = document.getElementById("farris-color-picker-plus-sure");
823
+ S.id = `farris-color-picker-plus-sure-${f}`;
824
+ const A = document.getElementById("farris-color-picker-plus-input");
825
+ A.id = `farris-color-picker-plus-input-${f}`, I = document.getElementById(`farris-color-picker-plus-sure-${f}`), H = document.getElementById(`farris-color-picker-panel-${f}`), H.className = "color-picker-panel disabled";
826
+ }
827
+ function et() {
828
+ if (!u.value && !s.value) {
829
+ document.getElementById(`farris-color-picker-plus-sure-${f}`).classList.toggle("disabled");
830
+ const S = document.getElementById(`farris-color-picker-plus-input-${f}`);
831
+ S.style.borderColor = "red";
940
832
  }
941
833
  }
942
- function ue() {
943
- t.value && (U(t.value), !t.value && l.value || (t.value = V(new I(t.value), B[X.value])), C.value = R.value), T(_(c.initType));
834
+ function ot() {
835
+ s.value && (E(s.value), !s.value && u.value || (s.value = O(new P(s.value), x[X.value])), z.value = R.value), J(Q(m.initType));
944
836
  }
945
- function ae() {
946
- t.value && U(t.value), c.hasPresets() || c.setColorPresets(g.value), t.value ? k.value = V(new I(t.value), B[X.value]) : !t.value && l.value && (k.value = null);
837
+ function ht() {
838
+ s.value && E(s.value), m.hasPresets() || m.setColorPresets(d.value), s.value ? v.value = O(new P(s.value), x[X.value]) : !s.value && u.value && (v.value = null);
947
839
  }
948
- function oe() {
949
- E(c.valueChanged, (f) => {
950
- const o = V(f, B[p || c.initType]);
951
- t.value = o;
840
+ function dt() {
841
+ $(m.valueChanged, (h) => {
842
+ const S = O(h, x[w || m.initType]);
843
+ s.value = S;
952
844
  });
953
845
  }
954
- function T(f) {
955
- d.value = G[f].text;
956
- }
957
- function ce() {
958
- var f;
959
- m.value = !!(p != null && p.includes("a") || (f = c.initType) != null && f.includes("a"));
960
- }
961
- we(() => {
962
- c.setColorPresets(g.value || ["#eaecf3"]);
963
- }), K(() => {
964
- le(), D(), ue(), ae();
965
- }), oe(), E(d, () => {
966
- R.value = V(new I(t.value), B[p || c.initType]), i.value = new I(R.value), ce();
967
- }), E(t, (f) => {
968
- V(c.value, c.initType) !== f && f !== null && U(f), T(_(c.initType));
969
- }), E(i, (f) => {
970
- t.value = V(f, B[p || c.initType]), U(t.value), R.value = t.value;
846
+ function J(h) {
847
+ o.value = D[h].text;
848
+ }
849
+ function gt() {
850
+ var h;
851
+ g.value = !!(w != null && w.includes("a") || (h = m.initType) != null && h.includes("a"));
852
+ }
853
+ yt(() => {
854
+ m.setColorPresets(d.value || ["#eaecf3"]);
855
+ }), G(() => {
856
+ lt(), et(), ot(), ht();
857
+ }), dt(), $(o, () => {
858
+ R.value = O(new P(s.value), x[w || m.initType]), i.value = new P(R.value), gt();
859
+ }), $(s, (h) => {
860
+ O(m.value, m.initType) !== h && h !== null && E(h), J(Q(m.initType));
861
+ }), $(i, (h) => {
862
+ s.value = O(h, x[w || m.initType]), E(s.value), R.value = s.value;
971
863
  });
972
- function W(f) {
973
- const o = document.getElementById(`farris-color-picker-plus-input-${v}`);
974
- (f === "" || f === void 0 || f == null) && !l.value ? (t.value = null, o.style.borderColor = "red", H.className = "btn btn-secondary disabled") : (o.style.borderColor = "#dcdfe6", H.className = "btn btn-secondary");
975
- }
976
- function de(f) {
977
- var o, x;
978
- if (f == null || f.stopPropagation(), l.value) {
979
- k.value = (t == null ? void 0 : t.value) ?? null;
980
- const j = {
981
- elementValue: k
864
+ function nt(h) {
865
+ const S = document.getElementById(`farris-color-picker-plus-input-${f}`);
866
+ (h === "" || h === void 0 || h == null) && !u.value ? (s.value = null, S.style.borderColor = "red", I.className = "btn btn-secondary disabled") : (S.style.borderColor = "#dcdfe6", I.className = "btn btn-secondary");
867
+ }
868
+ function pt(h) {
869
+ var S, A;
870
+ if (h == null || h.stopPropagation(), u.value) {
871
+ v.value = (s == null ? void 0 : s.value) ?? null;
872
+ const Z = {
873
+ elementValue: v
982
874
  };
983
- e.emit("valueChanged", j), L();
875
+ t.emit("valueChanged", Z), K();
984
876
  }
985
- if (!l.value && !(R.value === void 0 || R.value == null || R.value === "")) {
986
- (x = (o = $.value) == null ? void 0 : o.style) == null || x.setProperty("background", t.value), h.value = !0, k.value = t.value;
987
- const j = {
988
- elementValue: k
877
+ if (!u.value && !(R.value === void 0 || R.value == null || R.value === "")) {
878
+ (A = (S = B.value) == null ? void 0 : S.style) == null || A.setProperty("background", s.value), l.value = !0, v.value = s.value;
879
+ const Z = {
880
+ elementValue: v
989
881
  };
990
- e.emit("valueChanged", j), L();
882
+ t.emit("valueChanged", Z), K();
991
883
  }
992
- !M.value && !t.value && !h.value && l && L(), W(t.value), R.value = t.value, H.classList.contains("disabled") || (C.value = t.value, w.value = !1);
884
+ !M.value && !s.value && !l.value && u && K(), nt(s.value), R.value = s.value, I.classList.contains("disabled") || (z.value = s.value, p.value = !1);
993
885
  }
994
- function U(f) {
995
- c == null || c.setValueFrom(f, v, l.value);
886
+ function E(h) {
887
+ m == null || m.setValueFrom(h, f, u.value);
996
888
  }
997
- function he(f) {
998
- S = document.getElementById(`farris-color-picker-panel-${v}`);
999
- const o = S.className === "color-picker-panel";
1000
- r.value || o || (w.value = !0, S.classList.toggle("disabled"), D(), U(t.value), f.stopPropagation());
889
+ function wt(h) {
890
+ H = document.getElementById(`farris-color-picker-panel-${f}`);
891
+ const S = H.className === "color-picker-panel";
892
+ r.value || S || (p.value = !0, H.classList.toggle("disabled"), et(), E(s.value), h.stopPropagation());
1001
893
  }
1002
- function L() {
1003
- S = document.getElementById(`farris-color-picker-panel-${v}`), S.className = "color-picker-panel disabled";
894
+ function K() {
895
+ H = document.getElementById(`farris-color-picker-panel-${f}`), H.className = "color-picker-panel disabled";
1004
896
  }
1005
- function _(f) {
1006
- const o = G.findIndex((x) => x.type === f);
1007
- return P = o, o;
897
+ function Q(h) {
898
+ const S = D.findIndex((A) => A.type === h);
899
+ return b = S, S;
1008
900
  }
1009
- function z(f) {
1010
- if (!H.classList.contains("disabled")) {
1011
- const o = G.length;
1012
- P = (o + P + (f === "up" ? 1 : -1)) % o, p = G[P].type, T(P), U(t.value);
901
+ function at(h) {
902
+ if (!I.classList.contains("disabled")) {
903
+ const S = D.length;
904
+ b = (S + b + (h === "up" ? 1 : -1)) % S, w = D[b].type, J(b), E(s.value);
1013
905
  }
1014
906
  }
1015
907
  return () => y("div", {
1016
908
  class: "f-color-picker-component",
1017
- ref: F
909
+ ref: V
1018
910
  }, [y("div", {
1019
911
  class: ["color-picker-panel", {
1020
912
  disabled: r.value
1021
913
  }],
1022
914
  id: "farris-color-picker-panel",
1023
- ref: A,
1024
- onClick: (f) => f.stopPropagation(),
915
+ ref: N,
916
+ onClick: (h) => h.stopPropagation(),
1025
917
  style: "top:30px"
1026
918
  }, [y("div", {
1027
919
  class: "color-picker-main"
1028
- }, [y(Pe, {
1029
- hue: c.hue,
1030
- "onUpdate:hue": (f) => c.hue = f,
1031
- allowColorNull: l.value,
920
+ }, [y(It, {
921
+ hue: m.hue,
922
+ "onUpdate:hue": (h) => m.hue = h,
923
+ allowColorNull: u.value,
1032
924
  color: i.value,
1033
- "onUpdate:color": (f) => i.value = f
1034
- }, null), y(be, {
1035
- randomId: v,
1036
- hue: c.hue,
1037
- "onUpdate:hue": (f) => c.hue = f,
1038
- allowColorNull: l.value,
925
+ "onUpdate:color": (h) => i.value = h
926
+ }, null), y(Ht, {
927
+ randomId: f,
928
+ hue: m.hue,
929
+ "onUpdate:hue": (h) => m.hue = h,
930
+ allowColorNull: u.value,
1039
931
  color: i.value,
1040
- "onUpdate:color": (f) => i.value = f
1041
- }, null)]), y(Ie, {
1042
- style: ne.value,
1043
- randomId: v,
1044
- allowColorNull: l.value,
932
+ "onUpdate:color": (h) => i.value = h
933
+ }, null)]), y(xt, {
934
+ style: ct.value,
935
+ randomId: f,
936
+ allowColorNull: u.value,
1045
937
  color: i.value,
1046
- "onUpdate:color": (f) => i.value = f
938
+ "onUpdate:color": (h) => i.value = h
1047
939
  }, null), y("div", {
1048
940
  class: "input-btn",
1049
941
  style: "display:flex;align-items: center;"
1050
- }, [q(y("span", {
942
+ }, [Y(y("span", {
1051
943
  style: "width:40px;margin-right:10px;"
1052
- }, [d.value]), [[J, Y]]), q(y("input", {
944
+ }, [o.value]), [[C, tt]]), Y(y("input", {
1053
945
  type: "text",
1054
946
  title: "color-picker-plus",
1055
947
  id: "farris-color-picker-plus-input",
1056
- "onUpdate:modelValue": (f) => R.value = f,
948
+ "onUpdate:modelValue": (h) => R.value = h,
1057
949
  style: "float:none"
1058
- }, null), [[ye, R.value]]), q(y("div", {
950
+ }, null), [[kt, R.value]]), Y(y("div", {
1059
951
  class: "type-icon-btn-wrapper",
1060
952
  style: "cursor:pointer"
1061
953
  }, [y("span", {
1062
954
  class: "f-icon f-icon-arrow-60-up type-icon-btn",
1063
- onClick: () => z("up")
955
+ onClick: () => at("up")
1064
956
  }, null), y("span", {
1065
957
  class: "f-icon f-icon-arrow-60-down type-icon-btn",
1066
- onClick: () => z("down")
1067
- }, null)]), [[J, Y]]), y("div", {
958
+ onClick: () => at("down")
959
+ }, null)]), [[C, tt]]), y("div", {
1068
960
  class: "input-btn"
1069
961
  }, [y("button", {
1070
962
  id: "farris-color-picker-plus-sure",
1071
963
  class: "btn btn-secondary",
1072
- onClick: (f) => de(f)
1073
- }, [fe("确定")])])]), q(y(Se, {
964
+ onClick: (h) => pt(h)
965
+ }, [st("确定")])])]), Y(y(Rt, {
1074
966
  color: i.value,
1075
- "onUpdate:color": (f) => i.value = f,
1076
- hue: c.hue,
1077
- "onUpdate:hue": (f) => c.hue = f,
1078
- randomId: v,
1079
- colorPresets: c.presets
1080
- }, null), [[J, N]])]), y("div", {
967
+ "onUpdate:color": (h) => i.value = h,
968
+ hue: m.hue,
969
+ "onUpdate:hue": (h) => m.hue = h,
970
+ randomId: f,
971
+ colorPresets: m.presets
972
+ }, null), [[C, rt]])]), y("div", {
1081
973
  class: "color-picker-wrapper"
1082
974
  }, [y("input", {
1083
975
  title: "color-picker-input",
1084
976
  type: "text",
1085
977
  class: "color-picker-input form-control",
1086
- value: C.value,
978
+ value: z.value,
1087
979
  readonly: r.value,
1088
- onClick: (f) => f.stopPropagation()
980
+ onClick: (h) => h.stopPropagation()
1089
981
  }, null), y("div", {
1090
982
  class: "color-picker-trigger",
1091
- onClick: he
983
+ onClick: wt
1092
984
  }, [y("div", {
1093
985
  class: "color-picker-trigger-inner"
1094
986
  }, [y("div", {
1095
- style: re.value
987
+ style: ut.value
1096
988
  }, null)])])])]);
1097
989
  }
1098
- }), Ze = /* @__PURE__ */ Z({
1099
- name: "FColorPickerDesign",
1100
- props: ve,
1101
- emits: ["valueChanged", "activeChange", "update:color", "update:hue"],
1102
- setup(u, e) {
1103
- const i = b(new I(u.color)), t = b(u.color), r = b(u.disabled), k = b(u.color), l = b(u.allowColorNull), g = b(u.presets), w = b(!1), m = b(!1), h = b(!1), d = b("HEX"), v = Math.floor(Math.random() * 1e3).toString();
1104
- let P = -1, p;
1105
- const c = new me("#000000"), M = b(u.color);
1106
- let S, H;
1107
- const $ = b(null), F = b(null), A = b(), X = Be("design-item-context"), R = Re(A, X);
1108
- K(() => {
1109
- A.value.componentInstance = R;
1110
- }), e.expose(R.value);
1111
- const C = O(() => !p && c && c.initType ? c.initType : p), N = O({
1112
- get() {
1113
- return p && t.value !== null ? (z(p), V(new I(t.value), B[p])) : t.value;
1114
- },
1115
- set(o) {
1116
- o !== null && (L(o), U(o));
1117
- }
1118
- }), Y = b(N.value), re = O(() => P > -1), ne = O(() => g.value.length > 0), G = O(() => ({
1119
- "background-color": k.value
1120
- })), le = O(() => m.value && w.value ? "display:flex" : "display:none"), D = [{
1121
- text: "HEX",
1122
- type: B.hex
1123
- }, {
1124
- text: "RGBA",
1125
- type: B.rgba
1126
- }];
1127
- function ue() {
1128
- const o = document.getElementById("farris-color-picker-panel");
1129
- o.id = `farris-color-picker-panel-${v}`;
1130
- const x = document.getElementById("farris-color-picker-plus-sure");
1131
- x.id = `farris-color-picker-plus-sure-${v}`;
1132
- const j = document.getElementById("farris-color-picker-plus-input");
1133
- j.id = `farris-color-picker-plus-input-${v}`, H = document.getElementById(`farris-color-picker-plus-sure-${v}`), S = document.getElementById(`farris-color-picker-panel-${v}`), S.className = "color-picker-panel disabled";
1134
- }
1135
- function ae() {
1136
- if (!l.value && !t.value) {
1137
- document.getElementById(`farris-color-picker-plus-sure-${v}`).classList.toggle("disabled");
1138
- const x = document.getElementById(`farris-color-picker-plus-input-${v}`);
1139
- x.style.borderColor = "red";
1140
- }
1141
- }
1142
- function oe() {
1143
- t.value && (L(t.value), !t.value && l.value || (t.value = V(new I(t.value), B[C.value])), Y.value = N.value), W(z(c.initType));
1144
- }
1145
- function T() {
1146
- t.value && L(t.value), c.hasPresets() || c.setColorPresets(g.value), t.value ? k.value = V(new I(t.value), B[C.value]) : !t.value && l.value && (k.value = null);
1147
- }
1148
- function ce() {
1149
- E(c.valueChanged, (o) => {
1150
- const x = V(o, B[p || c.initType]);
1151
- t.value = x;
1152
- });
1153
- }
1154
- function W(o) {
1155
- d.value = D[o].text;
1156
- }
1157
- function de() {
1158
- var o;
1159
- m.value = !!(p != null && p.includes("a") || (o = c.initType) != null && o.includes("a"));
1160
- }
1161
- we(() => {
1162
- c.setColorPresets(g.value || ["#eaecf3"]);
1163
- }), K(() => {
1164
- ue(), ae(), oe(), T();
1165
- }), ce(), E(d, () => {
1166
- N.value = V(new I(t.value), B[p || c.initType]), i.value = new I(N.value), de();
1167
- }), E(t, (o) => {
1168
- V(c.value, c.initType) !== o && o !== null && L(o), W(z(c.initType));
1169
- }), E(i, (o) => {
1170
- t.value = V(o, B[p || c.initType]), L(t.value), N.value = t.value;
1171
- });
1172
- function U(o) {
1173
- const x = document.getElementById(`farris-color-picker-plus-input-${v}`);
1174
- (o === "" || o === void 0 || o == null) && !l.value ? (t.value = null, x.style.borderColor = "red", H.className = "btn btn-secondary disabled") : (x.style.borderColor = "#dcdfe6", H.className = "btn btn-secondary");
1175
- }
1176
- function he() {
1177
- var o, x;
1178
- if (l.value) {
1179
- k.value = (t == null ? void 0 : t.value) ?? null;
1180
- const j = {
1181
- elementValue: k
1182
- };
1183
- e.emit("valueChanged", j), S.classList.toggle("disabled");
1184
- }
1185
- if (!l.value && !(N.value === void 0 || N.value == null || N.value === "")) {
1186
- (x = (o = $.value) == null ? void 0 : o.style) == null || x.setProperty("background", t.value), h.value = !0, k.value = t.value;
1187
- const j = {
1188
- elementValue: k
1189
- };
1190
- e.emit("valueChanged", j), S.classList.toggle("disabled");
1191
- }
1192
- !M.value && !t.value && !h.value && l && S.classList.toggle("disabled"), U(t.value), N.value = t.value, H.classList.contains("disabled") || (Y.value = t.value, w.value = !1);
1193
- }
1194
- function L(o) {
1195
- c == null || c.setValueFrom(o, v, l.value);
1196
- }
1197
- function _(o) {
1198
- r.value || (w.value = !0, S.classList.toggle("disabled"), ae(), L(t.value));
1199
- }
1200
- function z(o) {
1201
- const x = D.findIndex((j) => j.type === o);
1202
- return P = x, x;
1203
- }
1204
- function f(o) {
1205
- if (!H.classList.contains("disabled")) {
1206
- const x = D.length;
1207
- P = (x + P + (o === "up" ? 1 : -1)) % x, p = D[P].type, W(P), L(t.value);
1208
- }
1209
- }
1210
- return () => y("div", {
1211
- class: "f-color-picker-component",
1212
- ref: A
1213
- }, [y("div", {
1214
- class: ["color-picker-panel", {
1215
- disabled: r.value
1216
- }],
1217
- id: "farris-color-picker-panel",
1218
- ref: F,
1219
- onClick: (o) => o.stopPropagation,
1220
- style: "top:30px"
1221
- }, [y("div", {
1222
- class: "color-picker-main"
1223
- }, [y(Pe, {
1224
- hue: c.hue,
1225
- "onUpdate:hue": (o) => c.hue = o,
1226
- allowColorNull: l.value,
1227
- color: i.value,
1228
- "onUpdate:color": (o) => i.value = o
1229
- }, null), y(be, {
1230
- randomId: v,
1231
- hue: c.hue,
1232
- "onUpdate:hue": (o) => c.hue = o,
1233
- allowColorNull: l.value,
1234
- color: i.value,
1235
- "onUpdate:color": (o) => i.value = o
1236
- }, null)]), y(Ie, {
1237
- style: le.value,
1238
- randomId: v,
1239
- allowColorNull: l.value,
1240
- color: i.value,
1241
- "onUpdate:color": (o) => i.value = o
1242
- }, null), y("div", {
1243
- class: "input-btn",
1244
- style: "display:flex;align-items: center;"
1245
- }, [q(y("span", {
1246
- style: "width:40px;margin-right:10px;"
1247
- }, [d.value]), [[J, ne]]), q(y("input", {
1248
- title: "color-picker-plus-input",
1249
- type: "text",
1250
- id: "farris-color-picker-plus-input",
1251
- "onUpdate:modelValue": (o) => N.value = o,
1252
- style: "float:none"
1253
- }, null), [[ye, N.value]]), q(y("div", {
1254
- class: "type-icon-btn-wrapper",
1255
- style: "cursor:pointer"
1256
- }, [y("span", {
1257
- class: "f-icon f-icon-arrow-60-up type-icon-btn",
1258
- onClick: () => f("up")
1259
- }, null), y("span", {
1260
- class: "f-icon f-icon-arrow-60-down type-icon-btn",
1261
- onClick: () => f("down")
1262
- }, null)]), [[J, ne]]), y("div", {
1263
- class: "input-btn"
1264
- }, [y("button", {
1265
- id: "farris-color-picker-plus-sure",
1266
- class: "btn btn-secondary",
1267
- onClick: he
1268
- }, [fe("确定")])])]), q(y(Se, {
1269
- color: i.value,
1270
- "onUpdate:color": (o) => i.value = o,
1271
- colorPresets: c.presets,
1272
- hue: c.hue,
1273
- "onUpdate:hue": (o) => c.hue = o,
1274
- randomId: v
1275
- }, null), [[J, re]])]), y("div", {
1276
- class: "color-picker-wrapper"
1277
- }, [y("input", {
1278
- type: "text",
1279
- class: "color-picker-input form-control",
1280
- value: Y.value,
1281
- readonly: r.value,
1282
- onClick: (o) => o.stopPropagation()
1283
- }, null), y("div", {
1284
- class: "color-picker-trigger",
1285
- onClick: _
1286
- }, [y("div", {
1287
- class: "color-picker-trigger-inner"
1288
- }, [y("div", {
1289
- style: G.value
1290
- }, null)])])])]);
1291
- }
1292
- });
1293
- se.register = (u, e, i) => {
1294
- u["color-picker"] = se, e["color-picker"] = ke;
1295
- };
1296
- se.registerDesigner = (u, e, i) => {
1297
- u["color-picker"] = Ze, e["color-picker"] = ke;
1298
- };
1299
- const at = Ve(se);
990
+ }), Ot = mt($t);
1300
991
  export {
1301
- se as FColorPicker,
1302
- ve as colorPickerProps,
1303
- at as default,
1304
- ke as propsResolver
992
+ $t as FColorPicker,
993
+ bt as colorPickerProps,
994
+ Ot as default
1305
995
  };