Skip to content

Commit 37d9b48

Browse files
committed
add input element
1 parent 8eb587e commit 37d9b48

6 files changed

Lines changed: 98 additions & 0 deletions

File tree

components/react/src/components/ui/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export * as HoverCard from './hover-card'
2626
export { Icon, type IconProps } from './icon'
2727
export { IconButton, type IconButtonProps } from './icon-button'
2828
export { Input, type InputProps } from './input'
29+
export { InputElement, type InputElementProps } from './input-element'
2930
export { Kbd, type KbdProps } from './kbd'
3031
export { Link, type LinkProps } from './link'
3132
export { Loader, type LoaderProps } from './loader'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { ark } from '@ark-ui/react/factory'
2+
import type { ComponentProps } from 'react'
3+
import { styled } from 'styled-system/jsx'
4+
import { inputElement } from 'styled-system/recipes'
5+
6+
export type InputElementProps = ComponentProps<typeof InputElement>
7+
export const InputElement = styled(ark.div, inputElement)

packages/preset/src/recipes/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { heading } from './heading'
2727
import { hoverCard } from './hover-card'
2828
import { icon } from './icon'
2929
import { input } from './input'
30+
import { inputElement } from './input-element'
3031
import { kbd } from './kbd'
3132
import { link } from './link'
3233
import { listbox } from './listbox'
@@ -75,6 +76,7 @@ export const recipes = {
7576
heading,
7677
icon,
7778
input,
79+
inputElement,
7880
kbd,
7981
link,
8082
skeleton,
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { defineRecipe } from '@pandacss/dev'
2+
3+
export const inputElement = defineRecipe({
4+
className: 'input-element',
5+
base: {
6+
alignItems: 'center',
7+
color: 'fg.muted',
8+
display: 'flex',
9+
fontSize: 'sm',
10+
height: 'full',
11+
justifyContent: 'center',
12+
position: 'absolute',
13+
px: '3',
14+
zIndex: '2',
15+
},
16+
variants: {
17+
placement: {
18+
start: {
19+
insetInlineStart: '0',
20+
},
21+
end: {
22+
insetInlineEnd: '0',
23+
},
24+
},
25+
},
26+
})

website/public/registry/components/react/index.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383
{
8484
"id": "input"
8585
},
86+
{
87+
"id": "input-element"
88+
},
8689
{
8790
"id": "kbd"
8891
},
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"$schema": "https://next.park-ui.com/schema/registry-item.json",
3+
"id": "input-element",
4+
"type": "component",
5+
"files": [
6+
{
7+
"type": "component",
8+
"fileName": "input-element.tsx",
9+
"content": "import { ark } from '@ark-ui/react/factory'\nimport type { ComponentProps } from 'react'\nimport { styled } from 'styled-system/jsx'\nimport { inputElement } from 'styled-system/recipes'\n\nexport type InputElementProps = ComponentProps<typeof InputElement>\nexport const InputElement = styled(ark.div, inputElement)\n",
10+
"indexFile": {
11+
"exports": [
12+
{
13+
"type": "named",
14+
"symbols": [
15+
{
16+
"name": "InputElement",
17+
"isType": false
18+
},
19+
{
20+
"name": "InputElementProps",
21+
"isType": true
22+
}
23+
],
24+
"moduleSpecifier": "./input-element"
25+
}
26+
]
27+
}
28+
},
29+
{
30+
"type": "recipe",
31+
"fileName": "input-element.ts",
32+
"content": "import { defineRecipe } from '@pandacss/dev'\n\nexport const inputElement = defineRecipe({\n className: 'input-element',\n base: {\n alignItems: 'center',\n color: 'fg.muted',\n display: 'flex',\n fontSize: 'sm',\n height: 'full',\n justifyContent: 'center',\n position: 'absolute',\n px: '3',\n zIndex: '2',\n },\n variants: {\n placement: {\n start: {\n insetInlineStart: '0',\n },\n end: {\n insetInlineEnd: '0',\n },\n },\n },\n})\n",
33+
"indexFile": {
34+
"imports": [
35+
{
36+
"type": "named",
37+
"moduleSpecifier": "./input-element",
38+
"symbols": [
39+
{
40+
"name": "input-element"
41+
}
42+
]
43+
}
44+
],
45+
"exports": [
46+
{
47+
"type": "object-literal",
48+
"variableName": "recipes",
49+
"properties": [
50+
{
51+
"name": "input-element"
52+
}
53+
]
54+
}
55+
]
56+
}
57+
}
58+
]
59+
}

0 commit comments

Comments
 (0)