@duro-app/cli 5.4.0 → 5.5.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/package.json +5 -5
- package/registry.json +380 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duro-app/cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Machine-queryable docs for the Duro design system: components, props, recipes, tokens and rules as CLI output, JSON, or an MCP server.",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@modelcontextprotocol/sdk": ">=1.0.0",
|
|
48
|
-
"@duro-app/ui": "^5.
|
|
48
|
+
"@duro-app/ui": "^5.5.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"@duro-app/ui": {
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@types/node": "^24.0.0",
|
|
61
61
|
"ts-morph": "^26.0.0",
|
|
62
62
|
"typescript": "^5.7.0",
|
|
63
|
-
"@duro-app/eslint-plugin": "^5.
|
|
64
|
-
"@duro-app/
|
|
65
|
-
"@duro-app/
|
|
63
|
+
"@duro-app/eslint-plugin": "^5.5.0",
|
|
64
|
+
"@duro-app/tokens": "^5.5.0",
|
|
65
|
+
"@duro-app/ui": "^5.5.0"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"registry": "node scripts/build-registry.mjs",
|
package/registry.json
CHANGED
|
@@ -273,6 +273,93 @@
|
|
|
273
273
|
],
|
|
274
274
|
"sourcePath": "packages/ui/src/components/Badge/Badge.tsx"
|
|
275
275
|
},
|
|
276
|
+
"Breadcrumb": {
|
|
277
|
+
"importPath": "@duro-app/ui",
|
|
278
|
+
"kind": "compound",
|
|
279
|
+
"meta": {
|
|
280
|
+
"anatomy": {
|
|
281
|
+
"required": [
|
|
282
|
+
"Root",
|
|
283
|
+
"Item"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"description": "Where the current page sits in the hierarchy: a labelled nav landmark with an ordered list of links, outermost first. An Item is either a link (href, optional onNavigate) or the current page (current: text with aria-current=\"page\"), never both — the types refuse the mix. The › separators are aria-hidden. Links take href and an optional onNavigate(href, event) for a client router (plain clicks only). Compound component — Root is required.",
|
|
287
|
+
"example": "<Breadcrumb.Root aria-label=\"Breadcrumb\">\n <Breadcrumb.Item href=\"/docs\" onNavigate={go}>Docs</Breadcrumb.Item>\n <Breadcrumb.Item href=\"/docs/architecture\" onNavigate={go}>Architecture</Breadcrumb.Item>\n <Breadcrumb.Item current>AI-ops platform</Breadcrumb.Item>\n</Breadcrumb.Root>\n\n// go = (href, event) => { event.preventDefault(); navigate(href) }",
|
|
288
|
+
"relatedTo": [
|
|
289
|
+
{
|
|
290
|
+
"component": "PageNav",
|
|
291
|
+
"kind": "contrast",
|
|
292
|
+
"relationship": "Breadcrumb goes up the hierarchy; PageNav goes along the reading order"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"component": "admin-detail-page",
|
|
296
|
+
"kind": "composition",
|
|
297
|
+
"relationship": "The admin-detail-page recipe heads the record with a Breadcrumb"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"whenNotToUse": [
|
|
301
|
+
"The previous and next pages in reading order — use PageNav",
|
|
302
|
+
"The sections of the page being read — use TableOfContents",
|
|
303
|
+
"Primary app navigation — use SideNav"
|
|
304
|
+
],
|
|
305
|
+
"whenToUse": [
|
|
306
|
+
"A page deep in a hierarchy — docs › section › page, admin › collection › record",
|
|
307
|
+
"A detail page whose way back to its collection should be one click"
|
|
308
|
+
]
|
|
309
|
+
},
|
|
310
|
+
"name": "Breadcrumb",
|
|
311
|
+
"parts": {
|
|
312
|
+
"Item": {
|
|
313
|
+
"name": "Item",
|
|
314
|
+
"props": [
|
|
315
|
+
{
|
|
316
|
+
"name": "children",
|
|
317
|
+
"required": true,
|
|
318
|
+
"type": "ReactNode"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"description": "Where the item links to.",
|
|
322
|
+
"name": "href",
|
|
323
|
+
"required": false,
|
|
324
|
+
"type": "string"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"description": "Client-side navigation: called for a plain primary click (no modifier key). Call `event.preventDefault()`, then your router's navigate.",
|
|
328
|
+
"name": "onNavigate",
|
|
329
|
+
"required": false,
|
|
330
|
+
"type": "OnNavigate"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"description": "The page the user is on: rendered as text with `aria-current=\"page\"`.",
|
|
334
|
+
"name": "current",
|
|
335
|
+
"required": false,
|
|
336
|
+
"type": "true"
|
|
337
|
+
}
|
|
338
|
+
],
|
|
339
|
+
"sourcePath": "packages/ui/src/components/Breadcrumb/Breadcrumb.tsx"
|
|
340
|
+
},
|
|
341
|
+
"Root": {
|
|
342
|
+
"name": "Root",
|
|
343
|
+
"props": [
|
|
344
|
+
{
|
|
345
|
+
"description": "Names the landmark (\"Breadcrumb\"); required, from your text catalog.",
|
|
346
|
+
"name": "aria-label",
|
|
347
|
+
"required": true,
|
|
348
|
+
"type": "string"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"description": "`Breadcrumb.Item`s, outermost first.",
|
|
352
|
+
"name": "children",
|
|
353
|
+
"required": true,
|
|
354
|
+
"type": "ReactNode"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"sourcePath": "packages/ui/src/components/Breadcrumb/Breadcrumb.tsx"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"props": null,
|
|
361
|
+
"sourcePath": "packages/ui/src/components/Breadcrumb/Breadcrumb.tsx"
|
|
362
|
+
},
|
|
276
363
|
"Button": {
|
|
277
364
|
"importPath": "@duro-app/ui",
|
|
278
365
|
"kind": "component",
|
|
@@ -2831,12 +2918,13 @@
|
|
|
2831
2918
|
],
|
|
2832
2919
|
"whenNotToUse": [
|
|
2833
2920
|
"Items that should wrap to the next line — use Cluster",
|
|
2834
|
-
"Vertical stacking — use Stack"
|
|
2921
|
+
"Vertical stacking — use Stack",
|
|
2922
|
+
"A breadcrumb trail — use Breadcrumb (a nav landmark with aria-current)"
|
|
2835
2923
|
],
|
|
2836
2924
|
"whenToUse": [
|
|
2837
2925
|
"Toolbar or button group that must stay on one row",
|
|
2838
2926
|
"Horizontal alignment of a known, small number of items",
|
|
2839
|
-
"Icon + text pairs,
|
|
2927
|
+
"Icon + text pairs, action rows"
|
|
2840
2928
|
]
|
|
2841
2929
|
},
|
|
2842
2930
|
"name": "Inline",
|
|
@@ -3200,7 +3288,7 @@
|
|
|
3200
3288
|
"importPath": "@duro-app/ui",
|
|
3201
3289
|
"kind": "component",
|
|
3202
3290
|
"meta": {
|
|
3203
|
-
"description": "Button-styled hyperlink. Renders an <a> tag, not a <button>. Use for navigation, not actions.",
|
|
3291
|
+
"description": "Button-styled hyperlink. Renders an <a> tag, not a <button>. Use for navigation, not actions. onNavigate(href, event) hands a plain primary click to a client router (the app calls event.preventDefault(), then navigates); modified clicks keep the browser default.",
|
|
3204
3292
|
"example": "<LinkButton href=\"/signup\" variant=\"primary\">\n Get started\n</LinkButton>\n\n<LinkButton href=\"https://docs.example.com\" target=\"_blank\" variant=\"secondary\">\n Read the docs\n</LinkButton>",
|
|
3205
3293
|
"relatedTo": [
|
|
3206
3294
|
{
|
|
@@ -3261,6 +3349,12 @@
|
|
|
3261
3349
|
"required": false,
|
|
3262
3350
|
"type": "string"
|
|
3263
3351
|
},
|
|
3352
|
+
{
|
|
3353
|
+
"description": "Client-side navigation: called for a plain primary click (no modifier key, no `target`); the browser default runs for every other click. Call `event.preventDefault()`, then your router's navigate.",
|
|
3354
|
+
"name": "onNavigate",
|
|
3355
|
+
"required": false,
|
|
3356
|
+
"type": "OnNavigate"
|
|
3357
|
+
},
|
|
3264
3358
|
{
|
|
3265
3359
|
"name": "children",
|
|
3266
3360
|
"required": true,
|
|
@@ -3859,6 +3953,124 @@
|
|
|
3859
3953
|
],
|
|
3860
3954
|
"sourcePath": "packages/diagrams/src/components/Node/Node.tsx"
|
|
3861
3955
|
},
|
|
3956
|
+
"PageNav": {
|
|
3957
|
+
"importPath": "@duro-app/ui",
|
|
3958
|
+
"kind": "compound",
|
|
3959
|
+
"meta": {
|
|
3960
|
+
"anatomy": {
|
|
3961
|
+
"optional": [
|
|
3962
|
+
"Prev",
|
|
3963
|
+
"Next"
|
|
3964
|
+
],
|
|
3965
|
+
"required": [
|
|
3966
|
+
"Root"
|
|
3967
|
+
]
|
|
3968
|
+
},
|
|
3969
|
+
"description": "The previous and next pages in reading order, at the foot of a page: a labelled nav with up to two link cards (a direction label over the page title, both from props). A missing side keeps its slot, so Next stays right-aligned; the cards stack below the xs container width. Links take href and an optional onNavigate(href, event) (plain clicks only). Compound component — Root is required.",
|
|
3970
|
+
"example": "<PageNav.Root aria-label=\"Pages\">\n <PageNav.Prev href=\"/docs/architecture/clusters\" label=\"Previous\" title=\"Clusters and bootstrap\" onNavigate={go} />\n <PageNav.Next href=\"/docs/architecture/secrets\" label=\"Next\" title=\"Secrets and Vault\" onNavigate={go} />\n</PageNav.Root>",
|
|
3971
|
+
"relatedTo": [
|
|
3972
|
+
{
|
|
3973
|
+
"component": "Breadcrumb",
|
|
3974
|
+
"kind": "contrast",
|
|
3975
|
+
"relationship": "PageNav goes along the reading order; Breadcrumb goes up the hierarchy"
|
|
3976
|
+
},
|
|
3977
|
+
{
|
|
3978
|
+
"component": "Card",
|
|
3979
|
+
"kind": "contrast",
|
|
3980
|
+
"relationship": "PageNav draws its own link cards; do not wrap a Card in a link to fake a prev/next pair"
|
|
3981
|
+
}
|
|
3982
|
+
],
|
|
3983
|
+
"whenNotToUse": [
|
|
3984
|
+
"Numbered result pages of a table — use Pagination from @duro-app/ui/table",
|
|
3985
|
+
"Going up the hierarchy — use Breadcrumb"
|
|
3986
|
+
],
|
|
3987
|
+
"whenToUse": [
|
|
3988
|
+
"Docs or a guide read in order — the foot of each page",
|
|
3989
|
+
"A sequence of steps where each step is its own page"
|
|
3990
|
+
]
|
|
3991
|
+
},
|
|
3992
|
+
"name": "PageNav",
|
|
3993
|
+
"parts": {
|
|
3994
|
+
"Next": {
|
|
3995
|
+
"name": "Next",
|
|
3996
|
+
"props": [
|
|
3997
|
+
{
|
|
3998
|
+
"name": "href",
|
|
3999
|
+
"required": true,
|
|
4000
|
+
"type": "string"
|
|
4001
|
+
},
|
|
4002
|
+
{
|
|
4003
|
+
"description": "The page's title.",
|
|
4004
|
+
"name": "title",
|
|
4005
|
+
"required": true,
|
|
4006
|
+
"type": "ReactNode"
|
|
4007
|
+
},
|
|
4008
|
+
{
|
|
4009
|
+
"description": "The direction label above the title (\"Previous\", \"Next\"), from your text catalog.",
|
|
4010
|
+
"name": "label",
|
|
4011
|
+
"required": true,
|
|
4012
|
+
"type": "ReactNode"
|
|
4013
|
+
},
|
|
4014
|
+
{
|
|
4015
|
+
"description": "Client-side navigation: called for a plain primary click (no modifier key). Call `event.preventDefault()`, then your router's navigate.",
|
|
4016
|
+
"name": "onNavigate",
|
|
4017
|
+
"required": false,
|
|
4018
|
+
"type": "OnNavigate"
|
|
4019
|
+
}
|
|
4020
|
+
],
|
|
4021
|
+
"sourcePath": "packages/ui/src/components/PageNav/PageNav.tsx"
|
|
4022
|
+
},
|
|
4023
|
+
"Prev": {
|
|
4024
|
+
"name": "Prev",
|
|
4025
|
+
"props": [
|
|
4026
|
+
{
|
|
4027
|
+
"name": "href",
|
|
4028
|
+
"required": true,
|
|
4029
|
+
"type": "string"
|
|
4030
|
+
},
|
|
4031
|
+
{
|
|
4032
|
+
"description": "The page's title.",
|
|
4033
|
+
"name": "title",
|
|
4034
|
+
"required": true,
|
|
4035
|
+
"type": "ReactNode"
|
|
4036
|
+
},
|
|
4037
|
+
{
|
|
4038
|
+
"description": "The direction label above the title (\"Previous\", \"Next\"), from your text catalog.",
|
|
4039
|
+
"name": "label",
|
|
4040
|
+
"required": true,
|
|
4041
|
+
"type": "ReactNode"
|
|
4042
|
+
},
|
|
4043
|
+
{
|
|
4044
|
+
"description": "Client-side navigation: called for a plain primary click (no modifier key). Call `event.preventDefault()`, then your router's navigate.",
|
|
4045
|
+
"name": "onNavigate",
|
|
4046
|
+
"required": false,
|
|
4047
|
+
"type": "OnNavigate"
|
|
4048
|
+
}
|
|
4049
|
+
],
|
|
4050
|
+
"sourcePath": "packages/ui/src/components/PageNav/PageNav.tsx"
|
|
4051
|
+
},
|
|
4052
|
+
"Root": {
|
|
4053
|
+
"name": "Root",
|
|
4054
|
+
"props": [
|
|
4055
|
+
{
|
|
4056
|
+
"description": "Names the landmark (\"Pages\"); required, from your text catalog.",
|
|
4057
|
+
"name": "aria-label",
|
|
4058
|
+
"required": true,
|
|
4059
|
+
"type": "string"
|
|
4060
|
+
},
|
|
4061
|
+
{
|
|
4062
|
+
"description": "A `PageNav.Prev` and/or a `PageNav.Next`.",
|
|
4063
|
+
"name": "children",
|
|
4064
|
+
"required": true,
|
|
4065
|
+
"type": "ReactNode"
|
|
4066
|
+
}
|
|
4067
|
+
],
|
|
4068
|
+
"sourcePath": "packages/ui/src/components/PageNav/PageNav.tsx"
|
|
4069
|
+
}
|
|
4070
|
+
},
|
|
4071
|
+
"props": null,
|
|
4072
|
+
"sourcePath": "packages/ui/src/components/PageNav/PageNav.tsx"
|
|
4073
|
+
},
|
|
3862
4074
|
"PageShell": {
|
|
3863
4075
|
"importPath": "@duro-app/ui",
|
|
3864
4076
|
"kind": "component",
|
|
@@ -5333,6 +5545,17 @@
|
|
|
5333
5545
|
"name": "rowKey",
|
|
5334
5546
|
"required": false,
|
|
5335
5547
|
"type": "(row: Row<TData>) => string"
|
|
5548
|
+
},
|
|
5549
|
+
{
|
|
5550
|
+
"name": "onRowClick",
|
|
5551
|
+
"required": false,
|
|
5552
|
+
"type": "(row: Row<TData>) => void"
|
|
5553
|
+
},
|
|
5554
|
+
{
|
|
5555
|
+
"description": "Accessible name for each clickable row. Required because the row's visible cell content alone is rarely a useful accessible name.",
|
|
5556
|
+
"name": "rowAriaLabel",
|
|
5557
|
+
"required": false,
|
|
5558
|
+
"type": "(row: Row<TData>) => string"
|
|
5336
5559
|
}
|
|
5337
5560
|
],
|
|
5338
5561
|
"sourcePath": "packages/ui/src/components/Table/FromTanstack.tsx"
|
|
@@ -5517,6 +5740,131 @@
|
|
|
5517
5740
|
"props": null,
|
|
5518
5741
|
"sourcePath": "packages/ui/src/table.ts"
|
|
5519
5742
|
},
|
|
5743
|
+
"TableOfContents": {
|
|
5744
|
+
"importPath": "@duro-app/ui",
|
|
5745
|
+
"kind": "compound",
|
|
5746
|
+
"meta": {
|
|
5747
|
+
"anatomy": {
|
|
5748
|
+
"required": [
|
|
5749
|
+
"Root",
|
|
5750
|
+
"Item"
|
|
5751
|
+
]
|
|
5752
|
+
},
|
|
5753
|
+
"description": "The \"On this page\" list of a long page's sections: a labelled nav of in-page links (href=\"#id\", level 2 or 3). value is the id of the section being read; that item gets aria-current=\"location\", the nav marker bar and a heavier weight. variant=\"menu\" puts the list behind a disclosure button (aria-expanded) for narrow screens; the disclosure state (open, defaultOpen and its change callback) exists on the menu variant only. No scroll-spy inside: the app computes value. Compound component — Root is required.",
|
|
5754
|
+
"example": "<TableOfContents.Root aria-label=\"On this page\" label=\"On this page\" value={activeId}>\n <TableOfContents.Item href=\"#components\">The components</TableOfContents.Item>\n <TableOfContents.Item href=\"#wiring\">Wiring</TableOfContents.Item>\n <TableOfContents.Item href=\"#webhooks\" level={3}>Webhooks</TableOfContents.Item>\n</TableOfContents.Root>\n\n// narrow screens\n<TableOfContents.Root aria-label=\"On this page\" variant=\"menu\" value={activeId}>\n …\n</TableOfContents.Root>",
|
|
5755
|
+
"relatedTo": [
|
|
5756
|
+
{
|
|
5757
|
+
"component": "Tabs",
|
|
5758
|
+
"kind": "contrast",
|
|
5759
|
+
"relationship": "Tabs swap the content in place; TableOfContents links to sections of one long page"
|
|
5760
|
+
},
|
|
5761
|
+
{
|
|
5762
|
+
"component": "PageNav",
|
|
5763
|
+
"kind": "contrast",
|
|
5764
|
+
"relationship": "TableOfContents moves within the page; PageNav moves to the next page"
|
|
5765
|
+
}
|
|
5766
|
+
],
|
|
5767
|
+
"whenNotToUse": [
|
|
5768
|
+
"Navigation between pages — use SideNav, Tree or Breadcrumb",
|
|
5769
|
+
"Switching views of one record — use Tabs",
|
|
5770
|
+
"A page with no H2/H3 — render nothing instead of an empty list"
|
|
5771
|
+
],
|
|
5772
|
+
"whenToUse": [
|
|
5773
|
+
"A long document page (docs, a runbook, an ADR) with H2/H3 sections",
|
|
5774
|
+
"variant=\"menu\" for the same list on a narrow screen, above the body"
|
|
5775
|
+
]
|
|
5776
|
+
},
|
|
5777
|
+
"name": "TableOfContents",
|
|
5778
|
+
"parts": {
|
|
5779
|
+
"Item": {
|
|
5780
|
+
"name": "Item",
|
|
5781
|
+
"props": [
|
|
5782
|
+
{
|
|
5783
|
+
"description": "The section's anchor, `#<heading id>`.",
|
|
5784
|
+
"name": "href",
|
|
5785
|
+
"required": true,
|
|
5786
|
+
"type": "string"
|
|
5787
|
+
},
|
|
5788
|
+
{
|
|
5789
|
+
"default": "2",
|
|
5790
|
+
"description": "The heading's level: 2, or 3 (indented under the 2 before it).",
|
|
5791
|
+
"name": "level",
|
|
5792
|
+
"required": false,
|
|
5793
|
+
"type": "2 | 3"
|
|
5794
|
+
},
|
|
5795
|
+
{
|
|
5796
|
+
"description": "Client-side navigation: called for a plain primary click (no modifier key). Call `event.preventDefault()`, then scroll or navigate yourself.",
|
|
5797
|
+
"name": "onNavigate",
|
|
5798
|
+
"required": false,
|
|
5799
|
+
"type": "OnNavigate"
|
|
5800
|
+
},
|
|
5801
|
+
{
|
|
5802
|
+
"name": "children",
|
|
5803
|
+
"required": true,
|
|
5804
|
+
"type": "ReactNode"
|
|
5805
|
+
}
|
|
5806
|
+
],
|
|
5807
|
+
"sourcePath": "packages/ui/src/components/TableOfContents/TableOfContents.tsx"
|
|
5808
|
+
},
|
|
5809
|
+
"Root": {
|
|
5810
|
+
"name": "Root",
|
|
5811
|
+
"props": [
|
|
5812
|
+
{
|
|
5813
|
+
"description": "Names the landmark (\"On this page\"); required, from your text catalog.",
|
|
5814
|
+
"name": "aria-label",
|
|
5815
|
+
"required": true,
|
|
5816
|
+
"type": "string"
|
|
5817
|
+
},
|
|
5818
|
+
{
|
|
5819
|
+
"default": "null",
|
|
5820
|
+
"description": "The id of the section being read; the Item whose href is `#<value>` is active.",
|
|
5821
|
+
"name": "value",
|
|
5822
|
+
"required": false,
|
|
5823
|
+
"type": "string | null"
|
|
5824
|
+
},
|
|
5825
|
+
{
|
|
5826
|
+
"description": "Visible title: the caption above the list, or the menu button's text. The menu button falls back to `aria-label`; the list shows none without it.",
|
|
5827
|
+
"name": "label",
|
|
5828
|
+
"required": false,
|
|
5829
|
+
"type": "ReactNode"
|
|
5830
|
+
},
|
|
5831
|
+
{
|
|
5832
|
+
"name": "children",
|
|
5833
|
+
"required": true,
|
|
5834
|
+
"type": "ReactNode"
|
|
5835
|
+
},
|
|
5836
|
+
{
|
|
5837
|
+
"default": "'list'",
|
|
5838
|
+
"description": "`list` (default) for a sidebar; `menu` for a narrow screen, behind a disclosure button (only `menu` takes open / defaultOpen / onOpenChange).",
|
|
5839
|
+
"name": "variant",
|
|
5840
|
+
"required": false,
|
|
5841
|
+
"type": "'list' | 'menu'"
|
|
5842
|
+
},
|
|
5843
|
+
{
|
|
5844
|
+
"description": "Whether the list is shown (controlled).",
|
|
5845
|
+
"name": "open",
|
|
5846
|
+
"required": false,
|
|
5847
|
+
"type": "boolean"
|
|
5848
|
+
},
|
|
5849
|
+
{
|
|
5850
|
+
"default": "false",
|
|
5851
|
+
"description": "Whether the list starts shown (uncontrolled; default false).",
|
|
5852
|
+
"name": "defaultOpen",
|
|
5853
|
+
"required": false,
|
|
5854
|
+
"type": "boolean"
|
|
5855
|
+
},
|
|
5856
|
+
{
|
|
5857
|
+
"name": "onOpenChange",
|
|
5858
|
+
"required": false,
|
|
5859
|
+
"type": "(open: boolean) => void"
|
|
5860
|
+
}
|
|
5861
|
+
],
|
|
5862
|
+
"sourcePath": "packages/ui/src/components/TableOfContents/TableOfContents.tsx"
|
|
5863
|
+
}
|
|
5864
|
+
},
|
|
5865
|
+
"props": null,
|
|
5866
|
+
"sourcePath": "packages/ui/src/components/TableOfContents/TableOfContents.tsx"
|
|
5867
|
+
},
|
|
5520
5868
|
"Tabs": {
|
|
5521
5869
|
"importPath": "@duro-app/ui",
|
|
5522
5870
|
"kind": "compound",
|
|
@@ -5993,7 +6341,7 @@
|
|
|
5993
6341
|
"importPath": "@duro-app/ui",
|
|
5994
6342
|
"kind": "component",
|
|
5995
6343
|
"meta": {
|
|
5996
|
-
"description": "Inline hyperlink for running text and standalone text links (\"View all\", \"Edit profile\"). Always underlined, so colour is never the only cue: default is accent text with an accent underline; subtle keeps the surrounding text colour with a muted underline and turns accent on hover. target=\"_blank\" defaults rel to noopener noreferrer.",
|
|
6344
|
+
"description": "Inline hyperlink for running text and standalone text links (\"View all\", \"Edit profile\"). Always underlined, so colour is never the only cue: default is accent text with an accent underline; subtle keeps the surrounding text colour with a muted underline and turns accent on hover. target=\"_blank\" defaults rel to noopener noreferrer. onNavigate(href, event) hands a plain primary click to a client router (the app calls event.preventDefault(), then navigates); modified clicks keep the browser default.",
|
|
5997
6345
|
"example": "<Text>\n Read the <TextLink href=\"/docs/migrate\">migration guide</TextLink> before you change seats, or{' '}\n <TextLink href=\"/plans\" variant=\"subtle\">compare plans</TextLink> first.\n</Text>",
|
|
5998
6346
|
"relatedTo": [
|
|
5999
6347
|
{
|
|
@@ -6053,6 +6401,12 @@
|
|
|
6053
6401
|
"required": false,
|
|
6054
6402
|
"type": "string"
|
|
6055
6403
|
},
|
|
6404
|
+
{
|
|
6405
|
+
"description": "Client-side navigation: called for a plain primary click (no modifier key, no `target`); the browser default runs for every other click. Call `event.preventDefault()`, then your router's navigate.",
|
|
6406
|
+
"name": "onNavigate",
|
|
6407
|
+
"required": false,
|
|
6408
|
+
"type": "OnNavigate"
|
|
6409
|
+
},
|
|
6056
6410
|
{
|
|
6057
6411
|
"name": "children",
|
|
6058
6412
|
"required": true,
|
|
@@ -6599,7 +6953,7 @@
|
|
|
6599
6953
|
"Item"
|
|
6600
6954
|
]
|
|
6601
6955
|
},
|
|
6602
|
-
"description": "Hierarchy of items with single selection and expandable branches (the WAI-ARIA tree pattern): one tab stop, arrow keys, Home/End, typeahead. Compound component — Root is required.",
|
|
6956
|
+
"description": "Hierarchy of items with single selection and expandable branches (the WAI-ARIA tree pattern): one tab stop, arrow keys, Home/End, typeahead. An Item with href renders its row as a real link (cmd-click opens a tab) outside the tab order; Enter/Space follows it, through onNavigate(href, event) when given. Compound component — Root is required.",
|
|
6603
6957
|
"example": "<Tree.Root aria-label=\"Blocs\" defaultExpanded={['energy']} onValueChange={setSelected}>\n <Tree.Item value=\"energy\" label=\"Core business — Energy\">\n <Tree.Item value=\"generation\" label=\"Generation\" meta=\"4 apps\" />\n <Tree.Item value=\"network\" label=\"Network operations\">\n <Tree.Item value=\"scada\" label=\"SCADA supervision\" />\n </Tree.Item>\n </Tree.Item>\n <Tree.Item value=\"finance\" label=\"Finance & steering\" />\n</Tree.Root>",
|
|
6604
6958
|
"relatedTo": [
|
|
6605
6959
|
{
|
|
@@ -6620,7 +6974,8 @@
|
|
|
6620
6974
|
],
|
|
6621
6975
|
"whenToUse": [
|
|
6622
6976
|
"Browsing data that nests to any depth — a file tree, zones › services › capabilities, namespace › resource",
|
|
6623
|
-
"Picking one node of a hierarchy to show its details beside the tree"
|
|
6977
|
+
"Picking one node of a hierarchy to show its details beside the tree",
|
|
6978
|
+
"A docs tree of sections and pages, each Item with href (and onNavigate for a client router)"
|
|
6624
6979
|
]
|
|
6625
6980
|
},
|
|
6626
6981
|
"name": "Tree",
|
|
@@ -6657,6 +7012,18 @@
|
|
|
6657
7012
|
"name": "meta",
|
|
6658
7013
|
"required": false,
|
|
6659
7014
|
"type": "ReactNode"
|
|
7015
|
+
},
|
|
7016
|
+
{
|
|
7017
|
+
"description": "Makes the row a link to this URL. A plain click (or Enter / Space) selects the item and calls `onNavigate`; a modified click keeps the browser default (new tab, new window) and does not select.",
|
|
7018
|
+
"name": "href",
|
|
7019
|
+
"required": false,
|
|
7020
|
+
"type": "string"
|
|
7021
|
+
},
|
|
7022
|
+
{
|
|
7023
|
+
"description": "Client-side navigation for `href`: called for a plain primary click. Call `event.preventDefault()`, then your router's navigate.",
|
|
7024
|
+
"name": "onNavigate",
|
|
7025
|
+
"required": false,
|
|
7026
|
+
"type": "OnNavigate"
|
|
6660
7027
|
}
|
|
6661
7028
|
],
|
|
6662
7029
|
"sourcePath": "packages/ui/src/components/Tree/Tree.tsx"
|
|
@@ -7243,7 +7610,7 @@
|
|
|
7243
7610
|
"admin-detail-page": {
|
|
7244
7611
|
"export": "AdminDetailPageRecipe",
|
|
7245
7612
|
"meta": {
|
|
7246
|
-
"description": "Admin detail page for one record:
|
|
7613
|
+
"description": "Admin detail page for one record: a Breadcrumb back to the collection, heading with status and actions, then Tabs whose panels hold the sections (the /admin/<collection>/:id shape).",
|
|
7247
7614
|
"example": "<AdminDetailPageRecipe />",
|
|
7248
7615
|
"whenNotToUse": [
|
|
7249
7616
|
"One facet only — a PageShell with a Card is enough",
|
|
@@ -7256,17 +7623,17 @@
|
|
|
7256
7623
|
},
|
|
7257
7624
|
"name": "admin-detail-page",
|
|
7258
7625
|
"peerDeps": [],
|
|
7259
|
-
"source": "import {PageShell, Tabs, Stack, Inline, Heading, Text, Badge, Button,
|
|
7626
|
+
"source": "import {PageShell, Tabs, Stack, Inline, Heading, Text, Badge, Button, Breadcrumb, Card, EmptyState} from '@duro-app/ui'\n\nfunction Header() {\n return (\n <Stack gap=\"sm\">\n <Breadcrumb.Root aria-label=\"Breadcrumb\">\n <Breadcrumb.Item href=\"#admin\">Admin</Breadcrumb.Item>\n <Breadcrumb.Item href=\"#applications\">Applications</Breadcrumb.Item>\n <Breadcrumb.Item current>Grafana</Breadcrumb.Item>\n </Breadcrumb.Root>\n <Inline gap=\"md\" align=\"center\" justify=\"between\">\n <Inline gap=\"sm\" align=\"center\">\n <Heading level={1}>Grafana</Heading>\n <Badge variant=\"success\">active</Badge>\n </Inline>\n <Inline gap=\"sm\">\n <Button variant=\"secondary\">Edit</Button>\n <Button variant=\"danger\">Retire</Button>\n </Inline>\n </Inline>\n </Stack>\n )\n}\n\nexport function AdminDetailPageRecipe() {\n return (\n <PageShell maxWidth=\"lg\" padding=\"md\" header={<Header />}>\n <Tabs.Root defaultValue=\"overview\">\n <Tabs.List>\n <Tabs.Tab value=\"overview\">Overview</Tabs.Tab>\n <Tabs.Tab value=\"members\">Members</Tabs.Tab>\n <Tabs.Tab value=\"approvals\">Approvals</Tabs.Tab>\n <Tabs.Tab value=\"audit\">Audit</Tabs.Tab>\n </Tabs.List>\n\n <Tabs.Panel value=\"overview\">\n <Stack gap=\"lg\">\n <Card>\n <Stack gap=\"sm\">\n <Heading level={3}>About</Heading>\n <Text color=\"muted\">\n Dashboards for the platform team. Owned by platform, reachable at grafana.example.\n </Text>\n </Stack>\n </Card>\n <Card>\n <Stack gap=\"sm\">\n <Heading level={3}>Access</Heading>\n <Text>3 roles · 2 entitlements · 41 grants</Text>\n </Stack>\n </Card>\n </Stack>\n </Tabs.Panel>\n\n <Tabs.Panel value=\"members\">\n <EmptyState message=\"No members yet.\" action={<Button>Add member</Button>} />\n </Tabs.Panel>\n <Tabs.Panel value=\"approvals\">\n <EmptyState message=\"Every grant is auto-approved. Add a gate to require a decision.\" />\n </Tabs.Panel>\n <Tabs.Panel value=\"audit\">\n <EmptyState message=\"Nothing recorded for this application.\" />\n </Tabs.Panel>\n </Tabs.Root>\n </PageShell>\n )\n}\n",
|
|
7260
7627
|
"sourcePath": "docs/ai/recipes/admin-detail-page.recipe.tsx",
|
|
7261
7628
|
"title": "Admin Detail Page",
|
|
7262
7629
|
"usesComponents": [
|
|
7263
7630
|
"Badge",
|
|
7631
|
+
"Breadcrumb",
|
|
7264
7632
|
"Button",
|
|
7265
7633
|
"Card",
|
|
7266
7634
|
"EmptyState",
|
|
7267
7635
|
"Heading",
|
|
7268
7636
|
"Inline",
|
|
7269
|
-
"LinkButton",
|
|
7270
7637
|
"PageShell",
|
|
7271
7638
|
"Stack",
|
|
7272
7639
|
"Tabs",
|
|
@@ -8959,6 +9326,10 @@
|
|
|
8959
9326
|
"info",
|
|
8960
9327
|
"muted"
|
|
8961
9328
|
],
|
|
9329
|
+
"TableOfContentsVariant": [
|
|
9330
|
+
"list",
|
|
9331
|
+
"menu"
|
|
9332
|
+
],
|
|
8962
9333
|
"TableSize": [
|
|
8963
9334
|
"sm",
|
|
8964
9335
|
"md"
|