@king-design/intact 3.1.1 → 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/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/styles.ts +7 -4
- 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/styles.ts +10 -6
- package/components/drawer/styles.ts +4 -2
- package/components/dropdown/styles.ts +7 -4
- 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/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/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/styles.d.ts +8 -2
- package/es/components/collapse/styles.js +7 -4
- 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/styles.d.ts +12 -3
- package/es/components/dialog/styles.js +10 -6
- 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/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/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/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/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 +1 -1
- 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 +22 -0
|
@@ -2,6 +2,7 @@ import {css} from '@emotion/css';
|
|
|
2
2
|
import {theme, setDefault} from '../../styles/theme';
|
|
3
3
|
import {deepDefaults, palette} from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
|
|
6
7
|
const defaults = {
|
|
7
8
|
get transition() { return theme.transition.middle },
|
|
@@ -12,9 +13,10 @@ const defaults = {
|
|
|
12
13
|
let treeSelect: typeof defaults;
|
|
13
14
|
setDefault(() => {
|
|
14
15
|
treeSelect = deepDefaults(theme, {treeSelect: defaults}).treeSelect;
|
|
16
|
+
makeStyles?.clearCache();
|
|
15
17
|
});
|
|
16
18
|
|
|
17
|
-
export function makeStyles(k: string) {
|
|
19
|
+
export const makeStyles = cache(function makeStyles(k: string) {
|
|
18
20
|
return css`
|
|
19
21
|
min-width: auto;
|
|
20
22
|
max-height: ${treeSelect.maxHeight};
|
|
@@ -24,4 +26,4 @@ export function makeStyles(k: string) {
|
|
|
24
26
|
transition: left ${treeSelect.transition}, top ${treeSelect.transition};
|
|
25
27
|
}
|
|
26
28
|
`;
|
|
27
|
-
}
|
|
29
|
+
});
|
|
@@ -2,6 +2,7 @@ import {css} from '@emotion/css';
|
|
|
2
2
|
import {theme, setDefault} from '../../styles/theme';
|
|
3
3
|
import {deepDefaults, palette} from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
|
|
6
7
|
const defaults = {
|
|
7
8
|
get transition() { return theme.transition.middle },
|
|
@@ -75,9 +76,11 @@ const defaults = {
|
|
|
75
76
|
let upload: typeof defaults;
|
|
76
77
|
setDefault(() => {
|
|
77
78
|
upload = deepDefaults(theme, {upload: defaults}).upload;
|
|
79
|
+
makeStyles?.clearCache();
|
|
80
|
+
makeUploadDialogStyles?.clearCache();
|
|
78
81
|
});
|
|
79
82
|
|
|
80
|
-
export function makeStyles(k: string) {
|
|
83
|
+
export const makeStyles = cache(function makeStyles(k: string) {
|
|
81
84
|
return css`
|
|
82
85
|
font-size: ${upload.fontSize};
|
|
83
86
|
position: relative;
|
|
@@ -254,12 +257,12 @@ export function makeStyles(k: string) {
|
|
|
254
257
|
}
|
|
255
258
|
}
|
|
256
259
|
`;
|
|
257
|
-
}
|
|
260
|
+
});
|
|
258
261
|
|
|
259
|
-
export function makeUploadDialogStyles(k: string) {
|
|
262
|
+
export const makeUploadDialogStyles = cache(function makeUploadDialogStyles(k: string) {
|
|
260
263
|
return css`
|
|
261
264
|
img {
|
|
262
265
|
width: 100%;
|
|
263
266
|
}
|
|
264
267
|
`
|
|
265
|
-
}
|
|
268
|
+
});
|
package/components/utils.ts
CHANGED
|
@@ -95,15 +95,21 @@ export function addStyle(style: string | Record<string, string | null> | undefin
|
|
|
95
95
|
return style;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
type CacheArgType = number | string | boolean | undefined;
|
|
99
|
+
type CacheFunction<T extends CacheArgType[]> = (...args: T) => any;
|
|
100
|
+
export function cache<T extends CacheArgType[]>(callback: CacheFunction<T>) {
|
|
101
|
+
let _cache: Record<string, string> = {};
|
|
102
|
+
const fn = function(...args: T) {
|
|
101
103
|
const cacheId = args.join('~');
|
|
102
104
|
if (!hasOwn.call(_cache, cacheId)) {
|
|
103
105
|
_cache[cacheId] = callback(...args);
|
|
104
106
|
}
|
|
105
107
|
return _cache[cacheId];
|
|
106
|
-
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
fn.clearCache = () => _cache = {};
|
|
111
|
+
|
|
112
|
+
return fn;
|
|
107
113
|
}
|
|
108
114
|
const uppercasePattern = /[A-Z]/g;
|
|
109
115
|
export const kebabCase = cache((word: string) => {
|
|
@@ -2,6 +2,7 @@ import {css, keyframes} from '@emotion/css';
|
|
|
2
2
|
import {theme, setDefault} from '../../styles/theme';
|
|
3
3
|
import {deepDefaults, palette} from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
|
|
6
7
|
const defaults = {
|
|
7
8
|
inset: '-3px',
|
|
@@ -10,9 +11,10 @@ const defaults = {
|
|
|
10
11
|
let wave: typeof defaults;
|
|
11
12
|
setDefault(() => {
|
|
12
13
|
wave = deepDefaults(theme, {wave: defaults}).wave;
|
|
14
|
+
makeStyles?.clearCache();
|
|
13
15
|
});
|
|
14
16
|
|
|
15
|
-
export function makeStyles(color: string, inset: string, k: string) {
|
|
17
|
+
export const makeStyles = cache(function makeStyles(color: string, inset: string, k: string) {
|
|
16
18
|
const waveEffect = keyframes`
|
|
17
19
|
100% {
|
|
18
20
|
top: calc(${inset} + ${wave.inset});
|
|
@@ -48,4 +50,4 @@ export function makeStyles(color: string, inset: string, k: string) {
|
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
`;
|
|
51
|
-
}
|
|
53
|
+
});
|
|
@@ -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
|
zIndex: 9
|
|
7
8
|
};
|
|
@@ -10,7 +11,8 @@ setDefault(function () {
|
|
|
10
11
|
affix = deepDefaults(theme, {
|
|
11
12
|
affix: defaults
|
|
12
13
|
}).affix;
|
|
14
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
13
15
|
});
|
|
14
|
-
export function makeStyles(k) {
|
|
16
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
15
17
|
return /*#__PURE__*/css("position:relative;z-index:", affix.zIndex, ";");
|
|
16
|
-
}
|
|
18
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce } from 'intact';
|
|
3
3
|
import { 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,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
|
width: '8px',
|
|
7
8
|
|
|
@@ -20,7 +21,8 @@ setDefault(function () {
|
|
|
20
21
|
badge = deepDefaults(theme, {
|
|
21
22
|
badge: defaults
|
|
22
23
|
}).badge;
|
|
24
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
23
25
|
});
|
|
24
|
-
export
|
|
26
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
25
27
|
return /*#__PURE__*/css("display:inline-block;position:relative;vertical-align:middle;>.", k, "-badge-text{display:inline-block;position:absolute;width:", badge.width, ";height:", badge.height, ";border-radius:50%;top:0;right:0;transform:translate(50%, -50%);background:", badge.bgColor, ";font-size:85%;vertical-align:baseline;}&.", k, "-has-text>.", k, "-badge-text{width:auto;height:", badge.textHeight, ";line-height:", badge.textHeight, ";border-radius:calc(", badge.textHeight, " / 2);padding:0 ", badge.textPadding, ";color:", badge.textColor, ";}&.", k, "-alone>.", k, "-badge-text{position:static;transform:none;}");
|
|
26
|
-
}
|
|
28
|
+
});
|
|
@@ -3,7 +3,7 @@ import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js/instance/spl
|
|
|
3
3
|
import { createElementVNode as _$ce, noop as _$no, className as _$cn, createVNode as _$cv } from 'intact';
|
|
4
4
|
import { getRestProps, mapChildren } from '../utils';
|
|
5
5
|
import { BreadcrumbItem } from './item';
|
|
6
|
-
import makeStyles from './styles';
|
|
6
|
+
import { makeStyles } from './styles';
|
|
7
7
|
export default function ($props, $blocks, $__proto__) {
|
|
8
8
|
var _classNameObj;
|
|
9
9
|
|
|
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
|
|
|
2
2
|
import { deepDefaults } 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
|
fontSize: '14px',
|
|
7
8
|
|
|
@@ -22,7 +23,8 @@ setDefault(function () {
|
|
|
22
23
|
breadcrumb = deepDefaults(theme, {
|
|
23
24
|
breadcrumb: defaults
|
|
24
25
|
}).breadcrumb;
|
|
26
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
25
27
|
});
|
|
26
|
-
export
|
|
28
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
27
29
|
return /*#__PURE__*/css("font-size:", breadcrumb.fontSize, ";display:flex;align-items:center;.", k, "-breadcrumb-item{&:last-of-type .", k, "-breadcrumb-link{font-weight:", breadcrumb.activeFontWeight, ";color:", breadcrumb.activeColor, ";}}.", k, "-breadcrumb-link,.", k, "-breadcrumb-link a{color:", breadcrumb.color, ";}a.", k, "-breadcrumb-link,.", k, "-breadcrumb-link a{cursor:pointer;&:hover{color:", breadcrumb.hoverColor, ";}}.", k, "-breadcrumb-separator{margin:0 ", breadcrumb.gap, ";}");
|
|
28
|
-
}
|
|
30
|
+
});
|
|
@@ -83,5 +83,11 @@ declare const defaults: {
|
|
|
83
83
|
};
|
|
84
84
|
declare let button: typeof defaults;
|
|
85
85
|
export { button };
|
|
86
|
-
export declare
|
|
87
|
-
|
|
86
|
+
export declare const makeButtonStyles: {
|
|
87
|
+
(k: string, iconSide?: string | undefined): string;
|
|
88
|
+
clearCache(): {};
|
|
89
|
+
};
|
|
90
|
+
export declare const makeButtonGroupStyles: {
|
|
91
|
+
(k: string): string;
|
|
92
|
+
clearCache(): {};
|
|
93
|
+
};
|
|
@@ -3,6 +3,7 @@ import { css, cx } from '@emotion/css';
|
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
4
|
import { deepDefaults, palette, getLeft, darken } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
|
+
import { cache } from '../utils';
|
|
6
7
|
export var types = ['primary', 'warning', 'danger', 'active', 'success'];
|
|
7
8
|
var sizes = ['large', 'small', 'mini'];
|
|
8
9
|
var btnStyles = {
|
|
@@ -230,9 +231,11 @@ setDefault(function () {
|
|
|
230
231
|
button = deepDefaults(theme, {
|
|
231
232
|
button: defaults
|
|
232
233
|
}).button;
|
|
234
|
+
makeButtonStyles == null ? void 0 : makeButtonStyles.clearCache();
|
|
235
|
+
makeButtonGroupStyles == null ? void 0 : makeButtonGroupStyles.clearCache();
|
|
233
236
|
});
|
|
234
237
|
export { button };
|
|
235
|
-
export function makeButtonStyles(k, iconSide) {
|
|
238
|
+
export var makeButtonStyles = cache(function makeButtonStyles(k, iconSide) {
|
|
236
239
|
var _button = button,
|
|
237
240
|
secondary = _button.secondary,
|
|
238
241
|
link = _button.link;
|
|
@@ -259,8 +262,8 @@ export function makeButtonStyles(k, iconSide) {
|
|
|
259
262
|
css(".", k, "-icon{", iconSide === 'right' ? "margin-left: " + button.icon.gap + ";" : "margin-right: " + button.icon.gap + ";", ";}", !iconSide && /*#__PURE__*/css("&.", k, "-loading{&:not(.", k, "-btn-icon){padding-left:calc(", getLeft(button.padding), " + 1em);", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
260
263
|
return /*#__PURE__*/css("&.", k, "-", size, "{padding-left:calc(", getLeft(button[size].padding), " + 1em);}");
|
|
261
264
|
}), ";.", k, "-icon-loading{margin-left:-1em;}}}"), ";"));
|
|
262
|
-
}
|
|
263
|
-
export function makeButtonGroupStyles(k) {
|
|
265
|
+
});
|
|
266
|
+
export var makeButtonGroupStyles = cache(function makeButtonGroupStyles(k) {
|
|
264
267
|
return /*#__PURE__*/css("display:inline-flex;align-items:center;flex-wrap:wrap;vertical-align:middle;.", k, "-btn{margin:0;vertical-align:middle;&:hover,&:focus,&.", k, "-active{z-index:1;position:relative;}}&.", k, "-fluid{width:100%;}&:not(.", k, "-vertical){>.", k, "-btn{", _mapInstanceProperty(types).call(types, function (type) {
|
|
265
268
|
if (type === 'active') return;
|
|
266
269
|
var borderColor = button.group[type].borderColor;
|
|
@@ -270,4 +273,4 @@ export function makeButtonGroupStyles(k) {
|
|
|
270
273
|
var borderColor = button.group[type].borderColor;
|
|
271
274
|
return /*#__PURE__*/css("&.", k, "-", type, ":not(:first-child){border-top-color:", borderColor, ";}&.", k, "-", type, ":not(:last-child){border-bottom-color:", borderColor, ";}");
|
|
272
275
|
}), ";&:not(.", k, "-btn-icon){width:100%;}&:not(:first-child){margin-top:-1px;&:not(:last-child){border-radius:0;}}&:not(:only-child):first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;}&:not(:only-child):last-child{border-top-left-radius:0;border-top-right-radius:0;}}}&.", k, "-seperate{gap:8px;>.", k, "-btn{border-radius:", button.borderRadius, "!important;}}");
|
|
273
|
-
}
|
|
276
|
+
});
|
|
@@ -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
|
border: '1px solid #e5e5e5',
|
|
7
8
|
padding: '16px',
|
|
@@ -23,7 +24,8 @@ setDefault(function () {
|
|
|
23
24
|
card = deepDefaults(theme, {
|
|
24
25
|
card: defaults
|
|
25
26
|
}).card;
|
|
27
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
26
28
|
});
|
|
27
|
-
export function makeStyles(k) {
|
|
29
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
28
30
|
return /*#__PURE__*/css("border-radius:", card.borderRadius, ";background:", card.bgColor, ";.", k, "-card-header{height:", card.headerHeight, ";line-height:", card.headerHeight, ";padding:0 ", card.padding, ";}.", k, "-card-title{font-size:", card.headerFontSize, ";display:inline-block;}.", k, "-card-extra{float:right;height:100%;display:flex;align-items:center;}.", k, "-card-body{padding:0 ", card.padding, " ", card.padding, ";}&.", k, "-shadow{box-shadow:", card.boxShadow, ";}&.", k, "-none{box-shadow:none;}&.", k, "-border{border:", card.border, ";.", k, "-card-header{border-bottom:", card.border, ";}.", k, "-card-body{padding-top:", card.padding, ";}}&.", k, "-no-header{.", k, "-card-body{padding-top:", card.padding, ";}}&.", k, "-card-grid{.", k, "-card-body{display:flex;padding:0;}&.", k, "-border{.", k, "-card-column:not(:last-of-type){border-right:", card.border, ";}}}.", k, "-card-column{display:flex;align-items:center;padding:", card.padding, ";&.", k, "-fluid{flex:1;}&.", k, "-center{justify-content:center;}}");
|
|
29
|
-
}
|
|
31
|
+
});
|
|
@@ -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 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 } from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
var defaults = {
|
|
6
7
|
get transition() {
|
|
7
8
|
return theme.transition.large;
|
|
@@ -38,10 +39,12 @@ setDefault(function () {
|
|
|
38
39
|
carousel = deepDefaults(theme, {
|
|
39
40
|
carousel: defaults
|
|
40
41
|
}).carousel;
|
|
42
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
43
|
+
makeItemStyles == null ? void 0 : makeItemStyles.clearCache();
|
|
41
44
|
});
|
|
42
|
-
export function makeStyles(k) {
|
|
45
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
43
46
|
return /*#__PURE__*/css("height:", carousel.height, ";position:relative;overflow:hidden;.", k, "-carousel-indicator{position:absolute;left:50%;transform:translateX(-50%);bottom:", carousel.indicator.bottom, ";}.", k, "-carousel-dot{height:", carousel.indicator.height, ";float:left;margin:", carousel.dot.margin, ";cursor:pointer;padding-top:", carousel.dot.paddingTop, ";&:before{content:'';display:block;width:", carousel.dot.width, ";height:", carousel.dot.height, ";background:", carousel.dot.bgColor, ";opacity:", carousel.dot.opacity, ";transition:width ", carousel.transition, ";}&.", k, "-active:before{opacity:", carousel.dot.active.opacity, ";width:", carousel.dot.active.width, ";}}.", k, "-carousel-btn{position:absolute;background:", carousel.arrow.bgColor, "!important;top:50%;transform:translateY(-50%);color:", carousel.arrow.color, ";opacity:", carousel.arrow.opacity, ";&:hover{color:#fff;opacity:", carousel.arrow.hoverOpacity, "!important;background:", carousel.arrow.bgColor, ";}&.", k, "-prev{left:", carousel.arrow.left, ";}&.", k, "-next{right:", carousel.arrow.right, ";}}&.", k, "-hover{.", k, "-carousel-btn{opacity:0;}&:hover{.", k, "-carousel-btn{opacity:", carousel.arrow.opacity, ";}}}&.", k, "-never{.", k, "-carousel-btn{display:none;}}&.", k, "-slide{.", k, "-carousel-wrapper{transition:transform ", carousel.transition, ";white-space:nowrap;}}&.", k, "-stop{.", k, "-carousel-wrapper{transition:none;}}&.", k, "-fade{.", k, "-carousel-item{position:absolute;}}");
|
|
44
|
-
}
|
|
45
|
-
export function makeItemStyles(k) {
|
|
47
|
+
});
|
|
48
|
+
export var makeItemStyles = cache(function makeItemStyles(k) {
|
|
46
49
|
return /*#__PURE__*/css("display:inline-block;width:100%;height:100%;&.", k, "-carousel-fade-enter-active,&.", k, "-carousel-fade-leave-active{transition:opacity ", carousel.transition, ";}&.", k, "-carousel-fade-enter-from,&.", k, "-carousel-fade-leave-to{opacity:0;}");
|
|
47
|
-
}
|
|
50
|
+
});
|
|
@@ -18,7 +18,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
18
18
|
data = _this$get.data,
|
|
19
19
|
trigger = _this$get.trigger,
|
|
20
20
|
filterable = _this$get.filterable,
|
|
21
|
-
fields = _this$get.fields
|
|
21
|
+
fields = _this$get.fields,
|
|
22
|
+
multiple = _this$get.multiple;
|
|
22
23
|
|
|
23
24
|
var k = this.config.k;
|
|
24
25
|
var baseMenuStyles = makeMenuStyles(k);
|
|
@@ -57,6 +58,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
57
58
|
'disabled': getField(item, 'disabled'),
|
|
58
59
|
'className': _$cn((_$cn2 = {}, _$cn2[k + "-cascader-option"] = true, _$cn2[k + "-active"] = showed, _$cn2[k + "-selected"] = selected, _$cn2)),
|
|
59
60
|
'ev-select': onSelect.bind(null, value, level),
|
|
61
|
+
'hideOnSelect': !multiple,
|
|
60
62
|
'children': [getField(item, 'label'), children ? _$cc(Icon, {
|
|
61
63
|
'className': _$cn(k + "-cascader-arrow " + k + "-icon-right")
|
|
62
64
|
}) : undefined]
|
|
@@ -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 makeFilterMenuStyles: {
|
|
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
|
width: '140px',
|
|
8
9
|
height: '160px',
|
|
@@ -41,10 +42,12 @@ setDefault(function () {
|
|
|
41
42
|
cascader = deepDefaults(theme, {
|
|
42
43
|
cascader: defaults
|
|
43
44
|
}).cascader;
|
|
45
|
+
makeMenuStyles == null ? void 0 : makeMenuStyles.clearCache();
|
|
46
|
+
makeFilterMenuStyles == null ? void 0 : makeFilterMenuStyles.clearCache();
|
|
44
47
|
});
|
|
45
|
-
export function makeMenuStyles(k) {
|
|
48
|
+
export var makeMenuStyles = cache(function makeMenuStyles(k) {
|
|
46
49
|
return /*#__PURE__*/css("min-width:", cascader.width, "!important;height:", cascader.height, ";overflow:auto;.", k, "-cascader-arrow{float:right;height:100%;margin-left:", cascader.arrowGap, ";line-height:inherit;}.", k, "-cascader-loading{display:block;text-align:center;margin-top:", cascader.loadingGap, ";}.", k, "-cascader-empty{padding:", cascader.empty.padding, ";color:", cascader.empty.color, ";text-align:center;}.", k, "-cascader-option{&.", k, "-selected{color:", cascader.selectedColor, ";}&.", k, "-active{background:", cascader.activeBgColor, ";}}");
|
|
47
|
-
}
|
|
48
|
-
export function makeFilterMenuStyles(k) {
|
|
50
|
+
});
|
|
51
|
+
export var makeFilterMenuStyles = cache(function makeFilterMenuStyles(k) {
|
|
49
52
|
return /*#__PURE__*/css("min-width:", _filterInstanceProperty(cascader).minWidth, "!important;height:auto;max-height:", _filterInstanceProperty(cascader).maxHeight, ";em{font-style:normal;color:", _filterInstanceProperty(cascader).highlightColor, ";}");
|
|
50
|
-
}
|
|
53
|
+
});
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/object
|
|
|
3
3
|
var _excluded = ["className", "disabled", "falseValue", "children", "value", "trueValue", "style", "indeterminate", "title"];
|
|
4
4
|
import { createVNode as _$cv, className as _$cn, createUnknownComponentVNode as _$cc, createElementVNode as _$ce } from 'intact';
|
|
5
5
|
import { getRestProps } from '../utils';
|
|
6
|
-
import makeStyles from './styles';
|
|
6
|
+
import { makeStyles } from './styles';
|
|
7
7
|
import { Wave } from '../wave';
|
|
8
8
|
export default function ($props, $blocks, $__proto__) {
|
|
9
9
|
var _classNameObj;
|
|
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
|
|
|
2
2
|
import { theme, setDefault } from '../../styles/theme';
|
|
3
3
|
import { deepDefaults, palette } from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
var defaults = {
|
|
6
7
|
width: '16px',
|
|
7
8
|
|
|
@@ -76,7 +77,8 @@ setDefault(function () {
|
|
|
76
77
|
checkbox = deepDefaults(theme, {
|
|
77
78
|
checkbox: defaults
|
|
78
79
|
}).checkbox;
|
|
80
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
79
81
|
});
|
|
80
|
-
export
|
|
82
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
81
83
|
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.", k, "-checkbox-wrapper{width:", checkbox.width, ";height:", checkbox.width, ";border:1px solid ", checkbox.borderColor, ";border-radius:", checkbox.borderRadius, ";position:relative;transition:all ", checkbox.transition, ";background:", checkbox.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", checkbox.inner.width, ";height:", checkbox.inner.height, ";top:", checkbox.inner.top, ";left:", checkbox.inner.left, ";border:", checkbox.inner.border, ";border-top:0;border-left:0;transform:rotate(45deg) scale(0);transition:all ", checkbox.transition, ";}}&:hover{.", k, "-checkbox-wrapper{border:", checkbox.hoverBorder, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;left:0;top:0;margin:0;}.", k, "-checkbox-text{margin-left:", checkbox.text.gap, ";flex:0 1 auto;}&.", k, "-checked,&.", k, "-indeterminate{.", k, "-checkbox-wrapper{border-color:", checkbox.checked.borderColor, ";background:", checkbox.checked.bgColor, ";}}&.", k, "-indeterminate{.", k, "-checkbox-wrapper{&:before{transform:rotate(90deg) scale(1);border-bottom:0;}}}&.", k, "-checked{.", k, "-checkbox-wrapper{&:before{transform:rotate(45deg) scale(1);}}}&:focus{outline:none;.", k, "-checkbox-wrapper{border-color:", checkbox.checked.borderColor, ";}}&.", k, "-disabled{color:", checkbox.disabled.color, ";cursor:not-allowed;.", k, "-checkbox-wrapper{border-color:", checkbox.disabled.borderColor, ";background:", checkbox.disabled.bgColor, ";&:before{border-color:", checkbox.disabled.innerColor, ";}}input{cursor:not-allowed;}&.", k, "-checked,&.", k, "-indeterminate{.", k, "-checkbox-wrapper{border-color:", checkbox.disabled.checked.borderColor, ";background:", checkbox.disabled.checked.bgColor, ";}}}");
|
|
82
|
-
}
|
|
84
|
+
});
|
|
@@ -2,7 +2,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
2
2
|
|
|
3
3
|
import { css } from '@emotion/css';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
-
|
|
5
|
+
import { cache } from '../utils';
|
|
6
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
6
7
|
return /*#__PURE__*/css(process.env.NODE_ENV === "production" ? {
|
|
7
8
|
name: "1wv4onu",
|
|
8
9
|
styles: "position:relative;height:100%"
|
|
@@ -11,4 +12,4 @@ export function makeStyles(k) {
|
|
|
11
12
|
styles: "position:relative;height:100%",
|
|
12
13
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
13
14
|
});
|
|
14
|
-
}
|
|
15
|
+
});
|
|
@@ -16,7 +16,7 @@ describe('Collapse', function () {
|
|
|
16
16
|
case 0:
|
|
17
17
|
this.timeout(0);
|
|
18
18
|
_mount = mount(BasicDemo), instance = _mount[0], element = _mount[1];
|
|
19
|
-
_element$querySelecto = element.querySelectorAll(':scope > .k-collapse-title'), title1 = _element$querySelecto[0], title2 = _element$querySelecto[1], title3 = _element$querySelecto[2];
|
|
19
|
+
_element$querySelecto = element.querySelectorAll(':scope > .k-collapse-item > .k-collapse-title'), title1 = _element$querySelecto[0], title2 = _element$querySelecto[1], title3 = _element$querySelecto[2];
|
|
20
20
|
title2.click();
|
|
21
21
|
_context.next = 6;
|
|
22
22
|
return wait(500);
|
|
@@ -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 makeItemStyles: {
|
|
7
|
+
(k: string): string;
|
|
8
|
+
clearCache(): {};
|
|
9
|
+
};
|
|
@@ -2,6 +2,7 @@ import { deepDefaults } from '../../styles/utils';
|
|
|
2
2
|
import { theme, setDefault } from '../../styles/theme';
|
|
3
3
|
import { css } from '@emotion/css';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
var defaults = {
|
|
6
7
|
get transition() {
|
|
7
8
|
return theme.transition.large;
|
|
@@ -26,11 +27,13 @@ setDefault(function () {
|
|
|
26
27
|
collapse = deepDefaults(theme, {
|
|
27
28
|
collapse: defaults
|
|
28
29
|
}).collapse;
|
|
30
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
31
|
+
makeItemStyles == null ? void 0 : makeItemStyles.clearCache();
|
|
29
32
|
});
|
|
30
|
-
export function makeStyles(k) {
|
|
33
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
31
34
|
return /*#__PURE__*/css("font-size:", collapse.fontSize, ";&.", k, "-left{.", k, "-collapse-arrow{float:left;margin-right:", collapse.titleMarginRight, ";}}&.", k, "-border{border-radius:", collapse.borderRadius, ";padding:", collapse.borderPadding, ";border:", collapse.collBorder, ";}");
|
|
32
|
-
}
|
|
33
|
-
export function makeItemStyles(k) {
|
|
35
|
+
});
|
|
36
|
+
export var makeItemStyles = cache(function makeItemStyles(k) {
|
|
34
37
|
var collapseItem = collapse.item;
|
|
35
38
|
return /*#__PURE__*/css("border-bottom:", collapseItem.borderBottom, ";&:last-of-type{border-bottom-color:transparent;}>.", k, "-collapse-title{cursor:pointer;font-weight:bold;height:", collapseItem.titleHeight, ";line-height:", collapseItem.titleHeight, ";transition:color ", collapse.transition, ";.", k, "-collapse-arrow{float:right;transition:transform ", collapse.transition, ";line-height:", collapseItem.titleHeight, ";height:", collapseItem.titleHeight, ";}}&:not(.", k, "-disabled){>.", k, "-collapse-title{&:hover{color:", theme.color.primary, ";}}}&.", k, "-active{>.", k, "-collapse-title .", k, "-collapse-arrow{transform:rotate(90deg);}}&.", k, "-disabled{color:", theme.color.disabledBorder, ";>.", k, "-collapse-title{cursor:not-allowed;}}");
|
|
36
|
-
}
|
|
39
|
+
});
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
2
|
import { ColorFormats } from 'tinycolor2';
|
|
3
|
-
export declare
|
|
4
|
-
|
|
3
|
+
export declare const makeStyles: {
|
|
4
|
+
(k: string): string;
|
|
5
|
+
clearCache(): {};
|
|
6
|
+
};
|
|
7
|
+
export declare const makePanelStyles: {
|
|
8
|
+
(k: string): string;
|
|
9
|
+
clearCache(): {};
|
|
10
|
+
};
|
|
5
11
|
export declare function makeAlphaBgColor({ r, g, b }: ColorFormats.RGBA, k: string): string;
|
|
@@ -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
|
get height() {
|
|
8
9
|
return theme.default.height;
|
|
@@ -114,17 +115,19 @@ setDefault(function () {
|
|
|
114
115
|
colorpicker = deepDefaults(theme, {
|
|
115
116
|
colorpicker: defaults
|
|
116
117
|
}).colorpicker;
|
|
118
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
119
|
+
makePanelStyles == null ? void 0 : makePanelStyles.clearCache();
|
|
117
120
|
});
|
|
118
121
|
var _sizes = ['large', 'small', 'mini'];
|
|
119
|
-
export function makeStyles(k) {
|
|
122
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
120
123
|
return /*#__PURE__*/css("display:inline-block;vertical-align:middle;.", k, "-colorpicker-color{height:", colorpicker.height, ";width:", colorpicker.width, ";border:", colorpicker.border, ";cursor:", colorpicker.cursor, ";border-radius:", colorpicker.borderRadius, ";background:", colorpicker.bgColor, ";padding:", colorpicker.padding, ";}.", k, "-colorpicker-inner{border-radius:", colorpicker.innerBorderRadius, ";height:100%;}", _mapInstanceProperty(_sizes).call(_sizes, function (size) {
|
|
121
124
|
var styles = colorpicker[size];
|
|
122
125
|
return /*#__PURE__*/css("&.", k, "-", size, "{.", k, "-colorpicker-color{height:", styles.height, ";width:", styles.width, ";", styles.padding && "padding: " + styles.padding, ";}}");
|
|
123
126
|
}), "&.", k, "-disabled{.", k, "-colorpicker-color{background:", colorpicker.disabled.bgColor, ";border-color:", colorpicker.disabled.borderColor, ";cursor:", colorpicker.disabled.cursor, ";}}");
|
|
124
|
-
}
|
|
125
|
-
export function makePanelStyles(k) {
|
|
127
|
+
});
|
|
128
|
+
export var makePanelStyles = cache(function makePanelStyles(k) {
|
|
126
129
|
return /*#__PURE__*/css("padding:", colorpicker.panel.padding, ";width:", colorpicker.panel.width, ";.", k, "-colorpicker-saturation{height:", colorpicker.panel.saturationHeight, ";position:relative;overflow:hidden;user-select:none;}.", k, "-colorpicker-white,.", k, "-colorpicker-black{position:absolute;width:100%;height:100%;}.", k, "-colorpicker-white{background:linear-gradient(90deg, #fff, rgba(255, 255, 255, 0));}.", k, "-colorpicker-black{background:linear-gradient(0, #000, rgba(0, 0, 0, 0));}.", k, "-colorpicker-pointer{position:absolute;}.", k, "-colorpicker-circle{width:", colorpicker.panel.circle.width, ";height:", colorpicker.panel.circle.width, ";box-shadow:", colorpicker.panel.circle.boxShadow, ";border-radius:50%;transform:translate(-50%, -50%);}.", k, "-colorpicker-controls{display:flex;margin-top:", colorpicker.panel.gutter, ";}.", k, "-colorpicker-sliders{flex:1;.", k, "-slider{margin-bottom:", colorpicker.panel.gutter, ";}.", k, "-slider-track-wrapper,.", k, "-slider-track{height:", colorpicker.slider.height, ";}.", k, "-slider-track-wrapper{cursor:", colorpicker.slider.cursor, ";}.", k, "-slider-track{border-radius:", colorpicker.slider.borderRadius, ";margin:0 calc(", colorpicker.slider.thumb.width, " / 2 + 1px);background-color:transparent;}.", k, "-slider-bar{background:transparent;}.", k, "-slider-thumb{height:", colorpicker.slider.thumb.height, ";width:", colorpicker.slider.thumb.width, ";border:", colorpicker.slider.thumb.border, ";border-radius:", colorpicker.slider.thumb.borderRadius, ";box-shadow:", colorpicker.slider.thumb.boxShadow, ";&:focus,&:hover{transform:", colorpicker.slider.thumb.hover.transform, ";cursor:", colorpicker.slider.thumb.hover.cursor, ";background-color:", colorpicker.slider.thumb.hover.bgColor, ";}}}.", k, "-colorpicker-hue{.", k, "-slider-track-wrapper{background:linear-gradient(90deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red);}}.", k, "-colorpicker-alpha{background-size:contain;}.", k, "-colorpicker-alpha-bg{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMElEQVQ4T2N89uzZfwY8QFJSEp80A+OoAcMiDP7//483HTx//hx/Ohg1gIFx6IcBALl+VXknOCvFAAAAAElFTkSuQmCC\");}.", k, "-colorpicker-color-wrapper{width:", colorpicker.color.width, ";height:", colorpicker.color.height, ";border-radius:", colorpicker.color.borderRadius, ";margin-left:", colorpicker.panel.gutter, ";overflow:hidden;}.", k, "-colorpicker-color{height:100%;box-shadow:", colorpicker.color.boxShadow, ";}.", k, "-colorpicker-input.", k, "-small{.", k, "-input-inner{height:", colorpicker.input.height, ";line-height:", colorpicker.input.height, ";padding:", colorpicker.input.padding, ";font-size:", colorpicker.panel.fontSize, ";}}.", k, "-colorpicker-text{text-align:center;font-size:", colorpicker.panel.fontSize, ";padding:", colorpicker.input.textPadding, ";}.", k, "-colorpicker-presets{border-top:", colorpicker.presets.delimiter, ";margin:0 -", colorpicker.panel.padding, ";overflow:hidden;}.", k, "-colorpicker-preset-color-wrapper{float:left;border-radius:", colorpicker.presets.borderRadius, ";cursor:pointer;overflow:hidden;margin:", colorpicker.panel.padding, " 0 0 ", colorpicker.panel.padding, ";}.", k, "-colorpicker-preset-color{width:", colorpicker.presets.width, ";height:", colorpicker.presets.height, ";box-shadow:", colorpicker.presets.boxShadow, ";}.", k, "-colorpicker-drag{cursor:ew-resize;user-select:none;}");
|
|
127
|
-
}
|
|
130
|
+
});
|
|
128
131
|
export function makeAlphaBgColor(_ref, k) {
|
|
129
132
|
var r = _ref.r,
|
|
130
133
|
g = _ref.g,
|
|
@@ -2,7 +2,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
2
2
|
|
|
3
3
|
import { css } from '@emotion/css';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
-
|
|
5
|
+
import { cache } from '../utils';
|
|
6
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
6
7
|
return /*#__PURE__*/css(process.env.NODE_ENV === "production" ? {
|
|
7
8
|
name: "t3aops",
|
|
8
9
|
styles: "cursor:pointer;vertical-align:middle"
|
|
@@ -11,4 +12,4 @@ export function makeStyles(k) {
|
|
|
11
12
|
styles: "cursor:pointer;vertical-align:middle",
|
|
12
13
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
13
14
|
});
|
|
14
|
-
}
|
|
15
|
+
});
|
|
@@ -46,6 +46,15 @@ declare const defaults: {
|
|
|
46
46
|
};
|
|
47
47
|
declare let datepicker: typeof defaults;
|
|
48
48
|
export { datepicker };
|
|
49
|
-
export declare
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
export declare const makePanelStyles: {
|
|
50
|
+
(k: string): string;
|
|
51
|
+
clearCache(): {};
|
|
52
|
+
};
|
|
53
|
+
export declare const makeCalendarStyles: {
|
|
54
|
+
(k: string): string;
|
|
55
|
+
clearCache(): {};
|
|
56
|
+
};
|
|
57
|
+
export declare const makeTimeStyles: {
|
|
58
|
+
(k: string): string;
|
|
59
|
+
clearCache(): {};
|
|
60
|
+
};
|