@itguy614/clean-ui 0.9.0 → 1.0.1
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/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/clean-ui.css +1 -1
- package/dist/components/CuiAccordion.vue.js +7 -0
- package/dist/components/CuiAccordion.vue2.js +55 -0
- package/dist/components/CuiAccordionItem.vue.js +7 -0
- package/dist/components/CuiAccordionItem.vue2.js +91 -0
- package/dist/components/CuiAlert.vue.d.ts.map +1 -1
- package/dist/components/CuiAlert.vue.js +7 -0
- package/dist/components/CuiAlert.vue2.js +113 -0
- package/dist/components/CuiAvatar.vue.js +99 -0
- package/dist/components/CuiAvatar.vue3.js +5 -0
- package/dist/components/CuiAvatarGroup.vue.js +22 -0
- package/dist/components/CuiAvatarGroup.vue3.js +5 -0
- package/dist/components/CuiBackdrop.vue.js +7 -0
- package/dist/components/CuiBackdrop.vue2.js +49 -0
- package/dist/components/CuiBadge.vue.d.ts.map +1 -1
- package/dist/components/CuiBadge.vue.js +7 -0
- package/dist/components/CuiBadge.vue2.js +82 -0
- package/dist/components/CuiBanner.vue.js +81 -0
- package/dist/components/CuiBanner.vue2.js +4 -0
- package/dist/components/CuiBreadcrumb.vue.js +7 -0
- package/dist/components/CuiBreadcrumb.vue2.js +29 -0
- package/dist/components/CuiBreadcrumbItem.vue.js +7 -0
- package/dist/components/CuiBreadcrumbItem.vue2.js +46 -0
- package/dist/components/CuiButton.vue.d.ts.map +1 -1
- package/dist/components/CuiButton.vue.js +7 -0
- package/dist/components/CuiButton.vue2.js +136 -0
- package/dist/components/CuiButtonGroup.vue.js +7 -0
- package/dist/components/CuiButtonGroup.vue2.js +21 -0
- package/dist/components/CuiCard.vue.js +35 -0
- package/dist/components/CuiCard.vue2.js +4 -0
- package/dist/components/CuiCardBody.vue.js +20 -0
- package/dist/components/CuiCardBody.vue2.js +4 -0
- package/dist/components/CuiCardFooter.vue.js +32 -0
- package/dist/components/CuiCardFooter.vue2.js +4 -0
- package/dist/components/CuiCardHeader.vue.js +51 -0
- package/dist/components/CuiCardHeader.vue2.js +4 -0
- package/dist/components/CuiCardMedia.vue.js +7 -0
- package/dist/components/CuiCardMedia.vue2.js +38 -0
- package/dist/components/CuiCheckbox.vue.js +7 -0
- package/dist/components/CuiCheckbox.vue2.js +105 -0
- package/dist/components/CuiCheckboxGroup.vue.js +7 -0
- package/dist/components/CuiCheckboxGroup.vue2.js +59 -0
- package/dist/components/CuiCodeBlock.vue.js +129 -0
- package/dist/components/CuiCodeBlock.vue2.js +4 -0
- package/dist/components/CuiColorPicker.vue.js +348 -0
- package/dist/components/CuiColorPicker.vue2.js +4 -0
- package/dist/components/CuiCombobox.vue.js +332 -0
- package/dist/components/CuiCombobox.vue2.js +4 -0
- package/dist/components/CuiConfigProvider.vue.js +18 -0
- package/dist/components/CuiConfigProvider.vue2.js +4 -0
- package/dist/components/CuiConfirmDialog.vue.js +208 -0
- package/dist/components/CuiConfirmDialog.vue2.js +4 -0
- package/dist/components/CuiContainer.vue.js +35 -0
- package/dist/components/CuiContainer.vue2.js +4 -0
- package/dist/components/CuiContextMenu.vue.js +7 -0
- package/dist/components/CuiContextMenu.vue2.js +136 -0
- package/dist/components/CuiCopyButton.vue.js +63 -0
- package/dist/components/CuiCopyButton.vue2.js +4 -0
- package/dist/components/CuiDataGrid.vue.d.ts +53 -79
- package/dist/components/CuiDataGrid.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGrid.vue.js +178 -0
- package/dist/components/CuiDataGrid.vue3.js +5 -0
- package/dist/components/CuiDataGridActiveFilters.vue.js +47 -0
- package/dist/components/CuiDataGridActiveFilters.vue3.js +5 -0
- package/dist/components/CuiDataGridBulkBar.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridBulkBar.vue.js +70 -0
- package/dist/components/CuiDataGridBulkBar.vue3.js +5 -0
- package/dist/components/CuiDataGridCardView.vue.js +31 -0
- package/dist/components/CuiDataGridCardView.vue2.js +4 -0
- package/dist/components/CuiDataGridColumnManager.vue.js +86 -0
- package/dist/components/CuiDataGridColumnManager.vue2.js +4 -0
- package/dist/components/CuiDataGridFilterPanel.vue.js +181 -0
- package/dist/components/CuiDataGridFilterPanel.vue3.js +5 -0
- package/dist/components/CuiDataGridPagination.vue.js +28 -0
- package/dist/components/CuiDataGridPagination.vue2.js +4 -0
- package/dist/components/CuiDataGridSearch.vue.js +69 -0
- package/dist/components/CuiDataGridSearch.vue2.js +4 -0
- package/dist/components/CuiDataGridTable.vue.js +336 -0
- package/dist/components/CuiDataGridTable.vue2.js +4 -0
- package/dist/components/CuiDataGridToolbar.vue.js +73 -0
- package/dist/components/CuiDataGridToolbar.vue3.js +5 -0
- package/dist/components/CuiDataGridViewManager.vue.js +209 -0
- package/dist/components/CuiDataGridViewManager.vue2.js +4 -0
- package/dist/components/CuiDataGridViewToggle.vue.js +43 -0
- package/dist/components/CuiDataGridViewToggle.vue3.js +5 -0
- package/dist/components/CuiDatePicker.vue.js +382 -0
- package/dist/components/CuiDatePicker.vue2.js +4 -0
- package/dist/components/CuiDateRangePicker.vue.js +376 -0
- package/dist/components/CuiDateRangePicker.vue2.js +4 -0
- package/dist/components/CuiDivider.vue.js +124 -0
- package/dist/components/CuiDivider.vue2.js +4 -0
- package/dist/components/CuiDropdown.vue.js +7 -0
- package/dist/components/CuiDropdown.vue2.js +110 -0
- package/dist/components/CuiDropdownCheckItem.vue.js +7 -0
- package/dist/components/CuiDropdownCheckItem.vue2.js +45 -0
- package/dist/components/CuiDropdownDivider.vue.js +14 -0
- package/dist/components/CuiDropdownHeader.vue.js +16 -0
- package/dist/components/CuiDropdownItem.vue.js +7 -0
- package/dist/components/CuiDropdownItem.vue2.js +55 -0
- package/dist/components/CuiDropdownMenu.vue.js +7 -0
- package/dist/components/CuiDropdownMenu.vue2.js +79 -0
- package/dist/components/CuiDropdownRadioGroup.vue.js +23 -0
- package/dist/components/CuiDropdownRadioGroup.vue2.js +4 -0
- package/dist/components/CuiDropdownRadioItem.vue.js +7 -0
- package/dist/components/CuiDropdownRadioItem.vue2.js +43 -0
- package/dist/components/CuiDropdownSub.vue.js +7 -0
- package/dist/components/CuiDropdownSub.vue2.js +91 -0
- package/dist/components/CuiDropdownTrigger.vue.js +7 -0
- package/dist/components/CuiDropdownTrigger.vue2.js +25 -0
- package/dist/components/CuiEmptyState.vue.js +7 -0
- package/dist/components/CuiEmptyState.vue2.js +70 -0
- package/dist/components/CuiFieldset.vue.js +7 -0
- package/dist/components/CuiFieldset.vue2.js +79 -0
- package/dist/components/CuiFileUpload.vue.js +254 -0
- package/dist/components/CuiFileUpload.vue2.js +4 -0
- package/dist/components/CuiFlex.vue.js +7 -0
- package/dist/components/CuiFlex.vue2.js +72 -0
- package/dist/components/CuiFlexItem.vue.js +35 -0
- package/dist/components/CuiFlexItem.vue2.js +4 -0
- package/dist/components/CuiForm.vue.js +116 -0
- package/dist/components/CuiForm.vue2.js +4 -0
- package/dist/components/CuiFormField.vue.js +7 -0
- package/dist/components/CuiFormField.vue2.js +73 -0
- package/dist/components/CuiGrid.vue.js +7 -0
- package/dist/components/CuiGrid.vue2.js +51 -0
- package/dist/components/CuiGridItem.vue.js +30 -0
- package/dist/components/CuiGridItem.vue2.js +4 -0
- package/dist/components/CuiIcon.vue.js +7 -0
- package/dist/components/CuiIcon.vue2.js +72 -0
- package/dist/components/CuiInput.vue.d.ts +6 -6
- package/dist/components/CuiInput.vue.d.ts.map +1 -1
- package/dist/components/CuiInput.vue.js +7 -0
- package/dist/components/CuiInput.vue2.js +150 -0
- package/dist/components/CuiInputStepper.vue.js +189 -0
- package/dist/components/CuiInputStepper.vue2.js +4 -0
- package/dist/components/CuiKbd.vue.js +44 -0
- package/dist/components/CuiKbd.vue2.js +4 -0
- package/dist/components/CuiMaskedInput.vue.d.ts +8 -8
- package/dist/components/CuiMaskedInput.vue.js +256 -0
- package/dist/components/CuiMaskedInput.vue2.js +4 -0
- package/dist/components/CuiModal.vue.js +7 -0
- package/dist/components/CuiModal.vue2.js +98 -0
- package/dist/components/CuiModalBody.vue.js +50 -0
- package/dist/components/CuiModalBody.vue2.js +4 -0
- package/dist/components/CuiModalFooter.vue.js +36 -0
- package/dist/components/CuiModalFooter.vue2.js +4 -0
- package/dist/components/CuiModalHeader.vue.js +85 -0
- package/dist/components/CuiModalHeader.vue2.js +4 -0
- package/dist/components/CuiPagination.vue.js +7 -0
- package/dist/components/CuiPagination.vue2.js +136 -0
- package/dist/components/CuiPopover.vue.js +227 -0
- package/dist/components/CuiPopover.vue2.js +4 -0
- package/dist/components/CuiProgress.vue.js +7 -0
- package/dist/components/CuiProgress.vue2.js +132 -0
- package/dist/components/CuiRadio.vue.d.ts.map +1 -1
- package/dist/components/CuiRadio.vue.js +7 -0
- package/dist/components/CuiRadio.vue2.js +139 -0
- package/dist/components/CuiRadioGroup.vue.js +7 -0
- package/dist/components/CuiRadioGroup.vue2.js +78 -0
- package/dist/components/CuiRating.vue.js +129 -0
- package/dist/components/CuiRating.vue2.js +4 -0
- package/dist/components/CuiResizablePanels.vue.js +147 -0
- package/dist/components/CuiResizablePanels.vue2.js +4 -0
- package/dist/components/CuiSelect.vue.d.ts.map +1 -1
- package/dist/components/CuiSelect.vue.js +7 -0
- package/dist/components/CuiSelect.vue2.js +359 -0
- package/dist/components/CuiSkeleton.vue.js +7 -0
- package/dist/components/CuiSkeleton.vue2.js +80 -0
- package/dist/components/CuiSlideover.vue.js +109 -0
- package/dist/components/CuiSlideover.vue2.js +4 -0
- package/dist/components/CuiSlider.vue.js +156 -0
- package/dist/components/CuiSlider.vue2.js +4 -0
- package/dist/components/CuiSpacer.vue.js +32 -0
- package/dist/components/CuiSpacer.vue2.js +4 -0
- package/dist/components/CuiSpinner.vue.js +99 -0
- package/dist/components/CuiSpinner.vue3.js +5 -0
- package/dist/components/CuiStack.vue.js +30 -0
- package/dist/components/CuiStack.vue2.js +4 -0
- package/dist/components/CuiStepper.vue.js +153 -0
- package/dist/components/CuiStepper.vue2.js +4 -0
- package/dist/components/CuiTab.vue.js +7 -0
- package/dist/components/CuiTab.vue2.js +73 -0
- package/dist/components/CuiTable.vue.d.ts.map +1 -1
- package/dist/components/CuiTable.vue.js +90 -0
- package/dist/components/CuiTable.vue3.js +5 -0
- package/dist/components/CuiTableBody.vue.js +18 -0
- package/dist/components/CuiTableBody.vue2.js +4 -0
- package/dist/components/CuiTableCell.vue.js +36 -0
- package/dist/components/CuiTableCell.vue2.js +4 -0
- package/dist/components/CuiTableFoot.vue.js +18 -0
- package/dist/components/CuiTableFoot.vue2.js +4 -0
- package/dist/components/CuiTableHead.vue.js +18 -0
- package/dist/components/CuiTableHead.vue2.js +4 -0
- package/dist/components/CuiTableRow.vue.js +23 -0
- package/dist/components/CuiTableRow.vue2.js +4 -0
- package/dist/components/CuiTabs.vue.js +7 -0
- package/dist/components/CuiTabs.vue2.js +124 -0
- package/dist/components/CuiTagInput.vue.js +296 -0
- package/dist/components/CuiTagInput.vue2.js +4 -0
- package/dist/components/CuiTextarea.vue.js +7 -0
- package/dist/components/CuiTextarea.vue2.js +112 -0
- package/dist/components/CuiTimePicker.vue.js +193 -0
- package/dist/components/CuiTimePicker.vue2.js +4 -0
- package/dist/components/CuiTimeline.vue.js +25 -0
- package/dist/components/CuiTimeline.vue2.js +4 -0
- package/dist/components/CuiTimelineItem.vue.js +113 -0
- package/dist/components/CuiTimelineItem.vue2.js +4 -0
- package/dist/components/CuiToast.vue.js +7 -0
- package/dist/components/CuiToast.vue2.js +129 -0
- package/dist/components/CuiToastProvider.vue.js +7 -0
- package/dist/components/CuiToastProvider.vue2.js +87 -0
- package/dist/components/CuiToggle.vue.d.ts.map +1 -1
- package/dist/components/CuiToggle.vue.js +7 -0
- package/dist/components/CuiToggle.vue2.js +116 -0
- package/dist/components/CuiToggleGroup.vue.js +7 -0
- package/dist/components/CuiToggleGroup.vue2.js +59 -0
- package/dist/components/CuiTooltip.vue.js +7 -0
- package/dist/components/CuiTooltip.vue2.js +128 -0
- package/dist/components/CuiTransferList.vue.js +442 -0
- package/dist/components/CuiTransferList.vue2.js +4 -0
- package/dist/components/CuiTreeNode.vue.js +180 -0
- package/dist/components/CuiTreeNode.vue2.js +4 -0
- package/dist/components/CuiTreeView.vue.js +73 -0
- package/dist/components/CuiTreeView.vue2.js +4 -0
- package/dist/components/accordion-context.js +4 -0
- package/dist/components/breadcrumb-context.js +4 -0
- package/dist/components/config-context.js +4 -0
- package/dist/components/data-grid-context.js +4 -0
- package/dist/components/dropdown-context.js +30 -0
- package/dist/components/form-context.js +4 -0
- package/dist/components/multi-select-group-context.js +5 -0
- package/dist/components/radio-context.js +4 -0
- package/dist/components/table-context.js +5 -0
- package/dist/components/tabs-context.js +4 -0
- package/dist/components/toast-context.js +45 -0
- package/dist/composables/useBreakpoint.js +34 -0
- package/dist/composables/useClickOutside.js +14 -0
- package/dist/composables/useCopyToClipboard.js +25 -0
- package/dist/composables/useDataGrid.js +269 -0
- package/dist/composables/useDataGridInertia.js +35 -0
- package/dist/composables/useDataGridViews.js +67 -0
- package/dist/composables/useDensity.js +42 -0
- package/dist/composables/useLayoutContext.js +21 -0
- package/dist/composables/useMessages.js +10 -0
- package/dist/composables/useOverlay.d.ts.map +1 -1
- package/dist/composables/useOverlay.js +59 -0
- package/dist/composables/usePopover.js +53 -0
- package/dist/composables/useScrollShadows.js +56 -0
- package/dist/composables/useTheme.js +57 -0
- package/dist/composables/useToast.js +23 -0
- package/dist/composables/useVirtualScroll.js +69 -0
- package/dist/index.js +290 -0
- package/dist/messages.js +57 -0
- package/dist/ssr-theme-init.js +13 -0
- package/dist/utils/color.js +195 -0
- package/dist/utils/colorIconMap.js +11 -0
- package/dist/utils/date.js +114 -0
- package/dist/utils/devWarn.d.ts +15 -0
- package/dist/utils/devWarn.d.ts.map +1 -0
- package/dist/utils/devWarn.js +20 -0
- package/dist/utils/liveRegion.js +12 -0
- package/dist/utils/resolvers.js +28 -0
- package/dist/utils/responsive.js +68 -0
- package/dist/utils/sizing.js +39 -0
- package/package.json +8 -7
- package/dist/clean-ui.js +0 -11937
- package/dist/clean-ui.umd.cjs +0 -11
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { defineComponent as F, computed as s, ref as $, useTemplateRef as C, withDirectives as R, openBlock as r, createElementBlock as m, normalizeStyle as n, toDisplayString as c, createCommentVNode as d, createElementVNode as u, renderSlot as B, createBlock as E, vShow as H } from "vue";
|
|
2
|
+
import { clampSize as T } from "../utils/sizing.js";
|
|
3
|
+
import j from "./CuiIcon.vue.js";
|
|
4
|
+
const D = {
|
|
5
|
+
key: 0,
|
|
6
|
+
style: { display: "flex", "justify-content": "space-between", "align-items": "baseline", "margin-bottom": "calc(0.375rem * var(--cui-density-scale, 1))" }
|
|
7
|
+
}, N = ["value", "min", "max", "step", "disabled"], M = {
|
|
8
|
+
key: 1,
|
|
9
|
+
style: { display: "flex", "justify-content": "space-between", "margin-top": "calc(0.25rem * var(--cui-density-scale, 1))" }
|
|
10
|
+
}, U = /* @__PURE__ */ F({
|
|
11
|
+
__name: "CuiSlider",
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: { default: 0 },
|
|
14
|
+
min: { default: 0 },
|
|
15
|
+
max: { default: 100 },
|
|
16
|
+
step: { default: 1 },
|
|
17
|
+
label: {},
|
|
18
|
+
showValue: { type: Boolean, default: !1 },
|
|
19
|
+
formatValue: {},
|
|
20
|
+
showRange: { type: Boolean, default: !1 },
|
|
21
|
+
thumbIcon: {},
|
|
22
|
+
hidden: { type: Boolean, default: !1 },
|
|
23
|
+
color: { default: "primary" },
|
|
24
|
+
size: { default: "md" },
|
|
25
|
+
disabled: { type: Boolean, default: !1 }
|
|
26
|
+
},
|
|
27
|
+
emits: ["update:modelValue"],
|
|
28
|
+
setup(e, { expose: h, emit: y }) {
|
|
29
|
+
const t = e, g = y, b = s(
|
|
30
|
+
() => (t.modelValue - t.min) / (t.max - t.min) * 100
|
|
31
|
+
), x = s(
|
|
32
|
+
() => t.formatValue ? t.formatValue(t.modelValue) : String(t.modelValue)
|
|
33
|
+
), i = $(!1);
|
|
34
|
+
function p(o) {
|
|
35
|
+
const a = parseFloat(o.target.value);
|
|
36
|
+
g("update:modelValue", a);
|
|
37
|
+
}
|
|
38
|
+
const S = ["sm", "md", "lg"], V = {
|
|
39
|
+
sm: { trackHeight: "4px", thumbSize: "16px", thumbIcon: "0.5rem", labelFont: "0.8125rem", valueFont: "0.75rem" },
|
|
40
|
+
md: { trackHeight: "6px", thumbSize: "20px", thumbIcon: "0.625rem", labelFont: "0.875rem", valueFont: "0.8125rem" },
|
|
41
|
+
lg: { trackHeight: "8px", thumbSize: "26px", thumbIcon: "0.75rem", labelFont: "1rem", valueFont: "0.875rem" }
|
|
42
|
+
}, l = s(() => V[T(t.size, S)]), z = s(() => t.disabled ? "var(--cui-text-tertiary)" : `var(--cui-${t.color})`), w = s(() => t.disabled ? "var(--cui-text-tertiary)" : `var(--cui-${t.color})`), f = C("inputEl");
|
|
43
|
+
function k(o) {
|
|
44
|
+
var a;
|
|
45
|
+
(a = f.value) == null || a.focus(o);
|
|
46
|
+
}
|
|
47
|
+
function I() {
|
|
48
|
+
var o;
|
|
49
|
+
(o = f.value) == null || o.blur();
|
|
50
|
+
}
|
|
51
|
+
return h({ el: f, focus: k, blur: I }), (o, a) => R((r(), m("div", {
|
|
52
|
+
style: n({ opacity: e.disabled ? 0.5 : 1 })
|
|
53
|
+
}, [
|
|
54
|
+
e.label || e.showValue ? (r(), m("div", D, [
|
|
55
|
+
e.label ? (r(), m("label", {
|
|
56
|
+
key: 0,
|
|
57
|
+
style: n({ fontSize: l.value.labelFont, fontWeight: "500", color: "var(--cui-text-secondary)" })
|
|
58
|
+
}, c(e.label), 5)) : d("", !0),
|
|
59
|
+
e.showValue ? (r(), m("span", {
|
|
60
|
+
key: 1,
|
|
61
|
+
style: n({ fontSize: l.value.valueFont, fontWeight: "600", color: "var(--cui-text-body)", fontVariantNumeric: "tabular-nums" })
|
|
62
|
+
}, c(x.value), 5)) : d("", !0)
|
|
63
|
+
])) : d("", !0),
|
|
64
|
+
u("div", {
|
|
65
|
+
style: n({ position: "relative", height: l.value.thumbSize, display: "flex", alignItems: "center" })
|
|
66
|
+
}, [
|
|
67
|
+
u("div", {
|
|
68
|
+
style: n({
|
|
69
|
+
position: "absolute",
|
|
70
|
+
left: "0",
|
|
71
|
+
right: "0",
|
|
72
|
+
height: l.value.trackHeight,
|
|
73
|
+
borderRadius: "9999px",
|
|
74
|
+
background: "var(--cui-border)"
|
|
75
|
+
})
|
|
76
|
+
}, null, 4),
|
|
77
|
+
u("div", {
|
|
78
|
+
style: n({
|
|
79
|
+
position: "absolute",
|
|
80
|
+
left: "0",
|
|
81
|
+
height: l.value.trackHeight,
|
|
82
|
+
width: `${b.value}%`,
|
|
83
|
+
borderRadius: "9999px",
|
|
84
|
+
background: w.value,
|
|
85
|
+
transition: i.value ? "none" : "width 0.1s ease"
|
|
86
|
+
})
|
|
87
|
+
}, null, 4),
|
|
88
|
+
u("div", {
|
|
89
|
+
style: n({
|
|
90
|
+
position: "absolute",
|
|
91
|
+
left: `${b.value}%`,
|
|
92
|
+
transform: "translateX(-50%)",
|
|
93
|
+
width: l.value.thumbSize,
|
|
94
|
+
height: l.value.thumbSize,
|
|
95
|
+
borderRadius: "50%",
|
|
96
|
+
background: z.value,
|
|
97
|
+
border: "2px solid var(--cui-surface-base, white)",
|
|
98
|
+
boxShadow: i.value ? "0 2px 8px rgba(0,0,0,0.25)" : "0 1px 3px rgba(0,0,0,0.15)",
|
|
99
|
+
display: "flex",
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
justifyContent: "center",
|
|
102
|
+
color: "var(--cui-surface-base, white)",
|
|
103
|
+
transition: i.value ? "none" : "left 0.1s ease, box-shadow 0.15s ease, transform 0.15s ease",
|
|
104
|
+
pointerEvents: "none",
|
|
105
|
+
zIndex: 2
|
|
106
|
+
})
|
|
107
|
+
}, [
|
|
108
|
+
B(o.$slots, "thumb", {}, () => [
|
|
109
|
+
e.thumbIcon ? (r(), E(j, {
|
|
110
|
+
key: 0,
|
|
111
|
+
name: e.thumbIcon,
|
|
112
|
+
size: l.value.thumbIcon
|
|
113
|
+
}, null, 8, ["name", "size"])) : d("", !0)
|
|
114
|
+
])
|
|
115
|
+
], 4),
|
|
116
|
+
u("input", {
|
|
117
|
+
ref: "inputEl",
|
|
118
|
+
type: "range",
|
|
119
|
+
value: e.modelValue,
|
|
120
|
+
min: e.min,
|
|
121
|
+
max: e.max,
|
|
122
|
+
step: e.step,
|
|
123
|
+
disabled: e.disabled,
|
|
124
|
+
style: n({
|
|
125
|
+
position: "absolute",
|
|
126
|
+
left: "0",
|
|
127
|
+
width: "100%",
|
|
128
|
+
height: "100%",
|
|
129
|
+
margin: "0",
|
|
130
|
+
opacity: "0",
|
|
131
|
+
cursor: e.disabled ? "default" : "pointer",
|
|
132
|
+
zIndex: 3
|
|
133
|
+
}),
|
|
134
|
+
onInput: p,
|
|
135
|
+
onMousedown: a[0] || (a[0] = (v) => i.value = !0),
|
|
136
|
+
onMouseup: a[1] || (a[1] = (v) => i.value = !1),
|
|
137
|
+
onTouchstart: a[2] || (a[2] = (v) => i.value = !0),
|
|
138
|
+
onTouchend: a[3] || (a[3] = (v) => i.value = !1)
|
|
139
|
+
}, null, 44, N)
|
|
140
|
+
], 4),
|
|
141
|
+
e.showRange ? (r(), m("div", M, [
|
|
142
|
+
u("span", {
|
|
143
|
+
style: n({ fontSize: l.value.valueFont, color: "var(--cui-text-tertiary)" })
|
|
144
|
+
}, c(e.formatValue ? e.formatValue(e.min) : e.min), 5),
|
|
145
|
+
u("span", {
|
|
146
|
+
style: n({ fontSize: l.value.valueFont, color: "var(--cui-text-tertiary)" })
|
|
147
|
+
}, c(e.formatValue ? e.formatValue(e.max) : e.max), 5)
|
|
148
|
+
])) : d("", !0)
|
|
149
|
+
], 4)), [
|
|
150
|
+
[H, !e.hidden]
|
|
151
|
+
]);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
export {
|
|
155
|
+
U as default
|
|
156
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent as l, computed as c, withDirectives as p, openBlock as d, createElementBlock as h, normalizeStyle as u, vShow as f } from "vue";
|
|
2
|
+
import { useBreakpoint as m } from "../composables/useBreakpoint.js";
|
|
3
|
+
import { resolveResponsive as v, spacingToCss as z } from "../utils/responsive.js";
|
|
4
|
+
const k = /* @__PURE__ */ l({
|
|
5
|
+
__name: "CuiSpacer",
|
|
6
|
+
props: {
|
|
7
|
+
size: {},
|
|
8
|
+
orientation: { default: "horizontal" },
|
|
9
|
+
hidden: { type: Boolean, default: !1 }
|
|
10
|
+
},
|
|
11
|
+
setup(i) {
|
|
12
|
+
const t = i, { breakpoint: r } = m(), a = c(() => {
|
|
13
|
+
const n = r.value, o = v(t.size, void 0, n), e = {};
|
|
14
|
+
if (o) {
|
|
15
|
+
const s = z(o);
|
|
16
|
+
t.orientation === "horizontal" ? e.width = s : e.height = s;
|
|
17
|
+
} else
|
|
18
|
+
e.flexGrow = "1", t.orientation === "horizontal" ? e.width = "0" : e.height = "0";
|
|
19
|
+
return e;
|
|
20
|
+
});
|
|
21
|
+
return (n, o) => p((d(), h("div", {
|
|
22
|
+
class: "cui-spacer",
|
|
23
|
+
style: u(a.value),
|
|
24
|
+
"aria-hidden": "true"
|
|
25
|
+
}, null, 4)), [
|
|
26
|
+
[f, !i.hidden]
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
k as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { defineComponent as v, computed as m, withDirectives as p, openBlock as a, createElementBlock as i, normalizeStyle as r, Fragment as u, renderList as b, createElementVNode as c, createCommentVNode as s, toDisplayString as h, vShow as x } from "vue";
|
|
2
|
+
import { scaleDensity as o } from "../utils/sizing.js";
|
|
3
|
+
const f = ["aria-label"], y = {
|
|
4
|
+
key: 4,
|
|
5
|
+
style: { position: "absolute", width: "1px", height: "1px", overflow: "hidden", clip: "rect(0,0,0,0)", "white-space": "nowrap" }
|
|
6
|
+
}, W = /* @__PURE__ */ v({
|
|
7
|
+
__name: "CuiSpinner",
|
|
8
|
+
props: {
|
|
9
|
+
variant: { default: "ring" },
|
|
10
|
+
label: { default: "Loading" },
|
|
11
|
+
showLabel: { type: Boolean, default: !1 },
|
|
12
|
+
hidden: { type: Boolean, default: !1 },
|
|
13
|
+
color: { default: "primary" },
|
|
14
|
+
size: { default: "md" }
|
|
15
|
+
},
|
|
16
|
+
setup(t) {
|
|
17
|
+
const d = t, g = {
|
|
18
|
+
xs: { box: "0.875rem", stroke: "2px", dotSize: "0.25rem", barWidth: "0.1875rem", barHeight: "0.5rem", labelFont: "0.6875rem", gap: o("0.25rem") },
|
|
19
|
+
sm: { box: "1.25rem", stroke: "2px", dotSize: "0.3125rem", barWidth: "0.1875rem", barHeight: "0.625rem", labelFont: "0.75rem", gap: o("0.375rem") },
|
|
20
|
+
md: { box: "1.75rem", stroke: "3px", dotSize: "0.375rem", barWidth: "0.25rem", barHeight: "0.875rem", labelFont: "0.8125rem", gap: o("0.5rem") },
|
|
21
|
+
lg: { box: "2.5rem", stroke: "3px", dotSize: "0.5rem", barWidth: "0.25rem", barHeight: "1.125rem", labelFont: "0.875rem", gap: o("0.5rem") },
|
|
22
|
+
xl: { box: "3.5rem", stroke: "4px", dotSize: "0.625rem", barWidth: "0.3125rem", barHeight: "1.5rem", labelFont: "1rem", gap: o("0.625rem") }
|
|
23
|
+
}, e = m(() => g[d.size]), n = m(() => `var(--cui-${d.color})`);
|
|
24
|
+
return (k, z) => p((a(), i("div", {
|
|
25
|
+
role: "status",
|
|
26
|
+
"aria-label": t.label,
|
|
27
|
+
style: r({
|
|
28
|
+
display: "inline-flex",
|
|
29
|
+
flexDirection: "column",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
gap: e.value.gap
|
|
32
|
+
})
|
|
33
|
+
}, [
|
|
34
|
+
t.variant === "ring" ? (a(), i("div", {
|
|
35
|
+
key: 0,
|
|
36
|
+
style: r({
|
|
37
|
+
width: e.value.box,
|
|
38
|
+
height: e.value.box,
|
|
39
|
+
borderRadius: "50%",
|
|
40
|
+
border: `${e.value.stroke} solid var(--cui-border)`,
|
|
41
|
+
borderTopColor: n.value,
|
|
42
|
+
animation: "cui-spin 0.75s linear infinite"
|
|
43
|
+
})
|
|
44
|
+
}, null, 4)) : t.variant === "dots" ? (a(), i("div", {
|
|
45
|
+
key: 1,
|
|
46
|
+
style: r({
|
|
47
|
+
display: "flex",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
gap: e.value.dotSize,
|
|
50
|
+
height: e.value.box
|
|
51
|
+
})
|
|
52
|
+
}, [
|
|
53
|
+
(a(), i(u, null, b(3, (l) => c("div", {
|
|
54
|
+
key: l,
|
|
55
|
+
style: r({
|
|
56
|
+
width: e.value.dotSize,
|
|
57
|
+
height: e.value.dotSize,
|
|
58
|
+
borderRadius: "50%",
|
|
59
|
+
background: n.value,
|
|
60
|
+
animation: `cui-spinner-bounce 1.4s ease-in-out ${(l - 1) * 0.16}s infinite both`
|
|
61
|
+
})
|
|
62
|
+
}, null, 4)), 64))
|
|
63
|
+
], 4)) : t.variant === "bars" ? (a(), i("div", {
|
|
64
|
+
key: 2,
|
|
65
|
+
style: r({
|
|
66
|
+
display: "flex",
|
|
67
|
+
alignItems: "center",
|
|
68
|
+
gap: `calc(${e.value.barWidth} * 0.75)`,
|
|
69
|
+
height: e.value.box
|
|
70
|
+
})
|
|
71
|
+
}, [
|
|
72
|
+
(a(), i(u, null, b(4, (l) => c("div", {
|
|
73
|
+
key: l,
|
|
74
|
+
style: r({
|
|
75
|
+
width: e.value.barWidth,
|
|
76
|
+
height: e.value.barHeight,
|
|
77
|
+
borderRadius: "9999px",
|
|
78
|
+
background: n.value,
|
|
79
|
+
animation: `cui-spinner-bars 1.2s ease-in-out ${(l - 1) * 0.1}s infinite`
|
|
80
|
+
})
|
|
81
|
+
}, null, 4)), 64))
|
|
82
|
+
], 4)) : s("", !0),
|
|
83
|
+
t.showLabel ? (a(), i("span", {
|
|
84
|
+
key: 3,
|
|
85
|
+
style: r({
|
|
86
|
+
fontSize: e.value.labelFont,
|
|
87
|
+
color: "var(--cui-text-secondary)",
|
|
88
|
+
fontWeight: "500"
|
|
89
|
+
})
|
|
90
|
+
}, h(t.label), 5)) : s("", !0),
|
|
91
|
+
t.showLabel ? s("", !0) : (a(), i("span", y, h(t.label), 1))
|
|
92
|
+
], 12, f)), [
|
|
93
|
+
[x, !t.hidden]
|
|
94
|
+
]);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
export {
|
|
98
|
+
W as default
|
|
99
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as a, withDirectives as i, openBlock as o, createBlock as n, withCtx as l, renderSlot as r, vShow as c } from "vue";
|
|
2
|
+
import d from "./CuiFlex.vue.js";
|
|
3
|
+
const p = /* @__PURE__ */ a({
|
|
4
|
+
__name: "CuiStack",
|
|
5
|
+
props: {
|
|
6
|
+
orientation: { default: "vertical" },
|
|
7
|
+
spacing: { default: "4" },
|
|
8
|
+
debug: { type: Boolean, default: !1 },
|
|
9
|
+
hidden: { type: Boolean, default: !1 }
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
return (t, u) => i((o(), n(d, {
|
|
13
|
+
direction: e.orientation === "vertical" ? "col" : "row",
|
|
14
|
+
gap: e.spacing,
|
|
15
|
+
debug: e.debug,
|
|
16
|
+
wrap: "nowrap",
|
|
17
|
+
class: "cui-stack"
|
|
18
|
+
}, {
|
|
19
|
+
default: l(() => [
|
|
20
|
+
r(t.$slots, "default")
|
|
21
|
+
]),
|
|
22
|
+
_: 3
|
|
23
|
+
}, 8, ["direction", "gap", "debug"])), [
|
|
24
|
+
[c, !e.hidden]
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
p as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { defineComponent as V, computed as D, withDirectives as B, openBlock as c, createElementBlock as u, unref as I, normalizeStyle as a, Fragment as h, renderList as $, createElementVNode as m, createBlock as d, toDisplayString as f, createCommentVNode as p, vShow as E } from "vue";
|
|
2
|
+
import { clampSize as H, scaleDensity as v } from "../utils/sizing.js";
|
|
3
|
+
import g from "./CuiIcon.vue.js";
|
|
4
|
+
import { useMessages as R } from "../composables/useMessages.js";
|
|
5
|
+
const W = ["aria-label"], L = ["aria-current", "onClick"], N = { key: 3 }, U = /* @__PURE__ */ V({
|
|
6
|
+
__name: "CuiStepper",
|
|
7
|
+
props: {
|
|
8
|
+
steps: {},
|
|
9
|
+
modelValue: { default: 0 },
|
|
10
|
+
orientation: { default: "horizontal" },
|
|
11
|
+
clickable: { type: Boolean, default: !0 },
|
|
12
|
+
linear: { type: Boolean, default: !0 },
|
|
13
|
+
hidden: { type: Boolean, default: !1 },
|
|
14
|
+
size: { default: "md" }
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue"],
|
|
17
|
+
setup(i, { emit: y }) {
|
|
18
|
+
const l = i, b = y;
|
|
19
|
+
function s(r) {
|
|
20
|
+
var e;
|
|
21
|
+
return (e = l.steps[r]) != null && e.error ? "error" : r < l.modelValue ? "complete" : r === l.modelValue ? "current" : "upcoming";
|
|
22
|
+
}
|
|
23
|
+
function k(r) {
|
|
24
|
+
if (!l.clickable) return;
|
|
25
|
+
const e = s(r);
|
|
26
|
+
l.linear && e === "upcoming" || b("update:modelValue", r);
|
|
27
|
+
}
|
|
28
|
+
const z = ["sm", "md", "lg"], S = {
|
|
29
|
+
sm: { circle: "1.5rem", font: "0.6875rem", iconSize: "0.75rem", labelFont: "0.8125rem", descFont: "0.6875rem", connectorThickness: "2px", gap: v("0.5rem") },
|
|
30
|
+
md: { circle: "2rem", font: "0.75rem", iconSize: "0.875rem", labelFont: "0.875rem", descFont: "0.75rem", connectorThickness: "2px", gap: v("0.75rem") },
|
|
31
|
+
lg: { circle: "2.5rem", font: "0.875rem", iconSize: "1rem", labelFont: "1rem", descFont: "0.8125rem", connectorThickness: "3px", gap: v("1rem") }
|
|
32
|
+
}, t = D(() => S[H(l.size, z)]);
|
|
33
|
+
function x(r) {
|
|
34
|
+
const e = {
|
|
35
|
+
width: t.value.circle,
|
|
36
|
+
height: t.value.circle,
|
|
37
|
+
borderRadius: "50%",
|
|
38
|
+
display: "flex",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
justifyContent: "center",
|
|
41
|
+
fontSize: t.value.font,
|
|
42
|
+
fontWeight: "600",
|
|
43
|
+
flexShrink: "0",
|
|
44
|
+
transition: "background 0.2s ease, color 0.2s ease, border-color 0.2s ease"
|
|
45
|
+
};
|
|
46
|
+
return r === "complete" ? (e.background = "var(--cui-primary)", e.color = "var(--cui-primary-text, white)", e.border = "2px solid var(--cui-primary)") : r === "current" ? (e.background = "var(--cui-surface-base, white)", e.color = "var(--cui-primary)", e.border = "2px solid var(--cui-primary)") : r === "error" ? (e.background = "var(--cui-error-bg)", e.color = "var(--cui-error)", e.border = "2px solid var(--cui-error)") : (e.background = "var(--cui-surface-base, white)", e.color = "var(--cui-text-tertiary)", e.border = "2px solid var(--cui-border)"), e;
|
|
47
|
+
}
|
|
48
|
+
function w(r) {
|
|
49
|
+
const e = r < l.modelValue, o = {
|
|
50
|
+
transition: "background 0.3s ease"
|
|
51
|
+
};
|
|
52
|
+
return l.orientation === "horizontal" ? (o.flex = "1", o.height = t.value.connectorThickness, o.minWidth = "1.5rem") : (o.width = t.value.connectorThickness, o.flex = "1", o.minHeight = "1.5rem"), o.borderRadius = "9999px", o.background = e ? "var(--cui-primary)" : "var(--cui-border)", o;
|
|
53
|
+
}
|
|
54
|
+
function C(r) {
|
|
55
|
+
const e = {
|
|
56
|
+
fontSize: t.value.labelFont,
|
|
57
|
+
fontWeight: r === "current" ? "600" : "500",
|
|
58
|
+
lineHeight: "1.3",
|
|
59
|
+
transition: "color 0.2s ease"
|
|
60
|
+
};
|
|
61
|
+
return r === "current" || r === "complete" ? e.color = "var(--cui-text-body)" : r === "error" ? e.color = "var(--cui-error)" : e.color = "var(--cui-text-tertiary)", e;
|
|
62
|
+
}
|
|
63
|
+
function T(r) {
|
|
64
|
+
if (!l.clickable) return "default";
|
|
65
|
+
const e = s(r);
|
|
66
|
+
return l.linear && e === "upcoming" ? "default" : "pointer";
|
|
67
|
+
}
|
|
68
|
+
const F = R();
|
|
69
|
+
return (r, e) => B((c(), u("div", {
|
|
70
|
+
class: "cui-stepper",
|
|
71
|
+
style: a({
|
|
72
|
+
display: "flex",
|
|
73
|
+
flexDirection: i.orientation === "horizontal" ? "row" : "column",
|
|
74
|
+
alignItems: i.orientation === "horizontal" ? "flex-start" : "stretch",
|
|
75
|
+
gap: t.value.gap
|
|
76
|
+
}),
|
|
77
|
+
role: "navigation",
|
|
78
|
+
"aria-label": I(F).stepper.label
|
|
79
|
+
}, [
|
|
80
|
+
(c(!0), u(h, null, $(i.steps, (o, n) => (c(), u(h, { key: n }, [
|
|
81
|
+
m("div", {
|
|
82
|
+
style: a({
|
|
83
|
+
display: "flex",
|
|
84
|
+
flexDirection: i.orientation === "horizontal" ? "column" : "row",
|
|
85
|
+
alignItems: i.orientation === "horizontal" ? "center" : "flex-start",
|
|
86
|
+
gap: "calc(0.375rem * var(--cui-density-scale, 1))",
|
|
87
|
+
cursor: T(n),
|
|
88
|
+
flex: i.orientation === "horizontal" ? "0 0 auto" : void 0
|
|
89
|
+
}),
|
|
90
|
+
"aria-current": s(n) === "current" ? "step" : void 0,
|
|
91
|
+
onClick: (P) => k(n)
|
|
92
|
+
}, [
|
|
93
|
+
m("div", {
|
|
94
|
+
style: a({
|
|
95
|
+
display: "flex",
|
|
96
|
+
flexDirection: i.orientation === "horizontal" ? "row" : "column",
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
gap: t.value.gap
|
|
99
|
+
})
|
|
100
|
+
}, [
|
|
101
|
+
m("div", {
|
|
102
|
+
style: a(x(s(n)))
|
|
103
|
+
}, [
|
|
104
|
+
s(n) === "complete" ? (c(), d(g, {
|
|
105
|
+
key: 0,
|
|
106
|
+
name: "check",
|
|
107
|
+
size: t.value.iconSize
|
|
108
|
+
}, null, 8, ["size"])) : s(n) === "error" ? (c(), d(g, {
|
|
109
|
+
key: 1,
|
|
110
|
+
name: "warning",
|
|
111
|
+
size: t.value.iconSize
|
|
112
|
+
}, null, 8, ["size"])) : o.icon ? (c(), d(g, {
|
|
113
|
+
key: 2,
|
|
114
|
+
name: o.icon,
|
|
115
|
+
size: t.value.iconSize
|
|
116
|
+
}, null, 8, ["name", "size"])) : (c(), u("span", N, f(n + 1), 1))
|
|
117
|
+
], 4)
|
|
118
|
+
], 4),
|
|
119
|
+
m("div", {
|
|
120
|
+
style: a({ textAlign: i.orientation === "horizontal" ? "center" : "left" })
|
|
121
|
+
}, [
|
|
122
|
+
m("div", {
|
|
123
|
+
style: a(C(s(n)))
|
|
124
|
+
}, f(o.label), 5),
|
|
125
|
+
o.description ? (c(), u("div", {
|
|
126
|
+
key: 0,
|
|
127
|
+
style: a({
|
|
128
|
+
fontSize: t.value.descFont,
|
|
129
|
+
color: "var(--cui-text-tertiary)",
|
|
130
|
+
marginTop: "calc(0.125rem * var(--cui-density-scale, 1))",
|
|
131
|
+
lineHeight: "1.4"
|
|
132
|
+
})
|
|
133
|
+
}, f(o.description), 5)) : p("", !0)
|
|
134
|
+
], 4)
|
|
135
|
+
], 12, L),
|
|
136
|
+
n < i.steps.length - 1 ? (c(), u("div", {
|
|
137
|
+
key: 0,
|
|
138
|
+
style: a({
|
|
139
|
+
...w(n),
|
|
140
|
+
alignSelf: i.orientation === "horizontal" ? "center" : void 0,
|
|
141
|
+
marginLeft: i.orientation === "vertical" ? `calc(${t.value.circle} / 2 - ${t.value.connectorThickness} / 2)` : void 0,
|
|
142
|
+
marginTop: i.orientation === "horizontal" ? `calc(${t.value.circle} / 2 - ${t.value.connectorThickness} / 2)` : void 0
|
|
143
|
+
})
|
|
144
|
+
}, null, 4)) : p("", !0)
|
|
145
|
+
], 64))), 128))
|
|
146
|
+
], 12, W)), [
|
|
147
|
+
[E, !i.hidden]
|
|
148
|
+
]);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
export {
|
|
152
|
+
U as default
|
|
153
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineComponent as m, inject as p, computed as u, onMounted as h, watch as y, onUnmounted as x, unref as C, withDirectives as d, openBlock as s, createElementBlock as b, normalizeClass as c, renderSlot as v, vShow as f, createCommentVNode as T } from "vue";
|
|
2
|
+
import { TabsContextKey as g } from "./tabs-context.js";
|
|
3
|
+
const k = ["aria-labelledby"], w = ["aria-labelledby"], I = /* @__PURE__ */ m({
|
|
4
|
+
__name: "CuiTab",
|
|
5
|
+
props: {
|
|
6
|
+
value: {},
|
|
7
|
+
label: {},
|
|
8
|
+
closeable: { type: Boolean, default: !1 },
|
|
9
|
+
hidden: { type: Boolean, default: !1 },
|
|
10
|
+
disabled: { type: Boolean, default: !1 }
|
|
11
|
+
},
|
|
12
|
+
setup(n) {
|
|
13
|
+
const e = n, a = p(g);
|
|
14
|
+
if (!a)
|
|
15
|
+
throw new Error("[CuiTab] must be used inside a <CuiTabs> component.");
|
|
16
|
+
const i = u(() => a.activeTab.value === e.value);
|
|
17
|
+
h(() => {
|
|
18
|
+
a.register({
|
|
19
|
+
value: e.value,
|
|
20
|
+
label: e.label,
|
|
21
|
+
disabled: e.disabled,
|
|
22
|
+
closeable: e.closeable
|
|
23
|
+
});
|
|
24
|
+
}), y(
|
|
25
|
+
() => ({ label: e.label, disabled: e.disabled, closeable: e.closeable }),
|
|
26
|
+
() => {
|
|
27
|
+
a.unregister(e.value), a.register({
|
|
28
|
+
value: e.value,
|
|
29
|
+
label: e.label,
|
|
30
|
+
disabled: e.disabled,
|
|
31
|
+
closeable: e.closeable
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
), x(() => {
|
|
35
|
+
a.unregister(e.value);
|
|
36
|
+
});
|
|
37
|
+
const o = u(() => {
|
|
38
|
+
if (a.transition.value !== "none") {
|
|
39
|
+
if (a.transition.value === "slide") {
|
|
40
|
+
const t = r(a.previousTab.value);
|
|
41
|
+
return r(e.value) >= t ? "cui-tab-slide-left" : "cui-tab-slide-right";
|
|
42
|
+
}
|
|
43
|
+
return "cui-tab-fade";
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
function r(t) {
|
|
47
|
+
const l = document.querySelector(`[data-cui-tab-value="${t}"]`);
|
|
48
|
+
return l != null && l.parentElement ? Array.from(l.parentElement.children).indexOf(l) : 0;
|
|
49
|
+
}
|
|
50
|
+
return (t, l) => C(a).keepAlive.value ? d((s(), b("div", {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: c(["cui-tab-panel", [i.value ? o.value : ""]]),
|
|
53
|
+
role: "tabpanel",
|
|
54
|
+
"aria-labelledby": n.value
|
|
55
|
+
}, [
|
|
56
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
57
|
+
], 10, k)), [
|
|
58
|
+
[f, i.value && !n.hidden]
|
|
59
|
+
]) : i.value ? d((s(), b("div", {
|
|
60
|
+
key: 1,
|
|
61
|
+
class: c(["cui-tab-panel", o.value]),
|
|
62
|
+
role: "tabpanel",
|
|
63
|
+
"aria-labelledby": n.value
|
|
64
|
+
}, [
|
|
65
|
+
v(t.$slots, "default", {}, void 0, !0)
|
|
66
|
+
], 10, w)), [
|
|
67
|
+
[f, !n.hidden]
|
|
68
|
+
]) : T("", !0);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
export {
|
|
72
|
+
I as default
|
|
73
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CuiTable.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CuiTable.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTable.vue"],"names":[],"mappings":"AAyPA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIpE,MAAM,WAAW,aAAc,SAAQ,aAAa,EAAE,aAAa;IACjE,kCAAkC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uDAAuD;IACvD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAuHD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA4B/C,QAAA,MAAM,eAAe;;;;;aAzKT,OAAO;eAEL,OAAO;cAER,OAAO;kBAEH,OAAO;iBAER,OAAO;6EAyKrB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|