@king-design/react 3.1.0-beta.2 → 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.
- 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 +2 -1
- package/components/copy/index.js +2 -1
- package/components/copy/index.spec.js +64 -1
- package/components/copy/index.vdt.js +1 -1
- package/components/copy/useCopy.d.ts +1 -1
- package/components/copy/useCopy.js +3 -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.js +1 -1
- package/components/dialog/base.vdt.js +4 -4
- package/components/dialog/index.spec.js +87 -5
- package/components/dialog/styles.js +1 -1
- 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 +23 -3
- package/components/menu/menu.d.ts +2 -1
- package/components/menu/menu.js +2 -1
- package/components/menu/menu.vdt.js +1 -1
- package/components/menu/styles.d.ts +1 -0
- package/components/menu/styles.js +10 -2
- package/components/menu/useDropdown.d.ts +1 -1
- package/components/menu/useDropdown.js +3 -6
- 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/row.d.ts +1 -1
- package/components/table/row.vdt.js +3 -3
- package/components/table/styles.js +3 -2
- package/components/table/table.d.ts +2 -2
- package/components/table/table.vdt.js +2 -2
- 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 +6 -4
- package/components/tree/index.js +5 -0
- package/components/tree/index.spec.js +60 -39
- package/components/tree/index.vdt.js +1 -1
- package/components/tree/styles.js +1 -1
- package/components/tree/useDraggable.js +12 -12
- package/components/tree/useExpanded.d.ts +1 -0
- package/components/tree/useExpanded.js +23 -7
- package/components/tree/useNodes.d.ts +1 -0
- package/components/treeSelect/index.d.ts +2 -1
- package/components/treeSelect/index.js +4 -0
- 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
|
@@ -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
|
|
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
|
-
|
|
645
|
+
style = document.body.getAttribute('style');
|
|
646
|
+
expect(style === null || style === '').to.be.true;
|
|
646
647
|
|
|
647
|
-
case
|
|
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>`,
|
|
@@ -92,7 +92,7 @@ export function makeDialogStyles(k) {
|
|
|
92
92
|
export function makeWrapperStyles(k) {
|
|
93
93
|
//.${k}-fade-leave-active will add position absolute to the styles
|
|
94
94
|
// so we must set fixed with important to .${k}-dialog-overlay
|
|
95
|
-
return /*#__PURE__*/css("position:absolute;z-index:", theme.maxZIndex, ";top:0;left:0;width:100%;.", k, "-dialog-overlay{position:fixed!important;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, .5);}");
|
|
95
|
+
return /*#__PURE__*/css("position:absolute;z-index:", theme.maxZIndex, ";top:0;left:0;width:100%;.", k, "-dialog-overlay{position:fixed!important;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, .5);overflow:auto;}");
|
|
96
96
|
}
|
|
97
97
|
export function makeAlertStyles(k) {
|
|
98
98
|
var _context2;
|
|
@@ -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,13 +1,13 @@
|
|
|
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';
|
|
7
7
|
import { Menu } from './menu';
|
|
8
8
|
import { getRestProps, expandAnimationCallbacks } from '../utils';
|
|
9
9
|
import { isNullOrUndefined } from 'intact-shared';
|
|
10
|
-
import { makeItemStyles, makeTitleStyles } from './styles';
|
|
10
|
+
import { makeItemStyles, makeTitleStyles, makeNestedMenuStyles } from './styles';
|
|
11
11
|
export default function ($props, $blocks, $__proto__) {
|
|
12
12
|
var _classNameObj,
|
|
13
13
|
_this = this;
|
|
@@ -67,7 +67,27 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
67
67
|
'show': isExpanded,
|
|
68
68
|
'key': 'subMenu'
|
|
69
69
|
}, expandAnimationCallbacks, {
|
|
70
|
-
'children':
|
|
70
|
+
'children': function () {
|
|
71
|
+
if (subMenuVNode) {
|
|
72
|
+
var _$cn3;
|
|
73
|
+
|
|
74
|
+
var paddingLeft = _this.parentMenu.get('_paddingLeft');
|
|
75
|
+
|
|
76
|
+
var _makeNestedMenuStyles = makeNestedMenuStyles(k, showDot || !!iconVNode, paddingLeft),
|
|
77
|
+
_classname = _makeNestedMenuStyles[0],
|
|
78
|
+
_paddingLeft = _makeNestedMenuStyles[1];
|
|
79
|
+
|
|
80
|
+
var _className = _$cn((_$cn3 = {}, _$cn3[_classname] = true, _$cn3[subMenuVNode.className] = subMenuVNode.className, _$cn3));
|
|
81
|
+
|
|
82
|
+
var clonedVNode = directClone(subMenuVNode);
|
|
83
|
+
clonedVNode.props = _extends({}, clonedVNode.props, {
|
|
84
|
+
className: _className,
|
|
85
|
+
_paddingLeft: _paddingLeft
|
|
86
|
+
});
|
|
87
|
+
clonedVNode.className = _className;
|
|
88
|
+
return clonedVNode;
|
|
89
|
+
}
|
|
90
|
+
}()
|
|
71
91
|
}), 'subMenu')] : !subMenuVNode ? isTopItem && isCollapse ? _$cc(Tooltip, {
|
|
72
92
|
'position': rootMenu.get('type') !== 'horizontal' ? 'right' : 'bottom',
|
|
73
93
|
'theme': rootMenu.get('theme') === 'dark' ? 'dark' : 'light',
|
|
@@ -9,6 +9,7 @@ export interface MenuProps<K extends Key = Key> {
|
|
|
9
9
|
size?: 'large' | 'default' | 'small';
|
|
10
10
|
accordion?: boolean;
|
|
11
11
|
dot?: boolean;
|
|
12
|
+
_paddingLeft?: string;
|
|
12
13
|
}
|
|
13
14
|
export interface MenuEvents {
|
|
14
15
|
}
|
|
@@ -18,7 +19,7 @@ export interface MenuBlocks {
|
|
|
18
19
|
export declare const MENU = "Menu";
|
|
19
20
|
export declare const ROOT_MENU = "RootMenu";
|
|
20
21
|
export declare class Menu<K extends Key = Key> extends Component<MenuProps<K>, MenuEvents, MenuBlocks> {
|
|
21
|
-
static template: string | import(
|
|
22
|
+
static template: string | import('intact-react').Template<any>;
|
|
22
23
|
static typeDefs: Required<TypeDefs<MenuProps<Key>>>;
|
|
23
24
|
static defaults: () => Partial<MenuProps<Key>>;
|
|
24
25
|
rootMenu: Menu<Key> | null;
|
package/components/menu/menu.js
CHANGED
|
@@ -44,7 +44,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
44
44
|
}), 0, _$cn((_$cn2 = {}, _$cn2[k + "-menu-header"] = true, _$cn2[makeTitleStyles(k)] = true, _$cn2))) : undefined, children];
|
|
45
45
|
return !isDropdownMenu ? _$cv('div', _extends({}, getRestProps(this), {
|
|
46
46
|
'className': _$cn(classNameObj)
|
|
47
|
-
}),
|
|
47
|
+
}), content) : _$cc(DropdownMenu, _extends({}, getRestProps(this), {
|
|
48
48
|
'className': _$cn(classNameObj),
|
|
49
49
|
'children': content
|
|
50
50
|
}));
|
|
@@ -65,3 +65,4 @@ export { menu };
|
|
|
65
65
|
export declare function makeMenuStyles(k: string): string;
|
|
66
66
|
export declare function makeTitleStyles(k: string): string;
|
|
67
67
|
export declare function makeItemStyles(k: string): string;
|
|
68
|
+
export declare function makeNestedMenuStyles(k: string, hasIcon: boolean, parentPaddingLeft?: string): string[];
|
|
@@ -122,7 +122,7 @@ export function makeMenuStyles(k) {
|
|
|
122
122
|
|
|
123
123
|
// we must increase the priority by adding &.${k}-menu
|
|
124
124
|
// to override the css of dropdownMenu
|
|
125
|
-
return /*#__PURE__*/css("&.", k, "-menu{width:", menu.width, ";transition:width ", menu.transition, ";background:", menu.bgColor, ";font-size:", menu.fontSize, ";}
|
|
125
|
+
return /*#__PURE__*/css("&.", k, "-menu{width:", menu.width, ";transition:width ", menu.transition, ";background:", menu.bgColor, ";font-size:", menu.fontSize, ";}.", k, "-icon{width:", menu.icon.width, ";margin-right:", menu.icon.gap, ";text-align:center;flex-shrink:0;}.", k, "-menu-header{height:", menu.header.height, ";font-size:", menu.header.fontSize, ";font-weight:bold;border-bottom:", menu.header.borderBottom, ";}", _mapInstanceProperty(_context = ['light', 'white']).call(_context, function (theme) {
|
|
126
126
|
var styles = menu[theme];
|
|
127
127
|
return /*#__PURE__*/css("&.", k, "-", theme, "{background:", styles.bgColor, ";.", k, "-menu-header{color:", styles.item.color, ";border-bottom:", styles.border, ";}.", k, "-menu-item{.", k, "-menu-title{color:", styles.item.color, ";&:hover{color:", styles.item.hoverColor, ";}}&.", k, "-highlighted{>.", k, "-menu-title{color:", styles.item.hoverColor, ";}}&.", k, "-disabled{>.", k, "-menu-title{color:", styles.item.disabledColor, "!important;}}}.", k, "-menu:not(.", k, "-dropdown-menu){background:", styles.subBgColor, ";}&.", k, "-horizontal{.", k, "-menu-header{border-right:", styles.border, ";}}}");
|
|
128
128
|
}), " &.", k, "-white{.", k, "-menu-item.", k, "-active{>.", k, "-menu-title{color:", menu.white.active.color, "!important;background:", menu.white.active.bgColor, ";}}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
@@ -136,5 +136,13 @@ export function makeTitleStyles(k) {
|
|
|
136
136
|
}
|
|
137
137
|
export function makeItemStyles(k) {
|
|
138
138
|
var item = menu.item;
|
|
139
|
-
return /*#__PURE__*/css(".", k, "-menu-title{cursor:pointer;height:", menu.item.height, "
|
|
139
|
+
return /*#__PURE__*/css(".", k, "-menu-title{cursor:pointer;height:", menu.item.height, ";&:hover{color:", menu.item.hoverColor, ";}}.", k, "-menu-name{flex:1;display:flex;align-items:center;min-width:0;span{overflow:hidden;text-overflow:ellipsis;min-width:0;}.", k, "-icon{color:inherit;}}.", k, "-menu-arrow{transition:transform ", menu.transition, ";margin:0 0 0 ", menu.icon.gap, ";}&.", k, "-expanded{>.", k, "-menu-title{color:", menu.item.hoverColor, ";.", k, "-menu-arrow{transform:rotateX(180deg);}}}&.", k, "-highlighted{>.", k, "-menu-title{color:", menu.item.hoverColor, ";}}&.", k, "-active{>.", k, "-menu-title{color:", menu.item.hoverColor, "!important;background:", menu.item.activeBgColor, ";}}&.", k, "-disabled{>.", k, "-menu-title{color:", menu.item.disabledColor, "!important;cursor:not-allowed;}}.", k, "-menu-dot{font-size:", menu.item.dotFontSize, ";transform:scale(.4);}");
|
|
140
|
+
}
|
|
141
|
+
export function makeNestedMenuStyles(k, hasIcon, parentPaddingLeft) {
|
|
142
|
+
if (parentPaddingLeft === void 0) {
|
|
143
|
+
parentPaddingLeft = getLeft(menu.item.padding);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
var paddingLeft = "" + parentPaddingLeft + (hasIcon ? ' + ' + menu.icon.width : '') + " + " + menu.icon.gap;
|
|
147
|
+
return [/*#__PURE__*/css("&.", k, "-menu{width:auto;background:", menu.subBgColor, ";.", k, "-menu-title{padding-left:calc(", paddingLeft, ");}}"), paddingLeft];
|
|
140
148
|
}
|
|
@@ -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;
|
|
@@ -31,16 +31,13 @@ export function useDropdown(rootMenu, parentMenu) {
|
|
|
31
31
|
eachChildren(children, function (vNode) {
|
|
32
32
|
if (isComponentVNode(vNode, Menu)) {
|
|
33
33
|
subMenuVNode = vNode;
|
|
34
|
-
} else if (isTopItem && isCollapse) {
|
|
35
|
-
if (isStringOrNumberNotEmpty(vNode) || isTextVNode(vNode)) {
|
|
36
|
-
tooltipContents.push(vNode);
|
|
37
|
-
} else if (!iconVNode && isComponentVNode(vNode, Icon)) {
|
|
38
|
-
iconVNode = vNode;
|
|
39
|
-
}
|
|
40
34
|
} else {
|
|
41
35
|
if (isStringOrNumberNotEmpty(vNode) || isTextVNode(vNode)) {
|
|
42
36
|
// wrap with span for showing text ellipsis
|
|
43
37
|
vNode = createVNode('span', null, vNode);
|
|
38
|
+
tooltipContents.push(vNode);
|
|
39
|
+
} else if (!iconVNode && isComponentVNode(vNode, Icon)) {
|
|
40
|
+
iconVNode = vNode;
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
titleVNodes.push(vNode);
|
|
@@ -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>;
|