@commercetools/nimbus-mcp 3.3.0 → 3.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/data/docs/route-manifest.json +714 -14
- package/data/docs/routes/components-data-display-data-table.json +172 -14
- package/data/docs/routes/components-data-display-item-group.json +413 -0
- package/data/docs/routes/components-data-display-item.json +611 -0
- package/data/docs/routes/components-feedback-skeleton.json +481 -0
- package/data/docs/routes/components-feedback-skeletoncircle.json +429 -0
- package/data/docs/routes/components-feedback-skeletontext.json +417 -0
- package/data/docs/routes/components-inputs-range-slider.json +633 -0
- package/data/docs/routes/components-inputs-slider.json +611 -0
- package/data/docs/routes/components-navigation-breadcrumbs.json +565 -0
- package/data/docs/routes/home-getting-started-installation.json +2 -2
- package/data/docs/routes/icons.json +3 -3
- package/data/docs/search-index.json +1 -1
- package/data/docs/types/AccordionContent.json +27 -27
- package/data/docs/types/AccordionHeader.json +89 -89
- package/data/docs/types/AccordionItem.json +22 -22
- package/data/docs/types/AccordionRoot.json +14 -14
- package/data/docs/types/ActivityIndicator.json +2 -2
- package/data/docs/types/AlertDescription.json +8 -8
- package/data/docs/types/AlertDismissButton.json +80 -80
- package/data/docs/types/AlertTitle.json +8 -8
- package/data/docs/types/Avatar.json +2 -2
- package/data/docs/types/Badge.json +3 -3
- package/data/docs/types/Body.json +6 -6
- package/data/docs/types/Box.json +6 -6
- package/data/docs/types/Breadcrumbs.json +12 -0
- package/data/docs/types/BreadcrumbsItem.json +296 -0
- package/data/docs/types/BreadcrumbsItemProps.json +9 -0
- package/data/docs/types/BreadcrumbsProps.json +9 -0
- package/data/docs/types/BreadcrumbsRoot.json +110 -0
- package/data/docs/types/Button.json +88 -88
- package/data/docs/types/Calendar.json +56 -56
- package/data/docs/types/Caption.json +6 -6
- package/data/docs/types/CardRoot.json +2 -2
- package/data/docs/types/Cell.json +20 -20
- package/data/docs/types/ChatMessageAvatar.json +2 -2
- package/data/docs/types/ChatMessageListRoot.json +2 -2
- package/data/docs/types/ChatMessageRoot.json +2 -2
- package/data/docs/types/Checkbox.json +88 -88
- package/data/docs/types/Code.json +10 -10
- package/data/docs/types/CollapsibleMotionContent.json +2 -2
- package/data/docs/types/CollapsibleMotionRoot.json +2 -2
- package/data/docs/types/CollapsibleMotionTrigger.json +4 -4
- package/data/docs/types/Column.json +8 -8
- package/data/docs/types/ColumnGroup.json +8 -8
- package/data/docs/types/ColumnHeader.json +18 -18
- package/data/docs/types/ComboBoxListBox.json +70 -70
- package/data/docs/types/ComboBoxOption.json +64 -64
- package/data/docs/types/ComboBoxPopover.json +148 -72
- package/data/docs/types/ComboBoxRoot.json +8 -8
- package/data/docs/types/ComboBoxSection.json +25 -25
- package/data/docs/types/ComboBoxTrigger.json +6 -6
- package/data/docs/types/Content.json +2 -2
- package/data/docs/types/DataTable.json +38 -23
- package/data/docs/types/DataTableBody.json +60 -79
- package/data/docs/types/DataTableCell.json +434 -0
- package/data/docs/types/DataTableColumn.json +540 -0
- package/data/docs/types/DataTableHeader.json +62 -85
- package/data/docs/types/DataTableRoot.json +38 -23
- package/data/docs/types/DataTableRow.json +790 -0
- package/data/docs/types/DataTableTable.json +20 -20
- package/data/docs/types/DateInput.json +72 -72
- package/data/docs/types/DatePicker.json +58 -58
- package/data/docs/types/DateRangePicker.json +86 -86
- package/data/docs/types/DateRangePickerField.json +86 -86
- package/data/docs/types/DefaultPageBackLink.json +16 -16
- package/data/docs/types/DefaultPageRoot.json +2 -2
- package/data/docs/types/DialogCloseTrigger.json +78 -78
- package/data/docs/types/DialogTrigger.json +2 -2
- package/data/docs/types/DraggableListField.json +62 -62
- package/data/docs/types/DraggableListItem.json +100 -53
- package/data/docs/types/DraggableListRoot.json +62 -62
- package/data/docs/types/DrawerCloseTrigger.json +78 -78
- package/data/docs/types/DrawerTrigger.json +2 -2
- package/data/docs/types/DropZone.json +14 -14
- package/data/docs/types/FieldErrors.json +2 -2
- package/data/docs/types/Flex.json +22 -22
- package/data/docs/types/FloatingActionButton.json +88 -88
- package/data/docs/types/Footer.json +6 -6
- package/data/docs/types/FormFieldRoot.json +2 -2
- package/data/docs/types/Grid.json +24 -24
- package/data/docs/types/Group.json +12 -12
- package/data/docs/types/Header.json +6 -6
- package/data/docs/types/Heading.json +8 -8
- package/data/docs/types/Icon.json +4 -4
- package/data/docs/types/IconButton.json +88 -88
- package/data/docs/types/IconToggleButton.json +72 -72
- package/data/docs/types/Image.json +30 -30
- package/data/docs/types/Indicator.json +6 -6
- package/data/docs/types/InlineSvg.json +2 -2
- package/data/docs/types/Item.json +6 -6
- package/data/docs/types/ItemActions.json +27 -0
- package/data/docs/types/ItemContent.json +27 -0
- package/data/docs/types/ItemDescription.json +27 -0
- package/data/docs/types/ItemFooter.json +27 -0
- package/data/docs/types/ItemGroup.json +12 -0
- package/data/docs/types/ItemGroupRoot.json +27 -0
- package/data/docs/types/ItemGroupSeparator.json +27 -0
- package/data/docs/types/ItemHeader.json +27 -0
- package/data/docs/types/ItemMedia.json +56 -0
- package/data/docs/types/ItemRoot.json +239 -0
- package/data/docs/types/ItemTitle.json +27 -0
- package/data/docs/types/Kbd.json +8 -8
- package/data/docs/types/Link.json +30 -30
- package/data/docs/types/ListIndicator.json +6 -6
- package/data/docs/types/ListItem.json +6 -6
- package/data/docs/types/ListRoot.json +10 -10
- package/data/docs/types/LoadingSpinner.json +2 -2
- package/data/docs/types/MakeElementFocusable.json +18 -18
- package/data/docs/types/Markdown.json +6 -6
- package/data/docs/types/MenuItem.json +63 -63
- package/data/docs/types/MenuRoot.json +56 -56
- package/data/docs/types/MenuSection.json +31 -31
- package/data/docs/types/MenuSubmenuTrigger.json +4 -4
- package/data/docs/types/MenuTrigger.json +89 -89
- package/data/docs/types/MultilineTextInput.json +104 -104
- package/data/docs/types/MultilineTextInputField.json +102 -102
- package/data/docs/types/NumberInput.json +86 -86
- package/data/docs/types/NumberInputField.json +82 -82
- package/data/docs/types/PageContentColumn.json +6 -6
- package/data/docs/types/PageContentRoot.json +6 -6
- package/data/docs/types/PasswordInput.json +100 -100
- package/data/docs/types/PasswordInputField.json +100 -100
- package/data/docs/types/ProgressBar.json +13 -13
- package/data/docs/types/RadioInputOption.json +56 -56
- package/data/docs/types/RadioInputRoot.json +48 -48
- package/data/docs/types/RangeCalendar.json +58 -58
- package/data/docs/types/RangeSlider.json +337 -0
- package/data/docs/types/RangeSliderProps.json +9 -0
- package/data/docs/types/Region.json +6 -6
- package/data/docs/types/RegionTarget.json +6 -6
- package/data/docs/types/RichTextInput.json +2 -2
- package/data/docs/types/Root.json +10 -10
- package/data/docs/types/Row.json +6 -6
- package/data/docs/types/ScrollArea.json +2 -2
- package/data/docs/types/SearchInput.json +106 -106
- package/data/docs/types/SearchInputField.json +102 -102
- package/data/docs/types/SelectOption.json +54 -54
- package/data/docs/types/SelectOptionGroup.json +18 -18
- package/data/docs/types/SelectOptions.json +64 -64
- package/data/docs/types/SelectRoot.json +92 -92
- package/data/docs/types/Separator.json +4 -4
- package/data/docs/types/SimpleGrid.json +28 -28
- package/data/docs/types/Skeleton.json +129 -0
- package/data/docs/types/SkeletonCircle.json +103 -0
- package/data/docs/types/SkeletonCircleProps.json +9 -0
- package/data/docs/types/SkeletonProps.json +9 -0
- package/data/docs/types/SkeletonText.json +62 -0
- package/data/docs/types/SkeletonTextProps.json +9 -0
- package/data/docs/types/Slider.json +337 -0
- package/data/docs/types/SplitButton.json +10 -10
- package/data/docs/types/Stack.json +2 -2
- package/data/docs/types/StepsNextTrigger.json +2 -2
- package/data/docs/types/StepsPrevTrigger.json +2 -2
- package/data/docs/types/StepsRoot.json +2 -2
- package/data/docs/types/StepsTrigger.json +2 -2
- package/data/docs/types/Switch.json +36 -36
- package/data/docs/types/TabNavItem.json +18 -18
- package/data/docs/types/TabNavRoot.json +2 -2
- package/data/docs/types/TableBody.json +6 -6
- package/data/docs/types/TableCaption.json +6 -6
- package/data/docs/types/TableCell.json +20 -20
- package/data/docs/types/TableColumn.json +8 -8
- package/data/docs/types/TableColumnGroup.json +8 -8
- package/data/docs/types/TableColumnHeader.json +18 -18
- package/data/docs/types/TableFooter.json +6 -6
- package/data/docs/types/TableHeader.json +6 -6
- package/data/docs/types/TableRoot.json +32 -32
- package/data/docs/types/TableRow.json +6 -6
- package/data/docs/types/TableScrollArea.json +6 -6
- package/data/docs/types/TabsTab.json +2 -2
- package/data/docs/types/TagGroupRoot.json +24 -24
- package/data/docs/types/TagGroupTag.json +56 -56
- package/data/docs/types/TagGroupTagList.json +15 -15
- package/data/docs/types/Text.json +8 -8
- package/data/docs/types/TextInput.json +102 -102
- package/data/docs/types/TextInputField.json +100 -100
- package/data/docs/types/TimeInput.json +68 -68
- package/data/docs/types/ToggleButton.json +74 -74
- package/data/docs/types/ToggleButtonGroupButton.json +32 -32
- package/data/docs/types/ToggleButtonGroupRoot.json +20 -20
- package/data/docs/types/Toolbar.json +9 -9
- package/data/docs/types/TooltipContent.json +28 -28
- package/data/docs/types/TooltipRoot.json +16 -16
- package/data/docs/types/TreeIndicator.json +82 -82
- package/data/docs/types/TreeItem.json +100 -51
- package/data/docs/types/TreeRoot.json +57 -57
- package/data/docs/types/Trigger.json +4 -4
- package/data/docs/types/VisuallyHidden.json +6 -6
- package/data/docs/types/createItemsFromCsvDrop.json +4 -4
- package/data/docs/types/createItemsFromDirectoryDrop.json +4 -4
- package/data/docs/types/createItemsFromFileDrop.json +4 -4
- package/data/docs/types/createItemsFromImageDrop.json +4 -4
- package/data/docs/types/createItemsFromJsonDrop.json +4 -4
- package/data/docs/types/manifest.json +28 -0
- package/data/docs/types/useRegion.json +2 -2
- package/data/docs/types/useTree.json +24 -24
- package/data/tokens.json +42 -0
- package/package.json +7 -7
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"id": "Components-SkeletonCircle",
|
|
4
|
+
"title": "SkeletonCircle",
|
|
5
|
+
"exportName": "SkeletonCircle",
|
|
6
|
+
"description": "A circular loading placeholder sized to the Avatar scale, for avatars and icons.",
|
|
7
|
+
"lifecycleState": "Stable",
|
|
8
|
+
"order": 999,
|
|
9
|
+
"repoPath": "packages/nimbus/src/components/skeleton/derivatives/skeleton-circle/skeleton-circle.mdx",
|
|
10
|
+
"menu": [
|
|
11
|
+
"Components",
|
|
12
|
+
"Feedback",
|
|
13
|
+
"SkeletonCircle"
|
|
14
|
+
],
|
|
15
|
+
"route": "components/feedback/skeletoncircle",
|
|
16
|
+
"tags": [
|
|
17
|
+
"component",
|
|
18
|
+
"skeleton",
|
|
19
|
+
"loading",
|
|
20
|
+
"placeholder",
|
|
21
|
+
"feedback",
|
|
22
|
+
"circle",
|
|
23
|
+
"avatar"
|
|
24
|
+
],
|
|
25
|
+
"toc": [
|
|
26
|
+
{
|
|
27
|
+
"value": "Overview",
|
|
28
|
+
"href": "#overview",
|
|
29
|
+
"depth": 2,
|
|
30
|
+
"numbering": [
|
|
31
|
+
1,
|
|
32
|
+
1
|
|
33
|
+
],
|
|
34
|
+
"parent": "root"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"value": "Resources",
|
|
38
|
+
"href": "#resources",
|
|
39
|
+
"depth": 3,
|
|
40
|
+
"numbering": [
|
|
41
|
+
1,
|
|
42
|
+
1,
|
|
43
|
+
1
|
|
44
|
+
],
|
|
45
|
+
"parent": "root"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"value": "Variables",
|
|
49
|
+
"href": "#variables",
|
|
50
|
+
"depth": 2,
|
|
51
|
+
"numbering": [
|
|
52
|
+
1,
|
|
53
|
+
2
|
|
54
|
+
],
|
|
55
|
+
"parent": "root"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"value": "Size",
|
|
59
|
+
"href": "#size",
|
|
60
|
+
"depth": 3,
|
|
61
|
+
"numbering": [
|
|
62
|
+
1,
|
|
63
|
+
2,
|
|
64
|
+
1
|
|
65
|
+
],
|
|
66
|
+
"parent": "root"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"value": "Custom dimension",
|
|
70
|
+
"href": "#custom-dimension",
|
|
71
|
+
"depth": 3,
|
|
72
|
+
"numbering": [
|
|
73
|
+
1,
|
|
74
|
+
2,
|
|
75
|
+
2
|
|
76
|
+
],
|
|
77
|
+
"parent": "root"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"value": "Inline default",
|
|
81
|
+
"href": "#inline-default",
|
|
82
|
+
"depth": 3,
|
|
83
|
+
"numbering": [
|
|
84
|
+
1,
|
|
85
|
+
2,
|
|
86
|
+
3
|
|
87
|
+
],
|
|
88
|
+
"parent": "root"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"value": "Guidelines",
|
|
92
|
+
"href": "#guidelines",
|
|
93
|
+
"depth": 2,
|
|
94
|
+
"numbering": [
|
|
95
|
+
1,
|
|
96
|
+
3
|
|
97
|
+
],
|
|
98
|
+
"parent": "root"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"value": "Best practices",
|
|
102
|
+
"href": "#best-practices",
|
|
103
|
+
"depth": 3,
|
|
104
|
+
"numbering": [
|
|
105
|
+
1,
|
|
106
|
+
3,
|
|
107
|
+
1
|
|
108
|
+
],
|
|
109
|
+
"parent": "root"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"value": "When to use",
|
|
113
|
+
"href": "#when-to-use",
|
|
114
|
+
"depth": 3,
|
|
115
|
+
"numbering": [
|
|
116
|
+
1,
|
|
117
|
+
3,
|
|
118
|
+
2
|
|
119
|
+
],
|
|
120
|
+
"parent": "root"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"layout": "app-frame",
|
|
124
|
+
"tabs": [
|
|
125
|
+
{
|
|
126
|
+
"key": "overview",
|
|
127
|
+
"title": "Overview",
|
|
128
|
+
"order": 0
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"key": "dev",
|
|
132
|
+
"title": "Implementation",
|
|
133
|
+
"order": 3
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"mdx": "\n## Overview\n\n`SkeletonCircle` is a circular loading placeholder for avatars, user icons, and\ncircular thumbnails. Its `size` prop is aligned with the Avatar scale, so it can\nstand in for an `Avatar` at the same dimensions while the image loads — keeping\nthe layout stable during the transition.\n\n`SkeletonCircle` is part of the Skeleton family, a convenience wrapper over\n[Skeleton](/components/feedback/skeleton) with `shape=\"circle\"`. For rectangular\nblocks use `Skeleton`; for paragraphs of text use\n[SkeletonText](/components/feedback/skeletontext).\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[Figma library](https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system)\n\n## Variables\n\nGet familiar with the features.\n\n### Size\n\nUse the avatar-aligned `size` prop to match an `Avatar`: `2xs` (24 px), `xs`\n(32 px), or `md` (40 px). The value applies equally to width and height.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <SkeletonCircle size=\"2xs\" />\n <SkeletonCircle size=\"xs\" />\n <SkeletonCircle size=\"md\" />\n </Stack>\n)\n```\n\n### Custom dimension\n\nFor a size outside the Avatar scale, pass `boxSize` (a spacing token or CSS\nvalue). It sets both width and height, keeping the circle perfectly round.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <SkeletonCircle boxSize=\"1600\" />\n <SkeletonCircle boxSize=\"4800\" />\n <SkeletonCircle boxSize=\"80px\" />\n </Stack>\n)\n```\n\n### Inline default\n\nWith neither `size` nor `boxSize` set, `SkeletonCircle` defaults to a `1em`\ncircle that matches the current line height — handy for a placeholder icon\nsitting inline next to text.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"200\" alignItems=\"center\">\n <SkeletonCircle />\n <Text>Loading inline label…</Text>\n </Stack>\n)\n```\n\n## Guidelines\n\n### Best practices\n\n- When standing in for an `Avatar`, use the matching `size` value so the\n placeholder and the loaded avatar occupy exactly the same space.\n- Reach for `boxSize` only when the circle sits outside the Avatar scale;\n otherwise prefer the named `size` for consistency.\n- Pair `SkeletonCircle` with [SkeletonText](/components/feedback/skeletontext)\n to build avatar-plus-text loading rows.\n\n### When to use\n\n> [!TIP]\\\n> Use SkeletonCircle when:\n- You are loading an avatar, user icon, or circular thumbnail\n- You want the placeholder to match the Avatar size scale\n- A row or card pairs a circular image with adjacent text\n\n> [!CAUTION]\\\n> When NOT to use SkeletonCircle:\n- For rectangular content such as images or cards — use\n [Skeleton](/components/feedback/skeleton) instead\n- For paragraphs of text — use\n [SkeletonText](/components/feedback/skeletontext)\n",
|
|
138
|
+
"views": {
|
|
139
|
+
"overview": {
|
|
140
|
+
"mdx": "\n## Overview\n\n`SkeletonCircle` is a circular loading placeholder for avatars, user icons, and\ncircular thumbnails. Its `size` prop is aligned with the Avatar scale, so it can\nstand in for an `Avatar` at the same dimensions while the image loads — keeping\nthe layout stable during the transition.\n\n`SkeletonCircle` is part of the Skeleton family, a convenience wrapper over\n[Skeleton](/components/feedback/skeleton) with `shape=\"circle\"`. For rectangular\nblocks use `Skeleton`; for paragraphs of text use\n[SkeletonText](/components/feedback/skeletontext).\n\n### Resources\n\nDeep dive into implementation details and access the Nimbus design library.\n\n[Figma library](https://www.figma.com/design/AvtPX6g7OGGCRvNlatGOIY/NIMBUS-design-system)\n\n## Variables\n\nGet familiar with the features.\n\n### Size\n\nUse the avatar-aligned `size` prop to match an `Avatar`: `2xs` (24 px), `xs`\n(32 px), or `md` (40 px). The value applies equally to width and height.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <SkeletonCircle size=\"2xs\" />\n <SkeletonCircle size=\"xs\" />\n <SkeletonCircle size=\"md\" />\n </Stack>\n)\n```\n\n### Custom dimension\n\nFor a size outside the Avatar scale, pass `boxSize` (a spacing token or CSS\nvalue). It sets both width and height, keeping the circle perfectly round.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <SkeletonCircle boxSize=\"1600\" />\n <SkeletonCircle boxSize=\"4800\" />\n <SkeletonCircle boxSize=\"80px\" />\n </Stack>\n)\n```\n\n### Inline default\n\nWith neither `size` nor `boxSize` set, `SkeletonCircle` defaults to a `1em`\ncircle that matches the current line height — handy for a placeholder icon\nsitting inline next to text.\n\n```jsx live\nconst App = () => (\n <Stack direction=\"row\" gap=\"200\" alignItems=\"center\">\n <SkeletonCircle />\n <Text>Loading inline label…</Text>\n </Stack>\n)\n```\n\n## Guidelines\n\n### Best practices\n\n- When standing in for an `Avatar`, use the matching `size` value so the\n placeholder and the loaded avatar occupy exactly the same space.\n- Reach for `boxSize` only when the circle sits outside the Avatar scale;\n otherwise prefer the named `size` for consistency.\n- Pair `SkeletonCircle` with [SkeletonText](/components/feedback/skeletontext)\n to build avatar-plus-text loading rows.\n\n### When to use\n\n> [!TIP]\\\n> Use SkeletonCircle when:\n- You are loading an avatar, user icon, or circular thumbnail\n- You want the placeholder to match the Avatar size scale\n- A row or card pairs a circular image with adjacent text\n\n> [!CAUTION]\\\n> When NOT to use SkeletonCircle:\n- For rectangular content such as images or cards — use\n [Skeleton](/components/feedback/skeleton) instead\n- For paragraphs of text — use\n [SkeletonText](/components/feedback/skeletontext)\n",
|
|
141
|
+
"toc": [
|
|
142
|
+
{
|
|
143
|
+
"value": "Overview",
|
|
144
|
+
"href": "#overview",
|
|
145
|
+
"depth": 2,
|
|
146
|
+
"numbering": [
|
|
147
|
+
1,
|
|
148
|
+
1
|
|
149
|
+
],
|
|
150
|
+
"parent": "root"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"value": "Resources",
|
|
154
|
+
"href": "#resources",
|
|
155
|
+
"depth": 3,
|
|
156
|
+
"numbering": [
|
|
157
|
+
1,
|
|
158
|
+
1,
|
|
159
|
+
1
|
|
160
|
+
],
|
|
161
|
+
"parent": "root"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"value": "Variables",
|
|
165
|
+
"href": "#variables",
|
|
166
|
+
"depth": 2,
|
|
167
|
+
"numbering": [
|
|
168
|
+
1,
|
|
169
|
+
2
|
|
170
|
+
],
|
|
171
|
+
"parent": "root"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"value": "Size",
|
|
175
|
+
"href": "#size",
|
|
176
|
+
"depth": 3,
|
|
177
|
+
"numbering": [
|
|
178
|
+
1,
|
|
179
|
+
2,
|
|
180
|
+
1
|
|
181
|
+
],
|
|
182
|
+
"parent": "root"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"value": "Custom dimension",
|
|
186
|
+
"href": "#custom-dimension",
|
|
187
|
+
"depth": 3,
|
|
188
|
+
"numbering": [
|
|
189
|
+
1,
|
|
190
|
+
2,
|
|
191
|
+
2
|
|
192
|
+
],
|
|
193
|
+
"parent": "root"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"value": "Inline default",
|
|
197
|
+
"href": "#inline-default",
|
|
198
|
+
"depth": 3,
|
|
199
|
+
"numbering": [
|
|
200
|
+
1,
|
|
201
|
+
2,
|
|
202
|
+
3
|
|
203
|
+
],
|
|
204
|
+
"parent": "root"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"value": "Guidelines",
|
|
208
|
+
"href": "#guidelines",
|
|
209
|
+
"depth": 2,
|
|
210
|
+
"numbering": [
|
|
211
|
+
1,
|
|
212
|
+
3
|
|
213
|
+
],
|
|
214
|
+
"parent": "root"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"value": "Best practices",
|
|
218
|
+
"href": "#best-practices",
|
|
219
|
+
"depth": 3,
|
|
220
|
+
"numbering": [
|
|
221
|
+
1,
|
|
222
|
+
3,
|
|
223
|
+
1
|
|
224
|
+
],
|
|
225
|
+
"parent": "root"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"value": "When to use",
|
|
229
|
+
"href": "#when-to-use",
|
|
230
|
+
"depth": 3,
|
|
231
|
+
"numbering": [
|
|
232
|
+
1,
|
|
233
|
+
3,
|
|
234
|
+
2
|
|
235
|
+
],
|
|
236
|
+
"parent": "root"
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
"dev": {
|
|
241
|
+
"mdx": "\n## Getting started\n\n### Import\n\n```tsx\nimport { SkeletonCircle, type SkeletonCircleProps } from '@commercetools/nimbus';\n```\n\n`SkeletonCircle` is a convenience wrapper over\n[Skeleton](/components/feedback/skeleton) with `shape=\"circle\"`. For rectangular\nblocks use `Skeleton`; for paragraphs use\n[SkeletonText](/components/feedback/skeletontext).\n\n### Basic usage\n\n`SkeletonCircle` renders a circular placeholder. Use the avatar-aligned `size`\nprop (`\"2xs\"` / `\"xs\"` / `\"md\"`) to stand in for an `Avatar`.\n\n```jsx live-dev\nconst App = () => (\n <SkeletonCircle size=\"md\" />\n)\n```\n\n## Usage examples\n\n### Avatar-aligned sizes\n\nThe `size` prop is aligned with the `Avatar` size scale — `2xs` = 24 px,\n`xs` = 32 px, `md` = 40 px — and applies equally to width and height, so the\ncircle stays round.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <SkeletonCircle size=\"2xs\" />\n <SkeletonCircle size=\"xs\" />\n <SkeletonCircle size=\"md\" />\n </Stack>\n)\n```\n\n### Custom dimension with `boxSize`\n\nFor a dimension outside the Avatar scale, pass `boxSize` (a spacing token or CSS\nvalue) instead of `size`. `width` and `height` are intentionally omitted from\nthe props in favor of `size`/`boxSize`, so the placeholder can never be\nnon-circular. With neither set, it defaults to a `1em` circle useful inline next\nto text.\n\n```jsx live-dev\nconst App = () => (\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <SkeletonCircle />\n <SkeletonCircle boxSize=\"1600\" />\n <SkeletonCircle boxSize=\"80px\" />\n </Stack>\n)\n```\n\n### Conditional rendering (standalone pattern)\n\nLike the rest of the family, `SkeletonCircle` has no `isLoaded` prop. Render it\nwhile loading and swap it for the real avatar with conditional rendering.\n\n```jsx live-dev\nconst App = () => {\n const [isLoading, setIsLoading] = React.useState(true);\n\n return (\n <Stack gap=\"400\">\n <Button onPress={() => setIsLoading(v => !v)}>Toggle loading</Button>\n <div aria-busy={isLoading}>\n {isLoading ? (\n <SkeletonCircle size=\"md\" />\n ) : (\n <Avatar size=\"md\" firstName=\"Ada\" lastName=\"Lovelace\" />\n )}\n </div>\n </Stack>\n )\n}\n```\n\n## Component requirements\n\n### Accessibility\n\n`SkeletonCircle` is **decorative by default** — it renders with\n`aria-hidden=\"true\"` so screen readers skip over it.\n\nTo communicate loading state to assistive technology, set `aria-busy=\"true\"` on\nthe **container** that wraps the skeleton region, then clear it and render the\nreal content once loading completes.\n\n```tsx\n<div aria-busy={isLoading} aria-label=\"User avatar\">\n {isLoading ? (\n <SkeletonCircle size=\"md\" />\n ) : (\n <Avatar size=\"md\" firstName={user.firstName} lastName={user.lastName} />\n )}\n</div>\n```\n\nAnnounce the loading region on the wrapping container rather than labelling the\nskeleton itself — see [Skeleton](/components/feedback/skeleton) for the full\nrationale.\n\n#### Reduced motion\n\nWhen the user has enabled `prefers-reduced-motion: reduce`, the animation is\nautomatically disabled regardless of the `animation` prop value. No additional\nconfiguration is required.\n\n#### Keyboard navigation\n\n`SkeletonCircle` is non-interactive and decorative. It does not receive focus or\nsupport keyboard interaction.\n\n## API reference\n\n<PropsTable id=\"SkeletonCircle\" />\n\n## Testing your implementation\n\nThese examples demonstrate how to test your implementation when using SkeletonCircle within your application. As the component's internal functionality is already tested by Nimbus, these patterns help you verify your integration and application-specific logic.\n\n### Basic Rendering\n\nRender a `SkeletonCircle` and confirm it is present; the circle is decorative (`aria-hidden`) by default, so assistive technology skips it.\n\n```tsx\nimport { useState } from \"react\";\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n SkeletonCircle,\n Stack,\n Button,\n NimbusProvider,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"SkeletonCircle - Basic rendering\", () => {\n it(\"renders a decorative circular placeholder\", () => {\n render(\n <NimbusProvider>\n <SkeletonCircle data-testid=\"skeleton-circle\" size=\"md\" />\n </NimbusProvider>\n );\n\n const circle = screen.getByTestId(\"skeleton-circle\");\n expect(circle).toBeInTheDocument();\n expect(circle).toHaveAttribute(\"aria-hidden\", \"true\");\n });\n});\n```\n\n### Avatar-aligned Sizes\n\nRender the avatar-aligned `size` values (`2xs`, `xs`, `md`) that let a SkeletonCircle stand in for an `Avatar` at the same dimensions.\n\n```tsx\nimport { useState } from \"react\";\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n SkeletonCircle,\n Stack,\n Button,\n NimbusProvider,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"SkeletonCircle - Avatar-aligned sizes\", () => {\n it(\"renders each avatar-aligned size\", () => {\n render(\n <NimbusProvider>\n <Stack direction=\"row\" gap=\"400\" alignItems=\"center\">\n <SkeletonCircle data-testid=\"circle-2xs\" size=\"2xs\" />\n <SkeletonCircle data-testid=\"circle-xs\" size=\"xs\" />\n <SkeletonCircle data-testid=\"circle-md\" size=\"md\" />\n </Stack>\n </NimbusProvider>\n );\n\n expect(screen.getByTestId(\"circle-2xs\")).toBeInTheDocument();\n expect(screen.getByTestId(\"circle-xs\")).toBeInTheDocument();\n expect(screen.getByTestId(\"circle-md\")).toBeInTheDocument();\n });\n});\n```\n\n### Standalone Loading Pattern\n\nThe recommended way to use SkeletonCircle: render the circle while an avatar is loading, then swap in the real image with conditional rendering — SkeletonCircle has no `isLoaded` prop, so the consumer owns the loading state.\n\n```tsx\nimport { useState } from \"react\";\nimport { describe, it, expect } from \"vitest\";\nimport { render, screen } from \"@testing-library/react\";\nimport userEvent from \"@testing-library/user-event\";\nimport {\n SkeletonCircle,\n Stack,\n Button,\n NimbusProvider,\n} from \"@commercetools/nimbus\";\n\ndescribe(\"SkeletonCircle - Standalone loading pattern\", () => {\n /**\n * A representative consumer component: show a circular placeholder while\n * `isLoading`, then render the real avatar image once loading completes.\n */\n function UserAvatar({ isLoading }: { isLoading: boolean }) {\n return isLoading ? (\n <SkeletonCircle size=\"md\" />\n ) : (\n <img src=\"/avatar.png\" alt=\"Ada Lovelace\" width={40} height={40} />\n );\n }\n\n it(\"shows a circular placeholder while loading, then the real avatar\", async () => {\n const Example = () => {\n const [isLoading, setIsLoading] = useState(true);\n return (\n <Stack gap=\"400\">\n <UserAvatar isLoading={isLoading} />\n <Button onPress={() => setIsLoading(false)}>Finish loading</Button>\n </Stack>\n );\n };\n\n render(\n <NimbusProvider>\n <Example />\n </NimbusProvider>\n );\n\n // While loading: real avatar is absent.\n expect(screen.queryByAltText(\"Ada Lovelace\")).toBeNull();\n\n await userEvent.click(\n screen.getByRole(\"button\", { name: \"Finish loading\" })\n );\n\n // After loading: real avatar is present.\n expect(screen.getByAltText(\"Ada Lovelace\")).toBeInTheDocument();\n });\n});\n```\n\n\n## Resources\n\n- [Storybook](https://nimbus-storybook.vercel.app/?path=/docs/components-skeleton--docs)\n- [Skeleton](/components/feedback/skeleton)\n- [SkeletonText](/components/feedback/skeletontext)\n",
|
|
242
|
+
"toc": [
|
|
243
|
+
{
|
|
244
|
+
"value": "Getting started",
|
|
245
|
+
"href": "#getting-started",
|
|
246
|
+
"depth": 2,
|
|
247
|
+
"numbering": [
|
|
248
|
+
1,
|
|
249
|
+
1
|
|
250
|
+
],
|
|
251
|
+
"parent": "root"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"value": "Import",
|
|
255
|
+
"href": "#import",
|
|
256
|
+
"depth": 3,
|
|
257
|
+
"numbering": [
|
|
258
|
+
1,
|
|
259
|
+
1,
|
|
260
|
+
1
|
|
261
|
+
],
|
|
262
|
+
"parent": "root"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"value": "Basic usage",
|
|
266
|
+
"href": "#basic-usage",
|
|
267
|
+
"depth": 3,
|
|
268
|
+
"numbering": [
|
|
269
|
+
1,
|
|
270
|
+
1,
|
|
271
|
+
2
|
|
272
|
+
],
|
|
273
|
+
"parent": "root"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"value": "Usage examples",
|
|
277
|
+
"href": "#usage-examples",
|
|
278
|
+
"depth": 2,
|
|
279
|
+
"numbering": [
|
|
280
|
+
1,
|
|
281
|
+
2
|
|
282
|
+
],
|
|
283
|
+
"parent": "root"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"value": "Avatar-aligned sizes",
|
|
287
|
+
"href": "#avatar-aligned-sizes",
|
|
288
|
+
"depth": 3,
|
|
289
|
+
"numbering": [
|
|
290
|
+
1,
|
|
291
|
+
2,
|
|
292
|
+
1
|
|
293
|
+
],
|
|
294
|
+
"parent": "root"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"value": "Custom dimension with boxSize",
|
|
298
|
+
"href": "#custom-dimension-with-boxsize",
|
|
299
|
+
"depth": 3,
|
|
300
|
+
"numbering": [
|
|
301
|
+
1,
|
|
302
|
+
2,
|
|
303
|
+
2
|
|
304
|
+
],
|
|
305
|
+
"parent": "root"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"value": "Conditional rendering (standalone pattern)",
|
|
309
|
+
"href": "#conditional-rendering-standalone-pattern",
|
|
310
|
+
"depth": 3,
|
|
311
|
+
"numbering": [
|
|
312
|
+
1,
|
|
313
|
+
2,
|
|
314
|
+
3
|
|
315
|
+
],
|
|
316
|
+
"parent": "root"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"value": "Component requirements",
|
|
320
|
+
"href": "#component-requirements",
|
|
321
|
+
"depth": 2,
|
|
322
|
+
"numbering": [
|
|
323
|
+
1,
|
|
324
|
+
3
|
|
325
|
+
],
|
|
326
|
+
"parent": "root"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"value": "Accessibility",
|
|
330
|
+
"href": "#accessibility",
|
|
331
|
+
"depth": 3,
|
|
332
|
+
"numbering": [
|
|
333
|
+
1,
|
|
334
|
+
3,
|
|
335
|
+
1
|
|
336
|
+
],
|
|
337
|
+
"parent": "root"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"value": "Reduced motion",
|
|
341
|
+
"href": "#reduced-motion",
|
|
342
|
+
"depth": 4,
|
|
343
|
+
"numbering": [
|
|
344
|
+
1,
|
|
345
|
+
3,
|
|
346
|
+
1,
|
|
347
|
+
1
|
|
348
|
+
],
|
|
349
|
+
"parent": "root"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"value": "Keyboard navigation",
|
|
353
|
+
"href": "#keyboard-navigation",
|
|
354
|
+
"depth": 4,
|
|
355
|
+
"numbering": [
|
|
356
|
+
1,
|
|
357
|
+
3,
|
|
358
|
+
1,
|
|
359
|
+
2
|
|
360
|
+
],
|
|
361
|
+
"parent": "root"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"value": "API reference",
|
|
365
|
+
"href": "#api-reference",
|
|
366
|
+
"depth": 2,
|
|
367
|
+
"numbering": [
|
|
368
|
+
1,
|
|
369
|
+
4
|
|
370
|
+
],
|
|
371
|
+
"parent": "root"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"value": "Testing your implementation",
|
|
375
|
+
"href": "#testing-your-implementation",
|
|
376
|
+
"depth": 2,
|
|
377
|
+
"numbering": [
|
|
378
|
+
1,
|
|
379
|
+
5
|
|
380
|
+
],
|
|
381
|
+
"parent": "root"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"value": "Basic Rendering",
|
|
385
|
+
"href": "#basic-rendering",
|
|
386
|
+
"depth": 3,
|
|
387
|
+
"numbering": [
|
|
388
|
+
1,
|
|
389
|
+
5,
|
|
390
|
+
1
|
|
391
|
+
],
|
|
392
|
+
"parent": "root"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"value": "Avatar-aligned Sizes",
|
|
396
|
+
"href": "#avatar-aligned-sizes-1",
|
|
397
|
+
"depth": 3,
|
|
398
|
+
"numbering": [
|
|
399
|
+
1,
|
|
400
|
+
5,
|
|
401
|
+
2
|
|
402
|
+
],
|
|
403
|
+
"parent": "root"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"value": "Standalone Loading Pattern",
|
|
407
|
+
"href": "#standalone-loading-pattern",
|
|
408
|
+
"depth": 3,
|
|
409
|
+
"numbering": [
|
|
410
|
+
1,
|
|
411
|
+
5,
|
|
412
|
+
3
|
|
413
|
+
],
|
|
414
|
+
"parent": "root"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"value": "Resources",
|
|
418
|
+
"href": "#resources",
|
|
419
|
+
"depth": 2,
|
|
420
|
+
"numbering": [
|
|
421
|
+
1,
|
|
422
|
+
6
|
|
423
|
+
],
|
|
424
|
+
"parent": "root"
|
|
425
|
+
}
|
|
426
|
+
]
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|