@king-design/react 3.1.0-beta.3 → 3.1.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.
Files changed (155) hide show
  1. package/__tests__/__snapshots__/Dialog.md +1 -1
  2. package/__tests__/__snapshots__/React Demos.md +216 -208
  3. package/components/affix/index.d.ts +1 -1
  4. package/components/badge/index.d.ts +1 -1
  5. package/components/breadcrumb/index.d.ts +1 -1
  6. package/components/breadcrumb/item.d.ts +1 -1
  7. package/components/button/group.d.ts +1 -1
  8. package/components/button/index.d.ts +1 -1
  9. package/components/card/column.d.ts +1 -1
  10. package/components/card/index.d.ts +1 -1
  11. package/components/carousel/index.d.ts +1 -1
  12. package/components/carousel/index.vdt.js +1 -1
  13. package/components/carousel/item.d.ts +1 -1
  14. package/components/carousel/item.vdt.js +1 -1
  15. package/components/carousel/useSlide.d.ts +1 -1
  16. package/components/cascader/index.d.ts +3 -3
  17. package/components/cascader/index.vdt.js +1 -0
  18. package/components/checkbox/index.d.ts +1 -1
  19. package/components/code/index.d.ts +1 -1
  20. package/components/collapse/index.d.ts +1 -1
  21. package/components/collapse/index.vdt.js +1 -1
  22. package/components/collapse/item.d.ts +1 -1
  23. package/components/collapse/item.vdt.js +1 -1
  24. package/components/colorpicker/drag.d.ts +1 -1
  25. package/components/colorpicker/index.d.ts +1 -1
  26. package/components/colorpicker/panel.d.ts +1 -1
  27. package/components/colorpicker/panel.vdt.js +1 -1
  28. package/components/config/index.d.ts +9 -2
  29. package/components/config/index.js +4 -3
  30. package/components/copy/index.d.ts +1 -1
  31. package/components/copy/index.vdt.js +1 -1
  32. package/components/datepicker/calendar.d.ts +1 -1
  33. package/components/datepicker/calendar.vdt.js +1 -1
  34. package/components/datepicker/index.d.ts +4 -4
  35. package/components/datepicker/index.vdt.js +1 -1
  36. package/components/datepicker/time.d.ts +1 -1
  37. package/components/datepicker/usePanel.d.ts +1 -1
  38. package/components/diagram/diagram.d.ts +1 -1
  39. package/components/diagram/layouts/layout.d.ts +1 -1
  40. package/components/diagram/shapes/line.d.ts +1 -1
  41. package/components/diagram/shapes/shape.d.ts +1 -1
  42. package/components/dialog/base.d.ts +2 -2
  43. package/components/dialog/base.vdt.js +1 -1
  44. package/components/dialog/index.spec.js +87 -5
  45. package/components/drawer/index.d.ts +1 -1
  46. package/components/drawer/index.spec.js +6 -4
  47. package/components/dropdown/item.d.ts +1 -1
  48. package/components/dropdown/menu.d.ts +1 -1
  49. package/components/dropdown/menu.vdt.js +1 -1
  50. package/components/editable/index.d.ts +1 -1
  51. package/components/form/form.d.ts +1 -1
  52. package/components/form/item.d.ts +1 -1
  53. package/components/form/item.vdt.js +1 -1
  54. package/components/form/useError.d.ts +4 -4
  55. package/components/grid/col.d.ts +1 -1
  56. package/components/grid/row.d.ts +1 -1
  57. package/components/grid/useGutter.d.ts +3 -3
  58. package/components/icon/index.d.ts +1 -1
  59. package/components/input/index.d.ts +1 -1
  60. package/components/input/search.d.ts +1 -1
  61. package/components/input/styles.js +1 -1
  62. package/components/layout/aside.d.ts +1 -1
  63. package/components/layout/aside.vdt.js +1 -1
  64. package/components/layout/body.d.ts +1 -1
  65. package/components/layout/footer.d.ts +1 -1
  66. package/components/layout/header.d.ts +1 -1
  67. package/components/layout/layout.d.ts +1 -1
  68. package/components/menu/item.d.ts +1 -1
  69. package/components/menu/item.vdt.js +1 -1
  70. package/components/menu/menu.d.ts +1 -1
  71. package/components/menu/useDropdown.d.ts +1 -1
  72. package/components/message/message.d.ts +1 -1
  73. package/components/message/messages.d.ts +1 -1
  74. package/components/message/messages.vdt.js +1 -1
  75. package/components/pagination/index.d.ts +1 -1
  76. package/components/popover/content.d.ts +1 -1
  77. package/components/portal.d.ts +1 -1
  78. package/components/portal.js +7 -1
  79. package/components/progress/index.d.ts +1 -1
  80. package/components/radio/index.d.ts +1 -1
  81. package/components/rate/index.d.ts +1 -1
  82. package/components/rate/index.vdt.js +1 -1
  83. package/components/scrollSelect/index.d.ts +1 -1
  84. package/components/select/base.d.ts +1 -1
  85. package/components/select/base.vdt.js +1 -1
  86. package/components/select/group.d.ts +1 -1
  87. package/components/select/menu.d.ts +1 -1
  88. package/components/select/option.d.ts +1 -1
  89. package/components/select/option.vdt.js +1 -1
  90. package/components/select/select.d.ts +3 -3
  91. package/components/select/useCard.d.ts +1 -1
  92. package/components/select/useLabel.d.ts +1 -1
  93. package/components/select/useSearchable.d.ts +3 -3
  94. package/components/skeleton/item.d.ts +1 -1
  95. package/components/skeleton/skeleton.d.ts +1 -1
  96. package/components/slider/index.d.ts +1 -1
  97. package/components/slider/index.vdt.js +1 -1
  98. package/components/slider/useDraggable.d.ts +2 -2
  99. package/components/slider/useTooltip.d.ts +1 -1
  100. package/components/spin/index.d.ts +1 -1
  101. package/components/spin/index.vdt.js +1 -1
  102. package/components/spinner/index.d.ts +1 -1
  103. package/components/split/index.d.ts +1 -1
  104. package/components/split/memo.d.ts +1 -1
  105. package/components/split/useDraggable.d.ts +2 -2
  106. package/components/steps/context.d.ts +1 -1
  107. package/components/steps/index.d.ts +1 -1
  108. package/components/steps/step.d.ts +1 -1
  109. package/components/steps/step.vdt.js +1 -1
  110. package/components/switch/index.d.ts +1 -1
  111. package/components/table/cell.d.ts +1 -1
  112. package/components/table/column.d.ts +2 -2
  113. package/components/table/column.vdt.js +1 -1
  114. package/components/table/row.d.ts +1 -1
  115. package/components/table/row.vdt.js +2 -2
  116. package/components/table/styles.js +3 -2
  117. package/components/table/table.d.ts +2 -2
  118. package/components/table/table.vdt.js +1 -1
  119. package/components/table/useColumns.d.ts +5 -5
  120. package/components/table/useFixedColumns.d.ts +2 -2
  121. package/components/table/useGroup.d.ts +4 -4
  122. package/components/table/useResizable.d.ts +2 -2
  123. package/components/table/useSortable.d.ts +3 -3
  124. package/components/tabs/index.d.ts +1 -1
  125. package/components/tabs/tab.d.ts +1 -1
  126. package/components/tabs/useScroll.d.ts +1 -1
  127. package/components/tag/base.d.ts +1 -1
  128. package/components/tag/index.vdt.js +1 -1
  129. package/components/tag/tags.d.ts +1 -1
  130. package/components/tag/tags.vdt.js +1 -1
  131. package/components/tag/useChildren.d.ts +1 -1
  132. package/components/tag/useDraggable.d.ts +1 -1
  133. package/components/tag/useNowrap.d.ts +3 -3
  134. package/components/timeline/item.d.ts +1 -1
  135. package/components/timeline/timeline.d.ts +1 -1
  136. package/components/timepicker/index.d.ts +2 -2
  137. package/components/timepicker/panelPicker.d.ts +4 -4
  138. package/components/timepicker/selectPicker.d.ts +1 -1
  139. package/components/transfer/index.d.ts +1 -1
  140. package/components/transfer/index.vdt.js +1 -1
  141. package/components/tree/index.d.ts +1 -1
  142. package/components/tree/index.vdt.js +1 -1
  143. package/components/tree/useExpanded.js +21 -6
  144. package/components/treeSelect/index.d.ts +1 -1
  145. package/components/treeSelect/useValue.d.ts +1 -1
  146. package/components/upload/index.d.ts +7 -6
  147. package/components/upload/index.js +1 -0
  148. package/components/upload/index.vdt.js +1 -1
  149. package/components/upload/useFiles.js +21 -8
  150. package/components/utils.d.ts +1 -1
  151. package/components/virtual.d.ts +1 -1
  152. package/components/wave/index.d.ts +1 -1
  153. package/index.d.ts +2 -2
  154. package/index.js +2 -2
  155. package/package.json +1 -1
@@ -22,7 +22,7 @@ export declare type ShouldFixParam = {
22
22
  viewportHeight?: number;
23
23
  };
24
24
  export declare class Affix extends Component<AffixProps, AffixEvents> {
25
- static template: string | import("intact").Template<any>;
25
+ static template: string | import('intact-react').Template<any>;
26
26
  static typeDefs: Required<TypeDefs<AffixProps>>;
27
27
  private elementRef;
28
28
  private style;
@@ -5,7 +5,7 @@ export interface BadgeProps {
5
5
  disabled?: boolean;
6
6
  }
7
7
  export declare class Badge extends Component<BadgeProps> {
8
- static template: string | import("intact").Template<any>;
8
+ static template: string | import('intact-react').Template<any>;
9
9
  static typeDefs: Required<TypeDefs<BadgeProps>>;
10
10
  private config;
11
11
  }
@@ -9,7 +9,7 @@ export interface BreadcrumbBlocks {
9
9
  separator: null;
10
10
  }
11
11
  export declare class Breadcrumb extends Component<BreadcrumbProps, BreadcrumbEvents, BreadcrumbBlocks> {
12
- static template: string | import("intact").Template<any>;
12
+ static template: string | import('intact-react').Template<any>;
13
13
  static typeDefs: Required<TypeDefs<BreadcrumbProps>>;
14
14
  static defaults: () => Partial<BreadcrumbProps>;
15
15
  private config;
@@ -3,7 +3,7 @@ export interface BreadcrumbItemProps {
3
3
  to?: string | object;
4
4
  }
5
5
  export declare class BreadcrumbItem extends Component<BreadcrumbItemProps> {
6
- static template: string | import("intact").Template<any>;
6
+ static template: string | import('intact-react').Template<any>;
7
7
  static typeDefs: Required<TypeDefs<BreadcrumbItemProps>>;
8
8
  private router;
9
9
  private config;
@@ -7,7 +7,7 @@ export interface ButtonGroupProps {
7
7
  seperate?: boolean;
8
8
  }
9
9
  export declare class ButtonGroup extends Component<ButtonGroupProps> {
10
- static template: string | import("intact").Template<any>;
10
+ static template: string | import('intact-react').Template<any>;
11
11
  static typeDefs: Required<TypeDefs<ButtonGroupProps>>;
12
12
  static defaults: () => Partial<ButtonGroupProps>;
13
13
  private config;
@@ -33,7 +33,7 @@ export interface ButtonEvents {
33
33
  mouseup: [MouseEvent];
34
34
  }
35
35
  export declare class Button extends Component<ButtonProps, ButtonEvents> {
36
- static template: string | import("intact").Template<any>;
36
+ static template: string | import('intact-react').Template<any>;
37
37
  static typeDefs: Required<TypeDefs<Omit<ButtonProps, keyof ButtonHTMLAttributes>>>;
38
38
  static defaults: () => Partial<ButtonProps>;
39
39
  private buttonGroup;
@@ -4,7 +4,7 @@ export interface CardColumnProps {
4
4
  center?: boolean;
5
5
  }
6
6
  export declare class CardColumn extends Component<CardColumnProps> {
7
- static template: string | import("intact").Template<any>;
7
+ static template: string | import('intact-react').Template<any>;
8
8
  static typeDefs: Required<TypeDefs<CardColumnProps>>;
9
9
  private config;
10
10
  }
@@ -12,7 +12,7 @@ export interface CardBlocks {
12
12
  extra: null;
13
13
  }
14
14
  export declare class Card extends Component<CardProps, CardEvents, CardBlocks> {
15
- static template: string | import("intact").Template<any>;
15
+ static template: string | import('intact-react').Template<any>;
16
16
  static typeDefs: Required<TypeDefs<CardProps>>;
17
17
  static defaults: () => Partial<CardProps>;
18
18
  private config;
@@ -8,7 +8,7 @@ export interface CarouselProps {
8
8
  clonedAmount?: number;
9
9
  }
10
10
  export declare class Carousel extends Component<CarouselProps> {
11
- static template: string | import("intact").Template<any>;
11
+ static template: string | import('intact-react').Template<any>;
12
12
  static typeDefs: Required<TypeDefs<CarouselProps>>;
13
13
  static defaults: () => Partial<CarouselProps>;
14
14
  private items;
@@ -5,7 +5,7 @@ import { CarouselItem } from './item';
5
5
  import { Button } from '../button';
6
6
  import { Icon } from '../icon';
7
7
  import { makeStyles } from './styles';
8
- import { linkEvent } from 'intact';
8
+ import { linkEvent } from 'intact-react';
9
9
  export default function ($props, $blocks, $__proto__) {
10
10
  var _classNameObj;
11
11
 
@@ -4,7 +4,7 @@ export interface CarouselItemProps {
4
4
  cloned?: boolean;
5
5
  }
6
6
  export declare class CarouselItem extends Component<CarouselItemProps> {
7
- static template: string | import("intact").Template<any>;
7
+ static template: string | import('intact-react').Template<any>;
8
8
  static typeDefs: Required<TypeDefs<CarouselItemProps>>;
9
9
  private config;
10
10
  }
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import { createUnknownComponentVNode as _$cc, createVNode as _$cv, className as _$cn } from 'intact-react';
3
- import { Transition } from 'intact';
3
+ import { Transition } from 'intact-react';
4
4
  import { getRestProps } from '../utils';
5
5
  import { makeItemStyles } from './styles';
6
6
  export default function ($props, $blocks, $__proto__) {
@@ -3,7 +3,7 @@ import type { CarouselItem } from './item';
3
3
  export declare function useSlide(getItems: () => VNodeComponentClass<CarouselItem>[], getItemsWithCloned: () => VNodeComponentClass<CarouselItem>[]): {
4
4
  translate: import("../../hooks/useState").State<number>;
5
5
  shouldTransition: import("../../hooks/useState").State<boolean>;
6
- elementRef: import("intact").RefObject<HTMLElement>;
6
+ elementRef: import('intact-react').RefObject<HTMLElement>;
7
7
  translateToItem: (item: VNodeComponentClass<CarouselItem>, oldIndex: number | null, newIndex: number | null, keepDirection: boolean) => Promise<void>;
8
8
  isSlide: () => boolean;
9
9
  };
@@ -30,7 +30,7 @@ export interface CascaderEvents extends BaseSelectEvents {
30
30
  export interface CascaderBlocks<V> extends BaseSelectBlocks<V> {
31
31
  }
32
32
  export declare class Cascader<V = any, Multipe extends boolean = false, Data extends BaseCascaderData = CascaderData<V>> extends BaseSelect<CascaderProps<V, Multipe, Data>, CascaderEvents, CascaderBlocks<V>> {
33
- static template: string | import("intact").Template<any>;
33
+ static template: string | import('intact-react').Template<any>;
34
34
  static typeDefs: Required<TypeDefs<CascaderProps<any, boolean, CascaderData<any>>>>;
35
35
  static defaults: () => Partial<CascaderProps<any, boolean, CascaderData<any>>>;
36
36
  private fields;
@@ -39,7 +39,7 @@ export declare class Cascader<V = any, Multipe extends boolean = false, Data ext
39
39
  private load;
40
40
  private filterable;
41
41
  private positionObj;
42
- protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import("intact").Children[];
43
- protected getLabel(): import("intact").Children;
42
+ protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import('intact-react').Children[];
43
+ protected getLabel(): import('intact-react').Children;
44
44
  protected hasValue(): any;
45
45
  }
@@ -21,6 +21,7 @@ export default function ($props, $blocks, $__proto__) {
21
21
  fields = _this$get.fields;
22
22
 
23
23
  var k = this.config.k;
24
+ var baseMenuStyles = makeMenuStyles(k);
24
25
  var classNameObj = (_classNameObj = {}, _classNameObj[k + "-cascader-menu"] = true, _classNameObj[makeMenuStyles(k)] = true, _classNameObj);
25
26
  var getField = this.fields;
26
27
 
@@ -12,7 +12,7 @@ export interface CheckboxEvents<V = boolean> {
12
12
  change: [V, MouseEvent];
13
13
  }
14
14
  export declare class Checkbox<V = boolean> extends Component<CheckboxProps<V>, CheckboxEvents<V>> {
15
- static template: string | import("intact").Template<any>;
15
+ static template: string | import('intact-react').Template<any>;
16
16
  static typeDefs: Required<TypeDefs<Omit<CheckboxProps<boolean>, keyof CommonInputHTMLAttributes>>>;
17
17
  static defaults: () => Partial<CheckboxProps<boolean>>;
18
18
  static events: Events<CheckboxEvents<boolean>>;
@@ -14,7 +14,7 @@ export interface CodeEvents {
14
14
  ready: [editor.IStandaloneCodeEditor, typeof editor, typeof monaco];
15
15
  }
16
16
  export declare class Code extends Component<CodeProps, CodeEvents> {
17
- static template: string | import("intact").Template<any>;
17
+ static template: string | import('intact-react').Template<any>;
18
18
  static typeDefs: Required<TypeDefs<CodeProps>>;
19
19
  static defaults: () => Partial<CodeProps>;
20
20
  static events: Events<CodeEvents>;
@@ -11,7 +11,7 @@ export interface CollapseEvents {
11
11
  }
12
12
  export declare const COLLAPSE = "Collapse";
13
13
  export declare class Collapse extends Component<CollapseProps, CollapseEvents> {
14
- static template: string | import("intact").Template<any>;
14
+ static template: string | import('intact-react').Template<any>;
15
15
  static typeDefs: Required<TypeDefs<CollapseProps>>;
16
16
  static defaults: () => Partial<CollapseProps>;
17
17
  private config;
@@ -4,7 +4,7 @@ import { CollapseItem } from './item';
4
4
  import { mapChildren, getRestProps } from '../utils';
5
5
  import { makeStyles } from './styles';
6
6
  import { isNullOrUndefined } from 'intact-shared';
7
- import { directClone } from 'intact';
7
+ import { directClone } from 'intact-react';
8
8
  export default function ($props, $blocks, $__proto__) {
9
9
  var _classNameObj;
10
10
 
@@ -12,7 +12,7 @@ export interface CollapseItemBlocks {
12
12
  title: null;
13
13
  }
14
14
  export declare class CollapseItem extends Component<CollapseItemProps, CollapseItemEvents, CollapseItemBlocks> {
15
- static template: string | import("intact").Template<any>;
15
+ static template: string | import('intact-react').Template<any>;
16
16
  static typeDefs: Required<TypeDefs<CollapseItemProps>>;
17
17
  private collapse;
18
18
  private config;
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce, noop as _$no, createUnknownComponentVNode as _$cc } from 'intact-react';
3
- import { Transition } from 'intact';
3
+ import { Transition } from 'intact-react';
4
4
  import { expandAnimationCallbacks, getRestProps } from '../utils';
5
5
  import { makeItemStyles } from './styles';
6
6
  import { Icon } from '../icon';
@@ -9,7 +9,7 @@ interface ColorpickerDragEvents {
9
9
  click: [];
10
10
  }
11
11
  export declare class ColorpickerDrag extends Component<ColorpickerDragProps, ColorpickerDragEvents> {
12
- static template: string | import("intact").Template<any>;
12
+ static template: string | import('intact-react').Template<any>;
13
13
  private drag;
14
14
  private config;
15
15
  }
@@ -14,7 +14,7 @@ export interface ColorpickerProps {
14
14
  export interface ColorpickerEvents {
15
15
  }
16
16
  export declare class Colorpicker extends Component<ColorpickerProps, ColorpickerEvents> {
17
- static template: string | import("intact").Template<any>;
17
+ static template: string | import('intact-react').Template<any>;
18
18
  static typeDefs: Required<TypeDefs<ColorpickerProps>>;
19
19
  static defaults: () => Partial<ColorpickerProps>;
20
20
  private config;
@@ -4,7 +4,7 @@ export interface ColorpickerPanelProps {
4
4
  presets?: string[];
5
5
  }
6
6
  export declare class ColorpickerPanel extends Component<ColorpickerPanelProps> {
7
- static template: string | import("intact").Template<any>;
7
+ static template: string | import('intact-react').Template<any>;
8
8
  private value;
9
9
  private pointer;
10
10
  private input;
@@ -4,7 +4,7 @@ import { Row, Col } from '../grid';
4
4
  import { Slider } from '../slider';
5
5
  import { Input } from '../input';
6
6
  import { makePanelStyles, makeAlphaBgColor } from './styles';
7
- import { linkEvent } from 'intact';
7
+ import { linkEvent } from 'intact-react';
8
8
  import { Mode } from './useInput';
9
9
  import { ColorpickerDrag as Drag } from './drag';
10
10
  export default function ($props, $blocks, $__proto__) {
@@ -1,10 +1,17 @@
1
1
  import { ProviderProps } from '../context';
2
+ import { Component } from 'intact-react';
2
3
  export interface ConfigProps {
3
4
  classNamePrefix?: string;
4
5
  }
5
- declare const ConfigProvider: import('intact-react').ComponentConstructor<import("intact").Component<ProviderProps<ConfigProps>, {}, {}, {}>>, ConfigConsumer: import("intact").ComponentConstructor<import("intact").Component<import("../context").ConsumerProps<ConfigProps>, {}, {}, {}>>;
6
+ declare const ConfigConsumer: import('intact-react').ComponentConstructor<Component<import("../context").ConsumerProps<ConfigProps>, {}, {}, {}>>;
6
7
  declare function useConfigContext(): {
7
8
  cls: (name: string) => string;
8
9
  readonly k: string;
9
10
  };
10
- export { ConfigProvider, ConfigConsumer, useConfigContext, };
11
+ /**
12
+ * for vue/react type checking
13
+ */
14
+ export declare class _ConfigProvider extends Component<ProviderProps<ConfigProps>> {
15
+ }
16
+ export declare const ConfigProvider: typeof _ConfigProvider;
17
+ export { ConfigConsumer, useConfigContext, };
@@ -1,8 +1,8 @@
1
1
  import { createContext } from '../context';
2
- import { EMPTY_OBJ } from 'intact-react';
2
+ import { EMPTY_OBJ, Component } from 'intact-react';
3
3
 
4
4
  var _createContext = createContext(EMPTY_OBJ),
5
- ConfigProvider = _createContext.Provider,
5
+ Provider = _createContext.Provider,
6
6
  ConfigConsumer = _createContext.Consumer,
7
7
  useContext = _createContext.useContext;
8
8
 
@@ -20,4 +20,5 @@ function useConfigContext() {
20
20
  };
21
21
  }
22
22
 
23
- export { ConfigProvider, ConfigConsumer, useConfigContext };
23
+ export var ConfigProvider = Provider;
24
+ export { ConfigConsumer, useConfigContext };
@@ -10,7 +10,7 @@ export interface CopyEvents {
10
10
  click: [MouseEvent];
11
11
  }
12
12
  export declare class Copy extends Component<CopyProps, CopyEvents> {
13
- static template: string | import("intact").Template<any>;
13
+ static template: string | import('intact-react').Template<any>;
14
14
  static typeDefs: Required<TypeDefs<CopyProps>>;
15
15
  static defaults: () => Partial<CopyProps>;
16
16
  static events: Events<CopyEvents>;
@@ -3,7 +3,7 @@ import { createUnknownComponentVNode as _$cc, className as _$cn } from 'intact-r
3
3
  import { Icon } from '../icon';
4
4
  import { getRestProps } from '../utils';
5
5
  import { Virtual } from '../virtual';
6
- import { Transition } from 'intact';
6
+ import { Transition } from 'intact-react';
7
7
  import { makeStyles } from './styles';
8
8
  import { _$ } from '../../i18n';
9
9
  export default function ($props, $blocks, $__proto__) {
@@ -12,7 +12,7 @@ export interface DatepickerCalendarEvents {
12
12
  change: [Dayjs, PanelFlags];
13
13
  }
14
14
  export declare class DatepickerCalendar extends Component<DatepickerCalendarProps, DatepickerCalendarEvents> {
15
- static template: string | import("intact").Template<any>;
15
+ static template: string | import('intact-react').Template<any>;
16
16
  static defaults: () => Partial<DatepickerCalendarProps>;
17
17
  type: import("../../hooks/useState").State<Required<"date" | "month" | "year" | undefined>>;
18
18
  datepicker: Datepicker;
@@ -1,5 +1,5 @@
1
1
  import { map as _$ma, createElementVNode as _$ce, className as _$cn, createUnknownComponentVNode as _$cc } from 'intact-react';
2
- import { Transition } from 'intact';
2
+ import { Transition } from 'intact-react';
3
3
  import { Button } from '../button';
4
4
  import { Icon } from '../icon';
5
5
  import { _$ } from '../../i18n';
@@ -13,7 +13,7 @@ export interface DatepickerEvents extends BasePickerEvents {
13
13
  export interface DatepickerBlocks<V extends Value = Value, R extends boolean = boolean> extends BasePickerBlocks<V, R> {
14
14
  }
15
15
  export declare class Datepicker<V extends Value = Value, M extends boolean = false, R extends boolean = false> extends BasePicker<DatepickerProps<V, M, R>, DatepickerEvents, DatepickerBlocks<V, R>> {
16
- static template: string | import("intact").Template<any>;
16
+ static template: string | import('intact-react').Template<any>;
17
17
  static typeDefs: Required<TypeDefs<DatepickerProps<Value, boolean, boolean>>>;
18
18
  static defaults: () => Partial<DatepickerProps<Value, boolean, boolean>>;
19
19
  formats: {
@@ -37,8 +37,8 @@ export declare class Datepicker<V extends Value = Value, M extends boolean = fal
37
37
  changePanel: (type: import("./usePanel").PanelTypes, flag?: import("./usePanel").PanelFlags) => void;
38
38
  getPanel: (flag: import("./usePanel").PanelFlags) => State<import("./usePanel").PanelTypes>;
39
39
  reset: () => void;
40
- startRef: import("intact").RefObject<import("./calendar").DatepickerCalendar>;
41
- endRef: import("intact").RefObject<import("./calendar").DatepickerCalendar>;
40
+ startRef: import('intact-react').RefObject<import("./calendar").DatepickerCalendar>;
41
+ endRef: import('intact-react').RefObject<import("./calendar").DatepickerCalendar>;
42
42
  };
43
43
  focusDate: {
44
44
  focusDate: State<dayjs.Dayjs | null>;
@@ -56,7 +56,7 @@ export declare class Datepicker<V extends Value = Value, M extends boolean = fal
56
56
  onChangeDate: (v: dayjs.Dayjs, flag: import("./usePanel").PanelFlags) => void;
57
57
  };
58
58
  init(): void;
59
- protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import("intact").Children[];
59
+ protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import('intact-react').Children[];
60
60
  protected getLabel(): string | string[];
61
61
  protected clear(e: MouseEvent): void;
62
62
  private setByShortcut;
@@ -1,6 +1,6 @@
1
1
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
2
2
  import { createElementVNode as _$ce, createUnknownComponentVNode as _$cc, className as _$cn, superCall as _$su, extend as _$ex, EMPTY_OBJ as _$em, createTextVNode as _$ct } from 'intact-react';
3
- import { linkEvent } from 'intact';
3
+ import { linkEvent } from 'intact-react';
4
4
  import { DropdownMenu } from '../dropdown';
5
5
  import { DatepickerCalendar } from './calendar';
6
6
  import { DatepickerTime } from './time';
@@ -13,7 +13,7 @@ declare type Value = {
13
13
  s: number;
14
14
  };
15
15
  export declare class DatepickerTime extends Component<DatepickerTimeProps> {
16
- static template: string | import("intact").Template<any>;
16
+ static template: string | import('intact-react').Template<any>;
17
17
  value: import("../../hooks/useState").State<Value>;
18
18
  disabled: {
19
19
  disableSeconds: import("../../hooks/useState").State<boolean>;
@@ -14,5 +14,5 @@ export declare function usePanel(type?: PanelTypes): {
14
14
  getPanel: (flag: PanelFlags) => import("../../hooks/useState").State<PanelTypes>;
15
15
  reset: () => void;
16
16
  startRef: import('intact-react').RefObject<DatepickerCalendar>;
17
- endRef: import("intact").RefObject<DatepickerCalendar>;
17
+ endRef: import('intact-react').RefObject<DatepickerCalendar>;
18
18
  };
@@ -10,7 +10,7 @@ export interface DiagramEvents {
10
10
  selectionChanged: [any[]];
11
11
  }
12
12
  export declare class Diagram extends Component<DiagramProps, DiagramEvents> {
13
- static template: string | import("intact").Template<any>;
13
+ static template: string | import('intact-react').Template<any>;
14
14
  static events: Events<DiagramEvents>;
15
15
  graph: any;
16
16
  cell: any;
@@ -8,7 +8,7 @@ export interface DLayoutProps {
8
8
  top?: number | string;
9
9
  }
10
10
  export declare abstract class DLayout<P extends DLayoutProps = DLayoutProps> extends Component<P> {
11
- static template: (this: DLayout) => import("intact").VNode<string>;
11
+ static template: (this: DLayout) => import('intact-react').VNode<string>;
12
12
  static typeDefs: Required<TypeDefs<DLayoutProps>>;
13
13
  static defaults: () => Partial<DLayoutProps>;
14
14
  private diagram;
@@ -14,7 +14,7 @@ export interface DLineProps extends DBaseProps {
14
14
  declare type Arrow = 'none' | 'classic' | 'classicThin' | 'block' | 'blockThin' | 'open' | 'openThin' | 'oval' | 'diamond' | 'diamondThin';
15
15
  declare type Point = [number, number];
16
16
  export declare class DLine extends DBase<DLineProps> {
17
- static template: (this: DLine) => import("intact").VNode<"dline">;
17
+ static template: (this: DLine) => import('intact-react').VNode<"dline">;
18
18
  static typeDefs: Required<TypeDefs<DLineProps>>;
19
19
  static defaults: () => Partial<DLineProps>;
20
20
  protected startDraw(): void;
@@ -13,7 +13,7 @@ export interface DShapeProps extends DBaseProps {
13
13
  connectable?: boolean;
14
14
  }
15
15
  export declare abstract class DShape<P extends DShapeProps = DShapeProps> extends DBase<P> {
16
- static template: (this: DShape) => import("intact").VNode<string>;
16
+ static template: (this: DShape) => import('intact-react').VNode<string>;
17
17
  static typeDefs: Required<TypeDefs<DShapeProps>>;
18
18
  static defaults: () => Partial<DShapeProps>;
19
19
  private wrapperRef;
@@ -40,12 +40,12 @@ export interface BaseDialogBlocks {
40
40
  footer: null;
41
41
  }
42
42
  export declare class BaseDialog<T extends BaseDialogProps = BaseDialogProps, E extends BaseDialogEvents = BaseDialogEvents, B extends BaseDialogBlocks = BaseDialogBlocks> extends Component<T, E, B> {
43
- static template: string | import("intact").Template<any>;
43
+ static template: string | import('intact-react').Template<any>;
44
44
  static typeDefs: Required<TypeDefs<BaseDialogProps>>;
45
45
  static defaults: () => Partial<BaseDialogProps>;
46
46
  static events: Events<BaseDialogEvents>;
47
47
  static setHooks: typeof setHooks;
48
- dialogRef: import("intact").RefObject<HTMLDivElement>;
48
+ dialogRef: import('intact-react').RefObject<HTMLDivElement>;
49
49
  private overlayRef;
50
50
  private drag;
51
51
  private mouseOutsidable;
@@ -3,7 +3,7 @@ import { Button } from '../button';
3
3
  import { Icon } from '../icon';
4
4
  import { Portal } from '../portal';
5
5
  import { _$ } from '../../i18n';
6
- import { Transition } from 'intact';
6
+ import { Transition } from 'intact-react';
7
7
  import { getRestProps, stopPropagation } from '../utils';
8
8
  import { makeDialogStyles, makeWrapperStyles } from './styles';
9
9
  export default function ($props, $blocks, $__proto__) {
@@ -7,7 +7,7 @@ import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
7
7
 
8
8
  function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
9
 
10
- function _unsupportedIterableToArray(o, minLen) { var _context18; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context18 = Object.prototype.toString.call(o)).call(_context18, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _unsupportedIterableToArray(o, minLen) { var _context21; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context21 = Object.prototype.toString.call(o)).call(_context21, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
11
 
12
12
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
13
13
 
@@ -19,7 +19,7 @@ import { __decorate } from "tslib";
19
19
  import { Component } from 'intact-react';
20
20
  import { Dialog, BaseDialog } from './';
21
21
  import { bind } from '../utils';
22
- import { getElement, mount, unmount, dispatchEvent, wait } from '../../test/utils';
22
+ import { getElement, mount, unmount, dispatchEvent, wait, getElements } from '../../test/utils';
23
23
  import BasicDemo from '~/components/dialog/demos/basic';
24
24
  import AsyncCloseDemo from '~/components/dialog/demos/asyncClose';
25
25
  import TerminateDemo from '~/components/dialog/demos/terminate';
@@ -594,7 +594,7 @@ describe('Dialog', function () {
594
594
  }, _callee12);
595
595
  })));
596
596
  it('should remove body style when destroy', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
597
- var Demo, _mount13, instance, element;
597
+ var Demo, _mount13, instance, element, style;
598
598
 
599
599
  return _regeneratorRuntime.wrap(function _callee13$(_context17) {
600
600
  while (1) {
@@ -642,14 +642,96 @@ describe('Dialog', function () {
642
642
  return wait();
643
643
 
644
644
  case 7:
645
- expect(document.body.getAttribute('style')).to.be.null;
645
+ style = document.body.getAttribute('style');
646
+ expect(style === null || style === '').to.be.true;
646
647
 
647
- case 8:
648
+ case 9:
648
649
  case "end":
649
650
  return _context17.stop();
650
651
  }
651
652
  }
652
653
  }, _callee13);
654
+ })));
655
+ it('show nested dialog', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
656
+ var Test, Demo, _mount14, instance, element, _getElements, dialog1, dialog2;
657
+
658
+ return _regeneratorRuntime.wrap(function _callee14$(_context20) {
659
+ while (1) {
660
+ switch (_context20.prev = _context20.next) {
661
+ case 0:
662
+ Test = /*#__PURE__*/function (_Component5) {
663
+ _inheritsLoose(Test, _Component5);
664
+
665
+ function Test() {
666
+ var _context18;
667
+
668
+ var _this5;
669
+
670
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
671
+ args[_key5] = arguments[_key5];
672
+ }
673
+
674
+ _this5 = _Component5.call.apply(_Component5, _concatInstanceProperty(_context18 = [this]).call(_context18, args)) || this;
675
+ _this5.Dialog = Dialog;
676
+ return _this5;
677
+ }
678
+
679
+ return Test;
680
+ }(Component);
681
+
682
+ Test.template = "\n const { Dialog } = this;\n <Dialog v-model=\"value\">test</Dialog>\n ";
683
+
684
+ Demo = /*#__PURE__*/function (_Component6) {
685
+ _inheritsLoose(Demo, _Component6);
686
+
687
+ function Demo() {
688
+ var _context19;
689
+
690
+ var _this6;
691
+
692
+ for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
693
+ args[_key6] = arguments[_key6];
694
+ }
695
+
696
+ _this6 = _Component6.call.apply(_Component6, _concatInstanceProperty(_context19 = [this]).call(_context19, args)) || this;
697
+ _this6.Test = Test;
698
+ _this6.Dialog = Dialog;
699
+ return _this6;
700
+ }
701
+
702
+ var _proto2 = Demo.prototype;
703
+
704
+ _proto2.showTest = function showTest() {
705
+ this.set('testShow', true);
706
+ };
707
+
708
+ return Demo;
709
+ }(Component);
710
+
711
+ Demo.template = "\n const { Test, Dialog } = this;\n <Dialog v-model=\"show\">\n <div ev-click={this.showTest}>click</div>\n <Test v-model=\"testShow\" /> \n </Dialog>\n ";
712
+
713
+ __decorate([bind], Demo.prototype, "showTest", null);
714
+
715
+ _mount14 = mount(Demo), instance = _mount14[0], element = _mount14[1];
716
+ instance.set('show', true);
717
+ _context20.next = 9;
718
+ return wait();
719
+
720
+ case 9:
721
+ instance.showTest();
722
+ _context20.next = 12;
723
+ return wait();
724
+
725
+ case 12:
726
+ _getElements = getElements('.k-dialog'), dialog1 = _getElements[0], dialog2 = _getElements[1];
727
+ expect(dialog2.querySelector('.k-dialog-body').textContent).to.eql('test');
728
+
729
+ case 14:
730
+ case "end":
731
+ return _context20.stop();
732
+ }
733
+ }
734
+ }, _callee14);
653
735
  }))); // it('should handle v-if and v-model at the same time correctly in Vue', async () => {
654
736
  // const Test = {
655
737
  // template: `<Dialog v-model="show" v-if="show" ref="dialog">test</Dialog>`,
@@ -5,7 +5,7 @@ export interface DrawerProps extends BaseDialogProps {
5
5
  placement?: Placement;
6
6
  }
7
7
  export declare class Drawer extends BaseDialog<DrawerProps> {
8
- static template: string | import("intact").Template<any>;
8
+ static template: string | import('intact-react').Template<any>;
9
9
  static typeDefs: Required<TypeDefs<DrawerProps>>;
10
10
  static defaults: () => Partial<DrawerProps>;
11
11
  }