@ac-design/design-system 2.6.0 → 2.7.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 (52) hide show
  1. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +2 -2
  2. package/dist/lib/charts/graph.d.ts +9 -15
  3. package/dist/lib/charts/graph.js +79 -75
  4. package/dist/lib/charts/index.d.ts +4 -2
  5. package/dist/lib/charts/index.js +2 -1
  6. package/dist/lib/charts/nodeSymbol.d.ts +15 -0
  7. package/dist/lib/charts/nodeSymbol.js +27 -0
  8. package/dist/lib/charts/tree.d.ts +15 -0
  9. package/dist/lib/charts/tree.js +89 -0
  10. package/dist/lib/compat.css +119 -0
  11. package/dist/lib/components/AcAccordionItem.vue.d.ts +3 -1
  12. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +35 -26
  13. package/dist/lib/components/AcAlert.vue.d.ts +1 -1
  14. package/dist/lib/components/AcBadge.vue.d.ts +1 -1
  15. package/dist/lib/components/AcBanner.vue.d.ts +1 -1
  16. package/dist/lib/components/AcCard.vue.d.ts +1 -1
  17. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +2 -2
  18. package/dist/lib/components/AcCellValue.vue.d.ts +1 -1
  19. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +3 -3
  20. package/dist/lib/components/AcCheckList.vue.d.ts +1 -1
  21. package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
  22. package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
  23. package/dist/lib/components/AcFeatureCard.vue.d.ts +1 -1
  24. package/dist/lib/components/AcGraphChart.vue.d.ts +53 -3
  25. package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +401 -233
  26. package/dist/lib/components/AcList.js +5 -0
  27. package/dist/lib/components/AcList.vue.d.ts +56 -0
  28. package/dist/lib/components/AcList.vue_vue_type_script_setup_true_lang.js +74 -0
  29. package/dist/lib/components/AcListItem.js +5 -0
  30. package/dist/lib/components/AcListItem.vue.d.ts +53 -0
  31. package/dist/lib/components/AcListItem.vue_vue_type_script_setup_true_lang.js +105 -0
  32. package/dist/lib/components/AcMapChart.vue.d.ts +66 -3
  33. package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +403 -201
  34. package/dist/lib/components/AcMonthPicker.js +5 -0
  35. package/dist/lib/components/AcMonthPicker.vue.d.ts +102 -0
  36. package/dist/lib/components/AcMonthPicker.vue_vue_type_script_setup_true_lang.js +595 -0
  37. package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
  38. package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
  39. package/dist/lib/components/AcSideTabs.vue.d.ts +3 -1
  40. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +53 -33
  41. package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
  42. package/dist/lib/components/AcStatCard.vue.d.ts +1 -1
  43. package/dist/lib/components/AcTreeChart.js +5 -0
  44. package/dist/lib/components/AcTreeChart.vue.d.ts +135 -0
  45. package/dist/lib/components/AcTreeChart.vue_vue_type_script_setup_true_lang.js +809 -0
  46. package/dist/lib/components/AcUsageCard.vue.d.ts +1 -1
  47. package/dist/lib/components/index.d.ts +5 -2
  48. package/dist/lib/composables/copyText.d.ts +5 -1
  49. package/dist/lib/composables/copyText.js +15 -3
  50. package/dist/lib/index.d.ts +3 -0
  51. package/dist/lib/index.js +85 -81
  52. package/package.json +1 -1
@@ -16,6 +16,7 @@ code:is([data-ac-ds], [data-ac-ds] *), kbd:is([data-ac-ds], [data-ac-ds] *), sam
16
16
  --font-sans: "Roboto Variable", "Roboto", ui-sans-serif, system-ui, sans-serif;
17
17
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
18
18
  --spacing: calc(4px * var(--ac-scale));
19
+ --container-xs: 320px;
19
20
  --container-sm: 384px;
20
21
  --container-md: 448px;
21
22
  --container-xl: 576px;
@@ -371,6 +372,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
371
372
  .inset-y-0:where([data-ac-ds], [data-ac-ds] *) {
372
373
  inset-block: 0px !important;
373
374
  }
375
+ .start-0:where([data-ac-ds], [data-ac-ds] *) {
376
+ inset-inline-start: calc(var(--spacing) * 0) !important;
377
+ }
374
378
  .-top-1:where([data-ac-ds], [data-ac-ds] *) {
375
379
  top: calc(var(--spacing) * -1) !important;
376
380
  }
@@ -455,6 +459,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
455
459
  .bottom-0:where([data-ac-ds], [data-ac-ds] *) {
456
460
  bottom: 0px !important;
457
461
  }
462
+ .bottom-1\.5:where([data-ac-ds], [data-ac-ds] *) {
463
+ bottom: calc(var(--spacing) * 1.5) !important;
464
+ }
458
465
  .bottom-2:where([data-ac-ds], [data-ac-ds] *) {
459
466
  bottom: calc(var(--spacing) * 2) !important;
460
467
  }
@@ -1188,6 +1195,12 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
1188
1195
  .w-72:where([data-ac-ds], [data-ac-ds] *) {
1189
1196
  width: calc(var(--spacing) * 72) !important;
1190
1197
  }
1198
+ .w-\[3ch\]:where([data-ac-ds], [data-ac-ds] *) {
1199
+ width: 3ch !important;
1200
+ }
1201
+ .w-\[3px\]:where([data-ac-ds], [data-ac-ds] *) {
1202
+ width: 3px !important;
1203
+ }
1191
1204
  .w-\[34px\]:where([data-ac-ds], [data-ac-ds] *) {
1192
1205
  width: 34px !important;
1193
1206
  }
@@ -1197,6 +1210,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
1197
1210
  .w-\[calc\(100\%-52px\)\]:where([data-ac-ds], [data-ac-ds] *) {
1198
1211
  width: calc(100% - 52px) !important;
1199
1212
  }
1213
+ .w-\[calc\(296px\*var\(--ac-scale\)\)\]:where([data-ac-ds], [data-ac-ds] *) {
1214
+ width: calc(296px * var(--ac-scale)) !important;
1215
+ }
1200
1216
  .w-\[calc\(320px\*var\(--ac-scale\)\)\]:where([data-ac-ds], [data-ac-ds] *) {
1201
1217
  width: calc(320px * var(--ac-scale)) !important;
1202
1218
  }
@@ -1242,6 +1258,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
1242
1258
  .max-w-48:where([data-ac-ds], [data-ac-ds] *) {
1243
1259
  max-width: calc(var(--spacing) * 48) !important;
1244
1260
  }
1261
+ .max-w-60:where([data-ac-ds], [data-ac-ds] *) {
1262
+ max-width: calc(var(--spacing) * 60) !important;
1263
+ }
1245
1264
  .max-w-64:where([data-ac-ds], [data-ac-ds] *) {
1246
1265
  max-width: calc(var(--spacing) * 64) !important;
1247
1266
  }
@@ -1299,6 +1318,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
1299
1318
  .max-w-xl:where([data-ac-ds], [data-ac-ds] *) {
1300
1319
  max-width: var(--container-xl) !important;
1301
1320
  }
1321
+ .max-w-xs:where([data-ac-ds], [data-ac-ds] *) {
1322
+ max-width: var(--container-xs) !important;
1323
+ }
1302
1324
  .min-w-0:where([data-ac-ds], [data-ac-ds] *) {
1303
1325
  min-width: 0px !important;
1304
1326
  }
@@ -1365,6 +1387,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
1365
1387
  .basis-\[80px\]:where([data-ac-ds], [data-ac-ds] *) {
1366
1388
  flex-basis: 80px !important;
1367
1389
  }
1390
+ .basis-\[220px\]:where([data-ac-ds], [data-ac-ds] *) {
1391
+ flex-basis: 220px !important;
1392
+ }
1368
1393
  .basis-\[240px\]:where([data-ac-ds], [data-ac-ds] *) {
1369
1394
  flex-basis: 240px !important;
1370
1395
  }
@@ -1849,6 +1874,10 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
1849
1874
  .rounded-full:where([data-ac-ds], [data-ac-ds] *) {
1850
1875
  border-radius: calc(infinity * 1px) !important;
1851
1876
  }
1877
+ .rounded-e-full:where([data-ac-ds], [data-ac-ds] *) {
1878
+ border-start-end-radius: calc(infinity * 1px) !important;
1879
+ border-end-end-radius: calc(infinity * 1px) !important;
1880
+ }
1852
1881
  .rounded-t-8:where([data-ac-ds], [data-ac-ds] *) {
1853
1882
  border-top-left-radius: var(--radius-8) !important;
1854
1883
  border-top-right-radius: var(--radius-8) !important;
@@ -3419,6 +3448,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
3419
3448
  color: color-mix(in oklab, var(--color-info) 5%, transparent) !important;
3420
3449
  }
3421
3450
  }
3451
+ .text-inherit:where([data-ac-ds], [data-ac-ds] *) {
3452
+ color: inherit !important;
3453
+ }
3422
3454
  .text-muted:where([data-ac-ds], [data-ac-ds] *) {
3423
3455
  color: var(--color-muted) !important;
3424
3456
  }
@@ -4168,9 +4200,27 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
4168
4200
  .group-focus-visible\/thumb\:opacity-100:is(:where(.group\/thumb):focus-visible *):where([data-ac-ds], [data-ac-ds] *) {
4169
4201
  opacity: 100% !important;
4170
4202
  }
4203
+ .group-aria-pressed\/row\:block:is(:where(.group\/row)[aria-pressed="true"] *):where([data-ac-ds], [data-ac-ds] *) {
4204
+ display: block !important;
4205
+ }
4206
+ .group-aria-pressed\/row\:text-primary:is(:where(.group\/row)[aria-pressed="true"] *):where([data-ac-ds], [data-ac-ds] *) {
4207
+ color: var(--color-primary) !important;
4208
+ }
4171
4209
  .group-aria-\[current\=page\]\:text-primary\!:is(:where(.group)[aria-current="page"] *):where([data-ac-ds], [data-ac-ds] *) {
4172
4210
  color: var(--color-primary) !important;
4173
4211
  }
4212
+ .group-aria-\[current\=page\]\/row\:block:is(:where(.group\/row)[aria-current="page"] *):where([data-ac-ds], [data-ac-ds] *) {
4213
+ display: block !important;
4214
+ }
4215
+ .group-aria-\[current\=page\]\/row\:text-primary:is(:where(.group\/row)[aria-current="page"] *):where([data-ac-ds], [data-ac-ds] *) {
4216
+ color: var(--color-primary) !important;
4217
+ }
4218
+ .group-aria-\[current\=true\]\/row\:block:is(:where(.group\/row)[aria-current="true"] *):where([data-ac-ds], [data-ac-ds] *) {
4219
+ display: block !important;
4220
+ }
4221
+ .group-aria-\[current\=true\]\/row\:text-primary:is(:where(.group\/row)[aria-current="true"] *):where([data-ac-ds], [data-ac-ds] *) {
4222
+ color: var(--color-primary) !important;
4223
+ }
4174
4224
  .peer-checked\:scale-100:is(:where(.peer):checked ~ *):where([data-ac-ds], [data-ac-ds] *) {
4175
4225
  --tw-scale-x: 100% !important;
4176
4226
  --tw-scale-y: 100% !important;
@@ -4278,6 +4328,12 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
4278
4328
  background-color: color-mix(in oklab, var(--color-danger) 10%, transparent) !important;
4279
4329
  }
4280
4330
  }
4331
+ .focus-within\:bg-surface-sunken:focus-within:where([data-ac-ds], [data-ac-ds] *) {
4332
+ background-color: var(--color-surface-sunken) !important;
4333
+ }
4334
+ .focus-within\:text-heading:focus-within:where([data-ac-ds], [data-ac-ds] *) {
4335
+ color: var(--color-heading) !important;
4336
+ }
4281
4337
  .focus-within\:shadow-\[0_0_0_2px_color-mix\(in_srgb\,var\(--color-danger\)_20\%\,transparent\)\]:focus-within:where([data-ac-ds], [data-ac-ds] *) {
4282
4338
  --tw-shadow: 0 0 0 2px var(--tw-shadow-color, color-mix(in srgb,#ef4444 20%,transparent)) !important;
4283
4339
  @supports (color: color-mix(in lab, red, red)) {
@@ -4292,6 +4348,13 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
4292
4348
  }
4293
4349
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
4294
4350
  }
4351
+ .focus-within\:ring-2:focus-within:where([data-ac-ds], [data-ac-ds] *) {
4352
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor) !important;
4353
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
4354
+ }
4355
+ .focus-within\:ring-ring:focus-within:where([data-ac-ds], [data-ac-ds] *) {
4356
+ --tw-ring-color: var(--color-ring) !important;
4357
+ }
4295
4358
  @media (hover: hover) {
4296
4359
  .hover\:-translate-y-0\.5:hover:where([data-ac-ds], [data-ac-ds] *) {
4297
4360
  --tw-translate-y: calc(var(--spacing) * -0.5) !important;
@@ -4955,6 +5018,12 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
4955
5018
  .has-\[\[data-ac-card-link\]\:focus-visible\]\:ring-offset-surface:has(:is([data-ac-card-link]:focus-visible)):where([data-ac-ds], [data-ac-ds] *) {
4956
5019
  --tw-ring-offset-color: var(--color-surface) !important;
4957
5020
  }
5021
+ .has-\[\[data-accordion-trigger\]\:enabled\:hover\]\:bg-accent-hover\/60:has(:is([data-accordion-trigger]:enabled:hover)):where([data-ac-ds], [data-ac-ds] *) {
5022
+ background-color: color-mix(in srgb, #f2f9fd 60%, transparent) !important;
5023
+ @supports (color: color-mix(in lab, red, red)) {
5024
+ background-color: color-mix(in oklab, var(--color-accent-hover) 60%, transparent) !important;
5025
+ }
5026
+ }
4958
5027
  .has-\[img\]\:border:has(:is(img)):where([data-ac-ds], [data-ac-ds] *) {
4959
5028
  border-style: var(--tw-border-style) !important;
4960
5029
  border-width: 1px !important;
@@ -5008,6 +5077,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
5008
5077
  .aria-disabled\:opacity-50[aria-disabled="true"]:where([data-ac-ds], [data-ac-ds] *) {
5009
5078
  opacity: 50% !important;
5010
5079
  }
5080
+ .aria-pressed\:bg-accent[aria-pressed="true"]:where([data-ac-ds], [data-ac-ds] *) {
5081
+ background-color: var(--color-accent) !important;
5082
+ }
5011
5083
  .aria-\[current\=page\]\:border-primary\/35[aria-current="page"]:where([data-ac-ds], [data-ac-ds] *) {
5012
5084
  border-color: color-mix(in srgb, hsl(var(--primary-hue) var(--primary-saturation) var(--primary-light)) 35%, transparent) !important;
5013
5085
  @supports (color: color-mix(in lab, red, red)) {
@@ -5039,6 +5111,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
5039
5111
  --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-primary) 10%, transparent) var(--tw-shadow-alpha), transparent) !important;
5040
5112
  }
5041
5113
  }
5114
+ .aria-\[current\=true\]\:bg-accent[aria-current="true"]:where([data-ac-ds], [data-ac-ds] *) {
5115
+ background-color: var(--color-accent) !important;
5116
+ }
5042
5117
  @media (prefers-reduced-motion: no-preference) {
5043
5118
  .motion-safe\:-translate-x-1:where([data-ac-ds], [data-ac-ds] *) {
5044
5119
  --tw-translate-x: calc(var(--spacing) * -1) !important;
@@ -5497,7 +5572,51 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
5497
5572
  display: none !important;
5498
5573
  }
5499
5574
  }
5575
+ @container (width < 448px) {
5576
+ .\@max-md\:-mt-1:where([data-ac-ds], [data-ac-ds] *) {
5577
+ margin-top: calc(var(--spacing) * -1) !important;
5578
+ }
5579
+ .\@max-md\:-mt-2:where([data-ac-ds], [data-ac-ds] *) {
5580
+ margin-top: calc(var(--spacing) * -2) !important;
5581
+ }
5582
+ .\@max-md\:w-full:where([data-ac-ds], [data-ac-ds] *) {
5583
+ width: 100% !important;
5584
+ }
5585
+ .\@max-md\:basis-full:where([data-ac-ds], [data-ac-ds] *) {
5586
+ flex-basis: 100% !important;
5587
+ }
5588
+ .\@max-md\:flex-wrap:where([data-ac-ds], [data-ac-ds] *) {
5589
+ flex-wrap: wrap !important;
5590
+ }
5591
+ .\@max-md\:pb-3:where([data-ac-ds], [data-ac-ds] *) {
5592
+ padding-bottom: calc(var(--spacing) * 3) !important;
5593
+ }
5594
+ .\@max-md\:pb-4:where([data-ac-ds], [data-ac-ds] *) {
5595
+ padding-bottom: calc(var(--spacing) * 4) !important;
5596
+ }
5597
+ .\@max-md\:pl-8:where([data-ac-ds], [data-ac-ds] *) {
5598
+ padding-left: calc(var(--spacing) * 8) !important;
5599
+ }
5600
+ .\@max-md\:pl-12:where([data-ac-ds], [data-ac-ds] *) {
5601
+ padding-left: calc(var(--spacing) * 12) !important;
5602
+ }
5603
+ }
5500
5604
  @container (width >= 512px) {
5605
+ .\@lg\:w-2\/5:where([data-ac-ds], [data-ac-ds] *) {
5606
+ width: calc(2 / 5 * 100%) !important;
5607
+ }
5608
+ .\@lg\:max-w-\[240px\]:where([data-ac-ds], [data-ac-ds] *) {
5609
+ max-width: 240px !important;
5610
+ }
5611
+ .\@lg\:shrink-0:where([data-ac-ds], [data-ac-ds] *) {
5612
+ flex-shrink: 0 !important;
5613
+ }
5614
+ .\@lg\:flex-row:where([data-ac-ds], [data-ac-ds] *) {
5615
+ flex-direction: row !important;
5616
+ }
5617
+ .\@lg\:items-center:where([data-ac-ds], [data-ac-ds] *) {
5618
+ align-items: center !important;
5619
+ }
5501
5620
  .\@lg\:gap-x-2:where([data-ac-ds], [data-ac-ds] *) {
5502
5621
  column-gap: calc(var(--spacing) * 2) !important;
5503
5622
  }
@@ -14,12 +14,14 @@ type __VLS_Props = Props;
14
14
  type __VLS_Slots = {
15
15
  /** The panel content, shown when open. */
16
16
  default?: () => unknown;
17
- /** Replaces the `title` text. Keep it to text and inline badges; it sits inside the header button. */
17
+ /** Replaces the `title` text. Keep it to text and inline badges; it sits inside the header button. Put buttons in `actions`. */
18
18
  title?: () => unknown;
19
19
  /** Replaces the `description` text. */
20
20
  description?: () => unknown;
21
21
  /** A 16px icon before the title, shown in a tinted 32px tile. */
22
22
  icon?: () => unknown;
23
+ /** Buttons at the right of the header, e.g. Edit and Delete. They sit beside the header button, not in it, so clicking them doesn't open or close the item. The chevron moves to the start of the header; below 448px the actions wrap under the title. */
24
+ actions?: () => unknown;
23
25
  };
24
26
  type __VLS_ModelProps = {
25
27
  /** Whether the item is open. Use `v-model:open` for a single item outside an AcAccordion. */
@@ -1,5 +1,5 @@
1
- import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, inject as c, mergeModels as l, normalizeClass as u, openBlock as d, renderSlot as f, resolveDynamicComponent as p, toDisplayString as m, unref as h, useId as g, useModel as _, watch as v, withCtx as y } from "vue";
2
- import { ChevronDown as b } from "@lucide/vue";
1
+ import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, inject as s, mergeModels as c, normalizeClass as l, openBlock as u, renderSlot as d, resolveDynamicComponent as f, toDisplayString as p, unref as m, useId as h, useModel as g, watch as _, withCtx as v } from "vue";
2
+ import { ChevronDown as y, ChevronRight as b } from "@lucide/vue";
3
3
  //#region src/lib/components/AcAccordionItem.vue?vue&type=script&setup=true&lang.ts
4
4
  var x = [
5
5
  "id",
@@ -7,7 +7,7 @@ var x = [
7
7
  "aria-controls",
8
8
  "disabled"
9
9
  ], S = {
10
- key: 0,
10
+ key: 1,
11
11
  class: "inline-flex size-8 shrink-0 items-center justify-center rounded-10 border border-primary/25 bg-primary/10 text-primary-strong [&_svg]:size-4",
12
12
  "aria-hidden": "true"
13
13
  }, C = { class: "min-w-0 flex-1" }, w = { class: "block text-lg leading-6 font-semibold tracking-tight text-heading" }, T = {
@@ -17,9 +17,9 @@ var x = [
17
17
  "id",
18
18
  "aria-labelledby",
19
19
  "inert"
20
- ], D = /*@__PURE__*/ s({
20
+ ], D = /*@__PURE__*/ o({
21
21
  __name: "AcAccordionItem",
22
- props: /*@__PURE__*/ l({
22
+ props: /*@__PURE__*/ c({
23
23
  value: { default: void 0 },
24
24
  title: { default: "" },
25
25
  description: { default: "" },
@@ -35,46 +35,55 @@ var x = [
35
35
  },
36
36
  openModifiers: {}
37
37
  }),
38
- emits: /*@__PURE__*/ l(["toggle"], ["update:open"]),
39
- setup(s, { emit: l }) {
40
- let D = s, O = _(s, "open"), k = l, A = c("ac-accordion", null), j = g(), M = e(() => D.value ?? j), N = e(() => A ? A.isOpen(M.value) : O.value), P = e(() => D.headingLevel ?? A?.headingLevel.value ?? 3), F = e(() => A?.variant.value ?? "separated");
38
+ emits: /*@__PURE__*/ c(["toggle"], ["update:open"]),
39
+ setup(o, { emit: c }) {
40
+ let D = o, O = g(o, "open"), k = c, A = s("ac-accordion", null), j = h(), M = e(() => D.value ?? j), N = e(() => A ? A.isOpen(M.value) : O.value), P = e(() => D.headingLevel ?? A?.headingLevel.value ?? 3), F = e(() => A?.variant.value ?? "separated");
41
41
  function I() {
42
42
  if (D.disabled) return;
43
43
  let e = !N.value;
44
44
  A ? A.toggle(M.value) : O.value = e, k("toggle", e);
45
45
  }
46
- return v(N, (e) => {
46
+ return _(N, (e) => {
47
47
  A && (O.value = e);
48
- }), (e, c) => (d(), r("div", {
49
- class: u(F.value === "separated" && "overflow-hidden rounded-14 border border-border bg-surface"),
48
+ }), (e, s) => (u(), r("div", {
49
+ class: l([F.value === "separated" && "overflow-hidden rounded-14 border border-border bg-surface", e.$slots.actions && "@container"]),
50
50
  "data-ac-ds": "",
51
51
  "data-testid": "ac-accordion-item"
52
- }, [(d(), t(p(`h${P.value}`), { class: "m-0 text-base leading-5 font-normal tracking-normal" }, {
53
- default: y(() => [i("button", {
54
- id: `${h(j)}-trigger`,
52
+ }, [i("div", { class: l(["flex items-center", e.$slots.actions && "transition-colors duration-200 @max-md:flex-wrap has-[[data-accordion-trigger]:enabled:hover]:bg-accent-hover/60"]) }, [(u(), t(f(`h${P.value}`), { class: "m-0 min-w-0 flex-1 text-base leading-5 font-normal tracking-normal @max-md:basis-full" }, {
53
+ default: v(() => [i("button", {
54
+ id: `${m(j)}-trigger`,
55
55
  type: "button",
56
56
  "data-accordion-trigger": "",
57
57
  "aria-expanded": N.value,
58
- "aria-controls": `${h(j)}-panel`,
59
- disabled: s.disabled,
60
- class: u(["flex w-full cursor-pointer items-center gap-3 text-left transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:cursor-not-allowed disabled:opacity-50", [F.value === "flush" ? "px-1 py-3" : "px-5 py-4", !s.disabled && "hover:bg-accent-hover/60"]]),
58
+ "aria-controls": `${m(j)}-panel`,
59
+ disabled: o.disabled,
60
+ class: l(["flex w-full cursor-pointer items-center gap-3 text-left transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:cursor-not-allowed disabled:opacity-50", [F.value === "flush" ? "px-1 py-3" : "px-5 py-4", !o.disabled && !e.$slots.actions && "hover:bg-accent-hover/60"]]),
61
61
  onClick: I
62
62
  }, [
63
- e.$slots.icon ? (d(), r("span", S, [f(e.$slots, "icon")])) : n("", !0),
64
- i("span", C, [i("span", w, [f(e.$slots, "title", {}, () => [a(m(s.title), 1)])]), s.description || e.$slots.description ? (d(), r("span", T, [f(e.$slots, "description", {}, () => [a(m(s.description), 1)])])) : n("", !0)]),
65
- o(h(b), {
66
- class: u(["size-4 shrink-0 text-muted transition-transform duration-200 ease-out-soft motion-reduce:transition-none", N.value && "rotate-180 text-heading"]),
63
+ e.$slots.actions ? (u(), t(m(b), {
64
+ key: 0,
65
+ class: l(["size-4 shrink-0 text-muted transition-transform duration-200 ease-out-soft motion-reduce:transition-none", N.value && "rotate-90 text-heading"]),
66
+ "aria-hidden": "true"
67
+ }, null, 8, ["class"])) : n("", !0),
68
+ e.$slots.icon ? (u(), r("span", S, [d(e.$slots, "icon")])) : n("", !0),
69
+ i("span", C, [i("span", w, [d(e.$slots, "title", {}, () => [a(p(o.title), 1)])]), o.description || e.$slots.description ? (u(), r("span", T, [d(e.$slots, "description", {}, () => [a(p(o.description), 1)])])) : n("", !0)]),
70
+ e.$slots.actions ? n("", !0) : (u(), t(m(y), {
71
+ key: 2,
72
+ class: l(["size-4 shrink-0 text-muted transition-transform duration-200 ease-out-soft motion-reduce:transition-none", N.value && "rotate-180 text-heading"]),
67
73
  "aria-hidden": "true"
68
- }, null, 8, ["class"])
74
+ }, null, 8, ["class"]))
69
75
  ], 10, x)]),
70
76
  _: 3
71
- })), i("div", { class: u(["grid transition-[grid-template-rows] duration-200 ease-out-soft motion-reduce:transition-none", N.value ? "grid-rows-[1fr]" : "grid-rows-[0fr]"]) }, [i("div", {
72
- id: `${h(j)}-panel`,
77
+ })), e.$slots.actions ? (u(), r("div", {
78
+ key: 0,
79
+ class: l(["flex shrink-0 flex-wrap items-center gap-1.5 @max-md:w-full", F.value === "flush" ? "pr-1 @max-md:-mt-1 @max-md:pb-3 @max-md:pl-8" : "pr-5 @max-md:-mt-2 @max-md:pb-4 @max-md:pl-12"])
80
+ }, [d(e.$slots, "actions")], 2)) : n("", !0)], 2), i("div", { class: l(["grid transition-[grid-template-rows] duration-200 ease-out-soft motion-reduce:transition-none", N.value ? "grid-rows-[1fr]" : "grid-rows-[0fr]"]) }, [i("div", {
81
+ id: `${m(j)}-panel`,
73
82
  role: "region",
74
- "aria-labelledby": `${h(j)}-trigger`,
83
+ "aria-labelledby": `${m(j)}-trigger`,
75
84
  inert: !N.value || void 0,
76
85
  class: "min-h-0 overflow-hidden"
77
- }, [i("div", { class: u(["pt-0.5 text-base text-body", F.value === "flush" ? "px-1 pb-4" : "px-5 pb-5"]) }, [f(e.$slots, "default")], 2)], 8, E)], 2)], 2));
86
+ }, [i("div", { class: l(["pt-0.5 text-base text-body", F.value === "flush" ? "px-1 pb-4" : "px-5 pb-5"]) }, [d(e.$slots, "default")], 2)], 8, E)], 2)], 2));
78
87
  }
79
88
  });
80
89
  //#endregion
@@ -41,8 +41,8 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
41
41
  }>, {
42
42
  variant: "tinted" | "callout";
43
43
  title: string;
44
- icon: Component;
45
44
  color: Tone | "neutral";
45
+ icon: Component;
46
46
  size: "normal" | "small";
47
47
  loading: boolean;
48
48
  dismissible: boolean;
@@ -27,8 +27,8 @@ type __VLS_Slots = {
27
27
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
28
28
  variant: Variant;
29
29
  label: string;
30
- icon: Component;
31
30
  color: Tone | "pending" | "default" | "secondary" | "dark";
31
+ icon: Component;
32
32
  status: string | null;
33
33
  rounded: boolean;
34
34
  dot: boolean;
@@ -40,8 +40,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
40
40
  }>, {
41
41
  variant: "subtle" | "solid";
42
42
  title: string;
43
- icon: Component;
44
43
  color: "info" | "warning" | "danger" | "primary" | "neutral";
44
+ icon: Component;
45
45
  dismissible: boolean;
46
46
  hideIcon: boolean;
47
47
  actionLabel: string;
@@ -49,8 +49,8 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
49
49
  variant: "default" | "muted" | "dashed" | "danger";
50
50
  title: string;
51
51
  description: string;
52
- icon: Component;
53
52
  color: "primary" | "blue" | "violet" | "red" | "amber";
53
+ icon: Component;
54
54
  subtitle: string;
55
55
  padded: boolean;
56
56
  padding: "none" | "xs" | "sm" | "md" | "lg";
@@ -12,7 +12,7 @@ var g = {
12
12
  class: "mt-0.5 text-xs leading-4 text-muted"
13
13
  }, b = {
14
14
  key: 1,
15
- class: "flex shrink-0 flex-wrap items-center gap-2"
15
+ class: "flex max-w-full min-w-0 shrink-0 flex-wrap items-center gap-2"
16
16
  }, x = /*@__PURE__*/ c({
17
17
  __name: "AcCard",
18
18
  props: {
@@ -203,7 +203,7 @@ var g = {
203
203
  key: 1,
204
204
  class: l(["absolute -top-4 -right-4 [&_svg]:size-24!", M.value.watermark])
205
205
  }, [d(e.$slots, "icon")], 2))])) : i("", !0),
206
- o("div", { class: l(["flex min-w-0 flex-1 items-center", A.value ? "gap-2.5" : "gap-3"]) }, [c.icon || e.$slots.icon ? (u(), a("span", {
206
+ o("div", { class: l(["flex min-w-0 flex-1 basis-[220px] items-center", A.value ? "gap-2.5" : "gap-3"]) }, [c.icon || e.$slots.icon ? (u(), a("span", {
207
207
  key: 0,
208
208
  class: l(["flex shrink-0 items-center justify-center", [
209
209
  M.value.tile,
@@ -123,9 +123,9 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
123
123
  bold: boolean;
124
124
  title: string;
125
125
  value: undefined;
126
- icon: string;
127
126
  color: string;
128
127
  href: string;
128
+ icon: string;
129
129
  align: "left" | "center" | "right";
130
130
  maxWidth: string;
131
131
  tooltip: string;
@@ -338,12 +338,12 @@ var A = /*@__PURE__*/ f({
338
338
  _: 1
339
339
  }, 8, ["content"])) : G.value === "labels" || G.value === "array" ? (h(), l("span", {
340
340
  key: 6,
341
- class: m(["flex w-max min-w-0 items-center gap-2", M.value ? "flex-wrap" : "flex-nowrap"]),
341
+ class: "flex max-w-full min-w-0 flex-wrap items-center gap-1.5",
342
342
  style: ae({ maxWidth: f.maxWidth })
343
343
  }, [(h(!0), l(a, null, ce(Ve.value, (t, n) => (h(), s(e, {
344
344
  key: `${t.text}-${n}`,
345
345
  content: t.text.length > 28 && !M.value ? t.text : "",
346
- class: m(!M.value && "max-w-48 min-w-0")
346
+ class: m(["max-w-full min-w-0", !M.value && "max-w-60"])
347
347
  }, {
348
348
  default: x(() => [u("span", be, [G.value === "labels" ? (h(), s(y(pe), {
349
349
  key: 0,
@@ -358,7 +358,7 @@ var A = /*@__PURE__*/ f({
358
358
  "aria-expanded": M.value,
359
359
  "aria-label": M.value ? `Show fewer ${Ge.value}` : `Show ${X.value} more ${Ge.value}`,
360
360
  onClick: o[2] ||= S((e) => M.value = !M.value, ["stop"])
361
- }, v(M.value ? "Show less" : `+${X.value} more`), 9, Se)) : c("", !0)], 6)) : (h(), s(e, {
361
+ }, v(M.value ? "Show less" : `+${X.value} more`), 9, Se)) : c("", !0)], 4)) : (h(), s(e, {
362
362
  key: 7,
363
363
  content: ze.value,
364
364
  class: "min-w-0"
@@ -28,8 +28,8 @@ type __VLS_Slots = {
28
28
  }) => unknown;
29
29
  };
30
30
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
31
- icon: Component;
32
31
  color: Tone | "muted";
32
+ icon: Component;
33
33
  size: "small" | "normal";
34
34
  items: (string | CheckListItem)[];
35
35
  muted: boolean;
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
39
39
  }>, {
40
40
  title: string;
41
41
  description: string;
42
- icon: Component;
43
42
  color: Tone;
43
+ icon: Component;
44
44
  loading: boolean;
45
45
  confirmLabel: string;
46
46
  confirmText: string;
@@ -33,10 +33,10 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
33
33
  label: string;
34
34
  description: string;
35
35
  disabled: boolean;
36
- icon: Component;
37
36
  target: string;
38
37
  href: string;
39
38
  to: string | Record<string, unknown>;
39
+ icon: Component;
40
40
  danger: boolean;
41
41
  shortcut: string;
42
42
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -66,10 +66,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
66
66
  required: boolean;
67
67
  description: string;
68
68
  disabled: boolean;
69
- icon: Component;
70
69
  target: string;
71
70
  href: string;
72
71
  to: string | Record<string, unknown>;
72
+ icon: Component;
73
73
  status: string;
74
74
  subtitle: string;
75
75
  hoverable: boolean;
@@ -11,6 +11,8 @@ export interface GraphNode {
11
11
  label: string;
12
12
  /** Resource type, e.g. "Load balancer". Shown under the label, in the legend and in the tooltip. */
13
13
  kind?: string;
14
+ /** Second line under the name in place of the kind, e.g. `10.0.1.0/24` or "in public-a". The kind stays in the tooltip and legend. */
15
+ sublabel?: string;
14
16
  /** A Lucide icon component, or 1–3 characters of text, drawn in the node. Overrides `kindIcons`. */
15
17
  icon?: Component | string;
16
18
  /** Colours the ring. `warning` and `danger` also add a `!` badge. */
@@ -19,9 +21,26 @@ export interface GraphNode {
19
21
  statusText?: string;
20
22
  /** A sentence for the tooltip, e.g. the CIDR or the instance size. */
21
23
  description?: string;
22
- /** Nodes with the same group are drawn inside one labelled box, e.g. a subnet. */
24
+ /** Nodes with the same group are drawn inside one labelled box, e.g. a subnet. Name, colour and nesting come from the `groups` prop. */
23
25
  group?: string;
24
26
  }
27
+ /** Line pattern of a link. */
28
+ export type GraphLinkStyle = "solid" | "dashed" | "dotted";
29
+ /** What a selected or hovered node lights up: its direct links, or the whole path through it. */
30
+ export type GraphHighlight = "neighbors" | "path";
31
+ /** A labelled box around the nodes whose `group` is its `id`, e.g. a VPC or a subnet. */
32
+ export interface GraphGroup {
33
+ /** Matches `GraphNode.group`, and other groups' `parent`. */
34
+ id: string;
35
+ /** Name in the box's top-left corner. Defaults to the id. */
36
+ label?: string;
37
+ /** Short text after the name, e.g. the CIDR `10.0.0.0/16`. */
38
+ description?: string;
39
+ /** Tints the box's edge and fill, e.g. `success` for the network you own. Without it the box is grey. */
40
+ color?: ChartColor;
41
+ /** Id of the group this box sits inside, e.g. a subnet's VPC. A group needs at least one node inside it, directly or in a nested group. */
42
+ parent?: string;
43
+ }
25
44
  /** A connection between two nodes, drawn from `source` to `target`. */
26
45
  export interface GraphLink {
27
46
  /** Id of the node the link starts at. */
@@ -34,6 +53,12 @@ export interface GraphLink {
34
53
  status?: GraphStatus;
35
54
  /** Draws the line dashed, e.g. for a tunnel or a standby path. */
36
55
  dashed?: boolean;
56
+ /** Line pattern: `solid`, `dashed` or `dotted`. Wins over `dashed`. */
57
+ style?: GraphLinkStyle;
58
+ /** Colours the line by its kind of connection, e.g. `chart-2` for routes. `status` wins when set; a lit link keeps this colour. */
59
+ color?: ChartColor;
60
+ /** Draws or drops this link's arrowhead, whatever `arrows` says, e.g. `false` for a "contains" link. */
61
+ arrow?: boolean;
37
62
  }
38
63
  /** What the `tooltip` slot gets for the hovered node. */
39
64
  export interface GraphTooltipSlotProps {
@@ -49,6 +74,12 @@ export interface Props {
49
74
  nodes: GraphNode[];
50
75
  /** Connections between nodes by id. Links to an unknown id are skipped. */
51
76
  links?: GraphLink[];
77
+ /** Name, description, colour and nesting of the boxes drawn around grouped nodes. A node's `group` that isn't listed gets a grey box named after it. */
78
+ groups?: GraphGroup[];
79
+ /** What the selected (or hovered) node lights up: `neighbors`, its direct links; or `path`, everything upstream and downstream of it along the links' direction. */
80
+ highlight?: GraphHighlight;
81
+ /** Lights up a node's or link's connections, as `highlight` says, while the pointer is over it. */
82
+ highlightOnHover?: boolean;
52
83
  /** Layout direction: `LR` (left to right, like a network path) or `TB` (top to bottom, like a hierarchy). */
53
84
  direction?: "LR" | "TB";
54
85
  /** Plot height in px. The diagram is fitted inside it. */
@@ -85,12 +116,28 @@ type __VLS_Slots = {
85
116
  /** Replaces the tooltip body for the hovered node. */
86
117
  tooltip?: (props: GraphTooltipSlotProps) => unknown;
87
118
  };
119
+ declare function zoomIn(): void;
120
+ declare function zoomOut(): void;
121
+ declare function fit(): void;
122
+ /** Zooms to a percentage of life size about the middle of the plot, e.g. `zoomTo(100)`. Clamped to 25%–150%. */
123
+ declare function zoomTo(percent: number): void;
124
+ /**
125
+ * Selects a node and pans it to the middle of the plot, e.g. from a list of problems beside the diagram.
126
+ * Shows its kind again if the legend hid it. Resolves to `false` for an unknown id.
127
+ */
128
+ declare function focusNode(id: string): Promise<boolean>;
88
129
  type __VLS_ModelProps = {
89
- /** Id of the selected node: it and its links are highlighted and the rest fade. Clicking a node selects it; clicking it again, the background or pressing Escape clears it. */
130
+ /** Id of the selected node: it and its links (or its whole path, with `highlight="path"`) are highlighted and the rest fade. Clicking a node selects it; clicking it again, the background or pressing Escape clears it. */
90
131
  "selected"?: string | null;
91
132
  };
92
133
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
93
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
134
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
135
+ focusNode: typeof focusNode;
136
+ fit: typeof fit;
137
+ zoomIn: typeof zoomIn;
138
+ zoomOut: typeof zoomOut;
139
+ zoomTo: typeof zoomTo;
140
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
94
141
  "update:selected": (value: string | null) => any;
95
142
  "node-click": (node: GraphNode, event: MouseEvent) => any;
96
143
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
@@ -106,10 +153,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
106
153
  tooltip: boolean;
107
154
  loading: boolean;
108
155
  shape: "circle" | "square";
156
+ highlight: GraphHighlight;
109
157
  emptyText: string;
158
+ groups: GraphGroup[];
110
159
  links: GraphLink[];
111
160
  renderer: ChartRenderer;
112
161
  zoom: boolean;
162
+ highlightOnHover: boolean;
113
163
  kindColors: Record<string, ChartColor>;
114
164
  kindIcons: Record<string, Component | string>;
115
165
  arrows: boolean;