@king-design/react 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/__tests__/__snapshots__/React Demos.md +9 -3
- package/components/affix/styles.d.ts +4 -1
- package/components/affix/styles.js +4 -2
- package/components/badge/index.vdt.js +1 -1
- package/components/badge/styles.d.ts +4 -1
- package/components/badge/styles.js +4 -2
- package/components/breadcrumb/index.vdt.js +1 -1
- package/components/breadcrumb/styles.d.ts +4 -1
- package/components/breadcrumb/styles.js +4 -2
- package/components/button/styles.d.ts +8 -2
- package/components/button/styles.js +7 -4
- package/components/card/styles.d.ts +4 -1
- package/components/card/styles.js +4 -2
- package/components/carousel/styles.d.ts +8 -2
- package/components/carousel/styles.js +7 -4
- package/components/cascader/index.vdt.js +3 -1
- package/components/cascader/styles.d.ts +8 -2
- package/components/cascader/styles.js +7 -4
- package/components/checkbox/index.vdt.js +1 -1
- package/components/checkbox/styles.d.ts +4 -1
- package/components/checkbox/styles.js +4 -2
- package/components/code/styles.d.ts +4 -1
- package/components/code/styles.js +3 -2
- package/components/collapse/index.spec.js +1 -1
- package/components/collapse/styles.d.ts +8 -2
- package/components/collapse/styles.js +7 -4
- package/components/colorpicker/styles.d.ts +8 -2
- package/components/colorpicker/styles.js +7 -4
- package/components/copy/styles.d.ts +4 -1
- package/components/copy/styles.js +3 -2
- package/components/datepicker/styles.d.ts +12 -3
- package/components/datepicker/styles.js +10 -6
- package/components/diagram/styles.d.ts +4 -1
- package/components/diagram/styles.js +3 -2
- package/components/dialog/styles.d.ts +12 -3
- package/components/dialog/styles.js +10 -6
- package/components/drawer/styles.d.ts +4 -1
- package/components/drawer/styles.js +4 -2
- package/components/dropdown/styles.d.ts +8 -2
- package/components/dropdown/styles.js +7 -4
- package/components/editable/styles.d.ts +4 -1
- package/components/editable/styles.js +4 -2
- package/components/form/styles.d.ts +8 -2
- package/components/form/styles.js +7 -4
- package/components/grid/styles.d.ts +8 -2
- package/components/grid/styles.js +12 -13
- package/components/icon/index.vdt.js +1 -1
- package/components/icon/styles.d.ts +4 -1
- package/components/icon/styles.js +4 -2
- package/components/input/styles.d.ts +8 -2
- package/components/input/styles.js +7 -4
- package/components/layout/styles.d.ts +16 -4
- package/components/layout/styles.js +13 -8
- package/components/menu/styles.d.ts +16 -4
- package/components/menu/styles.js +14 -9
- package/components/message/styles.d.ts +8 -2
- package/components/message/styles.js +7 -4
- package/components/pagination/styles.d.ts +4 -1
- package/components/pagination/styles.js +4 -2
- package/components/popover/content.vdt.js +1 -1
- package/components/popover/styles.d.ts +4 -1
- package/components/popover/styles.js +4 -2
- package/components/progress/styles.d.ts +4 -1
- package/components/progress/styles.js +4 -2
- package/components/radio/styles.d.ts +4 -1
- package/components/radio/styles.js +4 -2
- package/components/rate/styles.d.ts +4 -1
- package/components/rate/styles.js +4 -2
- package/components/scrollSelect/styles.d.ts +4 -1
- package/components/scrollSelect/styles.js +4 -2
- package/components/select/base.js +3 -1
- package/components/select/base.vdt.js +1 -1
- package/components/select/styles.d.ts +12 -3
- package/components/select/styles.js +10 -6
- package/components/skeleton/styles.d.ts +8 -2
- package/components/skeleton/styles.js +7 -4
- package/components/slider/styles.d.ts +4 -1
- package/components/slider/styles.js +4 -2
- package/components/spin/styles.d.ts +4 -1
- package/components/spin/styles.js +4 -2
- package/components/spinner/styles.d.ts +4 -1
- package/components/spinner/styles.js +4 -2
- package/components/split/styles.d.ts +4 -1
- package/components/split/styles.js +4 -2
- package/components/steps/index.vdt.js +2 -2
- package/components/steps/styles.d.ts +4 -3
- package/components/steps/styles.js +9 -4
- package/components/switch/styles.d.ts +4 -1
- package/components/switch/styles.js +4 -2
- package/components/table/column.d.ts +1 -0
- package/components/table/column.js +2 -1
- package/components/table/column.vdt.js +9 -3
- package/components/table/index.spec.js +18 -11
- package/components/table/styles.d.ts +8 -2
- package/components/table/styles.js +8 -5
- package/components/table/table.vdt.js +3 -4
- package/components/table/useColumns.js +1 -0
- package/components/table/useFixedColumns.d.ts +3 -3
- package/components/table/useFixedColumns.js +27 -46
- package/components/table/useGroup.d.ts +1 -0
- package/components/table/useGroup.js +11 -1
- package/components/table/useResizable.js +41 -5
- package/components/table/useWidth.js +3 -0
- package/components/tabs/styles.d.ts +4 -1
- package/components/tabs/styles.js +4 -2
- package/components/tag/styles.d.ts +8 -2
- package/components/tag/styles.js +7 -4
- package/components/timeline/styles.d.ts +8 -2
- package/components/timeline/styles.js +7 -5
- package/components/timepicker/styles.d.ts +4 -1
- package/components/timepicker/styles.js +4 -2
- package/components/tip/styles.d.ts +4 -1
- package/components/tip/styles.js +4 -2
- package/components/tooltip/content.vdt.js +1 -1
- package/components/tooltip/styles.d.ts +4 -1
- package/components/tooltip/styles.js +4 -2
- package/components/transfer/styles.d.ts +4 -1
- package/components/transfer/styles.js +4 -2
- package/components/tree/index.spec.js +13 -1
- package/components/tree/styles.d.ts +4 -1
- package/components/tree/styles.js +4 -2
- package/components/tree/useChecked.js +4 -0
- package/components/treeSelect/styles.d.ts +4 -1
- package/components/treeSelect/styles.js +4 -2
- package/components/upload/styles.d.ts +8 -2
- package/components/upload/styles.js +7 -4
- package/components/utils.d.ts +10 -2
- package/components/utils.js +9 -2
- package/components/wave/styles.d.ts +4 -1
- package/components/wave/styles.js +4 -2
- package/i18n/en-US.d.ts +1 -0
- package/i18n/en-US.js +1 -0
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +2 -2
- package/styles/fonts/iconfont.d.ts +4 -1
- package/styles/fonts/iconfont.js +1 -1
- package/styles/global.js +1 -1
- package/yarn-error.log +205 -221
|
@@ -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
|
+
};
|
|
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
|
|
|
2
2
|
import { theme, setDefault } from '../../styles/theme';
|
|
3
3
|
import { deepDefaults, palette } from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
var defaults = {
|
|
6
7
|
width: "300px",
|
|
7
8
|
padding: "16px 16px 4px",
|
|
@@ -77,14 +78,17 @@ setDefault(function () {
|
|
|
77
78
|
datepicker = deepDefaults(theme, {
|
|
78
79
|
datepicker: defaults
|
|
79
80
|
}).datepicker;
|
|
81
|
+
makePanelStyles == null ? void 0 : makePanelStyles.clearCache();
|
|
82
|
+
makeCalendarStyles == null ? void 0 : makeCalendarStyles.clearCache();
|
|
83
|
+
makeTimeStyles == null ? void 0 : makeTimeStyles.clearCache();
|
|
80
84
|
});
|
|
81
85
|
export { datepicker };
|
|
82
|
-
export function makePanelStyles(k) {
|
|
86
|
+
export var makePanelStyles = cache(function makePanelStyles(k) {
|
|
83
87
|
return /*#__PURE__*/css("display:flex;.", k, "-datepicker-shortcuts{width:", datepicker.shortcuts.width, ";padding:", datepicker.shortcuts.padding, ";border-right:", datepicker.border, ";}.", k, "-datepicker-shortcut{height:", datepicker.shortcuts.shortcut.height, ";line-height:", datepicker.shortcuts.shortcut.height, ";padding:", datepicker.shortcuts.shortcut.padding, ";cursor:pointer;&:hover{background:", datepicker.shortcuts.shortcut.hoverBgcolor, ";}}.", k, "-datepicker-calendars{display:flex;}.", k, "-datepicker-calendar-wrapper{&:nth-child(2){border-left:", datepicker.border, ";}.", k, "-tabs{border:none;.", k, "-tabs-wrapper{float:none;}.", k, "-tab{width:50%;}}}.", k, "-datepicker-footer{border-top:", datepicker.border, ";padding:", datepicker.footer.padding, ";text-align:right;}");
|
|
84
|
-
}
|
|
85
|
-
export function makeCalendarStyles(k) {
|
|
88
|
+
});
|
|
89
|
+
export var makeCalendarStyles = cache(function makeCalendarStyles(k) {
|
|
86
90
|
return /*#__PURE__*/css("padding:", datepicker.padding, ";width:", datepicker.width, ";position:relative;.", k, "-datepicker-month{display:flex;padding:", datepicker.month.padding, ";}.", k, "-prev .", k, "-icon,.", k, "-next .", k, "-icon{margin:0 -5px!important;}.", k, "-month-values{flex:1;font-size:14px;text-align:center;cursor:pointer;overflow:hidden;position:relative;}.", k, "-month-value{margin:0 ", datepicker.month.valueGap, ";line-height:", theme.small.height, ";&:hover{color:", theme.color.primary, ";}},.", k, "-weekdays{display:flex;border-bottom:", datepicker.border, ";padding:", datepicker.weekday.padding, ";}.", k, "-weekday{flex:1;text-align:center;}.", k, "-calendar-item{text-align:center;margin:", datepicker.item.gutter, ";aspect-ratio:1;display:flex;align-items:center;cursor:pointer;position:relative;border-radius:", datepicker.item.borderRadius, ";.", k, "-value{border-radius:", datepicker.item.borderRadius, ";}&.", k, "-hover{background:", datepicker.item.hoverBgColor, ";}&.", k, "-exceed{color:", datepicker.item.exceedColor, ";}&.", k, "-today .", k, "-value{border:", datepicker.item.todayBorder, ";}&.", k, "-active{background:", datepicker.item.active.bgColor, ";color:", datepicker.item.active.color, ";&.", k, "-today .", k, "-value{border-color:", datepicker.item.active.todayBorderColor, ";}}&.", k, "-disabled{color:", datepicker.item.disabled.color, ";cursor:not-allowed;background:", datepicker.item.disabled.hoverBgColor, ";}&.", k, "-in-range:after{content:'';display:block;position:absolute;box-sizing:content-box;background:", datepicker.item.range.bgColor, ";width:100%;height:100%;left:-", datepicker.item.gutter, ";padding:0 ", datepicker.item.gutter, ";z-index:-1;}.", k, "-value{flex:1;display:flex;align-items:center;justify-content:center;height:100%;}}.", k, "-days{display:grid;grid-template-columns:repeat(7, 1fr);}.", k, "-years{display:grid;grid-template-columns:repeat(4, 1fr);}");
|
|
87
|
-
}
|
|
88
|
-
export function makeTimeStyles(k) {
|
|
91
|
+
});
|
|
92
|
+
export var makeTimeStyles = cache(function makeTimeStyles(k) {
|
|
89
93
|
return /*#__PURE__*/css("display:flex;padding:", datepicker.padding, ";width:", datepicker.width, ";position:relative;.", k, "-scroll-select{flex:1;height:305px;}");
|
|
90
|
-
}
|
|
94
|
+
});
|
|
@@ -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: "ohhwil",
|
|
8
9
|
styles: "display:inline-block;overflow:auto;.mxRubberband{position:absolute;overflow:hidden;border-style:solid;border-width:1px;border-color:#0000ff;background:#0077ff;}.mxCellEditor{background:url(\"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7\");border-color:transparent;border-style:solid;display:inline-block;position:absolute;overflow:visible;word-wrap:normal;border-width:0;min-width:1px;resize:none;padding:0;margin:0;}.mxPlainTextEditor{padding:0;margin:0;}"
|
|
@@ -11,4 +12,4 @@ export function makeStyles(k) {
|
|
|
11
12
|
styles: "display:inline-block;overflow:auto;.mxRubberband{position:absolute;overflow:hidden;border-style:solid;border-width:1px;border-color:#0000ff;background:#0077ff;}.mxCellEditor{background:url(\"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7\");border-color:transparent;border-style:solid;display:inline-block;position:absolute;overflow:visible;word-wrap:normal;border-width:0;min-width:1px;resize:none;padding:0;margin:0;}.mxPlainTextEditor{padding:0;margin:0;}",
|
|
12
13
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
13
14
|
});
|
|
14
|
-
}
|
|
15
|
+
});
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare const makeDialogStyles: {
|
|
3
|
+
(k: string): string;
|
|
4
|
+
clearCache(): {};
|
|
5
|
+
};
|
|
6
|
+
export declare const makeWrapperStyles: {
|
|
7
|
+
(k: string): string;
|
|
8
|
+
clearCache(): {};
|
|
9
|
+
};
|
|
10
|
+
export declare const makeAlertStyles: {
|
|
11
|
+
(k: string): string;
|
|
12
|
+
clearCache(): {};
|
|
13
|
+
};
|
|
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
|
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
4
|
import { deepDefaults } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
|
+
import { cache } from '../utils';
|
|
6
7
|
var defaults = {
|
|
7
8
|
width: '800px',
|
|
8
9
|
bgColor: '#fff',
|
|
@@ -81,24 +82,27 @@ setDefault(function () {
|
|
|
81
82
|
dialog = deepDefaults(theme, {
|
|
82
83
|
dialog: defaults
|
|
83
84
|
}).dialog;
|
|
85
|
+
makeDialogStyles == null ? void 0 : makeDialogStyles.clearCache();
|
|
86
|
+
makeWrapperStyles == null ? void 0 : makeWrapperStyles.clearCache();
|
|
87
|
+
makeAlertStyles == null ? void 0 : makeAlertStyles.clearCache();
|
|
84
88
|
});
|
|
85
|
-
export function makeDialogStyles(k) {
|
|
89
|
+
export var makeDialogStyles = cache(function makeDialogStyles(k) {
|
|
86
90
|
var _context;
|
|
87
91
|
|
|
88
92
|
return /*#__PURE__*/css("position:absolute;width:", dialog.width, ";border-radius:", dialog.borderRadius, ";background:", dialog.bgColor, ";font-size:", dialog.fontSize, ";color:", dialog.color, ";box-shadow:", dialog.boxShadow, ";max-width:100%;z-index:", theme.maxZIndex, ";&.", k, "-dragging{cursor:move;user-select:none;}&.transition-enter-active,&.transition-leave-active,&.transition-appear-active{transition:all ", dialog.transition, ";}&.transition-enter-from,&.transition-leave-to,&.transition-appear-from{transform:", dialog.transform, ";opacity:0;}", _mapInstanceProperty(_context = ['large', 'small', 'mini']).call(_context, function (size) {
|
|
89
93
|
return /*#__PURE__*/css("&.", k, "-", size, "{width:", dialog[size + "Width"], ";}");
|
|
90
94
|
}), ".", k, "-dialog-header{padding:0 ", dialog.padding, ";margin:", dialog.margin, ";border-bottom:", dialog.header.border, ";height:", dialog.header.height, ";line-height:", dialog.header.height, ";font-size:", dialog.header.fontSize, ";color:", dialog.header.color, ";position:relative;font-weight:", dialog.header.fontWeight, ";}.", k, "-dialog-title{display:inline-block;}.", k, "-dialog-close{position:absolute;right:", dialog.header.closeRight, ";top:", dialog.header.closeTop, ";.", k, "-icon{font-size:", dialog.header.closeIconFontSize, ";}}.", k, "-dialog-body{padding:", dialog.body.padding, ";position:relative;}.", k, "-dialog-footer{text-align:right;padding:", dialog.footer.padding, ";margin:", dialog.margin, ";border-top:", dialog.footer.border, ";.", k, "-btn{margin-left:", dialog.footer.btnGap, ";}}");
|
|
91
|
-
}
|
|
92
|
-
export function makeWrapperStyles(k) {
|
|
95
|
+
});
|
|
96
|
+
export var makeWrapperStyles = cache(function makeWrapperStyles(k) {
|
|
93
97
|
//.${k}-fade-leave-active will add position absolute to the styles
|
|
94
98
|
// so we must set fixed with important to .${k}-dialog-overlay
|
|
95
99
|
return /*#__PURE__*/css("position:absolute;z-index:", theme.maxZIndex, ";top:0;left:0;width:100%;.", k, "-dialog-overlay{position:fixed!important;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, .5);overflow:auto;}");
|
|
96
|
-
}
|
|
97
|
-
export function makeAlertStyles(k) {
|
|
100
|
+
});
|
|
101
|
+
export var makeAlertStyles = cache(function makeAlertStyles(k) {
|
|
98
102
|
var _context2;
|
|
99
103
|
|
|
100
104
|
return /*#__PURE__*/css("&.", k, "-alert-dialog{.", k, "-dialog-body{margin-top:", dialog.alert.bodyMarginTop, ";padding:", dialog.alert.padding, ";text-align:center;z-index:1;}.", k, "-dialog-header,.", k, "-dialog-footer{border:none;}.", k, "-dialog-tip-icon{margin-bottom:", dialog.alert.tipIconMarginBottom, ";.", k, "-icon{font-size:", dialog.alert.tipIconFontSize, ";line-height:", dialog.alert.tipIconLineHeight, ";}}", _mapInstanceProperty(_context2 = ['success', 'warning', 'error', 'confirm']).call(_context2, function (type) {
|
|
101
105
|
var color = type === 'error' ? theme.color.danger : type === 'confirm' ? theme.color.primary : theme.color[type];
|
|
102
106
|
return /*#__PURE__*/css("&.", k, "-", type, "{.", k, "-dialog-tip-icon{color:", color, ";}}");
|
|
103
107
|
}), " &:not(.", k, "-confirm){.", k, "-dialog-cancel{display:none;}}&.", k, "-with-title{.", k, "-dialog-body{margin-top:", dialog.alert.titleBodyMarginTop, ";text-align:left;}.", k, "-dialog-tip-icon{float:left;.", k, "-icon{font-size:", dialog.alert.titleTipIconFontSize, ";}}.", k, "-alert-dialog-wrapper{overflow:hidden;padding-left:", dialog.alert.wrapperPaddingLeft, ";}.", k, "-alert-dialog-title{line-height:", dialog.alert.tipIconLineHeight, ";font-size:", dialog.alert.titleFontSize, ";font-weight:", dialog.alert.titleFontWeight, ";}}}");
|
|
104
|
-
}
|
|
108
|
+
});
|
|
@@ -2,5 +2,8 @@ import '../../styles/global';
|
|
|
2
2
|
declare type ValueOf<T extends readonly any[]> = T[number];
|
|
3
3
|
export declare type Placement = ValueOf<typeof placements>;
|
|
4
4
|
export declare const placements: readonly ["top", "right", "bottom", "left"];
|
|
5
|
-
export declare
|
|
5
|
+
export declare const makeStyles: {
|
|
6
|
+
(overlay: boolean, k: string): string;
|
|
7
|
+
clearCache(): {};
|
|
8
|
+
};
|
|
6
9
|
export {};
|
|
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
|
|
|
2
2
|
import { theme, setDefault } from '../../styles/theme';
|
|
3
3
|
import { deepDefaults } from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
export var placements = ['top', 'right', 'bottom', 'left'];
|
|
6
7
|
var defaults = {
|
|
7
8
|
get transition() {
|
|
@@ -18,11 +19,12 @@ setDefault(function () {
|
|
|
18
19
|
drawer = deepDefaults(theme, {
|
|
19
20
|
drawer: defaults
|
|
20
21
|
}).drawer;
|
|
22
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
21
23
|
});
|
|
22
|
-
export function makeStyles(overlay, k) {
|
|
24
|
+
export var makeStyles = cache(function makeStyles(overlay, k) {
|
|
23
25
|
var borderRadius = theme.largeBorderRadius;
|
|
24
26
|
return /*#__PURE__*/css("&.k-drawer{position:fixed;background:transparent;box-shadow:none;border-radius:0;}&.transition-enter-active,&.transition-leave-active,&.transition-appear-active{transition:opacity ", drawer.transition, "!important;overflow:hidden;.", k, "-drawer-content{transition:transform ", drawer.transition, ";}}.", k, "-drawer-content{height:100%;display:flex;background:#fff;flex-direction:column;transform:translateX(0);box-shadow:", drawer.boxShadow, ";.", k, "-dialog-body{flex-grow:1;overflow:auto;}}", makePlacementStyles(k, 'right', "right: 0; height: 100%;", "translateX(100%)", borderRadius + " 0 0 " + borderRadius), " ", makePlacementStyles(k, 'left', 'left: 0; height: 100%;', "translateX(-100%)", "0 " + borderRadius + " " + borderRadius + " 0"), " ", makePlacementStyles(k, 'top', 'left: 50%; top: 0; transform: translateX(-50%);', "translateY(-100%)", "0 0 " + borderRadius + " " + borderRadius), " ", makePlacementStyles(k, 'bottom', 'left: 50%; bottom: 0; transform: translateX(-50%);', "translateY(100%)", "0 " + borderRadius + " " + borderRadius + " 0"), " &.", k, "-top,&.", k, "-bottom{width:100%;}");
|
|
25
|
-
}
|
|
27
|
+
});
|
|
26
28
|
|
|
27
29
|
function makePlacementStyles(k, placement, styles, transform, borderRadius) {
|
|
28
30
|
return /*#__PURE__*/css("&.", k, "-drawer.", k, "-", placement, "{", styles, " &.transition-enter-from,&.transition-leave-to,&.transition-appear-from{.", k, "-drawer-content{transform:", transform, ";}}.", k, "-drawer-content{border-radius:", borderRadius, ";}}");
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
2
|
+
export declare const makeMenuStyles: {
|
|
3
|
+
(k: string): string;
|
|
4
|
+
clearCache(): {};
|
|
5
|
+
};
|
|
6
|
+
export declare const makeItemStyles: {
|
|
7
|
+
(k: string): string;
|
|
8
|
+
clearCache(): {};
|
|
9
|
+
};
|
|
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
|
|
|
2
2
|
import { theme, setDefault } from '../../styles/theme';
|
|
3
3
|
import { deepDefaults, getLeft, getRight } from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
var defaults = {
|
|
6
7
|
item: {
|
|
7
8
|
get height() {
|
|
@@ -47,10 +48,12 @@ setDefault(function () {
|
|
|
47
48
|
dropdown = deepDefaults(theme, {
|
|
48
49
|
dropdown: defaults
|
|
49
50
|
}).dropdown;
|
|
51
|
+
makeMenuStyles == null ? void 0 : makeMenuStyles.clearCache();
|
|
52
|
+
makeItemStyles == null ? void 0 : makeItemStyles.clearCache();
|
|
50
53
|
});
|
|
51
|
-
export function makeMenuStyles(k) {
|
|
54
|
+
export var makeMenuStyles = cache(function makeMenuStyles(k) {
|
|
52
55
|
return /*#__PURE__*/css("position:absolute;min-width:", dropdown.menu.minWidth, ";background:", dropdown.menu.bgColor, ";border-radius:", dropdown.menu.borderRadius, ";box-shadow:", theme.middleBoxShadow, ";font-size:", dropdown.menu.fontSize, ";z-index:", dropdown.menu.zIndex, ";top:0;left:0;.", k, "-dropdown{display:block;}");
|
|
53
|
-
}
|
|
54
|
-
export function makeItemStyles(k) {
|
|
56
|
+
});
|
|
57
|
+
export var makeItemStyles = cache(function makeItemStyles(k) {
|
|
55
58
|
return /*#__PURE__*/css("padding:", dropdown.item.padding, ";cursor:pointer;white-space:nowrap;height:", dropdown.item.height, ";line-height:", dropdown.item.height, ";&.", k, "-hover{background:", dropdown.item.hoverBgColor, ";}&:first-of-type{border-radius:", dropdown.menu.borderRadius, " ", dropdown.menu.borderRadius, " 0 0;}&:last-of-type{border-radius:0 0 ", dropdown.menu.borderRadius, " ", dropdown.menu.borderRadius, ";}&.", k, "-disabled{background:", dropdown.item.disabledBgColor, ";color:", dropdown.item.disabledColor, ";cursor:not-allowed;}.", k, "-checkbox,.", k, "-radio{display:flex;margin:0 -", getRight(dropdown.item.padding), " 0 -", getLeft(dropdown.item.padding), ";padding:", dropdown.item.padding, ";}.", k, "-checkbox-wrapper,.", k, "-radio-wrapper{vertical-align:text-bottom;}.", k, "-checkbox-text,.", k, "-radio-text{vertical-align:baseline;}");
|
|
56
|
-
}
|
|
59
|
+
});
|
|
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
|
|
|
2
2
|
import { theme, setDefault } from '../../styles/theme';
|
|
3
3
|
import { deepDefaults } from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
|
+
import { cache } from '../utils';
|
|
5
6
|
var defaults = {
|
|
6
7
|
iconGap: '0 0 0 8px',
|
|
7
8
|
// invalid
|
|
@@ -17,8 +18,9 @@ setDefault(function () {
|
|
|
17
18
|
editable = deepDefaults(theme, {
|
|
18
19
|
editable: defaults
|
|
19
20
|
}).editable;
|
|
21
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
20
22
|
});
|
|
21
23
|
export { editable };
|
|
22
|
-
export function makeStyles(k) {
|
|
24
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
23
25
|
return /*#__PURE__*/css("display:inline-flex;align-items:center;.", k, "-editable-icon{margin:", editable.iconGap, ";}&.", k, "-invalid{.", k, "-input-inner{border:", editable.invalid.border, "!important;}}");
|
|
24
|
-
}
|
|
26
|
+
});
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
2
|
+
export declare const makeItemStyles: {
|
|
3
|
+
(k: string): string;
|
|
4
|
+
clearCache(): {};
|
|
5
|
+
};
|
|
6
|
+
export declare const makeFormStyles: {
|
|
7
|
+
(k: string): string;
|
|
8
|
+
clearCache(): {};
|
|
9
|
+
};
|
|
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
|
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
4
|
import { deepDefaults } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
|
+
import { cache } from '../utils';
|
|
6
7
|
var defaults = {
|
|
7
8
|
item: {
|
|
8
9
|
gap: "24px",
|
|
@@ -48,14 +49,16 @@ setDefault(function () {
|
|
|
48
49
|
form = deepDefaults(theme, {
|
|
49
50
|
form: defaults
|
|
50
51
|
}).form;
|
|
52
|
+
makeItemStyles == null ? void 0 : makeItemStyles.clearCache();
|
|
53
|
+
makeFormStyles == null ? void 0 : makeFormStyles.clearCache();
|
|
51
54
|
});
|
|
52
|
-
export function makeItemStyles(k) {
|
|
55
|
+
export var makeItemStyles = cache(function makeItemStyles(k) {
|
|
53
56
|
return /*#__PURE__*/css("display:flex;position:relative;&:not(:last-of-type){margin-bottom:", form.item.gap, ";}&.", k, "-fluid>.", k, "-form-content{flex:1;}.", k, "-form-label{display:flex;align-items:center;justify-content:", form.item.labelTextAlign === 'right' ? 'end' : 'start', ";width:", form.item.labelWidth, ";padding-right:", form.item.labelGap, ";max-height:", form.item.labelHeight, ";flex-shrink:0;}.", k, "-form-star{color:", form.item.starColor, ";margin-right:", form.item.starGap, ";}.", k, "-form-content{position:relative;}.", k, "-form-error{position:absolute;color:", form.item.errorColor, ";font-size:", form.item.errorFontSize, ";left:0;right:0;display:flex;align-items:center;&.", k, "-ellipsis{.", k, "-form-error-more{display:inline-block;}}}.", k, "-form-error-more{line-height:", form.item.errorFontSize, ";display:none;}&.", k, "-invalid{.", k, "-input{.", k, "-input-wrapper{border:", form.item.invalidBorder, ";position:relative;z-index:1;}}.", k, "-select,.", k, "-checkbox-wrapper,.", k, "-radio-wrapper{border:", form.item.invalidBorder, "!important;}.", k, "-select .", k, "-input .", k, "-input-wrapper{border:none;}}.", k, "-form-append{padding:", form.item.appendPadding, ";vertical-align:middle;}");
|
|
54
|
-
}
|
|
55
|
-
export function makeFormStyles(k) {
|
|
57
|
+
});
|
|
58
|
+
export var makeFormStyles = cache(function makeFormStyles(k) {
|
|
56
59
|
var _context;
|
|
57
60
|
|
|
58
61
|
return /*#__PURE__*/css("&.", k, "-inline{.", k, "-form-item{display:inline-flex;vertical-align:top;margin-right:", form.item.inlineGap, ";}.", k, "-form-label{width:auto;}}&.", k, "-vertical{.", k, "-form-item{flex-direction:column;}.", k, "-form-label{width:auto;text-align:left;padding:0;justify-content:start;margin-bottom:", form.item.verticalLabelGap, ";}}", _mapInstanceProperty(_context = ['small', 'mini']).call(_context, function (size) {
|
|
59
62
|
return /*#__PURE__*/css("&.", k, "-", size, "{.", k, "-form-item:not(:last-of-type){margin-bottom:", form.item[size + "Gap"], ";}&.", k, "-inline{.", k, "-form-item{margin-right:", form.item[size + "InlineGap"], ";}}}");
|
|
60
63
|
}), ";");
|
|
61
|
-
}
|
|
64
|
+
});
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
2
|
+
export declare const makeRowStyles: {
|
|
3
|
+
(k: string): string;
|
|
4
|
+
clearCache(): {};
|
|
5
|
+
};
|
|
6
|
+
export declare const makeColStyles: {
|
|
7
|
+
(k: string): string;
|
|
8
|
+
clearCache(): {};
|
|
9
|
+
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { css } from '@emotion/css';
|
|
2
|
-
import { theme, setDefault } from '../../styles/theme';
|
|
3
|
-
import { deepDefaults } from '../../styles/utils';
|
|
4
2
|
import '../../styles/global';
|
|
5
3
|
import { breakpoints, responsiveMap } from './constants';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
setDefault(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
13
|
-
|
|
4
|
+
import { cache } from '../utils'; // const defaults = {};
|
|
5
|
+
// let grid: typeof defaults;
|
|
6
|
+
// setDefault(() => {
|
|
7
|
+
// grid = deepDefaults(theme, {grid: defaults}).grid;
|
|
8
|
+
// makeRowStyles?.clearCache();
|
|
9
|
+
// makeColStyles?.clearCache();
|
|
10
|
+
// });
|
|
11
|
+
|
|
12
|
+
export var makeRowStyles = cache(function makeRowStyles(k) {
|
|
14
13
|
return /*#__PURE__*/css("position:relative;display:flex;flex-wrap:wrap;&.", k, "-justify-start{justify-content:flex-start;}&.", k, "-justify-end{justify-content:flex-end;}&.", k, "-justify-center{justify-content:center;}&.", k, "-justify-between{justify-content:space-between;}&.", k, "-justify-around{justify-content:space-around;}&.", k, "-justify-evenly{justify-content:space-evenly;}&.", k, "-align-top{align-items:flex-start;}&.", k, "-align-bottom{align-items:flex-end;}&.", k, "-align-middle{align-items:center;}&.", k, "-align-stretch{align-items:stretch;}&.", k, "-align-baseline{align-items:baseline;}");
|
|
15
|
-
}
|
|
16
|
-
export function makeColStyles(k) {
|
|
14
|
+
});
|
|
15
|
+
export var makeColStyles = cache(function makeColStyles(k) {
|
|
17
16
|
return /*#__PURE__*/css("position:relative;width:100%;.", k, "-col-wrapper{height:100%;}", makeBreakpointsCols(k), ";");
|
|
18
|
-
}
|
|
17
|
+
});
|
|
19
18
|
|
|
20
19
|
function makeBreakpointsCols(k) {
|
|
21
20
|
var styles = [];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import { createVNode as _$cv, className as _$cn } from 'intact-react';
|
|
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
|
+
};
|