@yorkjs/hive-ui 2.3.9 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yorkjs/hive-ui",
3
- "version": "2.3.9",
3
+ "version": "2.4.0",
4
4
  "description": "Hive UI - Taro React component library",
5
5
  "main": "src/index.ts",
6
6
  "module": "src/index.ts",
@@ -8,8 +8,7 @@ import Icon from '../Icon'
8
8
 
9
9
  import styles from './index.module.styl'
10
10
 
11
- type AlertType = 'success' | 'error' | 'primary' | 'warning'
12
- export { AlertType }
11
+ export type AlertType = 'success' | 'error' | 'primary' | 'warning'
13
12
 
14
13
  export interface AlertProps {
15
14
  message: React.ReactNode
@@ -6,9 +6,9 @@ import CellValue from './CellValue'
6
6
  import CellArrow from './CellArrow'
7
7
  import CellDescription from './CellDescription'
8
8
 
9
- export { CellProps } from './Cell'
10
- export { CellCardProps } from './CellCard'
11
- export { CellTitleProps } from './CellTitle'
9
+ export type { CellProps } from './Cell'
10
+ export type { CellCardProps } from './CellCard'
11
+ export type { CellTitleProps } from './CellTitle'
12
12
 
13
13
  export { setCellConfig } from './config'
14
14
 
@@ -8,11 +8,9 @@ import Icon from '../Icon'
8
8
  import styles from './index.module.styl'
9
9
 
10
10
  /** 文本对齐方式 */
11
- type RichTextAlign = 'left' | 'center' | 'right'
12
- export { RichTextAlign }
11
+ export type RichTextAlign = 'left' | 'center' | 'right'
13
12
 
14
- type RichTextBlockType = 'text' | 'image'
15
- export { RichTextBlockType }
13
+ export type RichTextBlockType = 'text' | 'image'
16
14
 
17
15
  interface RichTextBlockBase {
18
16
  /** 可选唯一标识 ,便于后续排序等扩展;未传时用下标 */
@@ -36,8 +34,7 @@ export interface RichTextImageBlock extends RichTextBlockBase {
36
34
  url: string
37
35
  }
38
36
 
39
- type RichTextBlock = RichTextTextBlock | RichTextImageBlock
40
- export { RichTextBlock }
37
+ export type RichTextBlock = RichTextTextBlock | RichTextImageBlock
41
38
 
42
39
  export interface RichTextEditorProps {
43
40
  /** 块列表(受控) */
@@ -21,8 +21,7 @@ export interface TableColumn<T extends object> {
21
21
  render?: (value: T[keyof T], record: T, index: number) => React.ReactNode
22
22
  }
23
23
 
24
- type TableTextAlign = 'left' | 'center' | 'right'
25
- export { TableTextAlign }
24
+ export type TableTextAlign = 'left' | 'center' | 'right'
26
25
 
27
26
  export interface TableProps<T extends object> {
28
27
  /** 列配置 */
@@ -6,7 +6,7 @@ import { formatClassNames } from '../../util/function'
6
6
 
7
7
  import styles from './index.module.styl'
8
8
 
9
- type TagType = 'default'
9
+ export type TagType = 'default'
10
10
  | 'success'
11
11
  | 'info'
12
12
  | 'error'
@@ -18,8 +18,6 @@ type TagType = 'default'
18
18
  | 'light-error'
19
19
  | 'light-warning'
20
20
 
21
- export { TagType }
22
-
23
21
  interface TagProps {
24
22
  type?: TagType
25
23
  text?: string | React.ReactNode
package/src/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export { setGlobalTheme, useTheme } from './config'
2
-
3
2
  export { default as Card } from './components/Card'
4
3
  export { default as NumberKeyboard } from './components/NumberKeyboard'
5
4
  export { default as Cell, setCellConfig } from './components/Cell'
@@ -15,20 +14,18 @@ export { default as Alert } from './components/Alert'
15
14
  export { default as Switch } from './components/Switch'
16
15
  export { default as SimpleModal } from './components/SimpleModal'
17
16
  export { default as Progress } from './components/Progress'
18
- export { default as StatsCard, StatsCardItem, StatsCardProps } from './components/StatsCard'
17
+ export { default as StatsCard } from './components/StatsCard'
18
+ export type { StatsCardItem, StatsCardProps } from './components/StatsCard'
19
19
 
20
20
  export { default as FlowItem } from './item/FlowItem'
21
21
  export { default as ListItem } from './item/ListItem'
22
22
  export { default as ProductItem, setProductItemConfig } from './item/ProductItem'
23
23
 
24
- export {
25
- default as Table,
26
- TableProps,
27
- TableColumn,
28
- } from './components/Table'
24
+ export { default as Table } from './components/Table'
25
+ export type { TableProps, TableColumn } from './components/Table'
29
26
 
30
- export {
31
- default as RichTextEditor,
27
+ export { default as RichTextEditor } from './components/RichTextEditor'
28
+ export type {
32
29
  RichTextEditorProps,
33
30
  RichTextBlock,
34
31
  RichTextTextBlock,
@@ -1,7 +1,7 @@
1
1
  import ProductItemMain from './ProductItem'
2
2
  import { setProductItemConfig } from './config'
3
3
 
4
- export { IProductCardLabels, IProductCardProps } from './ProductItem'
4
+ export type { IProductCardLabels, IProductCardProps } from './ProductItem'
5
5
 
6
6
  export { setProductItemConfig }
7
7