@milaboratories/uikit 2.6.2 → 2.6.4
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/.turbo/turbo-build.log +129 -129
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +13 -0
- package/dist/base/BtnBase.vue.js +18 -18
- package/dist/base/BtnBase.vue.js.map +1 -1
- package/dist/components/ContextProvider.vue.js.map +1 -1
- package/dist/components/DataTable/BaseCellComponent.vue.js +20 -20
- package/dist/components/DataTable/BaseCellComponent.vue.js.map +1 -1
- package/dist/components/DataTable/ColumnCaret.vue.js +6 -6
- package/dist/components/DataTable/ColumnCaret.vue.js.map +1 -1
- package/dist/components/DataTable/ColumnsCommandMenu.vue.js.map +1 -1
- package/dist/components/DataTable/RowsCommandMenu.vue.js.map +1 -1
- package/dist/components/DataTable/TScroll.vue.js +12 -12
- package/dist/components/DataTable/TScroll.vue.js.map +1 -1
- package/dist/components/DataTable/TableComponent.vue.js +1 -1
- package/dist/components/DataTable/TableComponent.vue.js.map +1 -1
- package/dist/components/DataTable/TdCell.vue.js +36 -36
- package/dist/components/DataTable/TdCell.vue.js.map +1 -1
- package/dist/components/DataTable/ThCell.vue.js +27 -27
- package/dist/components/DataTable/ThCell.vue.js.map +1 -1
- package/dist/components/DataTable/TrBody.vue.js +12 -12
- package/dist/components/DataTable/TrBody.vue.js.map +1 -1
- package/dist/components/DataTable/TrHead.vue.js.map +1 -1
- package/dist/components/DataTable/assets/TableIcon.vue.js +2 -2
- package/dist/components/DataTable/assets/TableIcon.vue.js.map +1 -1
- package/dist/components/DropdownListItem.vue.js +18 -18
- package/dist/components/DropdownListItem.vue.js.map +1 -1
- package/dist/components/HScroll.vue.js.map +1 -1
- package/dist/components/InputRange.vue.js.map +1 -1
- package/dist/components/LongText.vue.js +1 -1
- package/dist/components/LongText.vue.js.map +1 -1
- package/dist/components/LongText.vue3.js +1 -1
- package/dist/components/PlAccordion/{ExpandTransition.vue2.js → ExpandTransition.vue.js} +1 -1
- package/dist/components/PlAccordion/ExpandTransition.vue.js.map +1 -0
- package/dist/components/PlAccordion/ExpandTransition.vue3.js +1 -1
- package/dist/components/PlAccordion/PlAccordion.vue.js.map +1 -1
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js +21 -21
- package/dist/components/PlAccordion/PlAccordionSection.vue2.js.map +1 -1
- package/dist/components/PlAlert/PlAlert.vue.js +23 -23
- package/dist/components/PlAlert/PlAlert.vue.js.map +1 -1
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js +86 -86
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js +83 -83
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js.map +1 -1
- package/dist/components/PlBtnAccent/PlBtnAccent.vue.js.map +1 -1
- package/dist/components/PlBtnDanger/PlBtnDanger.vue.js.map +1 -1
- package/dist/components/PlBtnGhost/PlBtnGhost.vue.js +21 -21
- package/dist/components/PlBtnGhost/PlBtnGhost.vue.js.map +1 -1
- package/dist/components/PlBtnGroup/PlBtnGroup.vue.js +34 -34
- package/dist/components/PlBtnGroup/PlBtnGroup.vue.js.map +1 -1
- package/dist/components/PlBtnLink/PlBtnLink.vue.js +12 -12
- package/dist/components/PlBtnLink/PlBtnLink.vue.js.map +1 -1
- package/dist/components/PlBtnPrimary/PlBtnPrimary.vue.js.map +1 -1
- package/dist/components/PlBtnSecondary/PlBtnSecondary.vue.js.map +1 -1
- package/dist/components/PlBtnSplit/PlBtnSplit.vue.js +31 -31
- package/dist/components/PlBtnSplit/PlBtnSplit.vue.js.map +1 -1
- package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js +18 -18
- package/dist/components/PlChartHistogram/PlChartHistogram.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/Legends.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js +15 -15
- package/dist/components/PlChartStackedBar/PlChartStackedBar.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/PlChartStackedBarCompact.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/StackedRow.vue2.js.map +1 -1
- package/dist/components/PlChartStackedBar/StackedRowCompact.vue2.js.map +1 -1
- package/dist/components/PlCheckbox/PlCheckbox.vue.js +13 -13
- package/dist/components/PlCheckbox/PlCheckbox.vue.js.map +1 -1
- package/dist/components/PlCheckbox/PlCheckboxBase.vue.js +6 -6
- package/dist/components/PlCheckbox/PlCheckboxBase.vue.js.map +1 -1
- package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js +28 -28
- package/dist/components/PlCheckboxGroup/PlCheckboxGroup.vue.js.map +1 -1
- package/dist/components/PlChip/PlChip.vue.js +20 -20
- package/dist/components/PlChip/PlChip.vue.js.map +1 -1
- package/dist/components/PlClipboard/PlClipboard.vue2.js.map +1 -1
- package/dist/components/PlConfirmDialog.vue.js +14 -14
- package/dist/components/PlConfirmDialog.vue.js.map +1 -1
- package/dist/components/PlDialogModal/PlDialogModal.vue.js +30 -30
- package/dist/components/PlDialogModal/PlDialogModal.vue.js.map +1 -1
- package/dist/components/PlDropdown/OptionList.vue.js +40 -40
- package/dist/components/PlDropdown/OptionList.vue.js.map +1 -1
- package/dist/components/PlDropdown/PlDropdown.vue.js +89 -89
- package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +92 -92
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js.map +1 -1
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.d.ts +1 -1
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.js +4 -4
- package/dist/components/PlDropdownLine/PlDropdownLine.vue.js.map +1 -1
- package/dist/components/PlDropdownLine/ResizableInput.vue.js +12 -12
- package/dist/components/PlDropdownLine/ResizableInput.vue.js.map +1 -1
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +70 -70
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js.map +1 -1
- package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.d.ts +1 -1
- package/dist/components/PlDropdownMultiRef/PlDropdownMultiRef.vue.js.map +1 -1
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js +11 -11
- package/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.d.ts +1 -1
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.js +36 -36
- package/dist/components/PlEditableTitle/PlEditableTitle.vue.js.map +1 -1
- package/dist/components/PlElementList/PlElementList.vue2.js.map +1 -1
- package/dist/components/PlElementList/PlElementListItem.vue2.js +67 -67
- package/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -1
- package/dist/components/PlErrorAlert/PlErrorAlert.vue2.js.map +1 -1
- package/dist/components/PlErrorBoundary/PlErrorBoundary.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Local.vue.js +24 -24
- package/dist/components/PlFileDialog/Local.vue.js.map +1 -1
- package/dist/components/PlFileDialog/PlFileDialog.vue.js +38 -38
- package/dist/components/PlFileDialog/PlFileDialog.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Remote.vue.js +2 -2
- package/dist/components/PlFileDialog/Remote.vue.js.map +1 -1
- package/dist/components/PlFileDialog/Shortcuts.vue2.js +4 -4
- package/dist/components/PlFileDialog/Shortcuts.vue2.js.map +1 -1
- package/dist/components/PlFileInput/PlFileInput.vue.d.ts +1 -1
- package/dist/components/PlFileInput/PlFileInput.vue.js +75 -75
- package/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
- package/dist/components/PlIcon16/PlIcon16.vue2.js.map +1 -1
- package/dist/components/PlIcon24/PlIcon24.vue2.js.map +1 -1
- package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js +11 -11
- package/dist/components/PlLoaderCircular/PlLoaderCircular.vue.js.map +1 -1
- package/dist/components/PlLogView/PlLogView.vue.js +58 -58
- package/dist/components/PlLogView/PlLogView.vue.js.map +1 -1
- package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js +22 -22
- package/dist/components/PlNotificationAlert/PlNotificationAlert.vue.js.map +1 -1
- package/dist/components/PlNumberField/PlNumberField.vue.d.ts +1 -1
- package/dist/components/PlNumberField/PlNumberField.vue.js +75 -75
- package/dist/components/PlNumberField/PlNumberField.vue.js.map +1 -1
- package/dist/components/PlProgressBar/PlProgressBar.vue.js +12 -12
- package/dist/components/PlProgressBar/PlProgressBar.vue.js.map +1 -1
- package/dist/components/PlProgressCell/PlProgressCell.vue.js +20 -20
- package/dist/components/PlProgressCell/PlProgressCell.vue.js.map +1 -1
- package/dist/components/PlRadio/PlRadio.vue2.js.map +1 -1
- package/dist/components/PlRadio/PlRadioGroup.vue2.js +8 -8
- package/dist/components/PlRadio/PlRadioGroup.vue2.js.map +1 -1
- package/dist/components/PlSearchField/PlSearchField.vue2.js +19 -19
- package/dist/components/PlSearchField/PlSearchField.vue2.js.map +1 -1
- package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js +8 -8
- package/dist/components/PlSectionSeparator/PlSectionSeparator.vue2.js.map +1 -1
- package/dist/components/PlSidebar/PlSidebarGroup.vue2.js.map +1 -1
- package/dist/components/PlSidebar/PlSidebarItem.vue2.js.map +1 -1
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +1 -1
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
- package/dist/components/PlSlideModal/PlSlideModal.vue2.js.map +1 -1
- package/dist/components/PlSplash/PlSplash.vue.js +16 -16
- package/dist/components/PlSplash/PlSplash.vue.js.map +1 -1
- package/dist/components/PlStatusTag/PlStatusTag.vue.js +7 -7
- package/dist/components/PlStatusTag/PlStatusTag.vue.js.map +1 -1
- package/dist/components/PlSvg/PlSvg.vue2.js.map +1 -1
- package/dist/components/PlTabs/PlTabs.vue.js +18 -18
- package/dist/components/PlTabs/PlTabs.vue.js.map +1 -1
- package/dist/components/PlTabs/Tab.vue.js +9 -9
- package/dist/components/PlTabs/Tab.vue.js.map +1 -1
- package/dist/components/PlTextArea/PlTextArea.vue.js +51 -51
- package/dist/components/PlTextArea/PlTextArea.vue.js.map +1 -1
- package/dist/components/PlTextField/PlTextField.vue.js +62 -62
- package/dist/components/PlTextField/PlTextField.vue.js.map +1 -1
- package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js +14 -14
- package/dist/components/PlToggleSwitch/PlToggleSwitch.vue.js.map +1 -1
- package/dist/components/PlTooltip/Beak.vue.js +2 -2
- package/dist/components/PlTooltip/Beak.vue.js.map +1 -1
- package/dist/components/PlTooltip/PlTooltip.vue.js +50 -50
- package/dist/components/PlTooltip/PlTooltip.vue.js.map +1 -1
- package/dist/components/Scrollable.vue.js.map +1 -1
- package/dist/components/Slider.vue.js +35 -35
- package/dist/components/Slider.vue.js.map +1 -1
- package/dist/components/SliderRange.vue.js +47 -47
- package/dist/components/SliderRange.vue.js.map +1 -1
- package/dist/components/SliderRangeTriple.vue.js +47 -47
- package/dist/components/SliderRangeTriple.vue.js.map +1 -1
- package/dist/components/TabItem.vue.js.map +1 -1
- package/dist/components/ThemeSwitcher.vue.js +2 -2
- package/dist/components/ThemeSwitcher.vue.js.map +1 -1
- package/dist/components/TransitionSlidePanel.vue.js.map +1 -1
- package/dist/components/VScroll.vue.js.map +1 -1
- package/dist/components/contextMenu/Menu.vue2.js +12 -12
- package/dist/components/contextMenu/Menu.vue2.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/layout/PlBlockPage/PlBlockPage.vue.js +27 -27
- package/dist/layout/PlBlockPage/PlBlockPage.vue.js.map +1 -1
- package/dist/layout/PlContainer/PlContainer.vue.js +10 -10
- package/dist/layout/PlContainer/PlContainer.vue.js.map +1 -1
- package/dist/layout/PlGrid/PlGrid.vue.js.map +1 -1
- package/dist/layout/PlRow/PlRow.vue.js +8 -8
- package/dist/layout/PlRow/PlRow.vue.js.map +1 -1
- package/dist/layout/PlSpacer/PlSpacer.vue.js.map +1 -1
- package/dist/utils/DoubleContour.vue.js +9 -9
- package/dist/utils/DoubleContour.vue.js.map +1 -1
- package/dist/utils/DropdownOverlay/DropdownOverlay.vue.js.map +1 -1
- package/dist/utils/PlCloseModalBtn.vue.js +2 -2
- package/dist/utils/PlCloseModalBtn.vue.js.map +1 -1
- package/dist/utils/TextLabel.vue.js.map +1 -1
- package/package.json +5 -5
- package/dist/components/PlAccordion/ExpandTransition.vue2.js.map +0 -1
- package/dist/utils/DoubleContour.vue2.js +0 -23
- package/dist/utils/DoubleContour.vue2.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(".pl-dialog-modal{--padding-top: 24px;--border-radius: 16px;--title-padding: 24px 24px 0 24px;min-height:400px;max-height:calc(100vh - 48px);max-width:calc(100% - 48px);min-width:448px;position:absolute;top:50%;left:50%;transform:translateY(-50%) translate(-50%);background-color:#fff;padding-top:var(--padding-top);display:flex;flex-direction:column;box-shadow:0 2px 8px #24223d1f;border-radius:var(--border-radius)}.pl-dialog-modal.has-title{--padding-top: 0}.pl-dialog-modal.has-content{--title-padding: 24px}.pl-dialog-modal__title{display:flex;align-items:center;font-family:var(--font-family-base);font-size:28px;font-style:normal;font-weight:500;line-height:32px;letter-spacing:-.56px;padding:var(--title-padding)}.pl-dialog-modal__content{flex:1;display:flex;flex-direction:column;gap:24px;padding:16px 24px 40px;min-height:0;line-height:20px;--thumb-color: var(--ic-02);overflow-y:auto}.pl-dialog-modal__content::-webkit-scrollbar{width:var(--scrollbar-width, 6px);height:5px;background-color:transparent;display:block}.pl-dialog-modal__content::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.pl-dialog-modal__content::-webkit-scrollbar-thumb:hover{--thumb-color: var(--border-color-focus)}.pl-dialog-modal__content.no-content-gutters{padding:0}.pl-dialog-modal__content.no-top-content-gutter{padding-top:0}.pl-dialog-modal__actions{display:flex;align-items:center;gap:6px;min-height:88px;padding:0 24px}.pl-dialog-modal__actions button{min-width:160px}.pl-dialog-modal__actions.has-top-border{border-top:1px solid var(--border-color-div-grey)}.pl-dialog-modal .alert-error{background-color:var(--txt-error);color:#fff;font-weight:500;padding:12px;border-radius:6px}.pl-dialog-modal .alert-warning{background-color:#fee0a3;font-weight:500;padding:12px;border-radius:6px}.pl-dialog-modal__shadow{position:absolute;z-index:var(--z-dialog);top:var(--title-bar-height);left:0;right:0;bottom:0;background-color:#000000a3}.pl-dialog-modal .close-modal-btn{position:absolute;top:4px;right:4px}")),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { defineComponent as B, useSlots as H, ref as
|
|
2
|
+
import { defineComponent as B, useSlots as H, ref as x, computed as v, createBlock as p, openBlock as o, Teleport as V, createVNode as w, Transition as b, withCtx as T, createElementBlock as r, createCommentVNode as i, createElementVNode as f, mergeProps as _, withModifiers as $, renderSlot as m, normalizeClass as h } from "vue";
|
|
3
3
|
import { useEventListener as E } from "../../composition/useEventListener.js";
|
|
4
4
|
|
|
5
5
|
import G from "../../utils/PlCloseModalBtn.vue.js";
|
|
@@ -25,66 +25,66 @@ const O = {
|
|
|
25
25
|
size: { default: void 0 }
|
|
26
26
|
},
|
|
27
27
|
emits: ["update:modelValue"],
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
30
|
-
const { width: e, height:
|
|
31
|
-
return
|
|
28
|
+
setup(t, { emit: g }) {
|
|
29
|
+
const a = H(), n = g, s = t, d = x(), y = v(() => {
|
|
30
|
+
const { width: e, height: l, minHeight: c, maxHeight: C, size: u } = s;
|
|
31
|
+
return u === "small" ? {
|
|
32
32
|
width: "448px",
|
|
33
33
|
height: "440px",
|
|
34
34
|
minHeight: "auto",
|
|
35
35
|
maxHeight: "auto"
|
|
36
|
-
} :
|
|
36
|
+
} : u === "medium" ? {
|
|
37
37
|
width: "720px",
|
|
38
38
|
height: "720px",
|
|
39
39
|
minHeight: "auto",
|
|
40
40
|
maxHeight: "auto"
|
|
41
|
-
} :
|
|
41
|
+
} : u === "large" ? {
|
|
42
42
|
width: "1080px",
|
|
43
43
|
height: "880px",
|
|
44
44
|
minHeight: "auto",
|
|
45
45
|
maxHeight: "auto"
|
|
46
|
-
} : { width: e, height:
|
|
46
|
+
} : { width: e, height: l, minHeight: c, maxHeight: C };
|
|
47
47
|
});
|
|
48
48
|
function k(e) {
|
|
49
|
-
|
|
49
|
+
d.value && s.closeOnOutsideClick && document.contains(e.target) && !d.value.contains(e.target) && n("update:modelValue", !1);
|
|
50
50
|
}
|
|
51
51
|
return E(document.body, "keyup", (e) => {
|
|
52
|
-
|
|
53
|
-
}), (e,
|
|
52
|
+
s.modelValue && e.code === "Escape" && n("update:modelValue", !1);
|
|
53
|
+
}), (e, l) => (o(), p(V, { to: "body" }, [
|
|
54
54
|
w(b, { name: "dialog" }, {
|
|
55
|
-
default:
|
|
56
|
-
|
|
55
|
+
default: T(() => [
|
|
56
|
+
t.modelValue ? (o(), r("div", {
|
|
57
57
|
key: 0,
|
|
58
58
|
class: "pl-dialog-modal__shadow",
|
|
59
59
|
onClick: k
|
|
60
60
|
}, [
|
|
61
|
-
|
|
61
|
+
f("div", _(e.$attrs, {
|
|
62
62
|
ref_key: "modal",
|
|
63
|
-
ref:
|
|
64
|
-
class: ["pl-dialog-modal", { "has-title":
|
|
63
|
+
ref: d,
|
|
64
|
+
class: ["pl-dialog-modal", { "has-title": a.title, "has-content": a.default }],
|
|
65
65
|
style: y.value
|
|
66
66
|
}), [
|
|
67
|
-
|
|
67
|
+
t.closable ? (o(), p(G, {
|
|
68
68
|
key: 0,
|
|
69
69
|
class: "close-modal-btn",
|
|
70
|
-
onClick:
|
|
71
|
-
})) :
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
])) :
|
|
75
|
-
|
|
76
|
-
class:
|
|
70
|
+
onClick: l[0] || (l[0] = $((c) => n("update:modelValue", !1), ["stop"]))
|
|
71
|
+
})) : i("", !0),
|
|
72
|
+
a.title ? (o(), r("div", O, [
|
|
73
|
+
m(e.$slots, "title")
|
|
74
|
+
])) : i("", !0),
|
|
75
|
+
f("div", {
|
|
76
|
+
class: h(["pl-dialog-modal__content", { "no-content-gutters": t.noContentGutters, "no-top-content-gutter": t.noTopContentGutter }])
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
m(e.$slots, "default")
|
|
79
79
|
], 2),
|
|
80
|
-
|
|
80
|
+
a.actions ? (o(), r("div", {
|
|
81
81
|
key: 2,
|
|
82
|
-
class:
|
|
82
|
+
class: h(["pl-dialog-modal__actions", { "has-top-border": t.actionsHasTopBorder }])
|
|
83
83
|
}, [
|
|
84
|
-
|
|
85
|
-
], 2)) :
|
|
84
|
+
m(e.$slots, "actions")
|
|
85
|
+
], 2)) : i("", !0)
|
|
86
86
|
], 16)
|
|
87
|
-
])) :
|
|
87
|
+
])) : i("", !0)
|
|
88
88
|
]),
|
|
89
89
|
_: 3
|
|
90
90
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlDialogModal.vue.js","sources":["../../../src/components/PlDialogModal/PlDialogModal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport { useEventListener } from '../../composition/useEventListener';\nimport './pl-dialog-modal.scss';\nimport { computed, ref } from 'vue';\nimport PlCloseModalBtn from '../../utils/PlCloseModalBtn.vue';\nimport type { Size } from '../../types';\n\nconst slots = defineSlots<{\n title?: () => unknown;\n default?: () => unknown;\n actions?: () => unknown;\n}>();\n\nconst emit = defineEmits(['update:modelValue']);\n\nconst props = withDefaults(\n defineProps<{\n /**\n * Determines whether the modal is open\n */\n modelValue: boolean;\n /**\n * css width (default value is `448px`)\n */\n width?: string;\n /**\n * css height (default value is `auto`)\n */\n height?: string;\n /**\n * css min-height (default value is `auto`)\n */\n minHeight?: string;\n /**\n * css min-height (default value is `auto` but recommended is 440px)\n */\n maxHeight?: string;\n /**\n * Enables a button to close the modal (default: `true`)\n */\n closable?: boolean;\n /**\n * If `true` content gutters are removed\n */\n noContentGutters?: boolean;\n /**\n * If `true` top content gutter is removed\n */\n noTopContentGutter?: boolean;\n /**\n * Actions slot has a top border (default: `true`)\n */\n actionsHasTopBorder?: boolean;\n /**\n * If `true`, the modal window closes when clicking outside the modal area (default: `true`)\n */\n closeOnOutsideClick?: boolean;\n /**\n * Predefined size (standard small | medium | large). Takes precedence over (min|max)(width|height) properties. Not defined by default.\n */\n size?: Size | undefined;\n }>(),\n {\n width: '448px',\n minHeight: 'auto',\n maxHeight: 'auto',\n height: 'auto',\n closable: true,\n noContentGutters: false,\n actionsHasTopBorder: true,\n size: undefined,\n },\n);\n\nconst modal = ref<HTMLElement>();\n\nconst style = computed(() => {\n const { width, height, minHeight, maxHeight, size } = props;\n\n if (size === 'small') {\n return {\n width: '448px',\n height: '440px',\n minHeight: 'auto',\n maxHeight: 'auto',\n };\n }\n\n if (size === 'medium') {\n return {\n width: '720px',\n height: '720px',\n minHeight: 'auto',\n maxHeight: 'auto',\n };\n }\n\n if (size === 'large') {\n return {\n width: '1080px',\n height: '880px',\n minHeight: 'auto',\n maxHeight: 'auto',\n };\n }\n\n return { width, height, minHeight, maxHeight };\n});\n\nfunction onClickShadow(ev: Event) {\n if (modal.value && props.closeOnOutsideClick && document.contains(ev.target as Node) && !modal.value.contains(ev.target as Node)) {\n emit('update:modelValue', false);\n }\n}\n\nuseEventListener(document.body, 'keyup', (ev) => {\n if (props.modelValue && ev.code === 'Escape') {\n emit('update:modelValue', false);\n }\n});\n</script>\n\n<template>\n <Teleport to=\"body\">\n <Transition name=\"dialog\">\n <div v-if=\"modelValue\" class=\"pl-dialog-modal__shadow\" @click=\"onClickShadow\">\n <div\n v-bind=\"$attrs\"\n ref=\"modal\"\n class=\"pl-dialog-modal\"\n :class=\"{ 'has-title': slots.title, 'has-content': slots.default }\"\n :style=\"style\"\n >\n <PlCloseModalBtn v-if=\"closable\" class=\"close-modal-btn\" @click.stop=\"emit('update:modelValue', false)\" />\n <div v-if=\"slots.title\" class=\"pl-dialog-modal__title\">\n <slot name=\"title\" />\n </div>\n <div class=\"pl-dialog-modal__content\" :class=\"{ 'no-content-gutters': noContentGutters, 'no-top-content-gutter': noTopContentGutter }\">\n <slot />\n </div>\n <div v-if=\"slots.actions\" class=\"pl-dialog-modal__actions\" :class=\"{ 'has-top-border': actionsHasTopBorder }\">\n <slot name=\"actions\" />\n </div>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n"],"names":["__default__","slots","_useSlots","emit","__emit","props","__props","modal","ref","style","computed","width","height","minHeight","maxHeight","size","onClickShadow","ev","useEventListener"],"mappings":";;;;;;;GACAA,IAAe;AAAA,EACb,cAAc;AAChB;;;;;;;;;;;;;;;;;;AAUA,UAAMC,IAAQC,EAAA,GAMRC,IAAOC,GAEPC,IAAQC,GA2DRC,IAAQC,EAAA,GAERC,IAAQC,EAAS,MAAM;AAC3B,YAAM,EAAE,OAAAC,GAAO,QAAAC,GAAQ,WAAAC,GAAW,WAAAC,GAAW,MAAAC,MAASV;AAEtD,aAAIU,MAAS,UACJ;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,WAAW;AAAA,MAAA,IAIXA,MAAS,WACJ;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,WAAW;AAAA,MAAA,IAIXA,MAAS,UACJ;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,WAAW;AAAA,MAAA,IAIR,EAAE,OAAAJ,GAAO,QAAAC,GAAQ,WAAAC,GAAW,WAAAC,EAAA;AAAA,IACrC,CAAC;AAED,aAASE,EAAcC,GAAW;AAChC,MAAIV,EAAM,SAASF,EAAM,uBAAuB,SAAS,SAASY,EAAG,MAAc,KAAK,CAACV,EAAM,MAAM,SAASU,EAAG,MAAc,KAC7Hd,EAAK,qBAAqB,EAAK;AAAA,IAEnC;AAEA,WAAAe,EAAiB,SAAS,MAAM,SAAS,CAACD,MAAO;AAC/C,MAAIZ,EAAM,cAAcY,EAAG,SAAS,YAClCd,EAAK,qBAAqB,EAAK;AAAA,IAEnC,CAAC
|
|
1
|
+
{"version":3,"file":"PlDialogModal.vue.js","sources":["../../../src/components/PlDialogModal/PlDialogModal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport { useEventListener } from '../../composition/useEventListener';\nimport './pl-dialog-modal.scss';\nimport { computed, ref } from 'vue';\nimport PlCloseModalBtn from '../../utils/PlCloseModalBtn.vue';\nimport type { Size } from '../../types';\n\nconst slots = defineSlots<{\n title?: () => unknown;\n default?: () => unknown;\n actions?: () => unknown;\n}>();\n\nconst emit = defineEmits(['update:modelValue']);\n\nconst props = withDefaults(\n defineProps<{\n /**\n * Determines whether the modal is open\n */\n modelValue: boolean;\n /**\n * css width (default value is `448px`)\n */\n width?: string;\n /**\n * css height (default value is `auto`)\n */\n height?: string;\n /**\n * css min-height (default value is `auto`)\n */\n minHeight?: string;\n /**\n * css min-height (default value is `auto` but recommended is 440px)\n */\n maxHeight?: string;\n /**\n * Enables a button to close the modal (default: `true`)\n */\n closable?: boolean;\n /**\n * If `true` content gutters are removed\n */\n noContentGutters?: boolean;\n /**\n * If `true` top content gutter is removed\n */\n noTopContentGutter?: boolean;\n /**\n * Actions slot has a top border (default: `true`)\n */\n actionsHasTopBorder?: boolean;\n /**\n * If `true`, the modal window closes when clicking outside the modal area (default: `true`)\n */\n closeOnOutsideClick?: boolean;\n /**\n * Predefined size (standard small | medium | large). Takes precedence over (min|max)(width|height) properties. Not defined by default.\n */\n size?: Size | undefined;\n }>(),\n {\n width: '448px',\n minHeight: 'auto',\n maxHeight: 'auto',\n height: 'auto',\n closable: true,\n noContentGutters: false,\n actionsHasTopBorder: true,\n size: undefined,\n },\n);\n\nconst modal = ref<HTMLElement>();\n\nconst style = computed(() => {\n const { width, height, minHeight, maxHeight, size } = props;\n\n if (size === 'small') {\n return {\n width: '448px',\n height: '440px',\n minHeight: 'auto',\n maxHeight: 'auto',\n };\n }\n\n if (size === 'medium') {\n return {\n width: '720px',\n height: '720px',\n minHeight: 'auto',\n maxHeight: 'auto',\n };\n }\n\n if (size === 'large') {\n return {\n width: '1080px',\n height: '880px',\n minHeight: 'auto',\n maxHeight: 'auto',\n };\n }\n\n return { width, height, minHeight, maxHeight };\n});\n\nfunction onClickShadow(ev: Event) {\n if (modal.value && props.closeOnOutsideClick && document.contains(ev.target as Node) && !modal.value.contains(ev.target as Node)) {\n emit('update:modelValue', false);\n }\n}\n\nuseEventListener(document.body, 'keyup', (ev) => {\n if (props.modelValue && ev.code === 'Escape') {\n emit('update:modelValue', false);\n }\n});\n</script>\n\n<template>\n <Teleport to=\"body\">\n <Transition name=\"dialog\">\n <div v-if=\"modelValue\" class=\"pl-dialog-modal__shadow\" @click=\"onClickShadow\">\n <div\n v-bind=\"$attrs\"\n ref=\"modal\"\n class=\"pl-dialog-modal\"\n :class=\"{ 'has-title': slots.title, 'has-content': slots.default }\"\n :style=\"style\"\n >\n <PlCloseModalBtn v-if=\"closable\" class=\"close-modal-btn\" @click.stop=\"emit('update:modelValue', false)\" />\n <div v-if=\"slots.title\" class=\"pl-dialog-modal__title\">\n <slot name=\"title\" />\n </div>\n <div class=\"pl-dialog-modal__content\" :class=\"{ 'no-content-gutters': noContentGutters, 'no-top-content-gutter': noTopContentGutter }\">\n <slot />\n </div>\n <div v-if=\"slots.actions\" class=\"pl-dialog-modal__actions\" :class=\"{ 'has-top-border': actionsHasTopBorder }\">\n <slot name=\"actions\" />\n </div>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n"],"names":["__default__","slots","_useSlots","emit","__emit","props","__props","modal","ref","style","computed","width","height","minHeight","maxHeight","size","onClickShadow","ev","useEventListener","_createBlock","_Teleport","_createVNode","_Transition","_createElementBlock","_createElementVNode","_mergeProps","_ctx","PlCloseModalBtn","_openBlock","_hoisted_1","_renderSlot","_normalizeClass"],"mappings":";;;;;;;GACAA,IAAe;AAAA,EACb,cAAc;AAChB;;;;;;;;;;;;;;;;;;AAUA,UAAMC,IAAQC,EAAA,GAMRC,IAAOC,GAEPC,IAAQC,GA2DRC,IAAQC,EAAA,GAERC,IAAQC,EAAS,MAAM;AAC3B,YAAM,EAAE,OAAAC,GAAO,QAAAC,GAAQ,WAAAC,GAAW,WAAAC,GAAW,MAAAC,MAASV;AAEtD,aAAIU,MAAS,UACJ;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,WAAW;AAAA,MAAA,IAIXA,MAAS,WACJ;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,WAAW;AAAA,MAAA,IAIXA,MAAS,UACJ;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,WAAW;AAAA,MAAA,IAIR,EAAE,OAAAJ,GAAO,QAAAC,GAAQ,WAAAC,GAAW,WAAAC,EAAA;AAAA,IACrC,CAAC;AAED,aAASE,EAAcC,GAAW;AAChC,MAAIV,EAAM,SAASF,EAAM,uBAAuB,SAAS,SAASY,EAAG,MAAc,KAAK,CAACV,EAAM,MAAM,SAASU,EAAG,MAAc,KAC7Hd,EAAK,qBAAqB,EAAK;AAAA,IAEnC;AAEA,WAAAe,EAAiB,SAAS,MAAM,SAAS,CAACD,MAAO;AAC/C,MAAIZ,EAAM,cAAcY,EAAG,SAAS,YAClCd,EAAK,qBAAqB,EAAK;AAAA,IAEnC,CAAC,mBAICgB,EAuBWC,GAAA,EAvBD,IAAG,UAAM;AAAA,MACjBC,EAqBaC,GAAA,EArBD,MAAK,YAAQ;AAAA,mBACvB,MAmBM;AAAA,UAnBKhB,EAAA,mBAAXiB,EAmBM,OAAA;AAAA;YAnBiB,OAAM;AAAA,YAA2B,SAAOP;AAAA,UAAA;YAC7DQ,EAiBM,OAjBNC,EAiBMC,EAAA,QAhBU;AAAA,uBACV;AAAA,cAAJ,KAAInB;AAAA,cACJ,OAAK,CAAC,mBAAiB,EAAA,aACAN,EAAM,OAAK,eAAiBA,EAAM,SAAO;AAAA,cAC/D,OAAOQ,EAAA;AAAA,YAAA;cAEeH,EAAA,iBAAvBa,EAA0GQ,GAAA;AAAA;gBAAzE,OAAM;AAAA,gBAAmB,kCAAYxB,EAAI,qBAAA,EAAA,GAAA,CAAA,MAAA,CAAA;AAAA,cAAA;cAC/DF,EAAM,SAAjB2B,EAAA,GAAAL,EAEM,OAFNM,GAEM;AAAA,gBADJC,EAAqBJ,EAAA,QAAA,OAAA;AAAA,cAAA;cAEvBF,EAEM,OAAA;AAAA,gBAFD,OAAKO,EAAA,CAAC,4BAA0B,EAAA,sBAAiCzB,EAAA,2CAA2CA,EAAA,oBAAkB,CAAA;AAAA,cAAA;gBACjIwB,EAAQJ,EAAA,QAAA,SAAA;AAAA,cAAA;cAECzB,EAAM,gBAAjBsB,EAEM,OAAA;AAAA;gBAFoB,OAAKQ,EAAA,CAAC,4BAA0B,EAAA,kBAA6BzB,EAAA,qBAAmB,CAAA;AAAA,cAAA;gBACxGwB,EAAuBJ,EAAA,QAAA,SAAA;AAAA,cAAA;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as I, useTemplateRef as L, computed as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as I, useTemplateRef as L, computed as u, createBlock as a, openBlock as o, unref as O, withCtx as m, createElementBlock as s, createCommentVNode as h, Fragment as d, renderList as v, normalizeClass as g, createVNode as k, createElementVNode as y, createTextVNode as V, toDisplayString as $, withModifiers as z } from "vue";
|
|
2
|
+
import C from "../DropdownListItem.vue.js";
|
|
3
3
|
import w from "../../utils/DropdownOverlay/DropdownOverlay.vue.js";
|
|
4
|
-
import
|
|
4
|
+
import x from "../../utils/TextLabel.vue.js";
|
|
5
5
|
const B = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "nothing-found"
|
|
@@ -14,69 +14,69 @@ const B = {
|
|
|
14
14
|
optionSize: {},
|
|
15
15
|
selectOption: { type: Function }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
var
|
|
20
|
-
return (
|
|
21
|
-
}),
|
|
22
|
-
let
|
|
23
|
-
for (const
|
|
24
|
-
|
|
25
|
-
return
|
|
17
|
+
setup(e, { expose: S }) {
|
|
18
|
+
const i = e, r = L("overlay"), A = u(() => {
|
|
19
|
+
var t;
|
|
20
|
+
return (t = r.value) == null ? void 0 : t.listRef;
|
|
21
|
+
}), p = u(() => i.groups.size > 0), N = u(() => {
|
|
22
|
+
let t = 0;
|
|
23
|
+
for (const f of i.groups.values())
|
|
24
|
+
t += f.length;
|
|
25
|
+
return t + i.rest.length;
|
|
26
26
|
});
|
|
27
27
|
return S({
|
|
28
28
|
scrollIntoActive: () => {
|
|
29
|
-
var
|
|
30
|
-
(
|
|
29
|
+
var t;
|
|
30
|
+
(t = r.value) == null || t.scrollIntoActive();
|
|
31
31
|
},
|
|
32
32
|
listRef: A
|
|
33
|
-
}), (
|
|
33
|
+
}), (t, f) => (o(), a(O(w), {
|
|
34
34
|
ref_key: "overlay",
|
|
35
|
-
ref:
|
|
35
|
+
ref: r,
|
|
36
36
|
root: e.rootRef,
|
|
37
37
|
class: "pl-dropdown__options",
|
|
38
38
|
tabindex: "-1",
|
|
39
39
|
gap: 3
|
|
40
40
|
}, {
|
|
41
|
-
default:
|
|
42
|
-
(o(!0), s(
|
|
43
|
-
key:
|
|
44
|
-
class:
|
|
41
|
+
default: m(() => [
|
|
42
|
+
(o(!0), s(d, null, v(e.groups.entries(), ([n, c]) => (o(), s("div", {
|
|
43
|
+
key: n,
|
|
44
|
+
class: g({ "group-container": p.value })
|
|
45
45
|
}, [
|
|
46
|
-
|
|
47
|
-
default:
|
|
48
|
-
V($(
|
|
46
|
+
k(x, null, {
|
|
47
|
+
default: m(() => [
|
|
48
|
+
V($(n), 1)
|
|
49
49
|
]),
|
|
50
50
|
_: 2
|
|
51
51
|
}, 1024),
|
|
52
|
-
|
|
53
|
-
(o(!0), s(
|
|
52
|
+
y("div", null, [
|
|
53
|
+
(o(!0), s(d, null, v(c, (l, R) => (o(), a(C, {
|
|
54
54
|
key: R,
|
|
55
|
-
option:
|
|
56
|
-
"is-selected":
|
|
57
|
-
"is-hovered":
|
|
55
|
+
option: l,
|
|
56
|
+
"is-selected": l.isSelected,
|
|
57
|
+
"is-hovered": l.isActive,
|
|
58
58
|
size: e.optionSize,
|
|
59
|
-
onClick:
|
|
59
|
+
onClick: z((b) => e.selectOption(l.value), ["stop"])
|
|
60
60
|
}, null, 8, ["option", "is-selected", "is-hovered", "size", "onClick"]))), 128))
|
|
61
61
|
])
|
|
62
62
|
], 2))), 128)),
|
|
63
63
|
e.rest.length ? (o(), s("div", {
|
|
64
64
|
key: 0,
|
|
65
|
-
class:
|
|
65
|
+
class: g({ "group-container": p.value })
|
|
66
66
|
}, [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
(o(!0), s(
|
|
70
|
-
key:
|
|
71
|
-
option:
|
|
72
|
-
"is-selected":
|
|
73
|
-
"is-hovered":
|
|
67
|
+
k(x),
|
|
68
|
+
y("div", null, [
|
|
69
|
+
(o(!0), s(d, null, v(e.rest, (n, c) => (o(), a(C, {
|
|
70
|
+
key: c,
|
|
71
|
+
option: n,
|
|
72
|
+
"is-selected": n.isSelected,
|
|
73
|
+
"is-hovered": n.isActive,
|
|
74
74
|
size: e.optionSize,
|
|
75
|
-
onClick:
|
|
75
|
+
onClick: z((l) => e.selectOption(n.value), ["stop"])
|
|
76
76
|
}, null, 8, ["option", "is-selected", "is-hovered", "size", "onClick"]))), 128))
|
|
77
77
|
])
|
|
78
|
-
], 2)) :
|
|
79
|
-
N.value ?
|
|
78
|
+
], 2)) : h("", !0),
|
|
79
|
+
N.value ? h("", !0) : (o(), s("div", B, "Nothing found"))
|
|
80
80
|
]),
|
|
81
81
|
_: 1
|
|
82
82
|
}, 8, ["root"]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionList.vue.js","sources":["../../../src/components/PlDropdown/OptionList.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport DropdownListItem from '../DropdownListItem.vue';\nimport { DropdownOverlay } from '../../utils/DropdownOverlay';\nimport TextLabel from '../../utils/TextLabel.vue';\nimport { computed, useTemplateRef } from 'vue';\nimport type { LOption } from './types';\n\nconst props = defineProps<{\n rootRef: HTMLElement;\n groups: Map<string, LOption[]>;\n rest: LOption[];\n optionSize: 'small' | 'medium';\n selectOption: (v: unknown) => void;\n}>();\n\nconst overlay = useTemplateRef('overlay');\n\nconst listRef = computed(() => overlay.value?.listRef);\n\nconst hasGroups = computed(() => props.groups.size > 0);\n\nconst optionsLength = computed(() => {\n let totalGroupItems = 0;\n for (const items of props.groups.values()) {\n totalGroupItems += items.length;\n }\n return totalGroupItems + props.rest.length;\n});\n\nconst scrollIntoActive = () => {\n overlay.value?.scrollIntoActive();\n};\n\ndefineExpose({\n scrollIntoActive,\n listRef,\n});\n</script>\n\n<template>\n <DropdownOverlay ref=\"overlay\" :root=\"rootRef\" class=\"pl-dropdown__options\" tabindex=\"-1\" :gap=\"3\">\n <div v-for=\"[group, items] in groups.entries()\" :key=\"group\" :class=\"{ 'group-container': hasGroups }\">\n <TextLabel>{{ group }}</TextLabel>\n <div>\n <DropdownListItem\n v-for=\"(item, index) in items\"\n :key=\"index\"\n :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"optionSize\"\n @click.stop=\"selectOption(item.value)\"\n />\n </div>\n </div>\n <div v-if=\"rest.length\" :class=\"{ 'group-container': hasGroups }\">\n <TextLabel />\n <div>\n <DropdownListItem\n v-for=\"(item, index) in rest\"\n :key=\"index\" :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"optionSize\"\n @click.stop=\"selectOption(item.value)\"\n />\n </div>\n </div>\n <div v-if=\"!optionsLength\" class=\"nothing-found\">Nothing found</div>\n </DropdownOverlay>\n</template>\n"],"names":["props","__props","overlay","useTemplateRef","listRef","computed","_a","hasGroups","optionsLength","totalGroupItems","items","__expose"],"mappings":";;;;;;;;;;;;;;;;;AAOA,UAAMA,IAAQC,GAQRC,IAAUC,EAAe,SAAS,GAElCC,IAAUC,EAAS,MAAA;;AAAM,cAAAC,IAAAJ,EAAQ,UAAR,gBAAAI,EAAe;AAAA,KAAO,GAE/CC,IAAYF,EAAS,MAAML,EAAM,OAAO,OAAO,CAAC,GAEhDQ,IAAgBH,EAAS,MAAM;AACnC,UAAII,IAAkB;AACtB,iBAAWC,KAASV,EAAM,OAAO,OAAA;AAC/B,QAAAS,KAAmBC,EAAM;AAE3B,aAAOD,IAAkBT,EAAM,KAAK;AAAA,IACtC,CAAC;AAMD,WAAAW,EAAa;AAAA,MACX,kBALuB,MAAM;;AAC7B,SAAAL,IAAAJ,EAAQ,UAAR,QAAAI,EAAe;AAAA,MACjB;AAAA,MAIE,SAAAF;AAAA,IAAA,CACD
|
|
1
|
+
{"version":3,"file":"OptionList.vue.js","sources":["../../../src/components/PlDropdown/OptionList.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport DropdownListItem from '../DropdownListItem.vue';\nimport { DropdownOverlay } from '../../utils/DropdownOverlay';\nimport TextLabel from '../../utils/TextLabel.vue';\nimport { computed, useTemplateRef } from 'vue';\nimport type { LOption } from './types';\n\nconst props = defineProps<{\n rootRef: HTMLElement;\n groups: Map<string, LOption[]>;\n rest: LOption[];\n optionSize: 'small' | 'medium';\n selectOption: (v: unknown) => void;\n}>();\n\nconst overlay = useTemplateRef('overlay');\n\nconst listRef = computed(() => overlay.value?.listRef);\n\nconst hasGroups = computed(() => props.groups.size > 0);\n\nconst optionsLength = computed(() => {\n let totalGroupItems = 0;\n for (const items of props.groups.values()) {\n totalGroupItems += items.length;\n }\n return totalGroupItems + props.rest.length;\n});\n\nconst scrollIntoActive = () => {\n overlay.value?.scrollIntoActive();\n};\n\ndefineExpose({\n scrollIntoActive,\n listRef,\n});\n</script>\n\n<template>\n <DropdownOverlay ref=\"overlay\" :root=\"rootRef\" class=\"pl-dropdown__options\" tabindex=\"-1\" :gap=\"3\">\n <div v-for=\"[group, items] in groups.entries()\" :key=\"group\" :class=\"{ 'group-container': hasGroups }\">\n <TextLabel>{{ group }}</TextLabel>\n <div>\n <DropdownListItem\n v-for=\"(item, index) in items\"\n :key=\"index\"\n :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"optionSize\"\n @click.stop=\"selectOption(item.value)\"\n />\n </div>\n </div>\n <div v-if=\"rest.length\" :class=\"{ 'group-container': hasGroups }\">\n <TextLabel />\n <div>\n <DropdownListItem\n v-for=\"(item, index) in rest\"\n :key=\"index\" :option=\"item\"\n :is-selected=\"item.isSelected\"\n :is-hovered=\"item.isActive\"\n :size=\"optionSize\"\n @click.stop=\"selectOption(item.value)\"\n />\n </div>\n </div>\n <div v-if=\"!optionsLength\" class=\"nothing-found\">Nothing found</div>\n </DropdownOverlay>\n</template>\n"],"names":["props","__props","overlay","useTemplateRef","listRef","computed","_a","hasGroups","optionsLength","totalGroupItems","items","__expose","_createBlock","_unref","DropdownOverlay","_openBlock","_createElementBlock","_Fragment","group","_createVNode","TextLabel","_createElementVNode","_renderList","item","index","DropdownListItem","_withModifiers","$event","_hoisted_1"],"mappings":";;;;;;;;;;;;;;;;;AAOA,UAAMA,IAAQC,GAQRC,IAAUC,EAAe,SAAS,GAElCC,IAAUC,EAAS,MAAA;;AAAM,cAAAC,IAAAJ,EAAQ,UAAR,gBAAAI,EAAe;AAAA,KAAO,GAE/CC,IAAYF,EAAS,MAAML,EAAM,OAAO,OAAO,CAAC,GAEhDQ,IAAgBH,EAAS,MAAM;AACnC,UAAII,IAAkB;AACtB,iBAAWC,KAASV,EAAM,OAAO,OAAA;AAC/B,QAAAS,KAAmBC,EAAM;AAE3B,aAAOD,IAAkBT,EAAM,KAAK;AAAA,IACtC,CAAC;AAMD,WAAAW,EAAa;AAAA,MACX,kBALuB,MAAM;;AAC7B,SAAAL,IAAAJ,EAAQ,UAAR,QAAAI,EAAe;AAAA,MACjB;AAAA,MAIE,SAAAF;AAAA,IAAA,CACD,mBAICQ,EA6BkBC,EAAAC,CAAA,GAAA;AAAA,eA7BG;AAAA,MAAJ,KAAIZ;AAAA,MAAW,MAAMD,EAAA;AAAA,MAAS,OAAM;AAAA,MAAuB,UAAS;AAAA,MAAM,KAAK;AAAA,IAAA;iBACzF,MAA0C;AAAA,SAA/Cc,EAAA,EAAA,GAAAC,EAaMC,WAbwBhB,EAAA,OAAO,WAAO,CAAA,CAA/BiB,GAAOR,CAAK,YAAzBM,EAaM,OAAA;AAAA,UAb2C,KAAKE;AAAA,UAAQ,8BAA4BX,EAAA,OAAS;AAAA,QAAA;UACjGY,EAAkCC,GAAA,MAAA;AAAA,uBAAvB,MAAW;AAAA,kBAARF,CAAK,GAAA,CAAA;AAAA,YAAA;;;UACnBG,EAUM,OAAA,MAAA;AAAA,aATJN,EAAA,EAAA,GAAAC,EAQEC,GAAA,MAAAK,EAPwBZ,GAAK,CAArBa,GAAMC,YADhBZ,EAQEa,GAAA;AAAA,cANC,KAAKD;AAAA,cACL,QAAQD;AAAA,cACR,eAAaA,EAAK;AAAA,cAClB,cAAYA,EAAK;AAAA,cACjB,MAAMtB,EAAA;AAAA,cACN,SAAKyB,EAAA,CAAAC,MAAO1B,EAAA,aAAasB,EAAK,KAAK,GAAA,CAAA,MAAA,CAAA;AAAA,YAAA;;;QAI/BtB,EAAA,KAAK,eAAhBe,EAYM,OAAA;AAAA;UAZmB,8BAA4BT,EAAA,OAAS;AAAA,QAAA;UAC5DY,EAAaC,CAAA;AAAA,UACbC,EASM,OAAA,MAAA;AAAA,aARJN,EAAA,EAAA,GAAAC,EAOEC,GAAA,MAAAK,EANwBrB,EAAA,MAAI,CAApBsB,GAAMC,YADhBZ,EAOEa,GAAA;AAAA,cALC,KAAKD;AAAA,cAAQ,QAAQD;AAAA,cACrB,eAAaA,EAAK;AAAA,cAClB,cAAYA,EAAK;AAAA,cACjB,MAAMtB,EAAA;AAAA,cACN,SAAKyB,EAAA,CAAAC,MAAO1B,EAAA,aAAasB,EAAK,KAAK,GAAA,CAAA,MAAA,CAAA;AAAA,YAAA;;;QAI9Bf,EAAA,0BAAZQ,EAAoE,OAApEY,GAAiD,eAAa;AAAA;;;;;"}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(`.double-contour.top>div{border-bottom-right-radius:0;border-bottom-left-radius:0}.double-contour.bottom>div{border-top-right-radius:0;border-top-left-radius:0}.double-contour.left>div{border-top-right-radius:0;border-bottom-right-radius:0}.double-contour.right>div{border-top-left-radius:0;border-bottom-left-radius:0}.double-contour.top-left>div{border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.double-contour.top-right>div{border-bottom-right-radius:0;border-top-left-radius:0;border-top-right-radius:0}.double-contour.bottom-left>div{border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.double-contour.bottom-right>div{border-top-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0}.double-contour.middle>div{border-radius:0}
|
|
2
|
-
.ui-lt-container{min-width:0;white-space:nowrap;overflow:hidden;position:relative;border-radius:5px}.ui-lt-container span{display:inline-block;overflow:hidden;text-overflow:ellipsis;width:100%;vertical-align:bottom;pointer-events:all!important}.ui-lt-container .ui-lt-animate{position:relative;animation:left-to-right var(--
|
|
2
|
+
.ui-lt-container{min-width:0;white-space:nowrap;overflow:hidden;position:relative;border-radius:5px}.ui-lt-container span{display:inline-block;overflow:hidden;text-overflow:ellipsis;width:100%;vertical-align:bottom;pointer-events:all!important}.ui-lt-container .ui-lt-animate{position:relative;animation:left-to-right var(--v5deba9de) infinite alternate linear;overflow:unset!important;text-overflow:unset!important;width:fit-content!important}@keyframes left-to-right{0%{transform:translate(0);left:0%}to{transform:translate(-101%);left:101%}}
|
|
3
3
|
.pl-dropdown__options{--option-hover-bg: var(--btn-sec-hover-grey);z-index:var(--z-dropdown-options);border:1px solid var(--border-color-div-grey);position:absolute;background-color:var(--pl-dropdown-options-bg);border-radius:6px;max-height:244px;box-shadow:0 4px 12px -2px #0f244d14,0 6px 24px -2px #0f244d14;--thumb-color: var(--ic-02);overflow-y:auto}.pl-dropdown__options::-webkit-scrollbar{width:var(--scrollbar-width, 6px);height:5px;background-color:transparent;display:block}.pl-dropdown__options::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.pl-dropdown__options::-webkit-scrollbar-thumb:hover{--thumb-color: var(--border-color-focus)}.pl-dropdown__options .nothing-found{padding:0 10px;height:var(--control-height);line-height:var(--control-height);background-color:#fff;opacity:.5;font-style:italic}.pl-dropdown__options .group-container{padding:4px 0}.pl-dropdown{--contour-color: var(--txt-01);--contour-border-width: 1px;--label-offset-left-x: 8px;--label-offset-right-x: 8px;--label-color: var(--txt-01);position:relative;outline:none;min-height:var(--control-height);border-radius:6px;font-family:var(--font-family-base);font-size:var(--font-size-base);font-weight:var(--font-weigh-base)}.pl-dropdown__envelope{font-family:var(--control-font-family);min-width:160px}.pl-dropdown label{display:flex;align-items:center;gap:4px;position:absolute;top:0;transform:translateY(-60%);left:var(--label-offset-left-x);padding:0 4px;max-width:calc(100% - 16px);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit;color:var(--label-color);font-size:12px;font-weight:500;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background:var(--bg-elevated-01)}.pl-dropdown label>span{overflow:hidden;white-space:pre;text-overflow:ellipsis}.pl-dropdown__container{position:absolute;top:0;left:0;right:0;border-radius:6px;min-height:var(--control-height);color:var(--txt-01)}.pl-dropdown__contour{border-radius:var(--border-radius-control);border:var(--contour-border-width) solid var(--contour-color);box-shadow:var(--contour-box-shadow);z-index:0;pointer-events:none}.pl-dropdown__field{position:relative;border-radius:6px;overflow:hidden;background:transparent;padding-left:11px;min-height:var(--control-height);line-height:var(--control-height);display:flex;flex-direction:row;align-items:center;cursor:pointer}.pl-dropdown__field .input-value{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;flex-direction:row;align-items:center;padding:0 60px 0 11px;pointer-events:none;line-height:20px;color:var(--txt-01);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit}.pl-dropdown__field input{min-height:calc(var(--control-height) - 2px);line-height:20px;font-family:inherit;font-size:inherit;background-color:transparent;border:none;padding:0;width:calc(100% - 40px);color:var(--txt-01);caret-color:var(--border-color-focus)}.pl-dropdown__field input:focus{outline:none}.pl-dropdown__field input:placeholder-shown{text-overflow:ellipsis}.pl-dropdown__field input::placeholder{color:var(--color-placeholder)}.pl-dropdown__helper{font-size:12px;color:var(--txt-03);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-dropdown__error{font-size:12px;color:var(--txt-error);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-dropdown__controls{display:flex;flex-direction:row;align-items:center;gap:6px;margin-left:auto}.pl-dropdown__controls .mask-16,.pl-dropdown__controls .mask-24{cursor:pointer}.pl-dropdown__controls .clear{--icon-color: var(--ic-02)}.pl-dropdown__controls .mask-loading{--icon-color: var(--ic-accent);animation:spin 2.5s linear infinite}.pl-dropdown__arrow-wrapper{display:flex;align-items:center;min-height:var(--control-height);padding-right:11px}.pl-dropdown .arrow-icon{cursor:pointer}.pl-dropdown .arrow-icon.arrow-icon-default{transition:transform .2s}.pl-dropdown.open,.pl-dropdown:focus-within{z-index:1;--label-color: var(--txt-focus)}.pl-dropdown.open .pl-dropdown__container{z-index:1000}.pl-dropdown.open .pl-dropdown__field{border-radius:6px 6px 0 0}.pl-dropdown.open .arrow-icon.arrow-icon-default{transform:rotate(-180deg)}.pl-dropdown:hover{--contour-color: var(--control-hover-color)}.pl-dropdown:focus-within:not(.error){--label-color: var(--txt-focus);--contour-color: var(--border-color-focus);--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--border-color-focus-shadow)}.pl-dropdown:focus-within.error{--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--color-error-shadow)}.pl-dropdown.error{--contour-color: var(--txt-error);--label-color: var(--txt-error)}.pl-dropdown.disabled{--contour-color: var(--color-dis-01);--icon-color: var(--color-dis-01);--label-color: var(--color-dis-01);cursor:not-allowed;pointer-events:none;-webkit-user-select:none;user-select:none}.pl-dropdown.disabled .input-value{color:var(--dis-01)}`)),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
4
|
-
import { defineComponent as le, ref as B, useTemplateRef as ae, reactive as
|
|
4
|
+
import { defineComponent as le, ref as B, useTemplateRef as ae, reactive as ie, computed as s, unref as i, watch as P, watchPostEffect as se, createElementBlock as v, openBlock as l, createElementVNode as f, createCommentVNode as c, normalizeClass as de, createBlock as u, createVNode as D, withDirectives as ce, vModelText as ue, withCtx as $, createTextVNode as pe, toDisplayString as h, renderSlot as z, withModifiers as M } from "vue";
|
|
5
5
|
import fe from "../../assets/images/required.svg.js";
|
|
6
6
|
import { getErrorMessage as me } from "../../helpers/error.js";
|
|
7
7
|
import { tap as ve } from "../../helpers/functions.js";
|
|
8
|
-
import { deepEqual as
|
|
8
|
+
import { deepEqual as x } from "../../helpers/objects.js";
|
|
9
9
|
import { normalizeListOptions as he } from "../../helpers/utils.js";
|
|
10
10
|
import we from "../../utils/DoubleContour.vue.js";
|
|
11
11
|
|
|
12
|
-
import { useLabelNotch as
|
|
13
|
-
import
|
|
12
|
+
import { useLabelNotch as ge } from "../../utils/useLabelNotch.js";
|
|
13
|
+
import ye from "../LongText.vue.js";
|
|
14
14
|
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
15
|
+
import _ from "../PlIcon16/PlIcon16.vue.js";
|
|
16
|
+
import T from "../PlIcon24/PlIcon24.vue.js";
|
|
17
|
+
import ke from "../PlSvg/PlSvg.vue.js";
|
|
18
|
+
import Ie from "../PlTooltip/PlTooltip.vue.js";
|
|
19
|
+
import xe from "./OptionList.vue.js";
|
|
20
20
|
|
|
21
|
-
import { useGroupBy as
|
|
22
|
-
const
|
|
21
|
+
import { useGroupBy as _e } from "./useGroupBy.js";
|
|
22
|
+
const Ve = ["tabindex"], be = { class: "pl-dropdown__container" }, Le = { class: "pl-dropdown__field" }, Ce = ["disabled", "placeholder"], Ee = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "input-value"
|
|
25
|
-
},
|
|
25
|
+
}, Re = { class: "pl-dropdown__controls" }, Oe = { key: 0 }, Se = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "pl-dropdown__error"
|
|
28
|
-
},
|
|
28
|
+
}, Ae = {
|
|
29
29
|
key: 1,
|
|
30
30
|
class: "pl-dropdown__helper"
|
|
31
|
-
},
|
|
31
|
+
}, Be = {
|
|
32
32
|
key: 2,
|
|
33
33
|
class: "pl-dropdown__helper"
|
|
34
|
-
},
|
|
34
|
+
}, Pe = {
|
|
35
35
|
name: "PlDropdown"
|
|
36
36
|
}, Ze = /* @__PURE__ */ le({
|
|
37
|
-
...
|
|
37
|
+
...Pe,
|
|
38
38
|
props: {
|
|
39
39
|
modelValue: {},
|
|
40
40
|
label: { default: "" },
|
|
@@ -53,17 +53,17 @@ const be = ["tabindex"], Le = { class: "pl-dropdown__container" }, Ce = { class:
|
|
|
53
53
|
groupPosition: { default: void 0 }
|
|
54
54
|
},
|
|
55
55
|
emits: ["update:modelValue"],
|
|
56
|
-
setup(
|
|
57
|
-
const V = F, r =
|
|
56
|
+
setup(n, { emit: F }) {
|
|
57
|
+
const V = F, r = n, d = B(), g = B(), y = ae("optionListRef"), o = ie({
|
|
58
58
|
search: "",
|
|
59
59
|
activeIndex: -1,
|
|
60
60
|
open: !1,
|
|
61
61
|
optionsHeight: 0
|
|
62
62
|
}), N = () => ve(
|
|
63
|
-
R.value.findIndex((e) =>
|
|
63
|
+
R.value.findIndex((e) => x(e.value, r.modelValue)),
|
|
64
64
|
(e) => e < 0 ? 0 : e
|
|
65
|
-
), q = () => o.activeIndex = N(),
|
|
66
|
-
if (!
|
|
65
|
+
), q = () => o.activeIndex = N(), w = s(() => r.options === void 0), k = s(() => w.value ? !0 : r.disabled), b = s(() => (r.options ?? []).findIndex((e) => x(e.value, r.modelValue))), L = s(() => {
|
|
66
|
+
if (!w.value) {
|
|
67
67
|
if (r.error)
|
|
68
68
|
return me(r.error);
|
|
69
69
|
if (r.modelValue !== void 0 && b.value === -1)
|
|
@@ -77,117 +77,117 @@ const be = ["tabindex"], Le = { class: "pl-dropdown__container" }, Ce = { class:
|
|
|
77
77
|
isActive: t === o.activeIndex
|
|
78
78
|
}))
|
|
79
79
|
), E = s(() => {
|
|
80
|
-
const t =
|
|
80
|
+
const t = i(C).find((a) => x(a.value, r.modelValue));
|
|
81
81
|
return (t == null ? void 0 : t.label) || r.modelValue;
|
|
82
82
|
}), H = s(() => !o.open && r.modelValue !== void 0 ? "" : r.modelValue ? String(E.value) : r.placeholder), U = s(() => r.modelValue !== void 0 && r.modelValue !== null), K = s(() => {
|
|
83
83
|
const e = C.value;
|
|
84
84
|
return o.search ? e.filter((t) => {
|
|
85
|
-
const
|
|
86
|
-
return t.label.toLowerCase().includes(
|
|
85
|
+
const a = o.search.toLowerCase();
|
|
86
|
+
return t.label.toLowerCase().includes(a) || t.description && t.description.toLowerCase().includes(a) ? !0 : typeof t.value == "string" ? t.value.toLowerCase().includes(a) : t.value === o.search;
|
|
87
87
|
}) : e;
|
|
88
|
-
}), { orderedRef: R, groupsRef: G, restRef: W } =
|
|
88
|
+
}), { orderedRef: R, groupsRef: G, restRef: W } = _e(K, "group"), j = s(() => k.value ? void 0 : "0"), O = (e) => {
|
|
89
89
|
var t;
|
|
90
|
-
V("update:modelValue", e), o.search = "", o.open = !1, (t =
|
|
90
|
+
V("update:modelValue", e), o.search = "", o.open = !1, (t = d == null ? void 0 : d.value) == null || t.focus();
|
|
91
91
|
}, J = (e) => {
|
|
92
92
|
O(e);
|
|
93
93
|
}, Q = () => V("update:modelValue", void 0), X = () => {
|
|
94
94
|
var e;
|
|
95
|
-
return (e =
|
|
95
|
+
return (e = g.value) == null ? void 0 : e.focus();
|
|
96
96
|
}, Y = () => {
|
|
97
97
|
o.open = !o.open, o.open || (o.search = "");
|
|
98
98
|
}, Z = () => o.open = !0, ee = (e) => {
|
|
99
|
-
var
|
|
99
|
+
var a, p, m;
|
|
100
100
|
const t = e.relatedTarget;
|
|
101
|
-
!((
|
|
101
|
+
!((a = d.value) != null && a.contains(t)) && !((m = (p = y.value) == null ? void 0 : p.listRef) != null && m.contains(t)) && (o.search = "", o.open = !1);
|
|
102
102
|
}, oe = (e) => {
|
|
103
103
|
var S, A;
|
|
104
104
|
if (["ArrowDown", "ArrowUp", "Enter", "Escape"].includes(e.code))
|
|
105
105
|
e.preventDefault();
|
|
106
106
|
else
|
|
107
107
|
return;
|
|
108
|
-
const { open: t, activeIndex:
|
|
108
|
+
const { open: t, activeIndex: a } = o;
|
|
109
109
|
if (!t) {
|
|
110
110
|
e.code === "Enter" && (o.open = !0);
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
e.code === "Escape" && (o.open = !1, (S =
|
|
114
|
-
const p = R.value, { length:
|
|
115
|
-
if (!
|
|
113
|
+
e.code === "Escape" && (o.open = !1, (S = d.value) == null || S.focus());
|
|
114
|
+
const p = R.value, { length: m } = p;
|
|
115
|
+
if (!m)
|
|
116
116
|
return;
|
|
117
|
-
e.code === "Enter" && O((A = p.find((
|
|
118
|
-
const te = p.findIndex((
|
|
119
|
-
o.activeIndex = p[
|
|
117
|
+
e.code === "Enter" && O((A = p.find((I) => I.index === a)) == null ? void 0 : A.value);
|
|
118
|
+
const te = p.findIndex((I) => I.index === a) ?? -1, ne = e.code === "ArrowDown" ? 1 : e.code === "ArrowUp" ? -1 : 0, re = Math.abs(te + ne + m) % m;
|
|
119
|
+
o.activeIndex = p[re].index ?? -1;
|
|
120
120
|
};
|
|
121
|
-
return
|
|
121
|
+
return ge(d), P(() => r.modelValue, q, { immediate: !0 }), P(
|
|
122
122
|
() => o.open,
|
|
123
123
|
(e) => {
|
|
124
124
|
var t;
|
|
125
|
-
return e ? (t =
|
|
125
|
+
return e ? (t = g.value) == null ? void 0 : t.focus() : "";
|
|
126
126
|
}
|
|
127
|
-
),
|
|
127
|
+
), se(() => {
|
|
128
128
|
var e;
|
|
129
|
-
o.search, o.activeIndex >= 0 && o.open && ((e =
|
|
130
|
-
}), (e, t) => (
|
|
129
|
+
o.search, o.activeIndex >= 0 && o.open && ((e = y.value) == null || e.scrollIntoActive());
|
|
130
|
+
}), (e, t) => (l(), v("div", {
|
|
131
131
|
class: "pl-dropdown__envelope",
|
|
132
132
|
onClick: X
|
|
133
133
|
}, [
|
|
134
|
-
|
|
134
|
+
f("div", {
|
|
135
135
|
ref_key: "rootRef",
|
|
136
|
-
ref:
|
|
136
|
+
ref: d,
|
|
137
137
|
tabindex: j.value,
|
|
138
|
-
class: de(["pl-dropdown", { open: o.open, error:
|
|
138
|
+
class: de(["pl-dropdown", { open: o.open, error: n.error || n.errorStatus, disabled: k.value }]),
|
|
139
139
|
onKeydown: oe,
|
|
140
140
|
onFocusout: ee
|
|
141
141
|
}, [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
f("div", be, [
|
|
143
|
+
f("div", Le, [
|
|
144
|
+
ce(f("input", {
|
|
145
145
|
ref_key: "input",
|
|
146
|
-
ref:
|
|
147
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
146
|
+
ref: g,
|
|
147
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => o.search = a),
|
|
148
148
|
type: "text",
|
|
149
149
|
tabindex: "-1",
|
|
150
|
-
disabled:
|
|
150
|
+
disabled: k.value,
|
|
151
151
|
placeholder: H.value,
|
|
152
152
|
spellcheck: "false",
|
|
153
153
|
autocomplete: "chrome-off",
|
|
154
154
|
onFocus: Z
|
|
155
|
-
}, null, 40,
|
|
156
|
-
[
|
|
155
|
+
}, null, 40, Ce), [
|
|
156
|
+
[ue, o.search]
|
|
157
157
|
]),
|
|
158
|
-
o.open ?
|
|
159
|
-
D(
|
|
158
|
+
o.open ? c("", !0) : (l(), v("div", Ee, [
|
|
159
|
+
D(ye, null, {
|
|
160
160
|
default: $(() => [
|
|
161
|
-
|
|
161
|
+
pe(h(E.value), 1)
|
|
162
162
|
]),
|
|
163
163
|
_: 1
|
|
164
164
|
})
|
|
165
165
|
])),
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
f("div", Re, [
|
|
167
|
+
w.value ? (l(), u(i(T), {
|
|
168
168
|
key: 0,
|
|
169
169
|
name: "loading"
|
|
170
|
-
})) :
|
|
171
|
-
|
|
170
|
+
})) : c("", !0),
|
|
171
|
+
n.clearable && U.value ? (l(), u(i(_), {
|
|
172
172
|
key: 1,
|
|
173
173
|
class: "clear",
|
|
174
174
|
name: "delete-clear",
|
|
175
|
-
onClick:
|
|
176
|
-
})) :
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
onClick: M(Q, ["stop"])
|
|
176
|
+
})) : c("", !0),
|
|
177
|
+
z(e.$slots, "append"),
|
|
178
|
+
f("div", {
|
|
179
179
|
class: "pl-dropdown__arrow-wrapper",
|
|
180
|
-
onClick:
|
|
180
|
+
onClick: M(Y, ["stop"])
|
|
181
181
|
}, [
|
|
182
|
-
|
|
182
|
+
n.arrowIconLarge ? (l(), u(i(T), {
|
|
183
183
|
key: 0,
|
|
184
|
-
name:
|
|
184
|
+
name: n.arrowIconLarge,
|
|
185
185
|
class: "arrow-icon"
|
|
186
|
-
}, null, 8, ["name"])) :
|
|
186
|
+
}, null, 8, ["name"])) : n.arrowIcon ? (l(), u(i(_), {
|
|
187
187
|
key: 1,
|
|
188
|
-
name:
|
|
188
|
+
name: n.arrowIcon,
|
|
189
189
|
class: "arrow-icon"
|
|
190
|
-
}, null, 8, ["name"])) : (
|
|
190
|
+
}, null, 8, ["name"])) : (l(), u(i(_), {
|
|
191
191
|
key: 2,
|
|
192
192
|
name: "chevron-down",
|
|
193
193
|
class: "arrow-icon arrow-icon-default"
|
|
@@ -195,40 +195,40 @@ const be = ["tabindex"], Le = { class: "pl-dropdown__container" }, Ce = { class:
|
|
|
195
195
|
])
|
|
196
196
|
])
|
|
197
197
|
]),
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
n.label ? (l(), v("label", Oe, [
|
|
199
|
+
n.required ? (l(), u(i(ke), {
|
|
200
200
|
key: 0,
|
|
201
|
-
uri:
|
|
202
|
-
}, null, 8, ["uri"])) :
|
|
203
|
-
|
|
204
|
-
e.$slots.tooltip ? (
|
|
201
|
+
uri: i(fe)
|
|
202
|
+
}, null, 8, ["uri"])) : c("", !0),
|
|
203
|
+
f("span", null, h(n.label), 1),
|
|
204
|
+
e.$slots.tooltip ? (l(), u(i(Ie), {
|
|
205
205
|
key: 1,
|
|
206
206
|
class: "info",
|
|
207
207
|
position: "top"
|
|
208
208
|
}, {
|
|
209
209
|
tooltip: $(() => [
|
|
210
|
-
|
|
210
|
+
z(e.$slots, "tooltip")
|
|
211
211
|
]),
|
|
212
212
|
_: 3
|
|
213
|
-
})) :
|
|
214
|
-
])) :
|
|
215
|
-
o.open ? (
|
|
213
|
+
})) : c("", !0)
|
|
214
|
+
])) : c("", !0),
|
|
215
|
+
o.open ? (l(), u(xe, {
|
|
216
216
|
key: 1,
|
|
217
217
|
ref_key: "optionListRef",
|
|
218
|
-
ref:
|
|
219
|
-
"root-ref":
|
|
220
|
-
groups:
|
|
221
|
-
rest:
|
|
222
|
-
"option-size":
|
|
218
|
+
ref: y,
|
|
219
|
+
"root-ref": d.value,
|
|
220
|
+
groups: i(G),
|
|
221
|
+
rest: i(W),
|
|
222
|
+
"option-size": n.optionSize,
|
|
223
223
|
"select-option": J
|
|
224
|
-
}, null, 8, ["root-ref", "groups", "rest", "option-size"])) :
|
|
224
|
+
}, null, 8, ["root-ref", "groups", "rest", "option-size"])) : c("", !0),
|
|
225
225
|
D(we, {
|
|
226
226
|
class: "pl-dropdown__contour",
|
|
227
|
-
"group-position":
|
|
227
|
+
"group-position": n.groupPosition
|
|
228
228
|
}, null, 8, ["group-position"])
|
|
229
229
|
])
|
|
230
|
-
], 42,
|
|
231
|
-
L.value ? (
|
|
230
|
+
], 42, Ve),
|
|
231
|
+
L.value ? (l(), v("div", Se, h(L.value), 1)) : w.value && n.loadingOptionsHelper ? (l(), v("div", Ae, h(n.loadingOptionsHelper), 1)) : n.helper ? (l(), v("div", Be, h(n.helper), 1)) : c("", !0)
|
|
232
232
|
]));
|
|
233
233
|
}
|
|
234
234
|
});
|