@ac-design/design-system 2.6.1 → 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.
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/charts/graph.d.ts +9 -15
- package/dist/lib/charts/graph.js +79 -75
- package/dist/lib/charts/index.d.ts +4 -2
- package/dist/lib/charts/index.js +2 -1
- package/dist/lib/charts/nodeSymbol.d.ts +15 -0
- package/dist/lib/charts/nodeSymbol.js +27 -0
- package/dist/lib/charts/tree.d.ts +15 -0
- package/dist/lib/charts/tree.js +89 -0
- package/dist/lib/compat.css +113 -0
- package/dist/lib/components/AcAccordionItem.vue.d.ts +3 -1
- package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +35 -26
- package/dist/lib/components/AcAlert.vue.d.ts +1 -1
- package/dist/lib/components/AcBadge.vue.d.ts +1 -1
- package/dist/lib/components/AcBanner.vue.d.ts +1 -1
- package/dist/lib/components/AcCard.vue.d.ts +1 -1
- package/dist/lib/components/AcCellValue.vue.d.ts +1 -1
- package/dist/lib/components/AcCheckList.vue.d.ts +1 -1
- package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
- package/dist/lib/components/AcFeatureCard.vue.d.ts +1 -1
- package/dist/lib/components/AcGraphChart.vue.d.ts +53 -3
- package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +401 -233
- package/dist/lib/components/AcList.js +5 -0
- package/dist/lib/components/AcList.vue.d.ts +56 -0
- package/dist/lib/components/AcList.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/lib/components/AcListItem.js +5 -0
- package/dist/lib/components/AcListItem.vue.d.ts +53 -0
- package/dist/lib/components/AcListItem.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/lib/components/AcMapChart.vue.d.ts +66 -3
- package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +403 -201
- package/dist/lib/components/AcMonthPicker.js +5 -0
- package/dist/lib/components/AcMonthPicker.vue.d.ts +102 -0
- package/dist/lib/components/AcMonthPicker.vue_vue_type_script_setup_true_lang.js +595 -0
- package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
- package/dist/lib/components/AcSideTabs.vue.d.ts +3 -1
- package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +53 -33
- package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcStatCard.vue.d.ts +1 -1
- package/dist/lib/components/AcTreeChart.js +5 -0
- package/dist/lib/components/AcTreeChart.vue.d.ts +135 -0
- package/dist/lib/components/AcTreeChart.vue_vue_type_script_setup_true_lang.js +809 -0
- package/dist/lib/components/AcUsageCard.vue.d.ts +1 -1
- package/dist/lib/components/index.d.ts +5 -2
- package/dist/lib/composables/copyText.d.ts +5 -1
- package/dist/lib/composables/copyText.js +15 -3
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.js +85 -81
- package/package.json +1 -1
package/dist/lib/compat.css
CHANGED
|
@@ -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
|
}
|
|
@@ -1302,6 +1318,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
1302
1318
|
.max-w-xl:where([data-ac-ds], [data-ac-ds] *) {
|
|
1303
1319
|
max-width: var(--container-xl) !important;
|
|
1304
1320
|
}
|
|
1321
|
+
.max-w-xs:where([data-ac-ds], [data-ac-ds] *) {
|
|
1322
|
+
max-width: var(--container-xs) !important;
|
|
1323
|
+
}
|
|
1305
1324
|
.min-w-0:where([data-ac-ds], [data-ac-ds] *) {
|
|
1306
1325
|
min-width: 0px !important;
|
|
1307
1326
|
}
|
|
@@ -1855,6 +1874,10 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
1855
1874
|
.rounded-full:where([data-ac-ds], [data-ac-ds] *) {
|
|
1856
1875
|
border-radius: calc(infinity * 1px) !important;
|
|
1857
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
|
+
}
|
|
1858
1881
|
.rounded-t-8:where([data-ac-ds], [data-ac-ds] *) {
|
|
1859
1882
|
border-top-left-radius: var(--radius-8) !important;
|
|
1860
1883
|
border-top-right-radius: var(--radius-8) !important;
|
|
@@ -3425,6 +3448,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
3425
3448
|
color: color-mix(in oklab, var(--color-info) 5%, transparent) !important;
|
|
3426
3449
|
}
|
|
3427
3450
|
}
|
|
3451
|
+
.text-inherit:where([data-ac-ds], [data-ac-ds] *) {
|
|
3452
|
+
color: inherit !important;
|
|
3453
|
+
}
|
|
3428
3454
|
.text-muted:where([data-ac-ds], [data-ac-ds] *) {
|
|
3429
3455
|
color: var(--color-muted) !important;
|
|
3430
3456
|
}
|
|
@@ -4174,9 +4200,27 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
4174
4200
|
.group-focus-visible\/thumb\:opacity-100:is(:where(.group\/thumb):focus-visible *):where([data-ac-ds], [data-ac-ds] *) {
|
|
4175
4201
|
opacity: 100% !important;
|
|
4176
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
|
+
}
|
|
4177
4209
|
.group-aria-\[current\=page\]\:text-primary\!:is(:where(.group)[aria-current="page"] *):where([data-ac-ds], [data-ac-ds] *) {
|
|
4178
4210
|
color: var(--color-primary) !important;
|
|
4179
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
|
+
}
|
|
4180
4224
|
.peer-checked\:scale-100:is(:where(.peer):checked ~ *):where([data-ac-ds], [data-ac-ds] *) {
|
|
4181
4225
|
--tw-scale-x: 100% !important;
|
|
4182
4226
|
--tw-scale-y: 100% !important;
|
|
@@ -4284,6 +4328,12 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
4284
4328
|
background-color: color-mix(in oklab, var(--color-danger) 10%, transparent) !important;
|
|
4285
4329
|
}
|
|
4286
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
|
+
}
|
|
4287
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] *) {
|
|
4288
4338
|
--tw-shadow: 0 0 0 2px var(--tw-shadow-color, color-mix(in srgb,#ef4444 20%,transparent)) !important;
|
|
4289
4339
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -4298,6 +4348,13 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
4298
4348
|
}
|
|
4299
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;
|
|
4300
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
|
+
}
|
|
4301
4358
|
@media (hover: hover) {
|
|
4302
4359
|
.hover\:-translate-y-0\.5:hover:where([data-ac-ds], [data-ac-ds] *) {
|
|
4303
4360
|
--tw-translate-y: calc(var(--spacing) * -0.5) !important;
|
|
@@ -4961,6 +5018,12 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
4961
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] *) {
|
|
4962
5019
|
--tw-ring-offset-color: var(--color-surface) !important;
|
|
4963
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
|
+
}
|
|
4964
5027
|
.has-\[img\]\:border:has(:is(img)):where([data-ac-ds], [data-ac-ds] *) {
|
|
4965
5028
|
border-style: var(--tw-border-style) !important;
|
|
4966
5029
|
border-width: 1px !important;
|
|
@@ -5014,6 +5077,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
5014
5077
|
.aria-disabled\:opacity-50[aria-disabled="true"]:where([data-ac-ds], [data-ac-ds] *) {
|
|
5015
5078
|
opacity: 50% !important;
|
|
5016
5079
|
}
|
|
5080
|
+
.aria-pressed\:bg-accent[aria-pressed="true"]:where([data-ac-ds], [data-ac-ds] *) {
|
|
5081
|
+
background-color: var(--color-accent) !important;
|
|
5082
|
+
}
|
|
5017
5083
|
.aria-\[current\=page\]\:border-primary\/35[aria-current="page"]:where([data-ac-ds], [data-ac-ds] *) {
|
|
5018
5084
|
border-color: color-mix(in srgb, hsl(var(--primary-hue) var(--primary-saturation) var(--primary-light)) 35%, transparent) !important;
|
|
5019
5085
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -5045,6 +5111,9 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
5045
5111
|
--tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-primary) 10%, transparent) var(--tw-shadow-alpha), transparent) !important;
|
|
5046
5112
|
}
|
|
5047
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
|
+
}
|
|
5048
5117
|
@media (prefers-reduced-motion: no-preference) {
|
|
5049
5118
|
.motion-safe\:-translate-x-1:where([data-ac-ds], [data-ac-ds] *) {
|
|
5050
5119
|
--tw-translate-x: calc(var(--spacing) * -1) !important;
|
|
@@ -5503,7 +5572,51 @@ button:is([data-ac-ds], [data-ac-ds] *), input:where([type="button"], [type="res
|
|
|
5503
5572
|
display: none !important;
|
|
5504
5573
|
}
|
|
5505
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
|
+
}
|
|
5506
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
|
+
}
|
|
5507
5620
|
.\@lg\:gap-x-2:where([data-ac-ds], [data-ac-ds] *) {
|
|
5508
5621
|
column-gap: calc(var(--spacing) * 2) !important;
|
|
5509
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,
|
|
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:
|
|
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__*/
|
|
20
|
+
], D = /*@__PURE__*/ o({
|
|
21
21
|
__name: "AcAccordionItem",
|
|
22
|
-
props: /*@__PURE__*/
|
|
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__*/
|
|
39
|
-
setup(
|
|
40
|
-
let D =
|
|
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
|
|
46
|
+
return _(N, (e) => {
|
|
47
47
|
A && (O.value = e);
|
|
48
|
-
}), (e,
|
|
49
|
-
class:
|
|
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
|
-
}, [(
|
|
53
|
-
default:
|
|
54
|
-
id: `${
|
|
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": `${
|
|
59
|
-
disabled:
|
|
60
|
-
class:
|
|
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.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
})),
|
|
72
|
-
|
|
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": `${
|
|
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:
|
|
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";
|
|
@@ -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;
|
|
@@ -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, {
|
|
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;
|