Skip to content

Commit 45c5766

Browse files
authored
Merge pull request #79 from solved-ac/release/v0.8.0
Release/v0.8.0
2 parents 30901da + 3e07a13 commit 45c5766

34 files changed

+166
-136
lines changed

example/.DS_Store

6 KB
Binary file not shown.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solved-ac/ui-react",
3-
"version": "0.7.0",
3+
"version": "0.8.0",
44
"description": "React component library used by solved.ac",
55
"author": "shiftpsh",
66
"license": "MIT",
@@ -42,8 +42,8 @@
4242
"@emotion/styled": ">=11",
4343
"@floating-ui/react": "^0.24.3",
4444
"framer-motion": ">=6",
45-
"react": ">=17",
46-
"react-dom": ">=17"
45+
"react": ">=18",
46+
"react-dom": ">=18"
4747
},
4848
"devDependencies": {
4949
"@babel/plugin-proposal-decorators": "^7.17.9",
@@ -57,8 +57,8 @@
5757
"@testing-library/user-event": "^7.2.1",
5858
"@types/jest": "^25.1.4",
5959
"@types/node": "^12.12.38",
60-
"@types/react": "^18.0.9",
61-
"@types/react-dom": "^18.0.3",
60+
"@types/react": "^18.2.46",
61+
"@types/react-dom": "^18.2.18",
6262
"@typescript-eslint/eslint-plugin": "^5.22.0",
6363
"@typescript-eslint/parser": "^5.22.0",
6464
"babel-eslint": "^10.0.3",
@@ -85,9 +85,9 @@
8585
"npm-run-all": "^4.1.5",
8686
"polished": "^4.2.2",
8787
"prettier": "^2.6.2",
88-
"react": "^17.0.1",
89-
"react-dom": "^17.0.1",
88+
"react": "^18.2.0",
89+
"react-dom": "^18.2.0",
9090
"react-scripts": "^5.0.1",
91-
"typescript": "^4.6.4"
91+
"typescript": "^5.8.3"
9292
}
9393
}

src/components/$DateSelect/DateSelect.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import styled from '@emotion/styled'
2-
import React, { ElementType, useEffect, useState } from 'react'
2+
import React, {
3+
ElementType,
4+
PropsWithChildren,
5+
useEffect,
6+
useState,
7+
} from 'react'
38
import { PP, PR } from '../../types/PolymorphicElementProps'
49
import { forwardRefWithGenerics } from '../../utils/ref'
510
import { DateSelectContext } from './DateSelectContext'
@@ -33,7 +38,7 @@ export type DateSelectProps = DateSelectValues & {
3338
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6
3439
locale?: string
3540
chunks?: number
36-
}
41+
} & PropsWithChildren
3742

3843
export type DateSelectMode = 'year' | 'month' | 'date'
3944
export type CursorMode = 'select' | 'selectStart' | 'selectEnd'

src/components/$Item/Enumerate.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled from '@emotion/styled'
2-
import React, { ElementType, useContext } from 'react'
2+
import React, { ElementType, PropsWithChildren, useContext } from 'react'
33
import { PC, PP, PR } from '../../types/PolymorphicElementProps'
44
import { forwardRefWithGenerics } from '../../utils/ref'
55
import { ItemizeContext } from './ItemizeContext'
@@ -27,7 +27,7 @@ const EnumerateContainer = styled.ol<EnumerateContainerProps>`
2727
}
2828
`
2929

30-
export interface EnumerateProps {
30+
export interface EnumerateProps extends PropsWithChildren {
3131
marker?: string
3232
margin?: 'none' | 'normal' | 'wide'
3333
}

src/components/$Item/Item.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled from '@emotion/styled'
2-
import React, { ElementType, useContext } from 'react'
2+
import React, { ElementType, PropsWithChildren, useContext } from 'react'
33
import { PC, PP, PR } from '../../types/PolymorphicElementProps'
44
import { forwardRefWithGenerics } from '../../utils/ref'
55
import { ItemizeContext } from './ItemizeContext'
@@ -17,7 +17,7 @@ const ItemContainer = styled.li<ItemContainerProps>`
1717
}
1818
`
1919

20-
export interface ItemProps {
20+
export interface ItemProps extends PropsWithChildren {
2121
marker?: string
2222
}
2323

src/components/$Item/Itemize.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled from '@emotion/styled'
2-
import React, { ElementType, useContext } from 'react'
2+
import React, { ElementType, PropsWithChildren, useContext } from 'react'
33
import { PC, PP, PR } from '../../types/PolymorphicElementProps'
44
import { forwardRefWithGenerics } from '../../utils/ref'
55
import { ItemizeContext } from './ItemizeContext'
@@ -27,7 +27,7 @@ const ItemizeContainer = styled.ul<ItemizeContainerProps>`
2727
}
2828
`
2929

30-
export interface ItemizeProps {
30+
export interface ItemizeProps extends PropsWithChildren {
3131
marker?: string
3232
margin?: 'none' | 'normal' | 'wide'
3333
}

src/components/$List/List.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled from '@emotion/styled'
2-
import React, { ElementType } from 'react'
2+
import React, { ElementType, PropsWithChildren } from 'react'
33
import { PC, PP, PR } from '../../types/PolymorphicElementProps'
44
import { forwardRefWithGenerics } from '../../utils/ref'
55

@@ -18,7 +18,7 @@ const ListContainer = styled.ul<ListContainerProps>`
1818
list-style: none;
1919
`
2020

21-
export interface ListProps {
21+
export interface ListProps extends PropsWithChildren {
2222
padding?: 'none' | 'normal' | 'wide'
2323
}
2424

src/components/$List/ListItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { css, useTheme } from '@emotion/react'
22
import styled from '@emotion/styled'
3-
import React, { ElementType } from 'react'
3+
import React, { ElementType, PropsWithChildren } from 'react'
44
import { PC, PP, PR } from '../../types/PolymorphicElementProps'
55
import { computeHoverColor, readableColor } from '../../utils/color'
66
import { forwardRefWithGenerics } from '../../utils/ref'
@@ -56,7 +56,7 @@ const ListItemContainer = styled.div<ListItemContainerProps>`
5656
${({ padding }) => paddingMap[padding]}
5757
`
5858

59-
export interface ListItemProps {
59+
export interface ListItemProps extends PropsWithChildren {
6060
backgroundColor?: string
6161
hoverColor?: string
6262
clickable?: boolean

src/components/$Tab/Tab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { css, useTheme } from '@emotion/react'
22
import styled from '@emotion/styled'
33
import { ellipsis } from 'polished'
4-
import React, { ElementType } from 'react'
4+
import React, { ElementType, PropsWithChildren } from 'react'
55
import { PC, PP, PR } from '../../types/PolymorphicElementProps'
66
import { computeHoverColor, readableColor } from '../../utils/color'
77
import { forwardRefWithGenerics } from '../../utils/ref'
@@ -56,7 +56,7 @@ const TabContainer = styled.button<TabContainerProps>`
5656
${({ current }) => current && whenCurrent}
5757
`
5858

59-
export interface TabProps {
59+
export interface TabProps extends PropsWithChildren {
6060
current?: boolean
6161
disabled?: boolean
6262
backgroundColor?: string

src/components/$Tab/Tabs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled from '@emotion/styled'
2-
import React, { ElementType } from 'react'
2+
import React, { ElementType, PropsWithChildren } from 'react'
33
import { PC, PP, PR } from '../../types/PolymorphicElementProps'
44
import { forwardRefWithGenerics } from '../../utils/ref'
55

@@ -15,7 +15,7 @@ const TabsContainer = styled.nav<TabsContainerProps>`
1515
flex-wrap: ${({ multiline }) => (multiline ? 'wrap' : 'nowrap')};
1616
`
1717

18-
export interface TabsProps {
18+
export interface TabsProps extends PropsWithChildren {
1919
fullWidth?: boolean
2020
multiline?: boolean
2121
}

0 commit comments

Comments
 (0)