Skip to content

Commit

Permalink
chore: Use barrel files consistently in Lemon UI (#17368)
Browse files Browse the repository at this point in the history
Update lemon-ui exports for @posthog/lemon-ui barrel file
  • Loading branch information
maxbelm authored Sep 19, 2023
1 parent e549fba commit 1fc8877
Show file tree
Hide file tree
Showing 20 changed files with 67 additions and 16 deletions.
53 changes: 38 additions & 15 deletions frontend/@posthog/lemon-ui/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
import '../../../src/styles/global.scss'
export * from 'lib/lemon-ui/LemonBadge/LemonBadge'
export * from 'lib/lemon-ui/LemonButton/LemonButton'
export * from 'lib/lemon-ui/LemonSegmentedButton'
export * from 'lib/lemon-ui/LemonCheckbox/LemonCheckbox'

export * from 'lib/lemon-ui/hooks'
export * from 'lib/lemon-ui/lemonToast'

export * from 'lib/lemon-ui/LemonActionableTooltip'
export * from 'lib/lemon-ui/LemonBadge'
export * from 'lib/lemon-ui/LemonBanner'
export * from 'lib/lemon-ui/LemonButton'
export * from 'lib/lemon-ui/LemonCalendar'
export * from 'lib/lemon-ui/LemonCalendarRange'
export * from 'lib/lemon-ui/LemonCard'
export * from 'lib/lemon-ui/LemonCheckbox'
export * from 'lib/lemon-ui/LemonCollapse'
export * from 'lib/lemon-ui/LemonDivider/LemonDivider'
export * from 'lib/lemon-ui/LemonInput/LemonInput'
export * from 'lib/lemon-ui/LemonLabel/LemonLabel'
export * from 'lib/lemon-ui/LemonModal/LemonModal'
export * from 'lib/lemon-ui/LemonRow/LemonRow'
export * from 'lib/lemon-ui/LemonDialog'
export * from 'lib/lemon-ui/LemonDivider'
export * from 'lib/lemon-ui/LemonDropdown'
export * from 'lib/lemon-ui/LemonFileInput'
export * from 'lib/lemon-ui/LemonInput'
export * from 'lib/lemon-ui/LemonLabel'
export * from 'lib/lemon-ui/LemonMenu'
export * from 'lib/lemon-ui/LemonModal'
export * from 'lib/lemon-ui/LemonRow'
export * from 'lib/lemon-ui/LemonSegmentedButton'
export * from 'lib/lemon-ui/LemonSelect'
export * from 'lib/lemon-ui/LemonSnack/LemonSnack'
export * from 'lib/lemon-ui/LemonSwitch/LemonSwitch'
export * from 'lib/lemon-ui/LemonTable/LemonTable'
export * from 'lib/lemon-ui/LemonTag/LemonTag'
export * from 'lib/lemon-ui/LemonTextArea/LemonTextArea'
export * from 'lib/lemon-ui/lemonToast'
export * from 'lib/lemon-ui/LemonSelectMultiple'
export * from 'lib/lemon-ui/LemonSkeleton'
export * from 'lib/lemon-ui/LemonSnack'
export * from 'lib/lemon-ui/LemonSwitch'
export * from 'lib/lemon-ui/LemonTable'
export * from 'lib/lemon-ui/LemonTabs'
export * from 'lib/lemon-ui/LemonTag'
export * from 'lib/lemon-ui/LemonTextArea'
export * from 'lib/lemon-ui/LemonWidget'
export * from 'lib/lemon-ui/Lettermark'
export * from 'lib/lemon-ui/Link'
export * from 'lib/lemon-ui/PaginationControl'
export * from 'lib/lemon-ui/Popover'
export * from 'lib/lemon-ui/ProfilePicture'
export * from 'lib/lemon-ui/Spinner'
export * from 'lib/lemon-ui/Splotch'
export * from 'lib/lemon-ui/Tooltip'
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonActionableTooltip/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LemonActionableTooltip } from './LemonActionableTooltip'
export type { LemonActionableTooltipProps } from './LemonActionableTooltip'
1 change: 1 addition & 0 deletions frontend/src/lib/lemon-ui/LemonButton/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export { LemonButton, LemonButtonWithSideAction, LemonButtonWithDropdown } from './LemonButton'
export type {
LemonButtonPropsBase,
LemonButtonProps,
LemonButtonWithSideActionProps,
LemonButtonWithDropdownProps,
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonCalendar/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './LemonCalendar'
export * from './LemonCalendarSelect'
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonCalendarRange/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './LemonCalendarRange'
export * from './LemonCalendarRangeInline'
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonCard/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LemonCard } from './LemonCard'
export type { LemonCardProps } from './LemonCard'
1 change: 1 addition & 0 deletions frontend/src/lib/lemon-ui/LemonCheckbox/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { LemonCheckbox } from './LemonCheckbox'
export type { LemonCheckboxProps } from './LemonCheckbox'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { MouseEventHandler, useContext, useEffect, useState } from 'react'
import { Popover, PopoverOverlayContext, PopoverProps } from './Popover'
import { Popover, PopoverOverlayContext, PopoverProps } from '../Popover'

export interface LemonDropdownProps extends Omit<PopoverProps, 'children' | 'visible'> {
visible?: boolean
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonDropdown/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LemonDropdown } from './LemonDropdown'
export type { LemonDropdownProps } from './LemonDropdown'
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonFileInput/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LemonFileInput } from './LemonFileInput'
export type { LemonFileInputProps } from './LemonFileInput'
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonInput/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LemonInput } from './LemonInput'
export type { LemonInputProps, LemonInputPropsNumber, LemonInputPropsText } from './LemonInput'
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonLabel/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LemonLabel } from './LemonLabel'
export type { LemonLabelProps } from './LemonLabel'
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonSnack/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LemonSnack } from './LemonSnack'
export type { LemonSnackProps } from './LemonSnack'
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonSwitch/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LemonSwitch } from './LemonSwitch'
export { LemonSwitchProps } from './LemonSwitch'
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonTag/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LemonTag } from './LemonTag'
export type { LemonTagProps, LemonTagType } from './LemonTag'
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/LemonTextArea/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { LemonTextArea, LemonTextAreaMarkdown } from './LemonTextArea'
export type { LemonTextAreaProps } from './LemonTextArea'
File renamed without changes.
2 changes: 2 additions & 0 deletions frontend/src/lib/lemon-ui/Tooltip/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Tooltip } from './Tooltip'
export type { TooltipProps } from './Tooltip'

0 comments on commit 1fc8877

Please sign in to comment.