Skip to content

Commit 1f7e48c

Browse files
committed
fix build error 10
1 parent e505f37 commit 1f7e48c

File tree

6 files changed

+0
-80
lines changed

6 files changed

+0
-80
lines changed

packages/ui-date-time-input/src/DateTimeInput/props.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import { SyntheticEvent } from 'react'
2626
import type { FormMessage } from '@instructure/ui-form-field'
2727
import type { InteractionType } from '@instructure/ui-react-utils'
2828
import type { Moment } from '@instructure/ui-i18n'
29-
import { Validator } from 'prop-types'
3029
import type { Renderable } from '@instructure/shared-types'
3130

3231
type DateTimeInputProps = {
@@ -278,25 +277,6 @@ type DateTimeInputState = {
278277
type PropKeys = keyof DateTimeInputProps
279278
type AllowedPropKeys = Readonly<Array<PropKeys>>
280279

281-
const hourMinuteValidator: Validator<string> = function (
282-
props,
283-
propName,
284-
componentName,
285-
location
286-
) {
287-
const propValue = props[propName]
288-
if (typeof propValue === 'undefined' || propValue === '') return null
289-
290-
const hourMinuteRegex = /^\d{2}:\d{2}$/
291-
292-
if (typeof propValue === 'string' && !propValue.match(hourMinuteRegex)) {
293-
return new Error(
294-
`Invalid ${location} \`${propName}\` \`${propValue}\` supplied to \`${componentName}\`, expected ` +
295-
`a HH:MM formatted string.`
296-
)
297-
}
298-
return null
299-
}
300280
const allowedProps: AllowedPropKeys = [
301281
'description',
302282
'dateRenderLabel',

packages/ui-top-nav-bar/src/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ import type { TopNavBarContextType } from '../../TopNavBarContext'
3737

3838
import {
3939
commonAllowedProps,
40-
commonPropTypes,
41-
smallViewportPropTypes,
4240
smallViewportAllowedProps
4341
} from '../props'
4442
import type { CommonTopNavBarLayoutProps } from '../props'

packages/ui-top-nav-bar/src/TopNavBar/TopNavBarLayout/props.ts

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,22 @@
2323
*/
2424

2525
import React from 'react'
26-
import {
27-
Children as ChildrenPropTypes,
28-
element
29-
} from '@instructure/ui-prop-types'
3026

3127
import type { WithStyleProps } from '@instructure/emotion'
3228
import type {
3329
TopNavBarLayoutTheme,
3430
OtherHTMLAttributes,
3531
} from '@instructure/shared-types'
3632

37-
import { TopNavBarActionItems } from '../TopNavBarActionItems'
38-
import { TopNavBarBrand } from '../TopNavBarBrand'
39-
import { TopNavBarMenuItems } from '../TopNavBarMenuItems'
40-
import { TopNavBarUser } from '../TopNavBarUser'
41-
4233
import type { ActionItemsChild } from '../TopNavBarActionItems/props'
4334
import type { BrandChild } from '../TopNavBarBrand/props'
4435
import type { MenuItemsChild } from '../TopNavBarMenuItems/props'
4536
import type { UserChild } from '../TopNavBarUser/props'
4637
import type { BreadcrumbChild } from '../TopNavBarBreadcrumb/props'
4738

48-
import { topNavBarItemTooltipPropType } from '../TopNavBarItem/props'
49-
5039
import { TopNavBarLayout } from './index'
5140
import type { DesktopLayoutOwnProps } from './DesktopLayout/props'
5241
import type { SmallViewportLayoutOwnProps } from './SmallViewportLayout/props'
53-
import { TopNavBarBreadcrumb } from '../TopNavBarBreadcrumb'
5442

5543
type LayoutChild = React.ComponentElement<TopNavBarLayoutProps, TopNavBarLayout>
5644

@@ -133,40 +121,6 @@ type TopNavBarLayoutProps = TopNavBarLayoutOwnProps &
133121
WithStyleProps<TopNavBarLayoutTheme, null> &
134122
OtherHTMLAttributes<TopNavBarLayoutOwnProps>
135123

136-
const commonPropTypes: PropValidators<CommonPropKeys> = {
137-
renderBrand: ChildrenPropTypes.oneOf([TopNavBarBrand]),
138-
renderMenuItems: ChildrenPropTypes.oneOf([TopNavBarMenuItems]),
139-
renderActionItems: ChildrenPropTypes.oneOf([TopNavBarActionItems]),
140-
renderUser: ChildrenPropTypes.oneOf([TopNavBarUser]),
141-
renderBreadcrumb: ChildrenPropTypes.oneOf([TopNavBarBreadcrumb]),
142-
navLabel: PropTypes.string,
143-
elementRef: PropTypes.func
144-
}
145-
146-
const desktopPropTypes: PropValidators<DesktopPropKeys> = {
147-
hideActionsUserSeparator: PropTypes.bool
148-
}
149-
150-
const smallViewportPropTypes: PropValidators<SmallViewportPropKeys> = {
151-
dropdownMenuToggleButtonLabel: PropTypes.string.isRequired,
152-
dropdownMenuToggleButtonTooltip: topNavBarItemTooltipPropType,
153-
dropdownMenuLabel: PropTypes.string,
154-
alternativeTitle: PropTypes.node,
155-
renderInPlaceDialogConfig: PropTypes.shape({
156-
open: PropTypes.bool.isRequired,
157-
onClose: PropTypes.func.isRequired,
158-
closeButtonLabel: PropTypes.string.isRequired,
159-
content: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
160-
returnFocusElement: PropTypes.func,
161-
shouldContainFocus: PropTypes.bool,
162-
shouldCloseOnDocumentClick: PropTypes.bool,
163-
shouldCloseOnEscape: PropTypes.bool
164-
}),
165-
trayMountNode: PropTypes.oneOfType([element, PropTypes.func]),
166-
onDropdownMenuToggle: PropTypes.func,
167-
onDropdownMenuSelect: PropTypes.func,
168-
renderNavbarStartDangerousHack: PropTypes.node
169-
}
170124
const commonAllowedProps: CommonAllowedPropKeys = [
171125
'renderBrand',
172126
'renderMenuItems',
@@ -197,12 +151,8 @@ const allowedProps: AllowedPropKeys = [
197151

198152
export type { LayoutChild, CommonTopNavBarLayoutProps, TopNavBarLayoutProps }
199153
export {
200-
propTypes,
201154
allowedProps,
202-
commonPropTypes,
203155
commonAllowedProps,
204-
desktopPropTypes,
205-
smallViewportPropTypes,
206156
desktopAllowedProps,
207157
smallViewportAllowedProps
208158
}

packages/ui-top-nav-bar/src/TopNavBar/TopNavBarMenuItems/props.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,15 @@
2323
*/
2424

2525
import React from 'react'
26-
import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types'
2726

2827
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
2928
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
3029
import type {
3130
TopNavBarMenuItemsTheme,
3231
OtherHTMLAttributes,
33-
3432
ChildrenOfType
3533
} from '@instructure/shared-types'
3634

37-
import { TopNavBarItem } from '../TopNavBarItem'
3835
import type { ItemChild } from '../TopNavBarItem/props'
3936

4037
import { TopNavBarMenuItems } from './index'

packages/ui-top-nav-bar/src/TopNavBar/TopNavBarUser/props.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,13 @@
2323
*/
2424

2525
import React from 'react'
26-
import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types'
2726

2827
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
2928
import type {
3029
OtherHTMLAttributes,
31-
3230
ChildrenOfType
3331
} from '@instructure/shared-types'
3432

35-
import { TopNavBarItem } from '../TopNavBarItem'
3633
import type { ItemChild } from '../TopNavBarItem/props'
3734

3835
import { TopNavBarUser } from './index'

packages/ui-tree-browser/src/TreeBrowser/TreeCollection/props.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
*/
2424

2525
import React from 'react'
26-
import { Children } from '@instructure/ui-prop-types'
2726

28-
import { TreeNode } from '../TreeNode'
2927
import type { CollectionData } from '../props'
3028

3129
import type {

0 commit comments

Comments
 (0)