@commercetools/nimbus-mcp 2.11.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/data/docs/route-manifest.json +203 -0
  2. package/data/docs/routes/components-data-display-card.json +71 -5
  3. package/data/docs/routes/components-feedback-toast.json +1 -1
  4. package/data/docs/routes/components-layout-defaultpage.json +4 -4
  5. package/data/docs/routes/components-layout-modalpage.json +4 -4
  6. package/data/docs/routes/components-layout-scrollarea.json +3 -3
  7. package/data/docs/routes/components-media-avatar.json +24 -2
  8. package/data/docs/routes/patterns-actions-form-action-bar.json +412 -0
  9. package/data/docs/routes/patterns-dialogs-info-dialog.json +315 -0
  10. package/data/docs/routes/patterns-dialogs.json +78 -0
  11. package/data/docs/search-index.json +1 -1
  12. package/data/docs/types/AccordionRoot.json +2 -2
  13. package/data/docs/types/AlertDescription.json +8 -8
  14. package/data/docs/types/AlertDismissButton.json +2 -2
  15. package/data/docs/types/AlertTitle.json +8 -8
  16. package/data/docs/types/Avatar.json +8 -8
  17. package/data/docs/types/Badge.json +2 -2
  18. package/data/docs/types/Body.json +6 -6
  19. package/data/docs/types/Box.json +6 -6
  20. package/data/docs/types/Button.json +8 -8
  21. package/data/docs/types/Caption.json +6 -6
  22. package/data/docs/types/Card.json +1 -1
  23. package/data/docs/types/{CardContent.json → CardBody.json} +2 -2
  24. package/data/docs/types/CardFooter.json +27 -0
  25. package/data/docs/types/CardRoot.json +18 -48
  26. package/data/docs/types/Cell.json +6 -6
  27. package/data/docs/types/Checkbox.json +2 -2
  28. package/data/docs/types/Code.json +10 -10
  29. package/data/docs/types/Column.json +6 -6
  30. package/data/docs/types/ColumnGroup.json +6 -6
  31. package/data/docs/types/ColumnHeader.json +6 -6
  32. package/data/docs/types/ComboBoxListBox.json +6 -6
  33. package/data/docs/types/ComboBoxPopover.json +8 -8
  34. package/data/docs/types/ComboBoxRoot.json +8 -8
  35. package/data/docs/types/ComboBoxSection.json +6 -6
  36. package/data/docs/types/ComboBoxTrigger.json +6 -6
  37. package/data/docs/types/DataTable.json +2 -2
  38. package/data/docs/types/DataTableBody.json +6 -6
  39. package/data/docs/types/DataTableHeader.json +7 -7
  40. package/data/docs/types/DataTableRoot.json +2 -2
  41. package/data/docs/types/DataTableTable.json +6 -6
  42. package/data/docs/types/DatePicker.json +2 -2
  43. package/data/docs/types/DefaultPageRoot.json +2 -2
  44. package/data/docs/types/DialogCloseTrigger.json +2 -2
  45. package/data/docs/types/DraggableListField.json +10 -10
  46. package/data/docs/types/DraggableListItem.json +6 -6
  47. package/data/docs/types/DraggableListRoot.json +8 -8
  48. package/data/docs/types/DrawerCloseTrigger.json +2 -2
  49. package/data/docs/types/FieldErrors.json +2 -2
  50. package/data/docs/types/Flex.json +22 -22
  51. package/data/docs/types/Footer.json +6 -6
  52. package/data/docs/types/FormActionBar.json +200 -0
  53. package/data/docs/types/FormFieldRoot.json +2 -2
  54. package/data/docs/types/Grid.json +24 -24
  55. package/data/docs/types/Group.json +2 -2
  56. package/data/docs/types/Header.json +6 -6
  57. package/data/docs/types/Heading.json +8 -8
  58. package/data/docs/types/Icon.json +4 -4
  59. package/data/docs/types/IconButton.json +8 -8
  60. package/data/docs/types/Image.json +10 -10
  61. package/data/docs/types/Indicator.json +6 -6
  62. package/data/docs/types/InfoDialog.json +104 -0
  63. package/data/docs/types/InlineSvg.json +2 -2
  64. package/data/docs/types/Item.json +6 -6
  65. package/data/docs/types/Kbd.json +8 -8
  66. package/data/docs/types/Link.json +8 -8
  67. package/data/docs/types/ListIndicator.json +6 -6
  68. package/data/docs/types/ListItem.json +6 -6
  69. package/data/docs/types/ListRoot.json +10 -10
  70. package/data/docs/types/LoadingSpinner.json +2 -2
  71. package/data/docs/types/MultilineTextInput.json +2 -2
  72. package/data/docs/types/MultilineTextInputField.json +2 -2
  73. package/data/docs/types/NumberInput.json +2 -2
  74. package/data/docs/types/NumberInputField.json +2 -2
  75. package/data/docs/types/PageContentColumn.json +6 -6
  76. package/data/docs/types/PageContentRoot.json +6 -6
  77. package/data/docs/types/RichTextInput.json +2 -2
  78. package/data/docs/types/Root.json +10 -10
  79. package/data/docs/types/Row.json +6 -6
  80. package/data/docs/types/ScrollArea.json +6 -6
  81. package/data/docs/types/Separator.json +4 -4
  82. package/data/docs/types/SimpleGrid.json +28 -28
  83. package/data/docs/types/SplitButton.json +2 -2
  84. package/data/docs/types/Stack.json +2 -2
  85. package/data/docs/types/StepsRoot.json +2 -2
  86. package/data/docs/types/Switch.json +2 -2
  87. package/data/docs/types/TabNavItem.json +2 -2
  88. package/data/docs/types/TabNavRoot.json +2 -2
  89. package/data/docs/types/TableBody.json +6 -6
  90. package/data/docs/types/TableCaption.json +6 -6
  91. package/data/docs/types/TableCell.json +6 -6
  92. package/data/docs/types/TableColumn.json +6 -6
  93. package/data/docs/types/TableColumnGroup.json +6 -6
  94. package/data/docs/types/TableColumnHeader.json +6 -6
  95. package/data/docs/types/TableFooter.json +6 -6
  96. package/data/docs/types/TableHeader.json +6 -6
  97. package/data/docs/types/TableRoot.json +18 -18
  98. package/data/docs/types/TableRow.json +6 -6
  99. package/data/docs/types/TableScrollArea.json +6 -6
  100. package/data/docs/types/Text.json +8 -8
  101. package/data/docs/types/ToggleButtonGroupButton.json +6 -6
  102. package/data/docs/types/ToggleButtonGroupRoot.json +6 -6
  103. package/data/docs/types/Toolbar.json +2 -2
  104. package/data/docs/types/TooltipContent.json +2 -2
  105. package/data/docs/types/manifest.json +4 -1
  106. package/data/docs/types/toast.json +0 -15
  107. package/package.json +6 -6
@@ -0,0 +1,315 @@
1
+ {
2
+ "meta": {
3
+ "id": "Patterns-InfoDialog",
4
+ "title": "Info dialog",
5
+ "exportName": "InfoDialog",
6
+ "description": "A pre-composed read-only informational dialog with a flat, minimal API.",
7
+ "order": 999,
8
+ "repoPath": "packages/nimbus/src/patterns/dialogs/info-dialog/info-dialog.mdx",
9
+ "menu": [
10
+ "Patterns",
11
+ "Dialogs",
12
+ "Info dialog"
13
+ ],
14
+ "route": "patterns/dialogs/info-dialog",
15
+ "tags": [
16
+ "component",
17
+ "pattern",
18
+ "dialog",
19
+ "InfoDialog"
20
+ ],
21
+ "toc": [
22
+ {
23
+ "value": "Overview",
24
+ "href": "#overview",
25
+ "depth": 2,
26
+ "numbering": [
27
+ 1,
28
+ 1
29
+ ],
30
+ "parent": "root"
31
+ },
32
+ {
33
+ "value": "When to use",
34
+ "href": "#when-to-use",
35
+ "depth": 3,
36
+ "numbering": [
37
+ 1,
38
+ 1,
39
+ 1
40
+ ],
41
+ "parent": "root"
42
+ },
43
+ {
44
+ "value": "When not to use",
45
+ "href": "#when-not-to-use",
46
+ "depth": 3,
47
+ "numbering": [
48
+ 1,
49
+ 1,
50
+ 2
51
+ ],
52
+ "parent": "root"
53
+ },
54
+ {
55
+ "value": "Resources",
56
+ "href": "#resources",
57
+ "depth": 3,
58
+ "numbering": [
59
+ 1,
60
+ 1,
61
+ 3
62
+ ],
63
+ "parent": "root"
64
+ }
65
+ ],
66
+ "layout": "app-frame",
67
+ "tabs": [
68
+ {
69
+ "key": "overview",
70
+ "title": "Overview",
71
+ "order": 0
72
+ },
73
+ {
74
+ "key": "dev",
75
+ "title": "Implementation",
76
+ "order": 3
77
+ }
78
+ ]
79
+ },
80
+ "mdx": "\n## Overview\n\nInfoDialog is a pattern component that wraps the Dialog primitive in a flat, minimal API for the most common read-only informational dialog shape: a title, some content, and a close affordance. It is the recommended replacement for the Merchant Center Application Kit's `InfoDialog`.\n\nThe pattern exposes a small, flat set of props — `title`, `children`, and optional `isOpen` / `defaultOpen` / `onOpenChange` / `aria-label` — and delegates everything else (sizing, stacking, portaling, focus management) to the underlying `Dialog` primitive.\n\n### When to use\n\n- Displaying read-only information the user needs to acknowledge and dismiss (help text, details panels, metadata)\n- Any scenario where the dialog has no footer actions — the user's only task is to read and close\n\n### When not to use\n\n- Dialogs that need confirmation, cancellation, or destructive action buttons — use `Dialog` directly or a confirmation pattern\n- Dialogs hosting editable forms — use `Dialog` directly with form wiring\n- Any scenario that needs a non-default size or non-default dismiss behaviour — drop down to `Dialog` directly (see the escape hatch in the developer documentation)\n\n### Resources\n\nFor detailed guidance on the underlying primitive, consult the component guidelines:\n\n- [Dialog Guidelines](/components/feedback/dialog) — Variants, dismissability, sizing, placement, accessibility\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/patterns-dialogs-infodialog--docs)\n",
81
+ "views": {
82
+ "overview": {
83
+ "mdx": "\n## Overview\n\nInfoDialog is a pattern component that wraps the Dialog primitive in a flat, minimal API for the most common read-only informational dialog shape: a title, some content, and a close affordance. It is the recommended replacement for the Merchant Center Application Kit's `InfoDialog`.\n\nThe pattern exposes a small, flat set of props — `title`, `children`, and optional `isOpen` / `defaultOpen` / `onOpenChange` / `aria-label` — and delegates everything else (sizing, stacking, portaling, focus management) to the underlying `Dialog` primitive.\n\n### When to use\n\n- Displaying read-only information the user needs to acknowledge and dismiss (help text, details panels, metadata)\n- Any scenario where the dialog has no footer actions — the user's only task is to read and close\n\n### When not to use\n\n- Dialogs that need confirmation, cancellation, or destructive action buttons — use `Dialog` directly or a confirmation pattern\n- Dialogs hosting editable forms — use `Dialog` directly with form wiring\n- Any scenario that needs a non-default size or non-default dismiss behaviour — drop down to `Dialog` directly (see the escape hatch in the developer documentation)\n\n### Resources\n\nFor detailed guidance on the underlying primitive, consult the component guidelines:\n\n- [Dialog Guidelines](/components/feedback/dialog) — Variants, dismissability, sizing, placement, accessibility\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/patterns-dialogs-infodialog--docs)\n",
84
+ "toc": [
85
+ {
86
+ "value": "Overview",
87
+ "href": "#overview",
88
+ "depth": 2,
89
+ "numbering": [
90
+ 1,
91
+ 1
92
+ ],
93
+ "parent": "root"
94
+ },
95
+ {
96
+ "value": "When to use",
97
+ "href": "#when-to-use",
98
+ "depth": 3,
99
+ "numbering": [
100
+ 1,
101
+ 1,
102
+ 1
103
+ ],
104
+ "parent": "root"
105
+ },
106
+ {
107
+ "value": "When not to use",
108
+ "href": "#when-not-to-use",
109
+ "depth": 3,
110
+ "numbering": [
111
+ 1,
112
+ 1,
113
+ 2
114
+ ],
115
+ "parent": "root"
116
+ },
117
+ {
118
+ "value": "Resources",
119
+ "href": "#resources",
120
+ "depth": 3,
121
+ "numbering": [
122
+ 1,
123
+ 1,
124
+ 3
125
+ ],
126
+ "parent": "root"
127
+ }
128
+ ]
129
+ },
130
+ "dev": {
131
+ "mdx": "\n## Comparison: InfoDialog vs manual Dialog composition\n\n**With InfoDialog:**\n```tsx\n<InfoDialog\n title=\"Shipping restrictions\"\n isOpen={isOpen}\n onOpenChange={setIsOpen}\n>\n <Text>Some goods cannot be shipped to the selected region.</Text>\n</InfoDialog>\n```\n\n**Manual composition:**\n```tsx\n<Dialog.Root\n isOpen={isOpen}\n onOpenChange={setIsOpen}\n isDismissable\n>\n <Dialog.Content>\n <Dialog.Header>\n <Dialog.Title>Shipping restrictions</Dialog.Title>\n <Dialog.CloseTrigger />\n </Dialog.Header>\n <Dialog.Body>\n <Text>Some goods cannot be shipped to the selected region.</Text>\n </Dialog.Body>\n </Dialog.Content>\n</Dialog.Root>\n```\n\n### When to use which\n\n**Use InfoDialog when:**\n- You need a read-only informational dialog with no footer actions\n- The default dialog size and dismiss behaviour are appropriate\n- You want a flat four-prop API instead of composing six nested elements\n\n**Use Dialog directly when:**\n- You need a non-default size\n- You need to override dismissability (disable overlay click, disable Escape)\n- Your dialog has footer actions (Cancel/Confirm, destructive action, etc.)\n\n## Getting started\n\n### Import\n\n```tsx\nimport { InfoDialog, type InfoDialogProps } from '@commercetools/nimbus';\n```\n\n### Basic usage\n\nThe simplest implementation with a string title and controlled open state:\n\n```jsx live-dev\nconst App = () => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Button onPress={() => setIsOpen(true)}>Show shipping info</Button>\n <InfoDialog\n title=\"Shipping restrictions\"\n isOpen={isOpen}\n onOpenChange={setIsOpen}\n >\n <Text>\n Some goods cannot be shipped to the selected region. Review the\n restricted items and update the shipping address if needed.\n </Text>\n </InfoDialog>\n </>\n );\n}\n```\n\n## Usage examples\n\n### ReactNode title\n\nThe `title` prop accepts any ReactNode, so you can compose a heading with inline elements like a badge or icon:\n\n```jsx live-dev\nconst App = () => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Button onPress={() => setIsOpen(true)}>Show plan details</Button>\n <InfoDialog\n title={\n <Flex alignItems=\"center\" gap=\"200\">\n <Text>Plan details</Text>\n <Badge>Pro</Badge>\n </Flex>\n }\n isOpen={isOpen}\n onOpenChange={setIsOpen}\n >\n <Text>\n Your current plan includes unlimited projects and priority support.\n </Text>\n </InfoDialog>\n </>\n );\n}\n```\n\nWhen the `title` is not a plain string, pass an explicit `aria-label` if the composed markup does not form a meaningful accessible name on its own:\n\n```tsx\n<InfoDialog\n title={\n <Flex alignItems=\"center\" gap=\"200\">\n <Text>Plan details</Text>\n <Badge>Pro</Badge>\n </Flex>\n }\n aria-label=\"Plan details\"\n isOpen={isOpen}\n onOpenChange={setIsOpen}\n>\n {/* ... */}\n</InfoDialog>\n```\n\n### Long, scrollable content\n\nContent that exceeds the available dialog height scrolls within the body; the header with the title and close button stays pinned at the top.\n\n```jsx live-dev\nconst App = () => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Button onPress={() => setIsOpen(true)}>Show terms</Button>\n <InfoDialog\n title=\"Terms of service\"\n isOpen={isOpen}\n onOpenChange={setIsOpen}\n >\n <Stack gap=\"400\">\n {Array.from({ length: 20 }, (_, i) => (\n <Text key={i}>\n Paragraph {i + 1}: Lorem ipsum dolor sit amet, consectetur\n adipiscing elit. Sed do eiusmod tempor incididunt ut labore et\n dolore magna aliqua.\n </Text>\n ))}\n </Stack>\n </InfoDialog>\n </>\n );\n}\n```\n\n## Close affordances\n\nBecause InfoDialog has no footer actions, the underlying Dialog is always rendered with `isDismissable` enabled so the user has multiple ways to close it:\n\n- The X button in the header\n- The Escape key\n- A click on the overlay outside the dialog content\n\nAll three routes invoke `onOpenChange(false)`.\n\n## Accessibility\n\nInfoDialog inherits its accessibility guarantees from the Nimbus `Dialog` primitive:\n\n- `role=\"dialog\"` is exposed to assistive technology while open\n- Focus moves into the dialog on open and is trapped within it\n- Focus is restored to the triggering element on close\n- When `title` is a string, the dialog's accessible name is derived from it automatically — no extra `aria-label` is required\n\nIf the `title` is a composed ReactNode, pass an explicit `aria-label` to InfoDialog so the dialog has a meaningful accessible name.\n\n## Escape hatch\n\nIf you need a non-default size or a custom dismiss behaviour, drop down to composing `Dialog` directly. The equivalent manual composition is:\n\n```jsx live-dev\nconst App = () => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Button onPress={() => setIsOpen(true)}>Open large dialog</Button>\n <Dialog.Root\n isOpen={isOpen}\n onOpenChange={setIsOpen}\n isDismissable\n aria-label=\"Shipping restrictions\"\n >\n <Dialog.Content size=\"lg\">\n <Dialog.Header>\n <Dialog.Title>Shipping restrictions</Dialog.Title>\n <Dialog.CloseTrigger />\n </Dialog.Header>\n <Dialog.Body>\n <Text>\n Some goods cannot be shipped to the selected region.\n </Text>\n </Dialog.Body>\n </Dialog.Content>\n </Dialog.Root>\n </>\n );\n}\n```\n\n## API reference\n\n<PropsTable id=\"InfoDialog\" />\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using InfoDialog within your application. The component's internal behaviour is already covered by Nimbus — these tests help you verify your integration.\n\n### Basic Rendering\n\nVerify the InfoDialog opens and renders its title and content.\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport { userEvent } from \"@testing-library/user-event\";\nimport { useState } from \"react\";\nimport {\n Badge,\n Flex,\n InfoDialog,\n NimbusProvider,\n Text,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"InfoDialog - Basic rendering\", () => {\n it(\"renders title and children when isOpen is true\", () => {\n render(\n <NimbusProvider>\n <InfoDialog title=\"Heads up\" isOpen>\n <p>Something you should know.</p>\n </InfoDialog>\n </NimbusProvider>\n );\n\n expect(\n screen.getByRole(\"heading\", { name: \"Heads up\" })\n ).toBeInTheDocument();\n expect(screen.getByText(\"Something you should know.\")).toBeInTheDocument();\n });\n\n it(\"uses the string title as the dialog's accessible name\", () => {\n render(\n <NimbusProvider>\n <InfoDialog title=\"Account details\" isOpen>\n <p>Body</p>\n </InfoDialog>\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"dialog\")).toHaveAccessibleName(\"Account details\");\n });\n\n it(\"does not render the dialog when isOpen is false\", () => {\n render(\n <NimbusProvider>\n <InfoDialog title=\"Hidden\" isOpen={false}>\n <p>Not visible</p>\n </InfoDialog>\n </NimbusProvider>\n );\n\n expect(screen.queryByRole(\"dialog\")).not.toBeInTheDocument();\n });\n});\n```\n\n### Controlled Open State\n\nDrive the InfoDialog from consumer state via isOpen and onOpenChange.\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport { userEvent } from \"@testing-library/user-event\";\nimport { useState } from \"react\";\nimport {\n Badge,\n Flex,\n InfoDialog,\n NimbusProvider,\n Text,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"InfoDialog - Controlled state\", () => {\n it(\"invokes onOpenChange(false) when the close button is clicked\", async () => {\n const user = userEvent.setup();\n\n const ControlledInfoDialog = () => {\n const [isOpen, setIsOpen] = useState(true);\n return (\n <InfoDialog title=\"Close me\" isOpen={isOpen} onOpenChange={setIsOpen}>\n <p>Dismissable content</p>\n </InfoDialog>\n );\n };\n\n render(\n <NimbusProvider>\n <ControlledInfoDialog />\n </NimbusProvider>\n );\n\n await waitFor(() => expect(screen.getByRole(\"dialog\")).toBeInTheDocument());\n\n await user.click(screen.getByRole(\"button\", { name: /close/i }));\n\n await waitFor(() => {\n expect(screen.queryByRole(\"dialog\")).not.toBeInTheDocument();\n });\n });\n});\n```\n\n### Uncontrolled Open State\n\nOpen the InfoDialog by default without managing state via defaultOpen.\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport { userEvent } from \"@testing-library/user-event\";\nimport { useState } from \"react\";\nimport {\n Badge,\n Flex,\n InfoDialog,\n NimbusProvider,\n Text,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"InfoDialog - Uncontrolled state\", () => {\n it(\"opens by default in uncontrolled mode via defaultOpen\", () => {\n render(\n <NimbusProvider>\n <InfoDialog title=\"Welcome\" defaultOpen>\n <p>Shown immediately on mount.</p>\n </InfoDialog>\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"dialog\")).toBeInTheDocument();\n expect(screen.getByText(\"Shown immediately on mount.\")).toBeInTheDocument();\n });\n});\n```\n\n### Accessible Name Override\n\nProvide an explicit aria-label when a composed ReactNode title does not form a meaningful accessible name.\n\n```tsx\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen, waitFor } from \"@testing-library/react\";\nimport { userEvent } from \"@testing-library/user-event\";\nimport { useState } from \"react\";\nimport {\n Badge,\n Flex,\n InfoDialog,\n NimbusProvider,\n Text,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"InfoDialog - Accessible name override\", () => {\n it(\"uses aria-label as the accessible name when provided\", () => {\n render(\n <NimbusProvider>\n <InfoDialog\n title={\n <Flex alignItems=\"center\" gap=\"200\">\n <Text>Plan details</Text>\n <Badge>Pro</Badge>\n </Flex>\n }\n aria-label=\"Plan details\"\n isOpen\n >\n <p>Your current plan includes unlimited projects.</p>\n </InfoDialog>\n </NimbusProvider>\n );\n\n expect(screen.getByRole(\"dialog\")).toHaveAccessibleName(\"Plan details\");\n });\n});\n```\n\n",
132
+ "toc": [
133
+ {
134
+ "value": "Comparison: InfoDialog vs manual Dialog composition",
135
+ "href": "#comparison-infodialog-vs-manual-dialog-composition",
136
+ "depth": 2,
137
+ "numbering": [
138
+ 1,
139
+ 1
140
+ ],
141
+ "parent": "root"
142
+ },
143
+ {
144
+ "value": "When to use which",
145
+ "href": "#when-to-use-which",
146
+ "depth": 3,
147
+ "numbering": [
148
+ 1,
149
+ 1,
150
+ 1
151
+ ],
152
+ "parent": "root"
153
+ },
154
+ {
155
+ "value": "Getting started",
156
+ "href": "#getting-started",
157
+ "depth": 2,
158
+ "numbering": [
159
+ 1,
160
+ 2
161
+ ],
162
+ "parent": "root"
163
+ },
164
+ {
165
+ "value": "Import",
166
+ "href": "#import",
167
+ "depth": 3,
168
+ "numbering": [
169
+ 1,
170
+ 2,
171
+ 1
172
+ ],
173
+ "parent": "root"
174
+ },
175
+ {
176
+ "value": "Basic usage",
177
+ "href": "#basic-usage",
178
+ "depth": 3,
179
+ "numbering": [
180
+ 1,
181
+ 2,
182
+ 2
183
+ ],
184
+ "parent": "root"
185
+ },
186
+ {
187
+ "value": "Usage examples",
188
+ "href": "#usage-examples",
189
+ "depth": 2,
190
+ "numbering": [
191
+ 1,
192
+ 3
193
+ ],
194
+ "parent": "root"
195
+ },
196
+ {
197
+ "value": "ReactNode title",
198
+ "href": "#reactnode-title",
199
+ "depth": 3,
200
+ "numbering": [
201
+ 1,
202
+ 3,
203
+ 1
204
+ ],
205
+ "parent": "root"
206
+ },
207
+ {
208
+ "value": "Long, scrollable content",
209
+ "href": "#long-scrollable-content",
210
+ "depth": 3,
211
+ "numbering": [
212
+ 1,
213
+ 3,
214
+ 2
215
+ ],
216
+ "parent": "root"
217
+ },
218
+ {
219
+ "value": "Close affordances",
220
+ "href": "#close-affordances",
221
+ "depth": 2,
222
+ "numbering": [
223
+ 1,
224
+ 4
225
+ ],
226
+ "parent": "root"
227
+ },
228
+ {
229
+ "value": "Accessibility",
230
+ "href": "#accessibility",
231
+ "depth": 2,
232
+ "numbering": [
233
+ 1,
234
+ 5
235
+ ],
236
+ "parent": "root"
237
+ },
238
+ {
239
+ "value": "Escape hatch",
240
+ "href": "#escape-hatch",
241
+ "depth": 2,
242
+ "numbering": [
243
+ 1,
244
+ 6
245
+ ],
246
+ "parent": "root"
247
+ },
248
+ {
249
+ "value": "API reference",
250
+ "href": "#api-reference",
251
+ "depth": 2,
252
+ "numbering": [
253
+ 1,
254
+ 7
255
+ ],
256
+ "parent": "root"
257
+ },
258
+ {
259
+ "value": "Testing your implementation",
260
+ "href": "#testing-your-implementation",
261
+ "depth": 2,
262
+ "numbering": [
263
+ 1,
264
+ 8
265
+ ],
266
+ "parent": "root"
267
+ },
268
+ {
269
+ "value": "Basic Rendering",
270
+ "href": "#basic-rendering",
271
+ "depth": 3,
272
+ "numbering": [
273
+ 1,
274
+ 8,
275
+ 1
276
+ ],
277
+ "parent": "root"
278
+ },
279
+ {
280
+ "value": "Controlled Open State",
281
+ "href": "#controlled-open-state",
282
+ "depth": 3,
283
+ "numbering": [
284
+ 1,
285
+ 8,
286
+ 2
287
+ ],
288
+ "parent": "root"
289
+ },
290
+ {
291
+ "value": "Uncontrolled Open State",
292
+ "href": "#uncontrolled-open-state",
293
+ "depth": 3,
294
+ "numbering": [
295
+ 1,
296
+ 8,
297
+ 3
298
+ ],
299
+ "parent": "root"
300
+ },
301
+ {
302
+ "value": "Accessible Name Override",
303
+ "href": "#accessible-name-override",
304
+ "depth": 3,
305
+ "numbering": [
306
+ 1,
307
+ 8,
308
+ 4
309
+ ],
310
+ "parent": "root"
311
+ }
312
+ ]
313
+ }
314
+ }
315
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "meta": {
3
+ "id": "Patterns-Dialogs",
4
+ "title": "Dialogs",
5
+ "description": "Pre-composed dialog patterns built on top of the Dialog primitive for common read-only and confirmation scenarios",
6
+ "order": 2,
7
+ "repoPath": "packages/nimbus/src/docs/dialogs.mdx",
8
+ "menu": [
9
+ "Patterns",
10
+ "Dialogs"
11
+ ],
12
+ "route": "patterns/dialogs",
13
+ "tags": [
14
+ "patterns",
15
+ "dialogs",
16
+ "overlays"
17
+ ],
18
+ "toc": [
19
+ {
20
+ "value": "When to use dialog patterns",
21
+ "href": "#when-to-use-dialog-patterns",
22
+ "depth": 2,
23
+ "numbering": [
24
+ 1,
25
+ 1
26
+ ],
27
+ "parent": "root"
28
+ },
29
+ {
30
+ "value": "Available dialog patterns",
31
+ "href": "#available-dialog-patterns",
32
+ "depth": 2,
33
+ "numbering": [
34
+ 1,
35
+ 2
36
+ ],
37
+ "parent": "root"
38
+ }
39
+ ],
40
+ "icon": "OpenInNew",
41
+ "layout": "app-frame",
42
+ "tabs": [
43
+ {
44
+ "key": "overview",
45
+ "title": "Overview",
46
+ "order": 0
47
+ }
48
+ ]
49
+ },
50
+ "mdx": "\n# Dialogs\n\nDialog pattern components wrap the `Dialog` primitive in small, opinionated APIs for the most common dialog shapes. Use them to avoid hand-composing `Dialog.Root`, `Dialog.Content`, `Dialog.Header`, `Dialog.Title`, `Dialog.Body`, and `Dialog.CloseTrigger` for everyday cases.\n\n## When to use dialog patterns\n\nDialog patterns are ideal for:\n- Read-only informational dialogs (help text, details, metadata)\n- Simple, scoped dialog shapes that appear many times across an app\n- Reducing boilerplate and ensuring consistent close affordances\n\nFor dialogs with bespoke footer actions, non-default sizing, or custom dismiss behaviour, compose the `Dialog` primitive directly.\n\n## Available dialog patterns\n\n<CategoryOverview variant=\"list\" />\n",
51
+ "views": {
52
+ "overview": {
53
+ "mdx": "\n# Dialogs\n\nDialog pattern components wrap the `Dialog` primitive in small, opinionated APIs for the most common dialog shapes. Use them to avoid hand-composing `Dialog.Root`, `Dialog.Content`, `Dialog.Header`, `Dialog.Title`, `Dialog.Body`, and `Dialog.CloseTrigger` for everyday cases.\n\n## When to use dialog patterns\n\nDialog patterns are ideal for:\n- Read-only informational dialogs (help text, details, metadata)\n- Simple, scoped dialog shapes that appear many times across an app\n- Reducing boilerplate and ensuring consistent close affordances\n\nFor dialogs with bespoke footer actions, non-default sizing, or custom dismiss behaviour, compose the `Dialog` primitive directly.\n\n## Available dialog patterns\n\n<CategoryOverview variant=\"list\" />\n",
54
+ "toc": [
55
+ {
56
+ "value": "When to use dialog patterns",
57
+ "href": "#when-to-use-dialog-patterns",
58
+ "depth": 2,
59
+ "numbering": [
60
+ 1,
61
+ 1
62
+ ],
63
+ "parent": "root"
64
+ },
65
+ {
66
+ "value": "Available dialog patterns",
67
+ "href": "#available-dialog-patterns",
68
+ "depth": 2,
69
+ "numbering": [
70
+ 1,
71
+ 2
72
+ ],
73
+ "parent": "root"
74
+ }
75
+ ]
76
+ }
77
+ }
78
+ }