@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
|
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';
|
|
3
3
|
import { addStyle, getRestProps } from '../utils';
|
|
4
|
-
import makeStyles from './styles';
|
|
4
|
+
import { makeStyles } from './styles';
|
|
5
5
|
export default function ($props, $blocks, $__proto__) {
|
|
6
6
|
var _classNameObj;
|
|
7
7
|
|
|
@@ -2,4 +2,7 @@ import '../../styles/fonts/ionicons';
|
|
|
2
2
|
import '../../styles/global';
|
|
3
3
|
export declare const colors: readonly ["primary", "warning", "danger", "success"];
|
|
4
4
|
export declare const sizes: readonly ["large", "small", "mini"];
|
|
5
|
-
export
|
|
5
|
+
export declare const makeStyles: {
|
|
6
|
+
(k: string, color?: string | undefined): string;
|
|
7
|
+
clearCache(): {};
|
|
8
|
+
};
|
|
@@ -6,6 +6,7 @@ import { rotate } from '../../styles/keyframes';
|
|
|
6
6
|
import { makeIconStyles } from '../../styles/fonts/iconfont';
|
|
7
7
|
import '../../styles/fonts/ionicons';
|
|
8
8
|
import '../../styles/global';
|
|
9
|
+
import { cache } from '../utils';
|
|
9
10
|
var defaults = {
|
|
10
11
|
get transition() {
|
|
11
12
|
return theme.transition.small;
|
|
@@ -31,10 +32,11 @@ setDefault(function () {
|
|
|
31
32
|
icon = deepDefaults(theme, {
|
|
32
33
|
icon: defaults
|
|
33
34
|
}).icon;
|
|
35
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
34
36
|
});
|
|
35
37
|
export var colors = ['primary', 'warning', 'danger', 'success'];
|
|
36
38
|
export var sizes = ['large', 'small', 'mini'];
|
|
37
|
-
export
|
|
39
|
+
export var makeStyles = cache(function makeStyles(k, color) {
|
|
38
40
|
// create the global icon styles
|
|
39
41
|
makeIconStyles(k);
|
|
40
42
|
return /*#__PURE__*/css("color:", icon.color, ";font-size:", icon.fontSize.default, ";line-height:1;", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
@@ -44,4 +46,4 @@ export default function makeStyles(k, color) {
|
|
|
44
46
|
var _color = theme.color[color];
|
|
45
47
|
return /*#__PURE__*/css("&.", k, "-", color, "{color:", _color, ";&.", k, "-hoverable:hover{color:", palette(_color, -2), ";}}");
|
|
46
48
|
}), " &.", k, "-rotate:before{animation:", rotate, " 1s infinite linear;}&:before{font-size:inherit;}&.", k, "-hoverable{cursor:pointer;transition:color ", icon.transition, ";", color && /*#__PURE__*/css("&:hover{color:", palette(color, -2), "!important;}"), ";&:hover{color:", theme.color.primary, ";}}&.", k, "-disabled{cursor:not-allowed;color:", icon.disabledColor, "!important;}");
|
|
47
|
-
}
|
|
49
|
+
});
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
2
|
+
export declare const makeStyles: {
|
|
3
|
+
(k: string): string;
|
|
4
|
+
clearCache(): {};
|
|
5
|
+
};
|
|
6
|
+
export declare const makeSearchStyles: {
|
|
7
|
+
(k: string): string;
|
|
8
|
+
clearCache(): {};
|
|
9
|
+
};
|
|
@@ -5,6 +5,7 @@ import { theme, setDefault } from '../../styles/theme';
|
|
|
5
5
|
import { deepDefaults, sizes } from '../../styles/utils';
|
|
6
6
|
import '../../styles/global';
|
|
7
7
|
import { Input } from './';
|
|
8
|
+
import { cache } from '../utils';
|
|
8
9
|
var defaults = deepDefaults({
|
|
9
10
|
get transition() {
|
|
10
11
|
return theme.transition.middle;
|
|
@@ -128,8 +129,10 @@ setDefault(function () {
|
|
|
128
129
|
input = deepDefaults(theme, {
|
|
129
130
|
input: defaults
|
|
130
131
|
}).input;
|
|
132
|
+
makeStyles == null ? void 0 : makeStyles.clearCache();
|
|
133
|
+
makeSearchStyles == null ? void 0 : makeSearchStyles.clearCache();
|
|
131
134
|
});
|
|
132
|
-
export function makeStyles(k) {
|
|
135
|
+
export var makeStyles = cache(function makeStyles(k) {
|
|
133
136
|
var _context;
|
|
134
137
|
|
|
135
138
|
return /*#__PURE__*/css("display:inline-block;width:", input.width, ";color:", input.color, ";vertical-align:middle;.", k, "-input-wrapper{display:inline-flex;align-items:center;width:100%;position:relative;border:", input.border, ";background-color:", input.bgColor, ";transition:border ", input.transition, ",background ", input.transition, ",box-shadow ", input.transition, ";border-radius:", input.borderRadius, ";&:hover{border:", input.hoverBorder, ";z-index:1;}}&.", k, "-focus .", k, "-input-wrapper{border:", input.focusBorder, ";z-index:1;}.", k, "-input-inner{flex:1;outline:none;color:inherit;font-size:inherit;border:none;background:transparent;padding:0;width:0;&::placeholder{color:", input.placeholderColor, ";}}&.", k, "-fluid{width:100%;}.", k, "-input-prefix,.", k, "-input-suffix{display:flex;align-items:center;gap:", input.clearIconGap, ";color:", theme.color.lightBlack, ";position:relative;}.", k, "-input-prefix{margin-right:", input.clearIconGap, ";}.", k, "-input-suffix{margin-left:", input.clearIconGap, ";}.", k, "-input-clear{opacity:0;transition:opacity ", input.transition, ";pointer-events:none;color:", input.clearIconColor, ";}&:hover .", k, "-input-clear.", k, "-input-show{opacity:1;pointer-events:all;}.", k, "-input-show-password{color:", input.clearIconColor, ";}&.", k, "-stack-clear{.", k, "-input-clear{position:absolute;z-index:1;right:0;&.", k, "-input-show+*{transition:opacity ", input.transition, ";}}&:hover{.", k, "-input-clear.", k, "-input-show+*{opacity:0;}}}&.", k, "-group{display:inline-flex;.", k, "-input-wrapper{border-radius:0;flex:1;}.", k, "-input-wrapper:first-child{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}.", k, "-input-wrapper:last-child{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.", k, "-input-prepend,.", k, "-input-append{display:inline-flex;align-items:center;background-color:", input.groupBgColor, ";border:", input.border, ";white-space:nowrap;.", k, "-btn{margin:-1px;&.", k, "-none:hover{background:transparent;}}.", k, "-select{margin:-1px;text-align:left;}}.", k, "-input-prepend{&,.", k, "-btn,.", k, "-select{z-index:1;border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}}.", k, "-input-append{&,.", k, "-btn,.", k, "-select{z-index:1;border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.", k, "-input-padding{padding:0 ", input.groupPaddingGap, ";}.", k, "-input-prepend{border-right:none;}.", k, "-input-append{border-left:none;}&.", k, "-flat{color:", _flatInstanceProperty(input).color, ";.", k, "-input-wrapper{border:none;background:", _flatInstanceProperty(input).bgColor, ";}}&.", k, "-disabled{color:", input.disabledColor, ";cursor:not-allowed;.", k, "-input-wrapper{border-color:", input.disabledBorderColor, ";background:", input.disabledBgColor, ";}.", k, "-input-inner{cursor:not-allowed;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
@@ -140,10 +143,10 @@ export function makeStyles(k) {
|
|
|
140
143
|
}), "&.", k, "-inline{.", k, "-input-wrapper{height:auto;border:none;border-radius:0;padding:0;}}&.", k, "-type-textarea{.", k, "-input-wrapper{display:inline-block;padding:0;height:auto;}.", k, "-textarea{width:100%;padding:", input.textareaPadding, ";line-height:1.5;vertical-align:top;}.", k, "-input-suffix{margin:0;justify-content:flex-end;}}", _mapInstanceProperty(_context = Input.typeDefs.resize).call(_context, function (type) {
|
|
141
144
|
return /*#__PURE__*/css("&.", k, "-resize-", type, "{.", k, "-textarea{resize:", type, ";}}");
|
|
142
145
|
}), ".", k, "-input-fake{left:0;top:0;position:absolute;overflow:hidden;visibility:hidden;white-space:nowrap;}&.", k, "-auto-width{width:auto;max-width:100%;}.", k, "-input-count{color:", input.count.color, ";}");
|
|
143
|
-
}
|
|
144
|
-
export function makeSearchStyles(k) {
|
|
146
|
+
});
|
|
147
|
+
export var makeSearchStyles = cache(function makeSearchStyles(k) {
|
|
145
148
|
return /*#__PURE__*/css("position:relative;display:inline-block;.", k, "-input{transition:width ", input.transition, ";}.", k, "-btn{position:absolute;top:0;right:0;z-index:1;}&.", k, "-default .", k, "-btn:hover{background:transparent;}.", k, "-input-suffix{margin-right:", input.search.suffixMarginRight, ";}&.", k, "-hide{", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
146
149
|
if (size == 'default') return;
|
|
147
150
|
return /*#__PURE__*/css(".", k, "-input.", k, "-", size, "{width:", input[size].height, ";}");
|
|
148
151
|
}), ";.", k, "-input{width:", input.default.height, ";}.", k, "-input-inner{padding:0!important;}}&.", k, "-line{.", k, "-input-wrapper{border-width:0;}&.", k, "-open{.", k, "-input-wrapper{border-bottom-width:1px;}.", k, "-btn:hover{background:transparent;}}}");
|
|
149
|
-
}
|
|
152
|
+
});
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
2
|
export declare const themes: readonly ["light", "dark", "white"];
|
|
3
3
|
export declare function getCollapseWidth(collapsedWidth?: string | number): string;
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export declare const makeLayoutStyles: {
|
|
5
|
+
(k: string): string;
|
|
6
|
+
clearCache(): {};
|
|
7
|
+
};
|
|
8
|
+
export declare const makeHeaderStyles: {
|
|
9
|
+
(k: string): string;
|
|
10
|
+
clearCache(): {};
|
|
11
|
+
};
|
|
12
|
+
export declare const makeAsideStyles: {
|
|
13
|
+
(k: string): string;
|
|
14
|
+
clearCache(): {};
|
|
15
|
+
};
|
|
16
|
+
export declare const makeBodyStyles: {
|
|
17
|
+
(k: string): string;
|
|
18
|
+
clearCache(): {};
|
|
19
|
+
};
|
|
@@ -6,6 +6,7 @@ import '../../styles/global';
|
|
|
6
6
|
import { menu } from '../menu/styles';
|
|
7
7
|
import { isNullOrUndefined } from 'intact-shared';
|
|
8
8
|
import { getStyle } from './helpers';
|
|
9
|
+
import { cache } from '../utils';
|
|
9
10
|
var sizes = ['small', 'large'];
|
|
10
11
|
export var themes = ['light', 'dark', 'white'];
|
|
11
12
|
var defaults = {
|
|
@@ -62,27 +63,31 @@ setDefault(function () {
|
|
|
62
63
|
layout = deepDefaults(theme, {
|
|
63
64
|
layout: defaults
|
|
64
65
|
}).layout;
|
|
66
|
+
makeLayoutStyles == null ? void 0 : makeLayoutStyles.clearCache();
|
|
67
|
+
makeHeaderStyles == null ? void 0 : makeHeaderStyles.clearCache();
|
|
68
|
+
makeAsideStyles == null ? void 0 : makeAsideStyles.clearCache();
|
|
69
|
+
makeBodyStyles == null ? void 0 : makeBodyStyles.clearCache();
|
|
65
70
|
});
|
|
66
71
|
export function getCollapseWidth(collapsedWidth) {
|
|
67
72
|
return isNullOrUndefined(collapsedWidth) ? layout.collapsedWidth : getStyle(collapsedWidth);
|
|
68
73
|
}
|
|
69
|
-
export function makeLayoutStyles(k) {
|
|
74
|
+
export var makeLayoutStyles = cache(function makeLayoutStyles(k) {
|
|
70
75
|
return /*#__PURE__*/css("display:flex;flex-direction:column;flex:1;transition:padding-left ", layout.transition, ";&.", k, "-has-aside{flex-direction:row;}.", k, "-layout-footer{padding:", layout.footerPadding, ";}.", k, "-layout-body{flex:1;}");
|
|
71
|
-
}
|
|
72
|
-
export function makeHeaderStyles(k) {
|
|
76
|
+
});
|
|
77
|
+
export var makeHeaderStyles = cache(function makeHeaderStyles(k) {
|
|
73
78
|
return /*#__PURE__*/css("display:flex;align-items:center;color:", layout.color, ";background:", layout.bgColor, ";left:0;transition:left ", layout.transition, ";&.", k, "-fixed{position:fixed;left:0;right:0;top:0;z-index:", theme.midZIndex + 1, ";}>.", k, "-menu{background:transparent!important;}&.", k, "-blur{backdrop-filter:blur(20px);background:", setAlpha(layout.bgColor, 0.1), ";}&.", k, "-box-shadow{border-bottom:none!important;box-shadow:", theme.boxShadow, ";}", _mapInstanceProperty(themes).call(themes, function (theme) {
|
|
74
79
|
if (theme === 'dark') return;
|
|
75
80
|
var styles = layout[theme];
|
|
76
81
|
return /*#__PURE__*/css("&.", k, "-", theme, "{background:", styles.bgColor, ";color:", styles.color, ";border-bottom:", styles.border, ";&.", k, "-blur{background:", setAlpha(styles.bgColor, 0.1), ";}}");
|
|
77
82
|
}), ";");
|
|
78
|
-
}
|
|
79
|
-
export function makeAsideStyles(k) {
|
|
83
|
+
});
|
|
84
|
+
export var makeAsideStyles = cache(function makeAsideStyles(k) {
|
|
80
85
|
return /*#__PURE__*/css("transition:width ", layout.transition, ";display:flex;flex-direction:column;background:", layout.bgColor, ";color:", layout.color, ";", _mapInstanceProperty(themes).call(themes, function (theme) {
|
|
81
86
|
if (theme === 'dark') return;
|
|
82
87
|
var styles = layout[theme];
|
|
83
88
|
return /*#__PURE__*/css("&.", k, "-", theme, "{background:", styles.bgColor, ";color:", styles.color, ";border-right:", styles.border, ";}");
|
|
84
89
|
}), " &.", k, "-fixed{position:fixed;overflow:auto;left:0;top:0;bottom:0;z-index:", theme.midZIndex, ";}.", k, "-menu{width:auto!important;}");
|
|
85
|
-
}
|
|
86
|
-
export function makeBodyStyles(k) {
|
|
90
|
+
});
|
|
91
|
+
export var makeBodyStyles = cache(function makeBodyStyles(k) {
|
|
87
92
|
return /*#__PURE__*/css("transition:padding-left ", layout.transition, ";");
|
|
88
|
-
}
|
|
93
|
+
});
|
|
@@ -62,7 +62,19 @@ declare const defaults: {
|
|
|
62
62
|
};
|
|
63
63
|
declare let menu: typeof defaults;
|
|
64
64
|
export { menu };
|
|
65
|
-
export declare
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
export declare const makeMenuStyles: {
|
|
66
|
+
(k: string): string;
|
|
67
|
+
clearCache(): {};
|
|
68
|
+
};
|
|
69
|
+
export declare const makeTitleStyles: {
|
|
70
|
+
(k: string): string;
|
|
71
|
+
clearCache(): {};
|
|
72
|
+
};
|
|
73
|
+
export declare const makeItemStyles: {
|
|
74
|
+
(k: string): string;
|
|
75
|
+
clearCache(): {};
|
|
76
|
+
};
|
|
77
|
+
export declare const makeNestedMenuStyles: {
|
|
78
|
+
(k: string, hasIcon: boolean, parentPaddingLeft?: string | undefined): string;
|
|
79
|
+
clearCache(): {};
|
|
80
|
+
};
|
|
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
|
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
4
|
import { deepDefaults, getLeft, palette } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
|
+
import { cache } from '../utils';
|
|
6
7
|
var sizes = ['large', 'small'];
|
|
7
8
|
var defaults = {
|
|
8
9
|
get transition() {
|
|
@@ -115,9 +116,13 @@ setDefault(function () {
|
|
|
115
116
|
menu = deepDefaults(theme, {
|
|
116
117
|
menu: defaults
|
|
117
118
|
}).menu;
|
|
119
|
+
makeMenuStyles == null ? void 0 : makeMenuStyles.clearCache();
|
|
120
|
+
makeItemStyles == null ? void 0 : makeItemStyles.clearCache();
|
|
121
|
+
makeTitleStyles == null ? void 0 : makeTitleStyles.clearCache();
|
|
122
|
+
makeNestedMenuStyles == null ? void 0 : makeNestedMenuStyles.clearCache();
|
|
118
123
|
});
|
|
119
124
|
export { menu };
|
|
120
|
-
export function makeMenuStyles(k) {
|
|
125
|
+
export var makeMenuStyles = cache(function makeMenuStyles(k) {
|
|
121
126
|
var _context;
|
|
122
127
|
|
|
123
128
|
// we must increase the priority by adding &.${k}-menu
|
|
@@ -129,20 +134,20 @@ export function makeMenuStyles(k) {
|
|
|
129
134
|
var styles = menu[size];
|
|
130
135
|
return /*#__PURE__*/css("&.", k, "-", size, "{width:", styles.width, ";font-size:", styles.fontSize, ";.", k, "-menu{font-size:", styles.fontSize, ";}}");
|
|
131
136
|
}), "&.", k, "-collapsed{width:calc(", menu.icon.width, " + ", getLeft(menu.item.padding), " * 2);.", k, "-icon{margin-right:0;}.", k, "-menu-arrow{display:none;}}&.", k, "-dropdown-menu{width:auto;min-width:", menu.dropdown.minWidth, ";.", k, "-menu-arrow{transform:rotate(-90deg);}}&.", k, "-horizontal{width:auto;display:flex;align-items:center;.", k, "-menu-header{border-bottom:none;border-right:", menu.header.borderBottom, ";}}");
|
|
132
|
-
}
|
|
133
|
-
export function makeTitleStyles(k) {
|
|
137
|
+
});
|
|
138
|
+
export var makeTitleStyles = cache(function makeTitleStyles(k) {
|
|
134
139
|
var item = menu.item;
|
|
135
140
|
return /*#__PURE__*/css("display:flex;align-items:center;padding:", item.padding, ";color:", item.color, ";white-space:nowrap;overflow:hidden;flex-wrap:nowrap;");
|
|
136
|
-
}
|
|
137
|
-
export function makeItemStyles(k) {
|
|
141
|
+
});
|
|
142
|
+
export var makeItemStyles = cache(function makeItemStyles(k) {
|
|
138
143
|
var item = menu.item;
|
|
139
|
-
return /*#__PURE__*/css(".", k, "-menu-title{cursor:pointer;height:",
|
|
140
|
-
}
|
|
141
|
-
export function makeNestedMenuStyles(k, hasIcon, parentPaddingLeft) {
|
|
144
|
+
return /*#__PURE__*/css(".", k, "-menu-title{cursor:pointer;height:", item.height, ";&:hover{color:", item.hoverColor, ";}}.", k, "-menu-name{flex:1;display:flex;align-items:center;min-width:0;span{overflow:hidden;text-overflow:ellipsis;min-width:0;}.", k, "-icon{color:inherit;}}.", k, "-menu-arrow{transition:transform ", menu.transition, ";margin:0 0 0 ", menu.icon.gap, ";}&.", k, "-expanded{>.", k, "-menu-title{color:", item.hoverColor, ";.", k, "-menu-arrow{transform:rotateX(180deg);}}}&.", k, "-highlighted{>.", k, "-menu-title{color:", item.hoverColor, ";}}&.", k, "-active{>.", k, "-menu-title{color:", item.hoverColor, "!important;background:", item.activeBgColor, ";}}&.", k, "-disabled{>.", k, "-menu-title{color:", item.disabledColor, "!important;cursor:not-allowed;}}.", k, "-menu-dot{font-size:", item.dotFontSize, ";transform:scale(.4);}");
|
|
145
|
+
});
|
|
146
|
+
export var makeNestedMenuStyles = cache(function makeNestedMenuStyles(k, hasIcon, parentPaddingLeft) {
|
|
142
147
|
if (parentPaddingLeft === void 0) {
|
|
143
148
|
parentPaddingLeft = getLeft(menu.item.padding);
|
|
144
149
|
}
|
|
145
150
|
|
|
146
151
|
var paddingLeft = "" + parentPaddingLeft + (hasIcon ? ' + ' + menu.icon.width : '') + " + " + menu.icon.gap;
|
|
147
152
|
return [/*#__PURE__*/css("&.", k, "-menu{width:auto;background:", menu.subBgColor, ";.", k, "-menu-title{padding-left:calc(", paddingLeft, ");}}"), paddingLeft];
|
|
148
|
-
}
|
|
153
|
+
});
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import '../../styles/global';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
2
|
+
export declare const makeMessagesStyles: {
|
|
3
|
+
(k: string): string;
|
|
4
|
+
clearCache(): {};
|
|
5
|
+
};
|
|
6
|
+
export declare const makeMessageStyles: {
|
|
7
|
+
(k: string): string;
|
|
8
|
+
clearCache(): {};
|
|
9
|
+
};
|