@central-design-system/components 2.30.0 → 3.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cds.css +1 -111
- package/dist/cds.d.ts +31 -0
- package/dist/cds.es.js +2159 -0
- package/dist/cds.umd.js +1 -0
- package/dist/components/CdsBadge/CdsBadge.vue.d.ts +32 -0
- package/dist/components/CdsButton/CdsButton.vue.d.ts +140 -0
- package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +179 -0
- package/dist/components/CdsGrid/CdsCol.vue.d.ts +73 -0
- package/dist/components/CdsGrid/CdsGrid.vue.d.ts +55 -0
- package/dist/components/CdsGrid/CdsRow.vue.d.ts +37 -0
- package/dist/components/CdsGrid/composable/column.d.ts +84 -0
- package/dist/components/CdsGrid/composable/grid.d.ts +24 -0
- package/dist/components/CdsGrid/composable/index.d.ts +4 -0
- package/dist/components/CdsGrid/composable/subgrid.d.ts +20 -0
- package/dist/components/CdsGrid/composable/wide.d.ts +12 -0
- package/dist/components/CdsGrid/mode/CSSGrid.d.ts +5 -0
- package/dist/components/CdsGrid/mode/FlexGrid.d.ts +5 -0
- package/dist/components/CdsGrid/types.d.ts +27 -0
- package/dist/components/CdsIcon/CdsIcon.vue.d.ts +44 -0
- package/dist/components/CdsIcon/index.d.ts +1 -0
- package/dist/components/CdsLink/CdsLink.vue.d.ts +50 -0
- package/dist/components/CdsList/CdsList.vue.d.ts +170 -0
- package/dist/components/CdsList/CdsListGroup.vue.d.ts +125 -0
- package/dist/components/CdsList/CdsListItem.vue.d.ts +172 -0
- package/dist/components/CdsList/composable/depth.d.ts +3 -0
- package/dist/components/CdsList/composable/index.d.ts +2 -0
- package/dist/components/CdsList/composable/list.d.ts +19 -0
- package/dist/components/CdsList/index.d.ts +3 -0
- package/dist/components/CdsLoader/CdsLoader.vue.d.ts +62 -0
- package/dist/components/CdsLoader/index.d.ts +1 -0
- package/dist/components/CdsStatus/CdsStatus.vue.d.ts +46 -0
- package/dist/components/CdsTag/CdsTag.vue.d.ts +96 -0
- package/dist/components/index.d.ts +18 -0
- package/dist/composable/appearance.d.ts +24 -0
- package/dist/composable/color.d.ts +21 -0
- package/dist/composable/dark.d.ts +19 -0
- package/dist/composable/disabled.d.ts +19 -0
- package/dist/composable/focus.d.ts +12 -0
- package/dist/composable/icon.d.ts +32 -0
- package/dist/composable/index.d.ts +17 -0
- package/dist/composable/items.d.ts +78 -0
- package/dist/composable/link.d.ts +36 -0
- package/dist/composable/loading.d.ts +19 -0
- package/dist/composable/nested/nested.d.ts +85 -0
- package/dist/composable/nested/openStrategies.d.ts +25 -0
- package/dist/composable/nested/selectStrategies.d.ts +21 -0
- package/dist/composable/proxyModel.d.ts +8 -0
- package/dist/composable/render.d.ts +2 -0
- package/dist/composable/size.d.ts +24 -0
- package/dist/composable/status.d.ts +21 -0
- package/dist/composable/tag.d.ts +16 -0
- package/dist/composable/text.d.ts +17 -0
- package/dist/composable/toggleScope.d.ts +2 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/shims-vue.d.ts +24 -0
- package/dist/transitions/createTransition.d.ts +9 -0
- package/dist/transitions/expandTransition.d.ts +19 -0
- package/dist/transitions/index.d.ts +14 -0
- package/dist/types/CdsOptions.d.ts +3 -0
- package/dist/utils/changeCase/lowerCase.d.ts +8 -0
- package/dist/utils/changeCase/noCase.d.ts +10 -0
- package/dist/utils/changeCase/paramCase.d.ts +3 -0
- package/dist/utils/changeCase/pascalCase.d.ts +5 -0
- package/dist/utils/getCurrentInstance.d.ts +13 -0
- package/dist/utils/helpers.d.ts +49 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/propsFactory.d.ts +52 -0
- package/nuxt.js +13 -0
- package/package.json +37 -80
- package/src/scss/index.scss +10 -0
- package/{dist/mixins/scss → src/scss/mixins}/layout/_convert.scss +4 -2
- package/{dist/mixins/scss → src/scss/mixins}/layout/_layout.scss +0 -0
- package/{dist/mixins/scss → src/scss/mixins}/layout/_mini-unit.scss +0 -0
- package/{dist/mixins/scss → src/scss/mixins}/layout/_spacing.scss +0 -0
- package/src/scss/mixins/layout/exports/_mini-unit.module.scss +5 -0
- package/src/scss/mixins/layout/exports/_spacing-all.module.scss +3 -0
- package/src/scss/mixins/layout/exports/_spacing-fluid.module.scss +8 -0
- package/src/scss/mixins/layout/exports/_spacing-layout.module.scss +11 -0
- package/src/scss/mixins/layout/exports/_spacing.module.scss +16 -0
- package/{dist/mixins/scss → src/scss/mixins}/layout/index.scss +0 -2
- package/{dist/mixins/scss → src/scss/mixins}/motion.scss +0 -0
- package/{dist/mixins/scss → src/scss/mixins}/typo.scss +0 -67
- package/src/scss/modules/_reset.scss +113 -0
- package/src/scss/modules/_transition.scss +26 -0
- package/src/scss/modules/_typography.scss +36 -0
- package/src/scss/modules/_variables.scss +9 -0
- package/src/scss/modules/grid/_aspect-ratio.scss +62 -0
- package/src/scss/modules/grid/_breakpoint.scss +195 -0
- package/src/scss/modules/grid/_config.scss +88 -0
- package/src/scss/modules/grid/_css-grid.scss +445 -0
- package/src/scss/modules/grid/_flex-grid.scss +39 -0
- package/src/scss/modules/grid/_mixins.scss +307 -0
- package/src/scss/modules/grid/exports/_config.module.scss +9 -0
- package/src/scss/modules/grid/index.scss +5 -0
- package/src/scss/themes/b2b/tokens-map.scss +139 -0
- package/src/scss/themes/b2b/tokens.json +2190 -0
- package/{dist/tokens → src/scss/themes}/b2b/variables.css +0 -0
- package/src/scss/themes/cds/tokens-map.scss +138 -0
- package/src/scss/themes/cds/tokens.json +2184 -0
- package/{dist/tokens → src/scss/themes}/cds/variables.css +0 -1
- package/src/scss/themes/index.ts +43 -0
- package/src/scss/utility/display.scss +13 -0
- package/src/scss/utility/flexbox.scss +37 -0
- package/src/scss/utility/generatedFiles/generatedStyles.json +1 -0
- package/src/scss/utility/generatedFiles/generatedStyles.scss +300 -0
- package/src/scss/utility/index.scss +7 -0
- package/src/scss/utility/layout.scss +11 -0
- package/src/scss/utility/lists.scss +76 -0
- package/src/scss/utility/spacing.scss +89 -0
- package/src/scss/utility/typography.scss +16 -0
- package/src/scss/utility/variables.scss +116 -0
- package/README.md +0 -87
- package/build/utils/postInstall.js +0 -20
- package/build/utils/print.js +0 -38
- package/dist/CdsAccordion/index.js +0 -8
- package/dist/CdsAccordion/styles.css +0 -11
- package/dist/CdsBadge/index.js +0 -8
- package/dist/CdsBadge/styles.css +0 -9
- package/dist/CdsBreadcrumbs/index.js +0 -8
- package/dist/CdsBreadcrumbs/styles.css +0 -11
- package/dist/CdsButton/index.js +0 -8
- package/dist/CdsButton/styles.css +0 -11
- package/dist/CdsCheckbox/index.js +0 -8
- package/dist/CdsCheckbox/styles.css +0 -15
- package/dist/CdsCombobox/index.js +0 -8
- package/dist/CdsCombobox/styles.css +0 -15
- package/dist/CdsContainer/index.js +0 -8
- package/dist/CdsContainer/styles.css +0 -11
- package/dist/CdsContentSwitcher/index.js +0 -8
- package/dist/CdsContentSwitcher/styles.css +0 -15
- package/dist/CdsDataTable/index.js +0 -8
- package/dist/CdsDataTable/styles.css +0 -21
- package/dist/CdsDatePicker/index.js +0 -24
- package/dist/CdsDatePicker/styles.css +0 -15
- package/dist/CdsDrawer/index.js +0 -8
- package/dist/CdsDrawer/styles.css +0 -17
- package/dist/CdsDropdown/index.js +0 -8
- package/dist/CdsDropdown/styles.css +0 -15
- package/dist/CdsEmptyState/index.js +0 -8
- package/dist/CdsEmptyState/styles.css +0 -9
- package/dist/CdsFooter/index.js +0 -8
- package/dist/CdsFooter/styles.css +0 -17
- package/dist/CdsForm/index.js +0 -8
- package/dist/CdsForm/styles.css +0 -15
- package/dist/CdsGrid/index.js +0 -8
- package/dist/CdsGrid/styles.css +0 -9
- package/dist/CdsHeader/index.js +0 -8
- package/dist/CdsHeader/styles.css +0 -11
- package/dist/CdsIcon/index.js +0 -8
- package/dist/CdsIcon/styles.css +0 -9
- package/dist/CdsImage/index.js +0 -8
- package/dist/CdsImage/styles.css +0 -9
- package/dist/CdsInput/index.js +0 -8
- package/dist/CdsInput/styles.css +0 -13
- package/dist/CdsLink/index.js +0 -8
- package/dist/CdsLink/styles.css +0 -9
- package/dist/CdsList/index.js +0 -8
- package/dist/CdsList/styles.css +0 -9
- package/dist/CdsLoading/index.js +0 -8
- package/dist/CdsLoading/styles.css +0 -9
- package/dist/CdsModal/index.js +0 -8
- package/dist/CdsModal/styles.css +0 -15
- package/dist/CdsMultiselect/index.js +0 -8
- package/dist/CdsMultiselect/styles.css +0 -17
- package/dist/CdsNotification/index.js +0 -8
- package/dist/CdsNotification/styles.css +0 -21
- package/dist/CdsOverflowMenu/index.js +0 -8
- package/dist/CdsOverflowMenu/styles.css +0 -21
- package/dist/CdsPagination/index.js +0 -8
- package/dist/CdsPagination/styles.css +0 -13
- package/dist/CdsRadioButton/index.js +0 -8
- package/dist/CdsRadioButton/styles.css +0 -15
- package/dist/CdsSearch/index.js +0 -8
- package/dist/CdsSearch/styles.css +0 -19
- package/dist/CdsSelect/index.js +0 -8
- package/dist/CdsSelect/styles.css +0 -15
- package/dist/CdsSidebar/index.js +0 -8
- package/dist/CdsSidebar/styles.css +0 -15
- package/dist/CdsSkeleton/index.js +0 -8
- package/dist/CdsSkeleton/styles.css +0 -9
- package/dist/CdsStages/index.js +0 -8
- package/dist/CdsStages/styles.css +0 -9
- package/dist/CdsStatus/index.js +0 -8
- package/dist/CdsStatus/styles.css +0 -15
- package/dist/CdsSteps/index.js +0 -8
- package/dist/CdsSteps/styles.css +0 -19
- package/dist/CdsTable/index.js +0 -16
- package/dist/CdsTable/styles.css +0 -21
- package/dist/CdsTabs/index.js +0 -8
- package/dist/CdsTabs/styles.css +0 -9
- package/dist/CdsTag/index.js +0 -8
- package/dist/CdsTag/styles.css +0 -11
- package/dist/CdsTextArea/index.js +0 -8
- package/dist/CdsTextArea/styles.css +0 -17
- package/dist/CdsTextInput/index.js +0 -8
- package/dist/CdsTextInput/styles.css +0 -15
- package/dist/CdsToggle/index.js +0 -8
- package/dist/CdsToggle/styles.css +0 -9
- package/dist/CdsTooltip/index.js +0 -8
- package/dist/CdsTooltip/styles.css +0 -13
- package/dist/CdsUploader/index.js +0 -14
- package/dist/CdsUploader/styles.css +0 -25
- package/dist/cds.js +0 -38
- package/dist/cds.min.css +0 -7
- package/dist/cds.min.js +0 -38
- package/dist/index.html +0 -60
- package/dist/mixins/scss/layout/_breakpoint.scss +0 -237
- package/dist/mixins/scss/layout/_key-height.scss +0 -90
- package/dist/mixins/scss/layout/_spacing-export.scss +0 -34
- package/dist/mixins/scss/layout/_utilities.scss +0 -33
- package/dist/types/CdsAccordion.ts +0 -4
- package/dist/types/CdsAccordionItem.ts +0 -10
- package/dist/types/CdsBreadcrumbs.ts +0 -11
- package/dist/types/CdsBreadcrumbsItem.ts +0 -12
- package/dist/types/CdsButton.ts +0 -30
- package/dist/types/CdsCheckbox.ts +0 -20
- package/dist/types/CdsCheckboxGroup.ts +0 -14
- package/dist/types/CdsCol.ts +0 -38
- package/dist/types/CdsCombobox.ts +0 -42
- package/dist/types/CdsContainer.ts +0 -32
- package/dist/types/CdsContentSwitcher.ts +0 -4
- package/dist/types/CdsContentSwitcherButton.ts +0 -21
- package/dist/types/CdsDataTable.ts +0 -48
- package/dist/types/CdsDatePicker.ts +0 -40
- package/dist/types/CdsDrawer.ts +0 -25
- package/dist/types/CdsDrawerGroup.ts +0 -8
- package/dist/types/CdsDrawerItem.ts +0 -12
- package/dist/types/CdsDrawerLabel.ts +0 -4
- package/dist/types/CdsDropdown.ts +0 -14
- package/dist/types/CdsEmptyState.ts +0 -10
- package/dist/types/CdsFooter.ts +0 -17
- package/dist/types/CdsFooterService.ts +0 -16
- package/dist/types/CdsForm.ts +0 -4
- package/dist/types/CdsFormGroup.ts +0 -8
- package/dist/types/CdsFormItem.ts +0 -4
- package/dist/types/CdsGrid.ts +0 -16
- package/dist/types/CdsHeader.ts +0 -27
- package/dist/types/CdsHeaderService.ts +0 -4
- package/dist/types/CdsIcon.ts +0 -6
- package/dist/types/CdsLink.ts +0 -22
- package/dist/types/CdsList.ts +0 -6
- package/dist/types/CdsLoading.ts +0 -14
- package/dist/types/CdsModal.ts +0 -17
- package/dist/types/CdsMultiselect.ts +0 -33
- package/dist/types/CdsNotification.ts +0 -22
- package/dist/types/CdsOverflowMenu.ts +0 -16
- package/dist/types/CdsPagination.ts +0 -12
- package/dist/types/CdsRadioButton.ts +0 -29
- package/dist/types/CdsRow.ts +0 -18
- package/dist/types/CdsSearch.ts +0 -24
- package/dist/types/CdsSelect.ts +0 -37
- package/dist/types/CdsSkeleton.ts +0 -14
- package/dist/types/CdsStages.ts +0 -10
- package/dist/types/CdsStatus.ts +0 -22
- package/dist/types/CdsSteps.ts +0 -22
- package/dist/types/CdsStepsItem.ts +0 -12
- package/dist/types/CdsTable.ts +0 -46
- package/dist/types/CdsTabs.ts +0 -19
- package/dist/types/CdsTabsItem.ts +0 -18
- package/dist/types/CdsTag.ts +0 -20
- package/dist/types/CdsTextArea.ts +0 -26
- package/dist/types/CdsTextInput.ts +0 -32
- package/dist/types/CdsToggle.ts +0 -18
- package/dist/types/CdsTooltip.ts +0 -18
- package/dist/types/CdsTooltipDefinition.ts +0 -16
- package/dist/types/CdsTooltipInteractive.ts +0 -11
- package/dist/types/CdsUploader.ts +0 -44
- package/dist/types/Sidebar.ts +0 -17
- package/dist/types/types.ts +0 -2
- package/dist/utils/convertRemToPx.js +0 -9
- package/dist/utils/deepFind.js +0 -14
- package/dist/utils/expiringStorage.js +0 -28
- package/dist/utils/helpers.js +0 -33
- package/dist/utils/index.js +0 -1
- package/dist/utils/isCorrectTag.js +0 -5
- package/dist/utils/isRightProps.js +0 -5
- package/dist/utils/memoize.js +0 -8
- package/dist/utils/suffixPropName.js +0 -12
- package/dist/utils/test/deepFind.test.js +0 -18
- package/dist/utils/test/isCorrectTag.test.js +0 -9
- package/dist/utils/test/isCorrectTagDataSet.js +0 -51
- package/dist/utils/validationProps.js +0 -7
package/dist/cds.es.js
ADDED
|
@@ -0,0 +1,2159 @@
|
|
|
1
|
+
import { getCurrentInstance as ft, warn as me, resolveDynamicComponent as P, computed as c, defineComponent as u, unref as G, ref as _, watch as Y, onScopeDispose as pt, effectScope as mt, onBeforeUnmount as Ne, provide as x, inject as R, openBlock as g, createElementBlock as C, normalizeClass as O, toDisplayString as L, createElementVNode as E, mergeProps as Fe, createBlock as k, renderSlot as $, resolveComponent as z, withCtx as B, createCommentVNode as w, Fragment as ve, createTextVNode as M, onBeforeMount as vt, withKeys as ze, h as A, normalizeProps as we, guardReactiveProps as be, Transition as gt, camelize as yt, toRef as ht, createVNode as Me, withDirectives as Ct, vShow as $t, withModifiers as _e } from "vue";
|
|
2
|
+
function b(e, t) {
|
|
3
|
+
return (n) => Object.keys(e).reduce((s, o) => {
|
|
4
|
+
const r = typeof e[o] == "object" && e[o] != null && !Array.isArray(e[o]) ? e[o] : { type: e[o] };
|
|
5
|
+
return n && o in n ? s[o] = {
|
|
6
|
+
...r,
|
|
7
|
+
default: n[o]
|
|
8
|
+
} : s[o] = r, t && !s[o].source && (s[o].source = t), s;
|
|
9
|
+
}, {});
|
|
10
|
+
}
|
|
11
|
+
const vs = Object.freeze({
|
|
12
|
+
enter: 13,
|
|
13
|
+
tab: 9,
|
|
14
|
+
delete: 46,
|
|
15
|
+
esc: 27,
|
|
16
|
+
space: 32,
|
|
17
|
+
up: 38,
|
|
18
|
+
down: 40,
|
|
19
|
+
left: 37,
|
|
20
|
+
right: 39,
|
|
21
|
+
end: 35,
|
|
22
|
+
home: 36,
|
|
23
|
+
del: 46,
|
|
24
|
+
backspace: 8,
|
|
25
|
+
insert: 45,
|
|
26
|
+
pageup: 33,
|
|
27
|
+
pagedown: 34,
|
|
28
|
+
shift: 16
|
|
29
|
+
}), Re = Object.freeze({
|
|
30
|
+
hover: "cds-state-hover",
|
|
31
|
+
focus: "cds-state-focus",
|
|
32
|
+
active: "cds-state-active",
|
|
33
|
+
visited: "cds-state-visited",
|
|
34
|
+
disabled: "cds-state-disabled",
|
|
35
|
+
checked: "cds-state-checked",
|
|
36
|
+
indeterminate: "cds-state-indeterminate",
|
|
37
|
+
invalid: "cds-state-invalid",
|
|
38
|
+
empty: "cds-state-empty",
|
|
39
|
+
loading: "cds-state-loading"
|
|
40
|
+
});
|
|
41
|
+
function ke(e) {
|
|
42
|
+
return e !== null && typeof e == "object" && !Array.isArray(e);
|
|
43
|
+
}
|
|
44
|
+
function wt(e = {}, t = {}, n) {
|
|
45
|
+
const s = {};
|
|
46
|
+
for (const o in e)
|
|
47
|
+
s[o] = e[o];
|
|
48
|
+
for (const o in t) {
|
|
49
|
+
const a = e[o], r = t[o];
|
|
50
|
+
if (ke(a) && ke(r)) {
|
|
51
|
+
s[o] = wt(a, r, n);
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
if (Array.isArray(a) && Array.isArray(r) && n) {
|
|
55
|
+
s[o] = n(a, r);
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
s[o] = r;
|
|
59
|
+
}
|
|
60
|
+
return s;
|
|
61
|
+
}
|
|
62
|
+
function Te(e, t, n) {
|
|
63
|
+
const s = t.length - 1;
|
|
64
|
+
if (s < 0)
|
|
65
|
+
return e === void 0 ? n : e;
|
|
66
|
+
for (let o = 0; o < s; o++) {
|
|
67
|
+
if (e == null)
|
|
68
|
+
return n;
|
|
69
|
+
e = e[t[o]];
|
|
70
|
+
}
|
|
71
|
+
return e == null || e[t[s]] === void 0 ? n : e[t[s]];
|
|
72
|
+
}
|
|
73
|
+
function bt(e, t, n) {
|
|
74
|
+
return e == null || !t || typeof t != "string" ? n : e[t] !== void 0 ? e[t] : (t = t.replace(/\[(\w+)\]/g, ".$1"), t = t.replace(/^\./, ""), Te(e, t.split("."), n));
|
|
75
|
+
}
|
|
76
|
+
function W(e, t, n) {
|
|
77
|
+
if (t == null)
|
|
78
|
+
return e === void 0 ? n : e;
|
|
79
|
+
if (e !== Object(e))
|
|
80
|
+
return n;
|
|
81
|
+
if (typeof t == "string")
|
|
82
|
+
return bt(e, t, n);
|
|
83
|
+
if (Array.isArray(t))
|
|
84
|
+
return Te(e, t, n);
|
|
85
|
+
if (typeof t != "function")
|
|
86
|
+
return n;
|
|
87
|
+
const s = t(e, n);
|
|
88
|
+
return typeof s > "u" ? n : s;
|
|
89
|
+
}
|
|
90
|
+
function _t(e, t) {
|
|
91
|
+
const n = /* @__PURE__ */ Object.create(null), s = /* @__PURE__ */ Object.create(null);
|
|
92
|
+
for (const o in e)
|
|
93
|
+
t.some((a) => a instanceof RegExp ? a.test(o) : a === o) ? n[o] = e[o] : s[o] = e[o];
|
|
94
|
+
return [n, s];
|
|
95
|
+
}
|
|
96
|
+
function ee(e, t) {
|
|
97
|
+
const n = ft();
|
|
98
|
+
if (!n)
|
|
99
|
+
throw new Error(`[CDS] ${e} ${t || "must be called from inside a setup function"}`);
|
|
100
|
+
return n;
|
|
101
|
+
}
|
|
102
|
+
function gs(e = "composable") {
|
|
103
|
+
var n;
|
|
104
|
+
const t = ee(e);
|
|
105
|
+
return D(((n = t.type) == null ? void 0 : n.name) || "");
|
|
106
|
+
}
|
|
107
|
+
let je = 0, X = /* @__PURE__ */ new WeakMap();
|
|
108
|
+
function Ge() {
|
|
109
|
+
const e = ee("getUid");
|
|
110
|
+
if (X.has(e))
|
|
111
|
+
return X.get(e);
|
|
112
|
+
{
|
|
113
|
+
const t = je++;
|
|
114
|
+
return X.set(e, t), t;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
Ge.reset = () => {
|
|
118
|
+
je = 0, X = /* @__PURE__ */ new WeakMap();
|
|
119
|
+
};
|
|
120
|
+
const kt = {
|
|
121
|
+
tr: {
|
|
122
|
+
regexp: /\u0130|\u0049|\u0049\u0307/g,
|
|
123
|
+
map: {
|
|
124
|
+
\u0130: "i",
|
|
125
|
+
I: "\u0131",
|
|
126
|
+
I\u0307: "i"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
az: {
|
|
130
|
+
regexp: /\u0130/g,
|
|
131
|
+
map: {
|
|
132
|
+
\u0130: "i",
|
|
133
|
+
I: "\u0131",
|
|
134
|
+
I\u0307: "i"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
lt: {
|
|
138
|
+
regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
|
|
139
|
+
map: {
|
|
140
|
+
I: "i\u0307",
|
|
141
|
+
J: "j\u0307",
|
|
142
|
+
\u012E: "\u012F\u0307",
|
|
143
|
+
\u00CC: "i\u0307\u0300",
|
|
144
|
+
\u00CD: "i\u0307\u0301",
|
|
145
|
+
\u0128: "i\u0307\u0303"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
function ys(e, t) {
|
|
150
|
+
const n = kt[t.toLowerCase()];
|
|
151
|
+
return ie(n ? e.replace(n.regexp, (s) => n.map[s]) : e);
|
|
152
|
+
}
|
|
153
|
+
function ie(e) {
|
|
154
|
+
return e.toLowerCase();
|
|
155
|
+
}
|
|
156
|
+
const St = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], It = /[^A-Z0-9]+/gi;
|
|
157
|
+
function Ve(e, t = {}) {
|
|
158
|
+
const {
|
|
159
|
+
splitRegexp: n = St,
|
|
160
|
+
stripRegexp: s = It,
|
|
161
|
+
transform: o = ie,
|
|
162
|
+
delimiter: a = " "
|
|
163
|
+
} = t, r = Se(Se(e, n, "$1\0$2"), s, "\0");
|
|
164
|
+
let i = 0, d = r.length;
|
|
165
|
+
for (; r.charAt(i) === "\0"; )
|
|
166
|
+
i++;
|
|
167
|
+
for (; r.charAt(d - 1) === "\0"; )
|
|
168
|
+
d--;
|
|
169
|
+
return r.slice(i, d).split("\0").map(o).join(a);
|
|
170
|
+
}
|
|
171
|
+
function Se(e, t, n) {
|
|
172
|
+
return t instanceof RegExp ? e.replace(t, n) : t.reduce((s, o) => s.replace(o, n), e);
|
|
173
|
+
}
|
|
174
|
+
function At(e, t) {
|
|
175
|
+
const n = e.charAt(0), s = e.substr(1).toLowerCase();
|
|
176
|
+
return t > 0 && n >= "0" && n <= "9" ? `_${n}${s}` : `${n.toUpperCase()}${s}`;
|
|
177
|
+
}
|
|
178
|
+
function hs(e) {
|
|
179
|
+
return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
|
|
180
|
+
}
|
|
181
|
+
function Ot(e, t = {}) {
|
|
182
|
+
return Ve(e, {
|
|
183
|
+
delimiter: "",
|
|
184
|
+
transform: At,
|
|
185
|
+
...t
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function D(e, t = {}) {
|
|
189
|
+
return Ve(e, {
|
|
190
|
+
delimiter: "-",
|
|
191
|
+
...t
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
const te = b(
|
|
195
|
+
{
|
|
196
|
+
text: {
|
|
197
|
+
type: String,
|
|
198
|
+
default: void 0
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"text"
|
|
202
|
+
), ne = b(
|
|
203
|
+
{
|
|
204
|
+
href: {
|
|
205
|
+
type: String,
|
|
206
|
+
default: void 0
|
|
207
|
+
},
|
|
208
|
+
to: {
|
|
209
|
+
type: [String, Object],
|
|
210
|
+
default: void 0
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"link"
|
|
214
|
+
);
|
|
215
|
+
function se(e, t) {
|
|
216
|
+
e.to && e.href && me("You cannot use both property to and href");
|
|
217
|
+
const n = P("RouterLink"), s = c(() => !!e.to), o = c(() => !!(e.href || e.to)), a = s.value ? n.useLink(e) : void 0, r = c(() => s.value ? e.to : void 0), i = c(() => s.value ? a == null ? void 0 : a.route.value.href : e.href), d = a && c(() => {
|
|
218
|
+
var l;
|
|
219
|
+
return (l = a.isActive) == null ? void 0 : l.value;
|
|
220
|
+
}), m = c(() => s.value ? "router-link" : "a"), f = (l) => {
|
|
221
|
+
t.emit("click", l), e.disabled && (l.preventDefault(), l.stopPropagation(), l.stopImmediatePropagation());
|
|
222
|
+
};
|
|
223
|
+
return {
|
|
224
|
+
isLink: o,
|
|
225
|
+
isActive: d,
|
|
226
|
+
route: a == null ? void 0 : a.route,
|
|
227
|
+
navigate: a == null ? void 0 : a.navigate,
|
|
228
|
+
to: r,
|
|
229
|
+
href: i,
|
|
230
|
+
tag: m,
|
|
231
|
+
handleClick: f
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
u({ name: "IconAdd" });
|
|
235
|
+
u({ name: "IconAlertFill" });
|
|
236
|
+
u({ name: "IconAlert" });
|
|
237
|
+
u({ name: "IconAnalog" });
|
|
238
|
+
u({ name: "IconArrowDown" });
|
|
239
|
+
u({ name: "IconArrowLeftBottom" });
|
|
240
|
+
u({ name: "IconArrowLeftTop" });
|
|
241
|
+
u({ name: "IconArrowLeft" });
|
|
242
|
+
u({ name: "IconArrowRightBottom" });
|
|
243
|
+
u({ name: "IconArrowRightTop" });
|
|
244
|
+
u({ name: "IconArrowRight" });
|
|
245
|
+
u({ name: "IconArrowUp" });
|
|
246
|
+
u({ name: "IconArrowsVertical" });
|
|
247
|
+
u({ name: "IconCalendar" });
|
|
248
|
+
u({ name: "IconCardBank" });
|
|
249
|
+
u({ name: "IconCategory" });
|
|
250
|
+
u({ name: "IconCheckFill" });
|
|
251
|
+
u({ name: "IconCheck" });
|
|
252
|
+
u({ name: "IconChevronDown" });
|
|
253
|
+
u({ name: "IconChevronLeft" });
|
|
254
|
+
u({ name: "IconChevronRight" });
|
|
255
|
+
u({ name: "IconChevronUp" });
|
|
256
|
+
u({ name: "IconChocolateMenu" });
|
|
257
|
+
u({ name: "IconClock" });
|
|
258
|
+
u({ name: "IconComment" });
|
|
259
|
+
u({ name: "IconCompany" });
|
|
260
|
+
u({ name: "IconCompare" });
|
|
261
|
+
u({ name: "IconCopy" });
|
|
262
|
+
u({ name: "IconDataCards" });
|
|
263
|
+
u({ name: "IconDelete" });
|
|
264
|
+
u({ name: "IconDirectory" });
|
|
265
|
+
u({ name: "IconDocDownload" });
|
|
266
|
+
u({ name: "IconDoc" });
|
|
267
|
+
u({ name: "IconDownload" });
|
|
268
|
+
u({ name: "IconDraggable" });
|
|
269
|
+
u({ name: "IconEdit" });
|
|
270
|
+
u({ name: "IconEnter" });
|
|
271
|
+
u({ name: "IconErrorFill" });
|
|
272
|
+
u({ name: "IconError" });
|
|
273
|
+
u({ name: "IconExternal" });
|
|
274
|
+
u({ name: "IconFacebookFill" });
|
|
275
|
+
u({ name: "IconFacebook" });
|
|
276
|
+
u({ name: "IconFilters" });
|
|
277
|
+
u({ name: "IconFlag" });
|
|
278
|
+
u({ name: "IconGlobe" });
|
|
279
|
+
u({ name: "IconInfinity" });
|
|
280
|
+
u({ name: "IconInfoFill" });
|
|
281
|
+
u({ name: "IconInfo" });
|
|
282
|
+
u({ name: "IconLink" });
|
|
283
|
+
u({ name: "IconListSearch" });
|
|
284
|
+
u({ name: "IconList" });
|
|
285
|
+
u({ name: "IconLoader" });
|
|
286
|
+
u({ name: "IconLocation" });
|
|
287
|
+
u({ name: "IconLocked" });
|
|
288
|
+
u({ name: "IconLogin" });
|
|
289
|
+
u({ name: "IconLogout" });
|
|
290
|
+
u({ name: "IconMenu" });
|
|
291
|
+
u({ name: "IconMinus" });
|
|
292
|
+
u({ name: "IconNotification" });
|
|
293
|
+
u({ name: "IconOverflowMenuHorizontal" });
|
|
294
|
+
u({ name: "IconOverflowMenuVertical" });
|
|
295
|
+
u({ name: "IconPassword" });
|
|
296
|
+
u({ name: "IconPin" });
|
|
297
|
+
u({ name: "IconPlus" });
|
|
298
|
+
u({ name: "IconPrinter" });
|
|
299
|
+
u({ name: "IconQuestionFill" });
|
|
300
|
+
u({ name: "IconQuestion" });
|
|
301
|
+
u({ name: "IconRefresh" });
|
|
302
|
+
u({ name: "IconRemove" });
|
|
303
|
+
u({ name: "IconSandglass" });
|
|
304
|
+
u({ name: "IconSearch" });
|
|
305
|
+
u({ name: "IconSettings" });
|
|
306
|
+
u({ name: "IconShoppingCart" });
|
|
307
|
+
u({ name: "IconSortDate" });
|
|
308
|
+
u({ name: "IconStarFill" });
|
|
309
|
+
u({ name: "IconStar" });
|
|
310
|
+
u({ name: "IconTelegram" });
|
|
311
|
+
u({ name: "IconTimer" });
|
|
312
|
+
u({ name: "IconTool" });
|
|
313
|
+
u({ name: "IconTruck" });
|
|
314
|
+
u({ name: "IconUnlocked" });
|
|
315
|
+
u({ name: "IconUpload" });
|
|
316
|
+
u({ name: "IconUserAvatar" });
|
|
317
|
+
u({ name: "IconUserGroup" });
|
|
318
|
+
u({ name: "IconVisibilityOff" });
|
|
319
|
+
u({ name: "IconVisibilityOn" });
|
|
320
|
+
u({ name: "IconVk" });
|
|
321
|
+
u({ name: "IconWinner" });
|
|
322
|
+
u({ name: "IconWorkspace" });
|
|
323
|
+
u({ name: "IconYoutube" });
|
|
324
|
+
const ce = [
|
|
325
|
+
"add",
|
|
326
|
+
"alert-fill",
|
|
327
|
+
"alert",
|
|
328
|
+
"analog",
|
|
329
|
+
"arrow-down",
|
|
330
|
+
"arrow-left-bottom",
|
|
331
|
+
"arrow-left-top",
|
|
332
|
+
"arrow-left",
|
|
333
|
+
"arrow-right-bottom",
|
|
334
|
+
"arrow-right-top",
|
|
335
|
+
"arrow-right",
|
|
336
|
+
"arrow-up",
|
|
337
|
+
"arrows-vertical",
|
|
338
|
+
"calendar",
|
|
339
|
+
"card-bank",
|
|
340
|
+
"category",
|
|
341
|
+
"check-fill",
|
|
342
|
+
"check",
|
|
343
|
+
"chevron-down",
|
|
344
|
+
"chevron-left",
|
|
345
|
+
"chevron-right",
|
|
346
|
+
"chevron-up",
|
|
347
|
+
"chocolate-menu",
|
|
348
|
+
"clock",
|
|
349
|
+
"comment",
|
|
350
|
+
"company",
|
|
351
|
+
"compare",
|
|
352
|
+
"copy",
|
|
353
|
+
"data-cards",
|
|
354
|
+
"delete",
|
|
355
|
+
"directory",
|
|
356
|
+
"doc-download",
|
|
357
|
+
"doc",
|
|
358
|
+
"download",
|
|
359
|
+
"draggable",
|
|
360
|
+
"edit",
|
|
361
|
+
"enter",
|
|
362
|
+
"error-fill",
|
|
363
|
+
"error",
|
|
364
|
+
"external",
|
|
365
|
+
"facebook-fill",
|
|
366
|
+
"facebook",
|
|
367
|
+
"filters",
|
|
368
|
+
"flag",
|
|
369
|
+
"globe",
|
|
370
|
+
"infinity",
|
|
371
|
+
"info-fill",
|
|
372
|
+
"info",
|
|
373
|
+
"link",
|
|
374
|
+
"list-search",
|
|
375
|
+
"list",
|
|
376
|
+
"loader",
|
|
377
|
+
"location",
|
|
378
|
+
"locked",
|
|
379
|
+
"login",
|
|
380
|
+
"logout",
|
|
381
|
+
"menu",
|
|
382
|
+
"minus",
|
|
383
|
+
"notification",
|
|
384
|
+
"overflow-menu-horizontal",
|
|
385
|
+
"overflow-menu-vertical",
|
|
386
|
+
"password",
|
|
387
|
+
"pin",
|
|
388
|
+
"plus",
|
|
389
|
+
"printer",
|
|
390
|
+
"question-fill",
|
|
391
|
+
"question",
|
|
392
|
+
"refresh",
|
|
393
|
+
"remove",
|
|
394
|
+
"sandglass",
|
|
395
|
+
"search",
|
|
396
|
+
"settings",
|
|
397
|
+
"shopping-cart",
|
|
398
|
+
"sort-date",
|
|
399
|
+
"star-fill",
|
|
400
|
+
"star",
|
|
401
|
+
"telegram",
|
|
402
|
+
"timer",
|
|
403
|
+
"tool",
|
|
404
|
+
"truck",
|
|
405
|
+
"unlocked",
|
|
406
|
+
"upload",
|
|
407
|
+
"user-avatar",
|
|
408
|
+
"user-group",
|
|
409
|
+
"visibility-off",
|
|
410
|
+
"visibility-on",
|
|
411
|
+
"vk",
|
|
412
|
+
"winner",
|
|
413
|
+
"workspace",
|
|
414
|
+
"youtube"
|
|
415
|
+
], Ue = b(
|
|
416
|
+
{
|
|
417
|
+
prependIcon: {
|
|
418
|
+
type: String,
|
|
419
|
+
default: void 0,
|
|
420
|
+
validator: (e) => ce.includes(e)
|
|
421
|
+
},
|
|
422
|
+
appendIcon: {
|
|
423
|
+
type: String,
|
|
424
|
+
default: void 0,
|
|
425
|
+
validator: (e) => ce.includes(e)
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
"icon"
|
|
429
|
+
);
|
|
430
|
+
function qe(e, t) {
|
|
431
|
+
const n = c(() => !!t.slots.prepend || !!e.prependIcon), s = c(() => !!t.slots.append || !!e.appendIcon);
|
|
432
|
+
return {
|
|
433
|
+
hasPrepend: n,
|
|
434
|
+
hasAppend: s
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
const Bt = b(
|
|
438
|
+
{
|
|
439
|
+
loading: {
|
|
440
|
+
type: Boolean,
|
|
441
|
+
default: !1
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
"loading"
|
|
445
|
+
);
|
|
446
|
+
function Lt(e) {
|
|
447
|
+
return { loadingClasses: c(() => {
|
|
448
|
+
const { loading: n } = G(e);
|
|
449
|
+
return n ? Re.loading : void 0;
|
|
450
|
+
}) };
|
|
451
|
+
}
|
|
452
|
+
const Ie = ["primary", "secondary", "transparent"], Ke = b(
|
|
453
|
+
{
|
|
454
|
+
appearance: {
|
|
455
|
+
type: String,
|
|
456
|
+
default: "primary",
|
|
457
|
+
available: Ie,
|
|
458
|
+
validator: (e) => Ie.includes(e)
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"appearance"
|
|
462
|
+
);
|
|
463
|
+
function He(e, t) {
|
|
464
|
+
return { appearanceClasses: c(() => {
|
|
465
|
+
const { appearance: s } = G(e);
|
|
466
|
+
return `${D(t)}__appearance--${s}`;
|
|
467
|
+
}) };
|
|
468
|
+
}
|
|
469
|
+
const Ae = ["xs", "sm", "md", "lg", "xl"], V = b(
|
|
470
|
+
{
|
|
471
|
+
size: {
|
|
472
|
+
type: String,
|
|
473
|
+
default: "md",
|
|
474
|
+
available: Ae,
|
|
475
|
+
validator: (e) => Ae.includes(e)
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"size"
|
|
479
|
+
);
|
|
480
|
+
function U(e, t) {
|
|
481
|
+
return { sizeClasses: c(() => {
|
|
482
|
+
const { size: s } = G(e);
|
|
483
|
+
return `${D(t)}__size--${s}`;
|
|
484
|
+
}) };
|
|
485
|
+
}
|
|
486
|
+
const q = b(
|
|
487
|
+
{
|
|
488
|
+
disabled: {
|
|
489
|
+
type: Boolean,
|
|
490
|
+
default: !1
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
"disabled"
|
|
494
|
+
);
|
|
495
|
+
function K(e) {
|
|
496
|
+
return { disabledClasses: c(() => {
|
|
497
|
+
const { disabled: n } = G(e);
|
|
498
|
+
return n ? Re.disabled : void 0;
|
|
499
|
+
}) };
|
|
500
|
+
}
|
|
501
|
+
const oe = b(
|
|
502
|
+
{
|
|
503
|
+
dark: {
|
|
504
|
+
type: Boolean,
|
|
505
|
+
default: !1
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
"dark"
|
|
509
|
+
);
|
|
510
|
+
function ae(e, t) {
|
|
511
|
+
return { darkClasses: c(() => {
|
|
512
|
+
const { dark: s } = G(e);
|
|
513
|
+
return s ? `${D(t)}--dark` : void 0;
|
|
514
|
+
}) };
|
|
515
|
+
}
|
|
516
|
+
const Oe = ["yellow", "light-blue", "blue", "deep-purple", "purple", "pink"], Pt = b(
|
|
517
|
+
{
|
|
518
|
+
color: {
|
|
519
|
+
type: String,
|
|
520
|
+
available: Oe,
|
|
521
|
+
default: void 0,
|
|
522
|
+
description: "\u0426\u0432\u0435\u0442",
|
|
523
|
+
validator: (e) => Oe.includes(e)
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"color"
|
|
527
|
+
);
|
|
528
|
+
function Et(e, t) {
|
|
529
|
+
return { colorClasses: c(() => {
|
|
530
|
+
const { color: s } = e;
|
|
531
|
+
if (!!s)
|
|
532
|
+
return `${D(t)}__color--${s}`;
|
|
533
|
+
}) };
|
|
534
|
+
}
|
|
535
|
+
const Be = ["info", "success", "warning", "error", "progress"], Dt = b(
|
|
536
|
+
{
|
|
537
|
+
status: {
|
|
538
|
+
type: String,
|
|
539
|
+
default: "info",
|
|
540
|
+
available: Be,
|
|
541
|
+
description: "\u0421\u0442\u0430\u0442\u0443\u0441",
|
|
542
|
+
validator: (e) => Be.includes(e)
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
"status"
|
|
546
|
+
);
|
|
547
|
+
function Nt(e, t) {
|
|
548
|
+
return { statusClasses: c(() => {
|
|
549
|
+
const { status: s } = e;
|
|
550
|
+
return `${D(t)}__status--${s}`;
|
|
551
|
+
}) };
|
|
552
|
+
}
|
|
553
|
+
const N = b(
|
|
554
|
+
{
|
|
555
|
+
tag: {
|
|
556
|
+
type: String,
|
|
557
|
+
default: "div",
|
|
558
|
+
description: "\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F"
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
"tag"
|
|
562
|
+
), Ft = b(
|
|
563
|
+
{
|
|
564
|
+
items: {
|
|
565
|
+
type: Array,
|
|
566
|
+
default: () => []
|
|
567
|
+
},
|
|
568
|
+
itemTitle: {
|
|
569
|
+
type: [String, Array, Function],
|
|
570
|
+
default: "title"
|
|
571
|
+
},
|
|
572
|
+
itemValue: {
|
|
573
|
+
type: [String, Array, Function],
|
|
574
|
+
default: "value"
|
|
575
|
+
},
|
|
576
|
+
itemChildren: {
|
|
577
|
+
type: [Boolean, String, Array, Function],
|
|
578
|
+
default: "children"
|
|
579
|
+
},
|
|
580
|
+
itemProps: {
|
|
581
|
+
type: [Boolean, String, Array, Function],
|
|
582
|
+
default: "props"
|
|
583
|
+
},
|
|
584
|
+
returnObject: {
|
|
585
|
+
type: Boolean,
|
|
586
|
+
default: !1
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
"items"
|
|
590
|
+
);
|
|
591
|
+
function zt(e) {
|
|
592
|
+
return { items: c(() => We(e, e.items)) };
|
|
593
|
+
}
|
|
594
|
+
function Mt(e, t) {
|
|
595
|
+
var i;
|
|
596
|
+
const n = W(t, e.itemTitle, t), s = e.returnObject ? t : W(t, e.itemValue, n), o = W(t, e.itemChildren), a = e.itemProps === !0 ? typeof t == "object" && t != null && !Array.isArray(t) ? "children" in t ? _t(t, ["children"])[1] : t : void 0 : W(t, e.itemProps), r = {
|
|
597
|
+
title: n,
|
|
598
|
+
value: s,
|
|
599
|
+
...a
|
|
600
|
+
};
|
|
601
|
+
return {
|
|
602
|
+
title: String((i = r.title) != null ? i : ""),
|
|
603
|
+
value: r.value,
|
|
604
|
+
props: r,
|
|
605
|
+
children: Array.isArray(o) ? We(e, o) : void 0,
|
|
606
|
+
raw: t
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
function We(e, t) {
|
|
610
|
+
const n = [];
|
|
611
|
+
for (const s of t)
|
|
612
|
+
n.push(Mt(e, s));
|
|
613
|
+
return n;
|
|
614
|
+
}
|
|
615
|
+
function Rt() {
|
|
616
|
+
const e = _(null), t = _(!1);
|
|
617
|
+
function n() {
|
|
618
|
+
t.value = !0;
|
|
619
|
+
}
|
|
620
|
+
function s() {
|
|
621
|
+
t.value = !1;
|
|
622
|
+
}
|
|
623
|
+
function o(i) {
|
|
624
|
+
var d;
|
|
625
|
+
!t.value && !i.relatedTarget && ((d = e.value) == null ? void 0 : d.contains(i.relatedTarget)) && r();
|
|
626
|
+
}
|
|
627
|
+
function a(i) {
|
|
628
|
+
if (!!e.value) {
|
|
629
|
+
switch (i.key) {
|
|
630
|
+
case "ArrowDown":
|
|
631
|
+
r("next");
|
|
632
|
+
break;
|
|
633
|
+
case "ArrowUp":
|
|
634
|
+
r("previous");
|
|
635
|
+
break;
|
|
636
|
+
case "Home":
|
|
637
|
+
r("first");
|
|
638
|
+
break;
|
|
639
|
+
case "End":
|
|
640
|
+
r("last");
|
|
641
|
+
break;
|
|
642
|
+
default:
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
i.preventDefault();
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
function r(i) {
|
|
649
|
+
var f, l, p;
|
|
650
|
+
if (!e.value)
|
|
651
|
+
return;
|
|
652
|
+
const d = [
|
|
653
|
+
...e.value.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')
|
|
654
|
+
].filter((v) => !v.hasAttribute("disabled")), m = d.indexOf(document.activeElement);
|
|
655
|
+
if (!i)
|
|
656
|
+
e.value.contains(document.activeElement) || (f = d[0]) == null || f.focus();
|
|
657
|
+
else if (i === "first")
|
|
658
|
+
(l = d[0]) == null || l.focus();
|
|
659
|
+
else if (i === "last")
|
|
660
|
+
(p = d.at(-1)) == null || p.focus();
|
|
661
|
+
else {
|
|
662
|
+
let v, y = m;
|
|
663
|
+
const S = i === "next" ? 1 : -1;
|
|
664
|
+
do
|
|
665
|
+
y += S, v = d[y];
|
|
666
|
+
while ((!v || v.offsetParent == null) && y < d.length && y >= 0);
|
|
667
|
+
v ? v.focus() : r(i === "next" ? "first" : "last");
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
return { contentRef: e, isFocused: t, onFocus: o, onFocusin: n, onFocusout: s, onKeydown: a, focus: r };
|
|
671
|
+
}
|
|
672
|
+
function Tt(e, t) {
|
|
673
|
+
let n;
|
|
674
|
+
function s() {
|
|
675
|
+
n = mt(), n.run(
|
|
676
|
+
() => t.length ? t(() => {
|
|
677
|
+
n == null || n.stop(), s();
|
|
678
|
+
}) : t()
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
Y(
|
|
682
|
+
e,
|
|
683
|
+
(o) => {
|
|
684
|
+
o && !n ? s() : o || (n == null || n.stop(), n = void 0);
|
|
685
|
+
},
|
|
686
|
+
{ immediate: !0 }
|
|
687
|
+
), pt(() => {
|
|
688
|
+
n == null || n.stop();
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
function de(e, t, n, s = (a) => a, o = (a) => a) {
|
|
692
|
+
const a = ee("useProxyModel"), r = _(e[t] !== "undefined" ? e[t] : n), i = D(t), m = i !== t ? c(() => (e[t], (Object.hasOwn(a.vnode.props || {}, t) || Object.hasOwn(a.vnode.props || {}, i)) && (Object.hasOwn(a.vnode.props || {}, `onUpdate:${t}`) || Object.hasOwn(a.vnode.props || {}, `onUpdate:${i}`)))) : c(() => (e[t], Object.hasOwn(a.vnode.props || {}, t) && Object.hasOwn(a.vnode.props || {}, `onUpdate:${t}`)));
|
|
693
|
+
Tt(
|
|
694
|
+
() => !m.value,
|
|
695
|
+
() => {
|
|
696
|
+
Y(
|
|
697
|
+
() => e[t],
|
|
698
|
+
(l) => {
|
|
699
|
+
r.value = l;
|
|
700
|
+
}
|
|
701
|
+
);
|
|
702
|
+
}
|
|
703
|
+
);
|
|
704
|
+
const f = c({
|
|
705
|
+
get() {
|
|
706
|
+
return s(m.value ? e[t] : r.value);
|
|
707
|
+
},
|
|
708
|
+
set(l) {
|
|
709
|
+
const p = o(l);
|
|
710
|
+
(m.value ? e[t] : r.value) === p || s(m.value ? e[t] : r.value) === l || (r.value = p, a == null || a.emit(`update:${t}`, p));
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
return Object.defineProperty(f, "externalValue", {
|
|
714
|
+
get: () => m.value ? e[t] : r.value
|
|
715
|
+
}), f;
|
|
716
|
+
}
|
|
717
|
+
const ge = (e) => {
|
|
718
|
+
const t = {
|
|
719
|
+
select: ({ id: n, value: s, selected: o }) => {
|
|
720
|
+
if (e && !s) {
|
|
721
|
+
const a = Array.from(o.entries()).reduce(
|
|
722
|
+
(r, [i, d]) => d === "on" ? [...r, i] : r,
|
|
723
|
+
[]
|
|
724
|
+
);
|
|
725
|
+
if (a.length === 1 && a[0] === n)
|
|
726
|
+
return o;
|
|
727
|
+
}
|
|
728
|
+
return o.set(n, s ? "on" : "off"), o;
|
|
729
|
+
},
|
|
730
|
+
in: (n, s, o) => {
|
|
731
|
+
let a = /* @__PURE__ */ new Map();
|
|
732
|
+
for (const r of n || [])
|
|
733
|
+
a = t.select({
|
|
734
|
+
id: r,
|
|
735
|
+
value: !0,
|
|
736
|
+
selected: new Map(a),
|
|
737
|
+
children: s,
|
|
738
|
+
parents: o
|
|
739
|
+
});
|
|
740
|
+
return a;
|
|
741
|
+
},
|
|
742
|
+
out: (n) => {
|
|
743
|
+
const s = [];
|
|
744
|
+
for (const [o, a] of n.entries())
|
|
745
|
+
a === "on" && s.push(o);
|
|
746
|
+
return s;
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
return t;
|
|
750
|
+
}, Ze = (e) => {
|
|
751
|
+
const t = ge(e);
|
|
752
|
+
return {
|
|
753
|
+
select: ({ selected: n, id: s, ...o }) => {
|
|
754
|
+
const a = n.has(s) ? /* @__PURE__ */ new Map([[s, n.get(s)]]) : /* @__PURE__ */ new Map();
|
|
755
|
+
return t.select({ ...o, id: s, selected: a });
|
|
756
|
+
},
|
|
757
|
+
in: (n, s, o) => {
|
|
758
|
+
let a = /* @__PURE__ */ new Map();
|
|
759
|
+
return n != null && n.length && (a = t.in(n.slice(0, 1), s, o)), a;
|
|
760
|
+
},
|
|
761
|
+
out: (n, s, o) => t.out(n, s, o)
|
|
762
|
+
};
|
|
763
|
+
}, jt = (e) => {
|
|
764
|
+
const t = ge(e);
|
|
765
|
+
return {
|
|
766
|
+
select: ({ id: n, selected: s, children: o, ...a }) => o.has(n) ? s : t.select({ id: n, selected: s, children: o, ...a }),
|
|
767
|
+
in: t.in,
|
|
768
|
+
out: t.out
|
|
769
|
+
};
|
|
770
|
+
}, Gt = (e) => {
|
|
771
|
+
const t = Ze(e);
|
|
772
|
+
return {
|
|
773
|
+
select: ({ id: n, selected: s, children: o, ...a }) => o.has(n) ? s : t.select({ id: n, selected: s, children: o, ...a }),
|
|
774
|
+
in: t.in,
|
|
775
|
+
out: t.out
|
|
776
|
+
};
|
|
777
|
+
}, Vt = (e) => {
|
|
778
|
+
const t = {
|
|
779
|
+
select: ({ id: n, value: s, selected: o, children: a, parents: r }) => {
|
|
780
|
+
const i = new Map(o), d = [n];
|
|
781
|
+
for (; d.length; ) {
|
|
782
|
+
const f = d.shift();
|
|
783
|
+
o.set(f, s ? "on" : "off"), a.has(f) && d.push(...a.get(f));
|
|
784
|
+
}
|
|
785
|
+
let m = r.get(n);
|
|
786
|
+
for (; m; ) {
|
|
787
|
+
const f = a.get(m), l = f.every((v) => o.get(v) === "on"), p = f.every((v) => !o.has(v) || o.get(v) === "off");
|
|
788
|
+
o.set(m, l ? "on" : p ? "off" : "indeterminate"), m = r.get(m);
|
|
789
|
+
}
|
|
790
|
+
return e && !s && Array.from(o.entries()).reduce(
|
|
791
|
+
(l, [p, v]) => v === "on" ? [...l, p] : l,
|
|
792
|
+
[]
|
|
793
|
+
).length === 0 ? i : o;
|
|
794
|
+
},
|
|
795
|
+
in: (n, s, o) => {
|
|
796
|
+
let a = /* @__PURE__ */ new Map();
|
|
797
|
+
for (const r of n || [])
|
|
798
|
+
a = t.select({
|
|
799
|
+
id: r,
|
|
800
|
+
value: !0,
|
|
801
|
+
selected: new Map(a),
|
|
802
|
+
children: s,
|
|
803
|
+
parents: o
|
|
804
|
+
});
|
|
805
|
+
return a;
|
|
806
|
+
},
|
|
807
|
+
out: (n, s) => {
|
|
808
|
+
const o = [];
|
|
809
|
+
for (const [a, r] of n.entries())
|
|
810
|
+
r === "on" && !s.has(a) && o.push(a);
|
|
811
|
+
return o;
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
return t;
|
|
815
|
+
}, Ut = {
|
|
816
|
+
open: ({ id: e, value: t, opened: n, parents: s }) => {
|
|
817
|
+
if (t) {
|
|
818
|
+
const o = /* @__PURE__ */ new Set();
|
|
819
|
+
o.add(e);
|
|
820
|
+
let a = s.get(e);
|
|
821
|
+
for (; a != null; )
|
|
822
|
+
o.add(a), a = s.get(a);
|
|
823
|
+
return o;
|
|
824
|
+
} else
|
|
825
|
+
return n.delete(e), n;
|
|
826
|
+
},
|
|
827
|
+
select: () => null
|
|
828
|
+
}, Je = {
|
|
829
|
+
open: ({ id: e, value: t, opened: n, parents: s }) => {
|
|
830
|
+
if (t) {
|
|
831
|
+
let o = s.get(e);
|
|
832
|
+
for (n.add(e); o != null && o !== e; )
|
|
833
|
+
n.add(o), o = s.get(o);
|
|
834
|
+
return n;
|
|
835
|
+
} else
|
|
836
|
+
n.delete(e);
|
|
837
|
+
return n;
|
|
838
|
+
},
|
|
839
|
+
select: () => null
|
|
840
|
+
}, qt = {
|
|
841
|
+
open: Je.open,
|
|
842
|
+
select: ({ id: e, value: t, opened: n, parents: s }) => {
|
|
843
|
+
if (!t)
|
|
844
|
+
return n;
|
|
845
|
+
const o = [];
|
|
846
|
+
let a = s.get(e);
|
|
847
|
+
for (; a != null; )
|
|
848
|
+
o.push(a), a = s.get(a);
|
|
849
|
+
return new Set(o);
|
|
850
|
+
}
|
|
851
|
+
}, j = Symbol.for("cds:nested"), Qe = {
|
|
852
|
+
id: _(),
|
|
853
|
+
root: {
|
|
854
|
+
children: _(/* @__PURE__ */ new Map()),
|
|
855
|
+
parents: _(/* @__PURE__ */ new Map()),
|
|
856
|
+
opened: _(/* @__PURE__ */ new Set()),
|
|
857
|
+
selected: _(/* @__PURE__ */ new Map()),
|
|
858
|
+
selectedValues: _([]),
|
|
859
|
+
register: () => null,
|
|
860
|
+
unregister: () => null,
|
|
861
|
+
open: () => null,
|
|
862
|
+
openOnSelect: () => null,
|
|
863
|
+
select: () => null
|
|
864
|
+
}
|
|
865
|
+
}, Kt = b(
|
|
866
|
+
{
|
|
867
|
+
selectStrategy: [String, Function],
|
|
868
|
+
openStrategy: [String, Function],
|
|
869
|
+
opened: Array,
|
|
870
|
+
selected: Array,
|
|
871
|
+
required: Boolean
|
|
872
|
+
},
|
|
873
|
+
"nested"
|
|
874
|
+
), Ht = (e, t) => {
|
|
875
|
+
let n = !1;
|
|
876
|
+
const s = _(/* @__PURE__ */ new Map()), o = _(/* @__PURE__ */ new Map()), a = de(
|
|
877
|
+
e,
|
|
878
|
+
"opened",
|
|
879
|
+
e.opened,
|
|
880
|
+
(l) => new Set(l),
|
|
881
|
+
(l) => [...l.values()]
|
|
882
|
+
), r = c(() => {
|
|
883
|
+
if (typeof e.selectStrategy == "object")
|
|
884
|
+
return e.selectStrategy;
|
|
885
|
+
switch (e.selectStrategy) {
|
|
886
|
+
case "single-leaf":
|
|
887
|
+
return Gt(e.required);
|
|
888
|
+
case "leaf":
|
|
889
|
+
return jt(e.required);
|
|
890
|
+
case "independent":
|
|
891
|
+
return ge(e.required);
|
|
892
|
+
case "single-independent":
|
|
893
|
+
return Ze(e.required);
|
|
894
|
+
default:
|
|
895
|
+
return Vt(e.required);
|
|
896
|
+
}
|
|
897
|
+
}), i = c(() => {
|
|
898
|
+
if (typeof e.openStrategy == "object")
|
|
899
|
+
return e.openStrategy;
|
|
900
|
+
switch (e.openStrategy) {
|
|
901
|
+
case "list":
|
|
902
|
+
return qt;
|
|
903
|
+
case "single":
|
|
904
|
+
return Ut;
|
|
905
|
+
case "multiple":
|
|
906
|
+
default:
|
|
907
|
+
return Je;
|
|
908
|
+
}
|
|
909
|
+
}), d = de(
|
|
910
|
+
e,
|
|
911
|
+
"selected",
|
|
912
|
+
e.selected,
|
|
913
|
+
(l) => r.value.in(l, s.value, o.value),
|
|
914
|
+
(l) => r.value.out(l, s.value, o.value)
|
|
915
|
+
);
|
|
916
|
+
Ne(() => {
|
|
917
|
+
n = !0;
|
|
918
|
+
});
|
|
919
|
+
function m(l) {
|
|
920
|
+
const p = [];
|
|
921
|
+
let v = l;
|
|
922
|
+
for (; v != null; )
|
|
923
|
+
p.unshift(v), v = o.value.get(v);
|
|
924
|
+
return p;
|
|
925
|
+
}
|
|
926
|
+
const f = {
|
|
927
|
+
id: _(),
|
|
928
|
+
root: {
|
|
929
|
+
children: s,
|
|
930
|
+
parents: o,
|
|
931
|
+
opened: a,
|
|
932
|
+
selected: d,
|
|
933
|
+
selectedValues: c(() => {
|
|
934
|
+
const l = [];
|
|
935
|
+
for (const [p, v] of d.value.entries())
|
|
936
|
+
v === "on" && l.push(p);
|
|
937
|
+
return l;
|
|
938
|
+
}),
|
|
939
|
+
register: (l, p, v) => {
|
|
940
|
+
p && l !== p && o.value.set(l, p), v && s.value.set(l, []), p != null && s.value.set(p, [...s.value.get(p) || [], l]);
|
|
941
|
+
},
|
|
942
|
+
unregister: (l) => {
|
|
943
|
+
var v;
|
|
944
|
+
if (n)
|
|
945
|
+
return;
|
|
946
|
+
s.value.delete(l);
|
|
947
|
+
const p = o.value.get(l);
|
|
948
|
+
if (p) {
|
|
949
|
+
const y = (v = s.value.get(p)) != null ? v : [];
|
|
950
|
+
s.value.set(
|
|
951
|
+
p,
|
|
952
|
+
y.filter((S) => S !== l)
|
|
953
|
+
), o.value.delete(l), a.value.delete(l);
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
open: (l, p, v) => {
|
|
957
|
+
t.emit("click:open", { id: l, value: p, path: m(l), event: v });
|
|
958
|
+
const y = i.value.open({
|
|
959
|
+
id: l,
|
|
960
|
+
value: p,
|
|
961
|
+
opened: new Set(a.value),
|
|
962
|
+
children: s.value,
|
|
963
|
+
parents: o.value,
|
|
964
|
+
event: v
|
|
965
|
+
});
|
|
966
|
+
y && (a.value = y);
|
|
967
|
+
},
|
|
968
|
+
openOnSelect: (l, p, v) => {
|
|
969
|
+
const y = i.value.select({
|
|
970
|
+
id: l,
|
|
971
|
+
value: p,
|
|
972
|
+
selected: new Map(d.value),
|
|
973
|
+
opened: new Set(a.value),
|
|
974
|
+
children: s.value,
|
|
975
|
+
parents: o.value,
|
|
976
|
+
event: v
|
|
977
|
+
});
|
|
978
|
+
y && (a.value = y);
|
|
979
|
+
},
|
|
980
|
+
select: (l, p, v) => {
|
|
981
|
+
t.emit("click:select", { id: l, value: p, path: m(l), event: v });
|
|
982
|
+
const y = r.value.select({
|
|
983
|
+
id: l,
|
|
984
|
+
value: p,
|
|
985
|
+
selected: new Map(d.value),
|
|
986
|
+
children: s.value,
|
|
987
|
+
parents: o.value,
|
|
988
|
+
event: v
|
|
989
|
+
});
|
|
990
|
+
y && (d.value = y), f.root.openOnSelect(l, p, v);
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
return x(j, f), f.root;
|
|
995
|
+
}, Xe = (e, t) => {
|
|
996
|
+
const n = R(j, Qe), s = c(() => {
|
|
997
|
+
var a;
|
|
998
|
+
return (a = e.value) != null ? a : Ge();
|
|
999
|
+
}), o = {
|
|
1000
|
+
...n,
|
|
1001
|
+
id: s,
|
|
1002
|
+
open: (a, r) => n.root.open(s.value, a, r),
|
|
1003
|
+
openOnSelect: (a, r) => n.root.openOnSelect(s.value, a, r),
|
|
1004
|
+
isOpen: c(() => n.root.opened.value.has(s.value)),
|
|
1005
|
+
parent: c(() => n.root.parents.value.get(s.value)),
|
|
1006
|
+
select: (a, r) => n.root.select(s.value, a, r),
|
|
1007
|
+
isSelected: c(() => n.root.selected.value.get(s.value) === "on"),
|
|
1008
|
+
isIndeterminate: c(() => n.root.selected.value.get(s.value) === "indeterminate"),
|
|
1009
|
+
isLeaf: c(() => !n.root.children.value.get(s.value)),
|
|
1010
|
+
isGroupActivator: n.isGroupActivator
|
|
1011
|
+
};
|
|
1012
|
+
return !n.isGroupActivator && n.root.register(s.value, n.id.value, t), Ne(() => {
|
|
1013
|
+
!n.isGroupActivator && n.root.unregister(s.value);
|
|
1014
|
+
}), t && x(j, o), o;
|
|
1015
|
+
}, Wt = () => {
|
|
1016
|
+
const e = R(j, Qe);
|
|
1017
|
+
x(j, { ...e, isGroupActivator: !0 });
|
|
1018
|
+
};
|
|
1019
|
+
function Zt(e) {
|
|
1020
|
+
const t = ee("useRender");
|
|
1021
|
+
t.render = e;
|
|
1022
|
+
}
|
|
1023
|
+
const Le = "CdsBadge", Jt = u({
|
|
1024
|
+
name: Le,
|
|
1025
|
+
props: {
|
|
1026
|
+
count: {
|
|
1027
|
+
type: Number,
|
|
1028
|
+
required: !0,
|
|
1029
|
+
default: 0,
|
|
1030
|
+
description: "\u0427\u0438\u0441\u043B\u043E \u0434\u043B\u044F \u0441\u0447\u0435\u0442\u0447\u0438\u043A\u0430"
|
|
1031
|
+
},
|
|
1032
|
+
...oe()
|
|
1033
|
+
},
|
|
1034
|
+
setup(e) {
|
|
1035
|
+
const { darkClasses: t } = ae(e, Le);
|
|
1036
|
+
return { adjustedCount: c(() => e.count < 99 && e.count > -99 ? e.count : e.count < -99 ? "-99" : "99+"), darkClasses: t };
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
const I = (e, t) => {
|
|
1040
|
+
const n = e.__vccOpts || e;
|
|
1041
|
+
for (const [s, o] of t)
|
|
1042
|
+
n[s] = o;
|
|
1043
|
+
return n;
|
|
1044
|
+
};
|
|
1045
|
+
function Qt(e, t, n, s, o, a) {
|
|
1046
|
+
return g(), C("span", {
|
|
1047
|
+
class: O(["cds-badge", e.darkClasses])
|
|
1048
|
+
}, L(e.adjustedCount), 3);
|
|
1049
|
+
}
|
|
1050
|
+
const Xt = /* @__PURE__ */ I(Jt, [["render", Qt]]), Pe = "CdsLoader", Yt = u({
|
|
1051
|
+
name: Pe,
|
|
1052
|
+
props: {
|
|
1053
|
+
fixed: {
|
|
1054
|
+
type: Boolean,
|
|
1055
|
+
default: !1,
|
|
1056
|
+
description: "\u0417\u0430\u0444\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043A \u043E\u0442\u043D\u043E\u0441\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0430"
|
|
1057
|
+
},
|
|
1058
|
+
overlay: {
|
|
1059
|
+
type: Boolean,
|
|
1060
|
+
default: !1,
|
|
1061
|
+
description: "\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u0444\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u044B\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043A"
|
|
1062
|
+
},
|
|
1063
|
+
description: {
|
|
1064
|
+
type: String,
|
|
1065
|
+
default: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430",
|
|
1066
|
+
description: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435, \u043A\u043E\u0442\u043E\u0440\u043E\u0435 \u043B\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043E \u043E\u043F\u0438\u0441\u044B\u0432\u0430\u0435\u0442 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438"
|
|
1067
|
+
},
|
|
1068
|
+
...V()
|
|
1069
|
+
},
|
|
1070
|
+
setup(e, { attrs: t }) {
|
|
1071
|
+
const { sizeClasses: n } = U(e, Pe), s = c(() => ({
|
|
1072
|
+
"cds-loader__overlay": e.overlay,
|
|
1073
|
+
"cds-loader__fixed": e.fixed
|
|
1074
|
+
}));
|
|
1075
|
+
return { attrs: t, loaderClasses: s, sizeClasses: n };
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
const xt = ["aria-valuetext", "aria-label"], en = /* @__PURE__ */ E("svg", { viewBox: "0 0 24 24" }, [
|
|
1079
|
+
/* @__PURE__ */ E("circle", {
|
|
1080
|
+
cx: "12",
|
|
1081
|
+
cy: "12",
|
|
1082
|
+
r: "10.5"
|
|
1083
|
+
})
|
|
1084
|
+
], -1), tn = [
|
|
1085
|
+
en
|
|
1086
|
+
];
|
|
1087
|
+
function nn(e, t, n, s, o, a) {
|
|
1088
|
+
return g(), C("div", {
|
|
1089
|
+
class: O(["", e.loaderClasses])
|
|
1090
|
+
}, [
|
|
1091
|
+
E("div", Fe({
|
|
1092
|
+
role: "progressbar",
|
|
1093
|
+
"aria-valuetext": e.description,
|
|
1094
|
+
"aria-label": e.description,
|
|
1095
|
+
class: ["cds-loader", e.sizeClasses]
|
|
1096
|
+
}, e.attrs), tn, 16, xt)
|
|
1097
|
+
], 2);
|
|
1098
|
+
}
|
|
1099
|
+
const Ye = /* @__PURE__ */ I(Yt, [["render", nn]]), Ee = "CdsIcon", sn = u({
|
|
1100
|
+
name: Ee,
|
|
1101
|
+
props: {
|
|
1102
|
+
name: {
|
|
1103
|
+
type: String,
|
|
1104
|
+
default: void 0,
|
|
1105
|
+
validator: (e) => ce.includes(e)
|
|
1106
|
+
},
|
|
1107
|
+
...V()
|
|
1108
|
+
},
|
|
1109
|
+
emits: [],
|
|
1110
|
+
setup(e) {
|
|
1111
|
+
const { sizeClasses: t } = U(e, Ee);
|
|
1112
|
+
return e.name ? {
|
|
1113
|
+
iconComponent: c(() => "Icon" + Ot(e.name)),
|
|
1114
|
+
sizeClasses: t
|
|
1115
|
+
} : {
|
|
1116
|
+
sizeClasses: t
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
});
|
|
1120
|
+
function on(e, t, n, s, o, a) {
|
|
1121
|
+
return g(), C("i", {
|
|
1122
|
+
class: O(["cds-icon", [e.sizeClasses]])
|
|
1123
|
+
}, [
|
|
1124
|
+
e.name ? (g(), k(P(e.iconComponent), { key: 0 })) : $(e.$slots, "default", { key: 1 })
|
|
1125
|
+
], 2);
|
|
1126
|
+
}
|
|
1127
|
+
const re = /* @__PURE__ */ I(sn, [["render", on]]), Z = "CdsButton", an = u({
|
|
1128
|
+
name: Z,
|
|
1129
|
+
components: { CdsLoader: Ye, CdsIcon: re },
|
|
1130
|
+
props: {
|
|
1131
|
+
iconOnly: {
|
|
1132
|
+
type: Boolean,
|
|
1133
|
+
default: !1
|
|
1134
|
+
},
|
|
1135
|
+
...te(),
|
|
1136
|
+
...Ke(),
|
|
1137
|
+
...V(),
|
|
1138
|
+
...Ue(),
|
|
1139
|
+
...q(),
|
|
1140
|
+
...ne(),
|
|
1141
|
+
...Bt(),
|
|
1142
|
+
...oe()
|
|
1143
|
+
},
|
|
1144
|
+
setup(e, t) {
|
|
1145
|
+
const { appearanceClasses: n } = He(e, Z), { sizeClasses: s } = U(e, Z), { loadingClasses: o } = Lt(e), { disabledClasses: a } = K(e), { darkClasses: r } = ae(e, Z), { isLink: i, tag: d, href: m, to: f } = se(e, t), { hasAppend: l, hasPrepend: p } = qe(e, t), v = c(() => !!t.slots.default), y = c(() => ({
|
|
1146
|
+
"cds-button__icon": e.iconOnly
|
|
1147
|
+
})), S = {
|
|
1148
|
+
appearanceClasses: n,
|
|
1149
|
+
sizeClasses: s,
|
|
1150
|
+
loadingClasses: o,
|
|
1151
|
+
disabledClasses: a,
|
|
1152
|
+
darkClasses: r,
|
|
1153
|
+
iconClasses: y
|
|
1154
|
+
};
|
|
1155
|
+
return {
|
|
1156
|
+
href: m,
|
|
1157
|
+
to: f,
|
|
1158
|
+
tag: i.value ? d : "button",
|
|
1159
|
+
type: i.value ? void 0 : "button",
|
|
1160
|
+
hasPrepend: p,
|
|
1161
|
+
hasAppend: l,
|
|
1162
|
+
hasDefaultSlot: v,
|
|
1163
|
+
...S
|
|
1164
|
+
};
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
const rn = {
|
|
1168
|
+
key: 0,
|
|
1169
|
+
class: "cds-button__prepend"
|
|
1170
|
+
}, un = {
|
|
1171
|
+
key: 1,
|
|
1172
|
+
class: "cds-button__text"
|
|
1173
|
+
}, ln = {
|
|
1174
|
+
key: 2,
|
|
1175
|
+
class: "cds-button__append"
|
|
1176
|
+
};
|
|
1177
|
+
function cn(e, t, n, s, o, a) {
|
|
1178
|
+
const r = z("cds-icon"), i = z("cds-loader");
|
|
1179
|
+
return g(), k(P(e.tag), {
|
|
1180
|
+
type: e.type,
|
|
1181
|
+
to: e.to,
|
|
1182
|
+
href: e.href,
|
|
1183
|
+
disabled: e.disabled || e.loading,
|
|
1184
|
+
class: O([[e.appearanceClasses, e.sizeClasses, e.loadingClasses, e.disabledClasses, e.darkClasses, e.iconClasses], "cds-button"])
|
|
1185
|
+
}, {
|
|
1186
|
+
default: B(() => [
|
|
1187
|
+
e.hasPrepend ? (g(), C("span", rn, [
|
|
1188
|
+
e.prependIcon ? (g(), k(r, {
|
|
1189
|
+
key: 0,
|
|
1190
|
+
name: e.prependIcon,
|
|
1191
|
+
size: e.size
|
|
1192
|
+
}, null, 8, ["name", "size"])) : w("", !0),
|
|
1193
|
+
$(e.$slots, "prepend")
|
|
1194
|
+
])) : w("", !0),
|
|
1195
|
+
e.hasDefaultSlot || !!e.text ? (g(), C("span", un, [
|
|
1196
|
+
e.text ? (g(), C(ve, { key: 0 }, [
|
|
1197
|
+
M(L(e.text), 1)
|
|
1198
|
+
], 64)) : $(e.$slots, "default", { key: 1 })
|
|
1199
|
+
])) : w("", !0),
|
|
1200
|
+
e.hasAppend ? (g(), C("span", ln, [
|
|
1201
|
+
e.appendIcon ? (g(), k(r, {
|
|
1202
|
+
key: 0,
|
|
1203
|
+
name: e.appendIcon,
|
|
1204
|
+
size: e.size
|
|
1205
|
+
}, null, 8, ["name", "size"])) : w("", !0),
|
|
1206
|
+
$(e.$slots, "append")
|
|
1207
|
+
])) : w("", !0),
|
|
1208
|
+
e.loading ? (g(), k(i, {
|
|
1209
|
+
key: 3,
|
|
1210
|
+
size: "xs",
|
|
1211
|
+
fixed: ""
|
|
1212
|
+
})) : w("", !0)
|
|
1213
|
+
]),
|
|
1214
|
+
_: 3
|
|
1215
|
+
}, 8, ["type", "to", "href", "disabled", "class"]);
|
|
1216
|
+
}
|
|
1217
|
+
const dn = /* @__PURE__ */ I(an, [["render", cn]]), De = "CdsDrawer", fn = u({
|
|
1218
|
+
name: De,
|
|
1219
|
+
props: {
|
|
1220
|
+
modelValue: {
|
|
1221
|
+
type: Boolean,
|
|
1222
|
+
default: null
|
|
1223
|
+
},
|
|
1224
|
+
permanent: {
|
|
1225
|
+
type: Boolean,
|
|
1226
|
+
default: !1
|
|
1227
|
+
},
|
|
1228
|
+
temporary: {
|
|
1229
|
+
type: Boolean,
|
|
1230
|
+
default: !1
|
|
1231
|
+
},
|
|
1232
|
+
minified: {
|
|
1233
|
+
type: Boolean,
|
|
1234
|
+
default: !1
|
|
1235
|
+
},
|
|
1236
|
+
fixed: {
|
|
1237
|
+
type: Boolean,
|
|
1238
|
+
default: !1
|
|
1239
|
+
},
|
|
1240
|
+
right: {
|
|
1241
|
+
type: Boolean,
|
|
1242
|
+
default: !1
|
|
1243
|
+
},
|
|
1244
|
+
border: {
|
|
1245
|
+
type: Boolean,
|
|
1246
|
+
default: !1
|
|
1247
|
+
},
|
|
1248
|
+
fixedSlots: {
|
|
1249
|
+
type: Boolean,
|
|
1250
|
+
default: !1
|
|
1251
|
+
},
|
|
1252
|
+
...oe(),
|
|
1253
|
+
...N({
|
|
1254
|
+
tag: "nav"
|
|
1255
|
+
})
|
|
1256
|
+
},
|
|
1257
|
+
emits: [
|
|
1258
|
+
"opened",
|
|
1259
|
+
"closed",
|
|
1260
|
+
"update:modelValue"
|
|
1261
|
+
],
|
|
1262
|
+
setup(e, { emit: t, slots: n, attrs: s }) {
|
|
1263
|
+
const o = _(), a = de(e, "modelValue", null, (F) => !!F), r = c(() => !e.permanent && e.temporary), i = _(!1), { darkClasses: d } = ae(e, De), m = c(() => ({
|
|
1264
|
+
"cds-drawer--active": a.value,
|
|
1265
|
+
"cds-drawer--hover": i.value,
|
|
1266
|
+
"cds-drawer--temporary": r.value,
|
|
1267
|
+
"cds-drawer--minified": e.minified,
|
|
1268
|
+
"cds-drawer--right": e.right,
|
|
1269
|
+
"cds-drawer--fixed": e.fixed,
|
|
1270
|
+
"cds-drawer--border": e.border,
|
|
1271
|
+
"cds-drawer--fixed-slots": e.fixedSlots
|
|
1272
|
+
})), f = c(() => e.modelValue), l = c(() => !!n.prepend), p = c(() => !!n.append);
|
|
1273
|
+
let v = null;
|
|
1274
|
+
return vt(() => {
|
|
1275
|
+
e.modelValue !== null || r.value || (a.value = e.permanent);
|
|
1276
|
+
}), Y(
|
|
1277
|
+
() => a.value,
|
|
1278
|
+
(F) => {
|
|
1279
|
+
var T;
|
|
1280
|
+
F ? (v = document.activeElement, (T = o.value) == null || T.focus(), t("opened")) : (v && v.focus(), t("closed"));
|
|
1281
|
+
}
|
|
1282
|
+
), {
|
|
1283
|
+
attrs: s,
|
|
1284
|
+
drawerRef: o,
|
|
1285
|
+
hasPrependSlot: l,
|
|
1286
|
+
hasAppendSlot: p,
|
|
1287
|
+
hasOverlay: f,
|
|
1288
|
+
drawerClasses: m,
|
|
1289
|
+
darkClasses: d,
|
|
1290
|
+
onClose: () => {
|
|
1291
|
+
a.value = !1;
|
|
1292
|
+
},
|
|
1293
|
+
onMouseenter: () => {
|
|
1294
|
+
i.value = !0;
|
|
1295
|
+
},
|
|
1296
|
+
onMouseleave: () => {
|
|
1297
|
+
i.value = !1;
|
|
1298
|
+
}
|
|
1299
|
+
};
|
|
1300
|
+
}
|
|
1301
|
+
});
|
|
1302
|
+
const pn = {
|
|
1303
|
+
key: 0,
|
|
1304
|
+
class: "cds-drawer__prepend"
|
|
1305
|
+
}, mn = { class: "cds-drawer__content" }, vn = {
|
|
1306
|
+
key: 1,
|
|
1307
|
+
class: "cds-drawer__append"
|
|
1308
|
+
};
|
|
1309
|
+
function gn(e, t, n, s, o, a) {
|
|
1310
|
+
return g(), C(ve, null, [
|
|
1311
|
+
(g(), k(P(e.tag), Fe({
|
|
1312
|
+
ref: "drawerRef",
|
|
1313
|
+
class: ["cds-drawer", [e.drawerClasses, e.darkClasses]],
|
|
1314
|
+
tabindex: "-1"
|
|
1315
|
+
}, e.attrs, {
|
|
1316
|
+
onKeydown: ze(e.onClose, ["esc"]),
|
|
1317
|
+
onMouseenter: e.onMouseenter,
|
|
1318
|
+
onMouseleave: e.onMouseleave
|
|
1319
|
+
}), {
|
|
1320
|
+
default: B(() => [
|
|
1321
|
+
e.hasPrependSlot ? (g(), C("div", pn, [
|
|
1322
|
+
$(e.$slots, "prepend", { dark: e.dark })
|
|
1323
|
+
])) : w("", !0),
|
|
1324
|
+
E("nav", mn, [
|
|
1325
|
+
$(e.$slots, "default", { dark: e.dark })
|
|
1326
|
+
]),
|
|
1327
|
+
e.hasAppendSlot ? (g(), C("div", vn, [
|
|
1328
|
+
$(e.$slots, "append", { dark: e.dark })
|
|
1329
|
+
])) : w("", !0)
|
|
1330
|
+
]),
|
|
1331
|
+
_: 3
|
|
1332
|
+
}, 16, ["class", "onKeydown", "onMouseenter", "onMouseleave"])),
|
|
1333
|
+
e.hasOverlay ? (g(), C("div", {
|
|
1334
|
+
key: 0,
|
|
1335
|
+
class: "cds-drawer__overlay",
|
|
1336
|
+
onClick: t[0] || (t[0] = (...r) => e.onClose && e.onClose(...r))
|
|
1337
|
+
})) : w("", !0)
|
|
1338
|
+
], 64);
|
|
1339
|
+
}
|
|
1340
|
+
const yn = /* @__PURE__ */ I(fn, [["render", gn]]), xe = b(
|
|
1341
|
+
{
|
|
1342
|
+
condensed: {
|
|
1343
|
+
type: Boolean,
|
|
1344
|
+
default: !1
|
|
1345
|
+
},
|
|
1346
|
+
narrow: {
|
|
1347
|
+
type: Boolean,
|
|
1348
|
+
default: !1
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
"grid"
|
|
1352
|
+
), ue = () => ({
|
|
1353
|
+
prefix: "cds"
|
|
1354
|
+
}), hn = b(
|
|
1355
|
+
{
|
|
1356
|
+
subgrid: {
|
|
1357
|
+
type: Boolean,
|
|
1358
|
+
default: !1
|
|
1359
|
+
}
|
|
1360
|
+
},
|
|
1361
|
+
"subgrid"
|
|
1362
|
+
), Cn = (e) => ({
|
|
1363
|
+
suffix: e.subgrid ? "subgrid" : "css-grid"
|
|
1364
|
+
}), $n = b(
|
|
1365
|
+
{
|
|
1366
|
+
wide: {
|
|
1367
|
+
type: Boolean,
|
|
1368
|
+
default: !1
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
"wide"
|
|
1372
|
+
), ye = ["xs", "sm", "md", "lg", "xl"], wn = b(
|
|
1373
|
+
{
|
|
1374
|
+
xs: {
|
|
1375
|
+
type: [Object, Number, String, Boolean],
|
|
1376
|
+
default: void 0
|
|
1377
|
+
},
|
|
1378
|
+
sm: {
|
|
1379
|
+
type: [Object, Number, String, Boolean],
|
|
1380
|
+
default: void 0
|
|
1381
|
+
},
|
|
1382
|
+
md: {
|
|
1383
|
+
type: [Object, Number, String, Boolean],
|
|
1384
|
+
default: void 0
|
|
1385
|
+
},
|
|
1386
|
+
lg: {
|
|
1387
|
+
type: [Object, Number, String, Boolean],
|
|
1388
|
+
default: void 0
|
|
1389
|
+
},
|
|
1390
|
+
xl: {
|
|
1391
|
+
type: [Object, Number, String, Boolean],
|
|
1392
|
+
default: void 0
|
|
1393
|
+
},
|
|
1394
|
+
span: {
|
|
1395
|
+
type: [Object, Number, String],
|
|
1396
|
+
default: void 0
|
|
1397
|
+
}
|
|
1398
|
+
},
|
|
1399
|
+
"columns"
|
|
1400
|
+
), bn = (e) => ({ breakpoints: ye.map((t) => e[t]) }), _n = (e, t) => {
|
|
1401
|
+
const n = [];
|
|
1402
|
+
for (let s = 0; s < e.length; s++) {
|
|
1403
|
+
const o = e[s];
|
|
1404
|
+
if (o == null)
|
|
1405
|
+
continue;
|
|
1406
|
+
const a = ye[s];
|
|
1407
|
+
if (o === !0) {
|
|
1408
|
+
n.push(`${t}--${a}:col-span-auto`);
|
|
1409
|
+
continue;
|
|
1410
|
+
}
|
|
1411
|
+
if (typeof o == "number") {
|
|
1412
|
+
n.push(`${t}--${a}:col-span-${o}`);
|
|
1413
|
+
continue;
|
|
1414
|
+
} else if (typeof o == "string" && o.endsWith("%")) {
|
|
1415
|
+
n.push(`${t}--${a}:col-span-${o.slice(0, -1)}`);
|
|
1416
|
+
continue;
|
|
1417
|
+
} else if (typeof o == "string") {
|
|
1418
|
+
n.push(`${t}--${a}:col-span-${o}`);
|
|
1419
|
+
continue;
|
|
1420
|
+
}
|
|
1421
|
+
if (typeof o == "object") {
|
|
1422
|
+
const { span: r, offset: i, start: d, end: m } = o;
|
|
1423
|
+
i && i > 0 && n.push(`${t}--${a}:col-start-${+i + 1}`), d && n.push(`${t}--${a}:col-start-${d}`), m && n.push(`${t}--${a}:col-end-${m}`), typeof r == "number" ? n.push(`${t}--${a}:col-span-${r}`) : r && r.endsWith("%") && n.push(`${t}--${a}:col-span-${r.slice(0, -1)}`);
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
return n.join(" ");
|
|
1427
|
+
}, kn = (e, t) => {
|
|
1428
|
+
const n = [];
|
|
1429
|
+
for (let s = 0; s < e.length; s++) {
|
|
1430
|
+
const o = e[s];
|
|
1431
|
+
if (o == null)
|
|
1432
|
+
continue;
|
|
1433
|
+
const a = ye[s];
|
|
1434
|
+
if (o === !0 || typeof o == "string" && o === "") {
|
|
1435
|
+
n.push(`${t}-col-${a}`);
|
|
1436
|
+
continue;
|
|
1437
|
+
}
|
|
1438
|
+
if (typeof o == "number" || typeof o == "string") {
|
|
1439
|
+
n.push(`${t}-col-${a}-${o}`);
|
|
1440
|
+
continue;
|
|
1441
|
+
}
|
|
1442
|
+
if (typeof o == "object") {
|
|
1443
|
+
const { span: r, offset: i, order: d } = o;
|
|
1444
|
+
(typeof r == "number" || typeof r == "string") && n.push(`${t}-col-${a}-${r}`), (r === !0 || !r) && n.push(`${t}-col-${a}`), i && n.push(`${t}-offset-${a}-${i}`), d && n.push(`${t}-order-${a}-${d}`);
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
return n.join(" ");
|
|
1448
|
+
}, Sn = (e, t) => {
|
|
1449
|
+
const n = [];
|
|
1450
|
+
if (typeof e == "number" || typeof e == "string")
|
|
1451
|
+
n.push(`${t}--col-span-${e}`);
|
|
1452
|
+
else if (typeof e == "object") {
|
|
1453
|
+
const { span: s, start: o, end: a } = e;
|
|
1454
|
+
s != null && n.push(`${t}--col-span-${s}`), o != null && n.push(`${t}--col-start-${o}`), a != null && n.push(`${t}--col-end-${a}`);
|
|
1455
|
+
}
|
|
1456
|
+
return n.join(" ");
|
|
1457
|
+
}, In = "CdsCol", An = u({
|
|
1458
|
+
name: In,
|
|
1459
|
+
props: {
|
|
1460
|
+
...N(),
|
|
1461
|
+
...wn()
|
|
1462
|
+
},
|
|
1463
|
+
setup(e, t) {
|
|
1464
|
+
const { prefix: n } = ue(), { breakpoints: s } = bn(e), o = R("cssGrid", !1), a = o ? `${n}--css-grid-column` : `${n}-col`, r = o ? Sn(e.span, n) : "", i = o ? _n(s, n) : kn(s, n);
|
|
1465
|
+
return () => A(
|
|
1466
|
+
e.tag,
|
|
1467
|
+
{
|
|
1468
|
+
class: {
|
|
1469
|
+
[a]: o || i.length === 0,
|
|
1470
|
+
[i]: !!i,
|
|
1471
|
+
[r]: !!r
|
|
1472
|
+
}
|
|
1473
|
+
},
|
|
1474
|
+
t.slots.default && t.slots.default()
|
|
1475
|
+
);
|
|
1476
|
+
}
|
|
1477
|
+
});
|
|
1478
|
+
function On(e, t) {
|
|
1479
|
+
const { prefix: n } = ue(), { suffix: s } = Cn(e);
|
|
1480
|
+
return () => A(
|
|
1481
|
+
e.tag,
|
|
1482
|
+
{
|
|
1483
|
+
class: {
|
|
1484
|
+
[`${n}--${s}`]: !0,
|
|
1485
|
+
[`${n}--${s}--condensed`]: e.condensed,
|
|
1486
|
+
[`${n}--${s}--narrow`]: e.narrow,
|
|
1487
|
+
[`${n}--${s}--wide`]: e.subgrid || e.wide
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
t.slots.default && t.slots.default()
|
|
1491
|
+
);
|
|
1492
|
+
}
|
|
1493
|
+
function Bn(e, t) {
|
|
1494
|
+
const { prefix: n } = ue();
|
|
1495
|
+
return () => A(
|
|
1496
|
+
e.tag,
|
|
1497
|
+
{
|
|
1498
|
+
class: {
|
|
1499
|
+
[`${n}-grid`]: !0,
|
|
1500
|
+
[`${n}-grid-condensed`]: e.condensed,
|
|
1501
|
+
[`${n}-grid-narrow`]: e.narrow,
|
|
1502
|
+
[`${n}-grid--wide`]: e.wide
|
|
1503
|
+
}
|
|
1504
|
+
},
|
|
1505
|
+
t.slots.default && t.slots.default()
|
|
1506
|
+
);
|
|
1507
|
+
}
|
|
1508
|
+
const Ln = "CdsGrid", Pn = u({
|
|
1509
|
+
name: Ln,
|
|
1510
|
+
props: {
|
|
1511
|
+
...N(),
|
|
1512
|
+
...xe(),
|
|
1513
|
+
...hn(),
|
|
1514
|
+
...$n()
|
|
1515
|
+
},
|
|
1516
|
+
setup(e, t) {
|
|
1517
|
+
return R("cssGrid", !1) ? On(e, t) : Bn(e, t);
|
|
1518
|
+
}
|
|
1519
|
+
}), En = "CdsRow", Dn = u({
|
|
1520
|
+
name: En,
|
|
1521
|
+
props: {
|
|
1522
|
+
...N(),
|
|
1523
|
+
...xe()
|
|
1524
|
+
},
|
|
1525
|
+
setup(e, t) {
|
|
1526
|
+
const { prefix: n } = ue();
|
|
1527
|
+
return () => A(
|
|
1528
|
+
e.tag,
|
|
1529
|
+
{
|
|
1530
|
+
class: {
|
|
1531
|
+
[`${n}-row`]: !0,
|
|
1532
|
+
[`${n}-row-condensed`]: e.condensed,
|
|
1533
|
+
[`${n}-row-narrow`]: e.narrow
|
|
1534
|
+
}
|
|
1535
|
+
},
|
|
1536
|
+
t.slots.default && t.slots.default()
|
|
1537
|
+
);
|
|
1538
|
+
}
|
|
1539
|
+
}), Nn = "CdsLink", Fn = u({
|
|
1540
|
+
name: Nn,
|
|
1541
|
+
props: {
|
|
1542
|
+
...te(),
|
|
1543
|
+
...ne(),
|
|
1544
|
+
...q()
|
|
1545
|
+
},
|
|
1546
|
+
emits: [
|
|
1547
|
+
"click"
|
|
1548
|
+
],
|
|
1549
|
+
setup(e, t) {
|
|
1550
|
+
const { href: n, to: s, tag: o, handleClick: a } = se(e, t), { disabledClasses: r } = K(e);
|
|
1551
|
+
return {
|
|
1552
|
+
tag: o,
|
|
1553
|
+
to: s,
|
|
1554
|
+
href: n,
|
|
1555
|
+
disabledClasses: r,
|
|
1556
|
+
handleClick: a
|
|
1557
|
+
};
|
|
1558
|
+
}
|
|
1559
|
+
});
|
|
1560
|
+
function zn(e, t, n, s, o, a) {
|
|
1561
|
+
return g(), k(P(e.tag), {
|
|
1562
|
+
to: e.to,
|
|
1563
|
+
href: e.href,
|
|
1564
|
+
class: O([[e.disabledClasses], "cds-link"]),
|
|
1565
|
+
onClick: e.handleClick
|
|
1566
|
+
}, {
|
|
1567
|
+
default: B(() => [
|
|
1568
|
+
M(L(e.text) + " ", 1),
|
|
1569
|
+
$(e.$slots, "default")
|
|
1570
|
+
]),
|
|
1571
|
+
_: 3
|
|
1572
|
+
}, 8, ["to", "href", "class", "onClick"]);
|
|
1573
|
+
}
|
|
1574
|
+
const Mn = /* @__PURE__ */ I(Fn, [["render", zn]]), Rn = "CdsListItem", Tn = u({
|
|
1575
|
+
name: Rn,
|
|
1576
|
+
components: { CdsIcon: re },
|
|
1577
|
+
props: {
|
|
1578
|
+
title: {
|
|
1579
|
+
type: String,
|
|
1580
|
+
default: void 0
|
|
1581
|
+
},
|
|
1582
|
+
description: {
|
|
1583
|
+
type: String,
|
|
1584
|
+
default: void 0
|
|
1585
|
+
},
|
|
1586
|
+
value: {
|
|
1587
|
+
type: [String, Number],
|
|
1588
|
+
default: void 0
|
|
1589
|
+
},
|
|
1590
|
+
active: {
|
|
1591
|
+
type: Boolean,
|
|
1592
|
+
default: !1
|
|
1593
|
+
},
|
|
1594
|
+
isClickable: {
|
|
1595
|
+
type: Boolean,
|
|
1596
|
+
default: !1
|
|
1597
|
+
},
|
|
1598
|
+
...Ue(),
|
|
1599
|
+
...ne(),
|
|
1600
|
+
...N(),
|
|
1601
|
+
...q()
|
|
1602
|
+
},
|
|
1603
|
+
emits: [
|
|
1604
|
+
"click"
|
|
1605
|
+
],
|
|
1606
|
+
setup(e, t) {
|
|
1607
|
+
const n = at(), { href: s, to: o, ...a } = se(e, t), r = c(() => {
|
|
1608
|
+
var h;
|
|
1609
|
+
return (h = e.value) != null ? h : s.value;
|
|
1610
|
+
}), { select: i, isSelected: d, isIndeterminate: m, isGroupActivator: f, root: l, parent: p, openOnSelect: v } = Xe(
|
|
1611
|
+
r,
|
|
1612
|
+
!1
|
|
1613
|
+
), { disabledClasses: y } = K(e), { hasPrepend: S, hasAppend: he } = qe(e, t), F = c(
|
|
1614
|
+
() => {
|
|
1615
|
+
var h;
|
|
1616
|
+
return e.active !== !1 && (e.active || ((h = a.isActive) == null ? void 0 : h.value) || d.value);
|
|
1617
|
+
}
|
|
1618
|
+
), T = c(() => a.isLink.value), H = c(
|
|
1619
|
+
() => e.isClickable || !e.disabled && (a.isLink.value || e.value != null && !!n)
|
|
1620
|
+
), rt = c(() => T.value ? a.tag.value : e.tag), ut = c(() => !!t.slots.title || !!e.title), lt = c(() => !!t.slots.description || !!e.description), it = c(() => ({
|
|
1621
|
+
isActive: F.value,
|
|
1622
|
+
select: i,
|
|
1623
|
+
isSelected: d.value,
|
|
1624
|
+
isIndeterminate: m.value
|
|
1625
|
+
})), ct = c(() => ({
|
|
1626
|
+
"cds-list-item--active": F.value,
|
|
1627
|
+
"cds-list-item--clickable": H.value
|
|
1628
|
+
}));
|
|
1629
|
+
Y(
|
|
1630
|
+
() => {
|
|
1631
|
+
var h;
|
|
1632
|
+
return (h = a.isActive) == null ? void 0 : h.value;
|
|
1633
|
+
},
|
|
1634
|
+
(h) => {
|
|
1635
|
+
h && p.value != null && l.open(p.value, !0), h && v(h);
|
|
1636
|
+
},
|
|
1637
|
+
{ immediate: !0 }
|
|
1638
|
+
);
|
|
1639
|
+
function Ce(h) {
|
|
1640
|
+
var $e;
|
|
1641
|
+
t.emit("click", h), !(f || !H.value) && (($e = a.navigate) == null || $e.call(a, h), e.value != null && i(!d.value, h));
|
|
1642
|
+
}
|
|
1643
|
+
function dt(h) {
|
|
1644
|
+
(h.key === "Enter" || h.key === " ") && (h.preventDefault(), Ce(h));
|
|
1645
|
+
}
|
|
1646
|
+
return n == null || n.updateHasPrepend(S.value), {
|
|
1647
|
+
tag: rt,
|
|
1648
|
+
href: s,
|
|
1649
|
+
to: o,
|
|
1650
|
+
slotProps: it,
|
|
1651
|
+
hasTitle: ut,
|
|
1652
|
+
hasDescription: lt,
|
|
1653
|
+
hasPrepend: S,
|
|
1654
|
+
hasAppend: he,
|
|
1655
|
+
classes: ct,
|
|
1656
|
+
disabledClasses: y,
|
|
1657
|
+
tabindex: H.value ? 0 : void 0,
|
|
1658
|
+
onClick: Ce,
|
|
1659
|
+
onKeyDown: H.value && !T.value && dt
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
}), jn = {
|
|
1663
|
+
key: 0,
|
|
1664
|
+
class: "cds-list-item__prepend"
|
|
1665
|
+
}, Gn = { class: "cds-list-item__content" }, Vn = {
|
|
1666
|
+
key: 0,
|
|
1667
|
+
class: "cds-list-item-title"
|
|
1668
|
+
}, Un = {
|
|
1669
|
+
key: 1,
|
|
1670
|
+
class: "cds-list-item-description"
|
|
1671
|
+
}, qn = {
|
|
1672
|
+
key: 1,
|
|
1673
|
+
class: "cds-list-item__append"
|
|
1674
|
+
};
|
|
1675
|
+
function Kn(e, t, n, s, o, a) {
|
|
1676
|
+
const r = z("cds-icon");
|
|
1677
|
+
return g(), k(P(e.tag), {
|
|
1678
|
+
to: e.to,
|
|
1679
|
+
href: e.href,
|
|
1680
|
+
class: O(["cds-list-item", [e.classes, e.disabledClasses]]),
|
|
1681
|
+
tabindex: e.tabindex,
|
|
1682
|
+
onClick: e.onClick,
|
|
1683
|
+
onKeydown: e.onKeyDown
|
|
1684
|
+
}, {
|
|
1685
|
+
default: B(() => [
|
|
1686
|
+
e.hasPrepend ? (g(), C("div", jn, [
|
|
1687
|
+
e.prependIcon ? (g(), k(r, {
|
|
1688
|
+
key: 0,
|
|
1689
|
+
name: e.prependIcon
|
|
1690
|
+
}, null, 8, ["name"])) : w("", !0),
|
|
1691
|
+
$(e.$slots, "prepend", we(be(e.slotProps)))
|
|
1692
|
+
])) : w("", !0),
|
|
1693
|
+
E("div", Gn, [
|
|
1694
|
+
e.hasTitle ? (g(), C("div", Vn, [
|
|
1695
|
+
$(e.$slots, "title"),
|
|
1696
|
+
M(" " + L(e.title), 1)
|
|
1697
|
+
])) : w("", !0),
|
|
1698
|
+
e.hasDescription ? (g(), C("div", Un, [
|
|
1699
|
+
$(e.$slots, "description"),
|
|
1700
|
+
M(" " + L(e.description), 1)
|
|
1701
|
+
])) : w("", !0),
|
|
1702
|
+
$(e.$slots, "default")
|
|
1703
|
+
]),
|
|
1704
|
+
e.hasAppend ? (g(), C("div", qn, [
|
|
1705
|
+
$(e.$slots, "append", we(be(e.slotProps))),
|
|
1706
|
+
e.appendIcon ? (g(), k(r, {
|
|
1707
|
+
key: 0,
|
|
1708
|
+
name: e.appendIcon
|
|
1709
|
+
}, null, 8, ["name"])) : w("", !0)
|
|
1710
|
+
])) : w("", !0)
|
|
1711
|
+
]),
|
|
1712
|
+
_: 3
|
|
1713
|
+
}, 40, ["to", "href", "tabindex", "class", "onClick", "onKeydown"]);
|
|
1714
|
+
}
|
|
1715
|
+
const fe = /* @__PURE__ */ I(Tn, [["render", Kn]]);
|
|
1716
|
+
function et(e, t, n = "in-out") {
|
|
1717
|
+
return u({
|
|
1718
|
+
name: e,
|
|
1719
|
+
props: {
|
|
1720
|
+
mode: {
|
|
1721
|
+
type: String,
|
|
1722
|
+
default: n
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1725
|
+
setup(s, { slots: o }) {
|
|
1726
|
+
return () => A(gt, { name: e, ...t }, o.default);
|
|
1727
|
+
}
|
|
1728
|
+
});
|
|
1729
|
+
}
|
|
1730
|
+
function tt(e = "", t = !1) {
|
|
1731
|
+
const n = t ? "width" : "height", s = yt(`offset-${n}`);
|
|
1732
|
+
return {
|
|
1733
|
+
onBeforeEnter(r) {
|
|
1734
|
+
r._parent = r.parentNode, r._initialStyle = {
|
|
1735
|
+
transition: r.style.transition,
|
|
1736
|
+
overflow: r.style.overflow,
|
|
1737
|
+
[n]: r.style[n]
|
|
1738
|
+
};
|
|
1739
|
+
},
|
|
1740
|
+
onEnter(r) {
|
|
1741
|
+
const i = r._initialStyle;
|
|
1742
|
+
r.style.setProperty("transition", "none", "important"), r.style.overflow = "hidden";
|
|
1743
|
+
const d = `${r[s]}px`;
|
|
1744
|
+
r.style[n] = "0", r.offsetHeight, r.style.transition = i == null ? void 0 : i.transition, e && r._parent && r._parent.classList.add(e), requestAnimationFrame(() => {
|
|
1745
|
+
r.style[n] = d;
|
|
1746
|
+
});
|
|
1747
|
+
},
|
|
1748
|
+
onAfterEnter: a,
|
|
1749
|
+
onEnterCancelled: a,
|
|
1750
|
+
onLeave(r) {
|
|
1751
|
+
r._initialStyle = {
|
|
1752
|
+
transition: "",
|
|
1753
|
+
overflow: r.style.overflow,
|
|
1754
|
+
[n]: r.style[n]
|
|
1755
|
+
}, r.style.overflow = "hidden", r.style[n] = `${r[s]}px`, r.offsetHeight, requestAnimationFrame(() => r.style[n] = "0");
|
|
1756
|
+
},
|
|
1757
|
+
onAfterLeave: o,
|
|
1758
|
+
onLeaveCancelled: o
|
|
1759
|
+
};
|
|
1760
|
+
function o(r) {
|
|
1761
|
+
e && r._parent && r._parent.classList.remove(e), a(r);
|
|
1762
|
+
}
|
|
1763
|
+
function a(r) {
|
|
1764
|
+
const i = r._initialStyle[n];
|
|
1765
|
+
r.style.overflow = r._initialStyle.overflow, i != null && (r.style[n] = i), delete r._initialStyle;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
const Hn = et("expand-transition", tt());
|
|
1769
|
+
et("expand-transition-x", tt("", !0));
|
|
1770
|
+
const Wn = u({
|
|
1771
|
+
name: "CdsListGroupActivator",
|
|
1772
|
+
setup(e, { slots: t }) {
|
|
1773
|
+
return Wt(), () => {
|
|
1774
|
+
var n;
|
|
1775
|
+
return (n = t.default) == null ? void 0 : n.call(t);
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
}), Zn = "CdsListGroup", Jn = u({
|
|
1779
|
+
name: Zn,
|
|
1780
|
+
components: { CdsListGroupActivator: Wn, CdsTransitionExpand: Hn },
|
|
1781
|
+
props: {
|
|
1782
|
+
title: {
|
|
1783
|
+
type: String,
|
|
1784
|
+
default: void 0
|
|
1785
|
+
},
|
|
1786
|
+
collapseIcon: {
|
|
1787
|
+
type: String,
|
|
1788
|
+
default: "chevron-up"
|
|
1789
|
+
},
|
|
1790
|
+
expandIcon: {
|
|
1791
|
+
type: String,
|
|
1792
|
+
default: "chevron-down"
|
|
1793
|
+
},
|
|
1794
|
+
value: {
|
|
1795
|
+
type: [String, Number],
|
|
1796
|
+
default: void 0
|
|
1797
|
+
},
|
|
1798
|
+
fluid: {
|
|
1799
|
+
type: Boolean,
|
|
1800
|
+
default: !1
|
|
1801
|
+
},
|
|
1802
|
+
subgroup: {
|
|
1803
|
+
type: Boolean,
|
|
1804
|
+
default: !1
|
|
1805
|
+
},
|
|
1806
|
+
...N()
|
|
1807
|
+
},
|
|
1808
|
+
setup(e) {
|
|
1809
|
+
const { isOpen: t, open: n, id: s } = Xe(ht(e, "value"), !0), o = at(), a = c(() => `cds-list-group--id-${String(s.value)}`), r = c(() => t.value ? e.collapseIcon : e.expandIcon), i = c(() => !e.subgroup), d = c(() => ({
|
|
1810
|
+
onClick: f,
|
|
1811
|
+
id: a.value,
|
|
1812
|
+
appendIcon: r.value,
|
|
1813
|
+
class: "cds-list-group__header",
|
|
1814
|
+
isClickable: i.value
|
|
1815
|
+
})), m = c(() => ({
|
|
1816
|
+
"cds-list-group--open": t.value,
|
|
1817
|
+
"cds-list-group--prepend": o == null ? void 0 : o.hasPrepend.value,
|
|
1818
|
+
"cds-list-group--fluid": e.fluid,
|
|
1819
|
+
"cds-list-group--subgroup": e.subgroup
|
|
1820
|
+
}));
|
|
1821
|
+
st();
|
|
1822
|
+
function f(l) {
|
|
1823
|
+
n(!t.value, l);
|
|
1824
|
+
}
|
|
1825
|
+
return {
|
|
1826
|
+
id: a,
|
|
1827
|
+
isOpen: t,
|
|
1828
|
+
activatorProps: d,
|
|
1829
|
+
isExpandable: i,
|
|
1830
|
+
classes: m
|
|
1831
|
+
};
|
|
1832
|
+
}
|
|
1833
|
+
}), Qn = {
|
|
1834
|
+
key: 0,
|
|
1835
|
+
class: "cds-list-group__title"
|
|
1836
|
+
}, Xn = ["aria-labelledby"], Yn = ["aria-labelledby"];
|
|
1837
|
+
function xn(e, t, n, s, o, a) {
|
|
1838
|
+
const r = z("cds-list-group-activator"), i = z("cds-transition-expand");
|
|
1839
|
+
return g(), k(P(e.tag), {
|
|
1840
|
+
class: O(["cds-list-group", e.classes])
|
|
1841
|
+
}, {
|
|
1842
|
+
default: B(() => [
|
|
1843
|
+
e.title ? (g(), C("div", Qn, [
|
|
1844
|
+
$(e.$slots, "title"),
|
|
1845
|
+
M(" " + L(e.title), 1)
|
|
1846
|
+
])) : w("", !0),
|
|
1847
|
+
Me(r, null, {
|
|
1848
|
+
default: B(() => [
|
|
1849
|
+
$(e.$slots, "activator", {
|
|
1850
|
+
props: e.activatorProps,
|
|
1851
|
+
isOpen: e.isOpen
|
|
1852
|
+
})
|
|
1853
|
+
]),
|
|
1854
|
+
_: 3
|
|
1855
|
+
}),
|
|
1856
|
+
e.isExpandable ? (g(), k(i, { key: 1 }, {
|
|
1857
|
+
default: B(() => [
|
|
1858
|
+
Ct(E("div", {
|
|
1859
|
+
class: "cds-list-group__items",
|
|
1860
|
+
role: "group",
|
|
1861
|
+
"aria-labelledby": e.id
|
|
1862
|
+
}, [
|
|
1863
|
+
$(e.$slots, "default")
|
|
1864
|
+
], 8, Xn), [
|
|
1865
|
+
[$t, e.isOpen]
|
|
1866
|
+
])
|
|
1867
|
+
]),
|
|
1868
|
+
_: 3
|
|
1869
|
+
})) : (g(), C("div", {
|
|
1870
|
+
key: 2,
|
|
1871
|
+
class: "cds-list-group__items",
|
|
1872
|
+
role: "group",
|
|
1873
|
+
"aria-labelledby": e.id
|
|
1874
|
+
}, [
|
|
1875
|
+
$(e.$slots, "default")
|
|
1876
|
+
], 8, Yn))
|
|
1877
|
+
]),
|
|
1878
|
+
_: 3
|
|
1879
|
+
}, 8, ["class"]);
|
|
1880
|
+
}
|
|
1881
|
+
const nt = /* @__PURE__ */ I(Jn, [["render", xn]]), pe = Symbol.for("cds:list");
|
|
1882
|
+
function st() {
|
|
1883
|
+
const e = R(pe, { hasPrepend: _(!1), updateHasPrepend: () => null }), t = {
|
|
1884
|
+
hasPrepend: _(!1),
|
|
1885
|
+
updateHasPrepend: (n) => {
|
|
1886
|
+
n && (t.hasPrepend.value = n);
|
|
1887
|
+
}
|
|
1888
|
+
};
|
|
1889
|
+
return x(pe, t), e;
|
|
1890
|
+
}
|
|
1891
|
+
function ot(e, t) {
|
|
1892
|
+
return () => {
|
|
1893
|
+
var n, s, o;
|
|
1894
|
+
return (o = (s = (n = t.slots).default) == null ? void 0 : s.call(n)) != null ? o : e.items.map(({ children: a, props: r, raw: i }) => {
|
|
1895
|
+
const d = {
|
|
1896
|
+
default: t.slots.default ? (m) => {
|
|
1897
|
+
var f, l;
|
|
1898
|
+
return (l = (f = t.slots).default) == null ? void 0 : l.call(f, { ...m, item: i });
|
|
1899
|
+
} : void 0,
|
|
1900
|
+
prepend: t.slots.prepend ? (m) => {
|
|
1901
|
+
var f, l;
|
|
1902
|
+
return (l = (f = t.slots).prepend) == null ? void 0 : l.call(f, { ...m, item: i });
|
|
1903
|
+
} : void 0,
|
|
1904
|
+
append: t.slots.append ? (m) => {
|
|
1905
|
+
var f, l;
|
|
1906
|
+
return (l = (f = t.slots).append) == null ? void 0 : l.call(f, { ...m, item: i });
|
|
1907
|
+
} : void 0,
|
|
1908
|
+
title: t.slots.title ? (m) => {
|
|
1909
|
+
var f, l;
|
|
1910
|
+
return (l = (f = t.slots).title) == null ? void 0 : l.call(f, { ...m, item: i });
|
|
1911
|
+
} : void 0,
|
|
1912
|
+
description: t.slots.description ? (m) => {
|
|
1913
|
+
var f, l;
|
|
1914
|
+
return (l = (f = t.slots).description) == null ? void 0 : l.call(f, { ...m, item: i });
|
|
1915
|
+
} : void 0
|
|
1916
|
+
};
|
|
1917
|
+
return a ? A(
|
|
1918
|
+
nt,
|
|
1919
|
+
{ value: r == null ? void 0 : r.value },
|
|
1920
|
+
{
|
|
1921
|
+
activator: ({ props: m }) => A(fe, { ...r, ...m }, d),
|
|
1922
|
+
default: () => ot({ ...e, items: a }, t)()
|
|
1923
|
+
}
|
|
1924
|
+
) : A(fe, r, d);
|
|
1925
|
+
});
|
|
1926
|
+
};
|
|
1927
|
+
}
|
|
1928
|
+
function at() {
|
|
1929
|
+
return R(pe, null);
|
|
1930
|
+
}
|
|
1931
|
+
const le = "CdsList", es = u({
|
|
1932
|
+
name: le,
|
|
1933
|
+
props: {
|
|
1934
|
+
lines: {
|
|
1935
|
+
type: [Boolean, String],
|
|
1936
|
+
default: "one"
|
|
1937
|
+
},
|
|
1938
|
+
...Ft(),
|
|
1939
|
+
...N(),
|
|
1940
|
+
...V({
|
|
1941
|
+
size: "xs"
|
|
1942
|
+
}),
|
|
1943
|
+
...q(),
|
|
1944
|
+
...oe(),
|
|
1945
|
+
...Kt({
|
|
1946
|
+
selectStrategy: "single-leaf",
|
|
1947
|
+
openStrategy: "list"
|
|
1948
|
+
})
|
|
1949
|
+
},
|
|
1950
|
+
emits: [
|
|
1951
|
+
"update:selected",
|
|
1952
|
+
"update:opened",
|
|
1953
|
+
"click:open",
|
|
1954
|
+
"click:select"
|
|
1955
|
+
],
|
|
1956
|
+
setup(e, t) {
|
|
1957
|
+
const { items: n } = zt(e), { disabledClasses: s } = K(e), { sizeClasses: o } = U(e, le), { darkClasses: a } = ae(e, le), { open: r, select: i } = Ht(e, t), { contentRef: d, onFocus: m, onFocusin: f, onFocusout: l, onKeydown: p, focus: v } = Rt(), y = c(() => e.lines ? `cds-list--lines-${e.lines}` : void 0), S = ot({ ...e, items: n.value }, t)();
|
|
1958
|
+
return st(), Zt(
|
|
1959
|
+
() => A(
|
|
1960
|
+
e.tag,
|
|
1961
|
+
{
|
|
1962
|
+
ref: d,
|
|
1963
|
+
role: "listbox",
|
|
1964
|
+
class: [
|
|
1965
|
+
{
|
|
1966
|
+
"cds-list": !0
|
|
1967
|
+
},
|
|
1968
|
+
y.value,
|
|
1969
|
+
o.value,
|
|
1970
|
+
a.value,
|
|
1971
|
+
s.value
|
|
1972
|
+
],
|
|
1973
|
+
onFocus: m,
|
|
1974
|
+
onFocusin: f,
|
|
1975
|
+
onFocusout: l,
|
|
1976
|
+
onKeydown: p
|
|
1977
|
+
},
|
|
1978
|
+
S
|
|
1979
|
+
)
|
|
1980
|
+
), {
|
|
1981
|
+
open: r,
|
|
1982
|
+
select: i,
|
|
1983
|
+
focus: v
|
|
1984
|
+
};
|
|
1985
|
+
}
|
|
1986
|
+
});
|
|
1987
|
+
const J = "CdsStatus", ts = u({
|
|
1988
|
+
name: J,
|
|
1989
|
+
props: {
|
|
1990
|
+
...te(),
|
|
1991
|
+
...Ke(),
|
|
1992
|
+
...Dt()
|
|
1993
|
+
},
|
|
1994
|
+
setup(e, { slots: t }) {
|
|
1995
|
+
const { appearanceClasses: n } = He(e, J), { statusClasses: s } = Nt(e, J);
|
|
1996
|
+
return !e.text && !t.default && me(`'text' is a required prop for ${J}`), {
|
|
1997
|
+
appearanceClasses: n,
|
|
1998
|
+
statusClasses: s
|
|
1999
|
+
};
|
|
2000
|
+
}
|
|
2001
|
+
});
|
|
2002
|
+
const ns = { class: "cds-status__text" };
|
|
2003
|
+
function ss(e, t, n, s, o, a) {
|
|
2004
|
+
return g(), C("span", {
|
|
2005
|
+
class: O(["cds-status", [e.appearanceClasses, e.statusClasses]])
|
|
2006
|
+
}, [
|
|
2007
|
+
E("span", ns, [
|
|
2008
|
+
e.text ? (g(), C(ve, { key: 0 }, [
|
|
2009
|
+
M(L(e.text), 1)
|
|
2010
|
+
], 64)) : $(e.$slots, "default", { key: 1 })
|
|
2011
|
+
])
|
|
2012
|
+
], 2);
|
|
2013
|
+
}
|
|
2014
|
+
const os = /* @__PURE__ */ I(ts, [["render", ss]]), Q = "CdsTag", as = u({
|
|
2015
|
+
name: Q,
|
|
2016
|
+
components: {
|
|
2017
|
+
CdsIcon: re
|
|
2018
|
+
},
|
|
2019
|
+
props: {
|
|
2020
|
+
removable: {
|
|
2021
|
+
type: Boolean,
|
|
2022
|
+
default: !1,
|
|
2023
|
+
description: "\u0423\u0434\u0430\u043B\u044F\u0435\u043C\u044B\u0439 \u0442\u0435\u0433"
|
|
2024
|
+
},
|
|
2025
|
+
...V(),
|
|
2026
|
+
...q(),
|
|
2027
|
+
...ne(),
|
|
2028
|
+
...Pt(),
|
|
2029
|
+
...te()
|
|
2030
|
+
},
|
|
2031
|
+
emits: [
|
|
2032
|
+
"remove"
|
|
2033
|
+
],
|
|
2034
|
+
setup(e, t) {
|
|
2035
|
+
const { sizeClasses: n } = U(e, Q), { disabledClasses: s } = K(e), { colorClasses: o } = Et(e, Q), { isLink: a, tag: r, href: i, to: d } = se(e, t);
|
|
2036
|
+
!e.text && !t.slots.default && me(`'text' is a required prop for ${Q}`);
|
|
2037
|
+
const m = (p) => {
|
|
2038
|
+
t.emit("remove", p);
|
|
2039
|
+
}, f = c(() => ({
|
|
2040
|
+
"cds-tag--interactive": a.value,
|
|
2041
|
+
"cds-tag--removable": e.removable
|
|
2042
|
+
})), l = {
|
|
2043
|
+
sizeClasses: n,
|
|
2044
|
+
disabledClasses: s,
|
|
2045
|
+
colorClasses: o,
|
|
2046
|
+
tagClasses: f
|
|
2047
|
+
};
|
|
2048
|
+
return {
|
|
2049
|
+
tag: a.value ? r : "span",
|
|
2050
|
+
href: i,
|
|
2051
|
+
to: d,
|
|
2052
|
+
...l,
|
|
2053
|
+
onRemove: m
|
|
2054
|
+
};
|
|
2055
|
+
}
|
|
2056
|
+
});
|
|
2057
|
+
const rs = {
|
|
2058
|
+
key: 0,
|
|
2059
|
+
class: "cds-tag__text",
|
|
2060
|
+
tabindex: "-1"
|
|
2061
|
+
}, us = ["disabled"];
|
|
2062
|
+
function ls(e, t, n, s, o, a) {
|
|
2063
|
+
const r = z("cds-icon");
|
|
2064
|
+
return g(), k(P(e.tag), {
|
|
2065
|
+
to: e.to,
|
|
2066
|
+
href: e.href,
|
|
2067
|
+
class: O(["cds-tag", [e.tagClasses, e.sizeClasses, e.disabledClasses, e.colorClasses]])
|
|
2068
|
+
}, {
|
|
2069
|
+
default: B(() => [
|
|
2070
|
+
e.text ? (g(), C("span", rs, L(e.text), 1)) : $(e.$slots, "default", { key: 1 }),
|
|
2071
|
+
e.removable ? (g(), C("button", {
|
|
2072
|
+
key: 2,
|
|
2073
|
+
"aria-label": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
|
|
2074
|
+
type: "button",
|
|
2075
|
+
disabled: e.disabled,
|
|
2076
|
+
class: "cds-tag__remove",
|
|
2077
|
+
onClick: t[0] || (t[0] = _e((...i) => e.onRemove && e.onRemove(...i), ["prevent"])),
|
|
2078
|
+
onKeydown: t[1] || (t[1] = ze(_e((...i) => e.onRemove && e.onRemove(...i), ["prevent"]), ["enter"]))
|
|
2079
|
+
}, [
|
|
2080
|
+
Me(r, {
|
|
2081
|
+
class: "cds-tag__icon",
|
|
2082
|
+
size: e.size,
|
|
2083
|
+
name: "remove"
|
|
2084
|
+
}, null, 8, ["size"])
|
|
2085
|
+
], 40, us)) : w("", !0)
|
|
2086
|
+
]),
|
|
2087
|
+
_: 3
|
|
2088
|
+
}, 8, ["to", "href", "class"]);
|
|
2089
|
+
}
|
|
2090
|
+
const is = /* @__PURE__ */ I(as, [["render", ls]]), cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2091
|
+
__proto__: null,
|
|
2092
|
+
CdsBadge: Xt,
|
|
2093
|
+
CdsButton: dn,
|
|
2094
|
+
CdsDrawer: yn,
|
|
2095
|
+
CdsCol: An,
|
|
2096
|
+
CdsGrid: Pn,
|
|
2097
|
+
CdsRow: Dn,
|
|
2098
|
+
CdsIcon: re,
|
|
2099
|
+
CdsLink: Mn,
|
|
2100
|
+
CdsList: es,
|
|
2101
|
+
CdsListGroup: nt,
|
|
2102
|
+
CdsListItem: fe,
|
|
2103
|
+
CdsLoader: Ye,
|
|
2104
|
+
CdsStatus: os,
|
|
2105
|
+
CdsTag: is
|
|
2106
|
+
}, Symbol.toStringTag, { value: "Module" })), ds = {}, fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2107
|
+
__proto__: null,
|
|
2108
|
+
default: ds
|
|
2109
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
2110
|
+
const ps = {
|
|
2111
|
+
cssGrid: !1
|
|
2112
|
+
}, Cs = {
|
|
2113
|
+
install(e, t = ps) {
|
|
2114
|
+
Object.entries(cs).forEach(([n, s]) => {
|
|
2115
|
+
e.component(n, s);
|
|
2116
|
+
}), Object.entries(fs).forEach(([n, s]) => {
|
|
2117
|
+
e.directive(n, s);
|
|
2118
|
+
}), Object.entries(t).forEach(([n, s]) => {
|
|
2119
|
+
e.provide(n, s);
|
|
2120
|
+
});
|
|
2121
|
+
}
|
|
2122
|
+
};
|
|
2123
|
+
export {
|
|
2124
|
+
Cs as Cds,
|
|
2125
|
+
Xt as CdsBadge,
|
|
2126
|
+
dn as CdsButton,
|
|
2127
|
+
An as CdsCol,
|
|
2128
|
+
yn as CdsDrawer,
|
|
2129
|
+
Pn as CdsGrid,
|
|
2130
|
+
re as CdsIcon,
|
|
2131
|
+
Mn as CdsLink,
|
|
2132
|
+
es as CdsList,
|
|
2133
|
+
nt as CdsListGroup,
|
|
2134
|
+
fe as CdsListItem,
|
|
2135
|
+
Ye as CdsLoader,
|
|
2136
|
+
Dn as CdsRow,
|
|
2137
|
+
os as CdsStatus,
|
|
2138
|
+
is as CdsTag,
|
|
2139
|
+
Re as classesStates,
|
|
2140
|
+
Cs as default,
|
|
2141
|
+
ee as getCurrentInstance,
|
|
2142
|
+
gs as getCurrentInstanceName,
|
|
2143
|
+
Te as getNestedValue,
|
|
2144
|
+
bt as getObjectValueByPath,
|
|
2145
|
+
W as getPropertyFromItem,
|
|
2146
|
+
Ge as getUid,
|
|
2147
|
+
ke as isObject,
|
|
2148
|
+
vs as keyCodes,
|
|
2149
|
+
ys as localeLowerCase,
|
|
2150
|
+
ie as lowerCase,
|
|
2151
|
+
wt as mergeDeep,
|
|
2152
|
+
Ve as noCase,
|
|
2153
|
+
D as paramCase,
|
|
2154
|
+
Ot as pascalCase,
|
|
2155
|
+
At as pascalCaseTransform,
|
|
2156
|
+
hs as pascalCaseTransformMerge,
|
|
2157
|
+
_t as pick,
|
|
2158
|
+
b as propsFactory
|
|
2159
|
+
};
|