@king-design/vue 3.1.1-beta.3 → 3.1.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.
- package/__tests__/__snapshots__/Vue Next Demos.md +123 -111
- package/babel.config.js +29 -0
- package/components/affix/styles.d.ts +4 -1
- package/components/affix/styles.js +4 -2
- package/components/badge/index.vdt.js +1 -1
- package/components/badge/styles.d.ts +4 -1
- package/components/badge/styles.js +4 -2
- package/components/breadcrumb/index.vdt.js +1 -1
- package/components/breadcrumb/styles.d.ts +4 -1
- package/components/breadcrumb/styles.js +4 -2
- package/components/button/styles.d.ts +8 -2
- package/components/button/styles.js +7 -4
- package/components/card/styles.d.ts +4 -1
- package/components/card/styles.js +4 -2
- package/components/carousel/styles.d.ts +8 -2
- package/components/carousel/styles.js +7 -4
- package/components/cascader/index.vdt.js +3 -1
- package/components/cascader/styles.d.ts +8 -2
- package/components/cascader/styles.js +7 -4
- package/components/checkbox/index.vdt.js +1 -1
- package/components/checkbox/styles.d.ts +4 -1
- package/components/checkbox/styles.js +4 -2
- package/components/code/styles.d.ts +4 -1
- package/components/code/styles.js +3 -2
- package/components/collapse/index.spec.js +1 -1
- package/components/collapse/styles.d.ts +8 -2
- package/components/collapse/styles.js +7 -4
- package/components/colorpicker/styles.d.ts +8 -2
- package/components/colorpicker/styles.js +7 -4
- package/components/copy/styles.d.ts +4 -1
- package/components/copy/styles.js +3 -2
- package/components/datepicker/styles.d.ts +12 -3
- package/components/datepicker/styles.js +10 -6
- package/components/diagram/styles.d.ts +4 -1
- package/components/diagram/styles.js +3 -2
- package/components/dialog/styles.d.ts +12 -3
- package/components/dialog/styles.js +10 -6
- package/components/drawer/styles.d.ts +4 -1
- package/components/drawer/styles.js +4 -2
- package/components/dropdown/styles.d.ts +8 -2
- package/components/dropdown/styles.js +7 -4
- package/components/editable/styles.d.ts +4 -1
- package/components/editable/styles.js +4 -2
- package/components/form/index.spec.js +43 -0
- package/components/form/item.d.ts +1 -0
- package/components/form/item.js +2 -1
- package/components/form/styles.d.ts +8 -2
- package/components/form/styles.js +7 -4
- package/components/form/useDirty.js +4 -0
- package/components/grid/styles.d.ts +8 -2
- package/components/grid/styles.js +12 -13
- package/components/icon/index.vdt.js +1 -1
- package/components/icon/styles.d.ts +4 -1
- package/components/icon/styles.js +4 -2
- package/components/input/styles.d.ts +8 -2
- package/components/input/styles.js +7 -4
- package/components/layout/styles.d.ts +16 -4
- package/components/layout/styles.js +13 -8
- package/components/menu/styles.d.ts +16 -4
- package/components/menu/styles.js +14 -9
- package/components/message/styles.d.ts +8 -2
- package/components/message/styles.js +7 -4
- package/components/pagination/styles.d.ts +4 -1
- package/components/pagination/styles.js +4 -2
- package/components/popover/content.vdt.js +1 -1
- package/components/popover/styles.d.ts +4 -1
- package/components/popover/styles.js +8 -3
- package/components/progress/styles.d.ts +4 -1
- package/components/progress/styles.js +4 -2
- package/components/radio/styles.d.ts +4 -1
- package/components/radio/styles.js +4 -2
- package/components/rate/styles.d.ts +4 -1
- package/components/rate/styles.js +4 -2
- package/components/scrollSelect/styles.d.ts +4 -1
- package/components/scrollSelect/styles.js +4 -2
- package/components/select/base.js +3 -1
- package/components/select/base.vdt.js +1 -1
- package/components/select/styles.d.ts +12 -3
- package/components/select/styles.js +10 -6
- package/components/skeleton/styles.d.ts +8 -2
- package/components/skeleton/styles.js +7 -4
- package/components/slider/styles.d.ts +4 -1
- package/components/slider/styles.js +4 -2
- package/components/spin/styles.d.ts +4 -1
- package/components/spin/styles.js +4 -2
- package/components/spinner/styles.d.ts +4 -1
- package/components/spinner/styles.js +4 -2
- package/components/split/styles.d.ts +4 -1
- package/components/split/styles.js +4 -2
- package/components/steps/index.vdt.js +2 -2
- package/components/steps/styles.d.ts +4 -3
- package/components/steps/styles.js +9 -4
- package/components/switch/styles.d.ts +4 -1
- package/components/switch/styles.js +4 -2
- package/components/table/column.d.ts +1 -0
- package/components/table/column.js +2 -1
- package/components/table/column.vdt.js +9 -3
- package/components/table/index.spec.js +18 -11
- package/components/table/styles.d.ts +8 -2
- package/components/table/styles.js +8 -5
- package/components/table/table.vdt.js +3 -4
- package/components/table/useColumns.js +1 -0
- package/components/table/useFixedColumns.d.ts +3 -3
- package/components/table/useFixedColumns.js +27 -46
- package/components/table/useGroup.d.ts +1 -0
- package/components/table/useGroup.js +11 -1
- package/components/table/useResizable.js +41 -5
- package/components/table/useWidth.js +3 -0
- package/components/tabs/styles.d.ts +4 -1
- package/components/tabs/styles.js +4 -2
- package/components/tag/styles.d.ts +8 -2
- package/components/tag/styles.js +7 -4
- package/components/timeline/styles.d.ts +8 -2
- package/components/timeline/styles.js +7 -5
- package/components/timepicker/styles.d.ts +4 -1
- package/components/timepicker/styles.js +4 -2
- package/components/tip/styles.d.ts +4 -1
- package/components/tip/styles.js +4 -2
- package/components/tooltip/content.vdt.js +1 -1
- package/components/tooltip/styles.d.ts +4 -1
- package/components/tooltip/styles.js +4 -2
- package/components/transfer/styles.d.ts +4 -1
- package/components/transfer/styles.js +4 -2
- package/components/tree/index.spec.js +13 -1
- package/components/tree/styles.d.ts +4 -1
- package/components/tree/styles.js +4 -2
- package/components/tree/useChecked.js +4 -0
- package/components/treeSelect/styles.d.ts +4 -1
- package/components/treeSelect/styles.js +4 -2
- package/components/upload/styles.d.ts +8 -2
- package/components/upload/styles.js +7 -4
- package/components/utils.d.ts +10 -2
- package/components/utils.js +9 -2
- package/components/wave/styles.d.ts +4 -1
- package/components/wave/styles.js +4 -2
- package/i18n/en-US.d.ts +1 -0
- package/i18n/en-US.js +1 -0
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +3 -2
- package/styles/fonts/iconfont.d.ts +4 -1
- package/styles/fonts/iconfont.js +1 -1
- package/styles/global.js +1 -1
- package/yarn-error.log +249 -45
|
@@ -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
|
+
});
|
|
@@ -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
|
|
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
|
|
3
|
-
|
|
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
|
+
});
|
|
@@ -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
|
+
});
|
|
@@ -1362,4 +1362,47 @@ describe('Form', function () {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
}, _callee8);
|
|
1364
1364
|
})));
|
|
1365
|
+
it('should validate on init when setting validateOnStart prop', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {
|
|
1366
|
+
var Demo, _mount9, instance, element;
|
|
1367
|
+
|
|
1368
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context13) {
|
|
1369
|
+
while (1) {
|
|
1370
|
+
switch (_context13.prev = _context13.next) {
|
|
1371
|
+
case 0:
|
|
1372
|
+
Demo = /*#__PURE__*/function (_Component4) {
|
|
1373
|
+
_inheritsLoose(Demo, _Component4);
|
|
1374
|
+
|
|
1375
|
+
function Demo() {
|
|
1376
|
+
var _context12;
|
|
1377
|
+
|
|
1378
|
+
var _this4;
|
|
1379
|
+
|
|
1380
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
1381
|
+
args[_key4] = arguments[_key4];
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
_this4 = _Component4.call.apply(_Component4, _concatInstanceProperty(_context12 = [this]).call(_context12, args)) || this;
|
|
1385
|
+
_this4.Form = Form;
|
|
1386
|
+
_this4.FormItem = FormItem;
|
|
1387
|
+
return _this4;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
return Demo;
|
|
1391
|
+
}(Component);
|
|
1392
|
+
|
|
1393
|
+
Demo.template = "\n const {Form, FormItem} = this;\n <Form ref=\"form\">\n <FormItem rules={{required: true}} validateOnStart />\n </Form>\n ";
|
|
1394
|
+
_mount9 = mount(Demo), instance = _mount9[0], element = _mount9[1];
|
|
1395
|
+
_context13.next = 5;
|
|
1396
|
+
return wait(500);
|
|
1397
|
+
|
|
1398
|
+
case 5:
|
|
1399
|
+
expect(element.querySelector('.k-form-error')).to.be.exist;
|
|
1400
|
+
|
|
1401
|
+
case 6:
|
|
1402
|
+
case "end":
|
|
1403
|
+
return _context13.stop();
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
}, _callee9);
|
|
1407
|
+
})));
|
|
1365
1408
|
});
|
package/components/form/item.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
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
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
setDefault(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
|
|
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
|
|
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
|
|
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
|
|
3
|
-
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
};
|
|
@@ -6,6 +6,7 @@ import '../../styles/global';
|
|
|
6
6
|
import { menu } from '../menu/styles';
|
|
7
7
|
import { isNullOrUndefined } from 'intact-shared';
|
|
8
8
|
import { getStyle } from './helpers';
|
|
9
|
+
import { cache } from '../utils';
|
|
9
10
|
var sizes = ['small', 'large'];
|
|
10
11
|
export var themes = ['light', 'dark', 'white'];
|
|
11
12
|
var defaults = {
|
|
@@ -62,27 +63,31 @@ setDefault(function () {
|
|
|
62
63
|
layout = deepDefaults(theme, {
|
|
63
64
|
layout: defaults
|
|
64
65
|
}).layout;
|
|
66
|
+
makeLayoutStyles == null ? void 0 : makeLayoutStyles.clearCache();
|
|
67
|
+
makeHeaderStyles == null ? void 0 : makeHeaderStyles.clearCache();
|
|
68
|
+
makeAsideStyles == null ? void 0 : makeAsideStyles.clearCache();
|
|
69
|
+
makeBodyStyles == null ? void 0 : makeBodyStyles.clearCache();
|
|
65
70
|
});
|
|
66
71
|
export function getCollapseWidth(collapsedWidth) {
|
|
67
72
|
return isNullOrUndefined(collapsedWidth) ? layout.collapsedWidth : getStyle(collapsedWidth);
|
|
68
73
|
}
|
|
69
|
-
export function makeLayoutStyles(k) {
|
|
74
|
+
export var makeLayoutStyles = cache(function makeLayoutStyles(k) {
|
|
70
75
|
return /*#__PURE__*/css("display:flex;flex-direction:column;flex:1;transition:padding-left ", layout.transition, ";&.", k, "-has-aside{flex-direction:row;}.", k, "-layout-footer{padding:", layout.footerPadding, ";}.", k, "-layout-body{flex:1;}");
|
|
71
|
-
}
|
|
72
|
-
export function makeHeaderStyles(k) {
|
|
76
|
+
});
|
|
77
|
+
export var makeHeaderStyles = cache(function makeHeaderStyles(k) {
|
|
73
78
|
return /*#__PURE__*/css("display:flex;align-items:center;color:", layout.color, ";background:", layout.bgColor, ";left:0;transition:left ", layout.transition, ";&.", k, "-fixed{position:fixed;left:0;right:0;top:0;z-index:", theme.midZIndex + 1, ";}>.", k, "-menu{background:transparent!important;}&.", k, "-blur{backdrop-filter:blur(20px);background:", setAlpha(layout.bgColor, 0.1), ";}&.", k, "-box-shadow{border-bottom:none!important;box-shadow:", theme.boxShadow, ";}", _mapInstanceProperty(themes).call(themes, function (theme) {
|
|
74
79
|
if (theme === 'dark') return;
|
|
75
80
|
var styles = layout[theme];
|
|
76
81
|
return /*#__PURE__*/css("&.", k, "-", theme, "{background:", styles.bgColor, ";color:", styles.color, ";border-bottom:", styles.border, ";&.", k, "-blur{background:", setAlpha(styles.bgColor, 0.1), ";}}");
|
|
77
82
|
}), ";");
|
|
78
|
-
}
|
|
79
|
-
export function makeAsideStyles(k) {
|
|
83
|
+
});
|
|
84
|
+
export var makeAsideStyles = cache(function makeAsideStyles(k) {
|
|
80
85
|
return /*#__PURE__*/css("transition:width ", layout.transition, ";display:flex;flex-direction:column;background:", layout.bgColor, ";color:", layout.color, ";", _mapInstanceProperty(themes).call(themes, function (theme) {
|
|
81
86
|
if (theme === 'dark') return;
|
|
82
87
|
var styles = layout[theme];
|
|
83
88
|
return /*#__PURE__*/css("&.", k, "-", theme, "{background:", styles.bgColor, ";color:", styles.color, ";border-right:", styles.border, ";}");
|
|
84
89
|
}), " &.", k, "-fixed{position:fixed;overflow:auto;left:0;top:0;bottom:0;z-index:", theme.midZIndex, ";}.", k, "-menu{width:auto!important;}");
|
|
85
|
-
}
|
|
86
|
-
export function makeBodyStyles(k) {
|
|
90
|
+
});
|
|
91
|
+
export var makeBodyStyles = cache(function makeBodyStyles(k) {
|
|
87
92
|
return /*#__PURE__*/css("transition:padding-left ", layout.transition, ";");
|
|
88
|
-
}
|
|
93
|
+
});
|
|
@@ -62,7 +62,19 @@ declare const defaults: {
|
|
|
62
62
|
};
|
|
63
63
|
declare let menu: typeof defaults;
|
|
64
64
|
export { menu };
|
|
65
|
-
export declare
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
export declare const makeMenuStyles: {
|
|
66
|
+
(k: string): string;
|
|
67
|
+
clearCache(): {};
|
|
68
|
+
};
|
|
69
|
+
export declare const makeTitleStyles: {
|
|
70
|
+
(k: string): string;
|
|
71
|
+
clearCache(): {};
|
|
72
|
+
};
|
|
73
|
+
export declare const makeItemStyles: {
|
|
74
|
+
(k: string): string;
|
|
75
|
+
clearCache(): {};
|
|
76
|
+
};
|
|
77
|
+
export declare const makeNestedMenuStyles: {
|
|
78
|
+
(k: string, hasIcon: boolean, parentPaddingLeft?: string | undefined): string;
|
|
79
|
+
clearCache(): {};
|
|
80
|
+
};
|
|
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
|
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
4
|
import { deepDefaults, getLeft, palette } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
|
+
import { cache } from '../utils';
|
|
6
7
|
var sizes = ['large', 'small'];
|
|
7
8
|
var defaults = {
|
|
8
9
|
get transition() {
|
|
@@ -115,9 +116,13 @@ setDefault(function () {
|
|
|
115
116
|
menu = deepDefaults(theme, {
|
|
116
117
|
menu: defaults
|
|
117
118
|
}).menu;
|
|
119
|
+
makeMenuStyles == null ? void 0 : makeMenuStyles.clearCache();
|
|
120
|
+
makeItemStyles == null ? void 0 : makeItemStyles.clearCache();
|
|
121
|
+
makeTitleStyles == null ? void 0 : makeTitleStyles.clearCache();
|
|
122
|
+
makeNestedMenuStyles == null ? void 0 : makeNestedMenuStyles.clearCache();
|
|
118
123
|
});
|
|
119
124
|
export { menu };
|
|
120
|
-
export function makeMenuStyles(k) {
|
|
125
|
+
export var makeMenuStyles = cache(function makeMenuStyles(k) {
|
|
121
126
|
var _context;
|
|
122
127
|
|
|
123
128
|
// we must increase the priority by adding &.${k}-menu
|
|
@@ -129,20 +134,20 @@ export function makeMenuStyles(k) {
|
|
|
129
134
|
var styles = menu[size];
|
|
130
135
|
return /*#__PURE__*/css("&.", k, "-", size, "{width:", styles.width, ";font-size:", styles.fontSize, ";.", k, "-menu{font-size:", styles.fontSize, ";}}");
|
|
131
136
|
}), "&.", k, "-collapsed{width:calc(", menu.icon.width, " + ", getLeft(menu.item.padding), " * 2);.", k, "-icon{margin-right:0;}.", k, "-menu-arrow{display:none;}}&.", k, "-dropdown-menu{width:auto;min-width:", menu.dropdown.minWidth, ";.", k, "-menu-arrow{transform:rotate(-90deg);}}&.", k, "-horizontal{width:auto;display:flex;align-items:center;.", k, "-menu-header{border-bottom:none;border-right:", menu.header.borderBottom, ";}}");
|
|
132
|
-
}
|
|
133
|
-
export function makeTitleStyles(k) {
|
|
137
|
+
});
|
|
138
|
+
export var makeTitleStyles = cache(function makeTitleStyles(k) {
|
|
134
139
|
var item = menu.item;
|
|
135
140
|
return /*#__PURE__*/css("display:flex;align-items:center;padding:", item.padding, ";color:", item.color, ";white-space:nowrap;overflow:hidden;flex-wrap:nowrap;");
|
|
136
|
-
}
|
|
137
|
-
export function makeItemStyles(k) {
|
|
141
|
+
});
|
|
142
|
+
export var makeItemStyles = cache(function makeItemStyles(k) {
|
|
138
143
|
var item = menu.item;
|
|
139
|
-
return /*#__PURE__*/css(".", k, "-menu-title{cursor:pointer;height:",
|
|
140
|
-
}
|
|
141
|
-
export function makeNestedMenuStyles(k, hasIcon, parentPaddingLeft) {
|
|
144
|
+
return /*#__PURE__*/css(".", k, "-menu-title{cursor:pointer;height:", item.height, ";&:hover{color:", 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:", item.hoverColor, ";.", k, "-menu-arrow{transform:rotateX(180deg);}}}&.", k, "-highlighted{>.", k, "-menu-title{color:", item.hoverColor, ";}}&.", k, "-active{>.", k, "-menu-title{color:", item.hoverColor, "!important;background:", item.activeBgColor, ";}}&.", k, "-disabled{>.", k, "-menu-title{color:", item.disabledColor, "!important;cursor:not-allowed;}}.", k, "-menu-dot{font-size:", item.dotFontSize, ";transform:scale(.4);}");
|
|
145
|
+
});
|
|
146
|
+
export var makeNestedMenuStyles = cache(function makeNestedMenuStyles(k, hasIcon, parentPaddingLeft) {
|
|
142
147
|
if (parentPaddingLeft === void 0) {
|
|
143
148
|
parentPaddingLeft = getLeft(menu.item.padding);
|
|
144
149
|
}
|
|
145
150
|
|
|
146
151
|
var paddingLeft = "" + parentPaddingLeft + (hasIcon ? ' + ' + menu.icon.width : '') + " + " + menu.icon.gap;
|
|
147
152
|
return [/*#__PURE__*/css("&.", k, "-menu{width:auto;background:", menu.subBgColor, ";.", k, "-menu-title{padding-left:calc(", paddingLeft, ");}}"), paddingLeft];
|
|
148
|
-
}
|
|
153
|
+
});
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
2
|
+
export declare const makeMessagesStyles: {
|
|
3
|
+
(k: string): string;
|
|
4
|
+
clearCache(): {};
|
|
5
|
+
};
|
|
6
|
+
export declare const makeMessageStyles: {
|
|
7
|
+
(k: string): string;
|
|
8
|
+
clearCache(): {};
|
|
9
|
+
};
|