Skip to content

Commit

Permalink
refactor(fileinputfield): move to ui-widgets
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Move FileInputField from ui-core to ui-widgets. New
import path from '@dhis2/ui-widgets' or '@dhis2/ui'.
  • Loading branch information
varl committed Mar 9, 2020
1 parent d979d96 commit 6059625
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
2 changes: 0 additions & 2 deletions packages/core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ export { TextArea } from './TextArea/TextArea.js'
export { ToggleGroup } from './ToggleGroup/ToggleGroup.js'

/* widgets */
export { CheckboxField } from './CheckboxField/CheckboxField.js'
export { FileInputField } from './FileInputField/FileInputField.js'
export { FileInputFieldWithList } from './FileInputFieldWithList/FileInputFieldWithList.js'
export { Menu } from './Menu/Menu.js'
export { Modal } from './Modal/Modal.js'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
import React from 'react'
import propTypes from '@dhis2/prop-types'

import { statusPropType, sizePropType } from '../common-prop-types.js'
import {
FileInput,
FileList,
FileListPlaceholder,
Field,
Label,
Help,
} from '@dhis2/ui-core'

import { FileInput } from '../FileInput/FileInput.js'
import { FileList } from '../FileList/FileList.js'
import { FileListPlaceholder } from '../FileListPlaceholder/FileListPlaceholder.js'
import { Field } from '../Field/Field.js'
import { Label } from '../Label/Label.js'
import { Help } from '../Help/Help.js'
;('') // TODO: https://github.com/jsdoc/jsdoc/issues/1718
const statusPropType = propTypes.mutuallyExclusive(
['valid', 'warning', 'error'],
propTypes.bool
)

const sizePropType = propTypes.mutuallyExclusive(
['small', 'large'],
propTypes.bool
)

/**
* @module
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react'
import { storiesOf } from '@storybook/react'

import { FileListItem } from '../index.js'
import { FileListItem } from '@dhis2/ui-core'

import { FileInputField } from './FileInputField.js'

const onChange = obj => {
Expand Down
1 change: 1 addition & 0 deletions packages/widgets/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export { HeaderBar } from './HeaderBar'
export { OrganisationUnitTree } from './OrganisationUnitTree'

export { CheckboxField } from './CheckboxField/CheckboxField.js'
export { FileInputField } from './FileInputField/FileInputField.js'
export { ToggleGroupField } from './ToggleGroupField/ToggleGroupField.js'

0 comments on commit 6059625

Please sign in to comment.