@ac-design/design-system 2.0.0 → 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.
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 +17 -2
  82. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +79 -25
  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,18 +1,28 @@
1
- import { Teleport as e, Transition as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, mergeModels as c, nextTick as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, unref as g, useId as _, useModel as v, watch as y, withCtx as b, withModifiers as x } from "vue";
2
- import { X as S } from "@lucide/vue";
1
+ import { Fragment as e, Teleport as t, Transition as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, mergeModels as l, nextTick as u, normalizeClass as d, onBeforeUnmount as f, openBlock as p, ref as m, renderSlot as h, toDisplayString as g, unref as _, useId as v, useModel as y, watch as b, withCtx as x, withModifiers as S } from "vue";
2
+ import { X as C } from "@lucide/vue";
3
3
  //#region src/lib/components/AcModal.vue?vue&type=script&setup=true&lang.ts
4
- var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 items-start gap-4 border-b border-border px-6 py-4" }, T = { class: "min-w-0 flex-1" }, E = ["id"], D = ["id"], O = { class: "-my-1 -mr-2 flex shrink-0 items-center gap-1" }, k = {
4
+ var w = ["aria-labelledby", "aria-describedby"], T = {
5
+ key: 0,
6
+ class: "mb-4 shrink-0"
7
+ }, E = ["id"], D = ["id"], O = {
8
+ "data-modal-body": "",
9
+ class: "ac-scrollbar -m-1 min-h-0 flex-1 p-1"
10
+ }, k = {
11
+ key: 1,
12
+ class: "mt-6 flex shrink-0 flex-wrap items-center justify-between gap-3"
13
+ }, A = { class: "flex min-w-0 items-center gap-2" }, j = { class: "ml-auto flex items-center gap-3" }, M = { class: "flex shrink-0 items-start gap-4 border-b border-border p-6" }, N = { class: "min-w-0 flex-1" }, P = ["id"], F = ["id"], I = { class: "flex h-7 shrink-0 items-center gap-3" }, L = {
5
14
  "data-modal-body": "",
6
15
  class: "ac-scrollbar min-h-0 flex-1 p-6"
7
- }, A = {
16
+ }, R = {
8
17
  key: 0,
9
- class: "flex shrink-0 flex-wrap items-center justify-between gap-3 rounded-b-16 border-t border-border px-6 py-4"
10
- }, j = { class: "flex min-w-0 items-center gap-2" }, M = { class: "ml-auto flex items-center gap-3" }, N = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", P = /*@__PURE__*/ s({
18
+ class: "flex shrink-0 flex-wrap items-center justify-between gap-3 rounded-b-16 border-t border-border p-6"
19
+ }, z = { class: "flex min-w-0 items-center gap-2" }, B = { class: "ml-auto flex items-center gap-3" }, V = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", H = /*@__PURE__*/ c({
11
20
  __name: "AcModal",
12
- props: /*@__PURE__*/ c({
21
+ props: /*@__PURE__*/ l({
13
22
  title: { default: "" },
14
23
  description: { default: "" },
15
24
  size: { default: "normal" },
25
+ variant: { default: "framed" },
16
26
  closable: {
17
27
  type: Boolean,
18
28
  default: !0
@@ -32,94 +42,108 @@ var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 ite
32
42
  },
33
43
  openModifiers: {}
34
44
  }),
35
- emits: /*@__PURE__*/ c(["close"], ["update:open"]),
36
- setup(s, { emit: c }) {
37
- let P = s, F = c, I = v(s, "open"), L = _(), R = p(null), z = null, B = N.split(", ").map((e) => `[data-modal-body] ${e}`).join(", "), V = () => {
38
- P.closable && (I.value = !1, F("close"));
39
- }, H = (e) => {
45
+ emits: /*@__PURE__*/ l(["close"], ["update:open"]),
46
+ setup(c, { emit: l }) {
47
+ let H = c, U = y(c, "open"), W = l, G = V.split(", ").map((e) => `[data-modal-body] ${e}`).join(", "), K = {
48
+ xsmall: "max-w-sm",
49
+ small: "max-w-md",
50
+ normal: "max-w-xl",
51
+ medium: "max-w-200",
52
+ large: "max-w-250",
53
+ xlarge: "max-w-6xl",
54
+ full: "max-w-[calc(100vw-64px)]"
55
+ }, q = v(), J = m(null), Y = null;
56
+ function X() {
57
+ H.closable && (U.value = !1, W("close"));
58
+ }
59
+ function Z(e) {
40
60
  if (e.key === "Escape") {
41
61
  if (e.defaultPrevented) return;
42
- e.stopPropagation(), V();
43
- } else if (e.key === "Tab" && R.value) {
44
- let t = [...R.value.querySelectorAll(N)].filter((e) => e.offsetParent !== null);
62
+ e.stopPropagation(), X();
63
+ } else if (e.key === "Tab" && J.value) {
64
+ let t = [...J.value.querySelectorAll(V)].filter((e) => e.offsetParent !== null);
45
65
  if (!t.length) return;
46
66
  let n = t[0], r = t[t.length - 1];
47
67
  e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
48
68
  }
49
- }, U = (e) => {
69
+ }
70
+ function Q(e) {
50
71
  let t = document.body, n = Number(t.dataset.acModals ?? 0) + (e ? 1 : -1);
51
72
  if (t.dataset.acModals = String(Math.max(n, 0)), e && n === 1) {
52
73
  let e = window.innerWidth - document.documentElement.clientWidth;
53
74
  t.style.overflow = "hidden", e > 0 && (t.style.paddingRight = `${e}px`);
54
75
  } else !e && n <= 0 && (t.style.overflow = "", t.style.paddingRight = "");
55
- };
56
- y(I, async (e, t) => {
76
+ }
77
+ return b(U, async (e, t) => {
57
78
  if (e) {
58
- z = document.activeElement, U(!0), await l();
59
- let e = R.value?.querySelector("[autofocus]");
60
- ((e && (e.matches(N) ? e : e.querySelector(N))) ?? R.value?.querySelector(B) ?? R.value)?.focus();
61
- } else t && (U(!1), z?.focus?.());
62
- }, { immediate: !0 }), d(() => {
63
- I.value && U(!1);
64
- });
65
- let W = {
66
- small: "max-w-110",
67
- normal: "max-w-130",
68
- medium: "max-w-200",
69
- large: "max-w-250",
70
- full: "max-w-[calc(100vw-64px)]"
71
- };
72
- return (c, l) => (f(), n(e, { to: "body" }, [o(t, {
73
- "enter-active-class": "transition duration-200 ease-out",
79
+ Y = document.activeElement, Q(!0), await u();
80
+ let e = J.value?.querySelector("[autofocus]");
81
+ ((e && (e.matches(V) ? e : e.querySelector(V))) ?? J.value?.querySelector(G) ?? J.value)?.focus();
82
+ } else t && (Q(!1), Y?.focus?.());
83
+ }, { immediate: !0 }), f(() => {
84
+ U.value && Q(!1);
85
+ }), (l, u) => (p(), r(t, { to: "body" }, [s(n, {
86
+ "enter-active-class": "transition-opacity duration-200 ease-out",
74
87
  "enter-from-class": "opacity-0",
75
- "leave-active-class": "transition duration-150 ease-in",
88
+ "leave-active-class": "transition-opacity duration-150 ease-in",
76
89
  "leave-to-class": "opacity-0"
77
90
  }, {
78
- default: b(() => [I.value ? (f(), i("div", {
91
+ default: x(() => [U.value ? (p(), a("div", {
79
92
  key: 0,
80
- class: "fixed inset-0 z-[80] overflow-y-auto bg-overlay backdrop-blur-[2px]",
93
+ class: d(["fixed inset-0 z-[80] overflow-y-auto", c.variant === "plain" ? "bg-black/50" : "bg-black/80"]),
81
94
  "data-ac-ds": "",
82
95
  "data-testid": "ac-modal",
83
- onKeydown: H,
84
- onMousedown: l[1] ||= x((e) => s.closeOnOutsideClick && V(), ["self"])
85
- }, [a("div", {
96
+ onKeydown: Z,
97
+ onMousedown: u[1] ||= S((e) => c.closeOnOutsideClick && X(), ["self"])
98
+ }, [o("div", {
86
99
  class: "flex min-h-full items-start justify-center p-4 sm:items-center sm:p-8",
87
- onMousedown: l[0] ||= x((e) => s.closeOnOutsideClick && V(), ["self"])
88
- }, [a("div", {
100
+ onMousedown: u[0] ||= S((e) => c.closeOnOutsideClick && X(), ["self"])
101
+ }, [o("div", {
89
102
  ref_key: "panel",
90
- ref: R,
103
+ ref: J,
91
104
  role: "dialog",
92
105
  "aria-modal": "true",
93
- "aria-labelledby": s.title ? `${g(L)}-title` : void 0,
94
- "aria-describedby": s.description ? `${g(L)}-desc` : void 0,
106
+ "aria-labelledby": c.title ? `${_(q)}-title` : void 0,
107
+ "aria-describedby": c.description ? `${_(q)}-desc` : void 0,
95
108
  tabindex: "-1",
96
- class: u(["relative flex max-h-[calc(100dvh-32px)] w-full animate-pop-in flex-col rounded-16 border border-border bg-surface shadow-xl outline-none sm:max-h-[calc(100dvh-64px)]", W[s.size]])
97
- }, [
98
- a("header", w, [a("div", T, [m(c.$slots, "header", {}, () => [a("h2", {
99
- id: `${g(L)}-title`,
100
- class: "text-xl leading-7 font-semibold tracking-tight text-heading"
101
- }, h(s.title), 9, E), s.description ? (f(), i("p", {
109
+ class: d(["relative flex max-h-[calc(100dvh-32px)] w-full flex-col rounded-16 border border-border bg-surface shadow-xl outline-none sm:max-h-[calc(100dvh-64px)]", [K[c.size], c.variant === "plain" && "p-6"]])
110
+ }, [c.variant === "plain" ? (p(), a(e, { key: 0 }, [
111
+ c.title || c.description || l.$slots.header ? (p(), a("header", T, [h(l.$slots, "header", {}, () => [o("h2", {
112
+ id: `${_(q)}-title`,
113
+ class: "text-xl leading-7 font-semibold text-heading"
114
+ }, g(c.title), 9, E), c.description ? (p(), a("p", {
115
+ key: 0,
116
+ id: `${_(q)}-desc`,
117
+ class: "mt-1 text-base text-muted"
118
+ }, g(c.description), 9, D)) : i("", !0)])])) : i("", !0),
119
+ o("div", O, [h(l.$slots, "default")]),
120
+ !c.hideFooter && (l.$slots.footer || l.$slots["footer-left"]) ? (p(), a("footer", k, [o("div", A, [h(l.$slots, "footer-left")]), o("div", j, [h(l.$slots, "footer")])])) : i("", !0)
121
+ ], 64)) : (p(), a(e, { key: 1 }, [
122
+ o("header", M, [o("div", N, [h(l.$slots, "header", {}, () => [o("h2", {
123
+ id: `${_(q)}-title`,
124
+ class: "text-xl leading-7 font-semibold text-heading"
125
+ }, g(c.title), 9, P), c.description ? (p(), a("p", {
102
126
  key: 0,
103
- id: `${g(L)}-desc`,
127
+ id: `${_(q)}-desc`,
104
128
  class: "mt-1 text-base text-muted"
105
- }, h(s.description), 9, D)) : r("", !0)])]), a("div", O, [m(c.$slots, "header-actions"), s.closable ? (f(), i("button", {
129
+ }, g(c.description), 9, F)) : i("", !0)])]), o("div", I, [h(l.$slots, "header-actions"), c.closable ? (p(), a("button", {
106
130
  key: 0,
107
131
  type: "button",
108
- class: "inline-flex size-9 cursor-pointer items-center justify-center rounded-10 text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
132
+ class: "-m-0.5 inline-flex cursor-pointer items-center justify-center rounded-6 p-0.5 text-muted transition-colors hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
109
133
  "aria-label": "Close",
110
134
  "data-ac-ds": "",
111
135
  "data-testid": "ac-modal-close",
112
- onClick: V
113
- }, [o(g(S), {
136
+ onClick: X
137
+ }, [s(_(C), {
114
138
  class: "size-5",
115
139
  "aria-hidden": "true"
116
- })])) : r("", !0)])]),
117
- a("div", k, [m(c.$slots, "default")]),
118
- !s.hideFooter && (c.$slots.footer || c.$slots["footer-left"]) ? (f(), i("footer", A, [a("div", j, [m(c.$slots, "footer-left")]), a("div", M, [m(c.$slots, "footer")])])) : r("", !0)
119
- ], 10, C)], 32)], 32)) : r("", !0)]),
140
+ })])) : i("", !0)])]),
141
+ o("div", L, [h(l.$slots, "default")]),
142
+ !c.hideFooter && (l.$slots.footer || l.$slots["footer-left"]) ? (p(), a("footer", R, [o("div", z, [h(l.$slots, "footer-left")]), o("div", B, [h(l.$slots, "footer")])])) : i("", !0)
143
+ ], 64))], 10, w)], 32)], 34)) : i("", !0)]),
120
144
  _: 3
121
145
  })]));
122
146
  }
123
147
  });
124
148
  //#endregion
125
- export { P as default };
149
+ export { H as default };
@@ -1,6 +1,6 @@
1
1
  export interface Props {
2
- /** When the menu button shows: `mobile` below 768px, `always`, or `never`. It emits `menu`; wire it to the sidebar's `v-model:mobile-open` or its `toggle()`. */
3
- menuButton?: "mobile" | "always" | "never";
2
+ /** When the menu button shows: `mobile` below 768px, `tablet` below 1024px (cloud-ui's sidebar breakpoint), `always`, or `never`. It emits `menu`; wire it to the sidebar's `v-model:mobile-open` or its `toggle()`. */
3
+ menuButton?: "mobile" | "tablet" | "always" | "never";
4
4
  /** Accessible name of the menu button. */
5
5
  menuLabel?: string;
6
6
  /** Short product tag after the logo, e.g. `"Console"` or `"DB"`. */
@@ -9,13 +9,15 @@ export interface Props {
9
9
  sticky?: boolean;
10
10
  /** Accessible name of the navigation that holds the default slot. */
11
11
  label?: string;
12
+ /** Where the `search` slot sits: `start` after the menu button and links, 240px wide from 768px, 320px from 1024px and 384px from 1280px (cloud-ui's navbar); `center` in the middle, up to 448px. */
13
+ searchPosition?: "start" | "center";
12
14
  }
13
15
  type __VLS_Slots = {
14
16
  /** The logo, usually a link home. */
15
17
  brand?: () => unknown;
16
18
  /** Top-level links (`AcNavbarItem`). Hidden below 768px; put them in the sidebar for phones. */
17
19
  default?: () => unknown;
18
- /** A search field, centred. Hidden below 640px. */
20
+ /** A search field, placed by `search-position`. Hidden below 640px. */
19
21
  search?: () => unknown;
20
22
  /** Right side: icon actions, notifications, theme and `AcUserMenu` last. */
21
23
  actions?: () => unknown;
@@ -26,10 +28,11 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
26
28
  onMenu?: (() => any) | undefined;
27
29
  }>, {
28
30
  label: string;
29
- menuLabel: string;
30
31
  sticky: boolean;
31
- menuButton: "mobile" | "always" | "never";
32
+ menuLabel: string;
33
+ menuButton: "mobile" | "tablet" | "always" | "never";
32
34
  productName: string;
35
+ searchPosition: "start" | "center";
33
36
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
37
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
35
38
  declare const _default: typeof __VLS_export;
@@ -7,13 +7,16 @@ var d = ["aria-label"], f = {
7
7
  }, p = {
8
8
  key: 0,
9
9
  class: "inline-flex items-center rounded-6 border border-primary/25 bg-primary/10 px-1.5 py-0.5 text-sm font-semibold tracking-wide text-primary-strong uppercase"
10
- }, m = ["aria-label"], h = { class: "flex min-w-0 flex-1 justify-center" }, g = {
10
+ }, m = ["aria-label"], h = {
11
+ key: 3,
12
+ class: "hidden min-w-0 shrink sm:block sm:w-48 md:w-60 lg:w-80 xl:w-96"
13
+ }, g = { class: "flex min-w-0 flex-1 justify-center" }, _ = {
11
14
  key: 0,
12
15
  class: "hidden w-full max-w-md sm:block"
13
- }, _ = {
14
- key: 3,
15
- class: "flex shrink-0 items-center gap-0.5 sm:gap-2"
16
- }, v = /*@__PURE__*/ i({
16
+ }, v = {
17
+ key: 4,
18
+ class: "flex shrink-0 items-center gap-0.5 sm:gap-3"
19
+ }, y = /*@__PURE__*/ i({
17
20
  __name: "AcNavbar",
18
21
  props: {
19
22
  menuButton: { default: "mobile" },
@@ -23,12 +26,13 @@ var d = ["aria-label"], f = {
23
26
  type: Boolean,
24
27
  default: !0
25
28
  },
26
- label: { default: "Primary" }
29
+ label: { default: "Primary" },
30
+ searchPosition: { default: "start" }
27
31
  },
28
32
  emits: ["menu"],
29
- setup(i, { emit: v }) {
30
- let y = v;
31
- return (v, b) => (o(), t("header", {
33
+ setup(i, { emit: y }) {
34
+ let b = y;
35
+ return (y, x) => (o(), t("header", {
32
36
  class: a(["top-0 z-30 flex h-18 shrink-0 items-center gap-2 border-b border-border/80 bg-surface/90 px-4 backdrop-blur-sm sm:gap-4 sm:px-6", i.sticky && "sticky"]),
33
37
  "data-ac-ds": "",
34
38
  "data-testid": "ac-navbar"
@@ -36,25 +40,29 @@ var d = ["aria-label"], f = {
36
40
  i.menuButton === "never" ? e("", !0) : (o(), t("button", {
37
41
  key: 0,
38
42
  type: "button",
39
- class: a(["-ml-1.5 inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-10 text-heading transition-colors duration-200 hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none", i.menuButton === "mobile" && "md:hidden"]),
43
+ class: a(["inline-flex size-9.5 shrink-0 cursor-pointer items-center justify-center rounded-10 border border-transparent text-muted transition-colors duration-200 hover:border-border hover:bg-surface-sunken/50 hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none", {
44
+ "md:hidden": i.menuButton === "mobile",
45
+ "lg:hidden": i.menuButton === "tablet"
46
+ }]),
40
47
  "aria-label": i.menuLabel,
41
48
  "data-ac-ds": "",
42
49
  "data-testid": "ac-navbar-menu",
43
- onClick: b[0] ||= (e) => y("menu")
50
+ onClick: x[0] ||= (e) => b("menu")
44
51
  }, [r(l(u), {
45
52
  class: "size-5",
46
53
  "aria-hidden": "true"
47
54
  })], 10, d)),
48
- v.$slots.brand || i.productName ? (o(), t("div", f, [s(v.$slots, "brand"), i.productName ? (o(), t("span", p, c(i.productName), 1)) : e("", !0)])) : e("", !0),
49
- v.$slots.default ? (o(), t("nav", {
55
+ y.$slots.brand || i.productName ? (o(), t("div", f, [s(y.$slots, "brand"), i.productName ? (o(), t("span", p, c(i.productName), 1)) : e("", !0)])) : e("", !0),
56
+ y.$slots.default ? (o(), t("nav", {
50
57
  key: 2,
51
58
  "aria-label": i.label,
52
59
  class: "hidden items-center gap-1 md:flex"
53
- }, [s(v.$slots, "default")], 8, m)) : e("", !0),
54
- n("div", h, [v.$slots.search ? (o(), t("div", g, [s(v.$slots, "search")])) : e("", !0)]),
55
- v.$slots.actions ? (o(), t("div", _, [s(v.$slots, "actions")])) : e("", !0)
60
+ }, [s(y.$slots, "default")], 8, m)) : e("", !0),
61
+ y.$slots.search && i.searchPosition === "start" ? (o(), t("div", h, [s(y.$slots, "search")])) : e("", !0),
62
+ n("div", g, [y.$slots.search && i.searchPosition === "center" ? (o(), t("div", _, [s(y.$slots, "search")])) : e("", !0)]),
63
+ y.$slots.actions ? (o(), t("div", v, [s(y.$slots, "actions")])) : e("", !0)
56
64
  ], 2));
57
65
  }
58
66
  });
59
67
  //#endregion
60
- export { v as default };
68
+ export { y as default };
@@ -1,10 +1,10 @@
1
1
  import type { Component } from "vue";
2
2
  export interface Props {
3
- /** Text of the item. With `iconOnly` it becomes the tooltip and the accessible name. */
3
+ /** Text of the item. With `iconOnly` it becomes the accessible name. */
4
4
  label: string;
5
5
  /** A Lucide icon component, e.g. `:icon="Terminal"`. */
6
6
  icon?: Component;
7
- /** Shows only the icon (20px) in a 36px square button, for navbar actions such as Terminal or Notifications. */
7
+ /** Shows only the icon (20px) in a 38px button with 10px corners, like cloud-ui's navbar actions: Help, Notifications, Terminal. */
8
8
  iconOnly?: boolean;
9
9
  /** Route to link to. Renders `RouterLink` when vue-router is installed in the app, otherwise a plain link (string routes only). */
10
10
  to?: string | object;
@@ -2,7 +2,7 @@ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r
2
2
  //#region src/lib/components/AcNavbarItem.vue?vue&type=script&setup=true&lang.ts
3
3
  var h = { key: 1 }, g = {
4
4
  key: 0,
5
- class: "absolute -top-1 left-5 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-danger px-1 text-xs leading-none font-medium text-white tabular-nums",
5
+ class: "absolute -top-1 -right-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-danger px-1 text-xs leading-none font-medium text-white tabular-nums",
6
6
  "aria-hidden": "true"
7
7
  }, _ = {
8
8
  key: 1,
@@ -42,8 +42,7 @@ var h = { key: 1 }, g = {
42
42
  b("click", e);
43
43
  }
44
44
  return (t, s) => (u(), n(f(S.value), c(w.value, {
45
- class: ["relative inline-flex h-9 shrink-0 items-center justify-center gap-2 rounded-10 text-base font-medium whitespace-nowrap no-underline transition-colors duration-200 select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none aria-[current=page]:bg-primary/10 aria-[current=page]:text-primary-strong", [o.iconOnly ? "w-9 text-muted" : "px-3 text-heading/80", o.disabled ? "pointer-events-none cursor-not-allowed opacity-50" : "cursor-pointer hover:bg-surface-sunken hover:text-heading"]],
46
- title: o.iconOnly ? o.label : void 0,
45
+ class: ["relative inline-flex shrink-0 items-center justify-center gap-2 rounded-10 text-base font-medium whitespace-nowrap no-underline transition-colors duration-200 select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none aria-[current=page]:bg-primary/10 aria-[current=page]:text-primary-strong", [o.iconOnly ? ["size-9.5 border border-transparent text-muted", !o.disabled && "hover:border-border hover:bg-surface-sunken/50"] : ["h-9 px-3 text-heading/80", !o.disabled && "hover:bg-surface-sunken"], o.disabled ? "pointer-events-none cursor-not-allowed opacity-50" : "cursor-pointer hover:text-heading"]],
47
46
  "data-ac-ds": "",
48
47
  "data-testid": "ac-navbar-item",
49
48
  onClick: T
@@ -58,7 +57,7 @@ var h = { key: 1 }, g = {
58
57
  C.value ? (u(), i(e, { key: 2 }, [o.iconOnly ? (u(), i("span", g, p(C.value), 1)) : (u(), i("span", _, p(C.value), 1))], 64)) : r("", !0)
59
58
  ]),
60
59
  _: 3
61
- }, 16, ["class", "title"]));
60
+ }, 16, ["class"]));
62
61
  }
63
62
  });
64
63
  //#endregion
@@ -8,17 +8,17 @@ export interface NotificationItem {
8
8
  title?: string;
9
9
  /** The message. Old `msg`. */
10
10
  msg?: string;
11
- /** Event status, e.g. `Success`, `Failed`, `Running`, `Pending`. Shown next to the time and picks the icon. */
11
+ /** Event status, e.g. `Success`, `Failed`, `Running`, `Pending`. Shown before the time, in its colour. */
12
12
  status?: string;
13
13
  /** Overrides the tone that `status` picks. */
14
14
  type?: "success" | "danger" | "warning" | "info" | "neutral";
15
- /** Read items lose the unread dot and the bold title. */
15
+ /** Read items lose the unread dot and the primary tint. */
16
16
  read?: boolean;
17
17
  /** Plain URL to open. */
18
18
  href?: string;
19
19
  /** Route to open; rendered as `RouterLink` when vue-router is installed. */
20
20
  to?: string | object;
21
- /** A Lucide icon to replace the status icon. */
21
+ /** A 16px Lucide icon shown before the title. */
22
22
  icon?: Component;
23
23
  }
24
24
  export interface Props {