@king-design/react 3.6.2-beta.0 → 3.6.2

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.
@@ -4,6 +4,8 @@ export * from './item';
4
4
  export type { Position as PositionOption, PositionShorthand } from './dropdown';
5
5
  export type { DropdownProps, DropdownEvents, DropdownBlocks, DropdownMenuProps, DropdownMenuEvents, DropdownMenuBlocks, };
6
6
  export declare class Dropdown extends BaseDropdown<DropdownProps, DropdownEvents, DropdownBlocks> {
7
+ static readonly __isDropdown = true;
7
8
  }
8
9
  export declare class DropdownMenu extends BaseDropdownMenu<DropdownMenuProps, DropdownMenuEvents, DropdownMenuBlocks> {
10
+ static readonly __isDropdownMenu = true;
9
11
  }
@@ -23,10 +23,12 @@ export var Dropdown = /*#__PURE__*/function (_BaseDropdown) {
23
23
  }
24
24
  return Dropdown;
25
25
  }(BaseDropdown);
26
+ Dropdown.__isDropdown = true;
26
27
  export var DropdownMenu = /*#__PURE__*/function (_BaseDropdownMenu) {
27
28
  _inheritsLoose(DropdownMenu, _BaseDropdownMenu);
28
29
  function DropdownMenu() {
29
30
  return _BaseDropdownMenu.apply(this, arguments) || this;
30
31
  }
31
32
  return DropdownMenu;
32
- }(BaseDropdownMenu);
33
+ }(BaseDropdownMenu);
34
+ DropdownMenu.__isDropdownMenu = true;
@@ -22,6 +22,6 @@ export declare class DropdownItem extends Component<DropdownItemProps, DropdownI
22
22
  private config;
23
23
  init(): void;
24
24
  select(): void;
25
- hasSubMenu(): undefined;
25
+ hasSubMenu(): Dropdown<import("./dropdown").DropdownProps, import("./dropdown").DropdownEvents, import("./dropdown").DropdownBlocks> | undefined;
26
26
  private onClick;
27
27
  }
@@ -7,7 +7,6 @@ import { bind } from '../utils';
7
7
  import { useItemKeyboard } from './useItemKeyboard';
8
8
  import { DROPDOWN } from './dropdown';
9
9
  import { DROPDOWN_MENU } from './menu';
10
- import { Dropdown as ExportDropdown, DropdownMenu as ExportDropdownMenu } from '.';
11
10
  import { useConfigContext } from '../config';
12
11
  var typeDefs = {
13
12
  disabled: Boolean,
@@ -62,12 +61,13 @@ export var DropdownItem = /*#__PURE__*/function (_Component) {
62
61
  var parent = this.$senior;
63
62
  while (parent) {
64
63
  // Tooltip extends Dropdown, it's also a instance of Dropdown
65
- // so use constructor to detect
66
- // if (parent instanceof DropdownMenu) {
67
- if (parent.constructor === ExportDropdownMenu) {
64
+ // we should exclude this case, so use constructor to detect
65
+ // @modify: Check using hasOwnProperty to avoid inheritance issues and circle reference
66
+ var _constructor = parent.constructor;
67
+ if (_constructor.hasOwnProperty('__isDropdownMenu')) {
68
68
  return;
69
69
  }
70
- if (parent.constructor === ExportDropdown) {
70
+ if (_constructor.hasOwnProperty('__isDropdown')) {
71
71
  return parent;
72
72
  }
73
73
  parent = parent.$senior;
@@ -91,7 +91,7 @@ setDefault(function () {
91
91
  });
92
92
  export { table };
93
93
  export var makeStyles = cache(function makeStyles(k) {
94
- return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.", k, "-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}tfoot{z-index:2;tr{td{border-top:", table.border, ";border-bottom-color:transparent;}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&.", k, "-fixed-right:before{left:-2px;}&:first-of-type:before{display:none;}}.", k, "-table-title{display:inline-flex;align-items:center;max-width:100%;color:", table.thead.color, ";}.", k, "-table-title-text{flex:1;display:inline-flex;line-height:1.4;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.", k, "-fixed-left,.", k, "-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.", k, "-fixed-left:after{right:-11px;}.", k, "-fixed-right:after{left:-11px;}&.", k, "-scroll-left .", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.", k, "-scroll-right .", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.", k, "-scroll-middle{.", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.", k, "-fixed-right+.", k, "-fixed-right:after{display:none;}.", k, "-table-affix-header{position:sticky;top:0;left:0;.", k, "-affix-wrapper{overflow:hidden;}&.", k, "-fixed{position:relative;}}&.", k, "-border,&.", k, "-grid{.", k, "-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.", k, "-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.", k, "-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.", k, "-table-group{margin-left:", table.group.gap, ";}.", k, "-table-check{.", k, "-checkbox,.", k, "-radio{position:relative;top:-1px;}}.", k, "-column-sortable{cursor:pointer;}.", k, "-column-sort{.", k, "-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin:0 0 1px ", _sortInstanceProperty(table).gap, ";}&.", k, "-desc .", k, "-icon.", k, "-desc,&.", k, "-asc .", k, "-icon.", k, "-asc{color:", _sortInstanceProperty(table).enabledColor, ";}}.", k, "-table-spin.", k, "-overlay{z-index:2;}.", k, "-table-empty{text-align:center;}tr.", k, "-expand{td{padding:0;background:#fdfcff;}}&.", k, "-with-expand{tr:not(.", k, "-expand){td{border-bottom:none;}}}.", k, "-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.", k, "-selected td{background:", table.selectedBgColor, ";}.", k, "-hidden{display:none;}.", k, "-table-arrow{width:", table.arrow.width, "!important;margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.", k, "-spreaded{.", k, "-table-arrow{transform:rotate(90deg);}}.", k, "-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.", k, "-dragging{opacity:", table.draggingOpacity, ";}.", k, "-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.", k, "-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
94
+ return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.", k, "-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}tfoot{z-index:2;tr{td{border-top:", table.border, ";border-bottom-color:transparent;}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{display:none;content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&:not(.", k, "-hidden)~th:not(.", k, "-hidden):before{display:block;}&.", k, "-fixed-right:before{left:-2px;}}.", k, "-table-title{display:inline-flex;align-items:center;max-width:100%;color:", table.thead.color, ";}.", k, "-table-title-text{flex:1;display:inline-flex;line-height:1.4;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.", k, "-fixed-left,.", k, "-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.", k, "-fixed-left:after{right:-11px;}.", k, "-fixed-right:after{left:-11px;}&.", k, "-scroll-left .", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.", k, "-scroll-right .", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.", k, "-scroll-middle{.", k, "-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.", k, "-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.", k, "-fixed-right+.", k, "-fixed-right:after{display:none;}.", k, "-table-affix-header{position:sticky;top:0;left:0;.", k, "-affix-wrapper{overflow:hidden;}&.", k, "-fixed{position:relative;}}&.", k, "-border,&.", k, "-grid{.", k, "-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.", k, "-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.", k, "-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.", k, "-table-group{margin-left:", table.group.gap, ";}.", k, "-table-check{.", k, "-checkbox,.", k, "-radio{position:relative;top:-1px;}}.", k, "-column-sortable{cursor:pointer;}.", k, "-column-sort{.", k, "-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin:0 0 1px ", _sortInstanceProperty(table).gap, ";}&.", k, "-desc .", k, "-icon.", k, "-desc,&.", k, "-asc .", k, "-icon.", k, "-asc{color:", _sortInstanceProperty(table).enabledColor, ";}}.", k, "-table-spin.", k, "-overlay{z-index:2;}.", k, "-table-empty{text-align:center;}tr.", k, "-expand{td{padding:0;background:#fdfcff;}}&.", k, "-with-expand{tr:not(.", k, "-expand){td{border-bottom:none;}}}.", k, "-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.", k, "-selected td{background:", table.selectedBgColor, ";}.", k, "-hidden{display:none;}.", k, "-table-arrow{width:", table.arrow.width, "!important;margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.", k, "-spreaded{.", k, "-table-arrow{transform:rotate(90deg);}}.", k, "-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.", k, "-dragging{opacity:", table.draggingOpacity, ";}.", k, "-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.", k, "-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
95
95
  return /*#__PURE__*/css(".", k, "-align-", type, "{text-align:", type, ";}");
96
96
  }), ">.", k, "-pagination{margin:16px 0;}&.", k, "-fix-header{min-height:0;.", k, "-table-wrapper{height:100%;}thead{position:sticky;top:0;}}&.", k, "-fix-footer{min-height:0;.", k, "-table-wrapper{height:100%;}tfoot{position:sticky;bottom:0;}}.", k, "-table-phantom{position:static;}");
97
97
  });
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @king-design v3.6.2-beta.0
2
+ * @king-design v3.6.2
3
3
  *
4
4
  * Copyright (c) Kingsoft Cloud
5
5
  * Released under the MIT License
@@ -66,7 +66,7 @@ export * from './components/upload';
66
66
  export * from './components/view';
67
67
  export * from './components/virtualList';
68
68
  export * from './components/wave';
69
- export declare const version = "3.6.2-beta.0";
69
+ export declare const version = "3.6.2";
70
70
 
71
71
 
72
72
  export {normalize} from 'intact-react';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @king-design v3.6.2-beta.0
2
+ * @king-design v3.6.2
3
3
  *
4
4
  * Copyright (c) Kingsoft Cloud
5
5
  * Released under the MIT License
@@ -67,7 +67,7 @@ export * from './components/upload';
67
67
  export * from './components/view';
68
68
  export * from './components/virtualList';
69
69
  export * from './components/wave';
70
- export var version = '3.6.2-beta.0';
70
+ export var version = '3.6.2';
71
71
  /* generate end */
72
72
 
73
73
  export {normalize} from 'intact-react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@king-design/react",
3
- "version": "3.6.2-beta.0",
3
+ "version": "3.6.2",
4
4
  "description": "King-Design UI components for React.",
5
5
  "keywords": [
6
6
  "component",
@@ -36,7 +36,7 @@
36
36
  "@emotion/css": "^11.5.0",
37
37
  "dayjs": "^1.10.7",
38
38
  "enquire.js": "^2.1.6",
39
- "intact-react": "3.0.44",
39
+ "intact-react": "3.0.45",
40
40
  "monaco-editor": "^0.26.1",
41
41
  "mxgraphx": "^4.0.7",
42
42
  "resize-observer-polyfill": "^1.5.1",