docs: add missing props to UI components (#13247)
This commit is contained in:
@@ -39612,6 +39612,61 @@ module.exports = defineConfig({
|
||||
|\`channels\`|The channels this notification module is used to send notifications for. While the local notification module doesn't actually send the notification,
|
||||
it's important to specify its channels to make sure it's used when a notification for that channel is created.|
|
||||
|
||||
***
|
||||
|
||||
## Send Notifications to the Admin Notification Panel
|
||||
|
||||
The Local Notification Module Provider can also be used to send notifications to the [Medusa Admin's notification panel](https://docs.medusajs.com/user-guide#check-notifications/index.html.md).
|
||||
You can send notifications to the admin dashboard when a certain action occurs using a subscriber, a custom workflow or a workflow hook.
|
||||
|
||||
For example, to send an admin notification whenever an order is placed, create a [subscriber](https://docs.medusajs.com/docs/learn/fundamentals/events-and-subscribers/index.html.md) at `src/subscribers/order-placed.ts` with the following content:
|
||||
|
||||
```ts title="src/subscribers/order-placed.ts" highlights={highlights} collapsibleLines="1-6" expandButtonLabel="Show Imports"
|
||||
import type {
|
||||
SubscriberArgs,
|
||||
SubscriberConfig,
|
||||
} from "@medusajs/framework"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export default async function orderPlacedHandler({
|
||||
event: { data },
|
||||
container,
|
||||
}: SubscriberArgs<{ id: string }>) {
|
||||
const notificationModuleService = container.resolve(Modules.NOTIFICATION)
|
||||
|
||||
await notificationModuleService.createNotifications({
|
||||
to: "",
|
||||
channel: "feed",
|
||||
template: "admin-ui",
|
||||
data: {
|
||||
title: "New order",
|
||||
description: `A new order has been placed`,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export const config: SubscriberConfig = {
|
||||
event: "order.placed",
|
||||
}
|
||||
```
|
||||
|
||||
In this subscriber, you:
|
||||
|
||||
- Resolve the Notification Module's main service from the [Medusa container](https://docs.medusajs.com/docs/learn/fundamentals/medusa-container/index.html.md).
|
||||
- Use the `createNotifications` method of the Notification Module's main service to create a notification to be sent to the admin dashboard. By specifying the `feed` channel, the Local Notification Module Provider is used to send the notification.
|
||||
- The `template` property of the `createNotifications` method's parameter must be set to `admin-ui`.
|
||||
- The `data` property allows you to customize the content of the admin notification. It must contain `title` and `description` properties.
|
||||
|
||||
### Test Sending Notification
|
||||
|
||||
To test this out, start the Medusa application:
|
||||
|
||||
```bash npm2yarn
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Then, place an order. The subscriber will run, sending a notification to the Medusa Admin's notification panel.
|
||||
|
||||
|
||||
# Notification Module
|
||||
|
||||
@@ -89246,16 +89301,12 @@ import { Calendar } from "@medusajs/ui"
|
||||
Calendar component used to select a date.
|
||||
Its props are based on \[React Aria Calendar]\(https://react-spectrum.adobe.com/react-aria/Calendar.html#calendar-1).
|
||||
|
||||
- autoFocus: (boolean) Whether to automatically focus the calendar when it mounts.
|
||||
- defaultFocusedValue: (DateValue) The date that is focused when the calendar first mounts (uncountrolled).
|
||||
- errorMessage: (ReactNode) An error message to display when the selected value is invalid.
|
||||
- focusedValue: (DateValue) Controls the currently focused date within the calendar.
|
||||
- isDisabled: (boolean) Whether the calendar is disabled.
|
||||
- isInvalid: (boolean) Whether the current selection is invalid according to application logic.
|
||||
- isReadOnly: (boolean) Whether the calendar value is immutable.
|
||||
- onFocusChange: (signature) Handler that is called when the focused date changes.
|
||||
- pageBehavior: (PageBehavior) Controls the behavior of paging. Pagination either works by advancing the visible page by visibleDuration (default) or one unit of visibleDuration.
|
||||
- validationState: (ValidationState) Whether the current selection is valid or invalid according to application logic.
|
||||
- value: (union) The currently selected date.
|
||||
- defaultValue: (union) The date that is selected when the calendar first mounts (uncontrolled).
|
||||
- onChange: (signature) A function that is triggered when the selected date changes.
|
||||
- isDateUnavailable: (signature) A function that determines whether a date is unavailable for selection.
|
||||
- minValue: (Date) The minimum date that can be selected.
|
||||
- maxValue: (Date) The maximum date that can be selected.
|
||||
|
||||
***
|
||||
|
||||
@@ -90078,67 +90129,17 @@ This component is based on the input element and supports all of its props
|
||||
- symbol: (string) The symbol to show in the input.
|
||||
- code: (string) The currency code to show in the input.
|
||||
- size: (union) The input's size. Default: "base"
|
||||
- allowDecimals: (boolean) Allow decimals
|
||||
- disabled: (boolean) Whether the input is disabled.
|
||||
|
||||
Default = true
|
||||
- allowNegativeValue: (boolean) Allow user to enter negative value
|
||||
|
||||
Default = true
|
||||
- className: (string) Class names
|
||||
- customInput: (ElementType) Custom component
|
||||
|
||||
Default = \<input/>
|
||||
- decimalScale: (number) Specify decimal scale for padding/trimming
|
||||
|
||||
Example:
|
||||
  1.5 -> 1.50
|
||||
  1.234 -> 1.23
|
||||
- decimalSeparator: (string) Separator between integer part and fractional part of value.
|
||||
|
||||
This cannot be a number
|
||||
- decimalsLimit: (number) Limit length of decimals allowed
|
||||
|
||||
Default = 2
|
||||
- defaultValue: (union) Default value if not passing in value via props
|
||||
- disableAbbreviations: (boolean) Disable abbreviations (m, k, b)
|
||||
|
||||
Default = false
|
||||
- disabled: (boolean) Disabled
|
||||
|
||||
Default = false
|
||||
- disableGroupSeparators: (boolean) Disable auto adding separator between values eg. 1000 -> 1,000
|
||||
|
||||
Default = false
|
||||
- fixedDecimalLength: (number) Value will always have the specified length of decimals
|
||||
|
||||
Example:
|
||||
  123 -> 1.23
|
||||
|
||||
Note: This formatting only happens onBlur
|
||||
- formatValueOnBlur: (boolean) When set to false, the formatValueOnBlur flag disables the application of the \_\_onValueChange\_\_ function
|
||||
specifically on blur events. If disabled or set to false, the onValueChange will not trigger on blur.
|
||||
Default = true
|
||||
- groupSeparator: (string) Separator between thousand, million and billion
|
||||
|
||||
This cannot be a number
|
||||
- id: (string) Component id
|
||||
- intlConfig: (IntlConfig) International locale config, examples:
|
||||
  \{ locale: 'ja-JP', currency: 'JPY' }
|
||||
  \{ locale: 'en-IN', currency: 'INR' }
|
||||
|
||||
Any prefix, groupSeparator or decimalSeparator options passed in
|
||||
will override Intl Locale config
|
||||
- maxLength: (number) Maximum characters the user can enter
|
||||
- onValueChange: (signature) Handle change in value
|
||||
- placeholder: (string) Placeholder if there is no value
|
||||
- step: (number) Incremental value change on arrow down and arrow up key press
|
||||
- transformRawValue: (signature) Transform the raw value form the input before parsing
|
||||
 Default: false
|
||||
- onInvalid: (undefined) A function that is triggered when the input is invalid.
|
||||
|
||||
***
|
||||
|
||||
## Examples
|
||||
|
||||
### Controlled
|
||||
### Controlled Currency Input
|
||||
|
||||
```tsx
|
||||
import { useState } from "react"
|
||||
@@ -90173,7 +90174,7 @@ export default function CurrencyInputControlled() {
|
||||
|
||||
```
|
||||
|
||||
### Disabled
|
||||
### Disabled Currency Input
|
||||
|
||||
```tsx
|
||||
import { CurrencyInput } from "@medusajs/ui"
|
||||
@@ -90194,7 +90195,7 @@ export default function CurrencyInputDisabled() {
|
||||
|
||||
```
|
||||
|
||||
### Error State
|
||||
### Currency Input with Error State
|
||||
|
||||
```tsx
|
||||
import { useState } from "react"
|
||||
@@ -90227,7 +90228,7 @@ export default function CurrencyInputError() {
|
||||
|
||||
```
|
||||
|
||||
### Sizes
|
||||
### Currency Input Sizes
|
||||
|
||||
#### Base
|
||||
|
||||
@@ -92743,9 +92744,11 @@ This component is based on the \[Radix UI Dropdown Menu Trigger]\(https://www.ra
|
||||
|
||||
This component is based on the \[Radix UI Dropdown Menu Content]\(https://www.radix-ui.com/primitives/docs/components/dropdown-menu#content) primitive.
|
||||
|
||||
- sideOffset: (undefined) Default: 8
|
||||
- collisionPadding: (undefined) Default: 8
|
||||
- align: (undefined) Default: "center"
|
||||
- sideOffset: (undefined) The space in pixels between the dropdown menu and its trigger element. Default: 8
|
||||
- collisionPadding: (undefined) The distance in pixels from the boundary edges where collision detection should occur. Default: 8
|
||||
- align: (undefined) The alignment of the dropdown menu relative to its trigger element.
|
||||
|
||||
@defaultValue center Default: "center"
|
||||
|
||||
### DropdownMenu.Item Props
|
||||
|
||||
@@ -92777,12 +92780,6 @@ This component is based on the \[Radix UI Dropdown Menu RadioItem]\(https://www.
|
||||
|
||||
|
||||
|
||||
### DropdownMenu.Shortcut Props
|
||||
|
||||
This component is based on the \`span\` element and supports all of its props
|
||||
|
||||
|
||||
|
||||
***
|
||||
|
||||
## Examples
|
||||
@@ -93844,7 +93841,7 @@ This component is based on the \[Radix UI Label]\(https://www.radix-ui.com/primi
|
||||
|
||||
## Examples
|
||||
|
||||
### All Sizes
|
||||
### Label Sizes
|
||||
|
||||
```tsx
|
||||
import { Label } from "@medusajs/ui"
|
||||
@@ -93890,7 +93887,7 @@ export default function LabelAllSizes() {
|
||||
|
||||
```
|
||||
|
||||
### With Form Inputs
|
||||
### Label with Form Inputs
|
||||
|
||||
```tsx
|
||||
import { Label, Input } from "@medusajs/ui"
|
||||
@@ -94607,7 +94604,7 @@ This component is based on the \`div\` element and supports all of its props
|
||||
|
||||
## Examples
|
||||
|
||||
### Confirmation Variant
|
||||
### Confirmation Prompt Variant
|
||||
|
||||
The `confirmation` variant is useful when confirming an operation that isn't destructive, such as deleting an item.
|
||||
|
||||
@@ -94852,7 +94849,15 @@ export default function RadioGroupChoiceBox() {
|
||||
|
||||
```
|
||||
|
||||
{/* TODO add API reference */}
|
||||
### Choice Box API Reference
|
||||
|
||||
### RadioGroup.ChoiceBox Props
|
||||
|
||||
This component is based on the \[Radix UI Radio Group Item]\(https://www.radix-ui.com/primitives/docs/components/radio-group#item) primitives.
|
||||
|
||||
- label: (string) The label for the radio button.
|
||||
- description: (string) The description for the radio button.
|
||||
- value: (string) The value of the radio button.
|
||||
|
||||
|
||||
# Select
|
||||
@@ -96443,16 +96448,18 @@ import { Tooltip } from "@medusajs/ui"
|
||||
|
||||
This component is based on the \[Radix UI Tooltip]\(https://www.radix-ui.com/primitives/docs/components/tooltip) primitive.
|
||||
|
||||
- content: (ReactReactNode) The content to display in the tooltip.
|
||||
- onClick: (ReactMouseEventHandler) A function that is triggered when the tooltip is clicked.
|
||||
- side: (union) The side to position the tooltip.
|
||||
|
||||
 Default: top
|
||||
- maxWidth: (number) The maximum width of the tooltip. Default: 220
|
||||
- aria-label: (string) A more descriptive label for accessibility purpose
|
||||
- delayDuration: (number) The duration from when the pointer enters the trigger until the tooltip gets opened. This will
|
||||
override the prop with the same name passed to Provider.
|
||||
- forceMount: (literal) Used to force mounting when more control is needed. Useful when
|
||||
controlling animation with React animation libraries.
|
||||
- onEscapeKeyDown: (signature) Event handler called when the escape key is down.
|
||||
Can be prevented.
|
||||
- onPointerDownOutside: (signature) Event handler called when the a \`pointerdown\` event happens outside of the \`Tooltip\`.
|
||||
Can be prevented.
|
||||
- sideOffset: (number) The distance in pixels between the tooltip and its trigger. Default: 8
|
||||
- children: (undefined) The element to trigger the tooltip.
|
||||
- open: (boolean) Whether the tooltip is currently open.
|
||||
- defaultOpen: (boolean) Whether the tooltip is open by default.
|
||||
- onOpenChange: (signature) A function that is called when the tooltip's open state changes.
|
||||
- delayDuration: (number) The time in milliseconds to delay the tooltip's appearance.
|
||||
|
||||
***
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ import { RadioGroup } from "@medusajs/ui"
|
||||
|
||||
The `RadioGroup.ChoiceBox` component allows you to show a group of radio buttons, each in a box with a label and description.
|
||||
|
||||
<ComponentExample name="radio-group-choicebox" hideFeedback />
|
||||
<ComponentExample name="radio-group-choicebox" />
|
||||
|
||||
{/* TODO add API reference */}
|
||||
### Choice Box API Reference
|
||||
|
||||
<ComponentReference mainComponent="RadioGroup" componentsToShow={[
|
||||
"RadioGroup.ChoiceBox"
|
||||
]} hideFeedback />
|
||||
@@ -62,6 +62,8 @@ const Row = ({
|
||||
}
|
||||
} else if (type.name === "Array" && "elements" in type) {
|
||||
raw = type.elements.map((element) => getTypeRaw(element)).join(" | ")
|
||||
} else if (raw.startsWith("React.")) {
|
||||
return ""
|
||||
}
|
||||
|
||||
return normalizeRaw(raw)
|
||||
@@ -71,6 +73,8 @@ const Row = ({
|
||||
return type.type
|
||||
} else if (type?.name === "Array" && type.raw) {
|
||||
return normalizeRaw(type.raw) || "array"
|
||||
} else if ("raw" in type && type.raw?.startsWith("React.")) {
|
||||
return type.name.replace(/^React/, "")
|
||||
}
|
||||
|
||||
return type.name || ""
|
||||
|
||||
@@ -28,7 +28,7 @@ export const generatedEditDates = {
|
||||
"app/components/progress-accordion/page.mdx": "2025-08-18T11:37:35.931Z",
|
||||
"app/components/progress-tabs/page.mdx": "2025-08-18T11:37:37.808Z",
|
||||
"app/components/prompt/page.mdx": "2025-08-18T11:37:38.113Z",
|
||||
"app/components/radio-group/page.mdx": "2025-08-18T11:37:36.321Z",
|
||||
"app/components/radio-group/page.mdx": "2025-08-20T09:15:08.822Z",
|
||||
"app/components/select/page.mdx": "2025-08-18T11:37:36.964Z",
|
||||
"app/components/status-badge/page.mdx": "2025-08-18T11:37:37.579Z",
|
||||
"app/components/switch/page.mdx": "2025-08-18T11:37:37.277Z",
|
||||
|
||||
@@ -3,103 +3,104 @@
|
||||
"methods": [],
|
||||
"displayName": "Calendar",
|
||||
"props": {
|
||||
"autoFocus": {
|
||||
"description": "Whether to automatically focus the calendar when it mounts.",
|
||||
"value": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
"name": "union",
|
||||
"raw": "Date | null",
|
||||
"elements": [
|
||||
{
|
||||
"name": "Date"
|
||||
},
|
||||
{
|
||||
"name": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "The currently selected date."
|
||||
},
|
||||
"defaultFocusedValue": {
|
||||
"description": "The date that is focused when the calendar first mounts (uncountrolled).",
|
||||
"defaultValue": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "DateValue",
|
||||
"elements": [],
|
||||
"raw": "DateValue"
|
||||
}
|
||||
"name": "union",
|
||||
"raw": "Date | null",
|
||||
"elements": [
|
||||
{
|
||||
"name": "Date"
|
||||
},
|
||||
{
|
||||
"name": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "The date that is selected when the calendar first mounts (uncontrolled)."
|
||||
},
|
||||
"errorMessage": {
|
||||
"description": "An error message to display when the selected value is invalid.",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "ReactNode",
|
||||
"elements": [],
|
||||
"raw": "ReactNode"
|
||||
}
|
||||
},
|
||||
"focusedValue": {
|
||||
"description": "Controls the currently focused date within the calendar.",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "DateValue",
|
||||
"elements": [],
|
||||
"raw": "DateValue"
|
||||
}
|
||||
},
|
||||
"isDisabled": {
|
||||
"description": "Whether the calendar is disabled.",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
},
|
||||
"isInvalid": {
|
||||
"description": "Whether the current selection is invalid according to application logic.",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
},
|
||||
"isReadOnly": {
|
||||
"description": "Whether the calendar value is immutable.",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
},
|
||||
"onFocusChange": {
|
||||
"description": "Handler that is called when the focused date changes.",
|
||||
"onChange": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "signature",
|
||||
"type": "function",
|
||||
"raw": "(date: CalendarDate) => void",
|
||||
"raw": "(value: Date | null) => void",
|
||||
"signature": {
|
||||
"arguments": [
|
||||
{
|
||||
"name": "date",
|
||||
"type": {
|
||||
"name": "CalendarDate",
|
||||
"elements": [],
|
||||
"raw": "CalendarDate"
|
||||
"name": "union",
|
||||
"raw": "Date | null",
|
||||
"elements": [
|
||||
{
|
||||
"name": "Date"
|
||||
},
|
||||
{
|
||||
"name": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rest": false
|
||||
"name": "value"
|
||||
}
|
||||
],
|
||||
"return": {
|
||||
"name": "void"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "A function that is triggered when the selected date changes."
|
||||
},
|
||||
"pageBehavior": {
|
||||
"description": "Controls the behavior of paging. Pagination either works by advancing the visible page by visibleDuration (default) or one unit of visibleDuration.",
|
||||
"isDateUnavailable": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "PageBehavior",
|
||||
"elements": [],
|
||||
"raw": "PageBehavior"
|
||||
}
|
||||
"name": "signature",
|
||||
"type": "function",
|
||||
"raw": "(date: Date) => boolean",
|
||||
"signature": {
|
||||
"arguments": [
|
||||
{
|
||||
"type": {
|
||||
"name": "Date"
|
||||
},
|
||||
"name": "date"
|
||||
}
|
||||
],
|
||||
"return": {
|
||||
"name": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "A function that determines whether a date is unavailable for selection."
|
||||
},
|
||||
"validationState": {
|
||||
"description": "Whether the current selection is valid or invalid according to application logic.",
|
||||
"minValue": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "ValidationState",
|
||||
"elements": [],
|
||||
"raw": "ValidationState"
|
||||
}
|
||||
"name": "Date"
|
||||
},
|
||||
"description": "The minimum date that can be selected."
|
||||
},
|
||||
"maxValue": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "Date"
|
||||
},
|
||||
"description": "The maximum date that can be selected."
|
||||
}
|
||||
},
|
||||
"composes": [
|
||||
|
||||
@@ -39,222 +39,18 @@
|
||||
},
|
||||
"required": false
|
||||
},
|
||||
"allowDecimals": {
|
||||
"description": "Allow decimals\n\nDefault = true",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
},
|
||||
"allowNegativeValue": {
|
||||
"description": "Allow user to enter negative value\n\nDefault = true",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
},
|
||||
"className": {
|
||||
"description": "Class names",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
}
|
||||
},
|
||||
"customInput": {
|
||||
"description": "Custom component\n\nDefault = <input/>",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "ElementType",
|
||||
"elements": [],
|
||||
"raw": "ElementType"
|
||||
}
|
||||
},
|
||||
"decimalScale": {
|
||||
"description": "Specify decimal scale for padding/trimming\n\nExample:\n 1.5 -> 1.50\n 1.234 -> 1.23",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "number"
|
||||
}
|
||||
},
|
||||
"decimalSeparator": {
|
||||
"description": "Separator between integer part and fractional part of value.\n\nThis cannot be a number",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
}
|
||||
},
|
||||
"decimalsLimit": {
|
||||
"description": "Limit length of decimals allowed\n\nDefault = 2",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "number"
|
||||
}
|
||||
},
|
||||
"defaultValue": {
|
||||
"description": "Default value if not passing in value via props",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "union",
|
||||
"raw": "string \\| number",
|
||||
"elements": [
|
||||
{
|
||||
"name": "string"
|
||||
},
|
||||
{
|
||||
"name": "number"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"disableAbbreviations": {
|
||||
"description": "Disable abbreviations (m, k, b)\n\nDefault = false",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
},
|
||||
"disabled": {
|
||||
"description": "Disabled\n\nDefault = false",
|
||||
"required": false,
|
||||
"description": "Whether the input is disabled.\n\n\n",
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
},
|
||||
"defaultValue": {
|
||||
"value": "false",
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"disableGroupSeparators": {
|
||||
"description": "Disable auto adding separator between values eg. 1000 -> 1,000\n\nDefault = false",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
},
|
||||
"fixedDecimalLength": {
|
||||
"description": "Value will always have the specified length of decimals\n\nExample:\n 123 -> 1.23\n\nNote: This formatting only happens onBlur",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "number"
|
||||
}
|
||||
},
|
||||
"formatValueOnBlur": {
|
||||
"description": "When set to false, the formatValueOnBlur flag disables the application of the __onValueChange__ function\nspecifically on blur events. If disabled or set to false, the onValueChange will not trigger on blur.\nDefault = true",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
},
|
||||
"groupSeparator": {
|
||||
"description": "Separator between thousand, million and billion\n\nThis cannot be a number",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"description": "Component id",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
}
|
||||
},
|
||||
"intlConfig": {
|
||||
"description": "International locale config, examples:\n { locale: 'ja-JP', currency: 'JPY' }\n { locale: 'en-IN', currency: 'INR' }\n\nAny prefix, groupSeparator or decimalSeparator options passed in\nwill override Intl Locale config",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "IntlConfig",
|
||||
"elements": [],
|
||||
"raw": "IntlConfig"
|
||||
}
|
||||
},
|
||||
"maxLength": {
|
||||
"description": "Maximum characters the user can enter",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "number"
|
||||
}
|
||||
},
|
||||
"onValueChange": {
|
||||
"description": "Handle change in value",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "signature",
|
||||
"type": "function",
|
||||
"raw": "(value: undefined \\| string, name?: string, values?: CurrencyInputOnChangeValues) => void",
|
||||
"signature": {
|
||||
"arguments": [
|
||||
{
|
||||
"name": "value",
|
||||
"type": {
|
||||
"name": "union",
|
||||
"raw": "undefined \\| string",
|
||||
"elements": [
|
||||
{
|
||||
"name": "undefined"
|
||||
},
|
||||
{
|
||||
"name": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"rest": false
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": {
|
||||
"name": "string"
|
||||
},
|
||||
"rest": false
|
||||
},
|
||||
{
|
||||
"name": "values",
|
||||
"type": {
|
||||
"name": "CurrencyInputOnChangeValues",
|
||||
"elements": [],
|
||||
"raw": "CurrencyInputOnChangeValues"
|
||||
},
|
||||
"rest": false
|
||||
}
|
||||
],
|
||||
"return": {
|
||||
"name": "void"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"placeholder": {
|
||||
"description": "Placeholder if there is no value",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
}
|
||||
},
|
||||
"step": {
|
||||
"description": "Incremental value change on arrow down and arrow up key press",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "number"
|
||||
}
|
||||
},
|
||||
"transformRawValue": {
|
||||
"description": "Transform the raw value form the input before parsing",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "signature",
|
||||
"type": "function",
|
||||
"raw": "(rawValue: string) => string",
|
||||
"signature": {
|
||||
"arguments": [
|
||||
{
|
||||
"name": "rawValue",
|
||||
"type": {
|
||||
"name": "string"
|
||||
},
|
||||
"rest": false
|
||||
}
|
||||
],
|
||||
"return": {
|
||||
"name": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
"onInvalid": {
|
||||
"description": "A function that is triggered when the input is invalid."
|
||||
}
|
||||
},
|
||||
"composes": [
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"value": "8",
|
||||
"computed": false
|
||||
},
|
||||
"description": "",
|
||||
"description": "The space in pixels between the dropdown menu and its trigger element.",
|
||||
"required": false
|
||||
},
|
||||
"collisionPadding": {
|
||||
@@ -16,7 +16,7 @@
|
||||
"value": "8",
|
||||
"computed": false
|
||||
},
|
||||
"description": "",
|
||||
"description": "The distance in pixels from the boundary edges where collision detection should occur.",
|
||||
"required": false
|
||||
},
|
||||
"align": {
|
||||
@@ -24,7 +24,7 @@
|
||||
"value": "\"center\"",
|
||||
"computed": false
|
||||
},
|
||||
"description": "",
|
||||
"description": "The alignment of the dropdown menu relative to its trigger element.\n\n@defaultValue center",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,27 @@
|
||||
{
|
||||
"description": "",
|
||||
"description": "This component is based on the [Radix UI Radio Group Item](https://www.radix-ui.com/primitives/docs/components/radio-group#item) primitives.",
|
||||
"methods": [],
|
||||
"displayName": "RadioGroup.ChoiceBox",
|
||||
"props": {}
|
||||
"props": {
|
||||
"label": {
|
||||
"required": true,
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
},
|
||||
"description": "The label for the radio button."
|
||||
},
|
||||
"description": {
|
||||
"required": true,
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
},
|
||||
"description": "The description for the radio button."
|
||||
},
|
||||
"value": {
|
||||
"description": "The value of the radio button.",
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,57 @@
|
||||
"methods": [],
|
||||
"displayName": "Tooltip",
|
||||
"props": {
|
||||
"content": {
|
||||
"required": true,
|
||||
"tsType": {
|
||||
"name": "ReactReactNode",
|
||||
"raw": "React.ReactNode"
|
||||
},
|
||||
"description": "The content to display in the tooltip."
|
||||
},
|
||||
"onClick": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "ReactMouseEventHandler",
|
||||
"raw": "React.MouseEventHandler<HTMLButtonElement>",
|
||||
"elements": [
|
||||
{
|
||||
"name": "HTMLButtonElement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "A function that is triggered when the tooltip is clicked."
|
||||
},
|
||||
"side": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "union",
|
||||
"raw": "\"bottom\" | \"left\" | \"top\" | \"right\"",
|
||||
"elements": [
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"bottom\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"left\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"top\""
|
||||
},
|
||||
{
|
||||
"name": "literal",
|
||||
"value": "\"right\""
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "The side to position the tooltip.\n\n",
|
||||
"defaultValue": {
|
||||
"value": "top",
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"maxWidth": {
|
||||
"required": false,
|
||||
"tsType": {
|
||||
@@ -14,77 +65,59 @@
|
||||
"computed": false
|
||||
}
|
||||
},
|
||||
"aria-label": {
|
||||
"description": "A more descriptive label for accessibility purpose",
|
||||
"required": false,
|
||||
"sideOffset": {
|
||||
"defaultValue": {
|
||||
"value": "8",
|
||||
"computed": false
|
||||
},
|
||||
"description": "The distance in pixels between the tooltip and its trigger.",
|
||||
"tsType": {
|
||||
"name": "string"
|
||||
"name": "number"
|
||||
},
|
||||
"required": false
|
||||
},
|
||||
"children": {
|
||||
"description": "The element to trigger the tooltip."
|
||||
},
|
||||
"open": {
|
||||
"description": "Whether the tooltip is currently open.",
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
},
|
||||
"defaultOpen": {
|
||||
"description": "Whether the tooltip is open by default.",
|
||||
"tsType": {
|
||||
"name": "boolean"
|
||||
}
|
||||
},
|
||||
"onOpenChange": {
|
||||
"description": "A function that is called when the tooltip's open state changes.",
|
||||
"tsType": {
|
||||
"name": "signature",
|
||||
"type": "function",
|
||||
"raw": "(open: boolean) => void",
|
||||
"signature": {
|
||||
"arguments": [
|
||||
{
|
||||
"name": "open",
|
||||
"type": {
|
||||
"name": "boolean"
|
||||
},
|
||||
"rest": false
|
||||
}
|
||||
],
|
||||
"return": {
|
||||
"name": "void"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delayDuration": {
|
||||
"description": "The duration from when the pointer enters the trigger until the tooltip gets opened. This will\noverride the prop with the same name passed to Provider.",
|
||||
"required": false,
|
||||
"description": "The time in milliseconds to delay the tooltip's appearance.",
|
||||
"tsType": {
|
||||
"name": "number"
|
||||
}
|
||||
},
|
||||
"forceMount": {
|
||||
"description": "Used to force mounting when more control is needed. Useful when\ncontrolling animation with React animation libraries.",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "literal",
|
||||
"value": "true"
|
||||
}
|
||||
},
|
||||
"onEscapeKeyDown": {
|
||||
"description": "Event handler called when the escape key is down.\nCan be prevented.",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "signature",
|
||||
"type": "function",
|
||||
"raw": "(event: KeyboardEvent) => void",
|
||||
"signature": {
|
||||
"arguments": [
|
||||
{
|
||||
"name": "event",
|
||||
"type": {
|
||||
"name": "KeyboardEvent",
|
||||
"elements": [],
|
||||
"raw": "KeyboardEvent"
|
||||
},
|
||||
"rest": false
|
||||
}
|
||||
],
|
||||
"return": {
|
||||
"name": "void"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"onPointerDownOutside": {
|
||||
"description": "Event handler called when the a `pointerdown` event happens outside of the `Tooltip`.\nCan be prevented.",
|
||||
"required": false,
|
||||
"tsType": {
|
||||
"name": "signature",
|
||||
"type": "function",
|
||||
"raw": "(event: PointerDownOutsideEvent) => void",
|
||||
"signature": {
|
||||
"arguments": [
|
||||
{
|
||||
"name": "event",
|
||||
"type": {
|
||||
"name": "PointerDownOutsideEvent",
|
||||
"elements": [],
|
||||
"raw": "PointerDownOutsideEvent"
|
||||
},
|
||||
"rest": false
|
||||
}
|
||||
],
|
||||
"return": {
|
||||
"name": "void"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"composes": [
|
||||
|
||||
@@ -598,7 +598,7 @@ export default class TypedocManager {
|
||||
propDescription?.includes("@keep")
|
||||
const childHasExternalSource =
|
||||
childReflection.sources?.some((source) =>
|
||||
source.fileName.startsWith("node_modules")
|
||||
source.fileName.includes("node_modules")
|
||||
) || false
|
||||
return (
|
||||
parentHasExcludeExternalsModifier &&
|
||||
|
||||
Reference in New Issue
Block a user