@king-design/vue 3.1.1 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/__tests__/__snapshots__/Vue Next Demos.md +44 -38
  2. package/__tests__/components/upload.spec.ts +39 -0
  3. package/babel.config.js +29 -0
  4. package/components/affix/styles.d.ts +4 -1
  5. package/components/affix/styles.js +4 -2
  6. package/components/badge/index.vdt.js +1 -1
  7. package/components/badge/styles.d.ts +4 -1
  8. package/components/badge/styles.js +4 -2
  9. package/components/breadcrumb/index.vdt.js +1 -1
  10. package/components/breadcrumb/styles.d.ts +4 -1
  11. package/components/breadcrumb/styles.js +4 -2
  12. package/components/button/styles.d.ts +8 -2
  13. package/components/button/styles.js +7 -4
  14. package/components/card/styles.d.ts +4 -1
  15. package/components/card/styles.js +4 -2
  16. package/components/carousel/styles.d.ts +8 -2
  17. package/components/carousel/styles.js +7 -4
  18. package/components/cascader/index.vdt.js +3 -1
  19. package/components/cascader/styles.d.ts +8 -2
  20. package/components/cascader/styles.js +7 -4
  21. package/components/checkbox/index.vdt.js +1 -1
  22. package/components/checkbox/styles.d.ts +4 -1
  23. package/components/checkbox/styles.js +4 -2
  24. package/components/code/styles.d.ts +4 -1
  25. package/components/code/styles.js +3 -2
  26. package/components/collapse/index.spec.js +1 -1
  27. package/components/collapse/item.vdt.js +3 -3
  28. package/components/collapse/styles.d.ts +8 -2
  29. package/components/collapse/styles.js +11 -8
  30. package/components/colorpicker/styles.d.ts +8 -2
  31. package/components/colorpicker/styles.js +7 -4
  32. package/components/copy/styles.d.ts +4 -1
  33. package/components/copy/styles.js +3 -2
  34. package/components/datepicker/styles.d.ts +12 -3
  35. package/components/datepicker/styles.js +10 -6
  36. package/components/diagram/styles.d.ts +4 -1
  37. package/components/diagram/styles.js +3 -2
  38. package/components/dialog/index.spec.js +61 -1
  39. package/components/dialog/styles.d.ts +12 -3
  40. package/components/dialog/styles.js +10 -6
  41. package/components/dialog/usePosition.js +7 -0
  42. package/components/drawer/styles.d.ts +4 -1
  43. package/components/drawer/styles.js +4 -2
  44. package/components/dropdown/styles.d.ts +8 -2
  45. package/components/dropdown/styles.js +7 -4
  46. package/components/dropdown/usePosition.js +14 -11
  47. package/components/editable/styles.d.ts +4 -1
  48. package/components/editable/styles.js +4 -2
  49. package/components/form/styles.d.ts +8 -2
  50. package/components/form/styles.js +7 -4
  51. package/components/grid/styles.d.ts +8 -2
  52. package/components/grid/styles.js +12 -13
  53. package/components/icon/index.vdt.js +1 -1
  54. package/components/icon/styles.d.ts +4 -1
  55. package/components/icon/styles.js +4 -2
  56. package/components/input/styles.d.ts +8 -2
  57. package/components/input/styles.js +7 -4
  58. package/components/layout/styles.d.ts +16 -4
  59. package/components/layout/styles.js +13 -8
  60. package/components/menu/styles.d.ts +16 -4
  61. package/components/menu/styles.js +14 -9
  62. package/components/message/styles.d.ts +8 -2
  63. package/components/message/styles.js +7 -4
  64. package/components/pagination/styles.d.ts +4 -1
  65. package/components/pagination/styles.js +4 -2
  66. package/components/popover/content.vdt.js +1 -1
  67. package/components/popover/styles.d.ts +4 -1
  68. package/components/popover/styles.js +4 -2
  69. package/components/portal.js +15 -3
  70. package/components/progress/styles.d.ts +4 -1
  71. package/components/progress/styles.js +4 -2
  72. package/components/radio/styles.d.ts +4 -1
  73. package/components/radio/styles.js +4 -2
  74. package/components/rate/styles.d.ts +4 -1
  75. package/components/rate/styles.js +4 -2
  76. package/components/scrollSelect/styles.d.ts +4 -1
  77. package/components/scrollSelect/styles.js +4 -2
  78. package/components/select/base.js +3 -1
  79. package/components/select/base.vdt.js +1 -1
  80. package/components/select/styles.d.ts +12 -3
  81. package/components/select/styles.js +10 -6
  82. package/components/skeleton/styles.d.ts +8 -2
  83. package/components/skeleton/styles.js +7 -4
  84. package/components/slider/styles.d.ts +4 -1
  85. package/components/slider/styles.js +4 -2
  86. package/components/spin/styles.d.ts +4 -1
  87. package/components/spin/styles.js +4 -2
  88. package/components/spinner/styles.d.ts +4 -1
  89. package/components/spinner/styles.js +4 -2
  90. package/components/split/styles.d.ts +4 -1
  91. package/components/split/styles.js +4 -2
  92. package/components/steps/index.vdt.js +2 -2
  93. package/components/steps/styles.d.ts +4 -3
  94. package/components/steps/styles.js +9 -4
  95. package/components/switch/styles.d.ts +4 -1
  96. package/components/switch/styles.js +4 -2
  97. package/components/table/column.d.ts +1 -0
  98. package/components/table/column.js +2 -1
  99. package/components/table/column.vdt.js +9 -3
  100. package/components/table/index.spec.js +18 -11
  101. package/components/table/styles.d.ts +8 -2
  102. package/components/table/styles.js +8 -5
  103. package/components/table/table.vdt.js +3 -4
  104. package/components/table/useColumns.js +1 -0
  105. package/components/table/useFixedColumns.d.ts +3 -3
  106. package/components/table/useFixedColumns.js +27 -46
  107. package/components/table/useGroup.d.ts +1 -0
  108. package/components/table/useGroup.js +11 -1
  109. package/components/table/useResizable.js +41 -5
  110. package/components/table/useWidth.js +3 -0
  111. package/components/tabs/styles.d.ts +4 -1
  112. package/components/tabs/styles.js +4 -2
  113. package/components/tag/styles.d.ts +8 -2
  114. package/components/tag/styles.js +7 -4
  115. package/components/timeline/styles.d.ts +8 -2
  116. package/components/timeline/styles.js +7 -5
  117. package/components/timepicker/styles.d.ts +4 -1
  118. package/components/timepicker/styles.js +4 -2
  119. package/components/tip/styles.d.ts +4 -1
  120. package/components/tip/styles.js +4 -2
  121. package/components/tooltip/content.vdt.js +1 -1
  122. package/components/tooltip/styles.d.ts +4 -1
  123. package/components/tooltip/styles.js +4 -2
  124. package/components/transfer/styles.d.ts +4 -1
  125. package/components/transfer/styles.js +4 -2
  126. package/components/tree/index.spec.js +13 -1
  127. package/components/tree/styles.d.ts +4 -1
  128. package/components/tree/styles.js +4 -2
  129. package/components/tree/useChecked.js +4 -0
  130. package/components/treeSelect/styles.d.ts +4 -1
  131. package/components/treeSelect/styles.js +4 -2
  132. package/components/upload/styles.d.ts +8 -2
  133. package/components/upload/styles.js +7 -4
  134. package/components/upload/useFiles.js +3 -2
  135. package/components/utils.d.ts +10 -2
  136. package/components/utils.js +9 -2
  137. package/components/wave/styles.d.ts +4 -1
  138. package/components/wave/styles.js +4 -2
  139. package/i18n/en-US.d.ts +1 -0
  140. package/i18n/en-US.js +1 -0
  141. package/index.d.ts +2 -2
  142. package/index.js +2 -2
  143. package/package.json +3 -2
  144. package/styles/fonts/iconfont.d.ts +4 -1
  145. package/styles/fonts/iconfont.js +1 -1
  146. package/styles/global.js +7 -2
  147. package/yarn-error.log +249 -45
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
2
2
  import { theme, setDefault } from '../../styles/theme';
3
3
  import { deepDefaults, palette } from '../../styles/utils';
4
4
  import '../../styles/global';
5
+ import { cache } from '../utils';
5
6
  var defaults = {
6
7
  width: "300px",
7
8
  padding: "16px 16px 4px",
@@ -77,14 +78,17 @@ setDefault(function () {
77
78
  datepicker = deepDefaults(theme, {
78
79
  datepicker: defaults
79
80
  }).datepicker;
81
+ makePanelStyles == null ? void 0 : makePanelStyles.clearCache();
82
+ makeCalendarStyles == null ? void 0 : makeCalendarStyles.clearCache();
83
+ makeTimeStyles == null ? void 0 : makeTimeStyles.clearCache();
80
84
  });
81
85
  export { datepicker };
82
- export function makePanelStyles(k) {
86
+ export var makePanelStyles = cache(function makePanelStyles(k) {
83
87
  return /*#__PURE__*/css("display:flex;.", k, "-datepicker-shortcuts{width:", datepicker.shortcuts.width, ";padding:", datepicker.shortcuts.padding, ";border-right:", datepicker.border, ";}.", k, "-datepicker-shortcut{height:", datepicker.shortcuts.shortcut.height, ";line-height:", datepicker.shortcuts.shortcut.height, ";padding:", datepicker.shortcuts.shortcut.padding, ";cursor:pointer;&:hover{background:", datepicker.shortcuts.shortcut.hoverBgcolor, ";}}.", k, "-datepicker-calendars{display:flex;}.", k, "-datepicker-calendar-wrapper{&:nth-child(2){border-left:", datepicker.border, ";}.", k, "-tabs{border:none;.", k, "-tabs-wrapper{float:none;}.", k, "-tab{width:50%;}}}.", k, "-datepicker-footer{border-top:", datepicker.border, ";padding:", datepicker.footer.padding, ";text-align:right;}");
84
- }
85
- export function makeCalendarStyles(k) {
88
+ });
89
+ export var makeCalendarStyles = cache(function makeCalendarStyles(k) {
86
90
  return /*#__PURE__*/css("padding:", datepicker.padding, ";width:", datepicker.width, ";position:relative;.", k, "-datepicker-month{display:flex;padding:", datepicker.month.padding, ";}.", k, "-prev .", k, "-icon,.", k, "-next .", k, "-icon{margin:0 -5px!important;}.", k, "-month-values{flex:1;font-size:14px;text-align:center;cursor:pointer;overflow:hidden;position:relative;}.", k, "-month-value{margin:0 ", datepicker.month.valueGap, ";line-height:", theme.small.height, ";&:hover{color:", theme.color.primary, ";}},.", k, "-weekdays{display:flex;border-bottom:", datepicker.border, ";padding:", datepicker.weekday.padding, ";}.", k, "-weekday{flex:1;text-align:center;}.", k, "-calendar-item{text-align:center;margin:", datepicker.item.gutter, ";aspect-ratio:1;display:flex;align-items:center;cursor:pointer;position:relative;border-radius:", datepicker.item.borderRadius, ";.", k, "-value{border-radius:", datepicker.item.borderRadius, ";}&.", k, "-hover{background:", datepicker.item.hoverBgColor, ";}&.", k, "-exceed{color:", datepicker.item.exceedColor, ";}&.", k, "-today .", k, "-value{border:", datepicker.item.todayBorder, ";}&.", k, "-active{background:", datepicker.item.active.bgColor, ";color:", datepicker.item.active.color, ";&.", k, "-today .", k, "-value{border-color:", datepicker.item.active.todayBorderColor, ";}}&.", k, "-disabled{color:", datepicker.item.disabled.color, ";cursor:not-allowed;background:", datepicker.item.disabled.hoverBgColor, ";}&.", k, "-in-range:after{content:'';display:block;position:absolute;box-sizing:content-box;background:", datepicker.item.range.bgColor, ";width:100%;height:100%;left:-", datepicker.item.gutter, ";padding:0 ", datepicker.item.gutter, ";z-index:-1;}.", k, "-value{flex:1;display:flex;align-items:center;justify-content:center;height:100%;}}.", k, "-days{display:grid;grid-template-columns:repeat(7, 1fr);}.", k, "-years{display:grid;grid-template-columns:repeat(4, 1fr);}");
87
- }
88
- export function makeTimeStyles(k) {
91
+ });
92
+ export var makeTimeStyles = cache(function makeTimeStyles(k) {
89
93
  return /*#__PURE__*/css("display:flex;padding:", datepicker.padding, ";width:", datepicker.width, ";position:relative;.", k, "-scroll-select{flex:1;height:305px;}");
90
- }
94
+ });
@@ -1,2 +1,5 @@
1
1
  import '../../styles/global';
2
- export declare function makeStyles(k: string): string;
2
+ export declare const makeStyles: {
3
+ (k: string): string;
4
+ clearCache(): {};
5
+ };
@@ -2,7 +2,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
2
2
 
3
3
  import { css } from '@emotion/css';
4
4
  import '../../styles/global';
5
- export function makeStyles(k) {
5
+ import { cache } from '../utils';
6
+ export var makeStyles = cache(function makeStyles(k) {
6
7
  return /*#__PURE__*/css(process.env.NODE_ENV === "production" ? {
7
8
  name: "ohhwil",
8
9
  styles: "display:inline-block;overflow:auto;.mxRubberband{position:absolute;overflow:hidden;border-style:solid;border-width:1px;border-color:#0000ff;background:#0077ff;}.mxCellEditor{background:url(\"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7\");border-color:transparent;border-style:solid;display:inline-block;position:absolute;overflow:visible;word-wrap:normal;border-width:0;min-width:1px;resize:none;padding:0;margin:0;}.mxPlainTextEditor{padding:0;margin:0;}"
@@ -11,4 +12,4 @@ export function makeStyles(k) {
11
12
  styles: "display:inline-block;overflow:auto;.mxRubberband{position:absolute;overflow:hidden;border-style:solid;border-width:1px;border-color:#0000ff;background:#0077ff;}.mxCellEditor{background:url(\"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7\");border-color:transparent;border-style:solid;display:inline-block;position:absolute;overflow:visible;word-wrap:normal;border-width:0;min-width:1px;resize:none;padding:0;margin:0;}.mxPlainTextEditor{padding:0;margin:0;}",
12
13
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
13
14
  });
14
- }
15
+ });
@@ -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 _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); }
10
+ function _unsupportedIterableToArray(o, minLen) { var _context23; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context23 = Object.prototype.toString.call(o)).call(_context23, 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
 
@@ -732,6 +732,66 @@ describe('Dialog', function () {
732
732
  }
733
733
  }
734
734
  }, _callee14);
735
+ })));
736
+ it('should update position when change container', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15() {
737
+ var Demo, _mount15, instance, element, dialogDom, style;
738
+
739
+ return _regeneratorRuntime.wrap(function _callee15$(_context22) {
740
+ while (1) {
741
+ switch (_context22.prev = _context22.next) {
742
+ case 0:
743
+ Demo = /*#__PURE__*/function (_Component7) {
744
+ _inheritsLoose(Demo, _Component7);
745
+
746
+ function Demo() {
747
+ var _context21;
748
+
749
+ var _this7;
750
+
751
+ for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
752
+ args[_key7] = arguments[_key7];
753
+ }
754
+
755
+ _this7 = _Component7.call.apply(_Component7, _concatInstanceProperty(_context21 = [this]).call(_context21, args)) || this;
756
+ _this7.Dialog = Dialog;
757
+ return _this7;
758
+ }
759
+
760
+ Demo.defaults = function defaults() {
761
+ return {
762
+ container: function container(parentDom) {
763
+ return parentDom;
764
+ }
765
+ };
766
+ };
767
+
768
+ return Demo;
769
+ }(Component);
770
+
771
+ Demo.template = "\n var Dialog = this.Dialog;\n <Dialog value={true} container={this.get('container')} ref=\"dialog\">test</Dialog>\n ";
772
+ _mount15 = mount(Demo), instance = _mount15[0], element = _mount15[1];
773
+ _context22.next = 5;
774
+ return wait();
775
+
776
+ case 5:
777
+ instance.set('container', undefined);
778
+ _context22.next = 8;
779
+ return wait();
780
+
781
+ case 8:
782
+ dialogDom = instance.refs.dialog.dialogRef.value;
783
+ style = dialogDom.style;
784
+ expect(style.left).not.eql('');
785
+ expect(style.top).not.eql(''); // should append to body
786
+
787
+ expect(dialogDom.closest('.k-dialog-wrapper').parentElement).to.eql(document.body);
788
+
789
+ case 13:
790
+ case "end":
791
+ return _context22.stop();
792
+ }
793
+ }
794
+ }, _callee15);
735
795
  }))); // it('should handle v-if and v-model at the same time correctly in Vue', async () => {
736
796
  // const Test = {
737
797
  // template: `<Dialog v-model="show" v-if="show" ref="dialog">test</Dialog>`,
@@ -1,4 +1,13 @@
1
1
  import '../../styles/global';
2
- export declare function makeDialogStyles(k: string): string;
3
- export declare function makeWrapperStyles(k: string): string;
4
- export declare function makeAlertStyles(k: string): string;
2
+ export declare const makeDialogStyles: {
3
+ (k: string): string;
4
+ clearCache(): {};
5
+ };
6
+ export declare const makeWrapperStyles: {
7
+ (k: string): string;
8
+ clearCache(): {};
9
+ };
10
+ export declare const makeAlertStyles: {
11
+ (k: string): string;
12
+ clearCache(): {};
13
+ };
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
3
3
  import { theme, setDefault } from '../../styles/theme';
4
4
  import { deepDefaults } from '../../styles/utils';
5
5
  import '../../styles/global';
6
+ import { cache } from '../utils';
6
7
  var defaults = {
7
8
  width: '800px',
8
9
  bgColor: '#fff',
@@ -81,24 +82,27 @@ setDefault(function () {
81
82
  dialog = deepDefaults(theme, {
82
83
  dialog: defaults
83
84
  }).dialog;
85
+ makeDialogStyles == null ? void 0 : makeDialogStyles.clearCache();
86
+ makeWrapperStyles == null ? void 0 : makeWrapperStyles.clearCache();
87
+ makeAlertStyles == null ? void 0 : makeAlertStyles.clearCache();
84
88
  });
85
- export function makeDialogStyles(k) {
89
+ export var makeDialogStyles = cache(function makeDialogStyles(k) {
86
90
  var _context;
87
91
 
88
92
  return /*#__PURE__*/css("position:absolute;width:", dialog.width, ";border-radius:", dialog.borderRadius, ";background:", dialog.bgColor, ";font-size:", dialog.fontSize, ";color:", dialog.color, ";box-shadow:", dialog.boxShadow, ";max-width:100%;z-index:", theme.maxZIndex, ";&.", k, "-dragging{cursor:move;user-select:none;}&.transition-enter-active,&.transition-leave-active,&.transition-appear-active{transition:all ", dialog.transition, ";}&.transition-enter-from,&.transition-leave-to,&.transition-appear-from{transform:", dialog.transform, ";opacity:0;}", _mapInstanceProperty(_context = ['large', 'small', 'mini']).call(_context, function (size) {
89
93
  return /*#__PURE__*/css("&.", k, "-", size, "{width:", dialog[size + "Width"], ";}");
90
94
  }), ".", k, "-dialog-header{padding:0 ", dialog.padding, ";margin:", dialog.margin, ";border-bottom:", dialog.header.border, ";height:", dialog.header.height, ";line-height:", dialog.header.height, ";font-size:", dialog.header.fontSize, ";color:", dialog.header.color, ";position:relative;font-weight:", dialog.header.fontWeight, ";}.", k, "-dialog-title{display:inline-block;}.", k, "-dialog-close{position:absolute;right:", dialog.header.closeRight, ";top:", dialog.header.closeTop, ";.", k, "-icon{font-size:", dialog.header.closeIconFontSize, ";}}.", k, "-dialog-body{padding:", dialog.body.padding, ";position:relative;}.", k, "-dialog-footer{text-align:right;padding:", dialog.footer.padding, ";margin:", dialog.margin, ";border-top:", dialog.footer.border, ";.", k, "-btn{margin-left:", dialog.footer.btnGap, ";}}");
91
- }
92
- export function makeWrapperStyles(k) {
95
+ });
96
+ export var makeWrapperStyles = cache(function makeWrapperStyles(k) {
93
97
  //.${k}-fade-leave-active will add position absolute to the styles
94
98
  // so we must set fixed with important to .${k}-dialog-overlay
95
99
  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
- }
97
- export function makeAlertStyles(k) {
100
+ });
101
+ export var makeAlertStyles = cache(function makeAlertStyles(k) {
98
102
  var _context2;
99
103
 
100
104
  return /*#__PURE__*/css("&.", k, "-alert-dialog{.", k, "-dialog-body{margin-top:", dialog.alert.bodyMarginTop, ";padding:", dialog.alert.padding, ";text-align:center;z-index:1;}.", k, "-dialog-header,.", k, "-dialog-footer{border:none;}.", k, "-dialog-tip-icon{margin-bottom:", dialog.alert.tipIconMarginBottom, ";.", k, "-icon{font-size:", dialog.alert.tipIconFontSize, ";line-height:", dialog.alert.tipIconLineHeight, ";}}", _mapInstanceProperty(_context2 = ['success', 'warning', 'error', 'confirm']).call(_context2, function (type) {
101
105
  var color = type === 'error' ? theme.color.danger : type === 'confirm' ? theme.color.primary : theme.color[type];
102
106
  return /*#__PURE__*/css("&.", k, "-", type, "{.", k, "-dialog-tip-icon{color:", color, ";}}");
103
107
  }), " &:not(.", k, "-confirm){.", k, "-dialog-cancel{display:none;}}&.", k, "-with-title{.", k, "-dialog-body{margin-top:", dialog.alert.titleBodyMarginTop, ";text-align:left;}.", k, "-dialog-tip-icon{float:left;.", k, "-icon{font-size:", dialog.alert.titleTipIconFontSize, ";}}.", k, "-alert-dialog-wrapper{overflow:hidden;padding-left:", dialog.alert.wrapperPaddingLeft, ";}.", k, "-alert-dialog-title{line-height:", dialog.alert.tipIconLineHeight, ";font-size:", dialog.alert.titleFontSize, ";font-weight:", dialog.alert.titleFontWeight, ";}}}");
104
- }
108
+ });
@@ -5,6 +5,13 @@ export function usePosition(elementRef) {
5
5
  var instance = useInstance();
6
6
  instance.on(SHOW, center);
7
7
  instance.on('afterClose', onAfterLeave);
8
+ instance.watch('container', function () {
9
+ if (!instance.get('value')) return;
10
+ center();
11
+ }, {
12
+ presented: true,
13
+ inited: true
14
+ });
8
15
 
9
16
  function center() {
10
17
  position(elementRef.value, {
@@ -2,5 +2,8 @@ import '../../styles/global';
2
2
  declare type ValueOf<T extends readonly any[]> = T[number];
3
3
  export declare type Placement = ValueOf<typeof placements>;
4
4
  export declare const placements: readonly ["top", "right", "bottom", "left"];
5
- export declare function makeStyles(overlay: boolean, k: string): string;
5
+ export declare const makeStyles: {
6
+ (overlay: boolean, k: string): string;
7
+ clearCache(): {};
8
+ };
6
9
  export {};
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
2
2
  import { theme, setDefault } from '../../styles/theme';
3
3
  import { deepDefaults } from '../../styles/utils';
4
4
  import '../../styles/global';
5
+ import { cache } from '../utils';
5
6
  export var placements = ['top', 'right', 'bottom', 'left'];
6
7
  var defaults = {
7
8
  get transition() {
@@ -18,11 +19,12 @@ setDefault(function () {
18
19
  drawer = deepDefaults(theme, {
19
20
  drawer: defaults
20
21
  }).drawer;
22
+ makeStyles == null ? void 0 : makeStyles.clearCache();
21
23
  });
22
- export function makeStyles(overlay, k) {
24
+ export var makeStyles = cache(function makeStyles(overlay, k) {
23
25
  var borderRadius = theme.largeBorderRadius;
24
26
  return /*#__PURE__*/css("&.k-drawer{position:fixed;background:transparent;box-shadow:none;border-radius:0;}&.transition-enter-active,&.transition-leave-active,&.transition-appear-active{transition:opacity ", drawer.transition, "!important;overflow:hidden;.", k, "-drawer-content{transition:transform ", drawer.transition, ";}}.", k, "-drawer-content{height:100%;display:flex;background:#fff;flex-direction:column;transform:translateX(0);box-shadow:", drawer.boxShadow, ";.", k, "-dialog-body{flex-grow:1;overflow:auto;}}", makePlacementStyles(k, 'right', "right: 0; height: 100%;", "translateX(100%)", borderRadius + " 0 0 " + borderRadius), " ", makePlacementStyles(k, 'left', 'left: 0; height: 100%;', "translateX(-100%)", "0 " + borderRadius + " " + borderRadius + " 0"), " ", makePlacementStyles(k, 'top', 'left: 50%; top: 0; transform: translateX(-50%);', "translateY(-100%)", "0 0 " + borderRadius + " " + borderRadius), " ", makePlacementStyles(k, 'bottom', 'left: 50%; bottom: 0; transform: translateX(-50%);', "translateY(100%)", "0 " + borderRadius + " " + borderRadius + " 0"), " &.", k, "-top,&.", k, "-bottom{width:100%;}");
25
- }
27
+ });
26
28
 
27
29
  function makePlacementStyles(k, placement, styles, transform, borderRadius) {
28
30
  return /*#__PURE__*/css("&.", k, "-drawer.", k, "-", placement, "{", styles, " &.transition-enter-from,&.transition-leave-to,&.transition-appear-from{.", k, "-drawer-content{transform:", transform, ";}}.", k, "-drawer-content{border-radius:", borderRadius, ";}}");
@@ -1,3 +1,9 @@
1
1
  import '../../styles/global';
2
- export declare function makeMenuStyles(k: string): string;
3
- export declare function makeItemStyles(k: string): string;
2
+ export declare const makeMenuStyles: {
3
+ (k: string): string;
4
+ clearCache(): {};
5
+ };
6
+ export declare const makeItemStyles: {
7
+ (k: string): string;
8
+ clearCache(): {};
9
+ };
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
2
2
  import { theme, setDefault } from '../../styles/theme';
3
3
  import { deepDefaults, getLeft, getRight } from '../../styles/utils';
4
4
  import '../../styles/global';
5
+ import { cache } from '../utils';
5
6
  var defaults = {
6
7
  item: {
7
8
  get height() {
@@ -47,10 +48,12 @@ setDefault(function () {
47
48
  dropdown = deepDefaults(theme, {
48
49
  dropdown: defaults
49
50
  }).dropdown;
51
+ makeMenuStyles == null ? void 0 : makeMenuStyles.clearCache();
52
+ makeItemStyles == null ? void 0 : makeItemStyles.clearCache();
50
53
  });
51
- export function makeMenuStyles(k) {
54
+ export var makeMenuStyles = cache(function makeMenuStyles(k) {
52
55
  return /*#__PURE__*/css("position:absolute;min-width:", dropdown.menu.minWidth, ";background:", dropdown.menu.bgColor, ";border-radius:", dropdown.menu.borderRadius, ";box-shadow:", theme.middleBoxShadow, ";font-size:", dropdown.menu.fontSize, ";z-index:", dropdown.menu.zIndex, ";top:0;left:0;.", k, "-dropdown{display:block;}");
53
- }
54
- export function makeItemStyles(k) {
56
+ });
57
+ export var makeItemStyles = cache(function makeItemStyles(k) {
55
58
  return /*#__PURE__*/css("padding:", dropdown.item.padding, ";cursor:pointer;white-space:nowrap;height:", dropdown.item.height, ";line-height:", dropdown.item.height, ";&.", k, "-hover{background:", dropdown.item.hoverBgColor, ";}&:first-of-type{border-radius:", dropdown.menu.borderRadius, " ", dropdown.menu.borderRadius, " 0 0;}&:last-of-type{border-radius:0 0 ", dropdown.menu.borderRadius, " ", dropdown.menu.borderRadius, ";}&.", k, "-disabled{background:", dropdown.item.disabledBgColor, ";color:", dropdown.item.disabledColor, ";cursor:not-allowed;}.", k, "-checkbox,.", k, "-radio{display:flex;margin:0 -", getRight(dropdown.item.padding), " 0 -", getLeft(dropdown.item.padding), ";padding:", dropdown.item.padding, ";}.", k, "-checkbox-wrapper,.", k, "-radio-wrapper{vertical-align:text-bottom;}.", k, "-checkbox-text,.", k, "-radio-text{vertical-align:baseline;}");
56
- }
59
+ });
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import { useInstance, findDomFromVNode } from 'intact-vue-next';
3
3
  import { position } from '../position';
4
- import { noop } from 'intact-shared';
5
- import { isObject } from 'intact-shared';
4
+ import { noop, isObject, isFunction } from 'intact-shared';
6
5
  import { isEqualObject } from '../utils';
7
6
  export function usePosition() {
8
7
  var instance = useInstance();
@@ -16,19 +15,23 @@ export function usePosition() {
16
15
  });
17
16
  ['of', 'position'].forEach(function (item) {
18
17
  instance.watch(item, function (newValue, oldValue) {
19
- // return if object is the same
20
- if (isObject(newValue) && isObject(oldValue) && // is not event object
21
- !(newValue instanceof Event) && isEqualObject(newValue, oldValue)) {
22
- return;
23
- }
24
-
25
- if (instance.get('value')) {
26
- handle(noop);
27
- }
18
+ if (!instance.get('value') || // return if object is the same
19
+ isObject(newValue) && isObject(oldValue) && // is not event object
20
+ !(newValue instanceof Event) && isEqualObject(newValue, oldValue)) return;
21
+ handle(noop);
28
22
  }, {
29
23
  presented: true,
30
24
  inited: true
31
25
  });
26
+ }); // watch container, it is not commonly used
27
+
28
+ instance.watch('container', function (newValue, oldValue) {
29
+ if (!instance.get('value') || // return if function is the same. Not rigorous!
30
+ isFunction(newValue) && isFunction(oldValue) && newValue.toString() === oldValue.toString()) return;
31
+ handle(noop);
32
+ }, {
33
+ presented: true,
34
+ inited: true
32
35
  }); // if the dropdown is nested, we must show child after parent has positioned
33
36
 
34
37
  function p(ofElement, parentFeedback) {
@@ -7,4 +7,7 @@ declare const defaults: {
7
7
  };
8
8
  declare let editable: typeof defaults;
9
9
  export { editable };
10
- export declare function makeStyles(k: string): string;
10
+ export declare const makeStyles: {
11
+ (k: string): string;
12
+ clearCache(): {};
13
+ };
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
2
2
  import { theme, setDefault } from '../../styles/theme';
3
3
  import { deepDefaults } from '../../styles/utils';
4
4
  import '../../styles/global';
5
+ import { cache } from '../utils';
5
6
  var defaults = {
6
7
  iconGap: '0 0 0 8px',
7
8
  // invalid
@@ -17,8 +18,9 @@ setDefault(function () {
17
18
  editable = deepDefaults(theme, {
18
19
  editable: defaults
19
20
  }).editable;
21
+ makeStyles == null ? void 0 : makeStyles.clearCache();
20
22
  });
21
23
  export { editable };
22
- export function makeStyles(k) {
24
+ export var makeStyles = cache(function makeStyles(k) {
23
25
  return /*#__PURE__*/css("display:inline-flex;align-items:center;.", k, "-editable-icon{margin:", editable.iconGap, ";}&.", k, "-invalid{.", k, "-input-inner{border:", editable.invalid.border, "!important;}}");
24
- }
26
+ });
@@ -1,3 +1,9 @@
1
1
  import '../../styles/global';
2
- export declare function makeItemStyles(k: string): string;
3
- export declare function makeFormStyles(k: string): string;
2
+ export declare const makeItemStyles: {
3
+ (k: string): string;
4
+ clearCache(): {};
5
+ };
6
+ export declare const makeFormStyles: {
7
+ (k: string): string;
8
+ clearCache(): {};
9
+ };
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
3
3
  import { theme, setDefault } from '../../styles/theme';
4
4
  import { deepDefaults } from '../../styles/utils';
5
5
  import '../../styles/global';
6
+ import { cache } from '../utils';
6
7
  var defaults = {
7
8
  item: {
8
9
  gap: "24px",
@@ -48,14 +49,16 @@ setDefault(function () {
48
49
  form = deepDefaults(theme, {
49
50
  form: defaults
50
51
  }).form;
52
+ makeItemStyles == null ? void 0 : makeItemStyles.clearCache();
53
+ makeFormStyles == null ? void 0 : makeFormStyles.clearCache();
51
54
  });
52
- export function makeItemStyles(k) {
55
+ export var makeItemStyles = cache(function makeItemStyles(k) {
53
56
  return /*#__PURE__*/css("display:flex;position:relative;&:not(:last-of-type){margin-bottom:", form.item.gap, ";}&.", k, "-fluid>.", k, "-form-content{flex:1;}.", k, "-form-label{display:flex;align-items:center;justify-content:", form.item.labelTextAlign === 'right' ? 'end' : 'start', ";width:", form.item.labelWidth, ";padding-right:", form.item.labelGap, ";max-height:", form.item.labelHeight, ";flex-shrink:0;}.", k, "-form-star{color:", form.item.starColor, ";margin-right:", form.item.starGap, ";}.", k, "-form-content{position:relative;}.", k, "-form-error{position:absolute;color:", form.item.errorColor, ";font-size:", form.item.errorFontSize, ";left:0;right:0;display:flex;align-items:center;&.", k, "-ellipsis{.", k, "-form-error-more{display:inline-block;}}}.", k, "-form-error-more{line-height:", form.item.errorFontSize, ";display:none;}&.", k, "-invalid{.", k, "-input{.", k, "-input-wrapper{border:", form.item.invalidBorder, ";position:relative;z-index:1;}}.", k, "-select,.", k, "-checkbox-wrapper,.", k, "-radio-wrapper{border:", form.item.invalidBorder, "!important;}.", k, "-select .", k, "-input .", k, "-input-wrapper{border:none;}}.", k, "-form-append{padding:", form.item.appendPadding, ";vertical-align:middle;}");
54
- }
55
- export function makeFormStyles(k) {
57
+ });
58
+ export var makeFormStyles = cache(function makeFormStyles(k) {
56
59
  var _context;
57
60
 
58
61
  return /*#__PURE__*/css("&.", k, "-inline{.", k, "-form-item{display:inline-flex;vertical-align:top;margin-right:", form.item.inlineGap, ";}.", k, "-form-label{width:auto;}}&.", k, "-vertical{.", k, "-form-item{flex-direction:column;}.", k, "-form-label{width:auto;text-align:left;padding:0;justify-content:start;margin-bottom:", form.item.verticalLabelGap, ";}}", _mapInstanceProperty(_context = ['small', 'mini']).call(_context, function (size) {
59
62
  return /*#__PURE__*/css("&.", k, "-", size, "{.", k, "-form-item:not(:last-of-type){margin-bottom:", form.item[size + "Gap"], ";}&.", k, "-inline{.", k, "-form-item{margin-right:", form.item[size + "InlineGap"], ";}}}");
60
63
  }), ";");
61
- }
64
+ });
@@ -1,3 +1,9 @@
1
1
  import '../../styles/global';
2
- export declare function makeRowStyles(k: string): string;
3
- export declare function makeColStyles(k: string): string;
2
+ export declare const makeRowStyles: {
3
+ (k: string): string;
4
+ clearCache(): {};
5
+ };
6
+ export declare const makeColStyles: {
7
+ (k: string): string;
8
+ clearCache(): {};
9
+ };
@@ -1,21 +1,20 @@
1
1
  import { css } from '@emotion/css';
2
- import { theme, setDefault } from '../../styles/theme';
3
- import { deepDefaults } from '../../styles/utils';
4
2
  import '../../styles/global';
5
3
  import { breakpoints, responsiveMap } from './constants';
6
- var defaults = {};
7
- var grid;
8
- setDefault(function () {
9
- grid = deepDefaults(theme, {
10
- grid: defaults
11
- }).grid;
12
- });
13
- export function makeRowStyles(k) {
4
+ import { cache } from '../utils'; // const defaults = {};
5
+ // let grid: typeof defaults;
6
+ // setDefault(() => {
7
+ // grid = deepDefaults(theme, {grid: defaults}).grid;
8
+ // makeRowStyles?.clearCache();
9
+ // makeColStyles?.clearCache();
10
+ // });
11
+
12
+ export var makeRowStyles = cache(function makeRowStyles(k) {
14
13
  return /*#__PURE__*/css("position:relative;display:flex;flex-wrap:wrap;&.", k, "-justify-start{justify-content:flex-start;}&.", k, "-justify-end{justify-content:flex-end;}&.", k, "-justify-center{justify-content:center;}&.", k, "-justify-between{justify-content:space-between;}&.", k, "-justify-around{justify-content:space-around;}&.", k, "-justify-evenly{justify-content:space-evenly;}&.", k, "-align-top{align-items:flex-start;}&.", k, "-align-bottom{align-items:flex-end;}&.", k, "-align-middle{align-items:center;}&.", k, "-align-stretch{align-items:stretch;}&.", k, "-align-baseline{align-items:baseline;}");
15
- }
16
- export function makeColStyles(k) {
14
+ });
15
+ export var makeColStyles = cache(function makeColStyles(k) {
17
16
  return /*#__PURE__*/css("position:relative;width:100%;.", k, "-col-wrapper{height:100%;}", makeBreakpointsCols(k), ";");
18
- }
17
+ });
19
18
 
20
19
  function makeBreakpointsCols(k) {
21
20
  var styles = [];
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import { createVNode as _$cv, className as _$cn } from 'intact-vue-next';
3
3
  import { addStyle, getRestProps } from '../utils';
4
- import makeStyles from './styles';
4
+ import { makeStyles } from './styles';
5
5
  export default function ($props, $blocks, $__proto__) {
6
6
  var _classNameObj;
7
7
 
@@ -2,4 +2,7 @@ import '../../styles/fonts/ionicons';
2
2
  import '../../styles/global';
3
3
  export declare const colors: readonly ["primary", "warning", "danger", "success"];
4
4
  export declare const sizes: readonly ["large", "small", "mini"];
5
- export default function makeStyles(k: string, color?: string): string;
5
+ export declare const makeStyles: {
6
+ (k: string, color?: string | undefined): string;
7
+ clearCache(): {};
8
+ };
@@ -6,6 +6,7 @@ import { rotate } from '../../styles/keyframes';
6
6
  import { makeIconStyles } from '../../styles/fonts/iconfont';
7
7
  import '../../styles/fonts/ionicons';
8
8
  import '../../styles/global';
9
+ import { cache } from '../utils';
9
10
  var defaults = {
10
11
  get transition() {
11
12
  return theme.transition.small;
@@ -31,10 +32,11 @@ setDefault(function () {
31
32
  icon = deepDefaults(theme, {
32
33
  icon: defaults
33
34
  }).icon;
35
+ makeStyles == null ? void 0 : makeStyles.clearCache();
34
36
  });
35
37
  export var colors = ['primary', 'warning', 'danger', 'success'];
36
38
  export var sizes = ['large', 'small', 'mini'];
37
- export default function makeStyles(k, color) {
39
+ export var makeStyles = cache(function makeStyles(k, color) {
38
40
  // create the global icon styles
39
41
  makeIconStyles(k);
40
42
  return /*#__PURE__*/css("color:", icon.color, ";font-size:", icon.fontSize.default, ";line-height:1;", _mapInstanceProperty(sizes).call(sizes, function (size) {
@@ -44,4 +46,4 @@ export default function makeStyles(k, color) {
44
46
  var _color = theme.color[color];
45
47
  return /*#__PURE__*/css("&.", k, "-", color, "{color:", _color, ";&.", k, "-hoverable:hover{color:", palette(_color, -2), ";}}");
46
48
  }), " &.", k, "-rotate:before{animation:", rotate, " 1s infinite linear;}&:before{font-size:inherit;}&.", k, "-hoverable{cursor:pointer;transition:color ", icon.transition, ";", color && /*#__PURE__*/css("&:hover{color:", palette(color, -2), "!important;}"), ";&:hover{color:", theme.color.primary, ";}}&.", k, "-disabled{cursor:not-allowed;color:", icon.disabledColor, "!important;}");
47
- }
49
+ });
@@ -1,3 +1,9 @@
1
1
  import '../../styles/global';
2
- export declare function makeStyles(k: string): string;
3
- export declare function makeSearchStyles(k: string): string;
2
+ export declare const makeStyles: {
3
+ (k: string): string;
4
+ clearCache(): {};
5
+ };
6
+ export declare const makeSearchStyles: {
7
+ (k: string): string;
8
+ clearCache(): {};
9
+ };
@@ -5,6 +5,7 @@ import { theme, setDefault } from '../../styles/theme';
5
5
  import { deepDefaults, sizes } from '../../styles/utils';
6
6
  import '../../styles/global';
7
7
  import { Input } from './';
8
+ import { cache } from '../utils';
8
9
  var defaults = deepDefaults({
9
10
  get transition() {
10
11
  return theme.transition.middle;
@@ -128,8 +129,10 @@ setDefault(function () {
128
129
  input = deepDefaults(theme, {
129
130
  input: defaults
130
131
  }).input;
132
+ makeStyles == null ? void 0 : makeStyles.clearCache();
133
+ makeSearchStyles == null ? void 0 : makeSearchStyles.clearCache();
131
134
  });
132
- export function makeStyles(k) {
135
+ export var makeStyles = cache(function makeStyles(k) {
133
136
  var _context;
134
137
 
135
138
  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) {
@@ -140,10 +143,10 @@ export function makeStyles(k) {
140
143
  }), "&.", k, "-inline{.", k, "-input-wrapper{height:auto;border:none;border-radius:0;padding:0;}}&.", k, "-type-textarea{.", k, "-input-wrapper{display:inline-block;padding:0;height:auto;}.", k, "-textarea{width:100%;padding:", input.textareaPadding, ";line-height:1.5;vertical-align:top;}.", k, "-input-suffix{margin:0;justify-content:flex-end;}}", _mapInstanceProperty(_context = Input.typeDefs.resize).call(_context, function (type) {
141
144
  return /*#__PURE__*/css("&.", k, "-resize-", type, "{.", k, "-textarea{resize:", type, ";}}");
142
145
  }), ".", k, "-input-fake{left:0;top:0;position:absolute;overflow:hidden;visibility:hidden;white-space:nowrap;}&.", k, "-auto-width{width:auto;max-width:100%;}.", k, "-input-count{color:", input.count.color, ";}");
143
- }
144
- export function makeSearchStyles(k) {
146
+ });
147
+ export var makeSearchStyles = cache(function makeSearchStyles(k) {
145
148
  return /*#__PURE__*/css("position:relative;display:inline-block;.", k, "-input{transition:width ", input.transition, ";}.", k, "-btn{position:absolute;top:0;right:0;z-index:1;}&.", k, "-default .", k, "-btn:hover{background:transparent;}.", k, "-input-suffix{margin-right:", input.search.suffixMarginRight, ";}&.", k, "-hide{", _mapInstanceProperty(sizes).call(sizes, function (size) {
146
149
  if (size == 'default') return;
147
150
  return /*#__PURE__*/css(".", k, "-input.", k, "-", size, "{width:", input[size].height, ";}");
148
151
  }), ";.", k, "-input{width:", input.default.height, ";}.", k, "-input-inner{padding:0!important;}}&.", k, "-line{.", k, "-input-wrapper{border-width:0;}&.", k, "-open{.", k, "-input-wrapper{border-bottom-width:1px;}.", k, "-btn:hover{background:transparent;}}}");
149
- }
152
+ });
@@ -1,7 +1,19 @@
1
1
  import '../../styles/global';
2
2
  export declare const themes: readonly ["light", "dark", "white"];
3
3
  export declare function getCollapseWidth(collapsedWidth?: string | number): string;
4
- export declare function makeLayoutStyles(k: string): string;
5
- export declare function makeHeaderStyles(k: string): string;
6
- export declare function makeAsideStyles(k: string): string;
7
- export declare function makeBodyStyles(k: string): string;
4
+ export declare const makeLayoutStyles: {
5
+ (k: string): string;
6
+ clearCache(): {};
7
+ };
8
+ export declare const makeHeaderStyles: {
9
+ (k: string): string;
10
+ clearCache(): {};
11
+ };
12
+ export declare const makeAsideStyles: {
13
+ (k: string): string;
14
+ clearCache(): {};
15
+ };
16
+ export declare const makeBodyStyles: {
17
+ (k: string): string;
18
+ clearCache(): {};
19
+ };