@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
@@ -0,0 +1,5 @@
1
+ import e from "./AcBulkActionBar.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcBulkActionBar.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,43 @@
1
+ import type { Component } from "vue";
2
+ import type { Tone } from "./types";
3
+ export interface Props {
4
+ /** How many rows are selected. The bar slides in above 0 and is removed at 0. */
5
+ count: number;
6
+ /** Singular noun for one selected row, in lower case, e.g. "subnet" or "Postgres database". */
7
+ label: string;
8
+ /** Plural noun when it isn't `label` + "s", e.g. "backup policies". */
9
+ pluralLabel?: string;
10
+ /** Text of the batch action button. Pass an empty string to show only the `actions` slot. */
11
+ actionLabel?: string;
12
+ /** Colour of the batch action button, tinted (`light`). */
13
+ actionColor?: Tone;
14
+ /** Icon before the action text. Defaults to a bin when `actionColor` is `danger`, and no icon otherwise. */
15
+ actionIcon?: Component;
16
+ /** Shows a spinner on the action button and disables Clear while the batch request runs. Old cloud-ui `is-loading`. */
17
+ loading?: boolean;
18
+ }
19
+ type __VLS_Slots = {
20
+ /** Extra batch buttons, placed before the main action, e.g. a "Download" button. Use `size="small"` buttons. */
21
+ actions?: () => unknown;
22
+ };
23
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ clear: () => any;
25
+ action: () => any;
26
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
27
+ onClear?: (() => any) | undefined;
28
+ onAction?: (() => any) | undefined;
29
+ }>, {
30
+ loading: boolean;
31
+ actionLabel: string;
32
+ actionIcon: Component;
33
+ actionColor: Tone;
34
+ pluralLabel: string;
35
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,84 @@
1
+ import e from "./AcButton.js";
2
+ import { Fragment as t, Teleport as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeProps as p, openBlock as m, ref as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, watch as y, withCtx as b } from "vue";
3
+ import { Trash2 as x } from "@lucide/vue";
4
+ //#region src/lib/components/AcBulkActionBar.vue?vue&type=script&setup=true&lang.ts
5
+ var S = { class: "min-h-0 overflow-hidden" }, C = { class: "text-base text-heading" }, w = { class: "font-semibold tabular-nums" }, T = { class: "flex flex-wrap items-center gap-2" }, E = {
6
+ class: "sr-only",
7
+ role: "status",
8
+ "data-ac-ds": "",
9
+ "data-testid": "ac-bulk-action-bar-status"
10
+ }, D = "button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", O = /*@__PURE__*/ f({
11
+ inheritAttrs: !1,
12
+ __name: "AcBulkActionBar",
13
+ props: {
14
+ count: {},
15
+ label: {},
16
+ pluralLabel: { default: "" },
17
+ actionLabel: { default: "Delete" },
18
+ actionColor: { default: "danger" },
19
+ actionIcon: { default: void 0 },
20
+ loading: {
21
+ type: Boolean,
22
+ default: !1
23
+ }
24
+ },
25
+ emits: ["clear", "action"],
26
+ setup(f, { emit: O }) {
27
+ let k = f, A = O, j = h(null), M = h(""), N = i(() => k.count === 1 ? k.label : k.pluralLabel || `${k.label}s`), P = i(() => `${k.count} ${N.value} selected`), F = i(() => k.actionIcon ?? (k.actionColor === "danger" ? x : void 0));
28
+ function I() {
29
+ let e = j.value;
30
+ if (!e || !e.contains(document.activeElement)) return;
31
+ let t = [...document.querySelectorAll(D)].find((t) => !e.contains(t) && !!(e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING) && t.offsetParent !== null);
32
+ t ? t.focus() : document.activeElement?.blur();
33
+ }
34
+ return y(() => k.count, (e, t) => {
35
+ e <= 0 && t > 0 && I(), M.value = e > 0 ? P.value : t > 0 ? "Selection cleared" : "";
36
+ }), (i, h) => (m(), s(t, null, [d(r, {
37
+ "enter-active-class": "grid transition-[grid-template-rows,opacity,translate] duration-200 ease-out motion-reduce:transition-none",
38
+ "enter-from-class": "grid-rows-[0fr] -translate-y-1 opacity-0",
39
+ "enter-to-class": "grid-rows-[1fr]",
40
+ "leave-active-class": "grid transition-[grid-template-rows,opacity] duration-150 ease-in motion-reduce:transition-none",
41
+ "leave-from-class": "grid-rows-[1fr]",
42
+ "leave-to-class": "grid-rows-[0fr] opacity-0"
43
+ }, {
44
+ default: b(() => [f.count > 0 ? (m(), s("div", p({ key: 0 }, i.$attrs, {
45
+ "data-ac-ds": "",
46
+ "data-testid": "ac-bulk-action-bar"
47
+ }), [c("div", S, [c("div", {
48
+ ref_key: "bar",
49
+ ref: j,
50
+ role: "region",
51
+ "aria-label": "Bulk actions",
52
+ class: "flex flex-wrap items-center justify-between gap-x-3 gap-y-2 rounded-14 border border-primary/30 bg-primary/5 px-4 py-2.5"
53
+ }, [c("p", C, [c("span", w, v(f.count), 1), u(" " + v(N.value) + " selected ", 1)]), c("div", T, [
54
+ g(i.$slots, "actions"),
55
+ d(e, {
56
+ color: "ghost",
57
+ size: "small",
58
+ title: "Clear",
59
+ "aria-label": "Clear selection",
60
+ disabled: f.loading,
61
+ onClick: h[0] ||= (e) => A("clear")
62
+ }, null, 8, ["disabled"]),
63
+ f.actionLabel ? (m(), a(e, {
64
+ key: 0,
65
+ color: f.actionColor,
66
+ variant: "light",
67
+ size: "small",
68
+ loading: f.loading,
69
+ onClick: h[1] ||= (e) => A("action")
70
+ }, l({
71
+ default: b(() => [u(" " + v(f.actionLabel), 1)]),
72
+ _: 2
73
+ }, [F.value ? {
74
+ name: "icon",
75
+ fn: b(() => [(m(), a(_(F.value)))]),
76
+ key: "0"
77
+ } : void 0]), 1032, ["color", "loading"])) : o("", !0)
78
+ ])], 512)])], 16)) : o("", !0)]),
79
+ _: 3
80
+ }), (m(), a(n, { to: "body" }, [c("div", E, v(M.value), 1)]))], 64));
81
+ }
82
+ });
83
+ //#endregion
84
+ export { O as default };
@@ -4,11 +4,11 @@ export interface Props {
4
4
  title?: string;
5
5
  /** Colour of the button. `white` and `ghost` are neutral styles for secondary actions. */
6
6
  color?: Tone | "white" | "ghost";
7
- /** `solid` fill, `light` tinted fill (-95 background, -30 text) or `outlined` border. */
7
+ /** `solid` fill, `light` tinted fill (12% of the colour) or `outlined` border with a white fill. */
8
8
  variant?: Variant;
9
- /** Height and padding: `small` 28px, `normal` 32px, `medium` 40px. */
9
+ /** Height and padding: `small` 32px, `normal` 40px, `medium` 44px. */
10
10
  size?: "small" | "normal" | "medium";
11
- /** Shows a spinner, hides the label and blocks clicks. */
11
+ /** Shows a spinner before the label and blocks clicks. */
12
12
  loading?: boolean;
13
13
  /** Disables the button (50% opacity, no click events). */
14
14
  disabled?: boolean;
@@ -2,11 +2,11 @@ import e from "./AcSpinner.js";
2
2
  import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, normalizeClass as o, openBlock as s, renderSlot as c, resolveDynamicComponent as l, toDisplayString as u, withCtx as d } from "vue";
3
3
  //#region src/lib/components/AcButton.vue?vue&type=script&setup=true&lang.ts
4
4
  var f = {
5
- key: 0,
5
+ key: 1,
6
6
  class: "-ml-0.5 inline-flex shrink-0 items-center justify-center",
7
7
  "aria-hidden": "true"
8
- }, p = { key: 1 }, m = {
9
- key: 2,
8
+ }, p = { key: 2 }, m = {
9
+ key: 3,
10
10
  class: "-mr-0.5 inline-flex shrink-0 items-center justify-center",
11
11
  "aria-hidden": "true"
12
12
  }, h = /*@__PURE__*/ a({
@@ -31,35 +31,43 @@ var f = {
31
31
  setup(a, { emit: h }) {
32
32
  let g = a, _ = h, v = {
33
33
  primary: {
34
- solid: "bg-primary text-white border-black/15 shadow-button hover:bg-primary-hover",
35
- light: "bg-primary-95 text-primary-20 border-transparent hover:bg-primary-93",
36
- outlined: "bg-surface text-primary-20 border-[color-mix(in_srgb,var(--color-primary)_38%,var(--color-border))] shadow-xs hover:bg-primary-97 hover:border-[color-mix(in_srgb,var(--color-primary)_60%,var(--color-border))]"
34
+ solid: "border-transparent bg-primary text-white shadow-button hover:bg-primary-hover hover:shadow-md",
35
+ light: "border-transparent bg-primary/12 text-primary-strong hover:bg-primary/18",
36
+ outlined: "border-primary/40 bg-surface text-primary-strong hover:bg-primary/10"
37
37
  },
38
38
  info: {
39
- solid: "bg-info text-white border-black/15 shadow-button hover:bg-info-hover",
40
- light: "bg-blue-95 text-blue-30 border-transparent hover:bg-blue-93",
41
- outlined: "bg-surface text-blue-30 border-blue-80 shadow-xs hover:bg-blue-97"
39
+ solid: "border-transparent bg-info text-white shadow-button hover:bg-info-hover hover:shadow-md",
40
+ light: "border-transparent bg-info/12 text-info-strong hover:bg-info/18",
41
+ outlined: "border-info/40 bg-surface text-info-strong hover:bg-info/10"
42
42
  },
43
43
  success: {
44
- solid: "bg-success text-white border-black/15 shadow-button hover:bg-success-hover",
45
- light: "bg-green-95 text-green-20 border-transparent hover:bg-green-93",
46
- outlined: "bg-surface text-green-20 border-green-70 shadow-xs hover:bg-green-97"
44
+ solid: "border-transparent bg-success text-white shadow-button hover:bg-success-hover hover:shadow-md",
45
+ light: "border-transparent bg-success/12 text-success-strong hover:bg-success/18",
46
+ outlined: "border-success/40 bg-surface text-success-strong hover:bg-success/10"
47
47
  },
48
48
  warning: {
49
- solid: "bg-warning text-on-warning border-black/10 shadow-button hover:bg-warning-hover",
50
- light: "bg-yellow-95 text-yellow-20 border-transparent hover:bg-yellow-93",
51
- outlined: "bg-surface text-yellow-20 border-yellow-70 shadow-xs hover:bg-yellow-97"
49
+ solid: "border-transparent bg-warning text-on-warning shadow-button hover:bg-warning-hover hover:shadow-md",
50
+ light: "border-transparent bg-warning/12 text-warning-strong hover:bg-warning/18",
51
+ outlined: "border-warning/45 bg-surface text-warning-strong hover:bg-warning/10"
52
52
  },
53
53
  danger: {
54
- solid: "bg-danger text-white border-black/15 shadow-button hover:bg-danger-hover",
55
- light: "bg-red-95 text-red-30 border-transparent hover:bg-red-93",
56
- outlined: "bg-surface text-red-30 border-red-80 shadow-xs hover:bg-red-97"
54
+ solid: "border-transparent bg-danger text-white shadow-button hover:bg-danger-hover hover:shadow-md",
55
+ light: "border-transparent bg-danger/12 text-danger-strong hover:bg-danger/18",
56
+ outlined: "border-danger/40 bg-surface text-danger-strong hover:bg-danger/10"
57
57
  }
58
- }, y = t(() => g.color === "white" ? "bg-surface text-heading border-border shadow-xs hover:bg-surface-muted hover:border-border-dark" : g.color === "ghost" ? "bg-transparent text-body border-transparent hover:bg-surface-sunken hover:text-heading" : v[g.color][g.variant]), b = t(() => ({
59
- small: "h-7 gap-1.5 px-2.5 text-xs [&_svg]:size-3.5",
60
- normal: "h-8 gap-2 px-3.5 text-base [&_svg]:size-4",
61
- medium: "h-10 gap-2 px-5 text-lg [&_svg]:size-4"
62
- })[g.size]), x = (e) => {
58
+ }, y = {
59
+ primary: "focus-visible:ring-ring",
60
+ info: "focus-visible:ring-info",
61
+ success: "focus-visible:ring-success",
62
+ warning: "focus-visible:ring-warning",
63
+ danger: "focus-visible:ring-danger",
64
+ white: "focus-visible:ring-ring",
65
+ ghost: "focus-visible:ring-ring"
66
+ }, b = t(() => g.color === "white" ? "border-border bg-surface text-heading hover:bg-surface-sunken/70" : g.color === "ghost" ? "border-transparent bg-transparent text-heading hover:bg-surface-sunken" : v[g.color][g.variant]), x = t(() => ({
67
+ small: "h-8 gap-1.5 px-3 text-base [&_svg]:size-4",
68
+ normal: "h-10 gap-2 px-4 text-base [&_svg]:size-4",
69
+ medium: "h-11 gap-2 px-5 text-lg [&_svg]:size-4"
70
+ })[g.size]), S = (e) => {
63
71
  !g.disabled && !g.loading && _("click", e);
64
72
  };
65
73
  return (t, h) => (s(), n(l(a.href ? "a" : "button"), {
@@ -68,25 +76,25 @@ var f = {
68
76
  disabled: !a.href && a.disabled || void 0,
69
77
  "aria-disabled": a.href && a.disabled || void 0,
70
78
  "aria-busy": a.loading || void 0,
71
- class: o(["relative inline-flex cursor-pointer items-center justify-center rounded-6 border font-medium tracking-[-0.005em] whitespace-nowrap transition-[background-color,border-color,color,box-shadow,transform] duration-150 ease-out select-none focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring active:translate-y-px disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none disabled:active:translate-y-0 aria-disabled:pointer-events-none aria-disabled:opacity-50", [
72
- y.value,
79
+ class: o(["relative inline-flex cursor-pointer items-center justify-center rounded-10 border font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,transform] duration-200 select-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none active:translate-y-px disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none disabled:active:translate-y-0 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:active:translate-y-0", [
73
80
  b.value,
74
- a.loading && "text-transparent! pointer-events-none"
81
+ y[a.color],
82
+ x.value,
83
+ a.loading && "pointer-events-none"
75
84
  ]]),
76
85
  "data-ac-ds": "",
77
86
  "data-testid": "ac-button",
78
- onClick: x
87
+ onClick: S
79
88
  }, {
80
89
  default: d(() => [
81
- t.$slots.icon ? (s(), i("span", f, [c(t.$slots, "icon")])) : r("", !0),
82
- a.title ? (s(), i("span", p, u(a.title), 1)) : r("", !0),
83
- c(t.$slots, "default"),
84
- t.$slots["icon-right"] ? (s(), i("span", m, [c(t.$slots, "icon-right")])) : r("", !0),
85
90
  a.loading ? (s(), n(e, {
86
- key: 3,
87
- class: o(["absolute inset-0 m-auto", a.variant === "solid" && a.color !== "white" && a.color !== "ghost" ? "text-white" : "text-primary"]),
91
+ key: 0,
92
+ class: "-ml-0.5",
88
93
  label: ""
89
- }, null, 8, ["class"])) : r("", !0)
94
+ })) : t.$slots.icon ? (s(), i("span", f, [c(t.$slots, "icon")])) : r("", !0),
95
+ a.title ? (s(), i("span", p, u(a.title), 1)) : r("", !0),
96
+ c(t.$slots, "default"),
97
+ t.$slots["icon-right"] ? (s(), i("span", m, [c(t.$slots, "icon-right")])) : r("", !0)
90
98
  ]),
91
99
  _: 3
92
100
  }, 8, [
@@ -1,6 +1,6 @@
1
1
  import { computed as e, createElementBlock as t, defineComponent as n, normalizeClass as r, openBlock as i, renderSlot as a } from "vue";
2
2
  //#region src/lib/components/AcButtons.vue?vue&type=script&setup=true&lang.ts
3
- var o = ["aria-label"], s = "[&>*]:rounded-none [&>*:first-child]:rounded-l-6 [&>*:last-child]:rounded-r-6 [&>*:not(:first-child)]:-ml-px [&>*:hover]:z-[1] [&>*:focus-visible]:z-[2]", c = /*@__PURE__*/ n({
3
+ var o = ["aria-label"], s = "[&>*]:rounded-none [&>*:first-child]:rounded-l-10 [&>*:last-child]:rounded-r-10 [&>*:not(:first-child)]:-ml-px [&>*:hover]:z-[1] [&>*:focus-visible]:z-[2]", c = /*@__PURE__*/ n({
4
4
  __name: "AcButtons",
5
5
  props: {
6
6
  attached: {
@@ -1,9 +1,12 @@
1
+ import type { Component } from "vue";
1
2
  export interface Props {
2
- /** Header title. The header only renders with a title or `actions` slot. */
3
+ /** Header title. The header renders with a title, an `icon`, or the `actions` or `badges` slot. */
3
4
  title?: string;
4
5
  /** Small line under the title. */
5
6
  subtitle?: string;
6
- /** Adds 20px padding to the body. Turn off for flush tables; the body then clips to the card's rounded corners. */
7
+ /** A Lucide icon shown in a tinted 32px tile before the title. */
8
+ icon?: Component;
9
+ /** Adds 24px padding to the body. Turn off for flush tables; the body then clips to the card's rounded corners. */
7
10
  padded?: boolean;
8
11
  }
9
12
  type __VLS_Slots = {
@@ -11,9 +14,14 @@ type __VLS_Slots = {
11
14
  default?: () => unknown;
12
15
  /** Buttons on the right of the header. */
13
16
  actions?: () => unknown;
17
+ /** Badges or tags after the title. */
18
+ badges?: () => unknown;
19
+ /** A footer row under the body, e.g. a timestamp or a link. */
20
+ footer?: () => unknown;
14
21
  };
15
22
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
16
23
  title: string;
24
+ icon: Component;
17
25
  subtitle: string;
18
26
  padded: boolean;
19
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,28 +1,54 @@
1
- import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, renderSlot as o, toDisplayString as s } from "vue";
1
+ import { createBlock as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s, resolveDynamicComponent as c, toDisplayString as l, useSlots as u } from "vue";
2
2
  //#region src/lib/components/AcCard.vue?vue&type=script&setup=true&lang.ts
3
- var c = {
4
- class: "rounded-10 border border-border bg-surface shadow-xs",
3
+ var d = {
4
+ class: "rounded-14 border border-border bg-surface text-body",
5
5
  "data-ac-ds": "",
6
6
  "data-testid": "ac-card"
7
- }, l = {
7
+ }, f = {
8
8
  key: 0,
9
- class: "flex items-center justify-between gap-4 border-b border-border-light px-5 py-3.5"
10
- }, u = { class: "min-w-0" }, d = { class: "truncate" }, f = {
9
+ class: "flex flex-wrap items-start justify-between gap-3 border-b border-border px-6 pt-5 pb-3"
10
+ }, p = { class: "flex min-w-0 flex-1 items-center gap-3" }, m = {
11
11
  key: 0,
12
- class: "mt-0.5 truncate text-xs text-muted"
13
- }, p = { class: "flex shrink-0 items-center gap-2" }, m = /*@__PURE__*/ r({
12
+ class: "flex size-8 shrink-0 items-center justify-center rounded-10 border border-primary/25 bg-primary/10 text-primary-strong",
13
+ "aria-hidden": "true"
14
+ }, h = { class: "min-w-0 flex-1" }, g = { class: "flex flex-wrap items-center gap-2" }, _ = {
15
+ key: 0,
16
+ class: "truncate font-heading text-lg leading-tight font-semibold tracking-tight text-heading"
17
+ }, v = {
18
+ key: 0,
19
+ class: "mt-0.5 text-xs text-muted"
20
+ }, y = {
21
+ key: 0,
22
+ class: "flex shrink-0 flex-wrap items-center gap-2"
23
+ }, b = {
24
+ key: 1,
25
+ class: "flex flex-wrap items-center gap-3 border-t border-border px-6 py-3 text-base text-muted"
26
+ }, x = /*@__PURE__*/ i({
14
27
  __name: "AcCard",
15
28
  props: {
16
29
  title: { default: "" },
17
30
  subtitle: { default: "" },
31
+ icon: { default: void 0 },
18
32
  padded: {
19
33
  type: Boolean,
20
34
  default: !0
21
35
  }
22
36
  },
23
- setup(r) {
24
- return (m, h) => (a(), t("section", c, [r.title || m.$slots.actions ? (a(), t("header", l, [n("div", u, [n("h5", d, s(r.title), 1), r.subtitle ? (a(), t("p", f, s(r.subtitle), 1)) : e("", !0)]), n("div", p, [o(m.$slots, "actions")])])) : e("", !0), n("div", { class: i(r.padded ? "p-5" : ["overflow-hidden rounded-b-10", !(r.title || m.$slots.actions) && "rounded-t-10"]) }, [o(m.$slots, "default")], 2)]));
37
+ setup(i) {
38
+ let x = i, S = u();
39
+ function C() {
40
+ return !!(x.title || x.icon || S.actions || S.badges);
41
+ }
42
+ return (u, x) => (o(), n("section", d, [
43
+ C() ? (o(), n("header", f, [r("div", p, [i.icon ? (o(), n("span", m, [(o(), e(c(i.icon), { class: "size-4" }))])) : t("", !0), r("div", h, [r("div", g, [i.title ? (o(), n("h3", _, l(i.title), 1)) : t("", !0), s(u.$slots, "badges")]), i.subtitle ? (o(), n("p", v, l(i.subtitle), 1)) : t("", !0)])]), u.$slots.actions ? (o(), n("div", y, [s(u.$slots, "actions")])) : t("", !0)])) : t("", !0),
44
+ r("div", { class: a(i.padded ? "p-6" : [
45
+ "overflow-hidden",
46
+ !u.$slots.footer && "rounded-b-14",
47
+ !C() && "rounded-t-14"
48
+ ]) }, [s(u.$slots, "default")], 2),
49
+ u.$slots.footer ? (o(), n("footer", b, [s(u.$slots, "footer")])) : t("", !0)
50
+ ]));
25
51
  }
26
52
  });
27
53
  //#endregion
28
- export { m as default };
54
+ export { x as default };
@@ -113,6 +113,8 @@ export interface Props {
113
113
  emptyText?: string;
114
114
  /** Shows a placeholder bar while the value loads. */
115
115
  loading?: boolean;
116
+ /** Shows a status as a coloured dot and text without the pill, for dense tables (cloud-ui's `plain` status). */
117
+ plain?: boolean;
116
118
  }
117
119
  declare const _default: typeof __VLS_export;
118
120
  export default _default;
@@ -129,11 +131,12 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
129
131
  maxItems: number;
130
132
  tooltip: string;
131
133
  column: ResourceColumn;
132
- relative: boolean;
133
134
  emptyText: string;
134
135
  cell: ResourceCell;
135
136
  resolveLink: (link: string) => string;
136
137
  mono: boolean;
137
138
  maxWidth: string;
138
139
  unit: string;
140
+ relative: boolean;
141
+ plain: boolean;
139
142
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;