@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,38 +1,39 @@
1
1
  import e from "./AcButton.js";
2
2
  import t from "./AcInput.js";
3
3
  import n from "./AcSelect.js";
4
- import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, nextTick as p, normalizeClass as m, openBlock as h, ref as g, renderList as ee, renderSlot as _, toDisplayString as v, unref as y, useId as b, useModel as x, watch as te, withCtx as ne, withKeys as S } from "vue";
5
- import { CircleAlert as re, Plus as C, Trash2 as ie } from "@lucide/vue";
4
+ import { Fragment as r, TransitionGroup as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, mergeModels as f, nextTick as p, normalizeClass as m, openBlock as h, ref as g, renderList as ee, renderSlot as _, toDisplayString as v, unref as y, useId as b, useModel as te, watch as ne, withCtx as x, withKeys as S } from "vue";
5
+ import { Plus as C, Trash as w } from "@lucide/vue";
6
6
  //#region src/lib/components/AcKeyValueInput.vue?vue&type=script&setup=true&lang.ts
7
- var ae = [
7
+ var T = [
8
8
  "aria-labelledby",
9
9
  "aria-label",
10
10
  "aria-describedby"
11
- ], oe = {
11
+ ], re = {
12
12
  key: 0,
13
13
  class: "font-normal text-muted"
14
- }, se = {
14
+ }, ie = {
15
15
  key: 1,
16
16
  class: "text-danger",
17
17
  "aria-hidden": "true"
18
- }, ce = {
19
- class: "mb-1.5 hidden grid-cols-[minmax(0,1fr)_auto] gap-x-3 sm:grid",
18
+ }, ae = {
19
+ key: 2,
20
+ class: "mb-1.5 hidden grid-cols-[minmax(0,1fr)_auto] gap-x-4 sm:grid",
20
21
  "aria-hidden": "true"
21
- }, le = { key: 0 }, ue = { class: "space-y-3" }, w = [
22
+ }, oe = { key: 0 }, se = [
22
23
  "data-row",
23
24
  "onFocusin",
24
25
  "onFocusout"
25
- ], T = [
26
+ ], ce = [
26
27
  "aria-label",
27
28
  "title",
28
29
  "onClick"
29
30
  ], E = {
30
- key: 3,
31
+ key: 4,
31
32
  class: "text-base text-muted"
32
- }, de = {
33
+ }, D = {
33
34
  class: "sr-only",
34
35
  "aria-live": "polite"
35
- }, D = /*@__PURE__*/ d({
36
+ }, O = /*@__PURE__*/ d({
36
37
  __name: "AcKeyValueInput",
37
38
  props: /*@__PURE__*/ f({
38
39
  label: { default: "" },
@@ -82,239 +83,254 @@ var ae = [
82
83
  modelModifiers: {}
83
84
  }),
84
85
  emits: /*@__PURE__*/ f(["add", "remove"], ["update:modelValue"]),
85
- setup(d, { expose: f, emit: D }) {
86
- let O = d, k = x(d, "modelValue"), A = D, j = b(), M = `${j}-label`, N = `${j}-hint`, P = `${j}-msg`, F = g(null), I = 0, L = g([]), R = g(null), z = g(""), B = i(() => k.value ?? []), V = i(() => !!O.options?.length), H = i(() => !O.disabled && !O.readonly), U = i(() => O.max !== void 0 && B.value.length >= O.max), fe = i(() => O.addLabel || `Add ${O.itemName}`), pe = i(() => [O.hint && N, O.errorMsg && P].filter(Boolean).join(" ") || void 0), W = i(() => V.value ? "sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_220px]" : "sm:grid-cols-2"), me = i(() => O.size === "small" ? "size-9" : "size-10"), G = i(() => {
86
+ setup(d, { expose: f, emit: O }) {
87
+ let k = d, A = te(d, "modelValue"), j = O, M = b(), N = `${M}-label`, P = `${M}-hint`, F = `${M}-msg`, I = g(null), L = 0, R = g([]), z = g(null), B = g(""), V = a(() => A.value ?? []), H = a(() => !!k.options?.length), U = a(() => !k.disabled && !k.readonly), W = a(() => k.max !== void 0 && V.value.length >= k.max), le = a(() => k.addLabel || "Add new"), ue = a(() => [k.hint && P, k.errorMsg && F].filter(Boolean).join(" ") || void 0), G = a(() => H.value ? "sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_256px]" : "sm:grid-cols-2"), de = a(() => k.size === "small" ? "size-[34px]" : "size-[38px]"), K = a(() => {
87
88
  let e = /* @__PURE__ */ new Set();
88
- return B.value.map((t, n) => {
89
+ return V.value.map((t, n) => {
89
90
  let r = {}, i = t.key.trim();
90
91
  if (i) {
91
- let a = V.value ? `${i}\u0000${t.option ?? ""}` : i;
92
- !O.allowDuplicateKeys && e.has(a) && (r.key = V.value && t.option ? `“${i}” with ${q(t.option)} is already used.` : `“${i}” is already used. Keys must be unique.`), e.add(a), r.key ||= O.validateKey?.(t.key, n, B.value) || void 0;
93
- } else t.value && R.value !== L.value[n] && (r.key = `Enter a key, or remove this ${O.itemName}.`);
94
- return (i || t.value) && (r.value = O.validateValue?.(t.value, t.key, n, B.value) || void 0), r;
92
+ let a = H.value ? `${i}\u0000${t.option ?? ""}` : i;
93
+ !k.allowDuplicateKeys && e.has(a) && (r.key = H.value && t.option ? `“${i}” with ${q(t.option)} is already used.` : `“${i}” is already used. Keys must be unique.`), e.add(a), r.key ||= k.validateKey?.(t.key, n, V.value) || void 0;
94
+ } else t.value && z.value !== R.value[n] && (r.key = `Enter a key, or remove this ${k.itemName}.`);
95
+ return (i || t.value) && (r.value = k.validateValue?.(t.value, t.key, n, V.value) || void 0), r;
95
96
  });
96
- }), K = i(() => G.value.some((e) => e.key || e.value));
97
+ }), fe = a(() => K.value.some((e) => e.key || e.value));
97
98
  function q(e) {
98
- return O.options?.find((t) => t.value === e)?.label ?? e;
99
+ return k.options?.find((t) => t.value === e)?.label ?? e;
99
100
  }
100
101
  function J(e) {
101
- let t = B.value[e]?.key.trim();
102
- return t ? `${O.itemName} ${t}` : `${O.itemName} ${e + 1}`;
102
+ let t = V.value[e]?.key.trim();
103
+ return t ? `${k.itemName} ${t}` : `${k.itemName} ${e + 1}`;
103
104
  }
104
105
  function Y(e) {
105
106
  return e.charAt(0).toUpperCase() + e.slice(1);
106
107
  }
107
108
  function X(e) {
108
- z.value = "", p(() => z.value = e);
109
+ B.value = "", p(() => B.value = e);
109
110
  }
110
111
  function Z(e, t) {
111
112
  p(() => {
112
- ((F.value?.querySelector(`[data-row="${e}"]`))?.querySelector(t === "remove" ? "[data-action='remove']" : `[data-cell="${t}"]`) ?? F.value?.querySelector("[data-action='add']"))?.focus();
113
+ ([...I.value?.querySelectorAll(`[data-row="${e}"]`) ?? []].at(-1)?.querySelector(t === "remove" ? "[data-action='remove']" : `[data-cell="${t}"]`) ?? I.value?.querySelector("[data-action='add']"))?.focus();
113
114
  });
114
115
  }
115
116
  function Q(e, t) {
116
- k.value = B.value.map((n, r) => r === e ? {
117
+ A.value = V.value.map((n, r) => r === e ? {
117
118
  ...n,
118
119
  ...t
119
120
  } : n);
120
121
  }
121
122
  function $() {
122
- if (!H.value || U.value) return;
123
+ if (!U.value || W.value) return;
123
124
  let e = {
124
125
  key: "",
125
126
  value: ""
126
127
  };
127
- V.value && (e.option = O.defaultOption ?? O.options[0].value), L.value = [...L.value, I++], k.value = [...B.value, e];
128
- let t = B.value.length;
129
- A("add", t), X(`${Y(O.itemName)} ${t + 1} added.`), Z(t, "key");
128
+ H.value && (e.option = k.defaultOption ?? k.options[0].value), R.value = [...R.value, L++], A.value = [...V.value, e];
129
+ let t = V.value.length;
130
+ j("add", t), X(`${Y(k.itemName)} ${t + 1} added.`), Z(t, "key");
130
131
  }
131
- function he(e) {
132
- if (!H.value) return;
133
- let t = B.value[e];
132
+ function pe(e) {
133
+ if (!U.value) return;
134
+ let t = V.value[e];
134
135
  if (!t) return;
135
136
  let n = J(e);
136
- L.value = L.value.filter((t, n) => n !== e), k.value = B.value.filter((t, n) => n !== e), A("remove", t, e), X(`${Y(n)} removed.`);
137
- let r = B.value.length;
138
- r ? Z(Math.min(e, r - 1), "remove") : p(() => F.value?.querySelector("[data-action='add']")?.focus());
137
+ R.value = R.value.filter((t, n) => n !== e), A.value = V.value.filter((t, n) => n !== e), j("remove", t, e), X(`${Y(n)} removed.`);
138
+ let r = V.value.length;
139
+ r ? Z(Math.min(e, r - 1), "remove") : p(() => I.value?.querySelector("[data-action='add']")?.focus());
139
140
  }
140
- function ge(e, t) {
141
+ function me(e, t) {
141
142
  e.isComposing || (e.preventDefault(), Z(t, "value"));
142
143
  }
143
- function _e(e, t) {
144
- e.isComposing || (e.preventDefault(), t < B.value.length - 1 ? Z(t + 1, "key") : U.value || $());
144
+ function he(e, t) {
145
+ e.isComposing || (e.preventDefault(), t < V.value.length - 1 ? Z(t + 1, "key") : W.value || $());
145
146
  }
146
- function ve(e, t) {
147
+ function ge(e, t) {
147
148
  let n = e.currentTarget, r = e.relatedTarget;
148
- r && (n.contains(r) || r instanceof Element && r.closest("[data-testid='ac-select-panel']")) || R.value === t && (R.value = null);
149
+ r && (n.contains(r) || r instanceof Element && r.closest("[data-testid='ac-select-panel']")) || z.value === t && (z.value = null);
149
150
  }
150
- return te(() => B.value.length, (e) => {
151
- L.value.length !== e && (L.value = Array.from({ length: e }, () => I++));
151
+ return ne(() => V.value.length, (e) => {
152
+ R.value.length !== e && (R.value = Array.from({ length: e }, () => L++));
152
153
  }, { immediate: !0 }), f({
153
154
  add: $,
154
155
  focus: () => Z(0, "key"),
155
- hasErrors: () => K.value
156
- }), (i, f) => (h(), s("div", {
156
+ hasErrors: () => fe.value
157
+ }), (a, f) => (h(), c("div", {
157
158
  ref_key: "root",
158
- ref: F,
159
+ ref: I,
159
160
  role: "group",
160
- "aria-labelledby": d.label ? M : void 0,
161
+ "aria-labelledby": d.label ? N : void 0,
161
162
  "aria-label": d.label ? void 0 : `${Y(d.itemName)}s`,
162
- "aria-describedby": pe.value,
163
+ "aria-describedby": ue.value,
163
164
  class: m(d.disabled && "opacity-50"),
164
165
  "data-ac-ds": "",
165
166
  "data-testid": "ac-key-value-input"
166
167
  }, [
167
- d.label ? (h(), s("div", {
168
+ d.label ? (h(), c("div", {
168
169
  key: 0,
169
- id: M,
170
+ id: N,
170
171
  class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
171
172
  }, [
172
- c("span", null, v(d.label), 1),
173
- d.readonly ? (h(), s("span", oe, "(read only)")) : o("", !0),
174
- d.required ? (h(), s("span", se, "*")) : o("", !0)
175
- ])) : o("", !0),
176
- d.hint ? (h(), s("p", {
173
+ l("span", null, v(d.label), 1),
174
+ d.readonly ? (h(), c("span", re, "(read only)")) : s("", !0),
175
+ d.required ? (h(), c("span", ie, "*")) : s("", !0)
176
+ ])) : s("", !0),
177
+ d.hint ? (h(), c("p", {
177
178
  key: 1,
178
- id: N,
179
+ id: P,
179
180
  class: "mb-2 text-base text-muted"
180
- }, v(d.hint), 1)) : o("", !0),
181
- B.value.length ? (h(), s(r, { key: 2 }, [c("div", ce, [c("div", { class: m(["grid gap-x-3 text-base font-medium text-muted", W.value]) }, [
182
- c("span", null, v(d.keyLabel), 1),
183
- c("span", null, v(d.valueLabel), 1),
184
- V.value ? (h(), s("span", le, v(d.optionLabel), 1)) : o("", !0)
185
- ], 2), H.value ? (h(), s("span", {
181
+ }, v(d.hint), 1)) : s("", !0),
182
+ V.value.length ? (h(), c("div", ae, [l("div", { class: m(["grid gap-x-4 text-base font-medium text-muted", G.value]) }, [
183
+ l("span", null, v(d.keyLabel), 1),
184
+ l("span", null, v(d.valueLabel), 1),
185
+ H.value ? (h(), c("span", oe, v(d.optionLabel), 1)) : s("", !0)
186
+ ], 2), U.value ? (h(), c("span", {
186
187
  key: 0,
187
- class: m(d.size === "small" ? "w-9" : "w-10")
188
- }, null, 2)) : o("", !0)]), c("div", ue, [(h(!0), s(r, null, ee(B.value, (e, r) => (h(), s("div", {
189
- key: L.value[r] ?? r,
190
- "data-row": r,
191
- class: "grid grid-cols-[minmax(0,1fr)_auto] items-start gap-x-2 max-sm:rounded-10 max-sm:border max-sm:border-border max-sm:bg-surface max-sm:p-3 sm:gap-x-3",
192
- onFocusin: (e) => R.value = L.value[r] ?? null,
193
- onFocusout: (e) => ve(e, L.value[r] ?? -1)
194
- }, [c("div", { class: m(["grid items-start gap-x-3 gap-y-3", W.value]) }, [
195
- u(t, {
196
- "data-cell": "key",
197
- "model-value": e.key,
198
- label: `${d.keyLabel} ${r + 1}`,
199
- placeholder: d.keyPlaceholder,
200
- size: d.size,
201
- disabled: d.disabled,
202
- readonly: d.readonly,
203
- "error-msg": G.value[r]?.key,
204
- autocomplete: "off",
205
- spellcheck: "false",
206
- class: m(["sm:[&>label:first-child]:sr-only", d.mono && "[&_input]:font-mono"]),
207
- "onUpdate:modelValue": (e) => Q(r, { key: String(e) }),
208
- onKeydown: S((e) => ge(e, r), ["enter"])
209
- }, null, 8, [
210
- "model-value",
211
- "label",
212
- "placeholder",
213
- "size",
214
- "disabled",
215
- "readonly",
216
- "error-msg",
217
- "class",
218
- "onUpdate:modelValue",
219
- "onKeydown"
220
- ]),
221
- u(t, {
222
- "data-cell": "value",
223
- "model-value": e.value,
224
- label: `${d.valueLabel} ${r + 1}`,
225
- placeholder: d.valuePlaceholder,
226
- size: d.size,
227
- disabled: d.disabled,
228
- readonly: d.readonly,
229
- "error-msg": G.value[r]?.value,
230
- autocomplete: "off",
231
- spellcheck: "false",
232
- class: "sm:[&>label:first-child]:sr-only",
233
- "onUpdate:modelValue": (e) => Q(r, { value: String(e) }),
234
- onKeydown: S((e) => _e(e, r), ["enter"])
235
- }, null, 8, [
236
- "model-value",
237
- "label",
238
- "placeholder",
239
- "size",
240
- "disabled",
241
- "readonly",
242
- "error-msg",
243
- "onUpdate:modelValue",
244
- "onKeydown"
245
- ]),
246
- V.value && d.readonly ? (h(), a(t, {
188
+ class: m(d.size === "small" ? "w-[34px]" : "w-[38px]")
189
+ }, null, 2)) : s("", !0)])) : s("", !0),
190
+ V.value.length || U.value ? (h(), o(i, {
191
+ key: 3,
192
+ tag: "div",
193
+ class: "relative space-y-4",
194
+ "enter-active-class": "transition-all duration-300 ease-out motion-reduce:transition-none",
195
+ "enter-from-class": "-translate-y-2.5 opacity-0",
196
+ "leave-active-class": "absolute w-full transition-all duration-300 ease-out motion-reduce:transition-none",
197
+ "leave-to-class": "translate-x-5 opacity-0",
198
+ "move-class": "transition-transform duration-300 ease-out motion-reduce:transition-none"
199
+ }, {
200
+ default: x(() => [(h(!0), c(r, null, ee(V.value, (e, r) => (h(), c("div", {
201
+ key: R.value[r] ?? r,
202
+ "data-row": r,
203
+ class: "grid grid-cols-[minmax(0,1fr)_auto] items-start gap-x-4 max-sm:rounded-10 max-sm:border max-sm:border-border max-sm:bg-surface max-sm:p-3",
204
+ onFocusin: (e) => z.value = R.value[r] ?? null,
205
+ onFocusout: (e) => ge(e, R.value[r] ?? -1)
206
+ }, [l("div", { class: m(["grid items-start gap-x-4 gap-y-3 [&_div:has(>input)]:rounded-8 [&_input]:rounded-8 [&_input]:font-medium", G.value]) }, [
207
+ u(t, {
208
+ "data-cell": "key",
209
+ "model-value": e.key,
210
+ label: `${d.keyLabel} ${r + 1}`,
211
+ placeholder: d.keyPlaceholder,
212
+ size: d.size,
213
+ disabled: d.disabled,
214
+ readonly: d.readonly,
215
+ "error-msg": K.value[r]?.key,
216
+ autocomplete: "off",
217
+ spellcheck: "false",
218
+ class: m(["sm:[&>label:first-child]:sr-only", d.mono && "[&_input]:font-mono"]),
219
+ "onUpdate:modelValue": (e) => Q(r, { key: String(e) }),
220
+ onKeydown: S((e) => me(e, r), ["enter"])
221
+ }, null, 8, [
222
+ "model-value",
223
+ "label",
224
+ "placeholder",
225
+ "size",
226
+ "disabled",
227
+ "readonly",
228
+ "error-msg",
229
+ "class",
230
+ "onUpdate:modelValue",
231
+ "onKeydown"
232
+ ]),
233
+ u(t, {
234
+ "data-cell": "value",
235
+ "model-value": e.value,
236
+ label: `${d.valueLabel} ${r + 1}`,
237
+ placeholder: d.valuePlaceholder,
238
+ size: d.size,
239
+ disabled: d.disabled,
240
+ readonly: d.readonly,
241
+ "error-msg": K.value[r]?.value,
242
+ autocomplete: "off",
243
+ spellcheck: "false",
244
+ class: "sm:[&>label:first-child]:sr-only",
245
+ "onUpdate:modelValue": (e) => Q(r, { value: String(e) }),
246
+ onKeydown: S((e) => he(e, r), ["enter"])
247
+ }, null, 8, [
248
+ "model-value",
249
+ "label",
250
+ "placeholder",
251
+ "size",
252
+ "disabled",
253
+ "readonly",
254
+ "error-msg",
255
+ "onUpdate:modelValue",
256
+ "onKeydown"
257
+ ]),
258
+ H.value && d.readonly ? (h(), o(t, {
259
+ key: 0,
260
+ "data-cell": "option",
261
+ "model-value": e.option ? q(e.option) : "",
262
+ label: `${d.optionLabel} ${r + 1}`,
263
+ size: d.size,
264
+ readonly: "",
265
+ class: "sm:[&>label:first-child]:sr-only"
266
+ }, null, 8, [
267
+ "model-value",
268
+ "label",
269
+ "size"
270
+ ])) : H.value ? (h(), o(n, {
271
+ key: 1,
272
+ "data-cell": "option",
273
+ "model-value": e.option ?? null,
274
+ options: d.options,
275
+ label: `${d.optionLabel} ${r + 1}`,
276
+ size: d.size,
277
+ disabled: d.disabled,
278
+ class: "sm:[&>div:first-child]:sr-only",
279
+ "onUpdate:modelValue": (e) => Q(r, { option: e ?? void 0 })
280
+ }, null, 8, [
281
+ "model-value",
282
+ "options",
283
+ "label",
284
+ "size",
285
+ "disabled",
286
+ "onUpdate:modelValue"
287
+ ])) : s("", !0)
288
+ ], 2), U.value ? (h(), c("button", {
247
289
  key: 0,
248
- "data-cell": "option",
249
- "model-value": e.option ? q(e.option) : "",
250
- label: `${d.optionLabel} ${r + 1}`,
251
- size: d.size,
252
- readonly: "",
253
- class: "sm:[&>label:first-child]:sr-only"
254
- }, null, 8, [
255
- "model-value",
256
- "label",
257
- "size"
258
- ])) : V.value ? (h(), a(n, {
259
- key: 1,
260
- "data-cell": "option",
261
- "model-value": e.option ?? null,
262
- options: d.options,
263
- label: `${d.optionLabel} ${r + 1}`,
264
- size: d.size,
265
- disabled: d.disabled,
266
- class: "sm:[&>div:first-child]:sr-only",
267
- "onUpdate:modelValue": (e) => Q(r, { option: e ?? void 0 })
268
- }, null, 8, [
269
- "model-value",
270
- "options",
271
- "label",
272
- "size",
273
- "disabled",
274
- "onUpdate:modelValue"
275
- ])) : o("", !0)
276
- ], 2), H.value ? (h(), s("button", {
277
- key: 0,
278
- type: "button",
279
- "data-action": "remove",
280
- class: m(["inline-flex shrink-0 cursor-pointer items-center justify-center rounded-10 text-muted transition-colors duration-200 hover:bg-danger/10 hover:text-danger-strong focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none max-sm:mt-7", me.value]),
281
- "aria-label": `Remove ${J(r)}`,
282
- title: `Remove ${d.itemName}`,
283
- onClick: (e) => he(r)
284
- }, [u(y(ie), {
285
- class: "size-4",
286
- "aria-hidden": "true"
287
- })], 10, T)) : o("", !0)], 40, w))), 128))])], 64)) : H.value ? o("", !0) : (h(), s("p", E, "No " + v(d.itemName) + "s.", 1)),
288
- _(i.$slots, "footer"),
289
- H.value ? (h(), s("div", {
290
- key: 4,
291
- class: m(["flex items-center gap-3", B.value.length || i.$slots.footer ? "mt-3" : ""])
290
+ type: "button",
291
+ "data-action": "remove",
292
+ class: m(["inline-flex shrink-0 cursor-pointer items-center justify-center rounded-8 bg-danger/5 text-danger/60 transition-all duration-200 hover:bg-danger/10 hover:text-danger focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none max-sm:mt-7", de.value]),
293
+ "aria-label": `Remove ${J(r)}`,
294
+ title: `Remove ${d.itemName}`,
295
+ onClick: (e) => pe(r)
296
+ }, [u(y(w), {
297
+ class: "size-[18px]",
298
+ "aria-hidden": "true"
299
+ })], 10, ce)) : s("", !0)], 40, se))), 128))]),
300
+ _: 1
301
+ })) : (h(), c("p", E, "No " + v(d.itemName) + "s.", 1)),
302
+ _(a.$slots, "footer"),
303
+ U.value ? (h(), c("div", {
304
+ key: 5,
305
+ class: m(["flex items-center gap-3", V.value.length || a.$slots.footer ? "mt-2" : ""])
292
306
  }, [u(e, {
293
307
  "data-action": "add",
294
- title: fe.value,
308
+ title: le.value,
309
+ "aria-label": d.addLabel ? void 0 : `Add new ${d.itemName}`,
295
310
  size: "small",
296
311
  variant: "light",
297
- disabled: U.value,
312
+ disabled: W.value,
298
313
  onClick: $
299
314
  }, {
300
- icon: ne(() => [u(y(C), { "aria-hidden": "true" })]),
315
+ icon: x(() => [u(y(C), { "aria-hidden": "true" })]),
301
316
  _: 1
302
- }, 8, ["title", "disabled"]), d.max === void 0 ? o("", !0) : (h(), s("span", {
317
+ }, 8, [
318
+ "title",
319
+ "aria-label",
320
+ "disabled"
321
+ ]), d.max === void 0 ? s("", !0) : (h(), c("span", {
303
322
  key: 0,
304
- class: m(["text-xs text-muted tabular-nums", U.value && "font-medium text-heading"])
305
- }, v(B.value.length) + " of " + v(d.max), 3))], 2)) : o("", !0),
306
- d.errorMsg ? (h(), s("p", {
307
- key: 5,
308
- id: P,
309
- class: "mt-1.5 flex items-center gap-1.5 text-base text-danger-strong",
323
+ class: m(["text-xs text-muted tabular-nums", W.value && "font-medium text-heading"])
324
+ }, v(V.value.length) + " of " + v(d.max), 3))], 2)) : s("", !0),
325
+ d.errorMsg ? (h(), c("p", {
326
+ key: 6,
327
+ id: F,
328
+ class: "mt-1 text-base text-danger-strong",
310
329
  role: "alert"
311
- }, [u(y(re), {
312
- class: "size-4 shrink-0",
313
- "aria-hidden": "true"
314
- }), l(" " + v(d.errorMsg), 1)])) : o("", !0),
315
- c("p", de, v(z.value), 1)
316
- ], 10, ae));
330
+ }, v(d.errorMsg), 1)) : s("", !0),
331
+ l("p", D, v(B.value), 1)
332
+ ], 10, T));
317
333
  }
318
334
  });
319
335
  //#endregion
320
- export { D as default };
336
+ export { O as default };
@@ -6,6 +6,8 @@ export interface Props extends XYChartProps {
6
6
  curve?: ChartCurve;
7
7
  /** Line thickness in px. */
8
8
  lineWidth?: number;
9
+ /** Draws a dot on every point. `auto` shows them up to 60 rows, where they still read as points. */
10
+ points?: boolean | "auto";
9
11
  }
10
12
  type __VLS_Slots = {
11
13
  /** Replaces the tooltip body for the hovered row. */
@@ -16,11 +18,15 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
16
18
  title: string;
17
19
  description: string;
18
20
  height: number;
21
+ points: boolean | "auto";
19
22
  loading: boolean;
23
+ animation: boolean;
20
24
  tooltip: boolean;
21
25
  emptyText: string;
22
26
  lineWidth: number;
27
+ renderer: "canvas" | "svg";
23
28
  gridLines: boolean;
29
+ zoom: boolean;
24
30
  xFormatter: (value: Date | number | string) => string;
25
31
  yFormatter: (value: number) => string;
26
32
  xLabel: string;