@king-design/intact 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.
- package/components/affix/styles.ts +4 -2
- package/components/badge/index.vdt +1 -1
- package/components/badge/styles.ts +4 -3
- package/components/breadcrumb/index.vdt +1 -1
- package/components/breadcrumb/styles.ts +4 -2
- package/components/button/styles.ts +7 -5
- package/components/card/styles.ts +4 -2
- package/components/carousel/styles.ts +7 -4
- package/components/cascader/index.vdt +2 -1
- package/components/cascader/styles.ts +7 -4
- package/components/checkbox/index.vdt +1 -1
- package/components/checkbox/styles.ts +4 -2
- package/components/code/styles.ts +3 -2
- package/components/collapse/index.spec.ts +1 -1
- package/components/collapse/item.vdt +1 -1
- package/components/collapse/styles.ts +16 -12
- package/components/colorpicker/styles.ts +7 -4
- package/components/copy/styles.ts +3 -2
- package/components/datepicker/styles.ts +10 -6
- package/components/diagram/styles.ts +3 -2
- package/components/dialog/index.spec.ts +30 -0
- package/components/dialog/styles.ts +10 -6
- package/components/dialog/usePosition.ts +4 -0
- package/components/drawer/styles.ts +4 -2
- package/components/dropdown/styles.ts +7 -4
- package/components/dropdown/usePosition.ts +19 -9
- package/components/editable/styles.ts +4 -2
- package/components/form/styles.ts +7 -4
- package/components/grid/styles.ts +12 -9
- package/components/icon/index.vdt +1 -1
- package/components/icon/styles.ts +4 -2
- package/components/input/styles.ts +8 -5
- package/components/layout/styles.ts +13 -9
- package/components/menu/demos/recursive.md +340 -0
- package/components/menu/styles.ts +21 -16
- package/components/message/styles.ts +7 -5
- package/components/pagination/styles.ts +4 -2
- package/components/popover/content.vdt +1 -1
- package/components/popover/styles.ts +4 -2
- package/components/portal.ts +16 -3
- package/components/progress/styles.ts +4 -4
- package/components/radio/styles.ts +4 -2
- package/components/rate/styles.ts +4 -2
- package/components/scrollSelect/styles.ts +4 -2
- package/components/select/base.ts +3 -2
- package/components/select/base.vdt +1 -1
- package/components/select/styles.ts +10 -6
- package/components/skeleton/styles.ts +7 -4
- package/components/slider/styles.ts +4 -2
- package/components/spin/styles.ts +4 -4
- package/components/spinner/styles.ts +4 -3
- package/components/split/styles.ts +4 -2
- package/components/steps/index.vdt +2 -2
- package/components/steps/styles.ts +7 -5
- package/components/switch/styles.ts +4 -2
- package/components/table/column.ts +2 -0
- package/components/table/column.vdt +7 -3
- package/components/table/demos/basic.md +2 -2
- package/components/table/demos/fixColumn.md +3 -1
- package/components/table/demos/groupHeader.md +11 -11
- package/components/table/demos/scheme.md +1 -1
- package/components/table/index.spec.ts +8 -3
- package/components/table/styles.ts +11 -8
- package/components/table/table.vdt +3 -4
- package/components/table/useColumns.ts +1 -0
- package/components/table/useFixedColumns.ts +27 -49
- package/components/table/useGroup.ts +5 -0
- package/components/table/useResizable.ts +38 -10
- package/components/table/useWidth.ts +3 -0
- package/components/tabs/styles.ts +4 -2
- package/components/tag/styles.ts +7 -4
- package/components/timeline/styles.ts +7 -5
- package/components/timepicker/styles.ts +4 -2
- package/components/tip/styles.ts +4 -2
- package/components/tooltip/content.vdt +1 -1
- package/components/tooltip/styles.ts +4 -2
- package/components/transfer/styles.ts +4 -2
- package/components/tree/demos/checkbox.md +1 -0
- package/components/tree/demos/contextmenu.md +10 -1
- package/components/tree/index.spec.ts +7 -0
- package/components/tree/styles.ts +4 -2
- package/components/tree/useChecked.ts +3 -0
- package/components/treeSelect/styles.ts +4 -2
- package/components/upload/styles.ts +7 -4
- package/components/upload/useFiles.ts +3 -2
- package/components/utils.ts +10 -4
- package/components/wave/styles.ts +4 -2
- package/es/components/affix/styles.d.ts +4 -1
- package/es/components/affix/styles.js +4 -2
- package/es/components/badge/index.vdt.js +1 -1
- package/es/components/badge/styles.d.ts +4 -1
- package/es/components/badge/styles.js +4 -2
- package/es/components/breadcrumb/index.vdt.js +1 -1
- package/es/components/breadcrumb/styles.d.ts +4 -1
- package/es/components/breadcrumb/styles.js +4 -2
- package/es/components/button/styles.d.ts +8 -2
- package/es/components/button/styles.js +7 -4
- package/es/components/card/styles.d.ts +4 -1
- package/es/components/card/styles.js +4 -2
- package/es/components/carousel/styles.d.ts +8 -2
- package/es/components/carousel/styles.js +7 -4
- package/es/components/cascader/index.vdt.js +3 -1
- package/es/components/cascader/styles.d.ts +8 -2
- package/es/components/cascader/styles.js +7 -4
- package/es/components/checkbox/index.vdt.js +1 -1
- package/es/components/checkbox/styles.d.ts +4 -1
- package/es/components/checkbox/styles.js +4 -2
- package/es/components/code/styles.d.ts +4 -1
- package/es/components/code/styles.js +3 -2
- package/es/components/collapse/index.spec.js +1 -1
- package/es/components/collapse/item.vdt.js +3 -3
- package/es/components/collapse/styles.d.ts +8 -2
- package/es/components/collapse/styles.js +11 -8
- package/es/components/colorpicker/styles.d.ts +8 -2
- package/es/components/colorpicker/styles.js +7 -4
- package/es/components/copy/styles.d.ts +4 -1
- package/es/components/copy/styles.js +3 -2
- package/es/components/datepicker/styles.d.ts +12 -3
- package/es/components/datepicker/styles.js +10 -6
- package/es/components/diagram/styles.d.ts +4 -1
- package/es/components/diagram/styles.js +3 -2
- package/es/components/dialog/index.spec.js +61 -1
- package/es/components/dialog/styles.d.ts +12 -3
- package/es/components/dialog/styles.js +10 -6
- package/es/components/dialog/usePosition.js +7 -0
- package/es/components/drawer/styles.d.ts +4 -1
- package/es/components/drawer/styles.js +4 -2
- package/es/components/dropdown/styles.d.ts +8 -2
- package/es/components/dropdown/styles.js +7 -4
- package/es/components/dropdown/usePosition.js +14 -11
- package/es/components/editable/styles.d.ts +4 -1
- package/es/components/editable/styles.js +4 -2
- package/es/components/form/styles.d.ts +8 -2
- package/es/components/form/styles.js +7 -4
- package/es/components/grid/styles.d.ts +8 -2
- package/es/components/grid/styles.js +12 -13
- package/es/components/icon/index.vdt.js +1 -1
- package/es/components/icon/styles.d.ts +4 -1
- package/es/components/icon/styles.js +4 -2
- package/es/components/input/styles.d.ts +8 -2
- package/es/components/input/styles.js +7 -4
- package/es/components/layout/styles.d.ts +16 -4
- package/es/components/layout/styles.js +13 -8
- package/es/components/menu/styles.d.ts +16 -4
- package/es/components/menu/styles.js +14 -9
- package/es/components/message/styles.d.ts +8 -2
- package/es/components/message/styles.js +7 -4
- package/es/components/pagination/styles.d.ts +4 -1
- package/es/components/pagination/styles.js +4 -2
- package/es/components/popover/content.vdt.js +1 -1
- package/es/components/popover/styles.d.ts +4 -1
- package/es/components/popover/styles.js +4 -2
- package/es/components/portal.js +15 -3
- package/es/components/progress/styles.d.ts +4 -1
- package/es/components/progress/styles.js +4 -2
- package/es/components/radio/styles.d.ts +4 -1
- package/es/components/radio/styles.js +4 -2
- package/es/components/rate/styles.d.ts +4 -1
- package/es/components/rate/styles.js +4 -2
- package/es/components/scrollSelect/styles.d.ts +4 -1
- package/es/components/scrollSelect/styles.js +4 -2
- package/es/components/select/base.js +3 -1
- package/es/components/select/base.vdt.js +1 -1
- package/es/components/select/styles.d.ts +12 -3
- package/es/components/select/styles.js +10 -6
- package/es/components/skeleton/styles.d.ts +8 -2
- package/es/components/skeleton/styles.js +7 -4
- package/es/components/slider/styles.d.ts +4 -1
- package/es/components/slider/styles.js +4 -2
- package/es/components/spin/styles.d.ts +4 -1
- package/es/components/spin/styles.js +4 -2
- package/es/components/spinner/styles.d.ts +4 -1
- package/es/components/spinner/styles.js +4 -2
- package/es/components/split/styles.d.ts +4 -1
- package/es/components/split/styles.js +4 -2
- package/es/components/steps/index.vdt.js +2 -2
- package/es/components/steps/styles.d.ts +4 -3
- package/es/components/steps/styles.js +9 -4
- package/es/components/switch/styles.d.ts +4 -1
- package/es/components/switch/styles.js +4 -2
- package/es/components/table/column.d.ts +1 -0
- package/es/components/table/column.js +2 -1
- package/es/components/table/column.vdt.js +9 -3
- package/es/components/table/index.spec.js +18 -11
- package/es/components/table/styles.d.ts +8 -2
- package/es/components/table/styles.js +8 -5
- package/es/components/table/table.vdt.js +3 -4
- package/es/components/table/useColumns.js +1 -0
- package/es/components/table/useFixedColumns.d.ts +3 -3
- package/es/components/table/useFixedColumns.js +27 -46
- package/es/components/table/useGroup.d.ts +1 -0
- package/es/components/table/useGroup.js +11 -1
- package/es/components/table/useResizable.js +41 -5
- package/es/components/table/useWidth.js +3 -0
- package/es/components/tabs/styles.d.ts +4 -1
- package/es/components/tabs/styles.js +4 -2
- package/es/components/tag/styles.d.ts +8 -2
- package/es/components/tag/styles.js +7 -4
- package/es/components/timeline/styles.d.ts +8 -2
- package/es/components/timeline/styles.js +7 -5
- package/es/components/timepicker/styles.d.ts +4 -1
- package/es/components/timepicker/styles.js +4 -2
- package/es/components/tip/styles.d.ts +4 -1
- package/es/components/tip/styles.js +4 -2
- package/es/components/tooltip/content.vdt.js +1 -1
- package/es/components/tooltip/styles.d.ts +4 -1
- package/es/components/tooltip/styles.js +4 -2
- package/es/components/transfer/styles.d.ts +4 -1
- package/es/components/transfer/styles.js +4 -2
- package/es/components/tree/index.spec.js +13 -1
- package/es/components/tree/styles.d.ts +4 -1
- package/es/components/tree/styles.js +4 -2
- package/es/components/tree/useChecked.js +4 -0
- package/es/components/treeSelect/styles.d.ts +4 -1
- package/es/components/treeSelect/styles.js +4 -2
- package/es/components/upload/styles.d.ts +8 -2
- package/es/components/upload/styles.js +7 -4
- package/es/components/upload/useFiles.js +3 -2
- package/es/components/utils.d.ts +10 -2
- package/es/components/utils.js +9 -2
- package/es/components/wave/styles.d.ts +4 -1
- package/es/components/wave/styles.js +4 -2
- package/es/i18n/en-US.d.ts +1 -0
- package/es/i18n/en-US.js +1 -0
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/packages/kpc-react/__tests__/components/cascader.spec.js +0 -1
- package/es/site/data/components/menu/demos/recursive/index.d.ts +29 -0
- package/es/site/data/components/menu/demos/recursive/index.js +57 -0
- package/es/site/data/components/menu/demos/recursive/react.d.ts +2 -0
- package/es/site/data/components/menu/demos/recursive/react.js +69 -0
- package/es/site/data/components/table/demos/basic/react.js +4 -2
- package/es/site/data/components/table/demos/fixColumn/react.js +2 -1
- package/es/site/data/components/table/demos/groupHeader/react.js +11 -20
- package/es/site/data/components/table/demos/scheme/react.js +2 -1
- package/es/site/data/components/tree/demos/checkbox/index.d.ts +12 -2
- package/es/site/data/components/tree/demos/checkbox/index.js +1 -0
- package/es/site/data/components/tree/demos/checkbox/react.d.ts +12 -2
- package/es/site/data/components/tree/demos/checkbox/react.js +1 -0
- package/es/site/data/components/tree/demos/contextmenu/index.d.ts +1 -0
- package/es/site/data/components/tree/demos/contextmenu/index.js +1 -0
- package/es/site/data/components/tree/demos/contextmenu/react.d.ts +1 -0
- package/es/site/data/components/tree/demos/contextmenu/react.js +1 -0
- package/es/site/src/components/article/index.js +6 -2
- package/es/styles/fonts/iconfont.d.ts +4 -1
- package/es/styles/fonts/iconfont.js +1 -1
- package/es/styles/global.js +7 -2
- package/i18n/en-US.ts +1 -0
- package/index.ts +2 -2
- package/package.json +3 -3
- package/styles/fonts/iconfont.ts +2 -2
- package/styles/global.ts +32 -0
|
@@ -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';
|
|
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
|
+
};
|
|
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
|
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
4
|
import { deepDefaults, palette } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
|
+
import { cache } from '../utils';
|
|
6
7
|
var defaults = {
|
|
7
8
|
get transition() {
|
|
8
9
|
return theme.transition.middle;
|
|
@@ -50,15 +51,17 @@ setDefault(function () {
|
|
|
50
51
|
message = deepDefaults(theme, {
|
|
51
52
|
message: defaults
|
|
52
53
|
}).message;
|
|
54
|
+
makeMessagesStyles == null ? void 0 : makeMessagesStyles.clearCache();
|
|
55
|
+
makeMessageStyles == null ? void 0 : makeMessageStyles.clearCache();
|
|
53
56
|
});
|
|
54
|
-
export function makeMessagesStyles(k) {
|
|
57
|
+
export var makeMessagesStyles = cache(function makeMessagesStyles(k) {
|
|
55
58
|
return /*#__PURE__*/css("position:fixed;top:", message.top, ";left:", message.left, ";width:100%;pointer-events:none;z-index:", theme.maxZIndex + 1, ";");
|
|
56
|
-
}
|
|
57
|
-
export function makeMessageStyles(k) {
|
|
59
|
+
});
|
|
60
|
+
export var makeMessageStyles = cache(function makeMessageStyles(k) {
|
|
58
61
|
var _context;
|
|
59
62
|
|
|
60
63
|
return /*#__PURE__*/css("text-align:center;width:100%;font-size:", message.fontSize, ";color:", message.color, ";.", k, "-message-container{display:inline-block;box-shadow:", message.boxShadow, ";border-radius:", message.borderRadius, ";margin-bottom:", message.gap, ";pointer-events:all;min-width:", message.minWidth, ";max-width:", message.maxWidth, ";position:relative;text-align:", message.textAlign, ";min-height:", message.minHeight, ";}.", k, "-message-wrapper{position:relative;display:inline-block;&.", k, "-with-icon{padding-left:calc(", message.icon.left, " + 14px);}}.", k, "-message-content{display:inline-block;padding:", message.padding, ";vertical-align:middle;word-break:break-word;word-wrap:break-word;}.", k, "-message-close{vertical-align:middle;position:absolute;right:0;top:0;&:hover{background:none;}}.", k, "-message-icon{position:absolute;left:", message.icon.left, ";top:", message.icon.top, ";font-size:", message.icon.fontSize, ";}", _mapInstanceProperty(_context = ['info', 'error', 'success', 'warning']).call(_context, function (type) {
|
|
61
64
|
var color = theme.color[type === 'error' ? 'danger' : type];
|
|
62
65
|
return /*#__PURE__*/css("&.", k, "-", type, "{.", k, "-message-container{background:", palette(color, -4), ";}.", k, "-message-icon{color:", color, ";}}");
|
|
63
66
|
}), "&.transition-enter-from,&.transition-leave-to{opacity:0;transform:", message.transform, ";}&.transition-enter-active,&.transition-leave-active{transition:transform ", message.transition, ",opacity ", message.transition, ";}&.transition-move{transition:transform ", message.transition, ";}");
|
|
64
|
-
}
|
|
67
|
+
});
|
|
@@ -4,6 +4,7 @@ import { theme, setDefault } from '../../styles/theme';
|
|
|
4
4
|
import { deepDefaults } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
6
|
import { button } from '../button/styles';
|
|
7
|
+
import { cache } from '../utils';
|
|
7
8
|
var btnGapMap = {
|
|
8
9
|
large: '8px',
|
|
9
10
|
small: '4px',
|
|
@@ -59,11 +60,12 @@ setDefault(function () {
|
|
|
59
60
|
pagination = deepDefaults(theme, {
|
|
60
61
|
pagination: defaults
|
|
61
62
|
}).pagination;
|
|
63
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
62
64
|
});
|
|
63
|
-
export function makeStyles(k) {
|
|
65
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
64
66
|
return /*#__PURE__*/css("font-size:", pagination.fontSize, ";>*{display:inline-block;vertical-align:middle;&:not(:first-child){margin-left:", pagination.gap, ";}}.", k, "-pagination-ellipsis{background-color:transparent;border-color:transparent;}.", k, "-btns{.", k, "-btn{width:auto!important;min-width:", button.height, ";padding:", pagination.btn.padding, ";margin-right:", pagination.btn.gap, ";border-radius:", pagination.btn.borderRadius, "!important;&:last-of-type{margin:0!important;}}.", k, "-icon{font-size:18px;}}.", k, "-pagination-goto{.", k, "-input{font-size:inherit;width:", pagination.goto.width, ";margin:", pagination.goto.gap, ";}.", k, "-input-inner{text-align:center;}}.", k, "-select{width:auto;}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
65
67
|
var styles = pagination[size];
|
|
66
68
|
var btnStyles = button[size];
|
|
67
69
|
return /*#__PURE__*/css("&.", k, "-", size, "{font-size:", styles.fontSize, ";.", k, "-btn{margin-right:", styles.btnGap, ";min-width:", btnStyles.height, ";.", k, "-icon{font-size:", styles.iconFontSize, ";}}}");
|
|
68
70
|
}), "&.", k, "-flat{.", k, "-select{&,&:hover,&.", k, "-show{border-color:transparent;}}}&.", k, "-simple{.", k, "-btn{margin:0;}.", k, "-input-inner{text-align:center;}.", k, "-pagination-text{vertical-align:middle;}}");
|
|
69
|
-
}
|
|
71
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { superCall as _$su, className as _$cn, extend as _$ex, EMPTY_OBJ as _$em, createElementVNode as _$ce, createUnknownComponentVNode as _$cc, noop as _$no } from 'intact';
|
|
2
2
|
import { Icon } from '../icon';
|
|
3
|
-
import makeStyles from "./styles";
|
|
3
|
+
import { makeStyles } from "./styles";
|
|
4
4
|
export default function ($props, $blocks, $__proto__) {
|
|
5
5
|
var _classNameObj;
|
|
6
6
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { css } from '@emotion/css';
|
|
2
2
|
import { theme, setDefault } from '../../styles/theme';
|
|
3
3
|
import { deepDefaults } from '../../styles/utils';
|
|
4
|
+
import { cache } from '../utils';
|
|
4
5
|
var defaults = {
|
|
5
6
|
width: '320px',
|
|
6
7
|
padding: '8px 16px',
|
|
@@ -19,7 +20,8 @@ setDefault(function () {
|
|
|
19
20
|
popover = deepDefaults(theme, {
|
|
20
21
|
popover: defaults
|
|
21
22
|
}).popover;
|
|
23
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
22
24
|
});
|
|
23
|
-
export
|
|
25
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
24
26
|
return /*#__PURE__*/css("&.", k, "-tooltip-content.", k, "-popover{width:", popover.width, ";padding:", popover.padding, ";.", k, "-popover-title{display:flex;align-items:center;font-size:", popover.title.fontSize, ";line-height:", popover.title.lineHeight, ";font-weight:", popover.title.fontWeight, ";}.", k, "-popover-icon{margin-right:", popover.gap, ";}.", k, "-popover-content{margin-top:", popover.gap, ";}.", k, "-tooltip-footer{text-align:right;}&.", k, "-small{padding:", popover.padding, ";width:", popover.small.width, ";}}");
|
|
25
|
-
}
|
|
27
|
+
});
|
package/es/components/portal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
2
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
-
import { Component, createCommentVNode, createTextVNode, mount, patch, remove, inject } from 'intact';
|
|
3
|
+
import { Component, createCommentVNode, createTextVNode, mount, patch, remove, inject, unmount, removeVNodeDom } from 'intact';
|
|
4
4
|
import { isString } from 'intact-shared';
|
|
5
5
|
import { DIALOG } from './dialog/constants';
|
|
6
6
|
import { BaseDialog } from './dialog/base';
|
|
@@ -51,7 +51,9 @@ export var Portal = /*#__PURE__*/function (_Component) {
|
|
|
51
51
|
var nextProps = nextVNode.props;
|
|
52
52
|
var fakeContainer = document.createDocumentFragment();
|
|
53
53
|
(mountedQueue.priority || mountedQueue).push(function () {
|
|
54
|
-
var parentDom = _this2.$lastInput.dom.parentElement;
|
|
54
|
+
var parentDom = _this2.$lastInput.dom.parentElement; // maybe the <!-- portal --> has been removed by react, #938
|
|
55
|
+
|
|
56
|
+
if (!parentDom) return;
|
|
55
57
|
|
|
56
58
|
_this2.initContainer(nextProps.container, parentDom, anchor);
|
|
57
59
|
|
|
@@ -97,7 +99,14 @@ export var Portal = /*#__PURE__*/function (_Component) {
|
|
|
97
99
|
};
|
|
98
100
|
|
|
99
101
|
_proto.$unmount = function $unmount(vNode, nextVNode) {
|
|
100
|
-
|
|
102
|
+
var children = vNode.props.children;
|
|
103
|
+
unmount(children, null);
|
|
104
|
+
|
|
105
|
+
if (this.container) {
|
|
106
|
+
// maybe the <!-- portal --> has been removed by react, #938
|
|
107
|
+
// remove(children, this.container, false);
|
|
108
|
+
removeVNodeDom(children, this.container);
|
|
109
|
+
}
|
|
101
110
|
|
|
102
111
|
_Component.prototype.$unmount.call(this, vNode, nextVNode);
|
|
103
112
|
};
|
|
@@ -109,6 +118,9 @@ export var Portal = /*#__PURE__*/function (_Component) {
|
|
|
109
118
|
} else {
|
|
110
119
|
this.container = container(parentDom, anchor);
|
|
111
120
|
}
|
|
121
|
+
} else {
|
|
122
|
+
// let below logic to set container to default if container does not exist.
|
|
123
|
+
this.container = null;
|
|
112
124
|
}
|
|
113
125
|
|
|
114
126
|
if (!this.container) {
|
|
@@ -6,6 +6,7 @@ import { css, keyframes } from '@emotion/css';
|
|
|
6
6
|
import { theme, setDefault } from '../../styles/theme';
|
|
7
7
|
import { deepDefaults } from '../../styles/utils';
|
|
8
8
|
import '../../styles/global';
|
|
9
|
+
import { cache } from '../utils';
|
|
9
10
|
export var types = ['active', 'normal', 'error', 'success', 'warning'];
|
|
10
11
|
var sizes = ['small', 'mini'];
|
|
11
12
|
var progressBarAnimation = /*#__PURE__*/keyframes(process.env.NODE_ENV === "production" ? {
|
|
@@ -81,12 +82,13 @@ setDefault(function () {
|
|
|
81
82
|
progress = deepDefaults(theme, {
|
|
82
83
|
progress: defaults
|
|
83
84
|
}).progress;
|
|
85
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
84
86
|
});
|
|
85
|
-
export function makeStyles(k) {
|
|
87
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
86
88
|
return /*#__PURE__*/css("position:relative;line-height:1;&.", k, "-bar{display:flex;align-items:center;.", k, "-progress-container{height:", progress.bar.height, ";border-radius:", progress.bar.height, ";background-color:", progress.stokeColor.color, ";overflow:hidden;position:relative;vertical-align:middle;font-size:", progress.bar.innerText.fontSize, ";flex:1;}.", k, "-progress-content{position:relative;left:0;top:0;white-space:nowrap;width:100%;height:100%;border-radius:", progress.bar.height, ";}.", k, "-progress-bg{background-color:", progress.stokeColor.normal, ";height:100%;border-radius:", progress.bar.height, ";transition:", progress.animation.transition, ";position:relative;}.", k, "-progress-inner-text{display:inline-block;vertical-align:top;color:#ffffff;line-height:", progress.bar.height, ";width:100%;text-align:right;padding:", progress.bar.innerText.padding, ";}&.", k, "-success{.", k, "-progress-bg{background:", progress.stokeColor.success, ";}}&.", k, "-error{.", k, "-progress-bg{background:", progress.stokeColor.error, ";}}&.", k, "-warning{.", k, "-progress-bg{background:", progress.stokeColor.warning, ";}}&.", k, "-active{.", k, "-progress-bg{&:before{content:\"\";position:absolute;top:0;bottom:0;right:0;left:0;background-color:#fff;animation:", progressBarAnimation, " 2s ease infinite;border-radius:", progress.bar.height, ";}}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
87
89
|
return /*#__PURE__*/css("&.", k, "-", size, "{font-size:", progress.bar[size].fontSize, ";.", k, "-progress-container{height:", progress.bar[size].height, ";}}");
|
|
88
90
|
}), " .", k, "-progress-text{margin-left:", progress.bar.textMarginLeft, ";width:", progress.bar.textWidth, ";line-height:", progress.bar.outerText.height, ";height:", progress.bar.outerText.height, ";}}&.", k, "-circle{width:", progress.circle.width, ";height:", progress.circle.width, ";font-size:", progress.circle.fontSize, ";", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
89
91
|
var styles = progress.circle[size];
|
|
90
92
|
return /*#__PURE__*/css("&.", k, "-", size, "{width:", styles.width, ";height:", styles.width, ";font-size:", styles.fontSize, ";.", k, "-progress-icon{font-size:", styles.iconFontSize, ";}}");
|
|
91
93
|
}), ";.", k, "-progress-canvas{transform:rotate(-90deg);}.", k, "-progress-meter,.", k, "-progress-value,.", k, "-progress-animate{fill:none;}.", k, "-progress-meter{stroke:", progress.stokeColor.color, ";}.", k, "-progress-value{stroke:", progress.stokeColor.normal, ";stroke-linecap:round;transition:", progress.animation.transition, ";}.", k, "-progress-animate{stroke:#fff;stroke-linecap:round;}.", k, "-progress-text{position:absolute;top:50%;text-align:center;width:100%;transform:translateY(-50%);}.", k, "-progress-icon{font-size:", progress.circle.iconFontSize, ";}&.", k, "-success{.", k, "-progress-value{stroke:", progress.stokeColor.success, ";}}&.", k, "-error{.", k, "-progress-value{stroke:", progress.stokeColor.error, ";}}&.", k, "-warning{.", k, "-progress-value{stroke:", progress.stokeColor.warning, ";}}}");
|
|
92
|
-
}
|
|
94
|
+
});
|
|
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
|
|
|
2
2
|
import { deepDefaults, palette } from '../../styles/utils';
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
var defaults = {
|
|
6
7
|
width: '16px',
|
|
7
8
|
|
|
@@ -59,7 +60,8 @@ setDefault(function () {
|
|
|
59
60
|
radio = deepDefaults(theme, {
|
|
60
61
|
radio: defaults
|
|
61
62
|
}).radio;
|
|
63
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
62
64
|
});
|
|
63
|
-
export function makeStyles(k) {
|
|
65
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
64
66
|
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.", k, "-radio-wrapper{width:", radio.width, ";height:", radio.width, ";border:1px solid ", radio.borderColor, ";border-radius:50%;transition:all ", radio.transition, ";position:relative;background:", radio.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", radio.innerWidth, ";height:", radio.innerWidth, ";top:50%;left:50%;margin-left:calc(-", radio.innerWidth, " / 2);margin-top:calc(-", radio.innerWidth, " / 2);border-radius:50%;background-color:", radio.checkedColor, ";transform:scale(0);transition:all ", radio.transition, ";}}&:hover{.", k, "-radio-wrapper{border:1px solid ", radio.hoverBorderColor, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;}.", k, "-radio-text{margin-left:", radio.textGap, ";flex:0 1 auto;}&.", k, "-checked{.", k, "-radio-wrapper{border-color:", radio.checkedColor, ";&:before{transform:scale(1);}}}&:focus{outline:none;.", k, "-radio-wrapper{border-color:", radio.checkedColor, ";}}&.", k, "-disabled{color:", radio.disabled.color, ";cursor:not-allowed;.", k, "-radio-wrapper{border-color:", radio.disabled.borderColor, ";background:", radio.disabled.bgColor, ";}input{cursor:not-allowed;}&.", k, "-checked{.", k, "-radio-wrapper{border-color:", radio.disabled.checked.borderColor, ";background:", radio.disabled.checked.bgColor, ";&:before{background:", radio.disabled.checked.innerColor, ";}}}}");
|
|
65
|
-
}
|
|
67
|
+
});
|
|
@@ -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
|
color: '#ccc',
|
|
7
8
|
|
|
@@ -24,7 +25,8 @@ setDefault(function () {
|
|
|
24
25
|
rate = deepDefaults(theme, {
|
|
25
26
|
rate: defaults
|
|
26
27
|
}).rate;
|
|
28
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
27
29
|
});
|
|
28
|
-
export function makeStyles(k) {
|
|
30
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
29
31
|
return /*#__PURE__*/css("display:inline-block;.", k, "-rate-item{display:inline-block;margin-right:", rate.item.gap, ";cursor:pointer;position:relative;color:", rate.color, ";transition:all ", rate.transition, ";&:hover{transform:", rate.item.hoverTransform, ";}&.", k, "-full{color:", rate.activeColor, ";}&.", k, "-half{.", k, "-rate-first{color:", rate.activeColor, ";}}}.", k, "-rate-first{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;}.", k, "-icon{font-size:", rate.iconFontSize, ";color:inherit;}&.", k, "-disabled{.", k, "-rate-item{cursor:default;&:hover{transform:none;}}}");
|
|
30
|
-
}
|
|
32
|
+
});
|