@ac-design/design-system 1.0.3 → 2.1.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 +71 -0
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +173 -0
- package/dist/lib/charts/cartesian.d.ts +324 -0
- package/dist/lib/charts/cartesian.js +137 -0
- package/dist/lib/charts/echarts.d.ts +86 -0
- package/dist/lib/charts/echarts.js +173 -0
- package/dist/lib/charts/graph.d.ts +77 -0
- package/dist/lib/charts/graph.js +155 -0
- package/dist/lib/charts/index.d.ts +11 -0
- package/dist/lib/charts/index.js +7 -0
- package/dist/lib/charts/shared.d.ts +53 -0
- package/dist/lib/charts/shared.js +96 -0
- package/dist/lib/charts/xy.d.ts +69 -0
- package/dist/lib/charts/xy.js +73 -0
- package/dist/lib/compat.css +2770 -1061
- 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 +10 -1
- package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +139 -45
- 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 +47 -0
- package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +205 -0
- package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
- package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +66 -61
- package/dist/lib/components/AcBadge.vue.d.ts +20 -7
- package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +67 -44
- 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 +46 -0
- package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +213 -0
- package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
- package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +36 -34
- package/dist/lib/components/AcBulkActionBar.js +5 -0
- package/dist/lib/components/AcBulkActionBar.vue.d.ts +45 -0
- package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
- package/dist/lib/components/AcButton.vue.d.ts +13 -7
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +93 -47
- package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcCard.vue.d.ts +42 -3
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +175 -14
- package/dist/lib/components/AcCellValue.vue.d.ts +6 -3
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +219 -178
- package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +113 -30
- package/dist/lib/components/AcCheckList.js +5 -0
- package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
- package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
- package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +102 -26
- 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 +114 -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 +57 -0
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +217 -0
- package/dist/lib/components/AcCommandBlock.js +5 -0
- package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
- package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -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 +96 -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/AcCostSummary.js +5 -0
- package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
- package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
- package/dist/lib/components/AcDatePicker.vue.d.ts +8 -8
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +634 -417
- package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
- package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +57 -60
- package/dist/lib/components/AcDonutChart.js +5 -0
- package/dist/lib/components/AcDonutChart.vue.d.ts +83 -0
- package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +237 -0
- package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +91 -78
- package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
- package/dist/lib/components/AcDropdownItem.vue.d.ts +2 -2
- package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +18 -18
- 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/AcErrorState.js +5 -0
- package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
- package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
- package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +139 -116
- 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 +3 -3
- package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcFormSection.vue.d.ts +8 -1
- package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
- package/dist/lib/components/AcGraphChart.js +5 -0
- package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
- package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
- package/dist/lib/components/AcHeader.vue.d.ts +20 -5
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +82 -28
- package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
- package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
- package/dist/lib/components/AcInput.vue.d.ts +4 -4
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +99 -91
- 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 +336 -0
- package/dist/lib/components/AcLineChart.js +5 -0
- package/dist/lib/components/AcLineChart.vue.d.ts +44 -0
- package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +175 -0
- package/dist/lib/components/AcLoader.js +5 -0
- package/dist/lib/components/AcLoader.vue.d.ts +15 -0
- package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/lib/components/AcLocaleSwitcher.js +5 -0
- package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +48 -0
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +111 -0
- package/dist/lib/components/AcMapChart.js +5 -0
- package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
- package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
- package/dist/lib/components/AcModal.vue.d.ts +6 -3
- package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +88 -64
- package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +29 -21
- package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
- package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +23 -24
- package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +139 -174
- 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 +241 -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 +22 -5
- package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +87 -56
- package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
- package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
- package/dist/lib/components/AcProductHero.js +5 -0
- package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
- package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
- package/dist/lib/components/AcProgress.vue.d.ts +19 -4
- package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +85 -31
- package/dist/lib/components/AcResourceCard.vue.d.ts +3 -3
- package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
- package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +14 -9
- 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 +6 -6
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +246 -254
- package/dist/lib/components/AcSettingsRow.js +5 -0
- package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
- package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +32 -32
- package/dist/lib/components/AcSideTabs.vue.d.ts +2 -2
- package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/lib/components/AcSidebar.vue.d.ts +6 -3
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +67 -57
- package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +46 -45
- package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
- package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
- 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.d.ts +3 -0
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +31 -19
- 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 +121 -0
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +97 -97
- package/dist/lib/components/AcTabs.vue.d.ts +9 -2
- package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +43 -28
- package/dist/lib/components/AcTag.vue.d.ts +2 -2
- 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 +289 -0
- package/dist/lib/components/AcTextarea.vue.d.ts +4 -4
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +85 -63
- package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +56 -24
- 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 +455 -0
- package/dist/lib/components/AcToaster.vue.d.ts +6 -3
- package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +115 -82
- package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +203 -79
- package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +166 -115
- package/dist/lib/components/index.d.ts +21 -2
- package/dist/lib/components/status.d.ts +28 -0
- package/dist/lib/components/status.js +125 -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/composables/useToast.d.ts +17 -1
- package/dist/lib/composables/useToast.js +10 -2
- package/dist/lib/editor/theme.js +65 -62
- package/dist/lib/index.d.ts +21 -3
- package/dist/lib/index.js +99 -75
- package/dist/lib/theme.css +377 -273
- package/package.json +20 -4
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import e from "./AcNavbarItem.js";
|
|
2
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, getCurrentInstance as p, mergeModels as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeStyle as ee, onBeforeUnmount as te, openBlock as v, ref as y, renderList as b, renderSlot as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, useId as
|
|
4
|
-
import { ArrowRight as
|
|
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, getCurrentInstance as p, mergeModels as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeStyle as ee, onBeforeUnmount as te, openBlock as v, ref as y, renderList as b, renderSlot as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, useId as T, useModel as ne, watch as E, withCtx as D } from "vue";
|
|
4
|
+
import { ArrowRight as re, Bell as ie, BellOff as ae } from "@lucide/vue";
|
|
5
5
|
//#region src/lib/components/AcNotificationMenu.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var oe = {
|
|
7
7
|
class: "inline-flex",
|
|
8
8
|
"data-ac-ds": "",
|
|
9
9
|
"data-testid": "ac-notification-menu"
|
|
10
|
-
},
|
|
10
|
+
}, se = { class: "flex shrink-0 items-center justify-between gap-2 border-b border-border p-3" }, ce = {
|
|
11
11
|
key: 0,
|
|
12
|
-
class: "
|
|
13
|
-
},
|
|
12
|
+
class: "sr-only"
|
|
13
|
+
}, le = {
|
|
14
14
|
key: 0,
|
|
15
|
-
class: "flex flex-col gap-4
|
|
15
|
+
class: "flex flex-col gap-4 p-3",
|
|
16
16
|
"aria-busy": "true",
|
|
17
17
|
role: "status",
|
|
18
18
|
"aria-label": "Loading notifications"
|
|
19
|
-
},
|
|
19
|
+
}, ue = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "flex flex-col items-center gap-3 px-6 py-10 text-center"
|
|
22
|
-
},
|
|
23
|
-
class: "inline-flex size-
|
|
22
|
+
}, de = {
|
|
23
|
+
class: "inline-flex size-12 items-center justify-center rounded-14 bg-primary/10 text-primary-strong",
|
|
24
24
|
"aria-hidden": "true"
|
|
25
|
-
},
|
|
25
|
+
}, fe = { class: "text-lg font-semibold text-heading" }, pe = {
|
|
26
26
|
key: 2,
|
|
27
27
|
role: "list",
|
|
28
|
-
class: "ac-scrollbar min-h-0 flex-1 divide-y divide-border
|
|
28
|
+
class: "ac-scrollbar min-h-0 flex-1 divide-y divide-border",
|
|
29
29
|
"data-ac-ds": "",
|
|
30
30
|
"data-testid": "ac-notification-menu-list"
|
|
31
|
-
},
|
|
32
|
-
key: 0,
|
|
33
|
-
class: "mt-0.5 line-clamp-2 text-xs text-body"
|
|
34
|
-
}, Ce = { class: "mt-1 flex items-center gap-1.5 text-xs text-muted" }, we = {
|
|
31
|
+
}, me = { class: "flex items-center gap-2" }, he = { class: "line-clamp-2 min-w-0 text-base font-medium text-heading" }, ge = {
|
|
35
32
|
key: 1,
|
|
33
|
+
class: "size-2 shrink-0 rounded-full bg-primary",
|
|
36
34
|
"aria-hidden": "true"
|
|
37
|
-
},
|
|
35
|
+
}, _e = {
|
|
36
|
+
key: 2,
|
|
37
|
+
class: "sr-only"
|
|
38
|
+
}, ve = {
|
|
38
39
|
key: 0,
|
|
39
|
-
class: "mt-
|
|
40
|
-
|
|
41
|
-
}, De = {
|
|
40
|
+
class: "mt-1 line-clamp-2 block text-xs text-muted"
|
|
41
|
+
}, ye = { class: "mt-1 flex items-center gap-1.5 text-xs text-muted" }, be = {
|
|
42
42
|
key: 1,
|
|
43
|
-
|
|
44
|
-
},
|
|
43
|
+
"aria-hidden": "true"
|
|
44
|
+
}, xe = ["datetime", "title"], Se = {
|
|
45
45
|
key: 3,
|
|
46
|
-
class: "shrink-0 border-t border-border
|
|
47
|
-
},
|
|
46
|
+
class: "shrink-0 border-t border-border p-1.5"
|
|
47
|
+
}, Ce = "[data-notification-item]", we = 6048e5, O = /*@__PURE__*/ f({
|
|
48
48
|
__name: "AcNotificationMenu",
|
|
49
49
|
props: /*@__PURE__*/ m({
|
|
50
50
|
notifications: { default: () => [] },
|
|
@@ -72,7 +72,7 @@ var pe = {
|
|
|
72
72
|
"viewAll"
|
|
73
73
|
], ["update:open"]),
|
|
74
74
|
setup(f, { emit: m }) {
|
|
75
|
-
let
|
|
75
|
+
let O = f, k = ne(f, "open"), A = m, Te = {
|
|
76
76
|
success: "success",
|
|
77
77
|
succeeded: "success",
|
|
78
78
|
completed: "success",
|
|
@@ -91,143 +91,123 @@ var pe = {
|
|
|
91
91
|
inprogress: "info",
|
|
92
92
|
progressing: "info",
|
|
93
93
|
info: "info"
|
|
94
|
-
},
|
|
95
|
-
success:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
danger: {
|
|
101
|
-
icon: le,
|
|
102
|
-
tile: "bg-red-95 text-red-40",
|
|
103
|
-
text: "text-red-30"
|
|
104
|
-
},
|
|
105
|
-
warning: {
|
|
106
|
-
icon: fe,
|
|
107
|
-
tile: "bg-yellow-95 text-yellow-40",
|
|
108
|
-
text: "text-yellow-30"
|
|
109
|
-
},
|
|
110
|
-
info: {
|
|
111
|
-
icon: de,
|
|
112
|
-
tile: "bg-blue-95 text-blue-40",
|
|
113
|
-
text: "text-blue-30"
|
|
114
|
-
},
|
|
115
|
-
neutral: {
|
|
116
|
-
icon: ue,
|
|
117
|
-
tile: "bg-slate-90 text-label",
|
|
118
|
-
text: "text-muted"
|
|
119
|
-
}
|
|
94
|
+
}, Ee = {
|
|
95
|
+
success: "text-success-strong",
|
|
96
|
+
danger: "text-danger-strong",
|
|
97
|
+
warning: "text-warning-strong",
|
|
98
|
+
info: "text-info-strong",
|
|
99
|
+
neutral: "text-muted"
|
|
120
100
|
}, j = new Intl.RelativeTimeFormat(void 0, {
|
|
121
101
|
numeric: "auto",
|
|
122
102
|
style: "narrow"
|
|
123
|
-
}),
|
|
103
|
+
}), De = new Intl.DateTimeFormat(void 0, {
|
|
124
104
|
dateStyle: "medium",
|
|
125
105
|
timeStyle: "short"
|
|
126
|
-
}),
|
|
106
|
+
}), Oe = new Intl.DateTimeFormat(void 0, {
|
|
127
107
|
month: "short",
|
|
128
108
|
day: "numeric"
|
|
129
|
-
}), M = p()?.appContext.components.RouterLink, N =
|
|
130
|
-
function
|
|
131
|
-
return e.type ? e.type :
|
|
109
|
+
}), M = p()?.appContext.components.RouterLink, N = T(), P = `${N}-panel`, F = `${N}-heading`, I = y(null), L = y(null), R = y({}), z = y(!0), B = y(Date.now()), V, H = a(() => O.unreadCount ?? O.notifications.filter((e) => !e.read).length), ke = a(() => O.notifications.some((e) => !e.read)), Ae = a(() => !!(O.viewAllHref || O.viewAllTo));
|
|
110
|
+
function je(e) {
|
|
111
|
+
return e.type ? e.type : Te[(e.status ?? "").toLowerCase().replace(/[^a-z]/g, "")] ?? "neutral";
|
|
132
112
|
}
|
|
133
|
-
function
|
|
113
|
+
function U(e) {
|
|
134
114
|
return e instanceof Date ? e.getTime() : typeof e == "number" ? e < 1e11 ? e * 1e3 : e : new Date(e).getTime();
|
|
135
115
|
}
|
|
136
|
-
function
|
|
137
|
-
let t =
|
|
116
|
+
function Me(e) {
|
|
117
|
+
let t = U(e);
|
|
138
118
|
if (Number.isNaN(t)) return "";
|
|
139
119
|
let n = t - B.value, r = Math.abs(n);
|
|
140
|
-
return r < 45e3 ? "Just now" : r >=
|
|
120
|
+
return r < 45e3 ? "Just now" : r >= we ? Oe.format(t) : r < 36e5 ? j.format(Math.round(n / 6e4), "minute") : r < 864e5 ? j.format(Math.round(n / 36e5), "hour") : j.format(Math.round(n / 864e5), "day");
|
|
141
121
|
}
|
|
142
|
-
function
|
|
143
|
-
let t =
|
|
144
|
-
return Number.isNaN(t) ? "" :
|
|
122
|
+
function Ne(e) {
|
|
123
|
+
let t = U(e);
|
|
124
|
+
return Number.isNaN(t) ? "" : De.format(t);
|
|
145
125
|
}
|
|
146
|
-
function
|
|
147
|
-
let t =
|
|
126
|
+
function Pe(e) {
|
|
127
|
+
let t = U(e);
|
|
148
128
|
return Number.isNaN(t) ? void 0 : new Date(t).toISOString();
|
|
149
129
|
}
|
|
150
|
-
function
|
|
130
|
+
function W(e, t) {
|
|
151
131
|
return e && M ? M : e || t ? "a" : "button";
|
|
152
132
|
}
|
|
153
|
-
function
|
|
154
|
-
let n =
|
|
133
|
+
function G(e, t) {
|
|
134
|
+
let n = W(e, t);
|
|
155
135
|
return n === M ? { to: e } : n === "a" ? { href: t || (typeof e == "string" ? e : void 0) } : { type: "button" };
|
|
156
136
|
}
|
|
157
|
-
function
|
|
137
|
+
function K() {
|
|
158
138
|
return I.value?.$el ?? null;
|
|
159
139
|
}
|
|
160
|
-
function
|
|
161
|
-
return [...L.value?.querySelectorAll(
|
|
140
|
+
function q() {
|
|
141
|
+
return [...L.value?.querySelectorAll(Ce) ?? []];
|
|
162
142
|
}
|
|
163
|
-
function
|
|
164
|
-
let t =
|
|
143
|
+
function J(e) {
|
|
144
|
+
let t = q();
|
|
165
145
|
t.length && t[(e + t.length) % t.length].focus();
|
|
166
146
|
}
|
|
167
|
-
function
|
|
168
|
-
let e =
|
|
147
|
+
function Y() {
|
|
148
|
+
let e = K();
|
|
169
149
|
if (!e || !L.value) return;
|
|
170
|
-
let t = e.getBoundingClientRect(), { offsetWidth: n, offsetHeight: r } = L.value, i = window.innerHeight - t.bottom - 6 - 8, a = t.top - 6 - 8, o = i < r && a > i, s =
|
|
150
|
+
let t = e.getBoundingClientRect(), { offsetWidth: n, offsetHeight: r } = L.value, i = window.innerHeight - t.bottom - 6 - 8, a = t.top - 6 - 8, o = i < r && a > i, s = O.align === "end" ? t.right - n : t.left;
|
|
171
151
|
z.value = !o, R.value = {
|
|
172
152
|
[o ? "bottom" : "top"]: `${o ? window.innerHeight - t.top + 6 : t.bottom + 6}px`,
|
|
173
153
|
left: `${Math.max(8, Math.min(s, window.innerWidth - n - 8))}px`,
|
|
174
154
|
maxHeight: `${Math.max(o ? a : i, 200)}px`
|
|
175
155
|
};
|
|
176
156
|
}
|
|
177
|
-
function
|
|
178
|
-
|
|
157
|
+
function X(e = !0) {
|
|
158
|
+
k.value && (k.value = !1, e && K()?.focus());
|
|
179
159
|
}
|
|
180
|
-
function
|
|
181
|
-
|
|
160
|
+
function Z() {
|
|
161
|
+
k.value ? X() : k.value = !0;
|
|
182
162
|
}
|
|
183
|
-
function
|
|
184
|
-
|
|
163
|
+
function Fe(e) {
|
|
164
|
+
A("select", e), X(!1);
|
|
185
165
|
}
|
|
186
|
-
function
|
|
187
|
-
|
|
166
|
+
function Ie() {
|
|
167
|
+
A("viewAll"), X(!1);
|
|
188
168
|
}
|
|
189
|
-
function
|
|
190
|
-
e.key !== "ArrowDown" ||
|
|
169
|
+
function Le(e) {
|
|
170
|
+
e.key !== "ArrowDown" || k.value || (e.preventDefault(), k.value = !0);
|
|
191
171
|
}
|
|
192
|
-
function
|
|
193
|
-
let t =
|
|
194
|
-
(e.key === "ArrowDown" || e.key === "ArrowUp") && t.length ? (e.preventDefault(),
|
|
172
|
+
function Re(e) {
|
|
173
|
+
let t = q(), n = t.indexOf(document.activeElement);
|
|
174
|
+
(e.key === "ArrowDown" || e.key === "ArrowUp") && t.length ? (e.preventDefault(), J(n < 0 ? e.key === "ArrowDown" ? 0 : -1 : n + (e.key === "ArrowDown" ? 1 : -1))) : (e.key === "Home" || e.key === "End") && n >= 0 ? (e.preventDefault(), J(e.key === "Home" ? 0 : -1)) : e.key === "Escape" ? (e.preventDefault(), X()) : e.key === "Tab" && ze(e);
|
|
195
175
|
}
|
|
196
|
-
function
|
|
176
|
+
function ze(e) {
|
|
197
177
|
let t = [...L.value?.querySelectorAll("a[href], button:not([disabled])") ?? []], n = t[0], r = t[t.length - 1];
|
|
198
|
-
e.shiftKey && (document.activeElement === n || document.activeElement === L.value) ? (e.preventDefault(),
|
|
178
|
+
e.shiftKey && (document.activeElement === n || document.activeElement === L.value) ? (e.preventDefault(), X()) : !e.shiftKey && (document.activeElement === r || !t.length) && X();
|
|
199
179
|
}
|
|
200
|
-
function
|
|
180
|
+
function Be(e) {
|
|
201
181
|
let t = e.target;
|
|
202
|
-
|
|
182
|
+
K()?.contains(t) || L.value?.contains(t) || X(!1);
|
|
203
183
|
}
|
|
204
184
|
function Q(e) {
|
|
205
|
-
e && L.value?.contains(e.target) ||
|
|
185
|
+
e?.target instanceof Node && L.value?.contains(e.target) || Y();
|
|
206
186
|
}
|
|
207
187
|
function $(e) {
|
|
208
188
|
let t = e ? "addEventListener" : "removeEventListener";
|
|
209
|
-
document[t]("pointerdown",
|
|
189
|
+
document[t]("pointerdown", Be, !0), window[t]("scroll", Q, !0), window[t]("resize", Q), clearInterval(V), e && (V = setInterval(() => B.value = Date.now(), 3e4));
|
|
210
190
|
}
|
|
211
|
-
return
|
|
191
|
+
return E(k, async (e) => {
|
|
212
192
|
if ($(e), !e) return;
|
|
213
|
-
B.value = Date.now(), await g(),
|
|
214
|
-
let t =
|
|
193
|
+
B.value = Date.now(), await g(), Y();
|
|
194
|
+
let t = q()[0];
|
|
215
195
|
t ? t.focus() : L.value?.focus();
|
|
216
|
-
}),
|
|
196
|
+
}), E(() => [O.notifications.length, O.loading], () => k.value && g(Y)), te(() => $(!1)), (a, p) => (v(), c("div", oe, [d(e, {
|
|
217
197
|
ref_key: "trigger",
|
|
218
198
|
ref: I,
|
|
219
199
|
label: f.label,
|
|
220
|
-
icon: w(
|
|
200
|
+
icon: w(ie),
|
|
221
201
|
"icon-only": "",
|
|
222
202
|
badge: H.value,
|
|
223
203
|
"aria-haspopup": "dialog",
|
|
224
|
-
"aria-expanded":
|
|
225
|
-
"aria-controls":
|
|
226
|
-
class: _(
|
|
204
|
+
"aria-expanded": k.value,
|
|
205
|
+
"aria-controls": k.value ? P : void 0,
|
|
206
|
+
class: _(k.value && "border-border bg-surface-sunken/50 text-heading"),
|
|
227
207
|
"data-ac-ds": "",
|
|
228
208
|
"data-testid": "ac-notification-menu-trigger",
|
|
229
|
-
onClick:
|
|
230
|
-
onKeydown:
|
|
209
|
+
onClick: Z,
|
|
210
|
+
onKeydown: Le
|
|
231
211
|
}, null, 8, [
|
|
232
212
|
"label",
|
|
233
213
|
"icon",
|
|
@@ -237,11 +217,11 @@ var pe = {
|
|
|
237
217
|
"class"
|
|
238
218
|
]), (v(), o(r, { to: "body" }, [d(i, {
|
|
239
219
|
"enter-active-class": "transition duration-150 ease-out",
|
|
240
|
-
"enter-from-class":
|
|
220
|
+
"enter-from-class": "opacity-0 motion-safe:scale-95",
|
|
241
221
|
"leave-active-class": "transition duration-100 ease-in",
|
|
242
222
|
"leave-to-class": "opacity-0"
|
|
243
223
|
}, {
|
|
244
|
-
default:
|
|
224
|
+
default: D(() => [k.value ? (v(), c("div", {
|
|
245
225
|
key: 0,
|
|
246
226
|
id: P,
|
|
247
227
|
ref_key: "panel",
|
|
@@ -249,97 +229,82 @@ var pe = {
|
|
|
249
229
|
role: "dialog",
|
|
250
230
|
tabindex: "-1",
|
|
251
231
|
"aria-labelledby": F,
|
|
252
|
-
class: _(["fixed z-[90] flex w-[calc(
|
|
232
|
+
class: _(["fixed z-[90] flex w-[calc(320px*var(--ac-scale))] max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-14 border border-border/80 bg-surface shadow-lg outline-none", z.value ? "origin-top-right" : "origin-bottom-right"]),
|
|
253
233
|
style: ee(R.value),
|
|
254
234
|
"data-ac-ds": "",
|
|
255
235
|
"data-testid": "ac-notification-menu-panel",
|
|
256
|
-
onKeydown:
|
|
236
|
+
onKeydown: Re
|
|
257
237
|
}, [
|
|
258
|
-
l("div",
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
onClick: p[0] ||= (e) => k("markAllRead")
|
|
271
|
-
}, [d(w(se), {
|
|
272
|
-
class: "size-3.5",
|
|
273
|
-
"aria-hidden": "true"
|
|
274
|
-
}), p[2] ||= u(" Mark all as read ", -1)])) : s("", !0)
|
|
275
|
-
]),
|
|
276
|
-
f.loading ? (v(), c("div", ge, [(v(), c(n, null, b(3, (e) => l("div", {
|
|
238
|
+
l("div", se, [l("h2", {
|
|
239
|
+
id: F,
|
|
240
|
+
class: "font-heading text-base font-semibold text-heading"
|
|
241
|
+
}, C(f.label), 1), ke.value || H.value ? (v(), c("button", {
|
|
242
|
+
key: 0,
|
|
243
|
+
type: "button",
|
|
244
|
+
class: "cursor-pointer rounded-4 text-xs text-muted transition-colors duration-200 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
245
|
+
"data-ac-ds": "",
|
|
246
|
+
"data-testid": "ac-notification-menu-mark-all",
|
|
247
|
+
onClick: p[0] ||= (e) => A("markAllRead")
|
|
248
|
+
}, [p[1] ||= u(" Mark all as read", -1), H.value ? (v(), c("span", ce, " (" + C(H.value) + " unread)", 1)) : s("", !0)])) : s("", !0)]),
|
|
249
|
+
f.loading ? (v(), c("div", le, [(v(), c(n, null, b(3, (e) => d(t, {
|
|
277
250
|
key: e,
|
|
278
|
-
class: "flex gap-3"
|
|
279
|
-
}, [d(t, {
|
|
280
|
-
shape: "rect",
|
|
281
|
-
width: "28px",
|
|
282
|
-
height: "28px",
|
|
283
|
-
label: "",
|
|
284
|
-
class: "shrink-0"
|
|
285
|
-
}), d(t, {
|
|
286
251
|
shape: "text",
|
|
287
|
-
lines:
|
|
252
|
+
lines: 3,
|
|
288
253
|
height: "10px",
|
|
289
|
-
label: ""
|
|
290
|
-
|
|
291
|
-
})])), 64))])) : f.notifications.length ? (v(), c("ul", be, [(v(!0), c(n, null, b(f.notifications, (e) => (v(), c("li", { key: e.id }, [(v(), o(S(G(e.to, e.href)), h({ ref_for: !0 }, K(e.to, e.href), {
|
|
254
|
+
label: ""
|
|
255
|
+
})), 64))])) : f.notifications.length ? (v(), c("ul", pe, [(v(!0), c(n, null, b(f.notifications, (e) => (v(), c("li", { key: e.id }, [(v(), o(S(W(e.to, e.href)), h({ ref_for: !0 }, G(e.to, e.href), {
|
|
292
256
|
"data-notification-item": "",
|
|
293
|
-
class: ["relative
|
|
257
|
+
class: ["relative block w-full cursor-pointer p-3 text-left no-underline outline-none transition-colors duration-200 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", !e.read && "bg-primary/8"],
|
|
294
258
|
"data-ac-ds": "",
|
|
295
259
|
"data-testid": "ac-notification-menu-item",
|
|
296
|
-
onClick: (t) =>
|
|
260
|
+
onClick: (t) => Fe(e)
|
|
297
261
|
}), {
|
|
298
|
-
default:
|
|
299
|
-
l("span",
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
key: 0,
|
|
309
|
-
class: _(["font-medium", A[U(e)].text])
|
|
310
|
-
}, C(e.status), 3)) : s("", !0),
|
|
311
|
-
e.status ? (v(), c("span", we, "·")) : s("", !0),
|
|
312
|
-
l("time", {
|
|
313
|
-
datetime: Re(e.time),
|
|
314
|
-
title: Le(e.time)
|
|
315
|
-
}, C(Ie(e.time)), 9, Te)
|
|
316
|
-
])
|
|
262
|
+
default: D(() => [x(a.$slots, "item", { item: e }, () => [
|
|
263
|
+
l("span", me, [
|
|
264
|
+
e.icon ? (v(), o(S(e.icon), {
|
|
265
|
+
key: 0,
|
|
266
|
+
class: "size-4 shrink-0 text-muted",
|
|
267
|
+
"aria-hidden": "true"
|
|
268
|
+
})) : s("", !0),
|
|
269
|
+
l("span", he, C(e.title || e.msg), 1),
|
|
270
|
+
e.read ? s("", !0) : (v(), c("span", ge)),
|
|
271
|
+
e.read ? s("", !0) : (v(), c("span", _e, "(unread)"))
|
|
317
272
|
]),
|
|
318
|
-
e.
|
|
319
|
-
|
|
273
|
+
e.title && e.msg ? (v(), c("span", ve, C(e.msg), 1)) : s("", !0),
|
|
274
|
+
l("span", ye, [
|
|
275
|
+
e.status ? (v(), c("span", {
|
|
276
|
+
key: 0,
|
|
277
|
+
class: _(["font-medium", Ee[je(e)]])
|
|
278
|
+
}, C(e.status), 3)) : s("", !0),
|
|
279
|
+
e.status ? (v(), c("span", be, "·")) : s("", !0),
|
|
280
|
+
l("time", {
|
|
281
|
+
datetime: Pe(e.time),
|
|
282
|
+
title: Ne(e.time)
|
|
283
|
+
}, C(Me(e.time)), 9, xe)
|
|
284
|
+
])
|
|
320
285
|
])]),
|
|
321
286
|
_: 2
|
|
322
|
-
}, 1040, ["class", "onClick"]))]))), 128))])) : (v(), c("div",
|
|
323
|
-
l("span",
|
|
324
|
-
l("p",
|
|
325
|
-
p[
|
|
287
|
+
}, 1040, ["class", "onClick"]))]))), 128))])) : (v(), c("div", ue, [x(a.$slots, "empty", {}, () => [
|
|
288
|
+
l("span", de, [d(w(ae), { class: "size-6" })]),
|
|
289
|
+
l("p", fe, C(f.emptyText), 1),
|
|
290
|
+
p[2] ||= l("p", { class: "max-w-64 text-base text-muted" }, "Backups, upgrades and alerts from your clusters show up here.", -1)
|
|
326
291
|
])])),
|
|
327
|
-
a.$slots.footer ||
|
|
328
|
-
class: "flex h-
|
|
292
|
+
a.$slots.footer || Ae.value ? (v(), c("div", Se, [x(a.$slots, "footer", { close: X }, () => [(v(), o(S(W(f.viewAllTo, f.viewAllHref)), h(G(f.viewAllTo, f.viewAllHref), {
|
|
293
|
+
class: "group/link flex h-9 w-full cursor-pointer items-center justify-center gap-1.5 rounded-8 text-base font-semibold text-primary-strong no-underline outline-none transition-colors duration-200 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
329
294
|
"data-ac-ds": "",
|
|
330
295
|
"data-testid": "ac-notification-menu-view-all",
|
|
331
|
-
onClick:
|
|
296
|
+
onClick: Ie
|
|
332
297
|
}), {
|
|
333
|
-
default:
|
|
334
|
-
class: "size-3.5",
|
|
298
|
+
default: D(() => [u(C(f.viewAllLabel) + " ", 1), d(w(re), {
|
|
299
|
+
class: "size-3.5 transition-transform duration-200 group-hover/link:translate-x-0.5 motion-reduce:transition-none",
|
|
335
300
|
"aria-hidden": "true"
|
|
336
301
|
})]),
|
|
337
302
|
_: 1
|
|
338
303
|
}, 16))])])) : s("", !0)
|
|
339
304
|
], 38)) : s("", !0)]),
|
|
340
305
|
_: 3
|
|
341
|
-
}
|
|
306
|
+
})]))]));
|
|
342
307
|
}
|
|
343
308
|
});
|
|
344
309
|
//#endregion
|
|
345
|
-
export {
|
|
310
|
+
export { O as default };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export interface Props {
|
|
2
|
+
/** Label above the field. Without one, pass `aria-label` so the field still has a name. */
|
|
3
|
+
label?: string;
|
|
4
|
+
/** Native `name` attribute. */
|
|
5
|
+
name?: string;
|
|
6
|
+
/** Lowest allowed value. ↓, − and Home stop here, and typed values are clamped to it on blur. No limit by default. */
|
|
7
|
+
min?: number;
|
|
8
|
+
/** Highest allowed value. ↑, + and End stop here, and typed values are clamped to it on blur. No limit by default. */
|
|
9
|
+
max?: number;
|
|
10
|
+
/** Amount one − / + press or one ↑ / ↓ adds. Page Up / Page Down move 10 steps. Its decimals set the precision, e.g. `0.1` keeps one decimal. */
|
|
11
|
+
step?: number;
|
|
12
|
+
/** Decimal places to keep. Defaults to the decimals in `step`; values are rounded to it on blur. */
|
|
13
|
+
precision?: number;
|
|
14
|
+
/** Unit shown after the value, e.g. `GiB`, `vCPU` or `%`. Also read out with the value. */
|
|
15
|
+
unit?: string;
|
|
16
|
+
/** Shows bordered − and + buttons on either side of the field. Off by default, like cloud-ui. Cloud `is-show-inc-dec`. */
|
|
17
|
+
stepButtons?: boolean;
|
|
18
|
+
/** Milliseconds a − / + press is held before it starts repeating. */
|
|
19
|
+
holdDelay?: number;
|
|
20
|
+
/** Milliseconds between repeats while − / + is held. */
|
|
21
|
+
holdIntervalDelay?: number;
|
|
22
|
+
/** Marks the field required and adds a red asterisk. */
|
|
23
|
+
required?: boolean;
|
|
24
|
+
/** Disables the field and its buttons. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Read-only field: a muted fill, "(read only)" after the label, and no stepping. */
|
|
27
|
+
readonly?: boolean;
|
|
28
|
+
/** Error text under the field. Turns the border red and sets `aria-invalid`. */
|
|
29
|
+
errorMsg?: string;
|
|
30
|
+
/** Help text between the label and the field. */
|
|
31
|
+
hint?: string;
|
|
32
|
+
/** `small` 36px or `normal` 42px tall, the same as `AcInput`; the step buttons match. */
|
|
33
|
+
size?: "small" | "normal";
|
|
34
|
+
}
|
|
35
|
+
type __VLS_Props = Props;
|
|
36
|
+
type __VLS_Slots = {
|
|
37
|
+
/** Content inside the field after the value, before the buttons: an icon or richer unit text. */
|
|
38
|
+
suffix?: () => unknown;
|
|
39
|
+
};
|
|
40
|
+
type __VLS_ModelProps = {
|
|
41
|
+
/** The number, or `null` while the field is empty. */
|
|
42
|
+
modelValue?: number | null;
|
|
43
|
+
};
|
|
44
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
45
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
46
|
+
/** Moves focus to the input. */
|
|
47
|
+
focus: () => void | undefined;
|
|
48
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
49
|
+
"update:modelValue": (value: number | null) => any;
|
|
50
|
+
change: (value: number | null) => any;
|
|
51
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
52
|
+
"onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
|
|
53
|
+
onChange?: ((value: number | null) => any) | undefined;
|
|
54
|
+
}>, {
|
|
55
|
+
required: boolean;
|
|
56
|
+
label: string;
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
max: number;
|
|
59
|
+
min: number;
|
|
60
|
+
name: string;
|
|
61
|
+
size: "small" | "normal";
|
|
62
|
+
step: number;
|
|
63
|
+
readonly: boolean;
|
|
64
|
+
hint: string;
|
|
65
|
+
errorMsg: string;
|
|
66
|
+
unit: string;
|
|
67
|
+
precision: number;
|
|
68
|
+
stepButtons: boolean;
|
|
69
|
+
holdDelay: number;
|
|
70
|
+
holdIntervalDelay: number;
|
|
71
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
73
|
+
declare const _default: typeof __VLS_export;
|
|
74
|
+
export default _default;
|
|
75
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
76
|
+
new (): {
|
|
77
|
+
$slots: S;
|
|
78
|
+
};
|
|
79
|
+
};
|