@ac-design/design-system 1.0.3 → 2.0.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/README.md +27 -18
- package/dist/lib/charts/ChartFrame.js +5 -0
- package/dist/lib/charts/ChartFrame.vue.d.ts +69 -0
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/lib/charts/index.d.ts +7 -0
- package/dist/lib/charts/index.js +5 -0
- package/dist/lib/charts/shared.d.ts +60 -0
- package/dist/lib/charts/shared.js +114 -0
- package/dist/lib/charts/xy.d.ts +65 -0
- package/dist/lib/charts/xy.js +92 -0
- package/dist/lib/compat.css +1707 -1042
- package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcAccordionItem.vue.d.ts +1 -1
- package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/lib/components/AcAlert.vue.d.ts +1 -1
- package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +19 -25
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/lib/components/AcAreaChart.js +5 -0
- package/dist/lib/components/AcAreaChart.vue.d.ts +44 -0
- package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +215 -0
- package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcBadge.vue.d.ts +16 -7
- package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +59 -43
- package/dist/lib/components/AcBanner.vue.d.ts +1 -1
- package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +30 -30
- package/dist/lib/components/AcBarChart.js +5 -0
- package/dist/lib/components/AcBarChart.vue.d.ts +43 -0
- package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +217 -0
- package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +27 -26
- package/dist/lib/components/AcBulkActionBar.js +5 -0
- package/dist/lib/components/AcBulkActionBar.vue.d.ts +43 -0
- package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
- package/dist/lib/components/AcButton.vue.d.ts +3 -3
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +42 -34
- package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcCard.vue.d.ts +10 -2
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +37 -11
- package/dist/lib/components/AcCellValue.vue.d.ts +4 -1
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +214 -179
- package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +126 -29
- package/dist/lib/components/AcCheckRadio.vue.d.ts +1 -1
- package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +33 -21
- package/dist/lib/components/AcCircularProgress.js +5 -0
- package/dist/lib/components/AcCircularProgress.vue.d.ts +44 -0
- package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +111 -0
- package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +142 -167
- package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/lib/components/AcColorInput.js +5 -0
- package/dist/lib/components/AcColorInput.vue.d.ts +54 -0
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/lib/components/AcConfirmModal.js +5 -0
- package/dist/lib/components/AcConfirmModal.vue.d.ts +56 -0
- package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/lib/components/AcContentHeader.vue.d.ts +1 -1
- package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcCopyButton.js +5 -0
- package/dist/lib/components/AcCopyButton.vue.d.ts +43 -0
- package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/lib/components/AcDatePicker.vue.d.ts +5 -5
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +204 -213
- package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
- package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +37 -46
- package/dist/lib/components/AcDonutChart.js +5 -0
- package/dist/lib/components/AcDonutChart.vue.d.ts +73 -0
- package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +210 -0
- package/dist/lib/components/AcDropdown.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/lib/components/AcEmptyState.vue.d.ts +4 -1
- package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +50 -39
- package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +14 -13
- package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/lib/components/AcFileUpload.vue.d.ts +2 -2
- package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +55 -53
- package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcFooter.js +5 -0
- package/dist/lib/components/AcFooter.vue.d.ts +37 -0
- package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/lib/components/AcForm.vue.d.ts +3 -0
- package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/lib/components/AcFormArray.vue.d.ts +2 -2
- package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +149 -147
- package/dist/lib/components/AcFormFooter.vue.d.ts +2 -2
- package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcFormSection.vue.d.ts +7 -0
- package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
- package/dist/lib/components/AcHeader.vue.d.ts +3 -3
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +22 -22
- package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
- package/dist/lib/components/AcInput.vue.d.ts +3 -3
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +98 -87
- package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcKeyValueInput.js +5 -0
- package/dist/lib/components/AcKeyValueInput.vue.d.ts +114 -0
- package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +320 -0
- package/dist/lib/components/AcLineChart.js +5 -0
- package/dist/lib/components/AcLineChart.vue.d.ts +38 -0
- package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/lib/components/AcLocaleSwitcher.js +5 -0
- package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +46 -0
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +22 -22
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +26 -26
- package/dist/lib/components/AcNumberInput.js +5 -0
- package/dist/lib/components/AcNumberInput.vue.d.ts +79 -0
- package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/lib/components/AcPage.vue.d.ts +2 -2
- package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcPagination.vue.d.ts +20 -3
- package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +81 -53
- package/dist/lib/components/AcPreloader.vue.d.ts +1 -1
- package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/lib/components/AcProgress.vue.d.ts +2 -2
- package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcResourceCard.vue.d.ts +2 -2
- package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
- package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/lib/components/AcSectionContent.vue.d.ts +2 -2
- package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcSegmentedControl.vue.d.ts +1 -1
- package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcSelect.vue.d.ts +4 -4
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +230 -227
- package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +31 -31
- package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
- package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/lib/components/AcSidebar.vue.d.ts +3 -3
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +75 -75
- package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +33 -32
- package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcSlider.vue.d.ts +1 -1
- package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +174 -172
- package/dist/lib/components/AcStatCard.vue.d.ts +3 -3
- package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +90 -85
- package/dist/lib/components/AcStatusBar.vue.d.ts +1 -1
- package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +39 -34
- package/dist/lib/components/AcSwitchCard.js +5 -0
- package/dist/lib/components/AcSwitchCard.vue.d.ts +59 -0
- package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +119 -0
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +87 -87
- package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcTag.vue.d.ts +1 -1
- package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +22 -22
- package/dist/lib/components/AcTagInput.js +5 -0
- package/dist/lib/components/AcTagInput.vue.d.ts +74 -0
- package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +291 -0
- package/dist/lib/components/AcTextarea.vue.d.ts +3 -3
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +89 -64
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/lib/components/AcTimePicker.js +5 -0
- package/dist/lib/components/AcTimePicker.vue.d.ts +65 -0
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +463 -0
- package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +65 -71
- package/dist/lib/components/AcTooltip.vue.d.ts +1 -1
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +77 -67
- package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +111 -103
- package/dist/lib/components/index.d.ts +14 -2
- package/dist/lib/components/status.d.ts +26 -0
- package/dist/lib/components/status.js +110 -0
- package/dist/lib/composables/copyText.d.ts +2 -1
- package/dist/lib/composables/copyText.js +2 -2
- package/dist/lib/composables/useApiPagination.d.ts +55 -0
- package/dist/lib/composables/useApiPagination.js +58 -0
- package/dist/lib/composables/useBulkSelection.d.ts +44 -0
- package/dist/lib/composables/useBulkSelection.js +41 -0
- package/dist/lib/composables/useFormValidation.d.ts +65 -0
- package/dist/lib/composables/useFormValidation.js +148 -0
- package/dist/lib/composables/useTablePagination.d.ts +49 -0
- package/dist/lib/composables/useTablePagination.js +41 -0
- package/dist/lib/editor/theme.js +65 -62
- package/dist/lib/index.d.ts +14 -0
- package/dist/lib/index.js +95 -78
- package/dist/lib/theme.css +391 -272
- package/package.json +11 -4
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { statusMeta as e } from "./status.js";
|
|
2
|
+
import t from "./AcSkeleton.js";
|
|
3
|
+
import { Fragment as n, Teleport as r, Transition as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, inject as ee, mergeModels as p, nextTick as m, normalizeClass as h, normalizeStyle as te, onBeforeUnmount as ne, openBlock as g, ref as _, renderList as re, renderSlot as v, resolveDynamicComponent as ie, toDisplayString as y, unref as b, useId as ae, useModel as oe, vModelText as se, watch as ce, withCtx as le, withDirectives as ue, withModifiers as de } from "vue";
|
|
4
|
+
import { Check as fe, ChevronsUpDown as pe, Cloud as me, Plus as he, Search as ge } from "@lucide/vue";
|
|
4
5
|
//#region src/lib/components/AcClusterSwitcher.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
6
|
+
var _e = [
|
|
6
7
|
"id",
|
|
7
8
|
"aria-expanded",
|
|
8
9
|
"aria-controls",
|
|
9
10
|
"aria-label",
|
|
10
11
|
"title",
|
|
11
12
|
"disabled"
|
|
12
|
-
],
|
|
13
|
-
class: "relative inline-flex size-7 shrink-0 items-center justify-center rounded-
|
|
13
|
+
], ve = {
|
|
14
|
+
class: "relative inline-flex size-7 shrink-0 items-center justify-center rounded-8 bg-surface ring-1 ring-border ring-inset",
|
|
14
15
|
"aria-hidden": "true"
|
|
15
|
-
},
|
|
16
|
+
}, ye = ["src"], be = { class: "min-w-0 flex-1" }, xe = {
|
|
16
17
|
key: 0,
|
|
17
18
|
class: "block truncate text-sm text-muted"
|
|
18
|
-
},
|
|
19
|
+
}, Se = {
|
|
19
20
|
key: 0,
|
|
20
|
-
class: "border-b border-border
|
|
21
|
-
},
|
|
21
|
+
class: "border-b border-border p-2"
|
|
22
|
+
}, Ce = { class: "relative" }, we = [
|
|
22
23
|
"aria-activedescendant",
|
|
23
24
|
"aria-label",
|
|
24
25
|
"placeholder"
|
|
25
|
-
],
|
|
26
|
+
], Te = ["tabindex", "aria-activedescendant"], Ee = [
|
|
26
27
|
"id",
|
|
27
28
|
"aria-selected",
|
|
28
29
|
"aria-disabled",
|
|
29
30
|
"onMouseenter",
|
|
30
31
|
"onClick"
|
|
31
|
-
],
|
|
32
|
-
class: "inline-flex size-
|
|
32
|
+
], De = {
|
|
33
|
+
class: "inline-flex size-8 shrink-0 items-center justify-center rounded-8 bg-surface ring-1 ring-border ring-inset",
|
|
33
34
|
"aria-hidden": "true"
|
|
34
|
-
},
|
|
35
|
+
}, Oe = ["src", "onError"], ke = { class: "min-w-0 flex-1" }, Ae = { class: "block truncate text-base leading-5 font-medium text-heading" }, je = { class: "flex min-w-0 items-center gap-1.5 text-xs text-muted" }, Me = {
|
|
35
36
|
key: 1,
|
|
36
37
|
"aria-hidden": "true"
|
|
37
|
-
},
|
|
38
|
+
}, Ne = { class: "truncate" }, Pe = {
|
|
38
39
|
key: 0,
|
|
39
40
|
role: "presentation",
|
|
40
41
|
class: "px-3 py-6 text-center text-base text-muted"
|
|
41
|
-
},
|
|
42
|
+
}, Fe = {
|
|
42
43
|
key: 1,
|
|
43
|
-
class: "border-t border-border
|
|
44
|
-
}, x = /*@__PURE__*/
|
|
44
|
+
class: "border-t border-border p-2"
|
|
45
|
+
}, x = /*@__PURE__*/ f({
|
|
45
46
|
__name: "AcClusterSwitcher",
|
|
46
47
|
props: /*@__PURE__*/ p({
|
|
47
48
|
clusterOptions: { default: () => [] },
|
|
@@ -76,48 +77,26 @@ var ge = [
|
|
|
76
77
|
openModifiers: {}
|
|
77
78
|
}),
|
|
78
79
|
emits: /*@__PURE__*/ p(["select", "import"], ["update:modelValue", "update:open"]),
|
|
79
|
-
setup(
|
|
80
|
-
let S =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"connected",
|
|
85
|
-
"running",
|
|
86
|
-
"healthy",
|
|
87
|
-
"true"
|
|
88
|
-
],
|
|
89
|
-
danger: [
|
|
90
|
-
"notready",
|
|
91
|
-
"lost",
|
|
92
|
-
"notconnected",
|
|
93
|
-
"disconnected",
|
|
94
|
-
"error",
|
|
95
|
-
"failed",
|
|
96
|
-
"critical",
|
|
97
|
-
"unhealthy",
|
|
98
|
-
"false"
|
|
99
|
-
],
|
|
100
|
-
warning: [
|
|
101
|
-
"pending",
|
|
102
|
-
"connecting",
|
|
103
|
-
"provisioning",
|
|
104
|
-
"importing",
|
|
105
|
-
"registered",
|
|
106
|
-
"updating",
|
|
107
|
-
"deleting",
|
|
108
|
-
"unknown"
|
|
109
|
-
]
|
|
80
|
+
setup(f, { expose: p, emit: x }) {
|
|
81
|
+
let S = f, C = oe(f, "modelValue"), w = oe(f, "open"), T = x, Ie = {
|
|
82
|
+
registered: "warning",
|
|
83
|
+
unknown: "warning",
|
|
84
|
+
notconnected: "danger"
|
|
110
85
|
}, E = {
|
|
111
86
|
success: "bg-success",
|
|
112
87
|
danger: "bg-danger",
|
|
88
|
+
info: "bg-info",
|
|
113
89
|
warning: "bg-warning",
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
90
|
+
pending: "bg-pending",
|
|
91
|
+
neutral: "bg-muted"
|
|
92
|
+
}, Le = {
|
|
93
|
+
success: "text-success-strong",
|
|
94
|
+
danger: "text-danger-strong",
|
|
95
|
+
info: "text-info-strong",
|
|
96
|
+
warning: "text-warning-strong",
|
|
97
|
+
pending: "text-pending-strong",
|
|
119
98
|
neutral: "text-muted"
|
|
120
|
-
}, D =
|
|
99
|
+
}, D = ee("ac-sidebar", null), O = ae(), k = `${O}-panel`, A = `${O}-list`, j = _(null), M = _(null), Re = _(null), N = _(null), P = _(""), F = _(-1), I = _(/* @__PURE__ */ new Set()), L = _({}), R = _(!0), z = a(() => S.sidebarCollapsed ?? D?.rail.value ?? !1), B = a(() => D?.dark.value ?? !1), V = a(() => C.value ? S.clusterOptions.find((e) => e.name === C.value) ?? { name: C.value } : null), H = a(() => {
|
|
121
100
|
let e = P.value.trim().toLowerCase();
|
|
122
101
|
return e ? S.clusterOptions.filter((t) => [
|
|
123
102
|
t.name,
|
|
@@ -125,27 +104,23 @@ var ge = [
|
|
|
125
104
|
t.provider,
|
|
126
105
|
t.location
|
|
127
106
|
].some((t) => t?.toLowerCase().includes(e))) : S.clusterOptions;
|
|
128
|
-
}),
|
|
107
|
+
}), ze = a(() => V.value ? `Cluster: ${U(V.value)}${V.value.status ? `, ${V.value.status}` : ""}. Switch cluster` : "Select a cluster");
|
|
129
108
|
function U(e) {
|
|
130
109
|
return e.displayName || e.name;
|
|
131
110
|
}
|
|
132
111
|
function W(e) {
|
|
133
112
|
return !!(e.disabled || e.$isDisabled);
|
|
134
113
|
}
|
|
135
|
-
function G(
|
|
136
|
-
let
|
|
137
|
-
if (!
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"danger",
|
|
141
|
-
"warning"
|
|
142
|
-
]) if (Pe[e].includes(t)) return e;
|
|
143
|
-
return "neutral";
|
|
114
|
+
function G(t) {
|
|
115
|
+
let n = (t ?? "").toLowerCase().replace(/[^a-z]/g, "");
|
|
116
|
+
if (!n) return "neutral";
|
|
117
|
+
let r = Ie[n] ?? e(t).tone;
|
|
118
|
+
return r === "default" ? "neutral" : r;
|
|
144
119
|
}
|
|
145
120
|
function K(e) {
|
|
146
121
|
return !S.providerIconBase || !e || I.value.has(e) ? "" : `${S.providerIconBase}/${e}.png`;
|
|
147
122
|
}
|
|
148
|
-
function
|
|
123
|
+
function Be(e) {
|
|
149
124
|
e && (I.value = new Set(I.value).add(e));
|
|
150
125
|
}
|
|
151
126
|
function q(e) {
|
|
@@ -156,7 +131,7 @@ var ge = [
|
|
|
156
131
|
for (let r = e; r >= 0 && r < n.length; r += t) if (!W(n[r])) return r;
|
|
157
132
|
return -1;
|
|
158
133
|
}
|
|
159
|
-
function
|
|
134
|
+
function Ve(e) {
|
|
160
135
|
let t = H.value;
|
|
161
136
|
if (!t.length) return;
|
|
162
137
|
let n = F.value;
|
|
@@ -190,79 +165,79 @@ var ge = [
|
|
|
190
165
|
maxHeight: `${Math.max(o ? a : i, 200)}px`
|
|
191
166
|
};
|
|
192
167
|
}
|
|
193
|
-
function
|
|
168
|
+
function He() {
|
|
194
169
|
S.disabled || S.loading || (w.value = !0);
|
|
195
170
|
}
|
|
196
|
-
function
|
|
171
|
+
function Z(e = !0) {
|
|
197
172
|
w.value && (w.value = !1, e && j.value?.focus());
|
|
198
173
|
}
|
|
199
|
-
function
|
|
200
|
-
W(e) || (C.value = e.name, T("select", e),
|
|
174
|
+
function Ue(e) {
|
|
175
|
+
W(e) || (C.value = e.name, T("select", e), Z());
|
|
201
176
|
}
|
|
202
|
-
function
|
|
203
|
-
T("import"),
|
|
177
|
+
function We() {
|
|
178
|
+
T("import"), Z(!1);
|
|
204
179
|
}
|
|
205
|
-
function
|
|
206
|
-
!w.value && ["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(),
|
|
180
|
+
function Ge(e) {
|
|
181
|
+
!w.value && ["ArrowDown", "ArrowUp"].includes(e.key) && (e.preventDefault(), He());
|
|
207
182
|
}
|
|
208
|
-
function
|
|
209
|
-
if (e.key === "ArrowDown" || e.key === "ArrowUp") e.preventDefault(),
|
|
183
|
+
function Q(e) {
|
|
184
|
+
if (e.key === "ArrowDown" || e.key === "ArrowUp") e.preventDefault(), Ve(e.key === "ArrowDown" ? 1 : -1);
|
|
210
185
|
else if ((e.key === "Home" || e.key === "End") && !S.searchable) e.preventDefault(), F.value = e.key === "Home" ? J() : J(H.value.length - 1, -1), Y();
|
|
211
186
|
else if (e.key === "Enter" || e.key === " " && !S.searchable) {
|
|
212
187
|
e.preventDefault();
|
|
213
188
|
let t = H.value[F.value];
|
|
214
|
-
t &&
|
|
189
|
+
t && Ue(t);
|
|
215
190
|
}
|
|
216
191
|
}
|
|
217
|
-
function
|
|
218
|
-
e.key === "Escape" ? (e.preventDefault(),
|
|
192
|
+
function Ke(e) {
|
|
193
|
+
e.key === "Escape" ? (e.preventDefault(), Z()) : e.key === "Tab" && qe(e);
|
|
219
194
|
}
|
|
220
|
-
function
|
|
195
|
+
function qe(e) {
|
|
221
196
|
let t = [...M.value?.querySelectorAll("input, a[href], button:not([disabled]), [tabindex=\"0\"]") ?? []], n = t[0], r = t[t.length - 1];
|
|
222
|
-
e.shiftKey && document.activeElement === n ? (e.preventDefault(),
|
|
197
|
+
e.shiftKey && document.activeElement === n ? (e.preventDefault(), Z()) : !e.shiftKey && document.activeElement === r && Z();
|
|
223
198
|
}
|
|
224
|
-
function
|
|
199
|
+
function Je(e) {
|
|
225
200
|
let t = e.target;
|
|
226
|
-
j.value?.contains(t) || M.value?.contains(t) ||
|
|
201
|
+
j.value?.contains(t) || M.value?.contains(t) || Z(!1);
|
|
227
202
|
}
|
|
228
|
-
function
|
|
229
|
-
e && M.value?.contains(e.target) || X();
|
|
203
|
+
function Ye(e) {
|
|
204
|
+
e?.target instanceof Node && M.value?.contains(e.target) || X();
|
|
230
205
|
}
|
|
231
206
|
function $(e) {
|
|
232
207
|
let t = e ? "addEventListener" : "removeEventListener";
|
|
233
|
-
document[t]("pointerdown",
|
|
208
|
+
document[t]("pointerdown", Je, !0), window[t]("scroll", Ye, !0), window[t]("resize", Ye);
|
|
234
209
|
}
|
|
235
|
-
return
|
|
210
|
+
return ce(w, async (e) => {
|
|
236
211
|
if ($(e), !e) return;
|
|
237
212
|
P.value = "";
|
|
238
213
|
let t = H.value.findIndex((e) => e.name === C.value);
|
|
239
|
-
F.value = t >= 0 ? t : J(), await m(), X(), (S.searchable ?
|
|
240
|
-
}),
|
|
214
|
+
F.value = t >= 0 ? t : J(), await m(), X(), (S.searchable ? Re.value : N.value)?.focus(), Y();
|
|
215
|
+
}), ce(P, () => {
|
|
241
216
|
F.value = J(), m(X);
|
|
242
|
-
}),
|
|
217
|
+
}), ne(() => $(!1)), p({ focus: () => j.value?.focus() }), (e, a) => (g(), c("div", {
|
|
243
218
|
class: h(["min-w-0", z.value ? "inline-flex" : "flex w-full"]),
|
|
244
219
|
"data-ac-ds": "",
|
|
245
220
|
"data-testid": "ac-cluster-switcher"
|
|
246
|
-
}, [
|
|
221
|
+
}, [f.loading ? (g(), c("div", {
|
|
247
222
|
key: 0,
|
|
248
223
|
role: "status",
|
|
249
224
|
"aria-label": "Loading clusters",
|
|
250
|
-
class: h(["flex h-10 items-center rounded-
|
|
225
|
+
class: h(["flex h-10 items-center rounded-10 border", [z.value ? "size-10 justify-center" : "w-full gap-2.5 px-2", B.value ? "border-white/10" : "border-border"]]),
|
|
251
226
|
"data-ac-ds": "",
|
|
252
227
|
"data-testid": "ac-cluster-switcher-loading"
|
|
253
|
-
}, [
|
|
228
|
+
}, [d(t, {
|
|
254
229
|
shape: "rect",
|
|
255
230
|
width: "28px",
|
|
256
231
|
height: "28px",
|
|
257
232
|
label: "",
|
|
258
233
|
class: "shrink-0"
|
|
259
|
-
}), z.value ?
|
|
234
|
+
}), z.value ? s("", !0) : (g(), o(t, {
|
|
260
235
|
key: 0,
|
|
261
236
|
shape: "text",
|
|
262
237
|
width: "60%",
|
|
263
238
|
height: "10px",
|
|
264
239
|
label: ""
|
|
265
|
-
}))], 2)) : (g(),
|
|
240
|
+
}))], 2)) : (g(), c("button", {
|
|
266
241
|
key: 1,
|
|
267
242
|
id: `${b(O)}-trigger`,
|
|
268
243
|
ref_key: "trigger",
|
|
@@ -271,143 +246,143 @@ var ge = [
|
|
|
271
246
|
"aria-haspopup": "dialog",
|
|
272
247
|
"aria-expanded": w.value,
|
|
273
248
|
"aria-controls": w.value ? k : void 0,
|
|
274
|
-
"aria-label":
|
|
249
|
+
"aria-label": ze.value,
|
|
275
250
|
title: z.value && V.value ? U(V.value) : void 0,
|
|
276
|
-
disabled:
|
|
277
|
-
class: h(["group relative flex h-10 min-w-0 cursor-pointer items-center rounded-
|
|
278
|
-
z.value ? "size-10 justify-center" : "w-full gap-2.5 pr-2 pl-
|
|
279
|
-
B.value ? "border-white/10 bg-white/4 enabled:hover:bg-white/8" : "border-border bg-
|
|
280
|
-
w.value && (B.value ? "bg-white/8" : "
|
|
251
|
+
disabled: f.disabled,
|
|
252
|
+
class: h(["group relative flex h-10 min-w-0 cursor-pointer items-center rounded-10 border text-left transition-[color,background-color,border-color,box-shadow] duration-200 disabled:cursor-not-allowed disabled:opacity-50", [
|
|
253
|
+
z.value ? "size-10 justify-center" : "w-full gap-2.5 pr-2.5 pl-1.5",
|
|
254
|
+
B.value ? "border-white/10 bg-white/4 enabled:hover:bg-white/8 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" : "border-border bg-background enabled:hover:border-accent-active focus-visible:focus-ring",
|
|
255
|
+
w.value && (B.value ? "bg-white/8" : "focus-ring")
|
|
281
256
|
]]),
|
|
282
257
|
"data-ac-ds": "",
|
|
283
258
|
"data-testid": "ac-cluster-switcher-trigger",
|
|
284
|
-
onClick:
|
|
285
|
-
onKeydown:
|
|
286
|
-
}, [
|
|
259
|
+
onClick: a[1] ||= (e) => w.value ? Z() : He(),
|
|
260
|
+
onKeydown: Ge
|
|
261
|
+
}, [l("span", ve, [K(V.value?.provider) ? (g(), c("img", {
|
|
287
262
|
key: 0,
|
|
288
263
|
src: K(V.value?.provider),
|
|
289
264
|
alt: "",
|
|
290
265
|
class: "size-5 object-contain",
|
|
291
|
-
onError:
|
|
292
|
-
}, null, 40,
|
|
266
|
+
onError: a[0] ||= (e) => Be(V.value?.provider)
|
|
267
|
+
}, null, 40, ye)) : (g(), o(b(me), {
|
|
293
268
|
key: 1,
|
|
294
269
|
class: "size-4 text-muted"
|
|
295
|
-
})), V.value ? (g(),
|
|
270
|
+
})), V.value ? (g(), c("span", {
|
|
296
271
|
key: 2,
|
|
297
272
|
class: h(["absolute -right-0.5 -bottom-0.5 size-2.5 rounded-full ring-2", [E[G(V.value.status)], B.value ? "ring-sidebar" : "ring-surface"]])
|
|
298
|
-
}, null, 2)) :
|
|
273
|
+
}, null, 2)) : s("", !0)]), z.value ? s("", !0) : (g(), c(n, { key: 0 }, [l("span", be, [l("span", { class: h(["block truncate text-base leading-5 font-medium", V.value ? "text-heading" : "text-muted"]) }, y(V.value ? U(V.value) : f.placeholder), 3), V.value?.location ? (g(), c("span", xe, y(V.value.location), 1)) : s("", !0)]), d(b(pe), {
|
|
299
274
|
class: "size-4 shrink-0 text-muted transition-colors group-hover:text-heading",
|
|
300
275
|
"aria-hidden": "true"
|
|
301
|
-
})], 64))], 42,
|
|
276
|
+
})], 64))], 42, _e)), (g(), o(r, { to: "body" }, [d(i, {
|
|
302
277
|
"enter-active-class": "transition duration-150 ease-out",
|
|
303
278
|
"enter-from-class": `opacity-0 motion-safe:scale-[0.98] ${z.value ? "motion-safe:-translate-x-1" : R.value ? "motion-safe:-translate-y-1" : "motion-safe:translate-y-1"}`,
|
|
304
279
|
"leave-active-class": "transition duration-100 ease-in",
|
|
305
280
|
"leave-to-class": "opacity-0"
|
|
306
281
|
}, {
|
|
307
|
-
default:
|
|
282
|
+
default: le(() => [w.value ? (g(), c("div", {
|
|
308
283
|
key: 0,
|
|
309
284
|
id: k,
|
|
310
285
|
ref_key: "panel",
|
|
311
286
|
ref: M,
|
|
312
287
|
role: "dialog",
|
|
313
288
|
"aria-label": "Switch cluster",
|
|
314
|
-
class: h(["fixed z-[90] flex max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-
|
|
315
|
-
style:
|
|
289
|
+
class: h(["fixed z-[90] flex max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-14 border border-border bg-surface shadow-lg", z.value ? "origin-left" : R.value ? "origin-top" : "origin-bottom"]),
|
|
290
|
+
style: te(L.value),
|
|
316
291
|
"data-ac-ds": "",
|
|
317
292
|
"data-testid": "ac-cluster-switcher-panel",
|
|
318
|
-
onKeydown:
|
|
293
|
+
onKeydown: Ke
|
|
319
294
|
}, [
|
|
320
|
-
|
|
321
|
-
class: "pointer-events-none absolute top-1/2 left-
|
|
295
|
+
f.searchable ? (g(), c("div", Se, [l("div", Ce, [d(b(ge), {
|
|
296
|
+
class: "pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted",
|
|
322
297
|
"aria-hidden": "true"
|
|
323
|
-
}),
|
|
298
|
+
}), ue(l("input", {
|
|
324
299
|
ref_key: "searchInput",
|
|
325
|
-
ref:
|
|
326
|
-
"onUpdate:modelValue":
|
|
300
|
+
ref: Re,
|
|
301
|
+
"onUpdate:modelValue": a[2] ||= (e) => P.value = e,
|
|
327
302
|
type: "text",
|
|
328
303
|
role: "combobox",
|
|
329
304
|
"aria-autocomplete": "list",
|
|
330
305
|
"aria-expanded": "true",
|
|
331
306
|
"aria-controls": A,
|
|
332
307
|
"aria-activedescendant": F.value >= 0 ? q(F.value) : void 0,
|
|
333
|
-
"aria-label":
|
|
334
|
-
placeholder:
|
|
308
|
+
"aria-label": f.searchPlaceholder,
|
|
309
|
+
placeholder: f.searchPlaceholder,
|
|
335
310
|
autocomplete: "off",
|
|
336
311
|
spellcheck: "false",
|
|
337
|
-
class: "h-
|
|
312
|
+
class: "h-9 w-full rounded-10 border border-border bg-background pr-3 pl-9 text-base text-heading outline-none transition-[border-color,box-shadow] duration-200 placeholder:text-muted/80 hover:border-accent-active focus:focus-ring",
|
|
338
313
|
"data-ac-ds": "",
|
|
339
314
|
"data-testid": "ac-cluster-switcher-search",
|
|
340
|
-
onKeydown:
|
|
341
|
-
}, null, 40,
|
|
342
|
-
|
|
315
|
+
onKeydown: Q
|
|
316
|
+
}, null, 40, we), [[se, P.value]])])])) : s("", !0),
|
|
317
|
+
l("ul", {
|
|
343
318
|
id: A,
|
|
344
319
|
ref_key: "listEl",
|
|
345
320
|
ref: N,
|
|
346
321
|
role: "listbox",
|
|
347
322
|
"aria-label": "Clusters",
|
|
348
|
-
tabindex:
|
|
349
|
-
"aria-activedescendant": !
|
|
350
|
-
class: "ac-scrollbar max-h-72 min-h-0 flex-1 p-
|
|
351
|
-
onKeydown:
|
|
352
|
-
}, [(g(!0),
|
|
353
|
-
id: q(
|
|
354
|
-
key:
|
|
323
|
+
tabindex: f.searchable ? -1 : 0,
|
|
324
|
+
"aria-activedescendant": !f.searchable && F.value >= 0 ? q(F.value) : void 0,
|
|
325
|
+
class: "ac-scrollbar max-h-72 min-h-0 flex-1 p-2 outline-none",
|
|
326
|
+
onKeydown: Q
|
|
327
|
+
}, [(g(!0), c(n, null, re(H.value, (t, n) => (g(), c("li", {
|
|
328
|
+
id: q(n),
|
|
329
|
+
key: t.name,
|
|
355
330
|
role: "option",
|
|
356
|
-
"aria-selected":
|
|
357
|
-
"aria-disabled": W(
|
|
358
|
-
class: h(["flex items-center gap-2.5 rounded-
|
|
331
|
+
"aria-selected": t.name === C.value,
|
|
332
|
+
"aria-disabled": W(t) || void 0,
|
|
333
|
+
class: h(["flex items-center gap-2.5 rounded-8 px-2.5 py-2 transition-colors duration-75", [W(t) ? "cursor-not-allowed opacity-50" : "cursor-pointer", n === F.value ? "bg-accent-hover" : t.name === C.value && "bg-accent"]]),
|
|
359
334
|
"data-ac-ds": "",
|
|
360
335
|
"data-testid": "ac-cluster-switcher-option",
|
|
361
|
-
onMouseenter: (
|
|
362
|
-
onMousedown:
|
|
363
|
-
onClick: (
|
|
364
|
-
}, [v(
|
|
365
|
-
cluster:
|
|
366
|
-
selected:
|
|
367
|
-
active:
|
|
336
|
+
onMouseenter: (e) => !W(t) && (F.value = n),
|
|
337
|
+
onMousedown: a[3] ||= de(() => {}, ["prevent"]),
|
|
338
|
+
onClick: (e) => Ue(t)
|
|
339
|
+
}, [v(e.$slots, "option", {
|
|
340
|
+
cluster: t,
|
|
341
|
+
selected: t.name === C.value,
|
|
342
|
+
active: n === F.value
|
|
368
343
|
}, () => [
|
|
369
|
-
|
|
344
|
+
l("span", De, [K(t.provider) ? (g(), c("img", {
|
|
370
345
|
key: 0,
|
|
371
|
-
src: K(
|
|
346
|
+
src: K(t.provider),
|
|
372
347
|
alt: "",
|
|
373
348
|
class: "size-5 object-contain",
|
|
374
|
-
onError: (
|
|
375
|
-
}, null, 40,
|
|
349
|
+
onError: (e) => Be(t.provider)
|
|
350
|
+
}, null, 40, Oe)) : (g(), o(b(me), {
|
|
376
351
|
key: 1,
|
|
377
352
|
class: "size-4 text-muted"
|
|
378
353
|
}))]),
|
|
379
|
-
|
|
380
|
-
|
|
354
|
+
l("span", ke, [l("span", Ae, y(U(t)), 1), l("span", je, [
|
|
355
|
+
t.status ? (g(), c("span", {
|
|
381
356
|
key: 0,
|
|
382
|
-
class: h(["inline-flex shrink-0 items-center gap-1",
|
|
383
|
-
}, [
|
|
384
|
-
class: h(["size-1.5 rounded-full", E[G(
|
|
357
|
+
class: h(["inline-flex shrink-0 items-center gap-1", Le[G(t.status)]])
|
|
358
|
+
}, [l("span", {
|
|
359
|
+
class: h(["size-1.5 rounded-full", E[G(t.status)]]),
|
|
385
360
|
"aria-hidden": "true"
|
|
386
|
-
}, null, 2),
|
|
387
|
-
|
|
388
|
-
|
|
361
|
+
}, null, 2), u(" " + y(t.status), 1)], 2)) : s("", !0),
|
|
362
|
+
t.status && (t.location || t.provider) ? (g(), c("span", Me, "·")) : s("", !0),
|
|
363
|
+
l("span", Ne, y([t.provider, t.location].filter(Boolean).join(" · ")), 1)
|
|
389
364
|
])]),
|
|
390
|
-
|
|
365
|
+
t.name === C.value ? (g(), o(b(fe), {
|
|
391
366
|
key: 0,
|
|
392
|
-
class: "size-4 shrink-0 text-primary",
|
|
367
|
+
class: "size-4 shrink-0 text-primary-strong",
|
|
393
368
|
"aria-hidden": "true"
|
|
394
|
-
})) :
|
|
395
|
-
])], 42,
|
|
396
|
-
|
|
397
|
-
href:
|
|
398
|
-
type:
|
|
399
|
-
class: "flex h-
|
|
369
|
+
})) : s("", !0)
|
|
370
|
+
])], 42, Ee))), 128)), H.value.length ? s("", !0) : (g(), c("li", Pe, [v(e.$slots, "empty", { query: P.value }, () => [u(y(P.value ? `No clusters match “${P.value}”` : "No clusters yet"), 1)])]))], 40, Te),
|
|
371
|
+
e.$slots.footer || f.importLabel ? (g(), c("div", Fe, [v(e.$slots, "footer", { close: Z }, () => [(g(), o(ie(f.importUrl ? "a" : "button"), {
|
|
372
|
+
href: f.importUrl || void 0,
|
|
373
|
+
type: f.importUrl ? void 0 : "button",
|
|
374
|
+
class: "flex min-h-9 w-full cursor-pointer items-center gap-2.5 rounded-8 px-3 py-2 text-base font-medium text-heading no-underline outline-none transition-colors duration-150 hover:bg-accent-hover focus-visible:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
400
375
|
"data-ac-ds": "",
|
|
401
376
|
"data-testid": "ac-cluster-switcher-import",
|
|
402
|
-
onClick:
|
|
377
|
+
onClick: We
|
|
403
378
|
}, {
|
|
404
|
-
default:
|
|
379
|
+
default: le(() => [d(b(he), {
|
|
405
380
|
class: "size-4 shrink-0 text-muted",
|
|
406
381
|
"aria-hidden": "true"
|
|
407
|
-
}),
|
|
382
|
+
}), u(" " + y(f.importLabel), 1)]),
|
|
408
383
|
_: 1
|
|
409
|
-
}, 8, ["href", "type"]))])])) :
|
|
410
|
-
], 38)) :
|
|
384
|
+
}, 8, ["href", "type"]))])])) : s("", !0)
|
|
385
|
+
], 38)) : s("", !0)]),
|
|
411
386
|
_: 3
|
|
412
387
|
}, 8, ["enter-from-class"])]))], 2));
|
|
413
388
|
}
|
|
@@ -17,13 +17,13 @@ import { EditorView as S, drawSelection as He, dropCursor as Ue, highlightActive
|
|
|
17
17
|
//#region src/lib/components/AcCodeEditor.vue?vue&type=script&setup=true&lang.ts
|
|
18
18
|
var qe = {
|
|
19
19
|
key: 0,
|
|
20
|
-
class: "flex min-h-
|
|
20
|
+
class: "flex min-h-12 flex-wrap items-center gap-x-3 gap-y-1.5 border-b border-border bg-surface-muted px-4 py-2"
|
|
21
21
|
}, Je = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "min-w-0 truncate font-mono text-xs font-medium text-heading"
|
|
24
24
|
}, Ye = {
|
|
25
25
|
key: 1,
|
|
26
|
-
class: "rounded-
|
|
26
|
+
class: "rounded-6 border border-border bg-surface px-1.5 text-xs leading-5 font-medium text-muted"
|
|
27
27
|
}, Xe = {
|
|
28
28
|
key: 2,
|
|
29
29
|
class: "text-xs text-muted"
|
|
@@ -305,7 +305,7 @@ var qe = {
|
|
|
305
305
|
focus: St,
|
|
306
306
|
editor: P
|
|
307
307
|
}), (t, r) => (m(), l("div", {
|
|
308
|
-
class: p(["flex min-w-0 flex-col overflow-hidden bg-
|
|
308
|
+
class: p(["flex min-w-0 flex-col overflow-hidden bg-background", d.bordered && "rounded-10 border border-border transition-[border-color,box-shadow] duration-200 has-[.cm-editor.cm-focused]:focus-ring"]),
|
|
309
309
|
"data-ac-ds": "",
|
|
310
310
|
"data-testid": "ac-code-editor"
|
|
311
311
|
}, [
|
|
@@ -329,16 +329,16 @@ var qe = {
|
|
|
329
329
|
}, {
|
|
330
330
|
default: pe(() => [u("button", {
|
|
331
331
|
type: "button",
|
|
332
|
-
class: "inline-flex size-
|
|
332
|
+
class: "inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
333
333
|
"aria-label": R.value ? "Copied" : "Copy to clipboard",
|
|
334
334
|
onClick: wt
|
|
335
335
|
}, [R.value ? (m(), s(_(he), {
|
|
336
336
|
key: 0,
|
|
337
|
-
class: "size-
|
|
337
|
+
class: "size-4 text-success-strong",
|
|
338
338
|
"aria-hidden": "true"
|
|
339
339
|
})) : (m(), s(_(_e), {
|
|
340
340
|
key: 1,
|
|
341
|
-
class: "size-
|
|
341
|
+
class: "size-4",
|
|
342
342
|
"aria-hidden": "true"
|
|
343
343
|
}))], 8, Qe)]),
|
|
344
344
|
_: 1
|
|
@@ -361,14 +361,14 @@ var qe = {
|
|
|
361
361
|
I.value.length && !V.value ? (m(), l("div", {
|
|
362
362
|
key: 2,
|
|
363
363
|
id: _(ut),
|
|
364
|
-
class: "border-t border-border
|
|
364
|
+
class: "border-t border-border bg-surface-muted"
|
|
365
365
|
}, [u("p", et, g(I.value.length) + " " + g(I.value.length === 1 ? "problem" : "problems"), 1), u("ul", tt, [(m(!0), l(ee, null, ae(I.value, (e, t) => (m(), l("li", { key: t }, [u("button", {
|
|
366
366
|
type: "button",
|
|
367
|
-
class: "flex w-full cursor-pointer items-start gap-2 px-
|
|
367
|
+
class: "flex w-full cursor-pointer items-start gap-2 px-4 py-1 text-left text-xs leading-5 text-body transition-colors duration-200 hover:bg-accent-hover focus-visible:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset",
|
|
368
368
|
onClick: (t) => Ct(e)
|
|
369
369
|
}, [
|
|
370
370
|
(m(), s(se(e.severity === "error" ? _(ge) : _(ve)), {
|
|
371
|
-
class: p(["mt-0.75 size-3.5 shrink-0", e.severity === "error" ? "text-
|
|
371
|
+
class: p(["mt-0.75 size-3.5 shrink-0", e.severity === "error" ? "text-danger" : "text-warning"]),
|
|
372
372
|
"aria-hidden": "true"
|
|
373
373
|
}, null, 8, ["class"])),
|
|
374
374
|
u("span", rt, "Ln " + g(e.line) + ", Col " + g(e.column), 1),
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface ColorPreset {
|
|
2
|
+
/** Hex colour, `#rgb` or `#rrggbb`. */
|
|
3
|
+
value: string;
|
|
4
|
+
/** Name read out for the swatch, e.g. "Brand green". Defaults to the hex value. */
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Props {
|
|
8
|
+
/** Label above the field. Without one, pass `aria-label` so the field still has a name. */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Native `name` attribute of the hex field. */
|
|
11
|
+
name?: string;
|
|
12
|
+
/** Quick-pick swatches under the field: hex strings or `{ value, label }`. */
|
|
13
|
+
presets?: (string | ColorPreset)[];
|
|
14
|
+
/** Marks the field required and adds a red asterisk. */
|
|
15
|
+
required?: boolean;
|
|
16
|
+
/** Disables the field, the swatch and the presets. */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Read-only field: a muted fill, "(read only)" after the label, and no picker. */
|
|
19
|
+
readonly?: boolean;
|
|
20
|
+
/** Error text under the field. Turns the border red and sets `aria-invalid`. */
|
|
21
|
+
errorMsg?: string;
|
|
22
|
+
/** Help text between the label and the field. */
|
|
23
|
+
hint?: string;
|
|
24
|
+
/** `small` 36px or `normal` 40px tall. */
|
|
25
|
+
size?: "small" | "normal";
|
|
26
|
+
}
|
|
27
|
+
type __VLS_Props = Props;
|
|
28
|
+
type __VLS_ModelProps = {
|
|
29
|
+
/** Lowercase `#rrggbb`, or `""` when empty. Typed `#rgb` is expanded on blur. */
|
|
30
|
+
modelValue?: string;
|
|
31
|
+
};
|
|
32
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
33
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
34
|
+
/** Moves focus to the hex field. */
|
|
35
|
+
focus: () => void | undefined;
|
|
36
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
|
+
"update:modelValue": (value: string) => any;
|
|
38
|
+
change: (value: string) => any;
|
|
39
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
40
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
41
|
+
onChange?: ((value: string) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
required: boolean;
|
|
44
|
+
label: string;
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
name: string;
|
|
47
|
+
size: "small" | "normal";
|
|
48
|
+
readonly: boolean;
|
|
49
|
+
hint: string;
|
|
50
|
+
errorMsg: string;
|
|
51
|
+
presets: (string | ColorPreset)[];
|
|
52
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
|
+
declare const _default: typeof __VLS_export;
|
|
54
|
+
export default _default;
|