@ac-design/design-system 2.0.0 → 2.1.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.
Files changed (167) hide show
  1. package/dist/lib/charts/ChartFrame.vue.d.ts +2 -0
  2. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +42 -37
  3. package/dist/lib/charts/cartesian.d.ts +324 -0
  4. package/dist/lib/charts/cartesian.js +137 -0
  5. package/dist/lib/charts/echarts.d.ts +86 -0
  6. package/dist/lib/charts/echarts.js +173 -0
  7. package/dist/lib/charts/graph.d.ts +77 -0
  8. package/dist/lib/charts/graph.js +155 -0
  9. package/dist/lib/charts/index.d.ts +4 -0
  10. package/dist/lib/charts/index.js +3 -1
  11. package/dist/lib/charts/shared.d.ts +0 -7
  12. package/dist/lib/charts/shared.js +1 -19
  13. package/dist/lib/charts/xy.d.ts +11 -7
  14. package/dist/lib/charts/xy.js +53 -72
  15. package/dist/lib/compat.css +1322 -278
  16. package/dist/lib/components/AcAlert.vue.d.ts +9 -0
  17. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +121 -21
  18. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +1 -1
  19. package/dist/lib/components/AcAreaChart.vue.d.ts +3 -0
  20. package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +132 -142
  21. package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
  22. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +59 -54
  23. package/dist/lib/components/AcBadge.vue.d.ts +7 -3
  24. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +35 -28
  25. package/dist/lib/components/AcBarChart.vue.d.ts +3 -0
  26. package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +142 -146
  27. package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
  28. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +18 -17
  29. package/dist/lib/components/AcBulkActionBar.vue.d.ts +2 -0
  30. package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/dist/lib/components/AcButton.vue.d.ts +12 -6
  32. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +85 -47
  33. package/dist/lib/components/AcCard.vue.d.ts +34 -3
  34. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +169 -34
  35. package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
  36. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +171 -165
  37. package/dist/lib/components/AcCheckBox.vue.d.ts +1 -1
  38. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +58 -72
  39. package/dist/lib/components/AcCheckList.js +5 -0
  40. package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
  41. package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
  42. package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
  43. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +100 -36
  44. package/dist/lib/components/AcCircularProgress.vue.d.ts +4 -4
  45. package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +12 -9
  46. package/dist/lib/components/AcColorInput.vue.d.ts +5 -2
  47. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +127 -97
  48. package/dist/lib/components/AcCommandBlock.js +5 -0
  49. package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
  50. package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -0
  51. package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
  52. package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +7 -3
  53. package/dist/lib/components/AcCopyButton.vue.d.ts +2 -2
  54. package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +4 -4
  55. package/dist/lib/components/AcCostSummary.js +5 -0
  56. package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
  57. package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
  58. package/dist/lib/components/AcDatePicker.vue.d.ts +3 -3
  59. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +606 -380
  60. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +47 -41
  61. package/dist/lib/components/AcDonutChart.vue.d.ts +10 -0
  62. package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +116 -89
  63. package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
  64. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +88 -75
  65. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
  66. package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
  67. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +17 -17
  68. package/dist/lib/components/AcEmptyState.vue.d.ts +1 -1
  69. package/dist/lib/components/AcErrorState.js +5 -0
  70. package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
  71. package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
  72. package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
  73. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +136 -114
  74. package/dist/lib/components/AcFooter.vue.d.ts +1 -1
  75. package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +1 -1
  76. package/dist/lib/components/AcFormFooter.vue.d.ts +1 -1
  77. package/dist/lib/components/AcFormSection.vue.d.ts +1 -1
  78. package/dist/lib/components/AcGraphChart.js +5 -0
  79. package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
  80. package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
  81. package/dist/lib/components/AcHeader.vue.d.ts +20 -2
  82. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +84 -26
  83. package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
  84. package/dist/lib/components/AcInput.vue.d.ts +1 -1
  85. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +76 -79
  86. package/dist/lib/components/AcKeyValueInput.vue.d.ts +4 -4
  87. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +199 -183
  88. package/dist/lib/components/AcLineChart.vue.d.ts +6 -0
  89. package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +113 -125
  90. package/dist/lib/components/AcLoader.js +5 -0
  91. package/dist/lib/components/AcLoader.vue.d.ts +15 -0
  92. package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
  93. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +3 -1
  94. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +44 -36
  95. package/dist/lib/components/AcMapChart.js +5 -0
  96. package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
  97. package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
  98. package/dist/lib/components/AcModal.vue.d.ts +6 -3
  99. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +85 -61
  100. package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
  101. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +25 -17
  102. package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
  103. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +3 -4
  104. package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
  105. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +133 -168
  106. package/dist/lib/components/AcNumberInput.vue.d.ts +2 -2
  107. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +137 -147
  108. package/dist/lib/components/AcPage.vue.d.ts +2 -2
  109. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +1 -1
  110. package/dist/lib/components/AcPagination.vue.d.ts +5 -5
  111. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +59 -56
  112. package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
  113. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
  114. package/dist/lib/components/AcProductHero.js +5 -0
  115. package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
  116. package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
  117. package/dist/lib/components/AcProgress.vue.d.ts +17 -2
  118. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +83 -29
  119. package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
  120. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +4 -4
  121. package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
  122. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +8 -4
  123. package/dist/lib/components/AcSelect.vue.d.ts +3 -3
  124. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +232 -243
  125. package/dist/lib/components/AcSettingsRow.js +5 -0
  126. package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
  127. package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
  128. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +5 -5
  129. package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
  130. package/dist/lib/components/AcSidebar.vue.d.ts +4 -1
  131. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +104 -94
  132. package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
  133. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +42 -42
  134. package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
  135. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
  136. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +1 -1
  137. package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
  138. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +46 -39
  139. package/dist/lib/components/AcSwitchCard.vue.d.ts +3 -3
  140. package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +9 -7
  141. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +65 -65
  142. package/dist/lib/components/AcTabs.vue.d.ts +9 -2
  143. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +42 -27
  144. package/dist/lib/components/AcTag.vue.d.ts +1 -1
  145. package/dist/lib/components/AcTagInput.vue.d.ts +5 -5
  146. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +140 -142
  147. package/dist/lib/components/AcTextarea.vue.d.ts +1 -1
  148. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +69 -72
  149. package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
  150. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +54 -22
  151. package/dist/lib/components/AcTimePicker.vue.d.ts +1 -1
  152. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +177 -185
  153. package/dist/lib/components/AcToaster.vue.d.ts +6 -3
  154. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +103 -64
  155. package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
  156. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +184 -70
  157. package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
  158. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +181 -138
  159. package/dist/lib/components/index.d.ts +7 -0
  160. package/dist/lib/components/status.d.ts +3 -1
  161. package/dist/lib/components/status.js +20 -5
  162. package/dist/lib/composables/useToast.d.ts +17 -1
  163. package/dist/lib/composables/useToast.js +10 -2
  164. package/dist/lib/index.d.ts +7 -3
  165. package/dist/lib/index.js +80 -73
  166. package/dist/lib/theme.css +39 -54
  167. package/package.json +12 -3
@@ -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 ne, useModel as re, watch as T, withCtx as E } from "vue";
4
- import { ArrowRight as ie, Bell as ae, BellOff as oe, CheckCheck as se, CircleCheck as ce, CircleX as le, Info as ue, LoaderCircle as de, TriangleAlert as fe } from "@lucide/vue";
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 pe = {
6
+ var oe = {
7
7
  class: "inline-flex",
8
8
  "data-ac-ds": "",
9
9
  "data-testid": "ac-notification-menu"
10
- }, me = { class: "flex h-13 shrink-0 items-center gap-2 border-b border-border pr-2.5 pl-4" }, he = {
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: "inline-flex items-center justify-center rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary-strong tabular-nums"
13
- }, ge = {
12
+ class: "sr-only"
13
+ }, le = {
14
14
  key: 0,
15
- class: "flex flex-col gap-4 px-4 py-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
- }, _e = {
19
+ }, ue = {
20
20
  key: 1,
21
21
  class: "flex flex-col items-center gap-3 px-6 py-10 text-center"
22
- }, ve = {
22
+ }, de = {
23
23
  class: "inline-flex size-12 items-center justify-center rounded-14 bg-primary/10 text-primary-strong",
24
24
  "aria-hidden": "true"
25
- }, ye = { class: "text-lg font-semibold text-heading" }, be = {
25
+ }, fe = { class: "text-lg font-semibold text-heading" }, pe = {
26
26
  key: 2,
27
27
  role: "list",
28
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
- }, xe = { class: "min-w-0 flex-1" }, Se = {
32
- key: 0,
33
- class: "mt-1 line-clamp-2 text-xs text-muted"
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
- }, Te = ["datetime", "title"], Ee = {
35
+ }, _e = {
36
+ key: 2,
37
+ class: "sr-only"
38
+ }, ve = {
38
39
  key: 0,
39
- class: "mt-2 size-2 shrink-0 rounded-full bg-primary",
40
- "aria-hidden": "true"
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
- class: "sr-only"
44
- }, Oe = {
43
+ "aria-hidden": "true"
44
+ }, xe = ["datetime", "title"], Se = {
45
45
  key: 3,
46
46
  class: "shrink-0 border-t border-border p-1.5"
47
- }, ke = "[data-notification-item]", Ae = 6048e5, D = /*@__PURE__*/ f({
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 D = f, O = re(f, "open"), k = m, je = {
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
- }, A = {
95
- success: {
96
- icon: ce,
97
- tile: "bg-success/10 text-success-strong",
98
- text: "text-success-strong"
99
- },
100
- danger: {
101
- icon: le,
102
- tile: "bg-danger/10 text-danger-strong",
103
- text: "text-danger-strong"
104
- },
105
- warning: {
106
- icon: fe,
107
- tile: "bg-warning/10 text-warning-strong",
108
- text: "text-warning-strong"
109
- },
110
- info: {
111
- icon: de,
112
- tile: "bg-info/10 text-info-strong",
113
- text: "text-info-strong"
114
- },
115
- neutral: {
116
- icon: ue,
117
- tile: "bg-surface-sunken text-muted",
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
- }), Me = new Intl.DateTimeFormat(void 0, {
103
+ }), De = new Intl.DateTimeFormat(void 0, {
124
104
  dateStyle: "medium",
125
105
  timeStyle: "short"
126
- }), Ne = new Intl.DateTimeFormat(void 0, {
106
+ }), Oe = new Intl.DateTimeFormat(void 0, {
127
107
  month: "short",
128
108
  day: "numeric"
129
- }), M = p()?.appContext.components.RouterLink, N = ne(), P = `${N}-panel`, F = `${N}-heading`, I = y(null), L = y(null), R = y({}), z = y(!0), B = y(Date.now()), V, H = a(() => D.unreadCount ?? D.notifications.filter((e) => !e.read).length), Pe = a(() => D.notifications.some((e) => !e.read)), Fe = a(() => !!(D.viewAllHref || D.viewAllTo));
130
- function U(e) {
131
- return e.type ? e.type : je[(e.status ?? "").toLowerCase().replace(/[^a-z]/g, "")] ?? "neutral";
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 W(e) {
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 Ie(e) {
137
- let t = W(e);
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 >= Ae ? Ne.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");
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 Le(e) {
143
- let t = W(e);
144
- return Number.isNaN(t) ? "" : Me.format(t);
122
+ function Ne(e) {
123
+ let t = U(e);
124
+ return Number.isNaN(t) ? "" : De.format(t);
145
125
  }
146
- function Re(e) {
147
- let t = W(e);
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 G(e, t) {
130
+ function W(e, t) {
151
131
  return e && M ? M : e || t ? "a" : "button";
152
132
  }
153
- function K(e, t) {
154
- let n = G(e, t);
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 q() {
137
+ function K() {
158
138
  return I.value?.$el ?? null;
159
139
  }
160
- function J() {
161
- return [...L.value?.querySelectorAll(ke) ?? []];
140
+ function q() {
141
+ return [...L.value?.querySelectorAll(Ce) ?? []];
162
142
  }
163
- function Y(e) {
164
- let t = J();
143
+ function J(e) {
144
+ let t = q();
165
145
  t.length && t[(e + t.length) % t.length].focus();
166
146
  }
167
- function X() {
168
- let e = q();
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 = D.align === "end" ? t.right - n : t.left;
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 Z(e = !0) {
178
- O.value && (O.value = !1, e && q()?.focus());
157
+ function X(e = !0) {
158
+ k.value && (k.value = !1, e && K()?.focus());
179
159
  }
180
- function ze() {
181
- O.value ? Z() : O.value = !0;
160
+ function Z() {
161
+ k.value ? X() : k.value = !0;
182
162
  }
183
- function Be(e) {
184
- k("select", e), Z(!1);
163
+ function Fe(e) {
164
+ A("select", e), X(!1);
185
165
  }
186
- function Ve() {
187
- k("viewAll"), Z(!1);
166
+ function Ie() {
167
+ A("viewAll"), X(!1);
188
168
  }
189
- function He(e) {
190
- e.key !== "ArrowDown" || O.value || (e.preventDefault(), O.value = !0);
169
+ function Le(e) {
170
+ e.key !== "ArrowDown" || k.value || (e.preventDefault(), k.value = !0);
191
171
  }
192
- function Ue(e) {
193
- let t = J(), n = t.indexOf(document.activeElement);
194
- (e.key === "ArrowDown" || e.key === "ArrowUp") && t.length ? (e.preventDefault(), Y(n < 0 ? e.key === "ArrowDown" ? 0 : -1 : n + (e.key === "ArrowDown" ? 1 : -1))) : (e.key === "Home" || e.key === "End") && n >= 0 ? (e.preventDefault(), Y(e.key === "Home" ? 0 : -1)) : e.key === "Escape" ? (e.preventDefault(), Z()) : e.key === "Tab" && We(e);
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 We(e) {
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(), Z()) : !e.shiftKey && (document.activeElement === r || !t.length) && Z();
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 Ge(e) {
180
+ function Be(e) {
201
181
  let t = e.target;
202
- q()?.contains(t) || L.value?.contains(t) || Z(!1);
182
+ K()?.contains(t) || L.value?.contains(t) || X(!1);
203
183
  }
204
184
  function Q(e) {
205
- e?.target instanceof Node && L.value?.contains(e.target) || X();
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", Ge, !0), window[t]("scroll", Q, !0), window[t]("resize", Q), clearInterval(V), e && (V = setInterval(() => B.value = Date.now(), 3e4));
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 T(O, async (e) => {
191
+ return E(k, async (e) => {
212
192
  if ($(e), !e) return;
213
- B.value = Date.now(), await g(), X();
214
- let t = J()[0];
193
+ B.value = Date.now(), await g(), Y();
194
+ let t = q()[0];
215
195
  t ? t.focus() : L.value?.focus();
216
- }), T(() => [D.notifications.length, D.loading], () => O.value && g(X)), te(() => $(!1)), (a, p) => (v(), c("div", pe, [d(e, {
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(ae),
200
+ icon: w(ie),
221
201
  "icon-only": "",
222
202
  badge: H.value,
223
203
  "aria-haspopup": "dialog",
224
- "aria-expanded": O.value,
225
- "aria-controls": O.value ? P : void 0,
226
- class: _(O.value && "bg-surface-sunken text-heading"),
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: ze,
230
- onKeydown: He
209
+ onClick: Z,
210
+ onKeydown: Le
231
211
  }, null, 8, [
232
212
  "label",
233
213
  "icon",
@@ -241,7 +221,7 @@ var pe = {
241
221
  "leave-active-class": "transition duration-100 ease-in",
242
222
  "leave-to-class": "opacity-0"
243
223
  }, {
244
- default: E(() => [O.value ? (v(), c("div", {
224
+ default: D(() => [k.value ? (v(), c("div", {
245
225
  key: 0,
246
226
  id: P,
247
227
  ref_key: "panel",
@@ -249,88 +229,73 @@ var pe = {
249
229
  role: "dialog",
250
230
  tabindex: "-1",
251
231
  "aria-labelledby": F,
252
- class: _(["fixed z-[90] flex w-[calc(380px*var(--ac-scale))] max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-14 border border-border bg-surface shadow-lg outline-none", z.value ? "origin-top-right" : "origin-bottom-right"]),
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: Ue
236
+ onKeydown: Re
257
237
  }, [
258
- l("div", me, [
259
- l("h2", {
260
- id: F,
261
- class: "font-heading text-lg font-semibold tracking-tight text-heading"
262
- }, C(f.label), 1),
263
- H.value ? (v(), c("span", he, [u(C(H.value > 999 ? "999+" : H.value), 1), p[1] ||= l("span", { class: "sr-only" }, "\xA0unread", -1)])) : s("", !0),
264
- Pe.value || H.value ? (v(), c("button", {
265
- key: 1,
266
- type: "button",
267
- class: "ml-auto inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-8 px-2.5 text-xs font-medium 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",
268
- "data-ac-ds": "",
269
- "data-testid": "ac-notification-menu-mark-all",
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: 2,
252
+ lines: 3,
288
253
  height: "10px",
289
- label: "",
290
- class: "flex-1"
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 flex w-full cursor-pointer gap-3 px-4 py-3 text-left no-underline outline-none transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", e.read ? "hover:bg-surface-sunken/50 focus-visible:bg-surface-sunken/50" : "bg-primary/8 hover:bg-primary/12 focus-visible:bg-primary/12"],
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) => Be(e)
260
+ onClick: (t) => Fe(e)
297
261
  }), {
298
- default: E(() => [x(a.$slots, "item", { item: e }, () => [
299
- l("span", {
300
- class: _(["mt-0.5 inline-flex size-7 shrink-0 items-center justify-center rounded-8", A[U(e)].tile]),
301
- "aria-hidden": "true"
302
- }, [(v(), o(S(e.icon ?? A[U(e)].icon), { class: "size-4" }))], 2),
303
- l("span", xe, [
304
- l("span", { class: _(["line-clamp-2 text-base text-heading", !e.read && "font-medium"]) }, C(e.title || e.msg), 3),
305
- e.title && e.msg ? (v(), c("span", Se, C(e.msg), 1)) : s("", !0),
306
- l("span", Ce, [
307
- e.status ? (v(), c("span", {
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.read ? s("", !0) : (v(), c("span", Ee)),
319
- e.read ? s("", !0) : (v(), c("span", De, "(unread)"))
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", _e, [x(a.$slots, "empty", {}, () => [
323
- l("span", ve, [d(w(oe), { class: "size-6" })]),
324
- l("p", ye, C(f.emptyText), 1),
325
- p[3] ||= l("p", { class: "max-w-64 text-base text-muted" }, "Backups, upgrades and alerts from your clusters show up here.", -1)
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 || Fe.value ? (v(), c("div", Oe, [x(a.$slots, "footer", { close: Z }, () => [(v(), o(S(G(f.viewAllTo, f.viewAllHref)), h(K(f.viewAllTo, f.viewAllHref), {
328
- 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-accent-hover focus-visible:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
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: Ve
296
+ onClick: Ie
332
297
  }), {
333
- default: E(() => [u(C(f.viewAllLabel) + " ", 1), d(w(ie), {
298
+ default: D(() => [u(C(f.viewAllLabel) + " ", 1), d(w(re), {
334
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
  })]),
@@ -342,4 +307,4 @@ var pe = {
342
307
  }
343
308
  });
344
309
  //#endregion
345
- export { D as default };
310
+ export { O as default };
@@ -13,7 +13,7 @@ export interface Props {
13
13
  precision?: number;
14
14
  /** Unit shown after the value, e.g. `GiB`, `vCPU` or `%`. Also read out with the value. */
15
15
  unit?: string;
16
- /** Shows the − and + buttons inside the field. Cloud `is-show-inc-dec`. */
16
+ /** Shows bordered − and + buttons on either side of the field. Off by default, like cloud-ui. Cloud `is-show-inc-dec`. */
17
17
  stepButtons?: boolean;
18
18
  /** Milliseconds a − / + press is held before it starts repeating. */
19
19
  holdDelay?: number;
@@ -29,7 +29,7 @@ export interface Props {
29
29
  errorMsg?: string;
30
30
  /** Help text between the label and the field. */
31
31
  hint?: string;
32
- /** `small` 36px or `normal` 40px tall. */
32
+ /** `small` 36px or `normal` 42px tall, the same as `AcInput`; the step buttons match. */
33
33
  size?: "small" | "normal";
34
34
  }
35
35
  type __VLS_Props = Props;