chore(docs): Updated UI Reference (automated) (#11578)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
18 files changed
+12147
-11470
No files matched your search
@@ -15,8 +15,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mdx-js/loader": "^3.1.0",
|
"@mdx-js/loader": "^3.1.0",
|
||||||
"@mdx-js/react": "^3.1.0",
|
"@mdx-js/react": "^3.1.0",
|
||||||
"@medusajs/icons": "~2.4.0",
|
"@medusajs/icons": "~2.5.1",
|
||||||
"@medusajs/ui": "~4.0.4",
|
"@medusajs/ui": "~4.0.6",
|
||||||
"@next/mdx": "15.0.4",
|
"@next/mdx": "15.0.4",
|
||||||
"@react-hook/resize-observer": "^2.0.2",
|
"@react-hook/resize-observer": "^2.0.2",
|
||||||
"@readme/openapi-parser": "^2.5.0",
|
"@readme/openapi-parser": "^2.5.0",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mdx-js/loader": "^3.1.0",
|
"@mdx-js/loader": "^3.1.0",
|
||||||
"@mdx-js/react": "^3.1.0",
|
"@mdx-js/react": "^3.1.0",
|
||||||
"@medusajs/icons": "~2.4.0",
|
"@medusajs/icons": "~2.5.1",
|
||||||
"@next/mdx": "15.0.4",
|
"@next/mdx": "15.0.4",
|
||||||
"clsx": "^2.1.0",
|
"clsx": "^2.1.0",
|
||||||
"docs-ui": "*",
|
"docs-ui": "*",
|
||||||
|
|||||||
+11137
-11036
File diff suppressed because it is too large.
Load diff
@@ -16,7 +16,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mdx-js/loader": "^3.1.0",
|
"@mdx-js/loader": "^3.1.0",
|
||||||
"@mdx-js/react": "^3.1.0",
|
"@mdx-js/react": "^3.1.0",
|
||||||
"@medusajs/icons": "~2.4.0",
|
"@medusajs/icons": "~2.5.1",
|
||||||
"@next/mdx": "15.0.4",
|
"@next/mdx": "15.0.4",
|
||||||
"clsx": "^2.1.0",
|
"clsx": "^2.1.0",
|
||||||
"docs-ui": "*",
|
"docs-ui": "*",
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@faker-js/faker": "^8.0.2",
|
"@faker-js/faker": "^8.0.2",
|
||||||
"@mdx-js/react": "^3.1.0",
|
"@mdx-js/react": "^3.1.0",
|
||||||
"@medusajs/icons": "~2.4.0",
|
"@medusajs/icons": "~2.5.1",
|
||||||
"@medusajs/ui": "~4.0.4",
|
"@medusajs/ui": "~4.0.6",
|
||||||
"@medusajs/ui-preset": "~2.4.0",
|
"@medusajs/ui-preset": "~2.5.1",
|
||||||
"autoprefixer": "10.4.14",
|
"autoprefixer": "10.4.14",
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"contentlayer": "^0.3.4",
|
"contentlayer": "^0.3.4",
|
||||||
|
|||||||
@@ -207,6 +207,13 @@ export const docsConfig: DocsConfig = {
|
|||||||
isPathHref: true,
|
isPathHref: true,
|
||||||
loaded: true,
|
loaded: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "link",
|
||||||
|
title: "Inline Tip",
|
||||||
|
path: "/components/inline-tip",
|
||||||
|
isPathHref: true,
|
||||||
|
loaded: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
title: "Input",
|
title: "Input",
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
---
|
||||||
|
title: "Inline Tip"
|
||||||
|
description: "A component for displaying a note or tip inline."
|
||||||
|
component: true
|
||||||
|
---
|
||||||
|
|
||||||
|
<ComponentExample name="inline-tip-demo" />
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
import { InlineTip } from "@medusajs/ui"
|
||||||
|
```
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
<InlineTip
|
||||||
|
label="This is a tip"
|
||||||
|
>
|
||||||
|
<button>Hover me</button>
|
||||||
|
</InlineTip>
|
||||||
|
```
|
||||||
|
|
||||||
|
## API Reference
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<ComponentReference mainComponent="InlineTip" />
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Success Inline Tip
|
||||||
|
|
||||||
|
<ComponentExample name="inline-tip-success" />
|
||||||
|
|
||||||
|
### Warning Inline Tip
|
||||||
|
|
||||||
|
<ComponentExample name="inline-tip-warning" />
|
||||||
|
|
||||||
|
### Error Inline Tip
|
||||||
|
|
||||||
|
<ComponentExample name="inline-tip-error" />
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { InlineTip } from "@medusajs/ui"
|
||||||
|
|
||||||
|
export default function InlineTipDemo() {
|
||||||
|
return (
|
||||||
|
<InlineTip
|
||||||
|
label="Tip"
|
||||||
|
>
|
||||||
|
Medusa UI is a package of React components to be used in Medusa Admin customizations.
|
||||||
|
</InlineTip>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { InlineTip } from "@medusajs/ui"
|
||||||
|
|
||||||
|
export default function InlineTipError() {
|
||||||
|
return (
|
||||||
|
<InlineTip
|
||||||
|
label="Error"
|
||||||
|
variant="error"
|
||||||
|
>
|
||||||
|
An error occurred. Please try again.
|
||||||
|
</InlineTip>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { InlineTip } from "@medusajs/ui"
|
||||||
|
|
||||||
|
export default function InlineTipSuccess() {
|
||||||
|
return (
|
||||||
|
<InlineTip
|
||||||
|
label="Success"
|
||||||
|
variant="success"
|
||||||
|
>
|
||||||
|
Product created successfully!
|
||||||
|
</InlineTip>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { InlineTip } from "@medusajs/ui"
|
||||||
|
|
||||||
|
export default function InlineTipWarning() {
|
||||||
|
return (
|
||||||
|
<InlineTip
|
||||||
|
label="Warning"
|
||||||
|
variant="warning"
|
||||||
|
>
|
||||||
|
This action cannot be undone.
|
||||||
|
</InlineTip>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -188,10 +188,30 @@ export const ExampleRegistry: ExampleRegistryType = {
|
|||||||
file: "src/examples/icon-badge-base.tsx",
|
file: "src/examples/icon-badge-base.tsx",
|
||||||
},
|
},
|
||||||
"icon-badge-large": {
|
"icon-badge-large": {
|
||||||
name: "icon-badge-small",
|
name: "icon-badge-large",
|
||||||
component: React.lazy(async () => import("@/examples/icon-badge-large")),
|
component: React.lazy(async () => import("@/examples/icon-badge-large")),
|
||||||
file: "src/examples/icon-badge-large.tsx",
|
file: "src/examples/icon-badge-large.tsx",
|
||||||
},
|
},
|
||||||
|
"inline-tip-demo": {
|
||||||
|
name: "inline-tip-demo",
|
||||||
|
component: React.lazy(async () => import("@/examples/inline-tip-demo")),
|
||||||
|
file: "src/examples/inline-tip-demo.tsx",
|
||||||
|
},
|
||||||
|
"inline-tip-warning": {
|
||||||
|
name: "inline-tip-warning",
|
||||||
|
component: React.lazy(async () => import("@/examples/inline-tip-warning")),
|
||||||
|
file: "src/examples/inline-tip-warning.tsx",
|
||||||
|
},
|
||||||
|
"inline-tip-error": {
|
||||||
|
name: "inline-tip-error",
|
||||||
|
component: React.lazy(async () => import("@/examples/inline-tip-error")),
|
||||||
|
file: "src/examples/inline-tip-error.tsx",
|
||||||
|
},
|
||||||
|
"inline-tip-success": {
|
||||||
|
name: "inline-tip-success",
|
||||||
|
component: React.lazy(async () => import("@/examples/inline-tip-success")),
|
||||||
|
file: "src/examples/inline-tip-success.tsx",
|
||||||
|
},
|
||||||
"button-demo": {
|
"button-demo": {
|
||||||
name: "button-demo",
|
name: "button-demo",
|
||||||
component: React.lazy(async () => import("@/examples/button-demo")),
|
component: React.lazy(async () => import("@/examples/button-demo")),
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"description": "This component is based on the `div` element and supports all of its props.",
|
||||||
|
"methods": [],
|
||||||
|
"displayName": "InlineTip",
|
||||||
|
"props": {
|
||||||
|
"label": {
|
||||||
|
"required": true,
|
||||||
|
"tsType": {
|
||||||
|
"name": "string"
|
||||||
|
},
|
||||||
|
"description": "The label to display in the tip."
|
||||||
|
},
|
||||||
|
"variant": {
|
||||||
|
"required": false,
|
||||||
|
"tsType": {
|
||||||
|
"name": "union",
|
||||||
|
"raw": "\"info\" | \"warning\" | \"error\" | \"success\"",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"name": "literal",
|
||||||
|
"value": "\"info\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "literal",
|
||||||
|
"value": "\"warning\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "literal",
|
||||||
|
"value": "\"error\""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "literal",
|
||||||
|
"value": "\"success\""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"description": "The variant of the tip.",
|
||||||
|
"defaultValue": {
|
||||||
|
"value": "\"info\"",
|
||||||
|
"computed": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mdx-js/loader": "^3.1.0",
|
"@mdx-js/loader": "^3.1.0",
|
||||||
"@mdx-js/react": "^3.1.0",
|
"@mdx-js/react": "^3.1.0",
|
||||||
"@medusajs/icons": "~2.4.0",
|
"@medusajs/icons": "~2.5.1",
|
||||||
"@next/mdx": "15.0.4",
|
"@next/mdx": "15.0.4",
|
||||||
"clsx": "^2.1.0",
|
"clsx": "^2.1.0",
|
||||||
"docs-ui": "*",
|
"docs-ui": "*",
|
||||||
|
|||||||
@@ -57,8 +57,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/is-prop-valid": "^1.3.1",
|
"@emotion/is-prop-valid": "^1.3.1",
|
||||||
"@medusajs/icons": "~2.4.0",
|
"@medusajs/icons": "~2.5.1",
|
||||||
"@medusajs/ui": "~4.0.4",
|
"@medusajs/ui": "~4.0.6",
|
||||||
"@next/third-parties": "15.0.4",
|
"@next/third-parties": "15.0.4",
|
||||||
"@octokit/request": "^8.1.1",
|
"@octokit/request": "^8.1.1",
|
||||||
"@react-hook/resize-observer": "^1.2.6",
|
"@react-hook/resize-observer": "^1.2.6",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"postcss.config.js"
|
"postcss.config.js"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@medusajs/ui-preset": "~2.4.0",
|
"@medusajs/ui-preset": "~2.5.1",
|
||||||
"tailwindcss-animate": "^1.0.7"
|
"tailwindcss-animate": "^1.0.7"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"watch": "tsc --watch"
|
"watch": "tsc --watch"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@medusajs/icons": "~2.4.0",
|
"@medusajs/icons": "~2.5.1",
|
||||||
"@types/node": "^20.11.20",
|
"@types/node": "^20.11.20",
|
||||||
"rimraf": "^5.0.5",
|
"rimraf": "^5.0.5",
|
||||||
"tsconfig": "*",
|
"tsconfig": "*",
|
||||||
|
|||||||
+834
-421
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user