@pantograph/vue 0.23.4 → 0.23.6
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/ActionButton/index.js +1 -1
- package/dist/ActionButton/index.umd.cjs +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-CoWtYp90.js → ActionButton.vue_vue_type_script_setup_true_lang-7ImUgPOW.js} +2 -2
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-BM-HiVKZ.js → ActionButton.vue_vue_type_script_setup_true_lang-D8DXU0Vb.js} +1 -1
- package/dist/Alert/index.js +1 -1
- package/dist/Alert/index.umd.cjs +1 -1
- package/dist/{Alert.vue_vue_type_style_index_0_lang-DmEdkb41.js → Alert.vue_vue_type_style_index_0_lang-CqrPX_Iw.js} +3 -3
- package/dist/{Alert.vue_vue_type_style_index_0_lang-CsZWFSR_.js → Alert.vue_vue_type_style_index_0_lang-DtOx68kv.js} +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar/index.umd.cjs +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-DTndXzmH.js → Avatar.vue_vue_type_style_index_0_lang-B0jPWS1n.js} +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-CcKQb0PA.js → Avatar.vue_vue_type_style_index_0_lang-Dj-jkrYp.js} +2 -2
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs +1 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge/index.umd.cjs +1 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-ChmvYjjQ.js +1 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-PioR6WEK.js +57 -0
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-stkOtvTd.js → BaseButton.vue_vue_type_style_index_0_lang-Cb5t50gO.js} +2 -2
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-Ch3LDS1D.js → BaseButton.vue_vue_type_style_index_0_lang-CeHbEfy3.js} +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/Button/index.umd.cjs +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-CIjMWs2s.js → Button.vue_vue_type_script_setup_true_lang-ChrdvyD2.js} +2 -2
- package/dist/{Button.vue_vue_type_script_setup_true_lang-BouXlBWO.js → Button.vue_vue_type_script_setup_true_lang-vJ7lfVy_.js} +1 -1
- package/dist/Checkbox/index.js +1 -1
- package/dist/Checkbox/index.umd.cjs +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-Bo8DiMqm.js → Checkbox.vue_vue_type_style_index_0_lang-Dh2oLmt5.js} +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-2qQxhEQ0.js → Checkbox.vue_vue_type_style_index_0_lang-Dhn_dWz7.js} +2 -2
- package/dist/CheckboxGroup/index.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs +1 -1
- package/dist/Chip/index.js +2 -2
- package/dist/Chip/index.umd.cjs +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-qKiQbAUD.js → Chip.vue_vue_type_style_index_0_lang-CEXKUJCj.js} +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-pkEj-IcZ.js → Chip.vue_vue_type_style_index_0_lang-Cr1_L0Lz.js} +2 -2
- package/dist/ChipGroup/index.js +1 -1
- package/dist/ChipGroup/index.umd.cjs +1 -1
- package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-DmbWGoar.js → ChipGroup.vue_vue_type_style_index_0_lang-B945U8rL.js} +1 -1
- package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-BFHkFjPI.js → ChipGroup.vue_vue_type_style_index_0_lang-j6Reg1S9.js} +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ColorPicker/index.umd.cjs +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-CxWDk_6b.js → ColorPicker.vue_vue_type_style_index_0_lang-CcqGZq-b.js} +259 -259
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-DKGxK13w.js → ColorPicker.vue_vue_type_style_index_0_lang-Cdxk3fOe.js} +2 -2
- package/dist/ColorSwatch/index.js +1 -1
- package/dist/ColorSwatch/index.umd.cjs +1 -1
- package/dist/ColorSwatch-CH_N4TfV.js +1 -0
- package/dist/ColorSwatch-DkW6RvE7.js +4 -0
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-CABlbyiP.js → ColorSwatch.vue_vue_type_style_index_0_lang-WU4Q0TGg.js} +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-CAXvzEY_.js → ColorSwatch.vue_vue_type_style_index_0_lang-r7jNc78g.js} +3 -3
- package/dist/ColorSwatchGroup/index.js +1 -1
- package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-Cjn4NZYK.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DP1dT4Eq.js} +6 -6
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-iWwvyQwp.js +1 -0
- package/dist/ColorTrigger/index.js +1 -1
- package/dist/ColorTrigger/index.umd.cjs +1 -1
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-XqnB_VGl.js → ColorTrigger.vue_vue_type_style_index_0_lang-D7M2EQfc.js} +3 -3
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-BsexkD4u.js → ColorTrigger.vue_vue_type_style_index_0_lang-IwIexR_Y.js} +1 -1
- package/dist/Combobox/index.js +1 -1
- package/dist/Combobox/index.umd.cjs +1 -1
- package/dist/Combobox.vue_vue_type_style_index_0_lang-Cnl79xIk.js +1 -0
- package/dist/Combobox.vue_vue_type_style_index_0_lang-DIXSNQlS.js +924 -0
- package/dist/DataTable/index.js +1 -1
- package/dist/DataTable/index.umd.cjs +1 -1
- package/dist/DataTable.vue_vue_type_style_index_0_lang-DeDH_Kvd.js +1 -0
- package/dist/{DataTable.vue_vue_type_style_index_0_lang-CpQ0Yn-D.js → DataTable.vue_vue_type_style_index_0_lang-PXmil6LX.js} +12 -12
- package/dist/DropZone/index.js +1 -1
- package/dist/DropZone/index.umd.cjs +1 -1
- package/dist/{DropZone.vue_vue_type_style_index_0_lang-DVZrmQwL.js → DropZone.vue_vue_type_style_index_0_lang-CrBpJeKe.js} +1 -1
- package/dist/{DropZone.vue_vue_type_style_index_0_lang-BnrcUu_6.js → DropZone.vue_vue_type_style_index_0_lang-WmRKdmXK.js} +1 -1
- package/dist/FloatButton/index.js +1 -1
- package/dist/FloatButton/index.umd.cjs +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-Br1BEY7H.js → FloatButton.vue_vue_type_script_setup_true_lang-DFHM_Tuo.js} +2 -2
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-BOFSVjFP.js → FloatButton.vue_vue_type_script_setup_true_lang-DpFewhq3.js} +1 -1
- package/dist/Form/index.js +1 -1
- package/dist/Form/index.umd.cjs +1 -1
- package/dist/{FormItem.vue_vue_type_style_index_0_lang-s7o6crR0.js → FormItem.vue_vue_type_style_index_0_lang-CTRszGlB.js} +3 -3
- package/dist/{FormItem.vue_vue_type_style_index_0_lang-CwxlEgep.js → FormItem.vue_vue_type_style_index_0_lang-DbMENNc4.js} +3 -3
- package/dist/GOPicker/GOItemSkeleton.d.ts +2 -0
- package/dist/GOPicker/GOPicker.d.ts +36 -96
- package/dist/GOPicker/GOPicker.model.d.ts +72 -0
- package/dist/GOPicker/index.d.ts +2 -1
- package/dist/GOPicker/index.js +1 -1
- package/dist/GOPicker/index.umd.cjs +1 -1
- package/dist/GraphicalObject/index.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs +1 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-C4i8C-dP.js +65 -0
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-CmkmatJc.js +1 -0
- package/dist/GraphicalObjectGroup/index.js +1 -1
- package/dist/GraphicalObjectGroup/index.umd.cjs +1 -1
- package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-DgjnAH0N.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-CB9Q1b9r.js} +1 -1
- package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-ChJsB7QV.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-CU2CrD-j.js} +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/index.umd.cjs +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-DvbKC7wq.js → IconButton.vue_vue_type_script_setup_true_lang-Bq7Ed6Jl.js} +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-DAX_14ed.js → IconButton.vue_vue_type_script_setup_true_lang-DJiG3_YJ.js} +2 -2
- package/dist/Image/index.js +1 -1
- package/dist/Image/index.umd.cjs +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-CGdnuyxZ.js → Image.vue_vue_type_style_index_0_lang-CgczUp3D.js} +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-CqilRo2A.js → Image.vue_vue_type_style_index_0_lang-Cmn0ijum.js} +1 -1
- package/dist/IndentLevel/index.js +1 -1
- package/dist/IndentLevel/index.umd.cjs +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-CjaQqD7w.js → IndentLevel.vue_vue_type_style_index_0_lang-ZmHvmKOS.js} +2 -2
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-DD2920xJ.js → IndentLevel.vue_vue_type_style_index_0_lang-u9PJeCGr.js} +1 -1
- package/dist/Indicator/index.js +1 -1
- package/dist/Indicator/index.umd.cjs +1 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-CX3cY74r.js +1 -0
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-CmKraTSB.js +38 -0
- package/dist/Input/index.js +1 -1
- package/dist/Input/index.umd.cjs +1 -1
- package/dist/{Input.vue_vue_type_style_index_0_lang-C-jEi11-.js → Input.vue_vue_type_style_index_0_lang-Ccow0nkI.js} +4 -4
- package/dist/Input.vue_vue_type_style_index_0_lang-yHgbuD_4.js +1 -0
- package/dist/Label/index.js +1 -1
- package/dist/Label/index.umd.cjs +1 -1
- package/dist/Menu/index.js +1 -1
- package/dist/Menu/index.umd.cjs +1 -1
- package/dist/MenuItem/index.js +1 -1
- package/dist/MenuItem/index.umd.cjs +1 -1
- package/dist/{MenuItem.vue_vue_type_style_index_0_lang-DGaSx-eQ.js → MenuItem.vue_vue_type_style_index_0_lang-C8ofBbNv.js} +4 -4
- package/dist/{MenuItem.vue_vue_type_style_index_0_lang-DL9Njg73.js → MenuItem.vue_vue_type_style_index_0_lang-pnm3rqME.js} +1 -1
- package/dist/Popover/Popover.d.ts +1 -0
- package/dist/Popover/index.js +1 -1
- package/dist/Popover/index.umd.cjs +1 -1
- package/dist/{Popover.vue_vue_type_style_index_0_lang-ColyiCeV.js → Popover.vue_vue_type_style_index_0_lang-BGRXQmj3.js} +3 -3
- package/dist/{Popover.vue_vue_type_style_index_0_lang-CZYvVeso.js → Popover.vue_vue_type_style_index_0_lang-CZ_AaHDG.js} +1 -1
- package/dist/RadioGroup/index.js +1 -1
- package/dist/RadioGroup/index.umd.cjs +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-Buet9dc2.js → RadioGroup.vue_vue_type_script_setup_true_lang-03XUb7NC.js} +20 -21
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-1clw8kVI.js +1 -0
- package/dist/ScrollContainer/ScrollContainer.d.ts +2 -0
- package/dist/Segmented/index.js +1 -1
- package/dist/Segmented/index.umd.cjs +1 -1
- package/dist/{Segmented.vue_vue_type_style_index_0_lang-R_eXQ6g9.js → Segmented.vue_vue_type_style_index_0_lang-906ZRFCK.js} +26 -26
- package/dist/Segmented.vue_vue_type_style_index_0_lang-B4aQCMXZ.js +1 -0
- package/dist/Select/index.js +1 -1
- package/dist/Select/index.umd.cjs +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-Bc9kyMDB.js → Select.vue_vue_type_style_index_0_lang-DX17VhqH.js} +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-BfUtCG_-.js → Select.vue_vue_type_style_index_0_lang-W3dk0Ug0.js} +6 -6
- package/dist/SubMenu/index.js +1 -1
- package/dist/SubMenu/index.umd.cjs +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/Switch/index.umd.cjs +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-jzphTPAF.js → Switch.vue_vue_type_style_index_0_lang-BM-h82G0.js} +2 -2
- package/dist/{Switch.vue_vue_type_style_index_0_lang-DhuZK1wp.js → Switch.vue_vue_type_style_index_0_lang-DHT9utPp.js} +1 -1
- package/dist/{THead.vue_vue_type_style_index_0_lang-Du3rBBec.js → THead.vue_vue_type_style_index_0_lang-B6U8HrWi.js} +1 -1
- package/dist/{THead.vue_vue_type_style_index_0_lang-DtBQAI4D.js → THead.vue_vue_type_style_index_0_lang-CHicticP.js} +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Table/index.umd.cjs +1 -1
- package/dist/Textarea/index.js +1 -1
- package/dist/Textarea/index.umd.cjs +1 -1
- package/dist/Textarea.vue_vue_type_style_index_0_lang-DiCqcDyH.js +1 -0
- package/dist/{Textarea.vue_vue_type_style_index_0_lang-Dbdx29In.js → Textarea.vue_vue_type_style_index_0_lang-UyndJFBo.js} +4 -4
- package/dist/Tree/Tree.d.ts +3 -1
- package/dist/Tree/Tree.model.d.ts +11 -8
- package/dist/Tree/TreeNode.d.ts +2 -0
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/index.umd.cjs +1 -1
- package/dist/Tree/utils.d.ts +14 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-B30b4oK2.js +6 -0
- package/dist/Tree.vue_vue_type_style_index_0_lang-DBDkYw9s.js +1757 -0
- package/dist/exports.d.ts +4 -0
- package/dist/{getEmojiList-DSYihWrO.js → getEmojiList-BiHAQqm6.js} +237 -227
- package/dist/getEmojiList-mUahBsHW.js +1 -0
- package/dist/index.d.ts +3 -6
- package/dist/index.js +60 -60
- package/dist/index.umd.cjs +1 -1
- package/dist/{omit-B3e_dACs.js → omit-BuBwx_M2.js} +182 -181
- package/dist/omit-CYbreqlf.js +1 -0
- package/dist/style/index.css +1 -1
- package/dist/{uniq-BsN259vC.js → uniq-BeFmBpYC.js} +1 -1
- package/dist/{uniq-Dhcbw64V.js → uniq-CezX8yQS.js} +1 -1
- package/dist/{useInputDataStates-CtuCKcP6.js → useInputDataStates-Bzs7T9xb.js} +2 -2
- package/dist/{useInputDataStates-DEfYzXQl.js → useInputDataStates-C1T7BL_V.js} +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.umd.cjs +1 -1
- package/package.json +4 -4
- package/dist/Badge.vue_vue_type_script_setup_true_lang-Blql7wH1.js +0 -66
- package/dist/Badge.vue_vue_type_script_setup_true_lang-CsIGsGWg.js +0 -1
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-D8oB421I.js +0 -1
- package/dist/Combobox.vue_vue_type_style_index_0_lang-BM7QiXKH.js +0 -831
- package/dist/Combobox.vue_vue_type_style_index_0_lang-IdKdwJfN.js +0 -1
- package/dist/DataTable.vue_vue_type_style_index_0_lang-CnUiY5l1.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-BlFC2U5K.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-C7HScEPN.js +0 -68
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-Bnqpi2bU.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-D5xqdZRn.js +0 -40
- package/dist/Input.vue_vue_type_style_index_0_lang-5iaTCkoa.js +0 -1
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-lIx8QQp8.js +0 -1
- package/dist/Segmented.vue_vue_type_style_index_0_lang-DqaTvxYQ.js +0 -1
- package/dist/Textarea.vue_vue_type_style_index_0_lang-BMbkTBJu.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-Bcy8moE2.js +0 -1789
- package/dist/Tree.vue_vue_type_style_index_0_lang-BrJHHwGl.js +0 -6
- package/dist/getEmojiList-kI-Nn4xv.js +0 -1
- package/dist/omit-DEPypqqe.js +0 -1
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
import { computed as f, unref as w, defineComponent as Z, createBlock as he, openBlock as re, mergeProps as De, withCtx as ce, createElementBlock as Me, createVNode as we, h as s, normalizeClass as Ge, renderSlot as Le, ref as ve, watch as je, useSlots as Ue, useAttrs as He, createSlots as qe, renderList as Ye, normalizeProps as Je, guardReactiveProps as Qe } from "vue";
|
|
2
|
+
import { createContext as Ee, ComboboxInput as Xe, ComboboxAnchor as Ze, injectComboboxRootContext as et, useFilter as tt, ComboboxPortal as ot, ComboboxContent as nt, useEmitAsProps as rt, ComboboxRoot as at } from "reka-ui";
|
|
3
|
+
import { g as lt, h as X, o as st, f as Oe, j as it } from "./FormItem.vue_vue_type_style_index_0_lang-DbMENNc4.js";
|
|
4
|
+
import { a as ye, g as pt } from "./options-D4et5euX.js";
|
|
5
|
+
import { getBemBlock as ut, getBemElement as x, generateVariantClassList as Y } from "@pantograph/utils";
|
|
6
|
+
import { a as de, i as H, b as be, u as ct, d as Pe } from "./index-jwkhq8oW.js";
|
|
7
|
+
import { cva as Ce } from "class-variance-authority";
|
|
8
|
+
import { a as dt, l as gt, o as Te } from "./omit-BuBwx_M2.js";
|
|
9
|
+
import { _ as mt } from "./Empty.vue_vue_type_style_index_0_lang-jfObDGf0.js";
|
|
10
|
+
import { _ as ft } from "./Skeleton.vue_vue_type_style_index_0_lang-Xi8CteLp.js";
|
|
11
|
+
import { _ as Ie } from "./Divider.vue_vue_type_style_index_0_lang-B6fQsp1Y.js";
|
|
12
|
+
import { b as W, f as vt, a as ht, i as bt, d as yt } from "./element-BfQuKSll.js";
|
|
13
|
+
import { u as Ct, U as _t } from "./useInputDataStates-Bzs7T9xb.js";
|
|
14
|
+
import { u as Vt } from "./useLazyLoading-Zo-PEp2E.js";
|
|
15
|
+
import { g as xt, b as Bt } from "./Popover.vue_vue_type_style_index_0_lang-BGRXQmj3.js";
|
|
16
|
+
import { _ as St } from "./ScrollContainer.vue_vue_type_style_index_0_lang-DfMU1mTu.js";
|
|
17
|
+
import { _ as Ot } from "./Tree.vue_vue_type_style_index_0_lang-DBDkYw9s.js";
|
|
18
|
+
import { u as ze } from "./uniq-BeFmBpYC.js";
|
|
19
|
+
import { i as J } from "./isEmpty-wdqPTIXx.js";
|
|
20
|
+
import { _ as Pt } from "./Chip.vue_vue_type_style_index_0_lang-Cr1_L0Lz.js";
|
|
21
|
+
import { _ as Tt } from "./ChipGroup.vue_vue_type_style_index_0_lang-j6Reg1S9.js";
|
|
22
|
+
import { _ as _e } from "./Icon.vue_vue_type_style_index_0_lang-CbLL-Ngi.js";
|
|
23
|
+
import { d as It, _ as Ke } from "./Avatar.vue_vue_type_style_index_0_lang-Dj-jkrYp.js";
|
|
24
|
+
import { _ as zt } from "./GraphicalObjectGroup.vue_vue_type_style_index_0_lang-CB9Q1b9r.js";
|
|
25
|
+
import { _ as Re } from "./GraphicalObject.vue_vue_type_script_setup_true_lang-C4i8C-dP.js";
|
|
26
|
+
import { _ as kt } from "./Input.vue_vue_type_style_index_0_lang-Ccow0nkI.js";
|
|
27
|
+
import { whenever as Dt, useVModel as Mt } from "@vueuse/core";
|
|
28
|
+
import { last as wt } from "lodash-es";
|
|
29
|
+
import { a as Lt } from "./MenuItem.vue_vue_type_style_index_0_lang-C8ofBbNv.js";
|
|
30
|
+
import "@iconify/vue";
|
|
31
|
+
import { _ as Et } from "./Checkbox.vue_vue_type_style_index_0_lang-Dhn_dWz7.js";
|
|
32
|
+
import "@pantograph/tokens";
|
|
33
|
+
const [Ve, Kt] = Ee("Combobox"), [Rt, $t] = Ee("_Combobox"), R = ut("combobox");
|
|
34
|
+
var At = 1 / 0;
|
|
35
|
+
function Nt(d) {
|
|
36
|
+
var o = d == null ? 0 : d.length;
|
|
37
|
+
return o ? dt(d, At) : [];
|
|
38
|
+
}
|
|
39
|
+
const ue = (d) => lt(d) || de(d);
|
|
40
|
+
function Ft({
|
|
41
|
+
getValue: d,
|
|
42
|
+
arr: o,
|
|
43
|
+
getChildren: t
|
|
44
|
+
}) {
|
|
45
|
+
const e = [], g = (u, B) => {
|
|
46
|
+
u.forEach((S) => {
|
|
47
|
+
const y = d(S);
|
|
48
|
+
if (ue(y)) {
|
|
49
|
+
e.push({ ...S, _parentKeys: B, _key: y });
|
|
50
|
+
const C = t(S);
|
|
51
|
+
C != null && C.length && g(C, [...B ?? [], y]);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
return g(o), e;
|
|
56
|
+
}
|
|
57
|
+
const Wt = ({
|
|
58
|
+
getData: d,
|
|
59
|
+
getModel: o,
|
|
60
|
+
getValue: t,
|
|
61
|
+
getChildren: e
|
|
62
|
+
}) => {
|
|
63
|
+
const g = f(
|
|
64
|
+
() => Ft({ arr: w(d()), getChildren: e, getValue: t })
|
|
65
|
+
), u = (r, m = !1) => {
|
|
66
|
+
const l = t(r);
|
|
67
|
+
return g.value.filter((i) => {
|
|
68
|
+
var _;
|
|
69
|
+
if (m) {
|
|
70
|
+
const I = gt(i._parentKeys ?? []);
|
|
71
|
+
return I && I === l;
|
|
72
|
+
}
|
|
73
|
+
return (_ = i._parentKeys) == null ? void 0 : _.includes(l);
|
|
74
|
+
});
|
|
75
|
+
}, B = (r) => {
|
|
76
|
+
if (r && H(r))
|
|
77
|
+
return X(r);
|
|
78
|
+
const m = w(o());
|
|
79
|
+
return m && H(m) ? X(m) : [];
|
|
80
|
+
}, S = (r, m) => {
|
|
81
|
+
const l = B(m), i = u(r);
|
|
82
|
+
if (i != null && i.length)
|
|
83
|
+
return i.some((_) => {
|
|
84
|
+
var p;
|
|
85
|
+
const I = _._key;
|
|
86
|
+
return I && ((p = l == null ? void 0 : l.includes) == null ? void 0 : p.call(l, I));
|
|
87
|
+
});
|
|
88
|
+
}, y = (r, m) => {
|
|
89
|
+
const l = B(m), i = u(r);
|
|
90
|
+
if (i != null && i.length)
|
|
91
|
+
return i.every((_) => {
|
|
92
|
+
var p;
|
|
93
|
+
const I = _._key;
|
|
94
|
+
return I && ((p = l == null ? void 0 : l.includes) == null ? void 0 : p.call(l, I));
|
|
95
|
+
});
|
|
96
|
+
}, C = (r, m) => {
|
|
97
|
+
const l = B(m), i = u(r), _ = t(r);
|
|
98
|
+
return i != null && i.length ? y(r) ? !0 : S(r) ? "intermediate" : !1 : l.includes(_);
|
|
99
|
+
}, N = (r) => ue(r) ? g.value.find((m) => m._key === r) : void 0;
|
|
100
|
+
return {
|
|
101
|
+
flattenData: g,
|
|
102
|
+
getNodeChildren: u,
|
|
103
|
+
isSomeChildrenSelected: S,
|
|
104
|
+
isAllChildrenSelected: y,
|
|
105
|
+
isSelected: C,
|
|
106
|
+
selectValues: (r, m) => {
|
|
107
|
+
if (r.length) {
|
|
108
|
+
let l = B();
|
|
109
|
+
const i = r.filter(ue);
|
|
110
|
+
m ? l.push(...i) : l = l.filter((P) => !i.includes(P));
|
|
111
|
+
const _ = l.map(N).filter((P) => P && P._parentKeys), p = ze(Nt(_.map((P) => P._parentKeys))).filter(ue).map(N).filter(Boolean), O = [], E = [];
|
|
112
|
+
return p.forEach((P) => {
|
|
113
|
+
const F = t(P);
|
|
114
|
+
y(P, l) ? O.push(F) : E.push(F);
|
|
115
|
+
}), l.push(...O), ze(l.filter((P) => !E.includes(P)));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}, $e = ["sm", "md", "lg"], Gt = ["error", "warning", "success"], jt = { key: 1 }, Ae = /* @__PURE__ */ Z({
|
|
120
|
+
__name: "ComboboxInput",
|
|
121
|
+
setup(d) {
|
|
122
|
+
const o = Ve();
|
|
123
|
+
Dt(
|
|
124
|
+
() => o.open.value && o.headerInputElement.value,
|
|
125
|
+
() => {
|
|
126
|
+
o.headerInputElement.value && o.open.value && o.focusOnInput();
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
const t = f(() => !J(o.modelValue.value)), e = f(() => t.value ? H(o.modelValue.value) ? o.getLabelByValue(wt(o.modelValue.value)) : o.getLabelByValue(o.modelValue.value) : o.props.placeholder), g = (S) => {
|
|
130
|
+
if (S.key === "Backspace" && o.props.multiple && H(o.modelValue.value) && J(o.searchModel.value) && (o.setModelValue(o.modelValue.value.slice(0, -1)), J(o.modelValue.value))) {
|
|
131
|
+
const y = setTimeout(() => {
|
|
132
|
+
o.focusOnInput(), clearTimeout(y);
|
|
133
|
+
}, 2);
|
|
134
|
+
}
|
|
135
|
+
}, u = x(R, "input"), B = Ce(u, {
|
|
136
|
+
variants: {
|
|
137
|
+
valuePlaceholder: Y("value-placeholder", u)
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
return (S, y) => (re(), he(w(Xe), De(w(o).comboboxInputBinding.value, {
|
|
141
|
+
disabled: w(o).getDisabled.value,
|
|
142
|
+
placeholder: e.value,
|
|
143
|
+
"as-child": "",
|
|
144
|
+
modelValue: w(o).searchModel.value,
|
|
145
|
+
"onUpdate:modelValue": y[0] || (y[0] = (C) => w(o).searchModel.value = C),
|
|
146
|
+
onKeydown: g,
|
|
147
|
+
class: w(B)({
|
|
148
|
+
valuePlaceholder: t.value
|
|
149
|
+
}),
|
|
150
|
+
displayValue: () => ""
|
|
151
|
+
}), {
|
|
152
|
+
default: ce(() => [
|
|
153
|
+
w(o).props.headerSearch ? (re(), he(kt, {
|
|
154
|
+
key: 0,
|
|
155
|
+
ref: w(o).headerInputElement,
|
|
156
|
+
placeholder: w(o).props.placeholder
|
|
157
|
+
}, {
|
|
158
|
+
leading: ce(({ iconSize: C }) => [
|
|
159
|
+
we(_e, {
|
|
160
|
+
size: C,
|
|
161
|
+
icon: "tabler:search",
|
|
162
|
+
flipOnDir: "rtl"
|
|
163
|
+
}, null, 8, ["size"])
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
}, 8, ["placeholder"])) : (re(), Me("input", jt))
|
|
167
|
+
]),
|
|
168
|
+
_: 1
|
|
169
|
+
}, 16, ["disabled", "placeholder", "modelValue", "class"]));
|
|
170
|
+
}
|
|
171
|
+
}), Ut = /* @__PURE__ */ Z({
|
|
172
|
+
name: ye("ComboboxTrigger"),
|
|
173
|
+
props: {},
|
|
174
|
+
setup(d, {
|
|
175
|
+
slots: o,
|
|
176
|
+
attrs: t
|
|
177
|
+
}) {
|
|
178
|
+
const e = Ve(), g = ({
|
|
179
|
+
value: p
|
|
180
|
+
}, O) => {
|
|
181
|
+
if (O.stopPropagation(), p && H(e.modelValue.value) && !e.getDisabled.value) {
|
|
182
|
+
const E = e.modelValue.value.filter((P) => P !== p);
|
|
183
|
+
e.setModelValue(E);
|
|
184
|
+
}
|
|
185
|
+
}, u = x(R, "trigger"), B = Ce(u, {
|
|
186
|
+
variants: {
|
|
187
|
+
size: Y($e, u),
|
|
188
|
+
status: Y(Gt, u),
|
|
189
|
+
bordered: Y("bordered", u),
|
|
190
|
+
multiple: Y("multiple", u),
|
|
191
|
+
contentFit: Y("content-fit", u),
|
|
192
|
+
wrapped: Y("wrapped", u),
|
|
193
|
+
filled: Y("filled", u)
|
|
194
|
+
}
|
|
195
|
+
}), S = f(() => {
|
|
196
|
+
switch (e.getSize.value) {
|
|
197
|
+
case "sm":
|
|
198
|
+
return "2xsm";
|
|
199
|
+
case "md":
|
|
200
|
+
default:
|
|
201
|
+
return "xsm";
|
|
202
|
+
}
|
|
203
|
+
}), y = f(() => {
|
|
204
|
+
if (!e.props.multiple && de(e.modelValue.value) && !J(e.modelValue.value))
|
|
205
|
+
return e.getOptionByValue(e.modelValue.value);
|
|
206
|
+
}), C = (p = y.value) => {
|
|
207
|
+
if (e.props.selectedItemIconAsTrailingIcon && be(p) && "icon" in p)
|
|
208
|
+
return p.icon;
|
|
209
|
+
}, N = f(() => C()), G = f(() => {
|
|
210
|
+
if (!e.props.noTrailing)
|
|
211
|
+
return e.props.trailingIcon;
|
|
212
|
+
}), r = f(() => ({
|
|
213
|
+
modelValue: X(e.modelValue.value),
|
|
214
|
+
open: X(e.open.value)
|
|
215
|
+
})), m = () => {
|
|
216
|
+
e.onOpenChange(!e.open.value);
|
|
217
|
+
}, l = (p) => {
|
|
218
|
+
console.log("event ===>", p), e.props.headerSearch;
|
|
219
|
+
}, i = f(() => ({
|
|
220
|
+
disabled: e.getDisabled.value,
|
|
221
|
+
tabindex: e.getDisabled.value || !e.props.headerSearch ? -1 : 0,
|
|
222
|
+
reference: e.props.reference,
|
|
223
|
+
"data-disabled": e.getDisabled.value ? "" : void 0,
|
|
224
|
+
"aria-disabled": e.getDisabled.value ?? void 0,
|
|
225
|
+
"aria-label": "Show popup",
|
|
226
|
+
"aria-haspopup": "listbox",
|
|
227
|
+
"aria-expanded": e.open.value,
|
|
228
|
+
"aria-controls": e.contentId,
|
|
229
|
+
"data-state": e.open.value ? "open" : "closed",
|
|
230
|
+
class: [B({
|
|
231
|
+
size: e.getSize.value,
|
|
232
|
+
status: e.getStatus.value === "success" && J(e.modelValue.value) ? void 0 : e.getStatus.value,
|
|
233
|
+
bordered: e.props.bordered,
|
|
234
|
+
multiple: e.props.multiple,
|
|
235
|
+
contentFit: e.props.contentFit,
|
|
236
|
+
wrapped: e.props.wrapped,
|
|
237
|
+
filled: !J(e.modelValue.value)
|
|
238
|
+
}), e.props.triggerCls],
|
|
239
|
+
...t
|
|
240
|
+
})), _ = (p, O = S.value) => s(_e, {
|
|
241
|
+
icon: p,
|
|
242
|
+
size: O
|
|
243
|
+
}), I = () => {
|
|
244
|
+
var E;
|
|
245
|
+
let p;
|
|
246
|
+
const O = (E = o.triggerTrailing) == null ? void 0 : E.call(o, r.value);
|
|
247
|
+
if (W(O) ? G.value && (p = _(G.value)) : p = O, p)
|
|
248
|
+
return s("div", {
|
|
249
|
+
class: [x(u, "trailing"), e.props.triggerTrailingCls]
|
|
250
|
+
}, p);
|
|
251
|
+
};
|
|
252
|
+
return () => {
|
|
253
|
+
var P;
|
|
254
|
+
const p = (P = o.trigger) == null ? void 0 : P.call(o, r.value), E = (() => {
|
|
255
|
+
if (W(p)) return !1;
|
|
256
|
+
const F = vt(p) ?? null, D = F.length === 1 ? F[0] : F;
|
|
257
|
+
return D ? ht(D) && !bt(D) : !0;
|
|
258
|
+
})();
|
|
259
|
+
return s(Ze, {
|
|
260
|
+
...i.value,
|
|
261
|
+
...e.comboboxTriggerBinding.value,
|
|
262
|
+
asChild: E,
|
|
263
|
+
as: E ? "template" : "button",
|
|
264
|
+
key: String(E),
|
|
265
|
+
onKeyUp: l,
|
|
266
|
+
onClick: m
|
|
267
|
+
}, () => {
|
|
268
|
+
if (!W(p))
|
|
269
|
+
return p;
|
|
270
|
+
const F = (z) => {
|
|
271
|
+
var j, $;
|
|
272
|
+
const L = e.getOptionByValue(z);
|
|
273
|
+
return s(Ke, {
|
|
274
|
+
...L ? (($ = (j = e.props).getTagProps) == null ? void 0 : $.call(j, L)) ?? {} : {},
|
|
275
|
+
size: e.getTagSize.value
|
|
276
|
+
});
|
|
277
|
+
}, D = (z) => {
|
|
278
|
+
var j, $;
|
|
279
|
+
const L = e.getOptionByValue(z);
|
|
280
|
+
return s(Re, {
|
|
281
|
+
...L ? (($ = (j = e.props).getTagProps) == null ? void 0 : $.call(j, L)) ?? {} : {},
|
|
282
|
+
size: e.getTagSize.value
|
|
283
|
+
});
|
|
284
|
+
}, ae = () => {
|
|
285
|
+
if (!e.props.multiple && !H(e.modelValue.value) && e.modelValue.value && (e.props.tagRenderMode && ["avatar", "go"].includes(e.props.tagRenderMode) || N.value || e.props.leadingIcon)) {
|
|
286
|
+
let z;
|
|
287
|
+
if (e.props.tagRenderMode === "avatar" ? z = F(e.modelValue.value) : e.props.tagRenderMode === "go" ? z = D(e.modelValue.value) : N.value ? z = _(N.value) : e.props.leadingIcon && (z = _(e.props.leadingIcon)), !W(z))
|
|
288
|
+
return s("div", {
|
|
289
|
+
class: [x(u, "leading"), e.props.triggerLeadingCls]
|
|
290
|
+
}, z);
|
|
291
|
+
}
|
|
292
|
+
}, ge = () => {
|
|
293
|
+
const z = [], L = [x(u, "content"), e.props.triggerContentCls, J(e.modelValue.value) ? e.props.triggerContentPlaceholderCls : e.props.triggerContentValueCls], $ = (() => {
|
|
294
|
+
if (e.props.multiple && H(e.modelValue.value)) {
|
|
295
|
+
if (e.props.tagRenderMode === "avatar")
|
|
296
|
+
return s(It, {
|
|
297
|
+
maxCount: e.props.maxCount,
|
|
298
|
+
size: e.getTagSize.value,
|
|
299
|
+
closeable: !e.getDisabled.value,
|
|
300
|
+
noPopover: !0,
|
|
301
|
+
noWrap: !e.props.wrapped,
|
|
302
|
+
class: L
|
|
303
|
+
}, () => e.modelValue.value.map(F));
|
|
304
|
+
if (e.props.tagRenderMode === "go")
|
|
305
|
+
return s(zt, {
|
|
306
|
+
maxCount: e.props.maxCount,
|
|
307
|
+
size: e.getTagSize.value,
|
|
308
|
+
closeable: !e.getDisabled.value,
|
|
309
|
+
noPopover: !0,
|
|
310
|
+
noWrap: !e.props.wrapped,
|
|
311
|
+
class: L
|
|
312
|
+
}, () => e.modelValue.value.map(D));
|
|
313
|
+
if (e.props.tagRenderMode === "chip")
|
|
314
|
+
return s(Tt, {
|
|
315
|
+
maxCount: e.props.maxCount,
|
|
316
|
+
size: e.getTagSize.value,
|
|
317
|
+
color: "primary",
|
|
318
|
+
closeable: !e.getDisabled.value,
|
|
319
|
+
noPopover: !0,
|
|
320
|
+
noWrap: !e.props.wrapped,
|
|
321
|
+
class: L,
|
|
322
|
+
onClose: g
|
|
323
|
+
}, () => e.modelValue.value.map((ee) => {
|
|
324
|
+
const ie = () => e.getLabelByValue(ee), me = ({
|
|
325
|
+
size: te
|
|
326
|
+
}) => {
|
|
327
|
+
const pe = C(e.getOptionByValue(ee)) ?? e.props.leadingIcon;
|
|
328
|
+
return pe ? _(pe, te) : null;
|
|
329
|
+
};
|
|
330
|
+
return s(Pt, {
|
|
331
|
+
value: ee,
|
|
332
|
+
class: [x(u, "tag"), e.props.tagCls],
|
|
333
|
+
closeIconCls: x(u, "tag__close")
|
|
334
|
+
}, {
|
|
335
|
+
text: ie,
|
|
336
|
+
leading: me
|
|
337
|
+
});
|
|
338
|
+
}));
|
|
339
|
+
}
|
|
340
|
+
})();
|
|
341
|
+
return $ ? z.push($) : e.props.headerSearch && z.push(s("div", {
|
|
342
|
+
class: [...L, x(u, "content--empty")]
|
|
343
|
+
})), e.props.headerSearch || z.push(s(Ae)), z;
|
|
344
|
+
}, q = [], le = ae();
|
|
345
|
+
W(le) || q.push(le), q.push(ge());
|
|
346
|
+
const se = I();
|
|
347
|
+
return W(se) || q.push(se), q;
|
|
348
|
+
});
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
}), Ht = /* @__PURE__ */ Z({
|
|
352
|
+
__name: "ComboboxLabel",
|
|
353
|
+
setup(d) {
|
|
354
|
+
return (o, t) => (re(), Me("div", {
|
|
355
|
+
class: Ge(w(x)(w(R), "label"))
|
|
356
|
+
}, [
|
|
357
|
+
Le(o.$slots, "default")
|
|
358
|
+
], 2));
|
|
359
|
+
}
|
|
360
|
+
}), ke = /* @__PURE__ */ Z({
|
|
361
|
+
name: ye("SelectOption"),
|
|
362
|
+
props: {
|
|
363
|
+
option: {
|
|
364
|
+
type: [Object, String],
|
|
365
|
+
required: !0
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
slots: Object,
|
|
369
|
+
setup(d, {
|
|
370
|
+
slots: o
|
|
371
|
+
}) {
|
|
372
|
+
const t = Ve(), e = f(() => {
|
|
373
|
+
switch (t.getSize.value) {
|
|
374
|
+
case "sm":
|
|
375
|
+
return "2xsm";
|
|
376
|
+
case "lg":
|
|
377
|
+
return "sm";
|
|
378
|
+
case "md":
|
|
379
|
+
default:
|
|
380
|
+
return "xsm";
|
|
381
|
+
}
|
|
382
|
+
}), g = f(() => t.getOptionValue(d.option)), u = f(() => t.getOptionLabel(d.option)), B = f(() => t.getOptionIcon(d.option)), S = f(() => t.props.tree ? void 0 : t.getOptionDescription(d.option)), y = f(() => t.getOptionDisabled(d.option)), C = f(() => Array.isArray(t.modelValue.value) ? !!(g.value && t.modelValue.value.includes(g.value)) : t.modelValue.value === g.value), N = x(R, "option"), G = () => {
|
|
383
|
+
if (!(t.props.tree || !g.value || y.value))
|
|
384
|
+
if (t.props.multiple) {
|
|
385
|
+
const r = H(t.modelValue.value) ? t.modelValue.value : [];
|
|
386
|
+
r.includes(g.value) ? t.setModelValue(r.filter((l) => l !== g.value)) : t.setModelValue([...r, g.value]);
|
|
387
|
+
} else
|
|
388
|
+
t.setModelValue(g.value);
|
|
389
|
+
};
|
|
390
|
+
if (!d.option) throw new Error("option is required");
|
|
391
|
+
return () => {
|
|
392
|
+
const r = (l) => {
|
|
393
|
+
var _, I, p, O;
|
|
394
|
+
const i = [];
|
|
395
|
+
return !t.props.tree && t.props.multiple && i.push(s(Et, {
|
|
396
|
+
modelValue: C.value,
|
|
397
|
+
size: l.checkboxSize,
|
|
398
|
+
disabled: y.value
|
|
399
|
+
})), t.props.tagRenderMode === "avatar" ? i.push(s(Ke, {
|
|
400
|
+
...((I = (_ = t.props).getTagProps) == null ? void 0 : I.call(_, d.option)) ?? {},
|
|
401
|
+
size: t.getTagSize.value
|
|
402
|
+
})) : t.props.tagRenderMode === "go" ? i.push(s(Re, {
|
|
403
|
+
...((O = (p = t.props).getTagProps) == null ? void 0 : O.call(p, d.option)) ?? {},
|
|
404
|
+
size: t.getTagSize.value
|
|
405
|
+
})) : B.value && i.push(s(_e, {
|
|
406
|
+
icon: B.value,
|
|
407
|
+
size: e.value
|
|
408
|
+
})), W(i) ? null : i;
|
|
409
|
+
};
|
|
410
|
+
return (() => {
|
|
411
|
+
const l = !!S.value;
|
|
412
|
+
return s(Lt, {
|
|
413
|
+
class: N,
|
|
414
|
+
description: S.value,
|
|
415
|
+
title: u.value,
|
|
416
|
+
key: g.value,
|
|
417
|
+
selected: C.value,
|
|
418
|
+
unFocusable: !0,
|
|
419
|
+
leadingCenter: !l,
|
|
420
|
+
size: t.getSize.value,
|
|
421
|
+
disabled: y.value,
|
|
422
|
+
onClick: G
|
|
423
|
+
}, {
|
|
424
|
+
leading: r,
|
|
425
|
+
trailing: () => {
|
|
426
|
+
var i;
|
|
427
|
+
return (i = o.trailing) == null ? void 0 : i.call(o, {
|
|
428
|
+
option: d.option
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
})();
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
}), qt = /* @__PURE__ */ Z({
|
|
436
|
+
name: ye("ComboboxWrapper"),
|
|
437
|
+
setup(d, {
|
|
438
|
+
slots: o
|
|
439
|
+
}) {
|
|
440
|
+
const t = Rt(), e = et(), g = ve();
|
|
441
|
+
Vt({
|
|
442
|
+
target: g
|
|
443
|
+
});
|
|
444
|
+
const u = ve(), B = xt({
|
|
445
|
+
triggerRef: u,
|
|
446
|
+
props: t.props
|
|
447
|
+
}), {
|
|
448
|
+
getFlipOnDir: S,
|
|
449
|
+
getDir: y
|
|
450
|
+
} = ct(), C = S("reversePlacementOnDir"), N = y(), G = Bt({
|
|
451
|
+
props: t.props,
|
|
452
|
+
flip: C,
|
|
453
|
+
emitsAsProps: t.emitsAsProps,
|
|
454
|
+
_dir: N,
|
|
455
|
+
controlAutoFocus: !1,
|
|
456
|
+
extraPropNames: ["bodyLock", "position"]
|
|
457
|
+
}), r = ({
|
|
458
|
+
key: n,
|
|
459
|
+
getterKey: V,
|
|
460
|
+
defaultValue: h,
|
|
461
|
+
noReturnOption: c
|
|
462
|
+
}) => (v) => {
|
|
463
|
+
const T = Pe(h) ? h(v) : h;
|
|
464
|
+
if (be(v)) {
|
|
465
|
+
const M = v[n] ?? T, A = V && t.props[V];
|
|
466
|
+
if (A) {
|
|
467
|
+
if (de(A))
|
|
468
|
+
return v[A] ?? M;
|
|
469
|
+
if (Pe(A)) return A(v) ?? M;
|
|
470
|
+
}
|
|
471
|
+
return M;
|
|
472
|
+
}
|
|
473
|
+
return de(v) && !c ? v ?? T : T;
|
|
474
|
+
}, m = r({
|
|
475
|
+
getterKey: "getValue",
|
|
476
|
+
key: "value"
|
|
477
|
+
}), l = r({
|
|
478
|
+
getterKey: "getLabel",
|
|
479
|
+
key: "label",
|
|
480
|
+
defaultValue: m
|
|
481
|
+
}), i = r({
|
|
482
|
+
getterKey: "getIcon",
|
|
483
|
+
key: "icon",
|
|
484
|
+
noReturnOption: !0
|
|
485
|
+
}), _ = r({
|
|
486
|
+
getterKey: "getDescription",
|
|
487
|
+
key: "description",
|
|
488
|
+
noReturnOption: !0
|
|
489
|
+
}), I = r({
|
|
490
|
+
getterKey: "getDisabled",
|
|
491
|
+
key: "disabled",
|
|
492
|
+
defaultValue: !1,
|
|
493
|
+
noReturnOption: !0
|
|
494
|
+
}), p = r({
|
|
495
|
+
getterKey: "getGroupLabel",
|
|
496
|
+
key: "label",
|
|
497
|
+
noReturnOption: !0
|
|
498
|
+
}), O = r({
|
|
499
|
+
getterKey: "getGroupOptions",
|
|
500
|
+
key: "options",
|
|
501
|
+
noReturnOption: !0
|
|
502
|
+
}), E = (n) => {
|
|
503
|
+
var V;
|
|
504
|
+
if ((V = t.props.options) != null && V.length)
|
|
505
|
+
for (const h of t.props.options) {
|
|
506
|
+
if (m(h) === n) return h;
|
|
507
|
+
const c = O(h);
|
|
508
|
+
if (c != null && c.length) {
|
|
509
|
+
for (const v of c)
|
|
510
|
+
if (m(v) === n) return v;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return n;
|
|
514
|
+
}, P = (n) => {
|
|
515
|
+
const V = E(n);
|
|
516
|
+
return V ? l(V) ?? n : n;
|
|
517
|
+
}, {
|
|
518
|
+
contains: F
|
|
519
|
+
} = tt({
|
|
520
|
+
sensitivity: "base"
|
|
521
|
+
});
|
|
522
|
+
f(() => {
|
|
523
|
+
const n = [], V = (h, c) => {
|
|
524
|
+
h.forEach((v) => {
|
|
525
|
+
const T = m(v), M = O(v);
|
|
526
|
+
if (T) {
|
|
527
|
+
const A = [...c ?? [], T];
|
|
528
|
+
n.push(A), M && V(M, A);
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
};
|
|
532
|
+
return t.props.options && V(t.props.options), n;
|
|
533
|
+
});
|
|
534
|
+
const D = f(() => {
|
|
535
|
+
const n = (V) => V == null ? void 0 : V.map((h) => {
|
|
536
|
+
const c = l(h), v = m(h), T = I(h), M = p(h), A = !t.searchModel.value || c && F(c, t.searchModel.value), oe = O(h), ne = !t.props.tree || v;
|
|
537
|
+
if (oe && ne) {
|
|
538
|
+
const a = n(oe);
|
|
539
|
+
if (a != null && a.length || A)
|
|
540
|
+
return {
|
|
541
|
+
groupLabel: M,
|
|
542
|
+
title: c,
|
|
543
|
+
key: v,
|
|
544
|
+
disabled: T,
|
|
545
|
+
children: a,
|
|
546
|
+
_option: h
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
return A && ne ? {
|
|
550
|
+
title: c,
|
|
551
|
+
key: v,
|
|
552
|
+
disabled: T,
|
|
553
|
+
_option: h
|
|
554
|
+
} : null;
|
|
555
|
+
}).filter(Boolean);
|
|
556
|
+
if (t.props.options)
|
|
557
|
+
return n(t.props.options);
|
|
558
|
+
}), {
|
|
559
|
+
getDisabled: ae,
|
|
560
|
+
getStatus: ge,
|
|
561
|
+
getSize: q
|
|
562
|
+
} = Ct({
|
|
563
|
+
getDisabled: () => t.props.disabled,
|
|
564
|
+
getSize: () => t.props.size,
|
|
565
|
+
getStatus: () => t.props.status
|
|
566
|
+
}), le = f(() => {
|
|
567
|
+
switch (q.value) {
|
|
568
|
+
case "sm":
|
|
569
|
+
return "xsm";
|
|
570
|
+
case "lg":
|
|
571
|
+
return "md";
|
|
572
|
+
case "md":
|
|
573
|
+
default:
|
|
574
|
+
return "sm";
|
|
575
|
+
}
|
|
576
|
+
}), {
|
|
577
|
+
inputBindings: se,
|
|
578
|
+
rootBindings: z
|
|
579
|
+
} = _t({
|
|
580
|
+
getDisabled: () => ae.value
|
|
581
|
+
}), L = ve(), j = () => {
|
|
582
|
+
var n, V, h, c, v, T, M;
|
|
583
|
+
e.open.value && e.inputElement.value && (t.props.headerSearch && ((n = L.value) != null && n.input) ? document.activeElement !== ((V = L.value) == null ? void 0 : V.input) && ((v = (c = (h = L.value) == null ? void 0 : h.input) == null ? void 0 : c.focus) == null || v.call(c)) : document.activeElement !== e.inputElement.value && ((M = (T = e.inputElement.value) == null ? void 0 : T.focus) == null || M.call(T)));
|
|
584
|
+
}, $ = (n) => {
|
|
585
|
+
e.modelValue.value = n, t.emit("update:modelValue", n);
|
|
586
|
+
};
|
|
587
|
+
Kt({
|
|
588
|
+
...t,
|
|
589
|
+
getOptionValue: m,
|
|
590
|
+
getOptionLabel: l,
|
|
591
|
+
getOptionDescription: _,
|
|
592
|
+
getOptionDisabled: I,
|
|
593
|
+
getOptionIcon: i,
|
|
594
|
+
getOptionByValue: E,
|
|
595
|
+
getLabelByValue: P,
|
|
596
|
+
focusOnInput: j,
|
|
597
|
+
setModelValue: $,
|
|
598
|
+
headerInputElement: L,
|
|
599
|
+
getDisabled: ae,
|
|
600
|
+
getStatus: ge,
|
|
601
|
+
getSize: q,
|
|
602
|
+
getTagSize: le,
|
|
603
|
+
comboboxInputBinding: se,
|
|
604
|
+
comboboxTriggerBinding: z,
|
|
605
|
+
...e,
|
|
606
|
+
modelValue: e.modelValue
|
|
607
|
+
}), je(() => [t.props.clearOnChangeMultiple, t.props.multiple], () => {
|
|
608
|
+
t.props.clearOnChangeMultiple && $(void 0);
|
|
609
|
+
});
|
|
610
|
+
const ee = f(() => {
|
|
611
|
+
const n = t.props.scrollContainerProps ?? {};
|
|
612
|
+
return {
|
|
613
|
+
...n,
|
|
614
|
+
areaCls: [x(R, "scroll_area"), n == null ? void 0 : n.class, n == null ? void 0 : n.areaCls]
|
|
615
|
+
};
|
|
616
|
+
}), ie = x(R, "popup"), me = Ce(ie, {
|
|
617
|
+
variants: {
|
|
618
|
+
size: Y($e, ie)
|
|
619
|
+
}
|
|
620
|
+
}), te = (n) => {
|
|
621
|
+
if (Number(n) > 0)
|
|
622
|
+
return `${n}px`;
|
|
623
|
+
if (typeof n == "string")
|
|
624
|
+
return n;
|
|
625
|
+
}, pe = f(() => te(t.props.popupWidth)), Ne = f(() => te(t.props.popupHeight)), xe = f(() => te(t.props.minWidth)), Be = f(() => ({
|
|
626
|
+
type: q.value === "sm" ? "simple" : "advance",
|
|
627
|
+
...Te(t.props.emptyProps ?? {}, "class")
|
|
628
|
+
})), Fe = f(() => Te(t.props.skeletonProps ?? {}, "class")), {
|
|
629
|
+
selectValues: We
|
|
630
|
+
} = Wt({
|
|
631
|
+
getValue: (n) => n == null ? void 0 : n.key,
|
|
632
|
+
getChildren: (n) => n == null ? void 0 : n.children,
|
|
633
|
+
getModel: () => X(e.modelValue.value),
|
|
634
|
+
getData: () => X(D.value ?? [])
|
|
635
|
+
});
|
|
636
|
+
return () => {
|
|
637
|
+
var oe, ne;
|
|
638
|
+
const n = (a) => {
|
|
639
|
+
var b;
|
|
640
|
+
if ((b = D.value) != null && b.length && a > 0)
|
|
641
|
+
return !!D.value[a - 1];
|
|
642
|
+
}, V = (a) => {
|
|
643
|
+
var b, K;
|
|
644
|
+
if ((b = D.value) != null && b.length && a > 0) {
|
|
645
|
+
const k = D.value[a - 1];
|
|
646
|
+
return !!(k && ((K = O(k)) != null && K.length));
|
|
647
|
+
}
|
|
648
|
+
}, h = (a) => s(ke, {
|
|
649
|
+
option: a
|
|
650
|
+
}, {
|
|
651
|
+
trailing: () => {
|
|
652
|
+
var b;
|
|
653
|
+
return (b = o.optionTrailing) == null ? void 0 : b.call(o, {
|
|
654
|
+
option: a
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
}), c = [];
|
|
658
|
+
let v;
|
|
659
|
+
if (t.props.tree) {
|
|
660
|
+
const b = H(e.modelValue.value) ? e.modelValue.value : e.modelValue.value ? [e.modelValue.value] : [];
|
|
661
|
+
v = s(Ot, {
|
|
662
|
+
data: D.value ?? [],
|
|
663
|
+
selectable: !0,
|
|
664
|
+
checkbox: t.props.multiple,
|
|
665
|
+
multiple: t.props.multiple,
|
|
666
|
+
defaultExpandAll: !0,
|
|
667
|
+
syncCheckboxAndSelect: t.props.multiple,
|
|
668
|
+
showLine: !0,
|
|
669
|
+
modelValue: b,
|
|
670
|
+
checkedKeys: b,
|
|
671
|
+
onExpand: j,
|
|
672
|
+
onSelect: (K, k, U) => {
|
|
673
|
+
if (t.props.multiple) {
|
|
674
|
+
const Q = H(U) ? U : [U];
|
|
675
|
+
$(We(Q, k));
|
|
676
|
+
} else
|
|
677
|
+
$(U);
|
|
678
|
+
},
|
|
679
|
+
class: "w-full"
|
|
680
|
+
}, {
|
|
681
|
+
title: (K) => h(K._option)
|
|
682
|
+
}), c.push(v);
|
|
683
|
+
} else
|
|
684
|
+
(D.value ?? []).forEach((a, b) => {
|
|
685
|
+
var K;
|
|
686
|
+
(K = a.children) != null && K.length ? (n(b) && c.push(s(Ie)), a.groupLabel && c.push(s(Ht, {
|
|
687
|
+
class: t.props.labelCls
|
|
688
|
+
}, () => a.groupLabel)), a.children.forEach((k) => {
|
|
689
|
+
c.push(h(k._option));
|
|
690
|
+
})) : V(b) ? c.push(s(Ie)) : c.push(h(a._option));
|
|
691
|
+
});
|
|
692
|
+
const T = yt(v ? [v] : c, ke).filter((a) => {
|
|
693
|
+
var b;
|
|
694
|
+
return be(a == null ? void 0 : a.props) && ((b = a == null ? void 0 : a.props) == null ? void 0 : b.option);
|
|
695
|
+
}), M = !!(t.props.tree && ((oe = D.value) != null && oe.length) || T != null && T.length), A = () => {
|
|
696
|
+
var b, K;
|
|
697
|
+
const a = [];
|
|
698
|
+
if (M || t.props.loading) {
|
|
699
|
+
const k = [];
|
|
700
|
+
if (M && k.push(...c), t.props.loading) {
|
|
701
|
+
const U = (b = o.loading) == null ? void 0 : b.call(o, {});
|
|
702
|
+
if (!W(U)) k.push(U);
|
|
703
|
+
else {
|
|
704
|
+
const Q = new Array(M ? 2 : t.props.loadingRowCount).fill(1);
|
|
705
|
+
k.push(...Q.map(() => s(ft, {
|
|
706
|
+
size: q.value,
|
|
707
|
+
class: [x(R, "skeleton"), t.props.skeletonCls],
|
|
708
|
+
...Fe.value
|
|
709
|
+
})));
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
a.push(s("div", {
|
|
713
|
+
class: [x(R, "options"), t.props.optionsCls]
|
|
714
|
+
}, k));
|
|
715
|
+
} else if (!M) {
|
|
716
|
+
const k = (K = o.empty) == null ? void 0 : K.call(o, Be.value);
|
|
717
|
+
W(k) ? a.push(s(mt, {
|
|
718
|
+
class: [x(R, "empty"), t.props.emptyCls],
|
|
719
|
+
...Be.value
|
|
720
|
+
}, {
|
|
721
|
+
title: o.emptyTitle,
|
|
722
|
+
description: o.emptyDescription,
|
|
723
|
+
actions: o.emptyActions,
|
|
724
|
+
image: o.emptyImage
|
|
725
|
+
})) : a.push(k);
|
|
726
|
+
}
|
|
727
|
+
return t.props.lazyLoading && a.push(s("div", {
|
|
728
|
+
class: x(R, "lazy_loading")
|
|
729
|
+
}, s("div", {
|
|
730
|
+
class: x(R, "lazy_loading_trigger"),
|
|
731
|
+
ref: g
|
|
732
|
+
}))), a;
|
|
733
|
+
};
|
|
734
|
+
return [s(Ut, {
|
|
735
|
+
ref: u,
|
|
736
|
+
...t.attrs,
|
|
737
|
+
style: {
|
|
738
|
+
...((ne = t.attrs) == null ? void 0 : ne.style) ?? {},
|
|
739
|
+
"--ptc-combobox-trigger-min-w": xe.value
|
|
740
|
+
}
|
|
741
|
+
}, {
|
|
742
|
+
trigger: o.trigger,
|
|
743
|
+
triggerTrailing: o.triggerTrailing
|
|
744
|
+
}), s(ot, B.value, () => s(nt, {
|
|
745
|
+
...G.value,
|
|
746
|
+
vShow: e.open.value,
|
|
747
|
+
class: [me(t.props), t.props.popupCls],
|
|
748
|
+
style: {
|
|
749
|
+
"--ptc-combobox-popup-width": t.props.samePopupWidth ? void 0 : pe.value,
|
|
750
|
+
"--ptc-combobox-popup-height": Ne.value,
|
|
751
|
+
"--ptc-combobox-trigger-min-w": xe.value
|
|
752
|
+
},
|
|
753
|
+
onClick: j
|
|
754
|
+
}, () => {
|
|
755
|
+
var U, Q, Se;
|
|
756
|
+
const a = [], b = (U = o.header) == null ? void 0 : U.call(o), K = !W(b);
|
|
757
|
+
if (t.props.headerSearch || K) {
|
|
758
|
+
const fe = [];
|
|
759
|
+
K && fe.push(b), fe.push(s(Ae)), a.push(s("div", {
|
|
760
|
+
class: x(R, "header")
|
|
761
|
+
}, fe));
|
|
762
|
+
}
|
|
763
|
+
a.push(s(St, ee.value, A));
|
|
764
|
+
const k = (Se = o.footer) == null ? void 0 : Se.call(o, {
|
|
765
|
+
isEmpty: !((Q = D.value) != null && Q.length),
|
|
766
|
+
search: t.searchModel.value
|
|
767
|
+
});
|
|
768
|
+
return W(k) || a.push(s("div", {
|
|
769
|
+
class: x(R, "footer")
|
|
770
|
+
}, k)), a;
|
|
771
|
+
}))];
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
}), To = /* @__PURE__ */ Z({
|
|
775
|
+
...pt("Combobox"),
|
|
776
|
+
__name: "Combobox",
|
|
777
|
+
props: {
|
|
778
|
+
size: { default: "md" },
|
|
779
|
+
status: {},
|
|
780
|
+
multiple: { type: Boolean, default: void 0 },
|
|
781
|
+
tagRenderMode: { default: "chip" },
|
|
782
|
+
getTagProps: {},
|
|
783
|
+
tree: { type: Boolean },
|
|
784
|
+
contentFit: { type: Boolean },
|
|
785
|
+
wrapped: { type: Boolean },
|
|
786
|
+
noTrailing: { type: Boolean },
|
|
787
|
+
leadingIcon: {},
|
|
788
|
+
trailingIcon: { default: "tabler:chevron-down" },
|
|
789
|
+
selectedItemIconAsTrailingIcon: { type: Boolean, default: !0 },
|
|
790
|
+
maxCount: {},
|
|
791
|
+
to: {},
|
|
792
|
+
placeholder: {},
|
|
793
|
+
indicatorIcon: { default: "tabler:check" },
|
|
794
|
+
options: {},
|
|
795
|
+
getDisabled: {},
|
|
796
|
+
getLabel: {},
|
|
797
|
+
getDescription: {},
|
|
798
|
+
getValue: {},
|
|
799
|
+
getGroupOptions: {},
|
|
800
|
+
getGroupLabel: {},
|
|
801
|
+
getIcon: {},
|
|
802
|
+
placement: { default: "bottom-start" },
|
|
803
|
+
reversePlacementOnDir: {},
|
|
804
|
+
loading: { type: Boolean },
|
|
805
|
+
skeletonProps: {},
|
|
806
|
+
loadingRowCount: { default: 10 },
|
|
807
|
+
lazyLoading: { type: Boolean },
|
|
808
|
+
bordered: { type: Boolean, default: !0 },
|
|
809
|
+
clearOnChangeMultiple: { type: Boolean, default: !0 },
|
|
810
|
+
triggerCls: {},
|
|
811
|
+
triggerLeadingCls: {},
|
|
812
|
+
triggerContentCls: {},
|
|
813
|
+
triggerContentPlaceholderCls: {},
|
|
814
|
+
triggerContentValueCls: {},
|
|
815
|
+
triggerTrailingCls: {},
|
|
816
|
+
itemLeadingCls: {},
|
|
817
|
+
optionCls: {},
|
|
818
|
+
tagCls: {},
|
|
819
|
+
popupCls: {},
|
|
820
|
+
labelCls: {},
|
|
821
|
+
optionsCls: {},
|
|
822
|
+
optionTextCls: {},
|
|
823
|
+
optionContentCls: {},
|
|
824
|
+
emptyCls: {},
|
|
825
|
+
skeletonCls: {},
|
|
826
|
+
scrollContainerProps: {},
|
|
827
|
+
emptyProps: {},
|
|
828
|
+
samePopupWidth: { type: Boolean, default: !0 },
|
|
829
|
+
popupHeight: { default: 384 },
|
|
830
|
+
popupWidth: {},
|
|
831
|
+
minWidth: {},
|
|
832
|
+
headerSearch: { type: Boolean },
|
|
833
|
+
search: {},
|
|
834
|
+
open: { type: Boolean, default: void 0 },
|
|
835
|
+
defaultOpen: { type: Boolean, default: void 0 },
|
|
836
|
+
resetSearchTermOnBlur: { type: Boolean, default: !0 },
|
|
837
|
+
resetSearchTermOnSelect: { type: Boolean, default: !0 },
|
|
838
|
+
modelValue: {},
|
|
839
|
+
defaultValue: {},
|
|
840
|
+
dir: {},
|
|
841
|
+
disabled: { type: Boolean, default: void 0 },
|
|
842
|
+
highlightOnHover: { type: Boolean },
|
|
843
|
+
by: {},
|
|
844
|
+
asChild: { type: Boolean },
|
|
845
|
+
as: {},
|
|
846
|
+
name: {},
|
|
847
|
+
required: { type: Boolean },
|
|
848
|
+
reference: {},
|
|
849
|
+
forceMount: { type: Boolean, default: void 0 },
|
|
850
|
+
position: { default: "popper" },
|
|
851
|
+
bodyLock: { type: Boolean },
|
|
852
|
+
side: {},
|
|
853
|
+
sideOffset: { default: 4 },
|
|
854
|
+
align: {},
|
|
855
|
+
alignOffset: {},
|
|
856
|
+
avoidCollisions: { type: Boolean, default: void 0 },
|
|
857
|
+
collisionBoundary: {},
|
|
858
|
+
collisionPadding: { default: 4 },
|
|
859
|
+
arrowPadding: {},
|
|
860
|
+
sticky: {},
|
|
861
|
+
hideWhenDetached: { type: Boolean, default: void 0 },
|
|
862
|
+
positionStrategy: { default: "fixed" },
|
|
863
|
+
updatePositionStrategy: {},
|
|
864
|
+
disableUpdateOnLayoutShift: { type: Boolean, default: void 0 },
|
|
865
|
+
prioritizePosition: { type: Boolean, default: void 0 },
|
|
866
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
867
|
+
defer: { type: Boolean }
|
|
868
|
+
},
|
|
869
|
+
emits: ["update:search", "update:modelValue", "highlight", "update:open", "escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside"],
|
|
870
|
+
setup(d, { emit: o }) {
|
|
871
|
+
const t = d, e = o, g = rt(e), u = f(
|
|
872
|
+
() => st(
|
|
873
|
+
{
|
|
874
|
+
...Oe(
|
|
875
|
+
t,
|
|
876
|
+
"open",
|
|
877
|
+
"defaultOpen",
|
|
878
|
+
"defaultValue",
|
|
879
|
+
"modelValue",
|
|
880
|
+
"by",
|
|
881
|
+
"dir",
|
|
882
|
+
"multiple",
|
|
883
|
+
"disabled"
|
|
884
|
+
),
|
|
885
|
+
...Oe(
|
|
886
|
+
g,
|
|
887
|
+
"onUpdate:modelValue",
|
|
888
|
+
"onUpdate:open"
|
|
889
|
+
),
|
|
890
|
+
ignoreFilter: !0
|
|
891
|
+
},
|
|
892
|
+
it
|
|
893
|
+
)
|
|
894
|
+
), B = Mt(t, "search", e, {
|
|
895
|
+
passive: t.search === void 0
|
|
896
|
+
}), S = Ue(), y = He();
|
|
897
|
+
return $t({
|
|
898
|
+
attrs: y,
|
|
899
|
+
props: t,
|
|
900
|
+
emit: e,
|
|
901
|
+
searchModel: B,
|
|
902
|
+
emitsAsProps: g
|
|
903
|
+
}), (C, N) => (re(), he(w(at), De(u.value, { class: w(R) }), {
|
|
904
|
+
default: ce(() => [
|
|
905
|
+
we(w(qt), null, qe({ _: 2 }, [
|
|
906
|
+
Ye(Object.keys(S), (G) => ({
|
|
907
|
+
name: G,
|
|
908
|
+
fn: ce((r) => [
|
|
909
|
+
Le(C.$slots, G, Je(Qe(r)))
|
|
910
|
+
])
|
|
911
|
+
}))
|
|
912
|
+
]), 1024)
|
|
913
|
+
]),
|
|
914
|
+
_: 3
|
|
915
|
+
}, 16, ["class"]));
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
export {
|
|
919
|
+
$e as C,
|
|
920
|
+
To as _,
|
|
921
|
+
Gt as a,
|
|
922
|
+
Ve as i,
|
|
923
|
+
Kt as p
|
|
924
|
+
};
|