@king-design/react 3.1.0-beta.3 → 3.1.1-beta.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/__tests__/__snapshots__/Dialog.md +1 -1
- package/__tests__/__snapshots__/React Demos.md +216 -208
- package/components/affix/index.d.ts +1 -1
- package/components/badge/index.d.ts +1 -1
- package/components/breadcrumb/index.d.ts +1 -1
- package/components/breadcrumb/item.d.ts +1 -1
- package/components/button/group.d.ts +1 -1
- package/components/button/index.d.ts +1 -1
- package/components/card/column.d.ts +1 -1
- package/components/card/index.d.ts +1 -1
- package/components/carousel/index.d.ts +1 -1
- package/components/carousel/index.vdt.js +1 -1
- package/components/carousel/item.d.ts +1 -1
- package/components/carousel/item.vdt.js +1 -1
- package/components/carousel/useSlide.d.ts +1 -1
- package/components/cascader/index.d.ts +3 -3
- package/components/cascader/index.vdt.js +1 -0
- package/components/checkbox/index.d.ts +1 -1
- package/components/code/index.d.ts +1 -1
- package/components/collapse/index.d.ts +1 -1
- package/components/collapse/index.vdt.js +1 -1
- package/components/collapse/item.d.ts +1 -1
- package/components/collapse/item.vdt.js +1 -1
- package/components/colorpicker/drag.d.ts +1 -1
- package/components/colorpicker/index.d.ts +1 -1
- package/components/colorpicker/panel.d.ts +1 -1
- package/components/colorpicker/panel.vdt.js +1 -1
- package/components/config/index.d.ts +9 -2
- package/components/config/index.js +4 -3
- package/components/copy/index.d.ts +1 -1
- package/components/copy/index.vdt.js +1 -1
- package/components/datepicker/calendar.d.ts +1 -1
- package/components/datepicker/calendar.vdt.js +1 -1
- package/components/datepicker/index.d.ts +4 -4
- package/components/datepicker/index.vdt.js +1 -1
- package/components/datepicker/time.d.ts +1 -1
- package/components/datepicker/usePanel.d.ts +1 -1
- package/components/diagram/diagram.d.ts +1 -1
- package/components/diagram/layouts/layout.d.ts +1 -1
- package/components/diagram/shapes/line.d.ts +1 -1
- package/components/diagram/shapes/shape.d.ts +1 -1
- package/components/dialog/base.d.ts +2 -2
- package/components/dialog/base.vdt.js +1 -1
- package/components/dialog/index.spec.js +87 -5
- package/components/dialog/styles.js +2 -2
- package/components/drawer/index.d.ts +1 -1
- package/components/drawer/index.spec.js +6 -4
- package/components/dropdown/item.d.ts +1 -1
- package/components/dropdown/menu.d.ts +1 -1
- package/components/dropdown/menu.vdt.js +1 -1
- package/components/editable/index.d.ts +1 -1
- package/components/form/form.d.ts +1 -1
- package/components/form/item.d.ts +1 -1
- package/components/form/item.vdt.js +1 -1
- package/components/form/useError.d.ts +4 -4
- package/components/grid/col.d.ts +1 -1
- package/components/grid/row.d.ts +1 -1
- package/components/grid/useGutter.d.ts +3 -3
- package/components/icon/index.d.ts +1 -1
- package/components/input/index.d.ts +1 -1
- package/components/input/search.d.ts +1 -1
- package/components/input/styles.js +1 -1
- package/components/layout/aside.d.ts +1 -1
- package/components/layout/aside.vdt.js +1 -1
- package/components/layout/body.d.ts +1 -1
- package/components/layout/footer.d.ts +1 -1
- package/components/layout/header.d.ts +1 -1
- package/components/layout/layout.d.ts +1 -1
- package/components/menu/item.d.ts +1 -1
- package/components/menu/item.vdt.js +1 -1
- package/components/menu/menu.d.ts +1 -1
- package/components/menu/useDropdown.d.ts +1 -1
- package/components/message/message.d.ts +1 -1
- package/components/message/messages.d.ts +1 -1
- package/components/message/messages.vdt.js +1 -1
- package/components/pagination/index.d.ts +1 -1
- package/components/popover/content.d.ts +1 -1
- package/components/portal.d.ts +1 -1
- package/components/portal.js +7 -1
- package/components/progress/index.d.ts +1 -1
- package/components/radio/index.d.ts +1 -1
- package/components/rate/index.d.ts +1 -1
- package/components/rate/index.vdt.js +1 -1
- package/components/scrollSelect/index.d.ts +1 -1
- package/components/select/base.d.ts +1 -1
- package/components/select/base.vdt.js +1 -1
- package/components/select/group.d.ts +1 -1
- package/components/select/menu.d.ts +1 -1
- package/components/select/option.d.ts +1 -1
- package/components/select/option.vdt.js +1 -1
- package/components/select/select.d.ts +3 -3
- package/components/select/useCard.d.ts +1 -1
- package/components/select/useLabel.d.ts +1 -1
- package/components/select/useSearchable.d.ts +3 -3
- package/components/skeleton/item.d.ts +1 -1
- package/components/skeleton/skeleton.d.ts +1 -1
- package/components/slider/index.d.ts +1 -1
- package/components/slider/index.vdt.js +1 -1
- package/components/slider/useDraggable.d.ts +2 -2
- package/components/slider/useTooltip.d.ts +1 -1
- package/components/spin/index.d.ts +1 -1
- package/components/spin/index.vdt.js +1 -1
- package/components/spinner/index.d.ts +1 -1
- package/components/split/index.d.ts +1 -1
- package/components/split/memo.d.ts +1 -1
- package/components/split/useDraggable.d.ts +2 -2
- package/components/steps/context.d.ts +1 -1
- package/components/steps/index.d.ts +1 -1
- package/components/steps/step.d.ts +1 -1
- package/components/steps/step.vdt.js +1 -1
- package/components/switch/index.d.ts +1 -1
- package/components/table/cell.d.ts +1 -1
- package/components/table/column.d.ts +2 -2
- package/components/table/column.vdt.js +1 -1
- package/components/table/exportTable.d.ts +1 -0
- package/components/table/exportTable.js +33 -8
- package/components/table/index.spec.js +8 -3
- package/components/table/row.d.ts +1 -1
- package/components/table/row.vdt.js +2 -2
- package/components/table/styles.js +3 -2
- package/components/table/table.d.ts +2 -2
- package/components/table/table.vdt.js +1 -1
- package/components/table/useColumns.d.ts +5 -5
- package/components/table/useFixedColumns.d.ts +2 -2
- package/components/table/useGroup.d.ts +4 -4
- package/components/table/useResizable.d.ts +2 -2
- package/components/table/useSortable.d.ts +3 -3
- package/components/tabs/index.d.ts +1 -1
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/useScroll.d.ts +1 -1
- package/components/tag/base.d.ts +1 -1
- package/components/tag/index.vdt.js +1 -1
- package/components/tag/tags.d.ts +1 -1
- package/components/tag/tags.vdt.js +1 -1
- package/components/tag/useChildren.d.ts +1 -1
- package/components/tag/useDraggable.d.ts +1 -1
- package/components/tag/useNowrap.d.ts +3 -3
- package/components/timeline/item.d.ts +1 -1
- package/components/timeline/timeline.d.ts +1 -1
- package/components/timepicker/index.d.ts +2 -2
- package/components/timepicker/panelPicker.d.ts +4 -4
- package/components/timepicker/selectPicker.d.ts +1 -1
- package/components/transfer/index.d.ts +1 -1
- package/components/transfer/index.vdt.js +1 -1
- package/components/tree/index.d.ts +1 -1
- package/components/tree/index.vdt.js +1 -1
- package/components/tree/useExpanded.js +21 -6
- package/components/treeSelect/index.d.ts +1 -1
- package/components/treeSelect/useValue.d.ts +1 -1
- package/components/upload/index.d.ts +7 -6
- package/components/upload/index.js +1 -0
- package/components/upload/index.vdt.js +1 -1
- package/components/upload/useFiles.js +21 -8
- package/components/utils.d.ts +1 -1
- package/components/virtual.d.ts +1 -1
- package/components/wave/index.d.ts +1 -1
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +1 -1
|
@@ -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(
|
|
8
|
+
static template: string | import('intact-react').Template<any>;
|
|
9
9
|
static typeDefs: Required<TypeDefs<DrawerProps>>;
|
|
10
10
|
static defaults: () => Partial<DrawerProps>;
|
|
11
11
|
}
|
|
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
|
5
5
|
import BasicDemo from '~/components/drawer/demos/basic';
|
|
6
6
|
import PlacementDemo from '~/components/drawer/demos/placement';
|
|
7
7
|
import overlayDemo from '~/components/drawer/demos/overlay';
|
|
8
|
-
import { mount, unmount, dispatchEvent, getElement, wait } from '../../test/utils';
|
|
8
|
+
import { mount, unmount, dispatchEvent, getElement, wait, getElements } from '../../test/utils';
|
|
9
9
|
import { Component } from 'intact-react';
|
|
10
10
|
import { Drawer } from '.';
|
|
11
11
|
import { Dialog } from '../dialog';
|
|
@@ -165,7 +165,7 @@ describe('Drawer', function () {
|
|
|
165
165
|
}, _callee4);
|
|
166
166
|
})));
|
|
167
167
|
it('nested dialog', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
|
168
|
-
var Demo, _mount4, instance, element;
|
|
168
|
+
var Demo, _mount4, instance, element, _getElements, dialog1, dialog2;
|
|
169
169
|
|
|
170
170
|
return _regeneratorRuntime.wrap(function _callee5$(_context6) {
|
|
171
171
|
while (1) {
|
|
@@ -198,9 +198,11 @@ describe('Drawer', function () {
|
|
|
198
198
|
return wait();
|
|
199
199
|
|
|
200
200
|
case 5:
|
|
201
|
-
expect(instance.refs.dialog.dialogRef.value.parentElement.parentElement).to.eql(document.body);
|
|
201
|
+
// expect(instance.refs.dialog.dialogRef.value.parentElement.parentElement).to.eql(document.body);
|
|
202
|
+
_getElements = getElements('.k-dialog'), dialog1 = _getElements[0], dialog2 = _getElements[1];
|
|
203
|
+
expect(dialog2.querySelector('.k-dialog-body').textContent).to.eql('Dialog');
|
|
202
204
|
|
|
203
|
-
case
|
|
205
|
+
case 7:
|
|
204
206
|
case "end":
|
|
205
207
|
return _context6.stop();
|
|
206
208
|
}
|
|
@@ -12,7 +12,7 @@ export interface DropdownItemEvents {
|
|
|
12
12
|
mouseleave: [MouseEvent];
|
|
13
13
|
}
|
|
14
14
|
export declare class DropdownItem extends Component<DropdownItemProps, DropdownItemEvents> {
|
|
15
|
-
static template: string | import(
|
|
15
|
+
static template: string | import('intact-react').Template<any>;
|
|
16
16
|
static typeDefs: Required<TypeDefs<DropdownItemProps>>;
|
|
17
17
|
static defaults: () => Partial<DropdownItemProps>;
|
|
18
18
|
parentDropdown?: Dropdown;
|
|
@@ -8,7 +8,7 @@ export interface DropdownMenuBlocks {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const DROPDOWN_MENU = "DropdownMenu";
|
|
10
10
|
export declare class DropdownMenu<T extends DropdownMenuProps = DropdownMenuProps, E extends DropdownMenuEvents = DropdownMenuEvents, B extends DropdownMenuBlocks = DropdownMenuBlocks> extends Component<T, E, B> {
|
|
11
|
-
static template: string | import(
|
|
11
|
+
static template: string | import('intact-react').Template<any>;
|
|
12
12
|
elementRef: RefObject<HTMLDivElement>;
|
|
13
13
|
dropdown: Dropdown;
|
|
14
14
|
keyboard: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import { createUnknownComponentVNode as _$cc, createElementVNode as _$ce, noop as _$no, className as _$cn } from 'intact-react';
|
|
3
|
-
import { Transition } from 'intact';
|
|
3
|
+
import { Transition } from 'intact-react';
|
|
4
4
|
import { makeMenuStyles } from './styles';
|
|
5
5
|
export default function ($props, $blocks, $__proto__) {
|
|
6
6
|
var _classNameObj;
|
|
@@ -16,7 +16,7 @@ export interface EditableEvents<V extends Value = Value> {
|
|
|
16
16
|
change: [string, V | undefined];
|
|
17
17
|
}
|
|
18
18
|
export declare class Editable<V extends Value = Value> extends Component<EditableProps<V>, EditableEvents<V>> {
|
|
19
|
-
static template: string | import(
|
|
19
|
+
static template: string | import('intact-react').Template<any>;
|
|
20
20
|
static typeDefs: Required<TypeDefs<EditableProps<Value>>>;
|
|
21
21
|
static defaults: () => Partial<EditableProps<Value>>;
|
|
22
22
|
static events: Events<EditableEvents<Value>>;
|
|
@@ -23,7 +23,7 @@ export interface FormEvents {
|
|
|
23
23
|
export declare const FORM = "Form";
|
|
24
24
|
export declare const RECORD_KEY = "FormRecord";
|
|
25
25
|
export declare class Form extends Component<FormProps, FormEvents> {
|
|
26
|
-
static template: string | import(
|
|
26
|
+
static template: string | import('intact-react').Template<any>;
|
|
27
27
|
static typeDefs: Required<TypeDefs<Omit<FormProps, keyof FormHTMLAttributes>>>;
|
|
28
28
|
static defaults: () => Partial<FormProps>;
|
|
29
29
|
static addMethod: (name: string, method: import("./methods").Method, message?: import("./methods").Message | undefined, className?: import("./methods").ClassName | undefined) => void;
|
|
@@ -22,7 +22,7 @@ export interface FormItemBlocks {
|
|
|
22
22
|
}
|
|
23
23
|
export declare type Rules = Record<string, any>;
|
|
24
24
|
export declare class FormItem extends Component<FormItemProps, FormItemEvents, FormItemBlocks> {
|
|
25
|
-
static template: string | import(
|
|
25
|
+
static template: string | import('intact-react').Template<any>;
|
|
26
26
|
static typeDefs: Required<TypeDefs<FormItemProps>>;
|
|
27
27
|
private form;
|
|
28
28
|
private error;
|
|
@@ -3,7 +3,7 @@ import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce, noo
|
|
|
3
3
|
import { getRestProps } from '../utils';
|
|
4
4
|
import { Tooltip } from '../tooltip';
|
|
5
5
|
import { Icon } from '../icon';
|
|
6
|
-
import { Transition } from 'intact';
|
|
6
|
+
import { Transition } from 'intact-react';
|
|
7
7
|
import { makeItemStyles } from './styles';
|
|
8
8
|
import { context as ErrorContext } from './useError';
|
|
9
9
|
export default function ($props, $blocks, $__proto__) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const context: {
|
|
2
|
-
Provider: import('intact-react').ComponentConstructor<import(
|
|
3
|
-
Consumer: import(
|
|
4
|
-
useContext: () => import(
|
|
2
|
+
Provider: import('intact-react').ComponentConstructor<import('intact-react').Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
3
|
+
Consumer: import('intact-react').ComponentConstructor<import('intact-react').Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
4
|
+
useContext: () => import('intact-react').RefObject<any>;
|
|
5
5
|
};
|
|
6
6
|
export declare function useError(): {
|
|
7
7
|
ellipsis: import("../../hooks/useState").State<boolean>;
|
|
8
8
|
message: import("../../hooks/useState").State<string | undefined>;
|
|
9
|
-
errorRef: import(
|
|
9
|
+
errorRef: import('intact-react').RefObject<HTMLDivElement>;
|
|
10
10
|
getErrorMessage: (key: string) => string;
|
|
11
11
|
getErrorClassName: (key: string) => string;
|
|
12
12
|
reset: () => void;
|
package/components/grid/col.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare type BreakpointProps = BreakpointValues<keyof BaseColProps>;
|
|
|
11
11
|
export declare type ColProps = BaseColProps & BreakpointProps;
|
|
12
12
|
export declare const baseTypeDefs: Required<TypeDefs<BaseColProps>>;
|
|
13
13
|
export declare class Col extends Component<ColProps> {
|
|
14
|
-
static template: string | import(
|
|
14
|
+
static template: string | import('intact-react').Template<any>;
|
|
15
15
|
static typeDefs: Required<TypeDefs<ColProps>>;
|
|
16
16
|
private breakpoints;
|
|
17
17
|
private config;
|
package/components/grid/row.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface RowProps {
|
|
|
6
6
|
align?: 'top' | 'bottom' | 'middle' | 'stretch' | 'baseline';
|
|
7
7
|
}
|
|
8
8
|
export declare class Row extends Component<RowProps> {
|
|
9
|
-
static template: string | import(
|
|
9
|
+
static template: string | import('intact-react').Template<any>;
|
|
10
10
|
static typeDefs: Required<TypeDefs<RowProps>>;
|
|
11
11
|
private gutter;
|
|
12
12
|
private config;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const context: {
|
|
2
|
-
Provider: import('intact-react').ComponentConstructor<import(
|
|
3
|
-
Consumer: import(
|
|
4
|
-
useContext: () => import(
|
|
2
|
+
Provider: import('intact-react').ComponentConstructor<import('intact-react').Component<import("../context").ProviderProps<number>, {}, {}, {}>>;
|
|
3
|
+
Consumer: import('intact-react').ComponentConstructor<import('intact-react').Component<import("../context").ConsumerProps<number>, {}, {}, {}>>;
|
|
4
|
+
useContext: () => import('intact-react').RefObject<number | undefined>;
|
|
5
5
|
};
|
|
6
6
|
export declare function useGutter(): {
|
|
7
7
|
getGutter: () => import("./constants").PrimitiveValue | null | undefined;
|
|
@@ -9,7 +9,7 @@ export interface IconProps {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class Icon extends Component<IconProps> {
|
|
11
11
|
static displayName: string;
|
|
12
|
-
static template: string | import(
|
|
12
|
+
static template: string | import('intact-react').Template<any>;
|
|
13
13
|
static typeDefs: Required<TypeDefs<IconProps>>;
|
|
14
14
|
static defaults: () => Partial<IconProps>;
|
|
15
15
|
private colors;
|
|
@@ -50,7 +50,7 @@ export interface InputBlocks {
|
|
|
50
50
|
append: null;
|
|
51
51
|
}
|
|
52
52
|
export declare class Input<V extends Value = Value> extends Component<InputProps<V>, InputEvents, InputBlocks> {
|
|
53
|
-
static template: string | import(
|
|
53
|
+
static template: string | import('intact-react').Template<any>;
|
|
54
54
|
static typeDefs: Required<TypeDefs<Omit<InputProps<Value>, keyof InputHTMLAttributes>>>;
|
|
55
55
|
static defaults: () => Partial<InputProps<Value>>;
|
|
56
56
|
static events: Events<InputEvents>;
|
|
@@ -11,7 +11,7 @@ export interface SearchEvents {
|
|
|
11
11
|
submit: [string];
|
|
12
12
|
}
|
|
13
13
|
export declare class Search extends Component<SearchProps, SearchEvents> {
|
|
14
|
-
static template: string | import(
|
|
14
|
+
static template: string | import('intact-react').Template<any>;
|
|
15
15
|
static typeDefs: Required<TypeDefs<SearchProps>>;
|
|
16
16
|
static defaults: () => Partial<SearchProps>;
|
|
17
17
|
private elementRef;
|
|
@@ -132,7 +132,7 @@ setDefault(function () {
|
|
|
132
132
|
export function makeStyles(k) {
|
|
133
133
|
var _context;
|
|
134
134
|
|
|
135
|
-
return /*#__PURE__*/css("display:inline-block;width:", input.width, ";color:", input.color, ";vertical-align:middle;.", k, "-input-wrapper{display:inline-flex;align-items:center;width:100%;position:relative;border:", input.border, ";background-color:", input.bgColor, ";transition:border ", input.transition, ",background ", input.transition, ",box-shadow ", input.transition, ";border-radius:", input.borderRadius, ";&:hover{border:", input.hoverBorder, ";z-index:1;}}&.", k, "-focus .", k, "-input-wrapper{border:", input.focusBorder, ";z-index:1;}.", k, "-input-inner{flex:1;outline:none;color:inherit;font-size:inherit;border:none;background:transparent;padding:0;width:0;&::placeholder{color:", input.placeholderColor, ";}}&.", k, "-fluid{width:100%;}.", k, "-input-prefix,.", k, "-input-suffix{display:flex;align-items:center;gap:", input.clearIconGap, ";color:", theme.color.lightBlack, ";position:relative;}.", k, "-input-prefix{margin-right:", input.clearIconGap, ";}.", k, "-input-suffix{margin-left:", input.clearIconGap, ";}.", k, "-input-clear{opacity:0;transition:opacity ", input.transition, ";pointer-events:none;color:", input.clearIconColor, ";}&:hover .", k, "-input-clear.", k, "-input-show{opacity:1;pointer-events:all;}.", k, "-input-show-password{color:", input.clearIconColor, ";}&.", k, "-stack-clear{.", k, "-input-clear{position:absolute;z-index:1;right:0;&.", k, "-input-show+*{transition:opacity ", input.transition, ";}}&:hover{.", k, "-input-clear.", k, "-input-show+*{opacity:0;}}}&.", k, "-group{display:inline-flex;.", k, "-input-wrapper{border-radius:0;}.", k, "-input-wrapper:first-child{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}.", k, "-input-wrapper:last-child{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.", k, "-input-prepend,.", k, "-input-append{display:inline-flex;align-items:center;background-color:", input.groupBgColor, ";border:", input.border, ";white-space:nowrap;.", k, "-btn{margin:-1px
|
|
135
|
+
return /*#__PURE__*/css("display:inline-block;width:", input.width, ";color:", input.color, ";vertical-align:middle;.", k, "-input-wrapper{display:inline-flex;align-items:center;width:100%;position:relative;border:", input.border, ";background-color:", input.bgColor, ";transition:border ", input.transition, ",background ", input.transition, ",box-shadow ", input.transition, ";border-radius:", input.borderRadius, ";&:hover{border:", input.hoverBorder, ";z-index:1;}}&.", k, "-focus .", k, "-input-wrapper{border:", input.focusBorder, ";z-index:1;}.", k, "-input-inner{flex:1;outline:none;color:inherit;font-size:inherit;border:none;background:transparent;padding:0;width:0;&::placeholder{color:", input.placeholderColor, ";}}&.", k, "-fluid{width:100%;}.", k, "-input-prefix,.", k, "-input-suffix{display:flex;align-items:center;gap:", input.clearIconGap, ";color:", theme.color.lightBlack, ";position:relative;}.", k, "-input-prefix{margin-right:", input.clearIconGap, ";}.", k, "-input-suffix{margin-left:", input.clearIconGap, ";}.", k, "-input-clear{opacity:0;transition:opacity ", input.transition, ";pointer-events:none;color:", input.clearIconColor, ";}&:hover .", k, "-input-clear.", k, "-input-show{opacity:1;pointer-events:all;}.", k, "-input-show-password{color:", input.clearIconColor, ";}&.", k, "-stack-clear{.", k, "-input-clear{position:absolute;z-index:1;right:0;&.", k, "-input-show+*{transition:opacity ", input.transition, ";}}&:hover{.", k, "-input-clear.", k, "-input-show+*{opacity:0;}}}&.", k, "-group{display:inline-flex;.", k, "-input-wrapper{border-radius:0;flex:1;}.", k, "-input-wrapper:first-child{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}.", k, "-input-wrapper:last-child{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.", k, "-input-prepend,.", k, "-input-append{display:inline-flex;align-items:center;background-color:", input.groupBgColor, ";border:", input.border, ";white-space:nowrap;.", k, "-btn{margin:-1px;&.", k, "-none:hover{background:transparent;}}.", k, "-select{margin:-1px;text-align:left;}}.", k, "-input-prepend{&,.", k, "-btn,.", k, "-select{z-index:1;border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}}.", k, "-input-append{&,.", k, "-btn,.", k, "-select{z-index:1;border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.", k, "-input-padding{padding:0 ", input.groupPaddingGap, ";}.", k, "-input-prepend{border-right:none;}.", k, "-input-append{border-left:none;}&.", k, "-flat{color:", _flatInstanceProperty(input).color, ";.", k, "-input-wrapper{border:none;background:", _flatInstanceProperty(input).bgColor, ";}}&.", k, "-disabled{color:", input.disabledColor, ";cursor:not-allowed;.", k, "-input-wrapper{border-color:", input.disabledBorderColor, ";background:", input.disabledBgColor, ";}.", k, "-input-inner{cursor:not-allowed;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
136
136
|
var styles = input[size];
|
|
137
137
|
var sizeClassName = /*#__PURE__*/css("font-size:", styles.fontSize, ";.", k, "-input-wrapper{height:", styles.height, ";padding:0 ", styles.paddingGap, ";}");
|
|
138
138
|
if (size === 'default') return sizeClassName;
|
|
@@ -8,7 +8,7 @@ export interface AsideProps {
|
|
|
8
8
|
collapsedWidth?: number | string;
|
|
9
9
|
}
|
|
10
10
|
export declare class Aside extends Component<AsideProps> {
|
|
11
|
-
static template: string | import(
|
|
11
|
+
static template: string | import('intact-react').Template<any>;
|
|
12
12
|
static typeDefs: Required<TypeDefs<AsideProps>>;
|
|
13
13
|
static defaults: () => Partial<AsideProps>;
|
|
14
14
|
private rootLayout;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import { createElementVNode as _$ce, className as _$cn, createVNode as _$cv } from 'intact-react';
|
|
3
|
-
import { directClone } from 'intact';
|
|
3
|
+
import { directClone } from 'intact-react';
|
|
4
4
|
import { mapChildren, getRestProps } from '../utils';
|
|
5
5
|
import { Menu } from '../menu';
|
|
6
6
|
import { makeAsideStyles } from './styles';
|
|
@@ -9,7 +9,7 @@ export interface HeaderProps {
|
|
|
9
9
|
boxShadow?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare class Header extends Component<HeaderProps> {
|
|
12
|
-
static template: string | import(
|
|
12
|
+
static template: string | import('intact-react').Template<any>;
|
|
13
13
|
static typeDefs: Required<TypeDefs<HeaderProps>>;
|
|
14
14
|
static defaults: () => Partial<HeaderProps>;
|
|
15
15
|
private rootLayout;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component } from 'intact-react';
|
|
2
2
|
export declare class Layout extends Component {
|
|
3
|
-
static template: string | import(
|
|
3
|
+
static template: string | import('intact-react').Template<any>;
|
|
4
4
|
parse: () => {
|
|
5
5
|
hasAside: boolean;
|
|
6
6
|
hasFixedHeader: boolean;
|
|
@@ -13,7 +13,7 @@ export interface MenuItemEvents {
|
|
|
13
13
|
}
|
|
14
14
|
export declare const MENU_ITEM = "MenuItem";
|
|
15
15
|
export declare class MenuItem extends Component<MenuItemProps, MenuItemEvents> {
|
|
16
|
-
static template: string | import(
|
|
16
|
+
static template: string | import('intact-react').Template<any>;
|
|
17
17
|
static typeDefs: Required<TypeDefs<MenuItemProps>>;
|
|
18
18
|
static events: Events<MenuItemEvents>;
|
|
19
19
|
rootMenu: Menu<Key>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import { createElementVNode as _$ce, createUnknownComponentVNode as _$cc, className as _$cn, createVNode as _$cv, extend as _$ex, EMPTY_OBJ as _$em } from 'intact-react';
|
|
3
|
-
import { directClone, Transition } from 'intact';
|
|
3
|
+
import { directClone, Transition } from 'intact-react';
|
|
4
4
|
import { Dropdown, DropdownItem } from '../dropdown';
|
|
5
5
|
import { Tooltip } from '../tooltip';
|
|
6
6
|
import { Icon } from '../icon';
|
|
@@ -19,7 +19,7 @@ export interface MenuBlocks {
|
|
|
19
19
|
export declare const MENU = "Menu";
|
|
20
20
|
export declare const ROOT_MENU = "RootMenu";
|
|
21
21
|
export declare class Menu<K extends Key = Key> extends Component<MenuProps<K>, MenuEvents, MenuBlocks> {
|
|
22
|
-
static template: string | import(
|
|
22
|
+
static template: string | import('intact-react').Template<any>;
|
|
23
23
|
static typeDefs: Required<TypeDefs<MenuProps<Key>>>;
|
|
24
24
|
static defaults: () => Partial<MenuProps<Key>>;
|
|
25
25
|
rootMenu: Menu<Key> | null;
|
|
@@ -5,7 +5,7 @@ import { ValidVNode } from '../utils';
|
|
|
5
5
|
import { Options } from '../position';
|
|
6
6
|
export declare function useDropdown(rootMenu: Menu, parentMenu: Menu): () => {
|
|
7
7
|
isTopItem: boolean;
|
|
8
|
-
subMenuVNode: VNodeComponentClass<Menu<import(
|
|
8
|
+
subMenuVNode: VNodeComponentClass<Menu<import('intact-react').Key>> | null;
|
|
9
9
|
isDropdownMenu: boolean;
|
|
10
10
|
tooltipContents: ValidVNode[];
|
|
11
11
|
iconVNode: VNodeComponentClass<Icon> | null;
|
|
@@ -7,7 +7,7 @@ export interface MessageProps {
|
|
|
7
7
|
hideIcon?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export declare class Message extends Component<MessageProps> {
|
|
10
|
-
static template: string | import(
|
|
10
|
+
static template: string | import('intact-react').Template<any>;
|
|
11
11
|
static typeDefs: Required<TypeDefs<MessageProps>>;
|
|
12
12
|
static defaults: () => Partial<MessageProps>;
|
|
13
13
|
static notice(content: Children | Partial<MessageProps>, duration?: number, type?: MessageProps['type']): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component, VNodeComponentClass } from 'intact-react';
|
|
2
2
|
import type { Message } from './message';
|
|
3
3
|
export declare class Messages extends Component {
|
|
4
|
-
static template: string | import(
|
|
4
|
+
static template: string | import('intact-react').Template<any>;
|
|
5
5
|
private messages;
|
|
6
6
|
private config;
|
|
7
7
|
notice(message: VNodeComponentClass<Message>): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElementVNode as _$ce, createUnknownComponentVNode as _$cc, map as _$ma, className as _$cn } from 'intact-react';
|
|
2
|
-
import { TransitionGroup, Transition } from 'intact';
|
|
2
|
+
import { TransitionGroup, Transition } from 'intact-react';
|
|
3
3
|
import { makeMessagesStyles } from './styles';
|
|
4
4
|
export default function ($props, $blocks, $__proto__) {
|
|
5
5
|
var _$cn2;
|
|
@@ -24,7 +24,7 @@ export declare type PaginationChangeData = {
|
|
|
24
24
|
value: number;
|
|
25
25
|
};
|
|
26
26
|
export declare class Pagination extends Component<PaginationProps, PaginationEvents> {
|
|
27
|
-
static template: string | import(
|
|
27
|
+
static template: string | import('intact-react').Template<any>;
|
|
28
28
|
static typeDefs: Required<TypeDefs<PaginationProps>>;
|
|
29
29
|
static defaults: () => Partial<PaginationProps>;
|
|
30
30
|
static events: Events<PaginationEvents>;
|
|
@@ -13,7 +13,7 @@ export interface PopoverContentBlocks extends TooltipContentBlocks {
|
|
|
13
13
|
footer: null;
|
|
14
14
|
}
|
|
15
15
|
export declare class PopoverContent extends TooltipContent<PopoverContentProps, PopoverContentEvents, PopoverContentBlocks> {
|
|
16
|
-
static template: string | import(
|
|
16
|
+
static template: string | import('intact-react').Template<any>;
|
|
17
17
|
static typeDefs: Required<TypeDefs<PopoverContentProps>>;
|
|
18
18
|
protected isEmptyChildren: boolean;
|
|
19
19
|
}
|
package/components/portal.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface PortalProps {
|
|
|
4
4
|
}
|
|
5
5
|
export declare type Container = string | ((parentDom: Element, anchor: IntactDom | null) => Element);
|
|
6
6
|
export declare class Portal<T extends PortalProps = PortalProps> extends Component<T> {
|
|
7
|
-
static template(this: Portal): import(
|
|
7
|
+
static template(this: Portal): import('intact-react').VNodeTextElement;
|
|
8
8
|
static typeDefs: Required<TypeDefs<PortalProps>>;
|
|
9
9
|
private container;
|
|
10
10
|
private dialog;
|
package/components/portal.js
CHANGED
|
@@ -114,7 +114,13 @@ export var Portal = /*#__PURE__*/function (_Component) {
|
|
|
114
114
|
if (!this.container) {
|
|
115
115
|
if (this.$senior instanceof BaseDialog) {
|
|
116
116
|
// Dialog and Drawer must be inserted into document.body
|
|
117
|
-
this.container = document.body;
|
|
117
|
+
// this.container = document.body;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @Modify https://github.com/ksc-fe/kpc/issues/915
|
|
121
|
+
* shoud insert to parent .k-dialog-wrapper to show nested dialog in Vue
|
|
122
|
+
*/
|
|
123
|
+
this.container = parentDom.closest("." + this.config.k + "-dialog-wrapper") || document.body;
|
|
118
124
|
} else {
|
|
119
125
|
// find the closest dialog if exists
|
|
120
126
|
this.container = parentDom.closest("." + this.config.k + "-dialog") || document.body;
|
|
@@ -18,7 +18,7 @@ export interface ProgressProps {
|
|
|
18
18
|
color?: string | Color[] | ((percent: number) => string);
|
|
19
19
|
}
|
|
20
20
|
export declare class Progress extends Component<ProgressProps> {
|
|
21
|
-
static template: string | import(
|
|
21
|
+
static template: string | import('intact-react').Template<any>;
|
|
22
22
|
static typeDefs: Required<TypeDefs<ProgressProps>>;
|
|
23
23
|
static defaults: () => Partial<ProgressProps>;
|
|
24
24
|
status: import("../../hooks/useState").State<Status>;
|
|
@@ -10,7 +10,7 @@ export interface RadioEvents<True = true> {
|
|
|
10
10
|
change: [True, MouseEvent];
|
|
11
11
|
}
|
|
12
12
|
export declare class Radio<Value = false, True = true> extends Component<RadioProps<Value, True>, RadioEvents<True>> {
|
|
13
|
-
static template: string | import(
|
|
13
|
+
static template: string | import('intact-react').Template<any>;
|
|
14
14
|
static typeDefs: Required<TypeDefs<Omit<RadioProps<false, true>, keyof CommonInputHTMLAttributes>>>;
|
|
15
15
|
static defaults: () => Partial<RadioProps<false, true>>;
|
|
16
16
|
static events: Events<RadioEvents<true>>;
|
|
@@ -14,7 +14,7 @@ export interface RateBlocks {
|
|
|
14
14
|
icon: null;
|
|
15
15
|
}
|
|
16
16
|
export declare class Rate extends Component<RateProps, RateEvents, RateBlocks> {
|
|
17
|
-
static template: string | import(
|
|
17
|
+
static template: string | import('intact-react').Template<any>;
|
|
18
18
|
static typeDefs: Required<TypeDefs<RateProps>>;
|
|
19
19
|
static defaults: () => Partial<RateProps>;
|
|
20
20
|
static events: Events<RateEvents>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import { createUnknownComponentVNode as _$cc, noop as _$no, createElementVNode as _$ce, className as _$cn, createTextVNode as _$ct, createVNode as _$cv } from 'intact-react';
|
|
3
|
-
import { linkEvent } from 'intact';
|
|
3
|
+
import { linkEvent } from 'intact-react';
|
|
4
4
|
import { getRestProps } from '../utils';
|
|
5
5
|
import { makeStyles } from './styles';
|
|
6
6
|
import { Icon } from '../icon';
|
|
@@ -17,7 +17,7 @@ export declare type DataItem<T = any> = {
|
|
|
17
17
|
};
|
|
18
18
|
declare type Data<T> = DataItem<T>[] | ((v: T) => DataItem<T>[]);
|
|
19
19
|
export declare class ScrollSelect<T = any> extends Component<ScrollSelectProps<T>, ScrollSelectEvents, ScrollSelectBlocks> {
|
|
20
|
-
static template: string | import(
|
|
20
|
+
static template: string | import('intact-react').Template<any>;
|
|
21
21
|
static typeDefs: Required<TypeDefs<ScrollSelectProps<any>>>;
|
|
22
22
|
static defaults: () => Partial<ScrollSelectProps<any>>;
|
|
23
23
|
private list;
|
|
@@ -39,7 +39,7 @@ export interface BaseSelectBlocks<V> {
|
|
|
39
39
|
}
|
|
40
40
|
export declare abstract class BaseSelect<T extends BaseSelectProps<any> = BaseSelectProps<any>, E extends BaseSelectEvents = BaseSelectEvents, B extends BaseSelectBlocks<any> = BaseSelectBlocks<any>> extends Component<T, E, B> {
|
|
41
41
|
static $doubleVNodes: boolean;
|
|
42
|
-
static template: string | import(
|
|
42
|
+
static template: string | import('intact-react').Template<any>;
|
|
43
43
|
static typeDefs: Required<TypeDefs<BaseSelectProps<any, boolean, any>>>;
|
|
44
44
|
static defaults: () => Partial<BaseSelectProps<any, boolean, any>>;
|
|
45
45
|
static events: Events<BaseSelectEvents>;
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
2
2
|
import _flatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/flat";
|
|
3
3
|
import _valuesInstanceProperty from "@babel/runtime-corejs3/core-js/instance/values";
|
|
4
4
|
import { createUnknownComponentVNode as _$cc, className as _$cn, createVNode as _$cv, createElementVNode as _$ce, noop as _$no, map as _$ma, extend as _$ex, EMPTY_OBJ as _$em } from 'intact-react';
|
|
5
|
-
import { TransitionGroup, Transition } from 'intact';
|
|
5
|
+
import { TransitionGroup, Transition } from 'intact-react';
|
|
6
6
|
import { Input } from '../input';
|
|
7
7
|
import { Icon } from '../icon';
|
|
8
8
|
import { isNullOrUndefined, isStringOrNumber } from 'intact-shared';
|
|
@@ -8,7 +8,7 @@ export interface OptionGroupBlocks {
|
|
|
8
8
|
label: null;
|
|
9
9
|
}
|
|
10
10
|
export declare class OptionGroup extends Component<OptionGroupProps, OptionGroupEvents, OptionGroupBlocks> {
|
|
11
|
-
static template: string | import(
|
|
11
|
+
static template: string | import('intact-react').Template<any>;
|
|
12
12
|
static typeDefs: Required<TypeDefs<OptionGroupProps>>;
|
|
13
13
|
private select;
|
|
14
14
|
private config;
|
|
@@ -3,7 +3,7 @@ import type { Select } from './select';
|
|
|
3
3
|
export declare class SelectMenu extends Component<{
|
|
4
4
|
values: any[];
|
|
5
5
|
}> {
|
|
6
|
-
static template: string | import(
|
|
6
|
+
static template: string | import('intact-react').Template<any>;
|
|
7
7
|
select: Select<any, boolean>;
|
|
8
8
|
private card;
|
|
9
9
|
private searchable;
|
|
@@ -5,7 +5,7 @@ export interface OptionProps {
|
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare class Option extends Component<OptionProps> {
|
|
8
|
-
static template: string | import(
|
|
8
|
+
static template: string | import('intact-react').Template<any>;
|
|
9
9
|
static typeDefs: Required<TypeDefs<OptionProps>>;
|
|
10
10
|
private select;
|
|
11
11
|
private config;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createUnknownComponentVNode as _$cc, className as _$cn } from 'intact-react';
|
|
2
|
-
import { Transition } from 'intact';
|
|
2
|
+
import { Transition } from 'intact-react';
|
|
3
3
|
import { DropdownItem } from '../dropdown';
|
|
4
4
|
import { isNullOrUndefined } from 'intact-shared';
|
|
5
5
|
import { isEmptyChildren } from '../utils';
|
|
@@ -15,16 +15,16 @@ export interface SelectBlocks<T> extends BaseSelectBlocks<T> {
|
|
|
15
15
|
menu: null;
|
|
16
16
|
}
|
|
17
17
|
export declare class Select<T = string, Multipe extends boolean = false> extends BaseSelect<SelectProps<T, Multipe>, SelectEvents, SelectBlocks<T>> {
|
|
18
|
-
static template: string | import(
|
|
18
|
+
static template: string | import('intact-react').Template<any>;
|
|
19
19
|
static typeDefs: Required<TypeDefs<SelectProps<string, boolean>>>;
|
|
20
20
|
static defaults: () => Partial<SelectProps<string, boolean>>;
|
|
21
21
|
filterable: {
|
|
22
|
-
getCreatedVNode: (children: (string | number | import(
|
|
22
|
+
getCreatedVNode: (children: (string | number | import('intact-react').VNode<import('intact-react').VNodeTag>)[]) => import('intact-react').VNode<typeof Option> | undefined;
|
|
23
23
|
filter: (children: Children) => Children;
|
|
24
24
|
};
|
|
25
25
|
label: {
|
|
26
26
|
getLabel: () => Children;
|
|
27
|
-
activeIndices: import(
|
|
27
|
+
activeIndices: import('intact-react').NonNullableRefObject<number[]>;
|
|
28
28
|
};
|
|
29
29
|
init(): void;
|
|
30
30
|
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | Children[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Children, NonNullableRefObject } from 'intact-react';
|
|
2
2
|
export declare function useCard(defaultActiveIndex: NonNullableRefObject<number[]>): {
|
|
3
3
|
process: (children: Children) => {
|
|
4
|
-
labels: Children[] | import(
|
|
4
|
+
labels: Children[] | import('intact-react').Block<any>[];
|
|
5
5
|
group: Children[];
|
|
6
6
|
};
|
|
7
7
|
activeIndex: import("../../hooks/useState").State<number>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const context: {
|
|
2
|
-
Provider: import('intact-react').ComponentConstructor<import(
|
|
3
|
-
Consumer: import(
|
|
4
|
-
useContext: () => import(
|
|
2
|
+
Provider: import('intact-react').ComponentConstructor<import('intact-react').Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
3
|
+
Consumer: import('intact-react').ComponentConstructor<import('intact-react').Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
4
|
+
useContext: () => import('intact-react').RefObject<any>;
|
|
5
5
|
};
|
|
6
6
|
export declare function useSearchable(): {
|
|
7
7
|
checkedKeys: import("../../hooks/useState").State<any[]>;
|
|
@@ -9,7 +9,7 @@ export interface SkeletonItemEvents {
|
|
|
9
9
|
export interface SkeletonItemBlocks {
|
|
10
10
|
}
|
|
11
11
|
export declare class SkeletonItem extends Component<SkeletonItemProps, SkeletonItemEvents, SkeletonItemBlocks> {
|
|
12
|
-
static template: string | import(
|
|
12
|
+
static template: string | import('intact-react').Template<any>;
|
|
13
13
|
static typeDefs: Required<TypeDefs<SkeletonItemProps>>;
|
|
14
14
|
static defaults: () => Partial<SkeletonItemProps>;
|
|
15
15
|
private config;
|
|
@@ -11,7 +11,7 @@ export interface SkeletonEvents {
|
|
|
11
11
|
export interface SkeletonBlocks {
|
|
12
12
|
}
|
|
13
13
|
export declare class Skeleton extends Component<SkeletonProps, SkeletonEvents, SkeletonBlocks> {
|
|
14
|
-
static template: string | import(
|
|
14
|
+
static template: string | import('intact-react').Template<any>;
|
|
15
15
|
static typeDefs: Required<TypeDefs<SkeletonProps>>;
|
|
16
16
|
static defaults: () => Partial<SkeletonProps>;
|
|
17
17
|
private config;
|
|
@@ -31,7 +31,7 @@ export interface SliderBlocks<Range extends boolean = boolean> {
|
|
|
31
31
|
tooltip: Value<Range>;
|
|
32
32
|
}
|
|
33
33
|
export declare class Slider<Range extends boolean = false> extends Component<SliderProps<Range>, SliderEvents<Range>, SliderBlocks<Range>> {
|
|
34
|
-
static template: string | import(
|
|
34
|
+
static template: string | import('intact-react').Template<any>;
|
|
35
35
|
static typeDefs: Required<TypeDefs<SliderProps<boolean>>>;
|
|
36
36
|
static defaults: () => Partial<SliderProps<boolean>>;
|
|
37
37
|
static events: Events<SliderEvents<boolean>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import { noop as _$no, createElementVNode as _$ce, createUnknownComponentVNode as _$cc, className as _$cn, extend as _$ex, EMPTY_OBJ as _$em, createVNode as _$cv, map as _$ma } from 'intact-react';
|
|
3
|
-
import { linkEvent } from 'intact';
|
|
3
|
+
import { linkEvent } from 'intact-react';
|
|
4
4
|
import { Spinner } from '../spinner';
|
|
5
5
|
import { Tooltip } from '../tooltip';
|
|
6
6
|
import { getRestProps } from '../utils';
|