@ac-design/design-system 1.0.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +27 -18
  2. package/dist/lib/charts/ChartFrame.js +5 -0
  3. package/dist/lib/charts/ChartFrame.vue.d.ts +69 -0
  4. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +168 -0
  5. package/dist/lib/charts/index.d.ts +7 -0
  6. package/dist/lib/charts/index.js +5 -0
  7. package/dist/lib/charts/shared.d.ts +60 -0
  8. package/dist/lib/charts/shared.js +114 -0
  9. package/dist/lib/charts/xy.d.ts +65 -0
  10. package/dist/lib/charts/xy.js +92 -0
  11. package/dist/lib/compat.css +1707 -1042
  12. package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +2 -2
  13. package/dist/lib/components/AcAccordionItem.vue.d.ts +1 -1
  14. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +5 -5
  15. package/dist/lib/components/AcAlert.vue.d.ts +1 -1
  16. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +19 -25
  17. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +19 -19
  18. package/dist/lib/components/AcAreaChart.js +5 -0
  19. package/dist/lib/components/AcAreaChart.vue.d.ts +44 -0
  20. package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +215 -0
  21. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +8 -8
  22. package/dist/lib/components/AcBadge.vue.d.ts +16 -7
  23. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +59 -43
  24. package/dist/lib/components/AcBanner.vue.d.ts +1 -1
  25. package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +30 -30
  26. package/dist/lib/components/AcBarChart.js +5 -0
  27. package/dist/lib/components/AcBarChart.vue.d.ts +43 -0
  28. package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +217 -0
  29. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +27 -26
  30. package/dist/lib/components/AcBulkActionBar.js +5 -0
  31. package/dist/lib/components/AcBulkActionBar.vue.d.ts +43 -0
  32. package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
  33. package/dist/lib/components/AcButton.vue.d.ts +3 -3
  34. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +42 -34
  35. package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
  36. package/dist/lib/components/AcCard.vue.d.ts +10 -2
  37. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +37 -11
  38. package/dist/lib/components/AcCellValue.vue.d.ts +4 -1
  39. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +214 -179
  40. package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
  41. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +126 -29
  42. package/dist/lib/components/AcCheckRadio.vue.d.ts +1 -1
  43. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +33 -21
  44. package/dist/lib/components/AcCircularProgress.js +5 -0
  45. package/dist/lib/components/AcCircularProgress.vue.d.ts +44 -0
  46. package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +111 -0
  47. package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +142 -167
  48. package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +9 -9
  49. package/dist/lib/components/AcColorInput.js +5 -0
  50. package/dist/lib/components/AcColorInput.vue.d.ts +54 -0
  51. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +187 -0
  52. package/dist/lib/components/AcConfirmModal.js +5 -0
  53. package/dist/lib/components/AcConfirmModal.vue.d.ts +56 -0
  54. package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +92 -0
  55. package/dist/lib/components/AcContentHeader.vue.d.ts +1 -1
  56. package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +5 -4
  57. package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +2 -2
  58. package/dist/lib/components/AcCopyButton.js +5 -0
  59. package/dist/lib/components/AcCopyButton.vue.d.ts +43 -0
  60. package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +92 -0
  61. package/dist/lib/components/AcDatePicker.vue.d.ts +5 -5
  62. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +204 -213
  63. package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
  64. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +37 -46
  65. package/dist/lib/components/AcDonutChart.js +5 -0
  66. package/dist/lib/components/AcDonutChart.vue.d.ts +73 -0
  67. package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +210 -0
  68. package/dist/lib/components/AcDropdown.vue.d.ts +1 -1
  69. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +9 -9
  70. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +2 -2
  71. package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
  72. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +3 -3
  73. package/dist/lib/components/AcEmptyState.vue.d.ts +4 -1
  74. package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +50 -39
  75. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +14 -13
  76. package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +16 -16
  77. package/dist/lib/components/AcFileUpload.vue.d.ts +2 -2
  78. package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +55 -53
  79. package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +2 -2
  80. package/dist/lib/components/AcFooter.js +5 -0
  81. package/dist/lib/components/AcFooter.vue.d.ts +37 -0
  82. package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +107 -0
  83. package/dist/lib/components/AcForm.vue.d.ts +3 -0
  84. package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +4 -2
  85. package/dist/lib/components/AcFormArray.vue.d.ts +2 -2
  86. package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +149 -147
  87. package/dist/lib/components/AcFormFooter.vue.d.ts +2 -2
  88. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
  89. package/dist/lib/components/AcFormSection.vue.d.ts +7 -0
  90. package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
  91. package/dist/lib/components/AcHeader.vue.d.ts +3 -3
  92. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +22 -22
  93. package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
  94. package/dist/lib/components/AcInput.vue.d.ts +3 -3
  95. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +98 -87
  96. package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +1 -1
  97. package/dist/lib/components/AcKeyValueInput.js +5 -0
  98. package/dist/lib/components/AcKeyValueInput.vue.d.ts +114 -0
  99. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +320 -0
  100. package/dist/lib/components/AcLineChart.js +5 -0
  101. package/dist/lib/components/AcLineChart.vue.d.ts +38 -0
  102. package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +187 -0
  103. package/dist/lib/components/AcLocaleSwitcher.js +5 -0
  104. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +46 -0
  105. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +103 -0
  106. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +23 -23
  107. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +6 -6
  108. package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
  109. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +22 -22
  110. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +26 -26
  111. package/dist/lib/components/AcNumberInput.js +5 -0
  112. package/dist/lib/components/AcNumberInput.vue.d.ts +79 -0
  113. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
  114. package/dist/lib/components/AcPage.vue.d.ts +2 -2
  115. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +2 -2
  116. package/dist/lib/components/AcPagination.vue.d.ts +20 -3
  117. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +81 -53
  118. package/dist/lib/components/AcPreloader.vue.d.ts +1 -1
  119. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +3 -3
  120. package/dist/lib/components/AcProgress.vue.d.ts +2 -2
  121. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +4 -4
  122. package/dist/lib/components/AcResourceCard.vue.d.ts +2 -2
  123. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +13 -13
  124. package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
  125. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +9 -8
  126. package/dist/lib/components/AcSectionContent.vue.d.ts +2 -2
  127. package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +8 -8
  128. package/dist/lib/components/AcSegmentedControl.vue.d.ts +1 -1
  129. package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +4 -4
  130. package/dist/lib/components/AcSelect.vue.d.ts +4 -4
  131. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +230 -227
  132. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +31 -31
  133. package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
  134. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
  135. package/dist/lib/components/AcSidebar.vue.d.ts +3 -3
  136. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +75 -75
  137. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +33 -32
  138. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +6 -6
  139. package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +8 -8
  140. package/dist/lib/components/AcSlider.vue.d.ts +1 -1
  141. package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +174 -172
  142. package/dist/lib/components/AcStatCard.vue.d.ts +3 -3
  143. package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +90 -85
  144. package/dist/lib/components/AcStatusBar.vue.d.ts +1 -1
  145. package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +6 -6
  146. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +28 -28
  147. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +39 -34
  148. package/dist/lib/components/AcSwitchCard.js +5 -0
  149. package/dist/lib/components/AcSwitchCard.vue.d.ts +59 -0
  150. package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +119 -0
  151. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +87 -87
  152. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +4 -4
  153. package/dist/lib/components/AcTag.vue.d.ts +1 -1
  154. package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +22 -22
  155. package/dist/lib/components/AcTagInput.js +5 -0
  156. package/dist/lib/components/AcTagInput.vue.d.ts +74 -0
  157. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +291 -0
  158. package/dist/lib/components/AcTextarea.vue.d.ts +3 -3
  159. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +89 -64
  160. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +3 -3
  161. package/dist/lib/components/AcTimePicker.js +5 -0
  162. package/dist/lib/components/AcTimePicker.vue.d.ts +65 -0
  163. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +463 -0
  164. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +65 -71
  165. package/dist/lib/components/AcTooltip.vue.d.ts +1 -1
  166. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +77 -67
  167. package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
  168. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +111 -103
  169. package/dist/lib/components/index.d.ts +14 -2
  170. package/dist/lib/components/status.d.ts +26 -0
  171. package/dist/lib/components/status.js +110 -0
  172. package/dist/lib/composables/copyText.d.ts +2 -1
  173. package/dist/lib/composables/copyText.js +2 -2
  174. package/dist/lib/composables/useApiPagination.d.ts +55 -0
  175. package/dist/lib/composables/useApiPagination.js +58 -0
  176. package/dist/lib/composables/useBulkSelection.d.ts +44 -0
  177. package/dist/lib/composables/useBulkSelection.js +41 -0
  178. package/dist/lib/composables/useFormValidation.d.ts +65 -0
  179. package/dist/lib/composables/useFormValidation.js +148 -0
  180. package/dist/lib/composables/useTablePagination.d.ts +49 -0
  181. package/dist/lib/composables/useTablePagination.js +41 -0
  182. package/dist/lib/editor/theme.js +65 -62
  183. package/dist/lib/index.d.ts +14 -0
  184. package/dist/lib/index.js +95 -78
  185. package/dist/lib/theme.css +391 -272
  186. package/package.json +11 -4
@@ -1,33 +1,40 @@
1
- import e from "./AcBadge.js";
2
- import t from "./AcModal.js";
3
- import n from "./AcSkeleton.js";
4
- import r from "./AcTag.js";
5
- import i from "./AcTooltip.js";
6
- import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as ee, createVNode as d, defineAsyncComponent as f, defineComponent as p, getCurrentInstance as te, h as ne, mergeProps as m, nextTick as re, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as ie, onMounted as ae, openBlock as _, ref as v, renderList as oe, resolveDynamicComponent as y, toDisplayString as b, unref as x, watch as S, withCtx as C, withModifiers as w } from "vue";
7
- import { Braces as se, Check as ce, Minus as le } from "@lucide/vue";
1
+ import { statusMeta as e } from "./status.js";
2
+ import t from "./AcBadge.js";
3
+ import n from "./AcModal.js";
4
+ import r from "./AcSkeleton.js";
5
+ import i from "./AcTag.js";
6
+ import a from "./AcTooltip.js";
7
+ import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as ee, defineAsyncComponent as te, defineComponent as p, getCurrentInstance as ne, h as re, mergeProps as m, nextTick as ie, normalizeClass as h, normalizeStyle as ae, onBeforeUnmount as oe, onMounted as se, openBlock as g, ref as _, renderList as ce, resolveDynamicComponent as v, toDisplayString as y, unref as b, watch as x, withCtx as S, withModifiers as C } from "vue";
8
+ import { Braces as le, Check as ue, Minus as de } from "@lucide/vue";
8
9
  //#region src/lib/components/AcCellValue.vue?vue&type=script&setup=true&lang.ts
9
- var ue = ["src"], de = {
10
+ var fe = ["src"], pe = {
10
11
  key: 1,
11
12
  class: "text-muted"
12
- }, fe = ["tabindex"], pe = {
13
+ }, me = {
14
+ class: "relative flex size-1.5 shrink-0",
15
+ "aria-hidden": "true"
16
+ }, he = ["tabindex"], ge = {
17
+ class: "relative flex size-1.5 shrink-0",
18
+ "aria-hidden": "true"
19
+ }, _e = {
13
20
  key: 4,
14
21
  class: "inline-flex items-center gap-1"
15
- }, me = ["datetime"], he = ["datetime", "tabindex"], ge = ["aria-expanded", "aria-label"], _e = ["tabindex"], ve = ["aria-label"], T = v(Date.now()), E = 0, D;
16
- function ye() {
17
- E++ === 0 && (D = setInterval(() => T.value = Date.now(), 3e4));
22
+ }, ve = ["datetime"], ye = ["datetime", "tabindex"], be = ["aria-expanded", "aria-label"], xe = ["tabindex"], Se = ["aria-label"], w = _(Date.now()), T = 0, E;
23
+ function Ce() {
24
+ T++ === 0 && (E = setInterval(() => w.value = Date.now(), 3e4));
18
25
  }
19
- function O() {
20
- --E === 0 && clearInterval(D);
26
+ function we() {
27
+ --T === 0 && clearInterval(E);
21
28
  }
22
- var k = /* @__PURE__ */ new WeakMap(), A;
23
- function be(e, t) {
29
+ var D = /* @__PURE__ */ new WeakMap(), O;
30
+ function Te(e, t) {
24
31
  if (typeof ResizeObserver > "u") return t();
25
- A ??= new ResizeObserver((e) => e.forEach((e) => k.get(e.target)?.())), k.set(e, t), A.observe(e);
32
+ O ??= new ResizeObserver((e) => e.forEach((e) => D.get(e.target)?.())), D.set(e, t), O.observe(e);
26
33
  }
27
- function j(e) {
28
- k.delete(e), A?.unobserve(e);
34
+ function k(e) {
35
+ D.delete(e), O?.unobserve(e);
29
36
  }
30
- var M = /*@__PURE__*/ p({
37
+ var A = /*@__PURE__*/ p({
31
38
  __name: "AcCellValue",
32
39
  props: {
33
40
  value: { default: void 0 },
@@ -63,17 +70,21 @@ var M = /*@__PURE__*/ p({
63
70
  loading: {
64
71
  type: Boolean,
65
72
  default: !1
73
+ },
74
+ plain: {
75
+ type: Boolean,
76
+ default: !1
66
77
  }
67
78
  },
68
79
  setup(p) {
69
- let E = p, D = /* @__PURE__ */ new Set([
80
+ let T = p, E = /* @__PURE__ */ new Set([
70
81
  "",
71
82
  "<none>",
72
83
  "<unknown>",
73
84
  "<nil>",
74
85
  "null",
75
86
  "undefined"
76
- ]), k = {
87
+ ]), D = {
77
88
  primary: "primary",
78
89
  secondary: "secondary",
79
90
  info: "info",
@@ -81,6 +92,7 @@ var M = /*@__PURE__*/ p({
81
92
  success: "success",
82
93
  warning: "warning",
83
94
  danger: "danger",
95
+ pending: "pending",
84
96
  dark: "dark",
85
97
  black: "dark",
86
98
  light: "default",
@@ -88,89 +100,92 @@ var M = /*@__PURE__*/ p({
88
100
  gray: "default",
89
101
  default: "default",
90
102
  neutral: "default"
91
- }, A = [
92
- ["success", /^(ready|running|succeeded|success|successful|healthy|active|available|approved|bound|completed?|current|provisioned|synced|true)$/],
93
- ["danger", /^(failed|failure|error|critical|notready|not ready|unhealthy|crashloopbackoff|lost|rejected|false)$/],
94
- ["warning", /^(pending|provisioning|progressing|updating|degraded|warning|halted|paused|terminating|waiting|suspended)$/]
95
- ], M = /^-?[\d.]+\s?[a-zA-Z%]{0,3}$/, xe = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/, Se = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), Ce = new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 }), N = new Intl.DateTimeFormat(void 0, {
103
+ }, O = {
104
+ primary: ["bg-primary", "text-primary-strong"],
105
+ secondary: ["bg-secondary", "text-secondary"],
106
+ info: ["bg-info", "text-info-strong"],
107
+ success: ["bg-success", "text-success-strong"],
108
+ warning: ["bg-warning", "text-warning-strong"],
109
+ danger: ["bg-danger", "text-danger-strong"],
110
+ pending: ["bg-pending", "text-pending-strong"],
111
+ dark: ["bg-heading", "text-heading"],
112
+ default: ["bg-muted", "text-muted"]
113
+ }, A = /^-?[\d.]+\s?[a-zA-Z%]{0,3}$/, Ee = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/, De = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), Oe = new Intl.NumberFormat(void 0, { maximumFractionDigits: 0 }), ke = new Intl.DateTimeFormat(void 0, {
96
114
  dateStyle: "medium",
97
115
  timeStyle: "long"
98
- }), we = f({
116
+ }), Ae = te({
99
117
  loader: () => import("../editor/index.js").then((e) => e.AcCodeEditor),
100
- loadingComponent: () => ne(n, {
118
+ loadingComponent: () => re(r, {
101
119
  shape: "editor",
102
120
  height: "240px"
103
121
  }),
104
122
  delay: 150
105
- }), P = te()?.appContext.components.RouterLink, F = v(null), I = v(!1), L = v(!1), R = v(!1), z = v(!1), B = o(() => E.cell ? E.cell.data : E.value), V = o(() => E.title || E.column?.name || ""), H = o(() => E.tooltip || E.cell?.tooltip || ""), Te = o(() => E.icon || E.cell?.icon || ""), Ee = o(() => E.bold || !!E.cell?.isBold || E.column?.format === "name"), U = o(() => E.align ?? E.column?.textAlign), W = o(() => {
106
- let e = E.href || E.cell?.link || "";
107
- return e && E.resolveLink ? E.resolveLink(e) : e;
108
- }), De = o(() => /^https?:\/\//.test(W.value)), G = o(() => P && W.value.startsWith("/") ? P : "a"), K = o(() => W.value ? De.value ? {
109
- href: W.value,
123
+ }), je = ne()?.appContext.components.RouterLink, j = _(null), Me = _(!1), M = _(!1), N = _(!1), P = _(!1), F = s(() => T.cell ? T.cell.data : T.value), I = s(() => T.title || T.column?.name || ""), L = s(() => T.tooltip || T.cell?.tooltip || ""), Ne = s(() => T.icon || T.cell?.icon || ""), Pe = s(() => T.bold || !!T.cell?.isBold || T.column?.format === "name"), R = s(() => T.align ?? T.column?.textAlign), z = s(() => {
124
+ let e = T.href || T.cell?.link || "";
125
+ return e && T.resolveLink ? T.resolveLink(e) : e;
126
+ }), Fe = s(() => /^https?:\/\//.test(z.value)), B = s(() => je && z.value.startsWith("/") ? je : "a"), V = s(() => z.value ? Fe.value ? {
127
+ href: z.value,
110
128
  target: "_blank",
111
129
  rel: "noopener noreferrer"
112
- } : G.value === "a" ? { href: W.value } : { to: W.value } : null), Oe = o(() => {
113
- let e = (E.color || E.cell?.color || "").trim().split(/\s+/)[0].replace(/^is-/, "");
114
- if (e) return k[e] ?? "default";
115
- if (q.value !== "status") return null;
116
- let t = String(B.value).trim().toLowerCase();
117
- return A.find(([, e]) => e.test(t))?.[0] ?? "default";
118
- }), q = o(() => {
119
- let e = B.value;
120
- if (Fe(e)) return "empty";
121
- if (E.color || E.cell?.color) return "status";
122
- if (E.type !== "auto") return E.type;
123
- let t = typeof e == "object" ? void 0 : E.column?.type;
124
- return t && t !== "auto" && t !== "object" ? t : typeof e == "boolean" ? "boolean" : typeof e == "number" ? "number" : Array.isArray(e) ? "array" : typeof e == "object" ? Ie(e) ? "labels" : "object" : typeof e == "string" && xe.test(e) && !Number.isNaN(Date.parse(e)) ? "date" : "string";
125
- }), J = o(() => q.value === "date" ? Le(B.value) : null), Y = o(() => {
126
- let e = B.value;
127
- switch (q.value) {
130
+ } : B.value === "a" ? { href: z.value } : { to: z.value } : null), H = s(() => {
131
+ let t = (T.color || T.cell?.color || "").trim().split(/\s+/)[0].replace(/^is-/, "");
132
+ return t ? D[t] ?? "default" : W.value === "status" ? e(String(F.value)).tone : null;
133
+ }), U = s(() => W.value === "status" && e(String(F.value)).transient), W = s(() => {
134
+ let e = F.value;
135
+ if (Ue(e)) return "empty";
136
+ if (T.color || T.cell?.color) return "status";
137
+ if (T.type !== "auto") return T.type;
138
+ let t = typeof e == "object" ? void 0 : T.column?.type;
139
+ return t && t !== "auto" && t !== "object" ? t : typeof e == "boolean" ? "boolean" : typeof e == "number" ? "number" : Array.isArray(e) ? "array" : typeof e == "object" ? We(e) ? "labels" : "object" : typeof e == "string" && Ee.test(e) && !Number.isNaN(Date.parse(e)) ? "date" : "string";
140
+ }), G = s(() => W.value === "date" ? Ge(F.value) : null), K = s(() => {
141
+ let e = F.value;
142
+ switch (W.value) {
128
143
  case "number":
129
144
  case "integer": {
130
145
  let t = typeof e == "number" ? e : Number(e);
131
- return Number.isNaN(t) ? `${String(e)}${E.unit}` : `${(q.value === "integer" ? Ce : Se).format(t)}${E.unit}`;
146
+ return Number.isNaN(t) ? `${String(e)}${T.unit}` : `${(W.value === "integer" ? Oe : De).format(t)}${T.unit}`;
132
147
  }
133
- case "boolean": return $(e) ? "true" : "false";
134
- case "date": return J.value ? E.relative ? Re(J.value, T.value) : N.format(J.value) : String(e);
135
- case "object": return Be(e);
148
+ case "boolean": return Z(e) ? "true" : "false";
149
+ case "date": return G.value ? T.relative ? Q(G.value, w.value) : ke.format(G.value) : String(e);
150
+ case "object": return qe(e);
136
151
  default: return typeof e == "object" ? JSON.stringify(e) : String(e);
137
152
  }
138
- }), X = o(() => J.value ? H.value || (E.relative ? N.format(J.value) : Re(J.value, T.value)) : H.value), ke = o(() => H.value || (I.value ? Y.value : "")), Z = o(() => {
139
- let e = B.value;
140
- return q.value === "labels" ? Object.entries(e).map(([e, t]) => ({
153
+ }), q = s(() => G.value ? L.value || (T.relative ? ke.format(G.value) : Q(G.value, w.value)) : L.value), Ie = s(() => L.value || (Me.value ? K.value : "")), J = s(() => {
154
+ let e = F.value;
155
+ return W.value === "labels" ? Object.entries(e).map(([e, t]) => ({
141
156
  key: e,
142
157
  value: String(t ?? ""),
143
158
  text: `${e}=${t ?? ""}`
144
- })) : q.value === "array" ? e.map((e) => {
145
- let t = Ve(e);
159
+ })) : W.value === "array" ? e.map((e) => {
160
+ let t = Je(e);
146
161
  return {
147
162
  key: "",
148
163
  value: t,
149
164
  text: t
150
165
  };
151
166
  }) : [];
152
- }), Ae = o(() => L.value ? Z.value : Z.value.slice(0, E.maxItems)), Q = o(() => Z.value.length - Math.min(Z.value.length, E.maxItems)), je = o(() => q.value === "object" || q.value === "array" && B.value.some((e) => typeof e == "object" && !!e)), Me = o(() => R.value ? JSON.stringify(B.value, null, 2) : ""), Ne = o(() => q.value === "number" || q.value === "integer" || q.value === "string" && M.test(Y.value)), Pe = o(() => q.value === "labels" ? "labels" : "items");
153
- function Fe(e) {
154
- return e == null ? !0 : typeof e == "string" ? D.has(e.trim()) : Array.isArray(e) ? e.length === 0 : typeof e == "object" && Object.keys(e).length === 0;
167
+ }), Le = s(() => M.value ? J.value : J.value.slice(0, T.maxItems)), Y = s(() => J.value.length - Math.min(J.value.length, T.maxItems)), Re = s(() => W.value === "object" || W.value === "array" && F.value.some((e) => typeof e == "object" && !!e)), ze = s(() => N.value ? JSON.stringify(F.value, null, 2) : ""), Be = s(() => W.value === "number" || W.value === "integer" || W.value === "string" && A.test(K.value)), X = s(() => O[H.value ?? "default"]), Ve = s(() => T.plain ? "rounded-4" : T.column?.shape === "Rectangle" ? "rounded-6" : "rounded-full"), He = s(() => W.value === "labels" ? "labels" : "items");
168
+ function Ue(e) {
169
+ return e == null ? !0 : typeof e == "string" ? E.has(e.trim()) : Array.isArray(e) ? e.length === 0 : typeof e == "object" && Object.keys(e).length === 0;
155
170
  }
156
- function Ie(e) {
171
+ function We(e) {
157
172
  return Object.values(e).every((e) => e === null || [
158
173
  "string",
159
174
  "number",
160
175
  "boolean"
161
176
  ].includes(typeof e));
162
177
  }
163
- function $(e) {
178
+ function Z(e) {
164
179
  return e === !0 || String(e).toLowerCase() === "true";
165
180
  }
166
- function Le(e) {
181
+ function Ge(e) {
167
182
  if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : e;
168
183
  if (typeof e == "number") return new Date(e < 0xe8d4a51000 ? e * 1e3 : e);
169
- if (typeof e == "string" && /^\d+$/.test(e)) return Le(Number(e));
184
+ if (typeof e == "string" && /^\d+$/.test(e)) return Ge(Number(e));
170
185
  let t = typeof e == "string" ? Date.parse(e) : NaN;
171
186
  return Number.isNaN(t) ? null : new Date(t);
172
187
  }
173
- function Re(e, t) {
188
+ function Q(e, t) {
174
189
  let n = Math.round((t - e.getTime()) / 1e3), r = Math.abs(n);
175
190
  if (r < 45) return "just now";
176
191
  let i = [
@@ -184,203 +199,223 @@ var M = /*@__PURE__*/ p({
184
199
  let o = Math.floor(r / a[0]);
185
200
  return n >= 0 ? `${o}${a[1]} ago` : `in ${o}${a[1]}`;
186
201
  }
187
- function ze(e) {
202
+ function Ke(e) {
188
203
  return Array.isArray(e) ? `[${e.length}]` : typeof e == "object" && e ? "{…}" : typeof e == "string" ? e : String(e);
189
204
  }
190
- function Be(e) {
191
- return Object.entries(e).map(([e, t]) => `${e}: ${ze(t)}`).join(", ");
205
+ function qe(e) {
206
+ return Object.entries(e).map(([e, t]) => `${e}: ${Ke(t)}`).join(", ");
192
207
  }
193
- function Ve(e) {
208
+ function Je(e) {
194
209
  if (typeof e != "object" || !e) return String(e);
195
210
  let t = e, n = t.name ?? t.Name ?? Object.values(t)[0];
196
211
  return n === void 0 || typeof n == "object" ? "{…}" : String(n);
197
212
  }
198
- function He(e) {
199
- F.value = e && "$el" in e ? e.$el : e;
213
+ function Ye(e) {
214
+ j.value = e && "$el" in e ? e.$el : e;
200
215
  }
201
- function Ue() {
202
- let e = F.value;
203
- I.value = !!e && e.scrollWidth > e.clientWidth + 1;
216
+ function $() {
217
+ let e = j.value;
218
+ Me.value = !!e && e.scrollWidth > e.clientWidth + 1;
204
219
  }
205
- function We() {
206
- R.value = !0, z.value = !0;
220
+ function Xe() {
221
+ N.value = !0, P.value = !0;
207
222
  }
208
- return S(F, (e, t) => {
209
- t && j(t), e && be(e, Ue);
210
- }), S(Y, () => re(Ue)), S(() => q.value === "date", (e, t) => {
211
- e && !t ? ye() : !e && t && O();
212
- }), ae(() => {
213
- q.value === "date" && ye();
214
- }), ie(() => {
215
- q.value === "date" && O(), F.value && j(F.value);
216
- }), (o, f) => (_(), l("span", {
223
+ return x(j, (e, t) => {
224
+ t && k(t), e && Te(e, $);
225
+ }), x(K, () => ie($)), x(() => W.value === "date", (e, t) => {
226
+ e && !t ? Ce() : !e && t && we();
227
+ }), se(() => {
228
+ W.value === "date" && Ce();
229
+ }), oe(() => {
230
+ W.value === "date" && we(), j.value && k(j.value);
231
+ }), (e, s) => (g(), u("span", {
217
232
  class: h(["max-w-full min-w-0 items-center gap-1.5 align-middle", [
218
- U.value ? "flex w-full" : "inline-flex",
219
- U.value === "center" && "justify-center",
220
- U.value === "right" && "justify-end",
221
- Ee.value && "font-semibold text-heading"
233
+ R.value ? "flex w-full" : "inline-flex",
234
+ R.value === "center" && "justify-center",
235
+ R.value === "right" && "justify-end",
236
+ Pe.value && "font-semibold text-heading"
222
237
  ]]),
223
238
  "data-ac-ds": "",
224
239
  "data-testid": "ac-cell-value"
225
- }, [p.loading ? (_(), s(n, {
240
+ }, [p.loading ? (g(), c(r, {
226
241
  key: 0,
227
242
  width: "96px"
228
- })) : (_(), l(a, { key: 1 }, [
229
- Te.value ? (_(), l("img", {
243
+ })) : (g(), u(o, { key: 1 }, [
244
+ Ne.value ? (g(), u("img", {
230
245
  key: 0,
231
- src: Te.value,
246
+ src: Ne.value,
232
247
  alt: "",
233
248
  class: "size-4 shrink-0 object-contain"
234
- }, null, 8, ue)) : c("", !0),
235
- q.value === "empty" ? (_(), l("span", de, b(p.emptyText), 1)) : q.value === "status" && K.value ? (_(), s(y(G.value), m({ key: 2 }, K.value, {
236
- class: "inline-flex rounded-6 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
237
- onClick: f[0] ||= w(() => {}, ["stop"])
249
+ }, null, 8, fe)) : l("", !0),
250
+ W.value === "empty" ? (g(), u("span", pe, y(p.emptyText), 1)) : W.value === "status" && V.value ? (g(), c(v(B.value), m({ key: 2 }, V.value, {
251
+ class: ["inline-flex focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", [Ve.value, p.plain && "underline-offset-2 hover:underline"]],
252
+ onClick: s[0] ||= C(() => {}, ["stop"])
238
253
  }), {
239
- default: C(() => [d(e, {
240
- label: Y.value,
241
- color: Oe.value ?? "default",
254
+ default: S(() => [p.plain ? (g(), u("span", {
255
+ key: 0,
256
+ class: h(["inline-flex items-center gap-1.5 text-xs font-medium whitespace-nowrap", X.value[1]])
257
+ }, [d("span", me, [U.value ? (g(), u("span", {
258
+ key: 0,
259
+ class: h(["absolute inset-0 rounded-full opacity-60 motion-safe:animate-ping", X.value[0]])
260
+ }, null, 2)) : l("", !0), d("span", { class: h(["relative size-1.5 rounded-full", X.value[0]]) }, null, 2)]), f(y(K.value), 1)], 2)) : (g(), c(t, {
261
+ key: 1,
262
+ label: K.value,
263
+ color: H.value ?? "default",
242
264
  variant: "light",
243
265
  rounded: p.column?.shape !== "Rectangle",
244
- dot: ""
266
+ dot: "",
267
+ pulse: U.value
245
268
  }, null, 8, [
246
269
  "label",
247
270
  "color",
248
- "rounded"
249
- ])]),
271
+ "rounded",
272
+ "pulse"
273
+ ]))]),
250
274
  _: 1
251
- }, 16)) : q.value === "status" ? (_(), s(i, {
275
+ }, 16, ["class"])) : W.value === "status" ? (g(), c(a, {
252
276
  key: 3,
253
- content: H.value
277
+ content: L.value
254
278
  }, {
255
- default: C(() => [u("span", {
256
- tabindex: H.value ? 0 : void 0,
257
- class: "inline-flex rounded-6 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring"
258
- }, [d(e, {
259
- label: Y.value,
260
- color: Oe.value ?? "default",
279
+ default: S(() => [d("span", {
280
+ tabindex: L.value ? 0 : void 0,
281
+ class: h(["inline-flex focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", Ve.value])
282
+ }, [p.plain ? (g(), u("span", {
283
+ key: 0,
284
+ class: h(["inline-flex items-center gap-1.5 text-xs font-medium whitespace-nowrap", X.value[1]])
285
+ }, [d("span", ge, [U.value ? (g(), u("span", {
286
+ key: 0,
287
+ class: h(["absolute inset-0 rounded-full opacity-60 motion-safe:animate-ping", X.value[0]])
288
+ }, null, 2)) : l("", !0), d("span", { class: h(["relative size-1.5 rounded-full", X.value[0]]) }, null, 2)]), f(y(K.value), 1)], 2)) : (g(), c(t, {
289
+ key: 1,
290
+ label: K.value,
291
+ color: H.value ?? "default",
261
292
  variant: "light",
262
293
  rounded: p.column?.shape !== "Rectangle",
263
- dot: ""
294
+ dot: "",
295
+ pulse: U.value
264
296
  }, null, 8, [
265
297
  "label",
266
298
  "color",
267
- "rounded"
268
- ])], 8, fe)]),
299
+ "rounded",
300
+ "pulse"
301
+ ]))], 10, he)]),
269
302
  _: 1
270
- }, 8, ["content"])) : q.value === "boolean" ? (_(), l("span", pe, [$(B.value) ? (_(), s(x(ce), {
303
+ }, 8, ["content"])) : W.value === "boolean" ? (g(), u("span", _e, [Z(F.value) ? (g(), c(b(ue), {
271
304
  key: 0,
272
- class: "size-3.5 text-success",
305
+ class: "size-3.5 text-success-strong",
273
306
  "aria-hidden": "true"
274
- })) : (_(), s(x(le), {
307
+ })) : (g(), c(b(de), {
275
308
  key: 1,
276
309
  class: "size-3.5 text-muted",
277
310
  "aria-hidden": "true"
278
- })), u("span", { class: h(!$(B.value) && "text-muted") }, b(Y.value), 3)])) : q.value === "date" ? (_(), s(i, {
311
+ })), d("span", { class: h(!Z(F.value) && "text-muted") }, y(K.value), 3)])) : W.value === "date" ? (g(), c(a, {
279
312
  key: 5,
280
- content: X.value
313
+ content: q.value
281
314
  }, {
282
- default: C(() => [K.value ? (_(), s(y(G.value), m({ key: 0 }, K.value, {
283
- class: "font-medium whitespace-nowrap text-primary-20 tabular-nums underline-offset-2 hover:underline focus-visible:rounded-2 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
284
- onClick: f[1] ||= w(() => {}, ["stop"])
315
+ default: S(() => [V.value ? (g(), c(v(B.value), m({ key: 0 }, V.value, {
316
+ class: "font-medium whitespace-nowrap text-primary-strong tabular-nums underline-offset-2 hover:underline focus-visible:rounded-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
317
+ onClick: s[1] ||= C(() => {}, ["stop"])
285
318
  }), {
286
- default: C(() => [u("time", { datetime: J.value?.toISOString() }, b(Y.value), 9, me)]),
319
+ default: S(() => [d("time", { datetime: G.value?.toISOString() }, y(K.value), 9, ve)]),
287
320
  _: 1
288
- }, 16)) : (_(), l("time", {
321
+ }, 16)) : (g(), u("time", {
289
322
  key: 1,
290
- datetime: J.value?.toISOString(),
291
- tabindex: X.value ? 0 : void 0,
292
- class: h(["whitespace-nowrap tabular-nums focus-visible:rounded-2 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring", X.value && "cursor-default decoration-border-dark decoration-dotted underline-offset-4 hover:underline"])
293
- }, b(Y.value), 11, he))]),
323
+ datetime: G.value?.toISOString(),
324
+ tabindex: q.value ? 0 : void 0,
325
+ class: h(["whitespace-nowrap tabular-nums focus-visible:rounded-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", q.value && "cursor-default decoration-border-dark decoration-dotted underline-offset-4 hover:underline"])
326
+ }, y(K.value), 11, ye))]),
294
327
  _: 1
295
- }, 8, ["content"])) : q.value === "labels" || q.value === "array" ? (_(), l("span", {
328
+ }, 8, ["content"])) : W.value === "labels" || W.value === "array" ? (g(), u("span", {
296
329
  key: 6,
297
- class: "flex w-max min-w-0 flex-wrap items-center gap-1",
298
- style: g({ maxWidth: p.maxWidth })
299
- }, [(_(!0), l(a, null, oe(Ae.value, (e, t) => (_(), s(i, {
330
+ class: h(["flex w-max min-w-0 items-center gap-1", M.value ? "flex-wrap" : "flex-nowrap"]),
331
+ style: ae({ maxWidth: p.maxWidth })
332
+ }, [(g(!0), u(o, null, ce(Le.value, (e, t) => (g(), c(a, {
300
333
  key: `${e.text}-${t}`,
301
- content: e.text.length > 28 && !L.value ? e.text : "",
302
- class: h(!L.value && "max-w-48")
334
+ content: e.text.length > 28 && !M.value ? e.text : "",
335
+ class: h(!M.value && "max-w-48 min-w-0")
303
336
  }, {
304
- default: C(() => [e.key ? (_(), s(r, {
337
+ default: S(() => [e.key ? (g(), c(i, {
305
338
  key: 0,
306
339
  "key-label": e.key,
307
- "value-label": e.value
308
- }, null, 8, ["key-label", "value-label"])) : (_(), s(r, {
340
+ "value-label": e.value,
341
+ rounded: ""
342
+ }, null, 8, ["key-label", "value-label"])) : (g(), c(i, {
309
343
  key: 1,
310
- label: e.value
344
+ label: e.value,
345
+ rounded: ""
311
346
  }, null, 8, ["label"]))]),
312
347
  _: 2
313
- }, 1032, ["content", "class"]))), 128)), Q.value > 0 ? (_(), l("button", {
348
+ }, 1032, ["content", "class"]))), 128)), Y.value > 0 ? (g(), u("button", {
314
349
  key: 0,
315
350
  type: "button",
316
- class: "inline-flex h-6 shrink-0 cursor-pointer items-center rounded-6 px-1.5 text-xs font-medium whitespace-nowrap text-label transition hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
317
- "aria-expanded": L.value,
318
- "aria-label": L.value ? `Show fewer ${Pe.value}` : `Show ${Q.value} more ${Pe.value}`,
319
- onClick: f[2] ||= w((e) => L.value = !L.value, ["stop"])
320
- }, b(L.value ? "Show less" : `+${Q.value} more`), 9, ge)) : c("", !0)], 4)) : (_(), s(i, {
351
+ class: "inline-flex h-6 shrink-0 cursor-pointer items-center rounded-full border border-dashed border-primary/40 px-2 text-xs font-medium whitespace-nowrap text-primary-strong transition-colors duration-200 hover:bg-primary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
352
+ "aria-expanded": M.value,
353
+ "aria-label": M.value ? `Show fewer ${He.value}` : `Show ${Y.value} more ${He.value}`,
354
+ onClick: s[2] ||= C((e) => M.value = !M.value, ["stop"])
355
+ }, y(M.value ? "Show less" : `+${Y.value} more`), 9, be)) : l("", !0)], 6)) : (g(), c(a, {
321
356
  key: 7,
322
- content: ke.value,
357
+ content: Ie.value,
323
358
  class: "min-w-0"
324
359
  }, {
325
- default: C(() => [K.value ? (_(), s(y(G.value), m({
360
+ default: S(() => [V.value ? (g(), c(v(B.value), m({
326
361
  key: 0,
327
- ref: He
328
- }, K.value, {
329
- class: ["block truncate font-medium text-primary-20 underline-offset-2 hover:underline focus-visible:rounded-2 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring", [(p.mono || q.value === "object") && "font-mono text-xs", Ne.value && "tabular-nums"]],
362
+ ref: Ye
363
+ }, V.value, {
364
+ class: ["block truncate font-medium text-primary-strong underline-offset-2 hover:underline focus-visible:rounded-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", [(p.mono || W.value === "object") && "font-mono text-xs", Be.value && "tabular-nums"]],
330
365
  style: { maxWidth: p.maxWidth },
331
- onClick: f[3] ||= w(() => {}, ["stop"])
366
+ onClick: s[3] ||= C(() => {}, ["stop"])
332
367
  }), {
333
- default: C(() => [ee(b(Y.value), 1)]),
368
+ default: S(() => [f(y(K.value), 1)]),
334
369
  _: 1
335
- }, 16, ["class", "style"])) : (_(), l("span", {
370
+ }, 16, ["class", "style"])) : (g(), u("span", {
336
371
  key: 1,
337
- ref: He,
338
- tabindex: ke.value ? 0 : void 0,
339
- class: h(["block truncate focus-visible:rounded-2 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring", [
340
- (p.mono || q.value === "object") && "font-mono text-xs",
341
- Ne.value && "tabular-nums",
342
- q.value === "object" && "text-label"
372
+ ref: Ye,
373
+ tabindex: Ie.value ? 0 : void 0,
374
+ class: h(["block truncate focus-visible:rounded-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", [
375
+ (p.mono || W.value === "object") && "font-mono text-xs",
376
+ Be.value && "tabular-nums",
377
+ W.value === "object" && "text-muted"
343
378
  ]]),
344
- style: g({ maxWidth: p.maxWidth })
345
- }, b(Y.value), 15, _e))]),
379
+ style: ae({ maxWidth: p.maxWidth })
380
+ }, y(K.value), 15, xe))]),
346
381
  _: 1
347
382
  }, 8, ["content"])),
348
- je.value ? (_(), s(i, {
383
+ Re.value ? (g(), c(a, {
349
384
  key: 8,
350
385
  content: "View as JSON"
351
386
  }, {
352
- default: C(() => [u("button", {
387
+ default: S(() => [d("button", {
353
388
  type: "button",
354
- class: "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-6 text-muted transition hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring",
355
- "aria-label": V.value ? `View ${V.value} as JSON` : "View as JSON",
389
+ class: "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
390
+ "aria-label": I.value ? `View ${I.value} as JSON` : "View as JSON",
356
391
  "aria-haspopup": "dialog",
357
- onClick: w(We, ["stop"])
358
- }, [d(x(se), {
392
+ onClick: C(Xe, ["stop"])
393
+ }, [ee(b(le), {
359
394
  class: "size-3.5",
360
395
  "aria-hidden": "true"
361
- })], 8, ve)]),
396
+ })], 8, Se)]),
362
397
  _: 1
363
- })) : c("", !0),
364
- R.value ? (_(), s(t, {
398
+ })) : l("", !0),
399
+ N.value ? (g(), c(n, {
365
400
  key: 9,
366
- open: z.value,
367
- "onUpdate:open": f[4] ||= (e) => z.value = e,
368
- title: V.value || "Value",
401
+ open: P.value,
402
+ "onUpdate:open": s[4] ||= (e) => P.value = e,
403
+ title: I.value || "Value",
369
404
  size: "medium"
370
405
  }, {
371
- default: C(() => [d(x(we), {
372
- "model-value": Me.value,
406
+ default: S(() => [ee(b(Ae), {
407
+ "model-value": ze.value,
373
408
  language: "json",
374
409
  readonly: "",
375
410
  copyable: "",
376
411
  height: "auto",
377
412
  "max-height": "60vh",
378
- label: `${V.value || "Value"} as JSON`
413
+ label: `${I.value || "Value"} as JSON`
379
414
  }, null, 8, ["model-value", "label"])]),
380
415
  _: 1
381
- }, 8, ["open", "title"])) : c("", !0)
416
+ }, 8, ["open", "title"])) : l("", !0)
382
417
  ], 64))], 2));
383
418
  }
384
419
  });
385
420
  //#endregion
386
- export { M as default };
421
+ export { A as default };
@@ -1,24 +1,38 @@
1
1
  import type { Option } from "./types";
2
2
  export interface Props<V> {
3
- /** The checkboxes to render: `{ value, label, disabled? }`. */
4
- options: Option<V>[];
3
+ /** The checkboxes to render: `{ value, label, description?, disabled? }`. A `description` shows in small muted text under the label. Leave it out for one checkbox bound with `v-model:checked`. */
4
+ options?: Option<V>[];
5
5
  /** Native `name` shared by every checkbox. */
6
6
  name?: string;
7
7
  /** Error text under the group. */
8
8
  errorMsg?: string;
9
+ /** Single checkbox: text beside the box. Leave it out for a bare box, and pass `aria-label` instead. */
10
+ label?: string;
11
+ /** Single checkbox: small muted text under the label. */
12
+ description?: string;
13
+ /** Single checkbox: can't be changed. */
14
+ disabled?: boolean;
15
+ /** Single checkbox: shows a dash for "some, but not all" (a select-all box). Ignored while checked. */
16
+ indeterminate?: boolean;
17
+ /** `small` is a 16px box for table cells and card headers; `normal` is 20px. */
18
+ size?: "small" | "normal";
9
19
  }
10
20
  declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
11
21
  props: import("vue").PublicProps & __VLS_PrettifyLocal<(Props<T> & {
22
+ /** The checked options' values. Bind with `v-model`. */
12
23
  modelValue?: T[];
24
+ /** Single checkbox state, used when `options` is left out. Bind with `v-model:checked`. Old cloud-ui SelectionCheckbox `v-model`. */
25
+ checked?: boolean;
13
26
  }) & {
14
27
  "onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
28
+ "onUpdate:checked"?: ((value: boolean) => any) | undefined;
15
29
  }> & (typeof globalThis extends {
16
30
  __VLS_PROPS_FALLBACK: infer P;
17
31
  } ? P : {});
18
32
  expose: (exposed: {}) => void;
19
33
  attrs: any;
20
34
  slots: {};
21
- emit: (event: "update:modelValue", value: T[]) => void;
35
+ emit: ((event: "update:modelValue", value: T[]) => void) & ((event: "update:checked", value: boolean) => void);
22
36
  }>) => import("vue").VNode & {
23
37
  __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
24
38
  };