epic-designer-gold 1.0.31 → 1.0.33
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.
- package/dist/{_vue_commonjs-external-BbihI59z.cjs → _vue_commonjs-external-CccDNqHl.cjs} +1 -1
- package/dist/{attributeView-CSiGWdPc.js → attributeView-BAtvUAhV.js} +22 -22
- package/dist/attributeView-BF8AFFq3.cjs +1 -0
- package/dist/{az-CJXcaytS.cjs → az-BHlmRKxT.cjs} +1 -1
- package/dist/be-Bix86zGn.cjs +1 -0
- package/dist/be-kPl6P6VI.js +37 -0
- package/dist/{bg-DCT06eJE.cjs → bg-DRyWA3-W.cjs} +1 -1
- package/dist/{bn-bd-DaKs5QkR.cjs → bn-bd-DsQtVph4.cjs} +1 -1
- package/dist/{button-BbHi0DmU.js → button-q-1FLMFj.js} +2 -2
- package/dist/{ca-DCcDFeSK.js → ca-B_2hM20M.js} +6 -6
- package/dist/core/components/asyncLoader/index.vue.d.ts +1 -1
- package/dist/core/components/builder/src/builder.vue.d.ts +6 -11
- package/dist/core/components/designer/src/designer.vue.d.ts +200 -9
- package/dist/core/components/designer/src/modules/actionBar/index.vue.d.ts +1 -1
- package/dist/core/components/designer/src/modules/attributeView/attributeView.vue.d.ts +1 -1
- package/dist/core/components/designer/src/modules/attributeView/eventView.vue.d.ts +1 -1
- package/dist/core/components/designer/src/modules/attributeView/styleView.vue.d.ts +1 -1
- package/dist/core/components/designer/src/modules/componentView/index.vue.d.ts +1 -1
- package/dist/core/components/designer/src/modules/editContainer/editNodeItem.vue.d.ts +4 -5
- package/dist/core/components/designer/src/modules/editContainer/editScreenContainer.vue.d.ts +7 -2
- package/dist/core/components/designer/src/modules/editContainer/index.vue.d.ts +19 -1
- package/dist/core/components/designer/src/modules/editContainer/nodeItem.vue.d.ts +3 -5
- package/dist/core/components/designer/src/modules/editContainer/previewJson.vue.d.ts +3 -1
- package/dist/core/components/designer/src/modules/editContainer/previewWidgets.vue.d.ts +5 -1
- package/dist/core/components/designer/src/modules/editContainer/toolbar.vue.d.ts +17 -1
- package/dist/core/components/designer/src/modules/header/index.vue.d.ts +6 -5
- package/dist/core/components/designer/src/modules/outline/outline.vue.d.ts +1 -1
- package/dist/core/components/designer/src/modules/preview/index.vue.d.ts +85 -1
- package/dist/core/components/designer/src/modules/rightSidebar/breadcrumb.vue.d.ts +1 -1
- package/dist/core/components/icon/src/icon.vue.d.ts +4 -6
- package/dist/core/components/node/src/dynamicFormItem.vue.d.ts +12 -11
- package/dist/core/components/node/src/node.vue.d.ts +19 -24
- package/dist/core/components/tree/src/tree.vue.d.ts +1 -1
- package/dist/core/components/tree/src/treeNodeItem.vue.d.ts +3 -4
- package/dist/core/components/tree/src/treeNodes.vue.d.ts +4 -6
- package/dist/core/extensions/EActionEditor/index.vue.d.ts +25 -1
- package/dist/core/extensions/EActionEditor/src/EArgsEditor.vue.d.ts +5 -7
- package/dist/core/extensions/EActionEditor/src/EScriptEdit.vue.d.ts +3 -1
- package/dist/core/extensions/EColEditor/index.vue.d.ts +1 -1
- package/dist/core/extensions/EColumnEditor/columnItem.vue.d.ts +4 -5
- package/dist/core/extensions/EColumnEditor/index.vue.d.ts +5 -9
- package/dist/core/extensions/EDataSource/index.vue.d.ts +3 -1
- package/dist/core/extensions/EDescribe/index.vue.d.ts +9 -0
- package/dist/core/extensions/EInputSize/index.vue.d.ts +4 -5
- package/dist/core/extensions/EOptionsEditor/index.vue.d.ts +9 -13
- package/dist/core/extensions/EOptionsEditor/optionItem.vue.d.ts +4 -5
- package/dist/core/extensions/ERuleEditor/ERuleItem.vue.d.ts +5 -6
- package/dist/core/extensions/ERuleEditor/index.vue.d.ts +1 -1
- package/dist/core/extensions/ESourceDataSelect/index.vue.d.ts +6 -18
- package/dist/core/extensions/EValidateParam/index.vue.d.ts +13 -0
- package/dist/core/extensions/MonacoEditor/index.vue.d.ts +15 -21
- package/dist/core/extensions/PaddingMarginControl/index.vue.d.ts +5 -6
- package/dist/core/extensions/Page/index.vue.d.ts +7 -7
- package/dist/{cs-D_hyDJBU.cjs → cs-fe0nQEUY.cjs} +1 -1
- package/dist/{de-CjumkRE8.js → de-DC7xuNPN.js} +3 -3
- package/dist/{el-DyUHskgW.js → el-C0J72FUl.js} +2 -2
- package/dist/{el-BCec0wpC.cjs → el-CUlPbKiq.cjs} +1 -1
- package/dist/{en-gb-C8f1Enek.js → en-gb-D42jaZg9.js} +5 -5
- package/dist/{es-DP04S73E.js → es-C058DgcQ.js} +4 -4
- package/dist/{es-BFLRglxD.cjs → es-CV4N9sQJ.cjs} +1 -1
- package/dist/{et-ipLqjCDG.js → et-hoTk9uxt.js} +5 -5
- package/dist/{eventView-5fa6mfSD.cjs → eventView-BExxE07B.cjs} +1 -1
- package/dist/{eventView-C2wKhfU_.js → eventView-eNaiVabA.js} +4 -4
- package/dist/{fade-in-scale-up.cssr-C_UMnGtI.cjs → fade-in-scale-up.cssr-D5DdSaTl.cjs} +1 -1
- package/dist/{fade-in-scale-up.cssr-BXjoIAAA.js → fade-in-scale-up.cssr-XJx96aae.js} +1 -1
- package/dist/{form-ChuxpD-f.cjs → form-BfnGWRf4.cjs} +1 -1
- package/dist/form-CUbklubB.cjs +1 -0
- package/dist/form-DGbjgAvD.js +208 -0
- package/dist/{form-Cr7tBgLQ.js → form-DkDGcNCH.js} +7 -7
- package/dist/{form-BPH0cDFl.js → form-r1D2WYPd.js} +3 -3
- package/dist/{formItem-D10Om12T.js → formItem-B6XaNgi9.js} +2 -2
- package/dist/{formItem-cj8JQT2r.js → formItem-BJ-M4LAL.js} +2 -2
- package/dist/{formItem-Do31LPIz.cjs → formItem-DS5AjuJ9.cjs} +1 -1
- package/dist/{formItem-DPnbV4m-.js → formItem-E3dd7dU1.js} +3 -3
- package/dist/{fr-D1kezmpm.cjs → fr-B_IotmK8.cjs} +1 -1
- package/dist/{fr-ca-EPfCD7sc.js → fr-ca-DfJb7eFN.js} +4 -4
- package/dist/ga-DP4_Ma79.js +22 -0
- package/dist/ga-Upa8swLh.cjs +1 -0
- package/dist/{gl-CBMDu4db.js → gl-L0SOKqrF.js} +1 -1
- package/dist/{gl-DI-aVaAh.cjs → gl-buZ-VDaz.cjs} +1 -1
- package/dist/{he-O14-JKYm.cjs → he-CwFEkyZP.cjs} +1 -1
- package/dist/{hi-nXeMgLvO.js → hi-CG6raJ8L.js} +2 -2
- package/dist/{hy-am-BLnv1pCz.cjs → hy-am-IbMCW8s4.cjs} +1 -1
- package/dist/{hy-am-CvHDFapi.js → hy-am-QWdQfrnZ.js} +2 -2
- package/dist/{icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js → icon.vue_vue_type_script_setup_true_lang-DW206h_7.js} +2 -2
- package/dist/{id-CO78nlWo.js → id-CXRpiOjX.js} +4 -4
- package/dist/index-3k1IXN1T.js +1772 -0
- package/dist/{index-B0OgKtuT.js → index-9Mn4Y5ul.js} +30 -30
- package/dist/index-B7v1JNbf.cjs +351 -0
- package/dist/{index-DgcFxYFp.js → index-BMXnkqXx.js} +3 -3
- package/dist/{index-CCCx1tbF.cjs → index-BRAbfTxT.cjs} +1 -1
- package/dist/index-BRSms-yQ.cjs +10 -0
- package/dist/{index-WkZdU_zw.js → index-BTaKazMR.js} +3 -3
- package/dist/index-BU3ulVXO.cjs +51 -0
- package/dist/index-BVGB9juO.cjs +352 -0
- package/dist/index-BWTbnurN.cjs +102 -0
- package/dist/index-B_ZNp-FD.cjs +10 -0
- package/dist/index-BakH-Ay7.js +1513 -0
- package/dist/{index-tSmvj7CR.js → index-BdXFwT-C.js} +749 -721
- package/dist/{index-D1ZL6feZ.js → index-Bf7gu4Ub.js} +28210 -27533
- package/dist/index-BlIhb2K5.cjs +65 -0
- package/dist/{index-DYQi05p8.cjs → index-BozsQqds.cjs} +1 -1
- package/dist/index-BtKa0UKV.cjs +326 -0
- package/dist/index-BwHmwZ5G.cjs +1 -0
- package/dist/{index-D2GF87Tg.cjs → index-Bxdmlmwu.cjs} +1 -1
- package/dist/index-C3ri9kGU.cjs +110 -0
- package/dist/index-C4CkFEzv.cjs +1 -0
- package/dist/{index-COyKmK8p.js → index-C4laxGCk.js} +532 -529
- package/dist/{index-B2RMcVgD.js → index-C5yUsiJH.js} +3 -3
- package/dist/{index-CpTA2IRB.js → index-CAYHjLKP.js} +10 -10
- package/dist/index-CFChTrwc.cjs +1 -0
- package/dist/index-CFHEVgng.cjs +1 -0
- package/dist/index-CHYKgo9A.cjs +1 -0
- package/dist/{index-CNOUPCih.js → index-CLAopW_w.js} +143 -142
- package/dist/index-CLeSXOVj.js +122 -0
- package/dist/{index-CdnV7DS4.js → index-CQSYlqUB.js} +3 -3
- package/dist/{index-Hdc_C4Xg.js → index-CRaEQ5ns.js} +116 -115
- package/dist/{index-BbTWJKHb.js → index-CT056ccv.js} +23 -23
- package/dist/index-CcXd7BgN.js +451 -0
- package/dist/{index-RL7vrExY.js → index-Cecp9t8s.js} +17 -17
- package/dist/index-ClgIpXW0.cjs +1 -0
- package/dist/index-CnPBVx5Y.cjs +181 -0
- package/dist/index-CpTUkT9o.cjs +159 -0
- package/dist/index-CqIGF1hQ.cjs +86 -0
- package/dist/{index-DymbM-qI.js → index-CrVn9CfT.js} +79 -72
- package/dist/{index-Cmfhlo_3.js → index-D2n96wxz.js} +5 -5
- package/dist/{index-FgdbKgb5.cjs → index-DER3z6SG.cjs} +1 -1
- package/dist/{index-Dk0fyxAJ.cjs → index-DExGgrX9.cjs} +1 -1
- package/dist/{index-lCYWKDlK.js → index-DI-E5Cpq.js} +6 -6
- package/dist/{index-Cx7gKpkD.js → index-DMnyvgEN.js} +3 -3
- package/dist/{index-DaRhLTx9.js → index-DMuf-r1U.js} +489 -489
- package/dist/{index-gA02bxwJ.js → index-DUFhAGX3.js} +3443 -3361
- package/dist/{index-CjcjqKkB.js → index-DWSlxQBe.js} +87 -86
- package/dist/index-DYU07eGb.cjs +1 -0
- package/dist/{index-BENF2JDS.cjs → index-Di9sEDRc.cjs} +1 -1
- package/dist/{index-DQ9Vb0QH.js → index-Dkj_Zz4E.js} +309 -308
- package/dist/index-DlWUR7vt.cjs +6 -0
- package/dist/index-Dp0hJSh5.js +4 -0
- package/dist/{index-3fW_aWMH.js → index-Ds_DeGh-.js} +581 -567
- package/dist/index-FaOdtMdB.cjs +214 -0
- package/dist/index-K9w-efBB.cjs +1 -0
- package/dist/{index-DiDIFoTk.js → index-KXG0ExdR.js} +3 -3
- package/dist/index-UpNznhhe.js +19 -0
- package/dist/index-XEUPyaqB.js +655 -0
- package/dist/index-Xnqspbxj.js +59 -0
- package/dist/{index-v2u1WTMm.cjs → index-aIGMRk0a.cjs} +1 -1
- package/dist/{index-BEUYVwRA.cjs → index-eAXbC_rr.cjs} +1 -1
- package/dist/index-lf6yCev-.cjs +1 -0
- package/dist/{index-BhMVNODR.js → index-natF7VzY.js} +9 -12
- package/dist/index-o6azVcPr.js +11903 -0
- package/dist/{index-Cln9MN7u.js → index-ocw8DZly.js} +5 -5
- package/dist/index-r7I2iBup.cjs +9 -0
- package/dist/index-sFE9uQIP.js +1712 -0
- package/dist/{index-IGxCNti8.js → index-syyNmnFq.js} +5 -5
- package/dist/index-t1QZ07qC.cjs +864 -0
- package/dist/{index-R2r9Rw5O.cjs → index-uyQPLEww.cjs} +1 -1
- package/dist/{index-CpevxZqj.cjs → index-waYHs7SN.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/{is-C40R_fdL.cjs → is-DKGME0z-.cjs} +1 -1
- package/dist/{it-BFF7WzRR.js → it-BtbhD8pq.js} +1 -1
- package/dist/{it-D7K-0U_k.cjs → it-ZWKZeGyD.cjs} +1 -1
- package/dist/{ja-4CWMghxy.js → ja--ZXRcv9f.js} +4 -4
- package/dist/{ja-CAXCMb11.cjs → ja-pfO_QIN1.cjs} +1 -1
- package/dist/{ka-DrA_EMLP.js → ka-2eqGlkEl.js} +2 -2
- package/dist/{kk-Bv8yYeRk.cjs → kk-8gl4nJDr.cjs} +1 -1
- package/dist/{kk-QVPqpI2b.js → kk-U2vwYR0_.js} +2 -2
- package/dist/{km-BmycjYfj.cjs → km-BhO_ypYk.cjs} +1 -1
- package/dist/{km-CBMnSWv_.js → km-CvriZlET.js} +2 -2
- package/dist/{kn-TECqDIit.js → kn-B3fo7baQ.js} +2 -2
- package/dist/{kn-CFiXt5hu.cjs → kn-DbnERw-L.cjs} +1 -1
- package/dist/{lt-D0cq_0yM.js → lt-LJQA5IUB.js} +8 -8
- package/dist/{lv-CoTNe47-.cjs → lv-BOhsxkyH.cjs} +1 -1
- package/dist/{lv-CVdYvxq8.js → lv-mhTNPcB7.js} +6 -6
- package/dist/{mk-DVN6iYK_.cjs → mk-Bjsw8OIP.cjs} +1 -1
- package/dist/{mk-DDuk7A3P.js → mk-CwQCoXyz.js} +2 -2
- package/dist/{ml-DnXJOqZ0.cjs → ml-B2Uwy4uy.cjs} +1 -1
- package/dist/{ml-CPI3tJe8.js → ml-Cb3T32D6.js} +2 -2
- package/dist/{mn-CNbMEx0y.js → mn-CNzb6fwh.js} +2 -2
- package/dist/{mn-DMIrWGkN.cjs → mn-CsItTiQc.cjs} +1 -1
- package/dist/{modal-3Iw7tqyx.js → modal-BRQmBRpE.js} +4 -4
- package/dist/{modal-DZRJyZfk.cjs → modal-BgQNXEZY.cjs} +1 -1
- package/dist/{ms-my-BoMZ8Hzl.cjs → ms-my-BgFBTdYR.cjs} +1 -1
- package/dist/{ms-my-BcgYEtml.js → ms-my-CQBECOnt.js} +6 -6
- package/dist/{nb-BL5QmNEa.js → nb-ChJHZ1i8.js} +2 -2
- package/dist/{ne-9klrwaIE.js → ne-KSsPp_--.js} +4 -4
- package/dist/{ne-VNPqdWFn.cjs → ne-wk64JT9v.cjs} +1 -1
- package/dist/{nl-DBFNL8wC.cjs → nl-B5Fclgi6.cjs} +1 -1
- package/dist/ocrUpload-CMskfGHX.cjs +1 -0
- package/dist/ocrUpload-Cxxs1GtD.js +521 -0
- package/dist/orcSelectPage-CXd59VaA.js +47 -0
- package/dist/orcSelectPage-DY_4W3lm.cjs +1 -0
- package/dist/{outline-BE98qFHQ.cjs → outline-BkNtj_2a.cjs} +1 -1
- package/dist/{outline-Ch5PHy3c.js → outline-S7RIV1S6.js} +4 -4
- package/dist/{pluginManager-BCnrHPYv.js → pluginManager-B0y107-1.js} +1 -1
- package/dist/{pluginManager-DWHAX8kP.cjs → pluginManager-C8aQylGX.cjs} +1 -1
- package/dist/{pt-BaTZB0XW.cjs → pt-BfCV6EE0.cjs} +1 -1
- package/dist/{pt-br-C1mqj5qX.js → pt-br-BC7LLaiM.js} +3 -3
- package/dist/{pt-br-B_N58uu_.cjs → pt-br-Cmqeku7l.cjs} +1 -1
- package/dist/{ro-Cnuhxb40.cjs → ro-BoP4bVrV.cjs} +1 -1
- package/dist/row-CAcx39Av.cjs +1 -0
- package/dist/row-DhORW-4_.js +34 -0
- package/dist/{ru-CCbLARi0.js → ru-CLqP_yvB.js} +5 -5
- package/dist/select-957IpcJa.js +38 -0
- package/dist/select-BgVmNynq.cjs +1 -0
- package/dist/{selectPage-CrdVWKGk.cjs → selectPage-H4G0pWhK.cjs} +1 -1
- package/dist/{selectPage-Bm45M31g.js → selectPage-oM1OpHbJ.js} +3 -3
- package/dist/{sign-BS-9u6is.cjs → sign-Cusu4oCD.cjs} +1 -1
- package/dist/{sign-l63EYvVo.js → sign-Cz5OCE1C.js} +12 -12
- package/dist/{sk-DRjgEzVO.cjs → sk-DvU2x_On.cjs} +1 -1
- package/dist/{sl-CL8MnX8D.js → sl-MH1u3xWj.js} +9 -9
- package/dist/style.css +1 -1
- package/dist/{styleView-CrBDikDV.cjs → styleView-DAskd_e3.cjs} +1 -1
- package/dist/{styleView-DONajUQ-.js → styleView-oSuNX97o.js} +8 -8
- package/dist/{ta-CsfYqZQU.js → ta-CeKe4tRh.js} +2 -2
- package/dist/{tabs-CYH9lAUk.cjs → tabs-5lcSnurM.cjs} +1 -1
- package/dist/{tabs-DCyifACM.js → tabs-Cu4PLnTU.js} +1 -1
- package/dist/{th-C-CGWPlT.cjs → th-B1vCpSkb.cjs} +1 -1
- package/dist/{th-CC5sx7mS.js → th-DuVrYobw.js} +2 -2
- package/dist/theme/var.less +6 -5
- package/dist/{tree.vue_vue_type_script_setup_true_lang-VGvT-OYl.cjs → tree.vue_vue_type_script_setup_true_lang-583kvI0Q.cjs} +1 -1
- package/dist/{tree.vue_vue_type_script_setup_true_lang-BsVyMb-n.js → tree.vue_vue_type_script_setup_true_lang-M13R0TPV.js} +4 -4
- package/dist/ui/antd/button/button.vue.d.ts +2 -1
- package/dist/ui/antd/index.cjs +2 -2
- package/dist/ui/antd/index.js +40 -40
- package/dist/ui/antd/modal/modal.vue.d.ts +3 -2
- package/dist/ui/antd/upload-image/uploadImage.vue.d.ts +1 -1
- package/dist/ui/elementPlus/form/form.vue.d.ts +372 -7
- package/dist/ui/elementPlus/formItem/formItem.vue.d.ts +346 -3
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +556 -253
- package/dist/ui/elementPlus/modal/modal.d.ts +1 -1
- package/dist/ui/elementPlus/ocr-select-page/index.d.ts +3 -0
- package/dist/ui/elementPlus/ocr-select-page/orcSelectPage.d.ts +8 -0
- package/dist/ui/elementPlus/ocr-upload/index.d.ts +3 -0
- package/dist/ui/elementPlus/ocr-upload/ocrUpload.d.ts +21 -0
- package/dist/ui/naiveUi/form-item/formItem.vue.d.ts +772 -3
- package/dist/ui/naiveUi/index.cjs +1 -1
- package/dist/ui/naiveUi/index.js +11 -11
- package/dist/ui/naiveUi/modal/modal.d.ts +1 -1
- package/dist/{uk-Cc6k-QUE.cjs → uk-8RCZke0G.cjs} +1 -1
- package/dist/{uploadImage-Db_66X3C.js → uploadImage-DKgjQrSu.js} +4 -4
- package/dist/{uploadImage-nwjqcVFU.cjs → uploadImage-r7uyNOKB.cjs} +1 -1
- package/dist/{ur-C0tmW1hr.js → ur-Dj65NIKf.js} +3 -3
- package/dist/utils/manager/pluginManager.d.ts +16 -16
- package/dist/{vi-j1PGHz1o.js → vi-BEZaL78_.js} +4 -4
- package/dist/{vi-Dyfq5Qgz.cjs → vi-aBc6LsS_.cjs} +1 -1
- package/dist/{vuedraggable.umd-BqhSJIAi.cjs → vuedraggable.umd-CxOWsXm8.cjs} +6 -6
- package/dist/{vuedraggable.umd-D2S7Eo7p.js → vuedraggable.umd-D908YPOr.js} +396 -400
- package/dist/{zh-cn-BKQHxHe9.cjs → zh-cn-DTp5Vsak.cjs} +1 -1
- package/dist/{zh-hk-hNFRxlrX.cjs → zh-hk-DvIiOtyL.cjs} +1 -1
- package/dist/{zh-tw-BT16WIrT.js → zh-tw-BZt76cZl.js} +7 -7
- package/dist/{zh-tw-SGOlw9Wo.cjs → zh-tw-OGVt40m9.cjs} +1 -1
- package/package.json +1 -1
- package/dist/attributeView-UzP3tU2D.cjs +0 -1
- package/dist/axios-CXDYiOMX.js +0 -1704
- package/dist/axios-tuVKNgv9.cjs +0 -6
- package/dist/be--_CkdeMD.cjs +0 -1
- package/dist/be-DJzFjqtL.js +0 -22
- package/dist/form-Bofkrmkd.cjs +0 -1
- package/dist/form-VbfBmb63.js +0 -72
- package/dist/ga-B7Rd2JIZ.cjs +0 -1
- package/dist/ga-BcnAx7jm.js +0 -22
- package/dist/index-4PPmJYKt.cjs +0 -51
- package/dist/index-B72l3XQl.js +0 -453
- package/dist/index-B8exdhvc.cjs +0 -1
- package/dist/index-BB9rZNCd.cjs +0 -181
- package/dist/index-BCk0LJsg.cjs +0 -347
- package/dist/index-BHZbtFEF.cjs +0 -1
- package/dist/index-BVUz9lFN.cjs +0 -325
- package/dist/index-BhICtIH5.js +0 -1433
- package/dist/index-BsXm6fLD.js +0 -1493
- package/dist/index-BwLkOBWy.cjs +0 -10
- package/dist/index-C9PHR_YC.js +0 -4
- package/dist/index-CR_tJiJv.js +0 -653
- package/dist/index-CU1ZFiwn.cjs +0 -1
- package/dist/index-CZFPJ6vM.cjs +0 -1
- package/dist/index-Cap7FkuS.cjs +0 -1
- package/dist/index-Cphndmia.cjs +0 -214
- package/dist/index-CraRg8wh.js +0 -107
- package/dist/index-D5WpEOUO.cjs +0 -351
- package/dist/index-DEBQD_h0.cjs +0 -1
- package/dist/index-DMszow96.cjs +0 -110
- package/dist/index-DTzB2pWI.cjs +0 -159
- package/dist/index-DWCSzZfR.cjs +0 -80
- package/dist/index-DyWFUxn5.js +0 -11674
- package/dist/index-RdEhd65J.cjs +0 -65
- package/dist/index-XU85x6vz.cjs +0 -9
- package/dist/index-g5ZjtbqH.cjs +0 -102
- package/dist/index-jx5A2kt8.cjs +0 -850
- package/dist/index-n6H8b6fT.cjs +0 -1
- package/dist/index-zYoSB4fa.cjs +0 -9
- package/dist/row-CkyJ9pQh.js +0 -35
- package/dist/row-NNlPGZRG.cjs +0 -1
- package/dist/select-BvJWp4t6.cjs +0 -1
- package/dist/select-CjWTf5kk.js +0 -45
- package/dist/ui/antd/form/form.vue.d.ts +0 -64
- package/dist/ui/antd/form-item/formItem.vue.d.ts +0 -18
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { r as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { s as
|
|
6
|
-
import { s as
|
|
7
|
-
import { f as
|
|
8
|
-
function
|
|
1
|
+
import { c as E } from "./_commonjsHelpers-BVfed4GL.js";
|
|
2
|
+
import { s as At, c as Qe, _ as xe, r as re, i as De, a as Rt, b as Dt, f as Vt, e as Ht } from "./index-Bf7gu4Ub.js";
|
|
3
|
+
import { r as zt } from "./index-DUFhAGX3.js";
|
|
4
|
+
import { r as V } from "./_vue_commonjs-external-NwvjgbHK.js";
|
|
5
|
+
import { s as et, b as It } from "./index-Dkj_Zz4E.js";
|
|
6
|
+
import { s as tt, a as rt } from "./index-BakH-Ay7.js";
|
|
7
|
+
import { f as Bt } from "./fade-in-scale-up.cssr-XJx96aae.js";
|
|
8
|
+
function Ot(e, o) {
|
|
9
9
|
for (var r = 0; r < o.length; r++) {
|
|
10
|
-
const
|
|
11
|
-
if (typeof
|
|
12
|
-
for (const a in
|
|
10
|
+
const n = o[r];
|
|
11
|
+
if (typeof n != "string" && !Array.isArray(n)) {
|
|
12
|
+
for (const a in n)
|
|
13
13
|
if (a !== "default" && !(a in e)) {
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const t = Object.getOwnPropertyDescriptor(n, a);
|
|
15
|
+
t && Object.defineProperty(e, a, t.get ? t : {
|
|
16
16
|
enumerable: !0,
|
|
17
|
-
get: () =>
|
|
17
|
+
get: () => n[a]
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
23
23
|
}
|
|
24
|
-
var
|
|
24
|
+
var ot = {}, nt = {}, lt = {}, Ve = {}, ue = {};
|
|
25
25
|
Object.defineProperty(ue, "__esModule", { value: !0 });
|
|
26
|
-
ue.self =
|
|
27
|
-
const
|
|
28
|
-
function
|
|
29
|
-
const { fontSize: o, boxShadow2: r, popoverColor:
|
|
26
|
+
ue.self = at;
|
|
27
|
+
const jt = At, Ft = Qe, Et = et, Tt = tt;
|
|
28
|
+
function at(e) {
|
|
29
|
+
const { fontSize: o, boxShadow2: r, popoverColor: n, textColor2: a, borderRadius: t, borderColor: i, heightSmall: s, heightMedium: f, heightLarge: x, fontSizeSmall: H, fontSizeMedium: $, fontSizeLarge: z, dividerColor: I } = e;
|
|
30
30
|
return {
|
|
31
31
|
panelFontSize: o,
|
|
32
32
|
boxShadow: r,
|
|
33
|
-
color:
|
|
33
|
+
color: n,
|
|
34
34
|
textColor: a,
|
|
35
|
-
borderRadius:
|
|
35
|
+
borderRadius: t,
|
|
36
36
|
border: `1px solid ${i}`,
|
|
37
37
|
heightSmall: s,
|
|
38
38
|
heightMedium: f,
|
|
39
|
-
heightLarge:
|
|
40
|
-
fontSizeSmall:
|
|
41
|
-
fontSizeMedium:
|
|
42
|
-
fontSizeLarge:
|
|
43
|
-
dividerColor:
|
|
39
|
+
heightLarge: x,
|
|
40
|
+
fontSizeSmall: H,
|
|
41
|
+
fontSizeMedium: $,
|
|
42
|
+
fontSizeLarge: z,
|
|
43
|
+
dividerColor: I
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const qt = (0, jt.createTheme)({
|
|
47
47
|
name: "ColorPicker",
|
|
48
|
-
common:
|
|
48
|
+
common: Ft.commonLight,
|
|
49
49
|
peers: {
|
|
50
|
-
Input:
|
|
50
|
+
Input: Tt.inputLight,
|
|
51
51
|
Button: Et.buttonLight
|
|
52
52
|
},
|
|
53
|
-
self:
|
|
53
|
+
self: at
|
|
54
54
|
});
|
|
55
|
-
ue.default =
|
|
55
|
+
ue.default = qt;
|
|
56
56
|
Object.defineProperty(Ve, "__esModule", { value: !0 });
|
|
57
|
-
const
|
|
57
|
+
const Nt = Qe, Lt = et, Kt = tt, Gt = ue, Xt = {
|
|
58
58
|
name: "ColorPicker",
|
|
59
|
-
common:
|
|
59
|
+
common: Nt.commonDark,
|
|
60
60
|
peers: {
|
|
61
|
-
Input:
|
|
62
|
-
Button:
|
|
61
|
+
Input: Kt.inputDark,
|
|
62
|
+
Button: Lt.buttonDark
|
|
63
63
|
},
|
|
64
|
-
self:
|
|
64
|
+
self: Gt.self
|
|
65
65
|
};
|
|
66
66
|
Ve.default = Xt;
|
|
67
67
|
(function(e) {
|
|
68
|
-
var o =
|
|
68
|
+
var o = E && E.__importDefault || function(a) {
|
|
69
69
|
return a && a.__esModule ? a : { default: a };
|
|
70
70
|
};
|
|
71
71
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.colorPickerLight = e.colorPickerDark = void 0;
|
|
@@ -73,21 +73,22 @@ Ve.default = Xt;
|
|
|
73
73
|
Object.defineProperty(e, "colorPickerDark", { enumerable: !0, get: function() {
|
|
74
74
|
return o(r).default;
|
|
75
75
|
} });
|
|
76
|
-
var
|
|
76
|
+
var n = ue;
|
|
77
77
|
Object.defineProperty(e, "colorPickerLight", { enumerable: !0, get: function() {
|
|
78
|
-
return o(
|
|
78
|
+
return o(n).default;
|
|
79
79
|
} });
|
|
80
|
-
})(
|
|
81
|
-
var He = {},
|
|
82
|
-
Object.defineProperty(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
})(lt);
|
|
81
|
+
var He = {}, k = {};
|
|
82
|
+
Object.defineProperty(k, "__esModule", { value: !0 });
|
|
83
|
+
k.deriveDefaultValue = Wt;
|
|
84
|
+
k.getModeFromValue = it;
|
|
85
|
+
k.getWCAGContrast = Yt;
|
|
86
|
+
k.floor = Jt;
|
|
87
|
+
k.normalizeHue = Qt;
|
|
88
|
+
k.normalizeAlpha = er;
|
|
89
|
+
k.convertColor = rr;
|
|
90
|
+
const c = re, Zt = xe;
|
|
91
|
+
function Wt(e, o) {
|
|
91
92
|
switch (e[0]) {
|
|
92
93
|
case "hex":
|
|
93
94
|
return o ? "#000000FF" : "#000000";
|
|
@@ -100,168 +101,93 @@ function Gt(e, o) {
|
|
|
100
101
|
}
|
|
101
102
|
return process.env.NODE_ENV !== "production" && (0, Zt.warn)("color-picker", "props.modes is invalid."), "#000000";
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
+
function it(e) {
|
|
104
105
|
return e === null ? null : /^ *#/.test(e) ? "hex" : e.includes("rgb") ? "rgb" : e.includes("hsl") ? "hsl" : e.includes("hsv") ? "hsv" : null;
|
|
105
106
|
}
|
|
106
|
-
function Yt(e) {
|
|
107
|
-
|
|
107
|
+
function Yt(e, o = [255, 255, 255], r = "AA") {
|
|
108
|
+
const [n, a, t, i] = (0, c.rgba)((0, c.toHslaString)(e));
|
|
109
|
+
if (i === 1) {
|
|
110
|
+
const I = fe([n, a, t]), Z = fe(o);
|
|
111
|
+
return (Math.max(I, Z) + 0.05) / (Math.min(I, Z) + 0.05) >= (r === "AA" ? 4.5 : 7);
|
|
112
|
+
}
|
|
113
|
+
const s = Math.round(n * i + o[0] * (1 - i)), f = Math.round(a * i + o[1] * (1 - i)), x = Math.round(t * i + o[2] * (1 - i)), H = fe([s, f, x]), $ = fe(o);
|
|
114
|
+
return (Math.max(H, $) + 0.05) / (Math.min(H, $) + 0.05) >= (r === "AA" ? 4.5 : 7);
|
|
115
|
+
}
|
|
116
|
+
function fe(e) {
|
|
117
|
+
const [o, r, n] = e.map((a) => (a /= 255, a <= 0.03928 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4)));
|
|
118
|
+
return 0.2126 * o + 0.7152 * r + 0.0722 * n;
|
|
108
119
|
}
|
|
109
120
|
function Jt(e) {
|
|
110
|
-
return e
|
|
121
|
+
return e.map((o) => Math.floor(o));
|
|
111
122
|
}
|
|
112
123
|
function Qt(e) {
|
|
124
|
+
return e = Math.round(e), e >= 360 ? 359 : e < 0 ? 0 : e;
|
|
125
|
+
}
|
|
126
|
+
function er(e) {
|
|
113
127
|
return e = Math.round(e * 100) / 100, e > 1 ? 1 : e < 0 ? 0 : e;
|
|
114
128
|
}
|
|
115
|
-
const
|
|
129
|
+
const tr = {
|
|
116
130
|
rgb: {
|
|
117
131
|
hex(e) {
|
|
118
|
-
return (0,
|
|
132
|
+
return (0, c.toHexaString)((0, c.rgba)(e));
|
|
119
133
|
},
|
|
120
134
|
hsl(e) {
|
|
121
|
-
const [o, r,
|
|
122
|
-
return (0,
|
|
135
|
+
const [o, r, n, a] = (0, c.rgba)(e);
|
|
136
|
+
return (0, c.toHslaString)([...(0, c.rgb2hsl)(o, r, n), a]);
|
|
123
137
|
},
|
|
124
138
|
hsv(e) {
|
|
125
|
-
const [o, r,
|
|
126
|
-
return (0,
|
|
139
|
+
const [o, r, n, a] = (0, c.rgba)(e);
|
|
140
|
+
return (0, c.toHsvaString)([...(0, c.rgb2hsv)(o, r, n), a]);
|
|
127
141
|
}
|
|
128
142
|
},
|
|
129
143
|
hex: {
|
|
130
144
|
rgb(e) {
|
|
131
|
-
return (0,
|
|
145
|
+
return (0, c.toRgbaString)((0, c.rgba)(e));
|
|
132
146
|
},
|
|
133
147
|
hsl(e) {
|
|
134
|
-
const [o, r,
|
|
135
|
-
return (0,
|
|
148
|
+
const [o, r, n, a] = (0, c.rgba)(e);
|
|
149
|
+
return (0, c.toHslaString)([...(0, c.rgb2hsl)(o, r, n), a]);
|
|
136
150
|
},
|
|
137
151
|
hsv(e) {
|
|
138
|
-
const [o, r,
|
|
139
|
-
return (0,
|
|
152
|
+
const [o, r, n, a] = (0, c.rgba)(e);
|
|
153
|
+
return (0, c.toHsvaString)([...(0, c.rgb2hsv)(o, r, n), a]);
|
|
140
154
|
}
|
|
141
155
|
},
|
|
142
156
|
hsl: {
|
|
143
157
|
hex(e) {
|
|
144
|
-
const [o, r,
|
|
145
|
-
return (0,
|
|
158
|
+
const [o, r, n, a] = (0, c.hsla)(e);
|
|
159
|
+
return (0, c.toHexaString)([...(0, c.hsl2rgb)(o, r, n), a]);
|
|
146
160
|
},
|
|
147
161
|
rgb(e) {
|
|
148
|
-
const [o, r,
|
|
149
|
-
return (0,
|
|
162
|
+
const [o, r, n, a] = (0, c.hsla)(e);
|
|
163
|
+
return (0, c.toRgbaString)([...(0, c.hsl2rgb)(o, r, n), a]);
|
|
150
164
|
},
|
|
151
165
|
hsv(e) {
|
|
152
|
-
const [o, r,
|
|
153
|
-
return (0,
|
|
166
|
+
const [o, r, n, a] = (0, c.hsla)(e);
|
|
167
|
+
return (0, c.toHsvaString)([...(0, c.hsl2hsv)(o, r, n), a]);
|
|
154
168
|
}
|
|
155
169
|
},
|
|
156
170
|
hsv: {
|
|
157
171
|
hex(e) {
|
|
158
|
-
const [o, r,
|
|
159
|
-
return (0,
|
|
172
|
+
const [o, r, n, a] = (0, c.hsva)(e);
|
|
173
|
+
return (0, c.toHexaString)([...(0, c.hsv2rgb)(o, r, n), a]);
|
|
160
174
|
},
|
|
161
175
|
rgb(e) {
|
|
162
|
-
const [o, r,
|
|
163
|
-
return (0,
|
|
176
|
+
const [o, r, n, a] = (0, c.hsva)(e);
|
|
177
|
+
return (0, c.toRgbaString)([...(0, c.hsv2rgb)(o, r, n), a]);
|
|
164
178
|
},
|
|
165
179
|
hsl(e) {
|
|
166
|
-
const [o, r,
|
|
167
|
-
return (0,
|
|
180
|
+
const [o, r, n, a] = (0, c.hsva)(e);
|
|
181
|
+
return (0, c.toHslaString)([...(0, c.hsv2hsl)(o, r, n), a]);
|
|
168
182
|
}
|
|
169
183
|
}
|
|
170
184
|
};
|
|
171
|
-
function
|
|
172
|
-
return r = r ||
|
|
185
|
+
function rr(e, o, r) {
|
|
186
|
+
return r = r || it(e), r ? r === o ? e : tr[r][o](e) : null;
|
|
173
187
|
}
|
|
174
188
|
Object.defineProperty(He, "__esModule", { value: !0 });
|
|
175
|
-
const
|
|
176
|
-
He.default = (0,
|
|
177
|
-
name: "HueSlider",
|
|
178
|
-
props: {
|
|
179
|
-
clsPrefix: {
|
|
180
|
-
type: String,
|
|
181
|
-
required: !0
|
|
182
|
-
},
|
|
183
|
-
hue: {
|
|
184
|
-
type: Number,
|
|
185
|
-
required: !0
|
|
186
|
-
},
|
|
187
|
-
onUpdateHue: {
|
|
188
|
-
type: Function,
|
|
189
|
-
required: !0
|
|
190
|
-
},
|
|
191
|
-
onComplete: Function
|
|
192
|
-
},
|
|
193
|
-
setup(e) {
|
|
194
|
-
const o = (0, q.ref)(null);
|
|
195
|
-
function r(l) {
|
|
196
|
-
o.value && ((0, fe.on)("mousemove", document, t), (0, fe.on)("mouseup", document, a), t(l));
|
|
197
|
-
}
|
|
198
|
-
function t(l) {
|
|
199
|
-
const { value: i } = o;
|
|
200
|
-
if (!i)
|
|
201
|
-
return;
|
|
202
|
-
const { width: s, left: f } = i.getBoundingClientRect(), _ = (0, tr.normalizeHue)((l.clientX - f - or) / (s - rr) * 360);
|
|
203
|
-
e.onUpdateHue(_);
|
|
204
|
-
}
|
|
205
|
-
function a() {
|
|
206
|
-
var l;
|
|
207
|
-
(0, fe.off)("mousemove", document, t), (0, fe.off)("mouseup", document, a), (l = e.onComplete) === null || l === void 0 || l.call(e);
|
|
208
|
-
}
|
|
209
|
-
return {
|
|
210
|
-
railRef: o,
|
|
211
|
-
handleMouseDown: r
|
|
212
|
-
};
|
|
213
|
-
},
|
|
214
|
-
render() {
|
|
215
|
-
const { clsPrefix: e } = this;
|
|
216
|
-
return (0, q.h)(
|
|
217
|
-
"div",
|
|
218
|
-
{ class: `${e}-color-picker-slider`, style: {
|
|
219
|
-
height: W,
|
|
220
|
-
borderRadius: N
|
|
221
|
-
} },
|
|
222
|
-
(0, q.h)(
|
|
223
|
-
"div",
|
|
224
|
-
{ ref: "railRef", style: {
|
|
225
|
-
boxShadow: "inset 0 0 2px 0 rgba(0, 0, 0, .24)",
|
|
226
|
-
boxSizing: "border-box",
|
|
227
|
-
backgroundImage: nr,
|
|
228
|
-
height: W,
|
|
229
|
-
borderRadius: N,
|
|
230
|
-
position: "relative"
|
|
231
|
-
}, onMousedown: this.handleMouseDown },
|
|
232
|
-
(0, q.h)(
|
|
233
|
-
"div",
|
|
234
|
-
{ style: {
|
|
235
|
-
position: "absolute",
|
|
236
|
-
left: N,
|
|
237
|
-
right: N,
|
|
238
|
-
top: 0,
|
|
239
|
-
bottom: 0
|
|
240
|
-
} },
|
|
241
|
-
(0, q.h)(
|
|
242
|
-
"div",
|
|
243
|
-
{ class: `${e}-color-picker-handle`, style: {
|
|
244
|
-
left: `calc((${this.hue}%) / 359 * 100 - ${N})`,
|
|
245
|
-
borderRadius: N,
|
|
246
|
-
width: W,
|
|
247
|
-
height: W
|
|
248
|
-
} },
|
|
249
|
-
(0, q.h)("div", { class: `${e}-color-picker-handle__fill`, style: {
|
|
250
|
-
backgroundColor: `hsl(${this.hue}, 100%, 50%)`,
|
|
251
|
-
borderRadius: N,
|
|
252
|
-
width: W,
|
|
253
|
-
height: W
|
|
254
|
-
} })
|
|
255
|
-
)
|
|
256
|
-
)
|
|
257
|
-
)
|
|
258
|
-
);
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
var ze = {};
|
|
262
|
-
Object.defineProperty(ze, "__esModule", { value: !0 });
|
|
263
|
-
const U = D, pe = De, lr = te, ar = $, ae = "12px", ir = 12, L = "6px";
|
|
264
|
-
ze.default = (0, U.defineComponent)({
|
|
189
|
+
const pe = De, or = re, U = V, nr = k, ae = "12px", lr = 12, L = "6px";
|
|
190
|
+
He.default = (0, U.defineComponent)({
|
|
265
191
|
name: "AlphaSlider",
|
|
266
192
|
props: {
|
|
267
193
|
clsPrefix: {
|
|
@@ -284,25 +210,25 @@ ze.default = (0, U.defineComponent)({
|
|
|
284
210
|
},
|
|
285
211
|
setup(e) {
|
|
286
212
|
const o = (0, U.ref)(null);
|
|
287
|
-
function r(
|
|
288
|
-
!o.value || !e.rgba || ((0, pe.on)("mousemove", document,
|
|
213
|
+
function r(t) {
|
|
214
|
+
!o.value || !e.rgba || ((0, pe.on)("mousemove", document, n), (0, pe.on)("mouseup", document, a), n(t));
|
|
289
215
|
}
|
|
290
|
-
function t
|
|
216
|
+
function n(t) {
|
|
291
217
|
const { value: i } = o;
|
|
292
218
|
if (!i)
|
|
293
219
|
return;
|
|
294
|
-
const { width: s, left: f } = i.getBoundingClientRect(),
|
|
295
|
-
e.onUpdateAlpha((0,
|
|
220
|
+
const { width: s, left: f } = i.getBoundingClientRect(), x = (t.clientX - f) / (s - lr);
|
|
221
|
+
e.onUpdateAlpha((0, nr.normalizeAlpha)(x));
|
|
296
222
|
}
|
|
297
223
|
function a() {
|
|
298
|
-
var
|
|
299
|
-
(0, pe.off)("mousemove", document,
|
|
224
|
+
var t;
|
|
225
|
+
(0, pe.off)("mousemove", document, n), (0, pe.off)("mouseup", document, a), (t = e.onComplete) === null || t === void 0 || t.call(e);
|
|
300
226
|
}
|
|
301
227
|
return {
|
|
302
228
|
railRef: o,
|
|
303
229
|
railBackgroundImage: (0, U.computed)(() => {
|
|
304
|
-
const { rgba:
|
|
305
|
-
return
|
|
230
|
+
const { rgba: t } = e;
|
|
231
|
+
return t ? `linear-gradient(to right, rgba(${t[0]}, ${t[1]}, ${t[2]}, 0) 0%, rgba(${t[0]}, ${t[1]}, ${t[2]}, 1) 100%)` : "";
|
|
306
232
|
}),
|
|
307
233
|
handleMouseDown: r
|
|
308
234
|
};
|
|
@@ -349,7 +275,7 @@ ze.default = (0, U.defineComponent)({
|
|
|
349
275
|
height: ae
|
|
350
276
|
} },
|
|
351
277
|
(0, U.h)("div", { class: `${e}-color-picker-handle__fill`, style: {
|
|
352
|
-
backgroundColor: (0,
|
|
278
|
+
backgroundColor: (0, or.toRgbaString)(this.rgba),
|
|
353
279
|
borderRadius: L,
|
|
354
280
|
width: ae,
|
|
355
281
|
height: ae
|
|
@@ -359,117 +285,33 @@ ze.default = (0, U.defineComponent)({
|
|
|
359
285
|
);
|
|
360
286
|
}
|
|
361
287
|
});
|
|
362
|
-
var Ie = {};
|
|
288
|
+
var ze = {}, Ie = {}, oe = {};
|
|
289
|
+
Object.defineProperty(oe, "__esModule", { value: !0 });
|
|
290
|
+
oe.colorPickerInjectionKey = void 0;
|
|
291
|
+
const ar = xe;
|
|
292
|
+
oe.colorPickerInjectionKey = (0, ar.createInjectionKey)("n-color-picker");
|
|
363
293
|
Object.defineProperty(Ie, "__esModule", { value: !0 });
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
name: "Pallete",
|
|
367
|
-
props: {
|
|
368
|
-
clsPrefix: {
|
|
369
|
-
type: String,
|
|
370
|
-
required: !0
|
|
371
|
-
},
|
|
372
|
-
rgba: {
|
|
373
|
-
type: Array,
|
|
374
|
-
default: null
|
|
375
|
-
},
|
|
376
|
-
// 0 - 360
|
|
377
|
-
displayedHue: {
|
|
378
|
-
type: Number,
|
|
379
|
-
required: !0
|
|
380
|
-
},
|
|
381
|
-
displayedSv: {
|
|
382
|
-
type: Array,
|
|
383
|
-
required: !0
|
|
384
|
-
},
|
|
385
|
-
onUpdateSV: {
|
|
386
|
-
type: Function,
|
|
387
|
-
required: !0
|
|
388
|
-
},
|
|
389
|
-
onComplete: Function
|
|
390
|
-
},
|
|
391
|
-
setup(e) {
|
|
392
|
-
const o = (0, B.ref)(null);
|
|
393
|
-
function r(l) {
|
|
394
|
-
o.value && ((0, ge.on)("mousemove", document, t), (0, ge.on)("mouseup", document, a), t(l));
|
|
395
|
-
}
|
|
396
|
-
function t(l) {
|
|
397
|
-
const { value: i } = o;
|
|
398
|
-
if (!i)
|
|
399
|
-
return;
|
|
400
|
-
const { width: s, height: f, left: _, bottom: V } = i.getBoundingClientRect(), j = (V - l.clientY) / f, F = (l.clientX - _) / s, oe = 100 * (F > 1 ? 1 : F < 0 ? 0 : F), xe = 100 * (j > 1 ? 1 : j < 0 ? 0 : j);
|
|
401
|
-
e.onUpdateSV(oe, xe);
|
|
402
|
-
}
|
|
403
|
-
function a() {
|
|
404
|
-
var l;
|
|
405
|
-
(0, ge.off)("mousemove", document, t), (0, ge.off)("mouseup", document, a), (l = e.onComplete) === null || l === void 0 || l.call(e);
|
|
406
|
-
}
|
|
407
|
-
return {
|
|
408
|
-
palleteRef: o,
|
|
409
|
-
handleColor: (0, B.computed)(() => {
|
|
410
|
-
const { rgba: l } = e;
|
|
411
|
-
return l ? `rgb(${l[0]}, ${l[1]}, ${l[2]})` : "";
|
|
412
|
-
}),
|
|
413
|
-
handleMouseDown: r
|
|
414
|
-
};
|
|
415
|
-
},
|
|
416
|
-
render() {
|
|
417
|
-
const { clsPrefix: e } = this;
|
|
418
|
-
return (0, B.h)(
|
|
419
|
-
"div",
|
|
420
|
-
{ class: `${e}-color-picker-pallete`, onMousedown: this.handleMouseDown, ref: "palleteRef" },
|
|
421
|
-
(0, B.h)("div", { class: `${e}-color-picker-pallete__layer`, style: {
|
|
422
|
-
backgroundImage: `linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`
|
|
423
|
-
} }),
|
|
424
|
-
(0, B.h)("div", { class: `${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`, style: {
|
|
425
|
-
backgroundImage: "linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"
|
|
426
|
-
} }),
|
|
427
|
-
this.rgba && (0, B.h)(
|
|
428
|
-
"div",
|
|
429
|
-
{ class: `${e}-color-picker-handle`, style: {
|
|
430
|
-
width: ve,
|
|
431
|
-
height: ve,
|
|
432
|
-
borderRadius: be,
|
|
433
|
-
left: `calc(${this.displayedSv[0]}% - ${be})`,
|
|
434
|
-
bottom: `calc(${this.displayedSv[1]}% - ${be})`
|
|
435
|
-
} },
|
|
436
|
-
(0, B.h)("div", { class: `${e}-color-picker-handle__fill`, style: {
|
|
437
|
-
backgroundColor: this.handleColor,
|
|
438
|
-
borderRadius: be,
|
|
439
|
-
width: ve,
|
|
440
|
-
height: ve
|
|
441
|
-
} })
|
|
442
|
-
)
|
|
443
|
-
);
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
var Be = {}, Oe = {}, re = {};
|
|
447
|
-
Object.defineProperty(re, "__esModule", { value: !0 });
|
|
448
|
-
re.colorPickerInjectionKey = void 0;
|
|
449
|
-
const sr = _e;
|
|
450
|
-
re.colorPickerInjectionKey = (0, sr.createInjectionKey)("n-color-picker");
|
|
451
|
-
Object.defineProperty(Oe, "__esModule", { value: !0 });
|
|
452
|
-
const ie = D, ur = et, cr = re;
|
|
453
|
-
function dr(e) {
|
|
294
|
+
const ie = V, ir = rt, sr = oe;
|
|
295
|
+
function ur(e) {
|
|
454
296
|
return /^\d{1,3}\.?\d*$/.test(e.trim()) ? Math.max(0, Math.min(Number.parseInt(e), 255)) : !1;
|
|
455
297
|
}
|
|
456
|
-
function
|
|
298
|
+
function cr(e) {
|
|
457
299
|
return /^\d{1,3}\.?\d*$/.test(e.trim()) ? Math.max(0, Math.min(Number.parseInt(e), 360)) : !1;
|
|
458
300
|
}
|
|
459
|
-
function
|
|
301
|
+
function dr(e) {
|
|
460
302
|
return /^\d{1,3}\.?\d*$/.test(e.trim()) ? Math.max(0, Math.min(Number.parseInt(e), 100)) : !1;
|
|
461
303
|
}
|
|
462
|
-
function
|
|
304
|
+
function hr(e) {
|
|
463
305
|
const o = e.trim();
|
|
464
306
|
return /^#[0-9a-fA-F]+$/.test(o) ? [4, 5, 7, 9].includes(o.length) : !1;
|
|
465
307
|
}
|
|
466
|
-
function
|
|
308
|
+
function fr(e) {
|
|
467
309
|
return /^\d{1,3}\.?\d*%$/.test(e.trim()) ? Math.max(0, Math.min(Number.parseInt(e) / 100, 100)) : !1;
|
|
468
310
|
}
|
|
469
|
-
const
|
|
311
|
+
const pr = {
|
|
470
312
|
paddingSmall: "0 4px"
|
|
471
313
|
};
|
|
472
|
-
|
|
314
|
+
Ie.default = (0, ie.defineComponent)({
|
|
473
315
|
name: "ColorInputUnit",
|
|
474
316
|
props: {
|
|
475
317
|
label: {
|
|
@@ -487,11 +329,11 @@ Oe.default = (0, ie.defineComponent)({
|
|
|
487
329
|
}
|
|
488
330
|
},
|
|
489
331
|
setup(e) {
|
|
490
|
-
const o = (0, ie.ref)(""), { themeRef: r } = (0, ie.inject)(
|
|
332
|
+
const o = (0, ie.ref)(""), { themeRef: r } = (0, ie.inject)(sr.colorPickerInjectionKey, null);
|
|
491
333
|
(0, ie.watchEffect)(() => {
|
|
492
|
-
o.value =
|
|
334
|
+
o.value = n();
|
|
493
335
|
});
|
|
494
|
-
function
|
|
336
|
+
function n() {
|
|
495
337
|
const { value: i } = e;
|
|
496
338
|
if (i === null)
|
|
497
339
|
return "";
|
|
@@ -501,45 +343,45 @@ Oe.default = (0, ie.defineComponent)({
|
|
|
501
343
|
function a(i) {
|
|
502
344
|
o.value = i;
|
|
503
345
|
}
|
|
504
|
-
function
|
|
346
|
+
function t(i) {
|
|
505
347
|
let s, f;
|
|
506
348
|
switch (e.label) {
|
|
507
349
|
case "HEX":
|
|
508
|
-
f =
|
|
350
|
+
f = hr(i), f && e.onUpdateValue(i), o.value = n();
|
|
509
351
|
break;
|
|
510
352
|
case "H":
|
|
511
|
-
s =
|
|
353
|
+
s = cr(i), s === !1 ? o.value = n() : e.onUpdateValue(s);
|
|
512
354
|
break;
|
|
513
355
|
case "S":
|
|
514
356
|
case "L":
|
|
515
357
|
case "V":
|
|
516
|
-
s =
|
|
358
|
+
s = dr(i), s === !1 ? o.value = n() : e.onUpdateValue(s);
|
|
517
359
|
break;
|
|
518
360
|
case "A":
|
|
519
|
-
s =
|
|
361
|
+
s = fr(i), s === !1 ? o.value = n() : e.onUpdateValue(s);
|
|
520
362
|
break;
|
|
521
363
|
case "R":
|
|
522
364
|
case "G":
|
|
523
365
|
case "B":
|
|
524
|
-
s =
|
|
366
|
+
s = ur(i), s === !1 ? o.value = n() : e.onUpdateValue(s);
|
|
525
367
|
break;
|
|
526
368
|
}
|
|
527
369
|
}
|
|
528
370
|
return {
|
|
529
371
|
mergedTheme: r,
|
|
530
372
|
inputValue: o,
|
|
531
|
-
handleInputChange:
|
|
373
|
+
handleInputChange: t,
|
|
532
374
|
handleInputUpdateValue: a
|
|
533
375
|
};
|
|
534
376
|
},
|
|
535
377
|
render() {
|
|
536
378
|
const { mergedTheme: e } = this;
|
|
537
|
-
return (0, ie.h)(
|
|
379
|
+
return (0, ie.h)(ir.NInput, {
|
|
538
380
|
size: "small",
|
|
539
381
|
placeholder: this.label,
|
|
540
382
|
theme: e.peers.Input,
|
|
541
383
|
themeOverrides: e.peerOverrides.Input,
|
|
542
|
-
builtinThemeOverrides:
|
|
384
|
+
builtinThemeOverrides: pr,
|
|
543
385
|
value: this.inputValue,
|
|
544
386
|
onUpdateValue: this.handleInputUpdateValue,
|
|
545
387
|
onChange: this.handleInputChange,
|
|
@@ -548,12 +390,12 @@ Oe.default = (0, ie.defineComponent)({
|
|
|
548
390
|
});
|
|
549
391
|
}
|
|
550
392
|
});
|
|
551
|
-
var
|
|
393
|
+
var gr = E && E.__importDefault || function(e) {
|
|
552
394
|
return e && e.__esModule ? e : { default: e };
|
|
553
395
|
};
|
|
554
|
-
Object.defineProperty(
|
|
555
|
-
const
|
|
556
|
-
|
|
396
|
+
Object.defineProperty(ze, "__esModule", { value: !0 });
|
|
397
|
+
const A = re, ee = V, vr = rt, We = gr(Ie);
|
|
398
|
+
ze.default = (0, ee.defineComponent)({
|
|
557
399
|
name: "ColorInput",
|
|
558
400
|
props: {
|
|
559
401
|
clsPrefix: {
|
|
@@ -593,21 +435,21 @@ Be.default = (0, ee.defineComponent)({
|
|
|
593
435
|
setup(e) {
|
|
594
436
|
return {
|
|
595
437
|
handleUnitUpdateValue(o, r) {
|
|
596
|
-
const { showAlpha:
|
|
438
|
+
const { showAlpha: n } = e;
|
|
597
439
|
if (e.mode === "hex") {
|
|
598
|
-
e.onUpdateValue((
|
|
440
|
+
e.onUpdateValue((n ? A.toHexaString : A.toHexString)(r));
|
|
599
441
|
return;
|
|
600
442
|
}
|
|
601
443
|
let a;
|
|
602
444
|
switch (e.valueArr === null ? a = [0, 0, 0, 0] : a = Array.from(e.valueArr), e.mode) {
|
|
603
445
|
case "hsv":
|
|
604
|
-
a[o] = r, e.onUpdateValue((
|
|
446
|
+
a[o] = r, e.onUpdateValue((n ? A.toHsvaString : A.toHsvString)(a));
|
|
605
447
|
break;
|
|
606
448
|
case "rgb":
|
|
607
|
-
a[o] = r, e.onUpdateValue((
|
|
449
|
+
a[o] = r, e.onUpdateValue((n ? A.toRgbaString : A.toRgbString)(a));
|
|
608
450
|
break;
|
|
609
451
|
case "hsl":
|
|
610
|
-
a[o] = r, e.onUpdateValue((
|
|
452
|
+
a[o] = r, e.onUpdateValue((n ? A.toHslaString : A.toHslString)(a));
|
|
611
453
|
break;
|
|
612
454
|
}
|
|
613
455
|
}
|
|
@@ -621,20 +463,20 @@ Be.default = (0, ee.defineComponent)({
|
|
|
621
463
|
(0, ee.h)("div", { class: `${e}-color-picker-input__mode`, onClick: this.onUpdateMode, style: {
|
|
622
464
|
cursor: o.length === 1 ? "" : "pointer"
|
|
623
465
|
} }, this.mode.toUpperCase() + (this.showAlpha ? "A" : "")),
|
|
624
|
-
(0, ee.h)(
|
|
466
|
+
(0, ee.h)(vr.NInputGroup, null, {
|
|
625
467
|
default: () => {
|
|
626
|
-
const { mode: r, valueArr:
|
|
468
|
+
const { mode: r, valueArr: n, showAlpha: a } = this;
|
|
627
469
|
if (r === "hex") {
|
|
628
|
-
let
|
|
470
|
+
let t = null;
|
|
629
471
|
try {
|
|
630
|
-
|
|
472
|
+
t = n === null ? null : (a ? A.toHexaString : A.toHexString)(n);
|
|
631
473
|
} catch {
|
|
632
474
|
}
|
|
633
|
-
return (0, ee.h)(
|
|
475
|
+
return (0, ee.h)(We.default, { label: "HEX", showAlpha: a, value: t, onUpdateValue: (i) => {
|
|
634
476
|
this.handleUnitUpdateValue(0, i);
|
|
635
477
|
} });
|
|
636
478
|
}
|
|
637
|
-
return (r + (a ? "a" : "")).split("").map((
|
|
479
|
+
return (r + (a ? "a" : "")).split("").map((t, i) => (0, ee.h)(We.default, { label: t.toUpperCase(), value: n === null ? null : n[i], onUpdateValue: (s) => {
|
|
638
480
|
this.handleUnitUpdateValue(i, s);
|
|
639
481
|
} }));
|
|
640
482
|
}
|
|
@@ -642,72 +484,21 @@ Be.default = (0, ee.defineComponent)({
|
|
|
642
484
|
);
|
|
643
485
|
}
|
|
644
486
|
});
|
|
645
|
-
var
|
|
646
|
-
Object.defineProperty(
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
name: "ColorPickerTrigger",
|
|
650
|
-
props: {
|
|
651
|
-
clsPrefix: {
|
|
652
|
-
type: String,
|
|
653
|
-
required: !0
|
|
654
|
-
},
|
|
655
|
-
value: {
|
|
656
|
-
type: String,
|
|
657
|
-
default: null
|
|
658
|
-
},
|
|
659
|
-
hsla: {
|
|
660
|
-
type: Array,
|
|
661
|
-
default: null
|
|
662
|
-
},
|
|
663
|
-
disabled: Boolean,
|
|
664
|
-
onClick: Function
|
|
665
|
-
},
|
|
666
|
-
setup(e) {
|
|
667
|
-
const { colorPickerSlots: o, renderLabelRef: r } = (0, K.inject)(xr.colorPickerInjectionKey, null);
|
|
668
|
-
return () => {
|
|
669
|
-
const { hsla: t, value: a, clsPrefix: l, onClick: i, disabled: s } = e, f = o.label || r.value;
|
|
670
|
-
return (0, K.h)(
|
|
671
|
-
"div",
|
|
672
|
-
{ class: [
|
|
673
|
-
`${l}-color-picker-trigger`,
|
|
674
|
-
s && `${l}-color-picker-trigger--disabled`
|
|
675
|
-
], onClick: s ? void 0 : i },
|
|
676
|
-
(0, K.h)(
|
|
677
|
-
"div",
|
|
678
|
-
{ class: `${l}-color-picker-trigger__fill` },
|
|
679
|
-
(0, K.h)("div", { class: `${l}-color-picker-checkboard` }),
|
|
680
|
-
(0, K.h)("div", { style: {
|
|
681
|
-
position: "absolute",
|
|
682
|
-
left: 0,
|
|
683
|
-
right: 0,
|
|
684
|
-
top: 0,
|
|
685
|
-
bottom: 0,
|
|
686
|
-
backgroundColor: t ? (0, _r.toHslaString)(t) : ""
|
|
687
|
-
} }),
|
|
688
|
-
a && t ? (0, K.h)("div", { class: `${l}-color-picker-trigger__value`, style: {
|
|
689
|
-
color: t[2] > 50 || t[3] < 0.5 ? "black" : "white"
|
|
690
|
-
} }, f ? f(a) : a) : null
|
|
691
|
-
)
|
|
692
|
-
);
|
|
693
|
-
};
|
|
694
|
-
}
|
|
695
|
-
});
|
|
696
|
-
var Fe = {};
|
|
697
|
-
Object.defineProperty(Fe, "__esModule", { value: !0 });
|
|
698
|
-
const se = D, Ae = te, kr = _e, Ge = $;
|
|
699
|
-
function yr(e, o) {
|
|
487
|
+
var Be = {};
|
|
488
|
+
Object.defineProperty(Be, "__esModule", { value: !0 });
|
|
489
|
+
const Re = re, se = V, br = xe, Ye = k;
|
|
490
|
+
function mr(e, o) {
|
|
700
491
|
if (o === "hsv") {
|
|
701
|
-
const [r,
|
|
702
|
-
return (0,
|
|
492
|
+
const [r, n, a, t] = (0, Re.hsva)(e);
|
|
493
|
+
return (0, Re.toRgbaString)([...(0, Re.hsv2rgb)(r, n, a), t]);
|
|
703
494
|
}
|
|
704
495
|
return e;
|
|
705
496
|
}
|
|
706
|
-
function
|
|
497
|
+
function _r(e) {
|
|
707
498
|
const o = document.createElement("canvas").getContext("2d");
|
|
708
499
|
return o ? (o.fillStyle = e, o.fillStyle) : "#000000";
|
|
709
500
|
}
|
|
710
|
-
|
|
501
|
+
Be.default = (0, se.defineComponent)({
|
|
711
502
|
name: "ColorPickerSwatches",
|
|
712
503
|
props: {
|
|
713
504
|
clsPrefix: {
|
|
@@ -728,28 +519,28 @@ Fe.default = (0, se.defineComponent)({
|
|
|
728
519
|
}
|
|
729
520
|
},
|
|
730
521
|
setup(e) {
|
|
731
|
-
const o = (0, se.computed)(() => e.swatches.map((
|
|
732
|
-
const i = (0,
|
|
522
|
+
const o = (0, se.computed)(() => e.swatches.map((t) => {
|
|
523
|
+
const i = (0, Ye.getModeFromValue)(t);
|
|
733
524
|
return {
|
|
734
|
-
value:
|
|
525
|
+
value: t,
|
|
735
526
|
mode: i,
|
|
736
|
-
legalValue:
|
|
527
|
+
legalValue: mr(t, i)
|
|
737
528
|
};
|
|
738
529
|
}));
|
|
739
|
-
function r(
|
|
530
|
+
function r(t) {
|
|
740
531
|
const { mode: i } = e;
|
|
741
|
-
let { value: s, mode: f } =
|
|
742
|
-
return f || (f = "hex", /^[a-zA-Z]+$/.test(s) ? s =
|
|
532
|
+
let { value: s, mode: f } = t;
|
|
533
|
+
return f || (f = "hex", /^[a-zA-Z]+$/.test(s) ? s = _r(s) : ((0, br.warn)("color-picker", `color ${s} in swatches is invalid.`), s = "#000000")), f === i ? s : (0, Ye.convertColor)(s, i, f);
|
|
743
534
|
}
|
|
744
|
-
function t
|
|
745
|
-
e.onUpdateColor(r(
|
|
535
|
+
function n(t) {
|
|
536
|
+
e.onUpdateColor(r(t));
|
|
746
537
|
}
|
|
747
|
-
function a(
|
|
748
|
-
|
|
538
|
+
function a(t, i) {
|
|
539
|
+
t.key === "Enter" && n(i);
|
|
749
540
|
}
|
|
750
541
|
return {
|
|
751
542
|
parsedSwatchesRef: o,
|
|
752
|
-
handleSwatchSelect:
|
|
543
|
+
handleSwatchSelect: n,
|
|
753
544
|
handleSwatchKeyDown: a
|
|
754
545
|
};
|
|
755
546
|
},
|
|
@@ -766,10 +557,62 @@ Fe.default = (0, se.defineComponent)({
|
|
|
766
557
|
)));
|
|
767
558
|
}
|
|
768
559
|
});
|
|
769
|
-
var
|
|
770
|
-
Object.defineProperty(
|
|
771
|
-
const
|
|
772
|
-
|
|
560
|
+
var Oe = {};
|
|
561
|
+
Object.defineProperty(Oe, "__esModule", { value: !0 });
|
|
562
|
+
const xr = re, K = V, kr = oe, yr = k;
|
|
563
|
+
Oe.default = (0, K.defineComponent)({
|
|
564
|
+
name: "ColorPickerTrigger",
|
|
565
|
+
slots: Object,
|
|
566
|
+
props: {
|
|
567
|
+
clsPrefix: {
|
|
568
|
+
type: String,
|
|
569
|
+
required: !0
|
|
570
|
+
},
|
|
571
|
+
value: {
|
|
572
|
+
type: String,
|
|
573
|
+
default: null
|
|
574
|
+
},
|
|
575
|
+
hsla: {
|
|
576
|
+
type: Array,
|
|
577
|
+
default: null
|
|
578
|
+
},
|
|
579
|
+
disabled: Boolean,
|
|
580
|
+
onClick: Function
|
|
581
|
+
},
|
|
582
|
+
setup(e) {
|
|
583
|
+
const { colorPickerSlots: o, renderLabelRef: r } = (0, K.inject)(kr.colorPickerInjectionKey, null);
|
|
584
|
+
return () => {
|
|
585
|
+
const { hsla: n, value: a, clsPrefix: t, onClick: i, disabled: s } = e, f = o.label || r.value;
|
|
586
|
+
return (0, K.h)(
|
|
587
|
+
"div",
|
|
588
|
+
{ class: [
|
|
589
|
+
`${t}-color-picker-trigger`,
|
|
590
|
+
s && `${t}-color-picker-trigger--disabled`
|
|
591
|
+
], onClick: s ? void 0 : i },
|
|
592
|
+
(0, K.h)(
|
|
593
|
+
"div",
|
|
594
|
+
{ class: `${t}-color-picker-trigger__fill` },
|
|
595
|
+
(0, K.h)("div", { class: `${t}-color-picker-checkboard` }),
|
|
596
|
+
(0, K.h)("div", { style: {
|
|
597
|
+
position: "absolute",
|
|
598
|
+
left: 0,
|
|
599
|
+
right: 0,
|
|
600
|
+
top: 0,
|
|
601
|
+
bottom: 0,
|
|
602
|
+
backgroundColor: n ? (0, xr.toHslaString)(n) : ""
|
|
603
|
+
} }),
|
|
604
|
+
a && n ? (0, K.h)("div", { class: `${t}-color-picker-trigger__value`, style: {
|
|
605
|
+
color: (0, yr.getWCAGContrast)(n) ? "white" : "black"
|
|
606
|
+
} }, f ? f(a) : a) : null
|
|
607
|
+
)
|
|
608
|
+
);
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
var je = {};
|
|
613
|
+
Object.defineProperty(je, "__esModule", { value: !0 });
|
|
614
|
+
const ge = V, Je = k;
|
|
615
|
+
je.default = (0, ge.defineComponent)({
|
|
773
616
|
name: "ColorPreview",
|
|
774
617
|
props: {
|
|
775
618
|
clsPrefix: {
|
|
@@ -784,7 +627,7 @@ Ee.default = (0, me.defineComponent)({
|
|
|
784
627
|
type: String,
|
|
785
628
|
default: null,
|
|
786
629
|
validator: (e) => {
|
|
787
|
-
const o = (0,
|
|
630
|
+
const o = (0, Je.getModeFromValue)(e);
|
|
788
631
|
return !!(!e || o && o !== "hsv");
|
|
789
632
|
}
|
|
790
633
|
},
|
|
@@ -795,9 +638,9 @@ Ee.default = (0, me.defineComponent)({
|
|
|
795
638
|
},
|
|
796
639
|
setup(e) {
|
|
797
640
|
function o(r) {
|
|
798
|
-
var
|
|
641
|
+
var n;
|
|
799
642
|
const a = r.target.value;
|
|
800
|
-
(
|
|
643
|
+
(n = e.onUpdateColor) === null || n === void 0 || n.call(e, (0, Je.convertColor)(a.toUpperCase(), e.mode, "hex")), r.stopPropagation();
|
|
801
644
|
}
|
|
802
645
|
return {
|
|
803
646
|
handleChange: o
|
|
@@ -805,13 +648,185 @@ Ee.default = (0, me.defineComponent)({
|
|
|
805
648
|
},
|
|
806
649
|
render() {
|
|
807
650
|
const { clsPrefix: e } = this;
|
|
808
|
-
return (0,
|
|
651
|
+
return (0, ge.h)(
|
|
809
652
|
"div",
|
|
810
653
|
{ class: `${e}-color-picker-preview__preview` },
|
|
811
|
-
(0,
|
|
654
|
+
(0, ge.h)("span", { class: `${e}-color-picker-preview__fill`, style: {
|
|
812
655
|
background: this.color || "#000000"
|
|
813
656
|
} }),
|
|
814
|
-
(0,
|
|
657
|
+
(0, ge.h)("input", { class: `${e}-color-picker-preview__input`, type: "color", value: this.color, onChange: this.handleChange })
|
|
658
|
+
);
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
var Fe = {};
|
|
662
|
+
Object.defineProperty(Fe, "__esModule", { value: !0 });
|
|
663
|
+
const ve = De, G = V, Sr = k, te = "12px", wr = 12, X = "6px", Cr = 6, Pr = "linear-gradient(90deg,red,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red)";
|
|
664
|
+
Fe.default = (0, G.defineComponent)({
|
|
665
|
+
name: "HueSlider",
|
|
666
|
+
props: {
|
|
667
|
+
clsPrefix: {
|
|
668
|
+
type: String,
|
|
669
|
+
required: !0
|
|
670
|
+
},
|
|
671
|
+
hue: {
|
|
672
|
+
type: Number,
|
|
673
|
+
required: !0
|
|
674
|
+
},
|
|
675
|
+
onUpdateHue: {
|
|
676
|
+
type: Function,
|
|
677
|
+
required: !0
|
|
678
|
+
},
|
|
679
|
+
onComplete: Function
|
|
680
|
+
},
|
|
681
|
+
setup(e) {
|
|
682
|
+
const o = (0, G.ref)(null);
|
|
683
|
+
function r(t) {
|
|
684
|
+
o.value && ((0, ve.on)("mousemove", document, n), (0, ve.on)("mouseup", document, a), n(t));
|
|
685
|
+
}
|
|
686
|
+
function n(t) {
|
|
687
|
+
const { value: i } = o;
|
|
688
|
+
if (!i)
|
|
689
|
+
return;
|
|
690
|
+
const { width: s, left: f } = i.getBoundingClientRect(), x = (0, Sr.normalizeHue)((t.clientX - f - Cr) / (s - wr) * 360);
|
|
691
|
+
e.onUpdateHue(x);
|
|
692
|
+
}
|
|
693
|
+
function a() {
|
|
694
|
+
var t;
|
|
695
|
+
(0, ve.off)("mousemove", document, n), (0, ve.off)("mouseup", document, a), (t = e.onComplete) === null || t === void 0 || t.call(e);
|
|
696
|
+
}
|
|
697
|
+
return {
|
|
698
|
+
railRef: o,
|
|
699
|
+
handleMouseDown: r
|
|
700
|
+
};
|
|
701
|
+
},
|
|
702
|
+
render() {
|
|
703
|
+
const { clsPrefix: e } = this;
|
|
704
|
+
return (0, G.h)(
|
|
705
|
+
"div",
|
|
706
|
+
{ class: `${e}-color-picker-slider`, style: {
|
|
707
|
+
height: te,
|
|
708
|
+
borderRadius: X
|
|
709
|
+
} },
|
|
710
|
+
(0, G.h)(
|
|
711
|
+
"div",
|
|
712
|
+
{ ref: "railRef", style: {
|
|
713
|
+
boxShadow: "inset 0 0 2px 0 rgba(0, 0, 0, .24)",
|
|
714
|
+
boxSizing: "border-box",
|
|
715
|
+
backgroundImage: Pr,
|
|
716
|
+
height: te,
|
|
717
|
+
borderRadius: X,
|
|
718
|
+
position: "relative"
|
|
719
|
+
}, onMousedown: this.handleMouseDown },
|
|
720
|
+
(0, G.h)(
|
|
721
|
+
"div",
|
|
722
|
+
{ style: {
|
|
723
|
+
position: "absolute",
|
|
724
|
+
left: X,
|
|
725
|
+
right: X,
|
|
726
|
+
top: 0,
|
|
727
|
+
bottom: 0
|
|
728
|
+
} },
|
|
729
|
+
(0, G.h)(
|
|
730
|
+
"div",
|
|
731
|
+
{ class: `${e}-color-picker-handle`, style: {
|
|
732
|
+
left: `calc((${this.hue}%) / 359 * 100 - ${X})`,
|
|
733
|
+
borderRadius: X,
|
|
734
|
+
width: te,
|
|
735
|
+
height: te
|
|
736
|
+
} },
|
|
737
|
+
(0, G.h)("div", { class: `${e}-color-picker-handle__fill`, style: {
|
|
738
|
+
backgroundColor: `hsl(${this.hue}, 100%, 50%)`,
|
|
739
|
+
borderRadius: X,
|
|
740
|
+
width: te,
|
|
741
|
+
height: te
|
|
742
|
+
} })
|
|
743
|
+
)
|
|
744
|
+
)
|
|
745
|
+
)
|
|
746
|
+
);
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
var Ee = {};
|
|
750
|
+
Object.defineProperty(Ee, "__esModule", { value: !0 });
|
|
751
|
+
const be = De, F = V, me = "12px", _e = "6px";
|
|
752
|
+
Ee.default = (0, F.defineComponent)({
|
|
753
|
+
name: "Pallete",
|
|
754
|
+
props: {
|
|
755
|
+
clsPrefix: {
|
|
756
|
+
type: String,
|
|
757
|
+
required: !0
|
|
758
|
+
},
|
|
759
|
+
rgba: {
|
|
760
|
+
type: Array,
|
|
761
|
+
default: null
|
|
762
|
+
},
|
|
763
|
+
// 0 - 360
|
|
764
|
+
displayedHue: {
|
|
765
|
+
type: Number,
|
|
766
|
+
required: !0
|
|
767
|
+
},
|
|
768
|
+
displayedSv: {
|
|
769
|
+
type: Array,
|
|
770
|
+
required: !0
|
|
771
|
+
},
|
|
772
|
+
onUpdateSV: {
|
|
773
|
+
type: Function,
|
|
774
|
+
required: !0
|
|
775
|
+
},
|
|
776
|
+
onComplete: Function
|
|
777
|
+
},
|
|
778
|
+
setup(e) {
|
|
779
|
+
const o = (0, F.ref)(null);
|
|
780
|
+
function r(t) {
|
|
781
|
+
o.value && ((0, be.on)("mousemove", document, n), (0, be.on)("mouseup", document, a), n(t));
|
|
782
|
+
}
|
|
783
|
+
function n(t) {
|
|
784
|
+
const { value: i } = o;
|
|
785
|
+
if (!i)
|
|
786
|
+
return;
|
|
787
|
+
const { width: s, height: f, left: x, bottom: H } = i.getBoundingClientRect(), $ = (H - t.clientY) / f, z = (t.clientX - x) / s, I = 100 * (z > 1 ? 1 : z < 0 ? 0 : z), Z = 100 * ($ > 1 ? 1 : $ < 0 ? 0 : $);
|
|
788
|
+
e.onUpdateSV(I, Z);
|
|
789
|
+
}
|
|
790
|
+
function a() {
|
|
791
|
+
var t;
|
|
792
|
+
(0, be.off)("mousemove", document, n), (0, be.off)("mouseup", document, a), (t = e.onComplete) === null || t === void 0 || t.call(e);
|
|
793
|
+
}
|
|
794
|
+
return {
|
|
795
|
+
palleteRef: o,
|
|
796
|
+
handleColor: (0, F.computed)(() => {
|
|
797
|
+
const { rgba: t } = e;
|
|
798
|
+
return t ? `rgb(${t[0]}, ${t[1]}, ${t[2]})` : "";
|
|
799
|
+
}),
|
|
800
|
+
handleMouseDown: r
|
|
801
|
+
};
|
|
802
|
+
},
|
|
803
|
+
render() {
|
|
804
|
+
const { clsPrefix: e } = this;
|
|
805
|
+
return (0, F.h)(
|
|
806
|
+
"div",
|
|
807
|
+
{ class: `${e}-color-picker-pallete`, onMousedown: this.handleMouseDown, ref: "palleteRef" },
|
|
808
|
+
(0, F.h)("div", { class: `${e}-color-picker-pallete__layer`, style: {
|
|
809
|
+
backgroundImage: `linear-gradient(90deg, white, hsl(${this.displayedHue}, 100%, 50%))`
|
|
810
|
+
} }),
|
|
811
|
+
(0, F.h)("div", { class: `${e}-color-picker-pallete__layer ${e}-color-picker-pallete__layer--shadowed`, style: {
|
|
812
|
+
backgroundImage: "linear-gradient(180deg, rgba(0, 0, 0, 0%), rgba(0, 0, 0, 100%))"
|
|
813
|
+
} }),
|
|
814
|
+
this.rgba && (0, F.h)(
|
|
815
|
+
"div",
|
|
816
|
+
{ class: `${e}-color-picker-handle`, style: {
|
|
817
|
+
width: me,
|
|
818
|
+
height: me,
|
|
819
|
+
borderRadius: _e,
|
|
820
|
+
left: `calc(${this.displayedSv[0]}% - ${_e})`,
|
|
821
|
+
bottom: `calc(${this.displayedSv[1]}% - ${_e})`
|
|
822
|
+
} },
|
|
823
|
+
(0, F.h)("div", { class: `${e}-color-picker-handle__fill`, style: {
|
|
824
|
+
backgroundColor: this.handleColor,
|
|
825
|
+
borderRadius: _e,
|
|
826
|
+
width: me,
|
|
827
|
+
height: me
|
|
828
|
+
} })
|
|
829
|
+
)
|
|
815
830
|
);
|
|
816
831
|
}
|
|
817
832
|
});
|
|
@@ -819,7 +834,7 @@ var Te = {};
|
|
|
819
834
|
Object.defineProperty(Te, "__esModule", {
|
|
820
835
|
value: !0
|
|
821
836
|
});
|
|
822
|
-
const
|
|
837
|
+
const $r = Bt, u = Rt;
|
|
823
838
|
Te.default = (0, u.c)([(0, u.cB)("color-picker", `
|
|
824
839
|
display: inline-block;
|
|
825
840
|
box-sizing: border-box;
|
|
@@ -839,7 +854,7 @@ Te.default = (0, u.c)([(0, u.cB)("color-picker", `
|
|
|
839
854
|
background-color .3s var(--n-bezier);
|
|
840
855
|
border-radius: var(--n-border-radius);
|
|
841
856
|
box-shadow: var(--n-box-shadow);
|
|
842
|
-
`, [(0,
|
|
857
|
+
`, [(0, $r.fadeInScaleUpTransition)(), (0, u.cB)("input", `
|
|
843
858
|
text-align: center;
|
|
844
859
|
`)]), (0, u.cB)("color-picker-checkboard", `
|
|
845
860
|
background: white;
|
|
@@ -1002,12 +1017,12 @@ Te.default = (0, u.c)([(0, u.cB)("color-picker", `
|
|
|
1002
1017
|
content: "";
|
|
1003
1018
|
`)])])])])]);
|
|
1004
1019
|
(function(e) {
|
|
1005
|
-
var o =
|
|
1006
|
-
return
|
|
1020
|
+
var o = E && E.__importDefault || function(d) {
|
|
1021
|
+
return d && d.__esModule ? d : { default: d };
|
|
1007
1022
|
};
|
|
1008
1023
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.colorPickerProps = void 0;
|
|
1009
|
-
const r =
|
|
1010
|
-
e.colorPickerProps = Object.assign(Object.assign({},
|
|
1024
|
+
const r = re, n = zt, a = Ht, t = V, i = Vt, s = Dt, f = xe, x = It, H = lt, $ = o(He), z = o(ze), I = o(Be), Z = o(Oe), qe = o(je), st = oe, ut = o(Fe), ct = o(Ee), dt = o(Te), ke = k;
|
|
1025
|
+
e.colorPickerProps = Object.assign(Object.assign({}, s.useTheme.props), { value: String, show: {
|
|
1011
1026
|
type: Boolean,
|
|
1012
1027
|
default: void 0
|
|
1013
1028
|
}, defaultShow: Boolean, defaultValue: String, modes: {
|
|
@@ -1017,7 +1032,7 @@ Te.default = (0, u.c)([(0, u.cB)("color-picker", `
|
|
|
1017
1032
|
}, placement: {
|
|
1018
1033
|
type: String,
|
|
1019
1034
|
default: "bottom-start"
|
|
1020
|
-
}, to:
|
|
1035
|
+
}, to: f.useAdjustedTo.propTo, showAlpha: {
|
|
1021
1036
|
type: Boolean,
|
|
1022
1037
|
default: !0
|
|
1023
1038
|
}, showPreview: Boolean, swatches: Array, disabled: {
|
|
@@ -1026,203 +1041,204 @@ Te.default = (0, u.c)([(0, u.cB)("color-picker", `
|
|
|
1026
1041
|
}, actions: {
|
|
1027
1042
|
type: Array,
|
|
1028
1043
|
default: null
|
|
1029
|
-
}, internalActions: Array, size: String, renderLabel: Function, onComplete: Function, onConfirm: Function, onClear: Function, "onUpdate:show": [Function, Array], onUpdateShow: [Function, Array], "onUpdate:value": [Function, Array], onUpdateValue: [Function, Array] }), e.default = (0,
|
|
1044
|
+
}, internalActions: Array, size: String, renderLabel: Function, onComplete: Function, onConfirm: Function, onClear: Function, "onUpdate:show": [Function, Array], onUpdateShow: [Function, Array], "onUpdate:value": [Function, Array], onUpdateValue: [Function, Array] }), e.default = (0, t.defineComponent)({
|
|
1030
1045
|
name: "ColorPicker",
|
|
1031
1046
|
props: e.colorPickerProps,
|
|
1032
|
-
|
|
1033
|
-
|
|
1047
|
+
slots: Object,
|
|
1048
|
+
setup(d, { slots: T }) {
|
|
1049
|
+
const Ne = (0, t.ref)(null);
|
|
1034
1050
|
let ne = null;
|
|
1035
|
-
const ye = (0,
|
|
1036
|
-
(0,
|
|
1051
|
+
const ye = (0, s.useFormItem)(d), { mergedSizeRef: Le, mergedDisabledRef: ht } = ye, { localeRef: ce } = (0, s.useLocale)("global"), { mergedClsPrefixRef: Se, namespaceRef: ft, inlineThemeDisabled: we } = (0, s.useConfig)(d), Ce = (0, s.useTheme)("ColorPicker", "-color-picker", dt.default, H.colorPickerLight, d, Se);
|
|
1052
|
+
(0, t.provide)(st.colorPickerInjectionKey, {
|
|
1037
1053
|
themeRef: Ce,
|
|
1038
|
-
renderLabelRef: (0,
|
|
1039
|
-
colorPickerSlots:
|
|
1054
|
+
renderLabelRef: (0, t.toRef)(d, "renderLabel"),
|
|
1055
|
+
colorPickerSlots: T
|
|
1040
1056
|
});
|
|
1041
|
-
const
|
|
1042
|
-
function de(
|
|
1043
|
-
const { onUpdateShow: h, "onUpdate:show": g } =
|
|
1044
|
-
h && (0,
|
|
1057
|
+
const Ke = (0, t.ref)(d.defaultShow), Ge = (0, a.useMergedState)((0, t.toRef)(d, "show"), Ke);
|
|
1058
|
+
function de(l) {
|
|
1059
|
+
const { onUpdateShow: h, "onUpdate:show": g } = d;
|
|
1060
|
+
h && (0, f.call)(h, l), g && (0, f.call)(g, l), Ke.value = l;
|
|
1045
1061
|
}
|
|
1046
|
-
const { defaultValue:
|
|
1047
|
-
function
|
|
1048
|
-
const { modes:
|
|
1049
|
-
~g ?
|
|
1062
|
+
const { defaultValue: Xe } = d, Ze = (0, t.ref)(Xe === void 0 ? (0, ke.deriveDefaultValue)(d.modes, d.showAlpha) : Xe), y = (0, a.useMergedState)((0, t.toRef)(d, "value"), Ze), W = (0, t.ref)([y.value]), R = (0, t.ref)(0), Pe = (0, t.computed)(() => (0, ke.getModeFromValue)(y.value)), { modes: pt } = d, M = (0, t.ref)((0, ke.getModeFromValue)(y.value) || pt[0] || "rgb");
|
|
1063
|
+
function gt() {
|
|
1064
|
+
const { modes: l } = d, { value: h } = M, g = l.findIndex((v) => v === h);
|
|
1065
|
+
~g ? M.value = l[(g + 1) % l.length] : M.value = "rgb";
|
|
1050
1066
|
}
|
|
1051
|
-
let
|
|
1052
|
-
const le = (0,
|
|
1053
|
-
const { value:
|
|
1054
|
-
if (!
|
|
1067
|
+
let w, C, Y, J, B, O, j, P;
|
|
1068
|
+
const le = (0, t.computed)(() => {
|
|
1069
|
+
const { value: l } = y;
|
|
1070
|
+
if (!l)
|
|
1055
1071
|
return null;
|
|
1056
|
-
switch (
|
|
1072
|
+
switch (Pe.value) {
|
|
1057
1073
|
case "hsv":
|
|
1058
|
-
return (0,
|
|
1074
|
+
return (0, r.hsva)(l);
|
|
1059
1075
|
case "hsl":
|
|
1060
|
-
return [
|
|
1076
|
+
return [w, C, Y, P] = (0, r.hsla)(l), [...(0, r.hsl2hsv)(w, C, Y), P];
|
|
1061
1077
|
case "rgb":
|
|
1062
1078
|
case "hex":
|
|
1063
|
-
return [
|
|
1079
|
+
return [B, O, j, P] = (0, r.rgba)(l), [...(0, r.rgb2hsv)(B, O, j), P];
|
|
1064
1080
|
}
|
|
1065
|
-
}),
|
|
1066
|
-
const { value:
|
|
1067
|
-
if (!
|
|
1081
|
+
}), q = (0, t.computed)(() => {
|
|
1082
|
+
const { value: l } = y;
|
|
1083
|
+
if (!l)
|
|
1068
1084
|
return null;
|
|
1069
|
-
switch (
|
|
1085
|
+
switch (Pe.value) {
|
|
1070
1086
|
case "rgb":
|
|
1071
1087
|
case "hex":
|
|
1072
|
-
return (0,
|
|
1088
|
+
return (0, r.rgba)(l);
|
|
1073
1089
|
case "hsv":
|
|
1074
|
-
return [
|
|
1090
|
+
return [w, C, J, P] = (0, r.hsva)(l), [...(0, r.hsv2rgb)(w, C, J), P];
|
|
1075
1091
|
case "hsl":
|
|
1076
|
-
return [
|
|
1092
|
+
return [w, C, Y, P] = (0, r.hsla)(l), [...(0, r.hsl2rgb)(w, C, Y), P];
|
|
1077
1093
|
}
|
|
1078
|
-
}),
|
|
1079
|
-
const { value:
|
|
1080
|
-
if (!
|
|
1094
|
+
}), $e = (0, t.computed)(() => {
|
|
1095
|
+
const { value: l } = y;
|
|
1096
|
+
if (!l)
|
|
1081
1097
|
return null;
|
|
1082
|
-
switch (
|
|
1098
|
+
switch (Pe.value) {
|
|
1083
1099
|
case "hsl":
|
|
1084
|
-
return (0,
|
|
1100
|
+
return (0, r.hsla)(l);
|
|
1085
1101
|
case "hsv":
|
|
1086
|
-
return [
|
|
1102
|
+
return [w, C, J, P] = (0, r.hsva)(l), [...(0, r.hsv2hsl)(w, C, J), P];
|
|
1087
1103
|
case "rgb":
|
|
1088
1104
|
case "hex":
|
|
1089
|
-
return [
|
|
1105
|
+
return [B, O, j, P] = (0, r.rgba)(l), [...(0, r.rgb2hsl)(B, O, j), P];
|
|
1090
1106
|
}
|
|
1091
|
-
}),
|
|
1092
|
-
switch (
|
|
1107
|
+
}), vt = (0, t.computed)(() => {
|
|
1108
|
+
switch (M.value) {
|
|
1093
1109
|
case "rgb":
|
|
1094
1110
|
case "hex":
|
|
1095
|
-
return
|
|
1111
|
+
return q.value;
|
|
1096
1112
|
case "hsv":
|
|
1097
1113
|
return le.value;
|
|
1098
1114
|
case "hsl":
|
|
1099
|
-
return
|
|
1115
|
+
return $e.value;
|
|
1100
1116
|
}
|
|
1101
|
-
}), he = (0,
|
|
1102
|
-
function
|
|
1117
|
+
}), he = (0, t.ref)(0), Me = (0, t.ref)(1), Ue = (0, t.ref)([0, 0]);
|
|
1118
|
+
function bt(l, h) {
|
|
1103
1119
|
const { value: g } = le, v = he.value, b = g ? g[3] : 1;
|
|
1104
|
-
|
|
1105
|
-
const { showAlpha: p } =
|
|
1106
|
-
switch (
|
|
1120
|
+
Ue.value = [l, h];
|
|
1121
|
+
const { showAlpha: p } = d;
|
|
1122
|
+
switch (M.value) {
|
|
1107
1123
|
case "hsv":
|
|
1108
|
-
m((p ?
|
|
1124
|
+
m((p ? r.toHsvaString : r.toHsvString)([v, l, h, b]), "cursor");
|
|
1109
1125
|
break;
|
|
1110
1126
|
case "hsl":
|
|
1111
|
-
m((p ?
|
|
1112
|
-
...(0,
|
|
1127
|
+
m((p ? r.toHslaString : r.toHslString)([
|
|
1128
|
+
...(0, r.hsv2hsl)(v, l, h),
|
|
1113
1129
|
b
|
|
1114
1130
|
]), "cursor");
|
|
1115
1131
|
break;
|
|
1116
1132
|
case "rgb":
|
|
1117
|
-
m((p ?
|
|
1118
|
-
...(0,
|
|
1133
|
+
m((p ? r.toRgbaString : r.toRgbString)([
|
|
1134
|
+
...(0, r.hsv2rgb)(v, l, h),
|
|
1119
1135
|
b
|
|
1120
1136
|
]), "cursor");
|
|
1121
1137
|
break;
|
|
1122
1138
|
case "hex":
|
|
1123
|
-
m((p ?
|
|
1124
|
-
...(0,
|
|
1139
|
+
m((p ? r.toHexaString : r.toHexString)([
|
|
1140
|
+
...(0, r.hsv2rgb)(v, l, h),
|
|
1125
1141
|
b
|
|
1126
1142
|
]), "cursor");
|
|
1127
1143
|
break;
|
|
1128
1144
|
}
|
|
1129
1145
|
}
|
|
1130
|
-
function
|
|
1131
|
-
he.value =
|
|
1146
|
+
function mt(l) {
|
|
1147
|
+
he.value = l;
|
|
1132
1148
|
const { value: h } = le;
|
|
1133
1149
|
if (!h)
|
|
1134
1150
|
return;
|
|
1135
|
-
const [, g, v, b] = h, { showAlpha: p } =
|
|
1136
|
-
switch (
|
|
1151
|
+
const [, g, v, b] = h, { showAlpha: p } = d;
|
|
1152
|
+
switch (M.value) {
|
|
1137
1153
|
case "hsv":
|
|
1138
|
-
m((p ?
|
|
1154
|
+
m((p ? r.toHsvaString : r.toHsvString)([l, g, v, b]), "cursor");
|
|
1139
1155
|
break;
|
|
1140
1156
|
case "rgb":
|
|
1141
|
-
m((p ?
|
|
1142
|
-
...(0,
|
|
1157
|
+
m((p ? r.toRgbaString : r.toRgbString)([
|
|
1158
|
+
...(0, r.hsv2rgb)(l, g, v),
|
|
1143
1159
|
b
|
|
1144
1160
|
]), "cursor");
|
|
1145
1161
|
break;
|
|
1146
1162
|
case "hex":
|
|
1147
|
-
m((p ?
|
|
1148
|
-
...(0,
|
|
1163
|
+
m((p ? r.toHexaString : r.toHexString)([
|
|
1164
|
+
...(0, r.hsv2rgb)(l, g, v),
|
|
1149
1165
|
b
|
|
1150
1166
|
]), "cursor");
|
|
1151
1167
|
break;
|
|
1152
1168
|
case "hsl":
|
|
1153
|
-
m((p ?
|
|
1154
|
-
...(0,
|
|
1169
|
+
m((p ? r.toHslaString : r.toHslString)([
|
|
1170
|
+
...(0, r.hsv2hsl)(l, g, v),
|
|
1155
1171
|
b
|
|
1156
1172
|
]), "cursor");
|
|
1157
1173
|
break;
|
|
1158
1174
|
}
|
|
1159
1175
|
}
|
|
1160
|
-
function
|
|
1161
|
-
switch (
|
|
1176
|
+
function _t(l) {
|
|
1177
|
+
switch (M.value) {
|
|
1162
1178
|
case "hsv":
|
|
1163
|
-
[
|
|
1179
|
+
[w, C, J] = le.value, m((0, r.toHsvaString)([w, C, J, l]), "cursor");
|
|
1164
1180
|
break;
|
|
1165
1181
|
case "rgb":
|
|
1166
|
-
[
|
|
1182
|
+
[B, O, j] = q.value, m((0, r.toRgbaString)([B, O, j, l]), "cursor");
|
|
1167
1183
|
break;
|
|
1168
1184
|
case "hex":
|
|
1169
|
-
[
|
|
1185
|
+
[B, O, j] = q.value, m((0, r.toHexaString)([B, O, j, l]), "cursor");
|
|
1170
1186
|
break;
|
|
1171
1187
|
case "hsl":
|
|
1172
|
-
[
|
|
1188
|
+
[w, C, Y] = $e.value, m((0, r.toHslaString)([w, C, Y, l]), "cursor");
|
|
1173
1189
|
break;
|
|
1174
1190
|
}
|
|
1175
|
-
|
|
1191
|
+
Me.value = l;
|
|
1176
1192
|
}
|
|
1177
|
-
function m(
|
|
1178
|
-
h === "cursor" ? ne =
|
|
1179
|
-
const { nTriggerFormChange: g, nTriggerFormInput: v } = ye, { onUpdateValue: b, "onUpdate:value": p } =
|
|
1180
|
-
b && (0,
|
|
1193
|
+
function m(l, h) {
|
|
1194
|
+
h === "cursor" ? ne = l : ne = null;
|
|
1195
|
+
const { nTriggerFormChange: g, nTriggerFormInput: v } = ye, { onUpdateValue: b, "onUpdate:value": p } = d;
|
|
1196
|
+
b && (0, f.call)(b, l), p && (0, f.call)(p, l), g(), v(), Ze.value = l;
|
|
1181
1197
|
}
|
|
1182
|
-
function
|
|
1183
|
-
m(
|
|
1198
|
+
function xt(l) {
|
|
1199
|
+
m(l, "input"), (0, t.nextTick)(Q);
|
|
1184
1200
|
}
|
|
1185
|
-
function Q(
|
|
1186
|
-
const { value: h } =
|
|
1201
|
+
function Q(l = !0) {
|
|
1202
|
+
const { value: h } = y;
|
|
1187
1203
|
if (h) {
|
|
1188
|
-
const { nTriggerFormChange: g, nTriggerFormInput: v } = ye, { onComplete: b } =
|
|
1204
|
+
const { nTriggerFormChange: g, nTriggerFormInput: v } = ye, { onComplete: b } = d;
|
|
1189
1205
|
b && b(h);
|
|
1190
|
-
const { value: p } =
|
|
1191
|
-
|
|
1206
|
+
const { value: p } = W, { value: S } = R;
|
|
1207
|
+
l && (p.splice(S + 1, p.length, h), R.value = S + 1), g(), v();
|
|
1192
1208
|
}
|
|
1193
1209
|
}
|
|
1194
|
-
function xt() {
|
|
1195
|
-
const { value: n } = M;
|
|
1196
|
-
n - 1 < 0 || (m(G.value[n - 1], "input"), Q(!1), M.value = n - 1);
|
|
1197
|
-
}
|
|
1198
1210
|
function kt() {
|
|
1199
|
-
const { value:
|
|
1200
|
-
|
|
1211
|
+
const { value: l } = R;
|
|
1212
|
+
l - 1 < 0 || (m(W.value[l - 1], "input"), Q(!1), R.value = l - 1);
|
|
1201
1213
|
}
|
|
1202
1214
|
function yt() {
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
n && n(), de(!1);
|
|
1215
|
+
const { value: l } = R;
|
|
1216
|
+
l < 0 || l + 1 >= W.value.length || (m(W.value[l + 1], "input"), Q(!1), R.value = l + 1);
|
|
1206
1217
|
}
|
|
1207
1218
|
function St() {
|
|
1208
|
-
|
|
1209
|
-
|
|
1219
|
+
m(null, "input");
|
|
1220
|
+
const { onClear: l } = d;
|
|
1221
|
+
l && l(), de(!1);
|
|
1210
1222
|
}
|
|
1211
|
-
|
|
1212
|
-
const { value:
|
|
1213
|
-
|
|
1223
|
+
function wt() {
|
|
1224
|
+
const { value: l } = y, { onConfirm: h } = d;
|
|
1225
|
+
h && h(l), de(!1);
|
|
1226
|
+
}
|
|
1227
|
+
const Ct = (0, t.computed)(() => R.value >= 1), Pt = (0, t.computed)(() => {
|
|
1228
|
+
const { value: l } = W;
|
|
1229
|
+
return l.length > 1 && R.value < l.length - 1;
|
|
1214
1230
|
});
|
|
1215
|
-
(0,
|
|
1216
|
-
|
|
1217
|
-
}), (0,
|
|
1218
|
-
if (!(ne && ne ===
|
|
1219
|
-
const { value:
|
|
1220
|
-
|
|
1231
|
+
(0, t.watch)(Ge, (l) => {
|
|
1232
|
+
l || (W.value = [y.value], R.value = 0);
|
|
1233
|
+
}), (0, t.watchEffect)(() => {
|
|
1234
|
+
if (!(ne && ne === y.value)) {
|
|
1235
|
+
const { value: l } = le;
|
|
1236
|
+
l && (he.value = l[0], Me.value = l[3], Ue.value = [l[1], l[2]]);
|
|
1221
1237
|
}
|
|
1222
1238
|
ne = null;
|
|
1223
1239
|
});
|
|
1224
|
-
const
|
|
1225
|
-
const { value:
|
|
1240
|
+
const Ae = (0, t.computed)(() => {
|
|
1241
|
+
const { value: l } = Le, { common: { cubicBezierEaseInOut: h }, self: { textColor: g, color: v, panelFontSize: b, boxShadow: p, border: S, borderRadius: _, dividerColor: N, [(0, f.createKey)("height", l)]: Mt, [(0, f.createKey)("fontSize", l)]: Ut } } = Ce.value;
|
|
1226
1242
|
return {
|
|
1227
1243
|
"--n-bezier": h,
|
|
1228
1244
|
"--n-text-color": g,
|
|
@@ -1230,100 +1246,98 @@ Te.default = (0, u.c)([(0, u.cB)("color-picker", `
|
|
|
1230
1246
|
"--n-panel-font-size": b,
|
|
1231
1247
|
"--n-font-size": Ut,
|
|
1232
1248
|
"--n-box-shadow": p,
|
|
1233
|
-
"--n-border":
|
|
1234
|
-
"--n-border-radius":
|
|
1235
|
-
"--n-height":
|
|
1236
|
-
"--n-divider-color":
|
|
1249
|
+
"--n-border": S,
|
|
1250
|
+
"--n-border-radius": _,
|
|
1251
|
+
"--n-height": Mt,
|
|
1252
|
+
"--n-divider-color": N
|
|
1237
1253
|
};
|
|
1238
|
-
}),
|
|
1254
|
+
}), D = we ? (0, s.useThemeClass)("color-picker", (0, t.computed)(() => Le.value[0]), Ae, d) : void 0;
|
|
1239
1255
|
function $t() {
|
|
1240
|
-
var
|
|
1241
|
-
const { value: h } =
|
|
1242
|
-
return (0,
|
|
1256
|
+
var l;
|
|
1257
|
+
const { value: h } = q, { value: g } = he, { internalActions: v, modes: b, actions: p } = d, { value: S } = Ce, { value: _ } = Se;
|
|
1258
|
+
return (0, t.h)(
|
|
1243
1259
|
"div",
|
|
1244
1260
|
{ class: [
|
|
1245
|
-
`${
|
|
1246
|
-
|
|
1247
|
-
], onDragstart: (
|
|
1248
|
-
|
|
1249
|
-
}, style: we ? void 0 :
|
|
1250
|
-
(0,
|
|
1261
|
+
`${_}-color-picker-panel`,
|
|
1262
|
+
D == null ? void 0 : D.themeClass.value
|
|
1263
|
+
], onDragstart: (N) => {
|
|
1264
|
+
N.preventDefault();
|
|
1265
|
+
}, style: we ? void 0 : Ae.value },
|
|
1266
|
+
(0, t.h)(
|
|
1251
1267
|
"div",
|
|
1252
|
-
{ class: `${
|
|
1253
|
-
(0,
|
|
1254
|
-
(0,
|
|
1268
|
+
{ class: `${_}-color-picker-control` },
|
|
1269
|
+
(0, t.h)(ct.default, { clsPrefix: _, rgba: h, displayedHue: g, displayedSv: Ue.value, onUpdateSV: bt, onComplete: Q }),
|
|
1270
|
+
(0, t.h)(
|
|
1255
1271
|
"div",
|
|
1256
|
-
{ class: `${
|
|
1257
|
-
(0,
|
|
1272
|
+
{ class: `${_}-color-picker-preview` },
|
|
1273
|
+
(0, t.h)(
|
|
1258
1274
|
"div",
|
|
1259
|
-
{ class: `${
|
|
1260
|
-
(0,
|
|
1261
|
-
|
|
1275
|
+
{ class: `${_}-color-picker-preview__sliders` },
|
|
1276
|
+
(0, t.h)(ut.default, { clsPrefix: _, hue: g, onUpdateHue: mt, onComplete: Q }),
|
|
1277
|
+
d.showAlpha ? (0, t.h)($.default, { clsPrefix: _, rgba: h, alpha: Me.value, onUpdateAlpha: _t, onComplete: Q }) : null
|
|
1262
1278
|
),
|
|
1263
|
-
|
|
1264
|
-
m(
|
|
1279
|
+
d.showPreview ? (0, t.h)(qe.default, { clsPrefix: _, mode: M.value, color: q.value && (0, r.toHexString)(q.value), onUpdateColor: (N) => {
|
|
1280
|
+
m(N, "input");
|
|
1265
1281
|
} }) : null
|
|
1266
1282
|
),
|
|
1267
|
-
(0,
|
|
1268
|
-
((
|
|
1269
|
-
m(
|
|
1283
|
+
(0, t.h)(z.default, { clsPrefix: _, showAlpha: d.showAlpha, mode: M.value, modes: b, onUpdateMode: gt, value: y.value, valueArr: vt.value, onUpdateValue: xt }),
|
|
1284
|
+
((l = d.swatches) === null || l === void 0 ? void 0 : l.length) && (0, t.h)(I.default, { clsPrefix: _, mode: M.value, swatches: d.swatches, onUpdateColor: (N) => {
|
|
1285
|
+
m(N, "input");
|
|
1270
1286
|
} })
|
|
1271
1287
|
),
|
|
1272
|
-
p != null && p.length ? (0,
|
|
1288
|
+
p != null && p.length ? (0, t.h)(
|
|
1273
1289
|
"div",
|
|
1274
|
-
{ class: `${
|
|
1275
|
-
p.includes("confirm") && (0,
|
|
1276
|
-
p.includes("clear") && (0,
|
|
1290
|
+
{ class: `${_}-color-picker-action` },
|
|
1291
|
+
p.includes("confirm") && (0, t.h)(x.NButton, { size: "small", onClick: wt, theme: S.peers.Button, themeOverrides: S.peerOverrides.Button }, { default: () => ce.value.confirm }),
|
|
1292
|
+
p.includes("clear") && (0, t.h)(x.NButton, { size: "small", onClick: St, disabled: !y.value, theme: S.peers.Button, themeOverrides: S.peerOverrides.Button }, { default: () => ce.value.clear })
|
|
1277
1293
|
) : null,
|
|
1278
|
-
|
|
1294
|
+
T.action ? (0, t.h)("div", { class: `${_}-color-picker-action` }, { default: T.action }) : v ? (0, t.h)(
|
|
1279
1295
|
"div",
|
|
1280
|
-
{ class: `${
|
|
1281
|
-
v.includes("undo") && (0,
|
|
1282
|
-
v.includes("redo") && (0,
|
|
1296
|
+
{ class: `${_}-color-picker-action` },
|
|
1297
|
+
v.includes("undo") && (0, t.h)(x.NButton, { size: "small", onClick: kt, disabled: !Ct.value, theme: S.peers.Button, themeOverrides: S.peerOverrides.Button }, { default: () => ce.value.undo }),
|
|
1298
|
+
v.includes("redo") && (0, t.h)(x.NButton, { size: "small", onClick: yt, disabled: !Pt.value, theme: S.peers.Button, themeOverrides: S.peerOverrides.Button }, { default: () => ce.value.redo })
|
|
1283
1299
|
) : null
|
|
1284
1300
|
);
|
|
1285
1301
|
}
|
|
1286
1302
|
return {
|
|
1287
1303
|
mergedClsPrefix: Se,
|
|
1288
|
-
namespace:
|
|
1289
|
-
selfRef:
|
|
1290
|
-
hsla:
|
|
1291
|
-
rgba:
|
|
1292
|
-
mergedShow:
|
|
1293
|
-
mergedDisabled:
|
|
1304
|
+
namespace: ft,
|
|
1305
|
+
selfRef: Ne,
|
|
1306
|
+
hsla: $e,
|
|
1307
|
+
rgba: q,
|
|
1308
|
+
mergedShow: Ge,
|
|
1309
|
+
mergedDisabled: ht,
|
|
1294
1310
|
isMounted: (0, a.useIsMounted)(),
|
|
1295
|
-
adjustedTo: (0,
|
|
1296
|
-
mergedValue:
|
|
1311
|
+
adjustedTo: (0, f.useAdjustedTo)(d),
|
|
1312
|
+
mergedValue: y,
|
|
1297
1313
|
handleTriggerClick() {
|
|
1298
1314
|
de(!0);
|
|
1299
1315
|
},
|
|
1300
|
-
handleClickOutside(
|
|
1316
|
+
handleClickOutside(l) {
|
|
1301
1317
|
var h;
|
|
1302
|
-
!((h =
|
|
1318
|
+
!((h = Ne.value) === null || h === void 0) && h.contains((0, r.getPreciseEventTarget)(l)) || de(!1);
|
|
1303
1319
|
},
|
|
1304
1320
|
renderPanel: $t,
|
|
1305
|
-
cssVars: we ? void 0 :
|
|
1306
|
-
themeClass:
|
|
1307
|
-
onRender:
|
|
1321
|
+
cssVars: we ? void 0 : Ae,
|
|
1322
|
+
themeClass: D == null ? void 0 : D.themeClass,
|
|
1323
|
+
onRender: D == null ? void 0 : D.onRender
|
|
1308
1324
|
};
|
|
1309
1325
|
},
|
|
1310
1326
|
render() {
|
|
1311
|
-
const {
|
|
1312
|
-
return
|
|
1327
|
+
const { mergedClsPrefix: d, onRender: T } = this;
|
|
1328
|
+
return T == null || T(), (0, t.h)(
|
|
1313
1329
|
"div",
|
|
1314
|
-
{ class: [this.themeClass, `${
|
|
1315
|
-
(0,
|
|
1330
|
+
{ class: [this.themeClass, `${d}-color-picker`], ref: "selfRef", style: this.cssVars },
|
|
1331
|
+
(0, t.h)(i.VBinder, null, {
|
|
1316
1332
|
default: () => [
|
|
1317
|
-
(0,
|
|
1318
|
-
default: () => (0,
|
|
1319
|
-
label: c.label
|
|
1320
|
-
})
|
|
1333
|
+
(0, t.h)(i.VTarget, null, {
|
|
1334
|
+
default: () => (0, t.h)(Z.default, { clsPrefix: d, value: this.mergedValue, hsla: this.hsla, disabled: this.mergedDisabled, onClick: this.handleTriggerClick })
|
|
1321
1335
|
}),
|
|
1322
|
-
(0,
|
|
1323
|
-
default: () => (0,
|
|
1324
|
-
default: () => this.mergedShow ? (0,
|
|
1336
|
+
(0, t.h)(i.VFollower, { placement: this.placement, show: this.mergedShow, containerClass: this.namespace, teleportDisabled: this.adjustedTo === f.useAdjustedTo.tdkey, to: this.adjustedTo }, {
|
|
1337
|
+
default: () => (0, t.h)(t.Transition, { name: "fade-in-scale-up-transition", appear: this.isMounted }, {
|
|
1338
|
+
default: () => this.mergedShow ? (0, t.withDirectives)(this.renderPanel(), [
|
|
1325
1339
|
[
|
|
1326
|
-
|
|
1340
|
+
n.clickoutside,
|
|
1327
1341
|
this.handleClickOutside,
|
|
1328
1342
|
void 0,
|
|
1329
1343
|
{ capture: !0 }
|
|
@@ -1336,22 +1350,22 @@ Te.default = (0, u.c)([(0, u.cB)("color-picker", `
|
|
|
1336
1350
|
);
|
|
1337
1351
|
}
|
|
1338
1352
|
});
|
|
1339
|
-
})(
|
|
1353
|
+
})(nt);
|
|
1340
1354
|
(function(e) {
|
|
1341
|
-
var o =
|
|
1342
|
-
return
|
|
1355
|
+
var o = E && E.__importDefault || function(n) {
|
|
1356
|
+
return n && n.__esModule ? n : { default: n };
|
|
1343
1357
|
};
|
|
1344
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.
|
|
1345
|
-
var r =
|
|
1346
|
-
Object.defineProperty(e, "
|
|
1347
|
-
return o(r).default;
|
|
1348
|
-
} }), Object.defineProperty(e, "colorPickerProps", { enumerable: !0, get: function() {
|
|
1358
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.NColorPicker = e.colorPickerProps = void 0;
|
|
1359
|
+
var r = nt;
|
|
1360
|
+
Object.defineProperty(e, "colorPickerProps", { enumerable: !0, get: function() {
|
|
1349
1361
|
return r.colorPickerProps;
|
|
1362
|
+
} }), Object.defineProperty(e, "NColorPicker", { enumerable: !0, get: function() {
|
|
1363
|
+
return o(r).default;
|
|
1350
1364
|
} });
|
|
1351
|
-
})(
|
|
1352
|
-
const
|
|
1365
|
+
})(ot);
|
|
1366
|
+
const zr = /* @__PURE__ */ Ot({
|
|
1353
1367
|
__proto__: null
|
|
1354
|
-
}, [
|
|
1368
|
+
}, [ot]);
|
|
1355
1369
|
export {
|
|
1356
|
-
|
|
1370
|
+
zr as i
|
|
1357
1371
|
};
|