Skip to content

Commit 6be7db0

Browse files
fix: changed type
1 parent f23e2e3 commit 6be7db0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+570
-809
lines changed

.changeset/healthy-tables-boil.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@yamada-ui/number-input': patch
3+
'@yamada-ui/file-button': patch
4+
'@yamada-ui/breadcrumb': patch
5+
'@yamada-ui/file-input': patch
6+
'@yamada-ui/typography': patch
7+
'@yamada-ui/pin-input': patch
8+
'@yamada-ui/carousel': patch
9+
'@yamada-ui/dropzone': patch
10+
'@yamada-ui/editable': patch
11+
'@yamada-ui/progress': patch
12+
'@yamada-ui/skeleton': patch
13+
'@yamada-ui/textarea': patch
14+
'@yamada-ui/layouts': patch
15+
'@yamada-ui/popover': patch
16+
'@yamada-ui/tooltip': patch
17+
'@yamada-ui/button': patch
18+
'@yamada-ui/slider': patch
19+
'@yamada-ui/input': patch
20+
'@yamada-ui/card': patch
21+
'@yamada-ui/list': patch
22+
'@yamada-ui/utils': patch
23+
'@yamada-ui/core': patch
24+
---
25+
26+
Simplified type definition.

packages/components/breadcrumb/src/breadcrumb.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ export const BreadcrumbItem = forwardRef<BreadcrumbItemOptions, 'li'>(
151151
{...rest}
152152
>
153153
{cloneChildren}
154+
154155
{!isLastChild ? (
155156
<BreadcrumbSeparator gap={gap}>{separator}</BreadcrumbSeparator>
156157
) : null}
@@ -193,7 +194,7 @@ type BreadcrumbSeparatorOptions = {
193194
/**
194195
* The CSS `margin-inline-start`, and `margin-inline-end` property.
195196
*/
196-
gap?: CSSUIProps['mx']
197+
gap?: CSSUIObject['mx']
197198
}
198199

199200
export type BreadcrumbSeparatorProps = HTMLUIProps<'span'> &

packages/components/button/src/button-group.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
ui,
33
forwardRef,
4-
CSSUIProps,
4+
CSSUIObject,
55
HTMLUIProps,
66
ThemeProps,
77
} from '@yamada-ui/core'
@@ -12,7 +12,7 @@ type ButtonGroupOptions = {
1212
/**
1313
* The CSS `flex-direction` property.
1414
*/
15-
direction?: CSSUIProps['flexDirection']
15+
direction?: CSSUIObject['flexDirection']
1616
/**
1717
* If `true`, the borderRadius of button that are direct children will be altered to look flushed together.
1818
*
@@ -63,7 +63,7 @@ export const ButtonGroup = forwardRef<ButtonGroupProps, 'div'>(
6363
const isColumn =
6464
flexDirection === 'column' || flexDirection === 'column-reverse'
6565

66-
const css = {
66+
const css: CSSUIObject = {
6767
display: 'inline-flex',
6868
flexDirection,
6969
}

packages/components/card/src/card.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
HTMLUIProps,
77
ThemeProps,
88
useMultiComponentStyle,
9-
CSSUIProps,
109
} from '@yamada-ui/core'
1110
import { createContext, cx } from '@yamada-ui/utils'
1211

@@ -19,15 +18,15 @@ type CardOptions = {
1918
/**
2019
* The CSS `flex-direction` property.
2120
*/
22-
direction?: CSSUIProps['flexDirection']
21+
direction?: CSSUIObject['flexDirection']
2322
/**
2423
* The CSS `justify-content` property.
2524
*/
26-
justify?: CSSUIProps['justifyContent']
25+
justify?: CSSUIObject['justifyContent']
2726
/**
2827
* The CSS `align-items` property.
2928
*/
30-
align?: CSSUIProps['alignItems']
29+
align?: CSSUIObject['alignItems']
3130
}
3231

3332
export type CardProps = HTMLUIProps<'article'> &

packages/components/carousel/src/carousel-slide.tsx

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
import {
2-
ui,
3-
forwardRef,
4-
HTMLUIProps,
5-
CSSUIObject,
6-
UIProps,
7-
} from '@yamada-ui/core'
1+
import { ui, forwardRef, HTMLUIProps, CSSUIObject } from '@yamada-ui/core'
82
import { cx } from '@yamada-ui/utils'
93
import {
104
useCarouselContext,
@@ -16,7 +10,7 @@ type CarouselSlideOptions = {
1610
/**
1711
* The CSS `width` property.
1812
*/
19-
size?: UIProps['width']
13+
size?: CSSUIObject['width']
2014
}
2115

2216
export type CarouselSlideProps = HTMLUIProps<'div'> &

packages/components/carousel/src/carousel.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
ThemeProps,
88
CSSUIObject,
99
Token,
10-
UIProps,
10+
CSSUIProps,
1111
} from '@yamada-ui/core'
1212
import { useToken } from '@yamada-ui/use-token'
1313
import { useValue } from '@yamada-ui/use-value'
@@ -127,7 +127,7 @@ type CarouselOptions = {
127127
/**
128128
* The CSS `width` property.
129129
*/
130-
slideSize?: UIProps['width']
130+
slideSize?: CSSUIProps['width']
131131
/**
132132
* Props for carousel inner element.
133133
*/

packages/components/carousel/src/use-carousel.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { IconButtonProps } from '@yamada-ui/button'
22
import {
33
CSSUIObject,
44
HTMLUIProps,
5-
UIProps,
5+
CSSUIProps,
66
layoutStylesProperties,
77
} from '@yamada-ui/core'
88
import { useControllableState } from '@yamada-ui/use-controllable-state'
@@ -33,7 +33,7 @@ type CarouselContext = {
3333
includeGapInSize: boolean
3434
slidesToScroll: number
3535
slideSize: string | number
36-
gap: UIProps['gap']
36+
gap: CSSUIProps['gap']
3737
styles: Record<string, CSSUIObject>
3838
}
3939

@@ -154,7 +154,7 @@ export type UseCarouselProps = Omit<
154154
*
155155
* @default 'md'
156156
*/
157-
gap?: UIProps['gap']
157+
gap?: CSSUIProps['gap']
158158
/**
159159
* The carousel slide width.
160160
*

packages/components/dropzone/src/dropzone.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {
66
HTMLUIProps,
77
ThemeProps,
88
useMultiComponentStyle,
9-
CSSUIProps,
9+
ColorModeToken,
10+
CSS,
1011
} from '@yamada-ui/core'
1112
import {
1213
FormControlOptions,
@@ -47,11 +48,11 @@ type DropzoneOptions = {
4748
/**
4849
* The border color when the input is focused.
4950
*/
50-
focusBorderColor?: CSSUIProps<'unresponsive'>['borderColor']
51+
focusBorderColor?: ColorModeToken<CSS.Property.BorderColor, 'colors'>
5152
/**
5253
* The border color when the input is invalid.
5354
*/
54-
errorBorderColor?: CSSUIProps<'unresponsive'>['borderColor']
55+
errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, 'colors'>
5556
/**
5657
* If `true`, display the dropzone loading icon.
5758
*

packages/components/editable/src/editable.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {
66
CSSUIObject,
77
HTMLUIProps,
88
ThemeProps,
9-
CSSUIProps,
9+
ColorModeToken,
10+
CSS,
1011
} from '@yamada-ui/core'
1112
import {
1213
FormControlOptions,
@@ -433,11 +434,11 @@ type EditableOptions = {
433434
/**
434435
* The border color when the input is focused.
435436
*/
436-
focusBorderColor?: CSSUIProps<'unresponsive'>['borderColor']
437+
focusBorderColor?: ColorModeToken<CSS.Property.BorderColor, 'colors'>
437438
/**
438439
* The border color when the input is invalid.
439440
*/
440-
errorBorderColor?: CSSUIProps<'unresponsive'>['borderColor']
441+
errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, 'colors'>
441442
children?:
442443
| ReactNode
443444
| ((

packages/components/file-button/src/file-button.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Button, ButtonProps } from '@yamada-ui/button'
2-
import { ui, forwardRef, CSSUIProps } from '@yamada-ui/core'
2+
import { ui, forwardRef, ColorModeToken, CSS } from '@yamada-ui/core'
33
import {
44
FormControlOptions,
55
formControlProperties,
@@ -34,7 +34,7 @@ type FileButtonOptions = {
3434
/**
3535
* The border color when the button is invalid.
3636
*/
37-
errorBorderColor?: CSSUIProps<'unresponsive'>['borderColor']
37+
errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, 'colors'>
3838
/**
3939
* Function to be called when a file change event occurs.
4040
*/

packages/components/file-input/src/file-input.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import {
55
CSSUIObject,
66
HTMLUIProps,
77
ThemeProps,
8-
CSSUIProps,
98
useMultiComponentStyle,
9+
ColorModeToken,
10+
CSS,
1011
} from '@yamada-ui/core'
1112
import {
1213
FormControlOptions,
@@ -41,11 +42,11 @@ type FileInputOptions = {
4142
/**
4243
* The border color when the input is focused.
4344
*/
44-
focusBorderColor?: CSSUIProps<'unresponsive'>['borderColor']
45+
focusBorderColor?: ColorModeToken<CSS.Property.BorderColor, 'colors'>
4546
/**
4647
* The border color when the input is invalid.
4748
*/
48-
errorBorderColor?: CSSUIProps<'unresponsive'>['borderColor']
49+
errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, 'colors'>
4950
/**
5051
* The value of the file input.
5152
*/

packages/components/input/src/input.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {
66
HTMLUIProps,
77
ThemeProps,
88
useMultiComponentStyle,
9-
CSSUIProps,
9+
ColorModeToken,
10+
CSS,
1011
} from '@yamada-ui/core'
1112
import {
1213
useFormControlProps,
@@ -18,11 +19,11 @@ type InputOptions = {
1819
/**
1920
* The border color when the input is focused.
2021
*/
21-
focusBorderColor?: CSSUIProps<'unresponsive'>['borderColor']
22+
focusBorderColor?: ColorModeToken<CSS.Property.BorderColor, 'colors'>
2223
/**
2324
* The border color when the input is invalid.
2425
*/
25-
errorBorderColor?: CSSUIProps<'unresponsive'>['borderColor']
26+
errorBorderColor?: ColorModeToken<CSS.Property.BorderColor, 'colors'>
2627
/**
2728
* The native HTML `size` attribute to be passed to the `input`
2829
*/

packages/components/layouts/src/flex.tsx

+8-14
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,34 @@
1-
import {
2-
ui,
3-
forwardRef,
4-
HTMLUIProps,
5-
CSSUIProps,
6-
CSSUIObject,
7-
} from '@yamada-ui/core'
1+
import { ui, forwardRef, HTMLUIProps, CSSUIObject } from '@yamada-ui/core'
82

93
type FlexOptions = {
104
/**
115
* The CSS `flex-direction` property.
126
*/
13-
direction?: CSSUIProps['flexDirection']
7+
direction?: CSSUIObject['flexDirection']
148
/**
159
* The CSS `justify-content` property.
1610
*/
17-
justify?: CSSUIProps['justifyContent']
11+
justify?: CSSUIObject['justifyContent']
1812
/**
1913
* The CSS `align-items` property.
2014
*/
21-
align?: CSSUIProps['alignItems']
15+
align?: CSSUIObject['alignItems']
2216
/**
2317
* The CSS `flex-wrap` property.
2418
*/
25-
wrap?: CSSUIProps['flexWrap']
19+
wrap?: CSSUIObject['flexWrap']
2620
/**
2721
* The CSS `flex-basis` property.
2822
*/
29-
basis?: CSSUIProps['flexBasis']
23+
basis?: CSSUIObject['flexBasis']
3024
/**
3125
* The CSS `flex-grow` property.
3226
*/
33-
grow?: CSSUIProps['flexGrow']
27+
grow?: CSSUIObject['flexGrow']
3428
/**
3529
* The CSS `flex-shrink` property.
3630
*/
37-
shrink?: CSSUIProps['flexShrink']
31+
shrink?: CSSUIObject['flexShrink']
3832
}
3933

4034
export type FlexProps = HTMLUIProps<'div'> & FlexOptions

0 commit comments

Comments
 (0)