Skip to content

Commit

Permalink
fix: typedocs snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Mar 26, 2024
1 parent 29322fc commit 778f0ef
Show file tree
Hide file tree
Showing 61 changed files with 4,033 additions and 6,886 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"build:fast": "pnpm --filter=./packages/* build:fast",
"dev": "pnpm --filter=./packages/* dev",
"postbuild": "pnpm build:tokens",
"typedocs": "tsx scripts/typedocs.ts",
"typedocs": "pnpm react typedocs",
"typecheck": "tsc --noEmit",
"test": "vitest",
"react": "pnpm --filter=@chakra-ui/react",
Expand Down
152 changes: 95 additions & 57 deletions packages/props-docs/generated/accordion.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,68 @@
{
"Accordion": {
"allowMultiple": {
"AccordionTrigger": {},
"AccordionIndicator": {},
"AccordionItem": {
"disabled": {
"type": "boolean",
"defaultValue": false,
"required": false,
"description": "If `true`, multiple accordion items can be expanded at once."
"description": "If `true`, the accordion item will be disabled."
},
"allowToggle": {
"focusable": {
"type": "boolean",
"defaultValue": false,
"required": false,
"description": "If `true`, the accordion item will be focusable."
},
"id": {
"type": "string",
"required": false,
"description": "The unique id of the accordion item."
},
"value": {
"type": "string",
"required": false,
"description": "Unique value the accordion item."
}
},
"AccordionContent": {
"motionProps": {
"type": "CollapseProps",
"required": false,
"description": "The properties passed to the underlying `Collapse` component."
}
},
"AccordionRoot": {
"collapsible": {
"type": "boolean",
"defaultValue": false,
"required": false,
"description": "If `true`, any expanded accordion item can be collapsed again."
},
"defaultIndex": {
"type": "ExpandedIndex",
"colorPalette": {
"defaultValue": "gray",
"type": "\"black\" | \"white\" | \"whiteAlpha\" | \"blackAlpha\" | \"gray\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"cyan\" | \"purple\" | \"pink\"",
"required": false,
"description": "The initial index(es) of the expanded accordion item"
"description": "The color palette of the component"
},
"index": {
"type": "ExpandedIndex",
"defaultValue": {
"type": "string[]",
"required": false,
"description": "The initial id(s) of the expanded accordion item(s)"
},
"id": {
"type": "string",
"required": false,
"description": "The index(es) of the expanded accordion item"
"description": "The id of the accordion"
},
"multiple": {
"type": "boolean",
"defaultValue": false,
"required": false,
"description": "If `true`, multiple accordion items can be expanded at once."
},
"onChange": {
"type": "(expandedIndex: ExpandedIndex) => void",
"type": "string[])",
"required": false,
"description": "The callback invoked when accordion items are expanded or collapsed."
},
Expand All @@ -32,82 +71,81 @@
"defaultValue": false,
"required": false,
"description": "If `true`, height animation and transitions will be disabled."
}
},
"AccordionButton": {},
"AccordionIcon": { "orientation": { "type": "any", "required": false } },
"AccordionItem": {
"id": {
"type": "string",
},
"size": {
"type": "\"sm\" | \"md\" | \"lg\"",
"defaultValue": "md",
"required": false,
"description": "A unique id for the accordion item."
"description": "The size of the component"
},
"isDisabled": {
"type": "boolean",
"defaultValue": false,
"value": {
"type": "string[]",
"required": false,
"description": "If `true`, the accordion item will be disabled."
"description": "The id(s) of the expanded accordion item(s)"
},
"isFocusable": {
"type": "boolean",
"defaultValue": false,
"variant": {
"type": "\"outline\" | \"elevated\" | \"contained\" | \"plain\"",
"defaultValue": "outline",
"required": false,
"description": "If `true`, the accordion item will be focusable."
"description": "The variant of the component"
}
},
"AccordionPanel": {
"motionProps": {
"type": "CollapseProps",
"UseAccordion": {
"collapsible": {
"type": "boolean",
"defaultValue": false,
"required": false,
"description": "The properties passed to the underlying `Collapse` component."
}
},
"UseAccordionItem": {
"description": "If `true`, any expanded accordion item can be collapsed again."
},
"defaultValue": {
"type": "string[]",
"required": false,
"description": "The initial id(s) of the expanded accordion item(s)"
},
"id": {
"type": "string",
"required": false,
"description": "A unique id for the accordion item."
"description": "The id of the accordion"
},
"isDisabled": {
"multiple": {
"type": "boolean",
"defaultValue": false,
"required": false,
"description": "If `true`, the accordion item will be disabled."
"description": "If `true`, multiple accordion items can be expanded at once."
},
"isFocusable": {
"type": "boolean",
"defaultValue": false,
"onChange": {
"type": "string[])",
"required": false,
"description": "If `true`, the accordion item will be focusable."
"description": "The callback invoked when accordion items are expanded or collapsed."
},
"value": {
"type": "string[]",
"required": false,
"description": "The id(s) of the expanded accordion item(s)"
}
},
"UseAccordion": {
"allowMultiple": {
"UseAccordionItem": {
"disabled": {
"type": "boolean",
"defaultValue": false,
"required": false,
"description": "If `true`, multiple accordion items can be expanded at once."
"description": "If `true`, the accordion item will be disabled."
},
"allowToggle": {
"focusable": {
"type": "boolean",
"defaultValue": false,
"required": false,
"description": "If `true`, any expanded accordion item can be collapsed again."
},
"defaultIndex": {
"type": "ExpandedIndex",
"required": false,
"description": "The initial index(es) of the expanded accordion item"
"description": "If `true`, the accordion item will be focusable."
},
"index": {
"type": "ExpandedIndex",
"id": {
"type": "string",
"required": false,
"description": "The index(es) of the expanded accordion item"
"description": "The unique id of the accordion item."
},
"onChange": {
"type": "(expandedIndex: ExpandedIndex) => void",
"value": {
"type": "string",
"required": false,
"description": "The callback invoked when accordion items are expanded or collapsed."
"description": "Unique value the accordion item."
}
}
}
28 changes: 14 additions & 14 deletions packages/props-docs/generated/alert.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"Alert": {
"addRole": { "type": "boolean", "defaultValue": false, "required": false },
"colorScheme": {
"defaultValue": "blue",
"type": "\"whiteAlpha\" | \"blackAlpha\" | \"gray\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"cyan\" | \"purple\" | \"pink\"",
"AlertDescription": {},
"AlertIcon": {},
"AlertRoot": {
"colorPalette": {
"defaultValue": "gray",
"type": "\"black\" | \"white\" | \"whiteAlpha\" | \"blackAlpha\" | \"gray\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"cyan\" | \"purple\" | \"pink\"",
"required": false,
"description": "The visual color appearance of the component"
"description": "The color palette of the component"
},
"size": {
"type": "string",
"type": "\"sm\" | \"md\" | \"lg\"",
"defaultValue": "md",
"required": false,
"description": "The size of the Alert"
"description": "The size of the component"
},
"status": {
"type": "\"info\" | \"warning\" | \"success\" | \"error\" | \"loading\"",
"type": "\"info\" | \"warning\" | \"success\" | \"error\"",
"defaultValue": "info",
"required": false,
"description": "The status of the alert"
"description": "The status of the component"
},
"variant": {
"type": "\"subtle\" | \"outline\" | \"solid\"",
"defaultValue": "subtle",
"type": "\"subtle\" | \"left-accent\" | \"top-accent\" | \"solid\"",
"required": false,
"description": "The variant of the Alert"
"description": "The variant of the component"
}
},
"AlertDescription": {},
"AlertIcon": {},
"AlertTitle": {}
}
2 changes: 1 addition & 1 deletion packages/props-docs/generated/aspect-ratio.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"AspectRatio": {
"ratio": {
"type": "ResponsiveValue<number>",
"type": "ConditionalValue<number>",
"required": false,
"description": "The aspect ratio of the Box. Common values are:\n\n`21/9`, `16/9`, `9/16`, `4/3`, `1.85/1`"
}
Expand Down
98 changes: 19 additions & 79 deletions packages/props-docs/generated/avatar.json
Original file line number Diff line number Diff line change
@@ -1,93 +1,33 @@
{
"Avatar": {
"colorScheme": {
"type": "\"whiteAlpha\" | \"blackAlpha\" | \"gray\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"cyan\" | \"purple\" | \"pink\"",
"required": false,
"description": "The visual color appearance of the component"
},
"crossOrigin": {
"type": "\"\" | \"anonymous\" | \"use-credentials\"",
"required": false
},
"getInitials": {
"type": "(name: string) => string",
"required": false,
"description": "Function to get the initials to display"
},
"icon": {
"type": "ReactElement<any, string | JSXElementConstructor<any>>",
"required": false,
"description": "The default avatar used as fallback when `name`, and `src`\nis not specified."
},
"iconLabel": { "type": "string", "required": false },
"ignoreFallback": {
"type": "boolean",
"defaultValue": false,
"required": false,
"description": "If `true`, opt out of the avatar's `fallback` logic and\nrenders the `img` at all times."
},
"loading": {
"type": "\"eager\" | \"lazy\"",
"required": false,
"description": "Defines loading strategy"
},
"name": {
"type": "string",
"required": false,
"description": "The name of the person in the avatar.\n\n- if `src` has loaded, the name will be used as the `alt` attribute of the `img`\n- If `src` is not loaded, the name will be used to create the initials"
},
"onError": {
"type": "() => void",
"required": false,
"description": "Function called when image failed to load"
},
"referrerPolicy": {
"type": "HTMLAttributeReferrerPolicy",
"AvatarBadge": {
"placement": { "type": "BadgePlacement", "required": false }
},
"AvatarFallback": { "name": { "type": "string", "required": false } },
"AvatarGroup": {},
"AvatarImage": {},
"AvatarRoot": {
"colorPalette": {
"defaultValue": "gray",
"type": "\"black\" | \"white\" | \"whiteAlpha\" | \"blackAlpha\" | \"gray\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"cyan\" | \"purple\" | \"pink\"",
"required": false,
"description": "Defining which referrer is sent when fetching the resource."
"description": "The color palette of the component"
},
"showBorder": {
"type": "boolean",
"defaultValue": false,
"shape": {
"type": "\"square\" | \"rounded\" | \"full\"",
"defaultValue": "full",
"required": false,
"description": "If `true`, the `Avatar` will show a border around it.\n\nBest for a group of avatars"
"description": "The shape of the component"
},
"size": {
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\"",
"defaultValue": "md",
"type": "\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"full\"",
"required": false,
"description": "The size of the Avatar"
},
"src": {
"type": "string",
"required": false,
"description": "The image url of the `Avatar`"
},
"srcSet": {
"type": "string",
"required": false,
"description": "List of sources to use for different screen resolutions"
"description": "The size of the component"
},
"variant": {
"type": "string",
"required": false,
"description": "The variant of the Avatar"
}
},
"AvatarBadge": {
"placement": { "type": "BadgePlacement", "required": false }
},
"AvatarGroup": {
"max": {
"type": "number",
"required": false,
"description": "The maximum number of visible avatars"
},
"spacing": {
"type": "ResponsiveValue<string | number | (string & {})>",
"defaultValue": "-0.75rem",
"type": "\"solid\" | \"subtle\"",
"required": false,
"description": "The space between the avatars in the group."
"description": "The variant of the component"
}
}
}

0 comments on commit 778f0ef

Please sign in to comment.