-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8dd253
commit 0139ab8
Showing
114 changed files
with
11,616 additions
and
10,288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { MinusIcon } from 'lucide-react' | ||
import { Box, Stack } from 'styled-system/jsx' | ||
import { Code, Icon, Table, Text } from '~/components/ui' | ||
|
||
interface Props { | ||
emits: | ||
| Record< | ||
string, | ||
{ | ||
type: string | ||
isRequired: boolean | ||
defaultValue?: string | undefined | ||
description?: string | undefined | ||
} | ||
> | ||
| undefined | ||
} | ||
|
||
export const EmitsTable = (props: Props) => { | ||
const { emits } = props | ||
if (!emits) { | ||
return null | ||
} | ||
return ( | ||
<Box borderWidth="1px" borderRadius="lg" overflowX="auto" className="not-prose" my="8"> | ||
<Table.Root variant="outline" size="sm" border="none"> | ||
<Table.Head> | ||
<Table.Row> | ||
<Table.Header px="4" bg="gray.2" h="10"> | ||
Emit | ||
</Table.Header> | ||
<Table.Header px="4" bg="gray.2" h="10"> | ||
Event | ||
</Table.Header> | ||
</Table.Row> | ||
</Table.Head> | ||
<Table.Body> | ||
{Object.entries(emits).map(([name, property]) => ( | ||
<Table.Row key={name}> | ||
<Table.Cell width="36" px="4" py="2" verticalAlign="top"> | ||
<Code size="sm" color="accent.default"> | ||
{name} | ||
</Code> | ||
</Table.Cell> | ||
<Table.Cell px="4" py="2" verticalAlign="top"> | ||
<Stack gap="1" align="start"> | ||
<Code size="sm">{property.type}</Code> | ||
<Text>{property.description}</Text> | ||
</Stack> | ||
</Table.Cell> | ||
</Table.Row> | ||
))} | ||
</Table.Body> | ||
</Table.Root> | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,122 @@ | ||
{ | ||
"ItemContent": { | ||
"asChild": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Render as a different element type." | ||
"props": { | ||
"asChild": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Render as a different element type." | ||
} | ||
} | ||
}, | ||
"ItemIndicator": { | ||
"asChild": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Render as a different element type." | ||
"props": { | ||
"asChild": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Render as a different element type." | ||
} | ||
} | ||
}, | ||
"Item": { | ||
"value": { | ||
"type": "string", | ||
"isRequired": true, | ||
"description": "The value of the accordion item." | ||
}, | ||
"asChild": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Render as a different element type." | ||
}, | ||
"disabled": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Whether the accordion item is disabled." | ||
"props": { | ||
"value": { | ||
"type": "string", | ||
"isRequired": true, | ||
"description": "The value of the accordion item." | ||
}, | ||
"asChild": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Render as a different element type." | ||
}, | ||
"disabled": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Whether the accordion item is disabled." | ||
} | ||
} | ||
}, | ||
"ItemTrigger": { | ||
"asChild": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Render as a different element type." | ||
"props": { | ||
"asChild": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Render as a different element type." | ||
} | ||
} | ||
}, | ||
"Root": { | ||
"asChild": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Render as a different element type." | ||
}, | ||
"collapsible": { | ||
"type": "boolean", | ||
"defaultValue": "false", | ||
"isRequired": false, | ||
"description": "Whether an accordion item can be after it has been expanded." | ||
}, | ||
"defaultValue": { | ||
"type": "string[]", | ||
"isRequired": false, | ||
"description": "The initial value of the accordion when it is first rendered.\nUse when you do not need to control the state of the accordion." | ||
}, | ||
"disabled": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Whether the accordion items are disabled" | ||
}, | ||
"id": { | ||
"type": "string", | ||
"isRequired": false, | ||
"description": "The unique identifier of the machine." | ||
}, | ||
"ids": { | ||
"type": "Partial<{\n root: string\n item(value: string): string\n content(value: string): string\n trigger(value: string): string\n}>", | ||
"isRequired": false, | ||
"description": "The ids of the elements in the accordion. Useful for composition." | ||
}, | ||
"lazyMount": { | ||
"type": "boolean", | ||
"defaultValue": "false", | ||
"isRequired": false, | ||
"description": "Whether to enable lazy mounting" | ||
}, | ||
"multiple": { | ||
"type": "boolean", | ||
"defaultValue": "false", | ||
"isRequired": false, | ||
"description": "Whether multple accordion items can be expanded at the same time." | ||
}, | ||
"onFocusChange": { | ||
"type": "(details: FocusChangeDetails) => void", | ||
"isRequired": false, | ||
"description": "The callback fired when the focused accordion item changes." | ||
}, | ||
"onValueChange": { | ||
"type": "(details: ValueChangeDetails) => void", | ||
"isRequired": false, | ||
"description": "The callback fired when the state of expanded/collapsed accordion items changes." | ||
}, | ||
"orientation": { | ||
"type": "'horizontal' | 'vertical'", | ||
"defaultValue": "\"vertical\"", | ||
"isRequired": false, | ||
"description": "The orientation of the accordion items." | ||
}, | ||
"unmountOnExit": { | ||
"type": "boolean", | ||
"defaultValue": "false", | ||
"isRequired": false, | ||
"description": "Whether to unmount on exit." | ||
}, | ||
"value": { | ||
"type": "string[]", | ||
"isRequired": false, | ||
"description": "The `value` of the accordion items that are currently being expanded." | ||
"props": { | ||
"asChild": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Render as a different element type." | ||
}, | ||
"collapsible": { | ||
"type": "boolean", | ||
"defaultValue": "false", | ||
"isRequired": false, | ||
"description": "Whether an accordion item can be after it has been expanded." | ||
}, | ||
"defaultValue": { | ||
"type": "string[]", | ||
"isRequired": false, | ||
"description": "The initial value of the accordion when it is first rendered.\nUse when you do not need to control the state of the accordion." | ||
}, | ||
"disabled": { | ||
"type": "boolean", | ||
"isRequired": false, | ||
"description": "Whether the accordion items are disabled" | ||
}, | ||
"id": { | ||
"type": "string", | ||
"isRequired": false, | ||
"description": "The unique identifier of the machine." | ||
}, | ||
"ids": { | ||
"type": "Partial<{\n root: string\n item(value: string): string\n content(value: string): string\n trigger(value: string): string\n}>", | ||
"isRequired": false, | ||
"description": "The ids of the elements in the accordion. Useful for composition." | ||
}, | ||
"lazyMount": { | ||
"type": "boolean", | ||
"defaultValue": "false", | ||
"isRequired": false, | ||
"description": "Whether to enable lazy mounting" | ||
}, | ||
"multiple": { | ||
"type": "boolean", | ||
"defaultValue": "false", | ||
"isRequired": false, | ||
"description": "Whether multple accordion items can be expanded at the same time." | ||
}, | ||
"onFocusChange": { | ||
"type": "(details: FocusChangeDetails) => void", | ||
"isRequired": false, | ||
"description": "The callback fired when the focused accordion item changes." | ||
}, | ||
"onValueChange": { | ||
"type": "(details: ValueChangeDetails) => void", | ||
"isRequired": false, | ||
"description": "The callback fired when the state of expanded/collapsed accordion items changes." | ||
}, | ||
"orientation": { | ||
"type": "'horizontal' | 'vertical'", | ||
"defaultValue": "\"vertical\"", | ||
"isRequired": false, | ||
"description": "The orientation of the accordion items." | ||
}, | ||
"unmountOnExit": { | ||
"type": "boolean", | ||
"defaultValue": "false", | ||
"isRequired": false, | ||
"description": "Whether to unmount on exit." | ||
}, | ||
"value": { | ||
"type": "string[]", | ||
"isRequired": false, | ||
"description": "The `value` of the accordion items that are currently being expanded." | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.