wssf-kage-ui 0.1.0 → 0.1.1
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/README.md +4 -4
- package/dist/cjs/Anchor/index.d.ts +56 -0
- package/dist/cjs/Anchor/index.js +307 -0
- package/dist/cjs/Anchor/style.less +183 -0
- package/dist/cjs/AutoComplete/index.d.ts +54 -0
- package/dist/cjs/AutoComplete/index.js +273 -0
- package/dist/cjs/AutoComplete/style.less +325 -0
- package/dist/cjs/Breadcrumb/index.d.ts +51 -0
- package/dist/cjs/Breadcrumb/index.js +129 -0
- package/dist/cjs/Breadcrumb/style.less +96 -0
- package/dist/cjs/Cascader/index.d.ts +53 -0
- package/dist/cjs/Cascader/index.js +338 -0
- package/dist/cjs/Cascader/style.less +457 -0
- package/dist/cjs/Checkbox/index.d.ts +52 -0
- package/dist/cjs/Checkbox/index.js +158 -0
- package/dist/cjs/Checkbox/style.less +211 -0
- package/dist/cjs/ColorPicker/index.d.ts +28 -0
- package/dist/cjs/ColorPicker/index.js +381 -0
- package/dist/cjs/ColorPicker/style.less +276 -0
- package/dist/cjs/DatePicker/index.d.ts +32 -0
- package/dist/cjs/DatePicker/index.js +377 -0
- package/dist/cjs/DatePicker/style.less +498 -0
- package/dist/cjs/Divider/index.d.ts +24 -0
- package/dist/cjs/Divider/index.js +75 -0
- package/dist/cjs/Divider/style.less +144 -0
- package/dist/cjs/Dropdown/index.d.ts +88 -0
- package/dist/cjs/Dropdown/index.js +253 -0
- package/dist/cjs/Dropdown/style.less +430 -0
- package/dist/cjs/Flex/index.d.ts +37 -0
- package/dist/cjs/Flex/index.js +76 -0
- package/dist/cjs/Flex/style.less +13 -0
- package/dist/cjs/Form/index.d.ts +89 -0
- package/dist/cjs/Form/index.js +421 -0
- package/dist/cjs/Form/style.less +203 -0
- package/dist/cjs/Grid/index.d.ts +69 -0
- package/dist/cjs/Grid/index.js +171 -0
- package/dist/cjs/Grid/style.less +273 -0
- package/dist/cjs/Layout/index.d.ts +74 -0
- package/dist/cjs/Layout/index.js +166 -0
- package/dist/cjs/Layout/style.less +145 -0
- package/dist/cjs/Masonry/index.d.ts +18 -0
- package/dist/cjs/Masonry/index.js +146 -0
- package/dist/cjs/Masonry/style.less +15 -0
- package/dist/cjs/Menu/index.d.ts +87 -0
- package/dist/cjs/Menu/index.js +306 -0
- package/dist/cjs/Menu/style.less +363 -0
- package/dist/cjs/Pagination/index.d.ts +38 -0
- package/dist/cjs/Pagination/index.js +255 -0
- package/dist/cjs/Pagination/style.less +353 -0
- package/dist/cjs/Space/index.d.ts +41 -0
- package/dist/cjs/Space/index.js +137 -0
- package/dist/cjs/Space/style.less +116 -0
- package/dist/cjs/Splitter/index.d.ts +43 -0
- package/dist/cjs/Splitter/index.js +219 -0
- package/dist/cjs/Splitter/style.less +99 -0
- package/dist/cjs/Steps/index.d.ts +58 -0
- package/dist/cjs/Steps/index.js +180 -0
- package/dist/cjs/Steps/style.less +507 -0
- package/dist/cjs/Tabs/index.d.ts +58 -0
- package/dist/cjs/Tabs/index.js +196 -0
- package/dist/cjs/Tabs/style.less +423 -0
- package/dist/cjs/Typography/index.d.ts +102 -0
- package/dist/cjs/Typography/index.js +168 -0
- package/dist/cjs/Typography/style.less +246 -0
- package/dist/cjs/index.d.ts +42 -0
- package/dist/cjs/index.js +260 -1
- package/dist/esm/Anchor/index.d.ts +56 -0
- package/dist/esm/Anchor/index.js +302 -0
- package/dist/esm/Anchor/style.less +183 -0
- package/dist/esm/AutoComplete/index.d.ts +54 -0
- package/dist/esm/AutoComplete/index.js +268 -0
- package/dist/esm/AutoComplete/style.less +325 -0
- package/dist/esm/Breadcrumb/index.d.ts +51 -0
- package/dist/esm/Breadcrumb/index.js +124 -0
- package/dist/esm/Breadcrumb/style.less +96 -0
- package/dist/esm/Cascader/index.d.ts +53 -0
- package/dist/esm/Cascader/index.js +333 -0
- package/dist/esm/Cascader/style.less +457 -0
- package/dist/esm/Checkbox/index.d.ts +52 -0
- package/dist/esm/Checkbox/index.js +152 -0
- package/dist/esm/Checkbox/style.less +211 -0
- package/dist/esm/ColorPicker/index.d.ts +28 -0
- package/dist/esm/ColorPicker/index.js +375 -0
- package/dist/esm/ColorPicker/style.less +276 -0
- package/dist/esm/DatePicker/index.d.ts +32 -0
- package/dist/esm/DatePicker/index.js +371 -0
- package/dist/esm/DatePicker/style.less +498 -0
- package/dist/esm/Divider/index.d.ts +24 -0
- package/dist/esm/Divider/index.js +68 -0
- package/dist/esm/Divider/style.less +144 -0
- package/dist/esm/Dropdown/index.d.ts +88 -0
- package/dist/esm/Dropdown/index.js +249 -0
- package/dist/esm/Dropdown/style.less +430 -0
- package/dist/esm/Flex/index.d.ts +37 -0
- package/dist/esm/Flex/index.js +69 -0
- package/dist/esm/Flex/style.less +13 -0
- package/dist/esm/Form/index.d.ts +89 -0
- package/dist/esm/Form/index.js +416 -0
- package/dist/esm/Form/style.less +203 -0
- package/dist/esm/Grid/index.d.ts +69 -0
- package/dist/esm/Grid/index.js +165 -0
- package/dist/esm/Grid/style.less +273 -0
- package/dist/esm/Layout/index.d.ts +74 -0
- package/dist/esm/Layout/index.js +161 -0
- package/dist/esm/Layout/style.less +145 -0
- package/dist/esm/Masonry/index.d.ts +18 -0
- package/dist/esm/Masonry/index.js +138 -0
- package/dist/esm/Masonry/style.less +15 -0
- package/dist/esm/Menu/index.d.ts +87 -0
- package/dist/esm/Menu/index.js +301 -0
- package/dist/esm/Menu/style.less +363 -0
- package/dist/esm/Pagination/index.d.ts +38 -0
- package/dist/esm/Pagination/index.js +247 -0
- package/dist/esm/Pagination/style.less +353 -0
- package/dist/esm/Space/index.d.ts +41 -0
- package/dist/esm/Space/index.js +131 -0
- package/dist/esm/Space/style.less +116 -0
- package/dist/esm/Splitter/index.d.ts +43 -0
- package/dist/esm/Splitter/index.js +214 -0
- package/dist/esm/Splitter/style.less +99 -0
- package/dist/esm/Steps/index.d.ts +58 -0
- package/dist/esm/Steps/index.js +174 -0
- package/dist/esm/Steps/style.less +507 -0
- package/dist/esm/Tabs/index.d.ts +58 -0
- package/dist/esm/Tabs/index.js +193 -0
- package/dist/esm/Tabs/style.less +423 -0
- package/dist/esm/Typography/index.d.ts +102 -0
- package/dist/esm/Typography/index.js +161 -0
- package/dist/esm/Typography/style.less +246 -0
- package/dist/esm/index.d.ts +42 -0
- package/dist/esm/index.js +22 -1
- package/package.json +13 -10
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.less';
|
|
3
|
+
type Gutter = number | [number, number];
|
|
4
|
+
type JustifyContent = 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly';
|
|
5
|
+
type AlignItems = 'top' | 'middle' | 'bottom' | 'stretch';
|
|
6
|
+
export interface RowProps {
|
|
7
|
+
/** 栅格间隔,可以是数字或数组 [水平间距, 垂直间距] */
|
|
8
|
+
gutter?: Gutter;
|
|
9
|
+
/** 水平排列方式 */
|
|
10
|
+
justify?: JustifyContent;
|
|
11
|
+
/** 垂直对齐方式 */
|
|
12
|
+
align?: AlignItems;
|
|
13
|
+
/** 是否自动换行 */
|
|
14
|
+
wrap?: boolean;
|
|
15
|
+
/** 子元素 */
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
/** 自定义类名 */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** 自定义样式 */
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
export declare const Row: React.FC<RowProps>;
|
|
23
|
+
type ColSpan = number;
|
|
24
|
+
interface ColSize {
|
|
25
|
+
span?: ColSpan;
|
|
26
|
+
offset?: number;
|
|
27
|
+
order?: number;
|
|
28
|
+
pull?: number;
|
|
29
|
+
push?: number;
|
|
30
|
+
}
|
|
31
|
+
export interface ColProps {
|
|
32
|
+
/** 栅格占位格数,为 0 时相当于 display: none */
|
|
33
|
+
span?: ColSpan;
|
|
34
|
+
/** 栅格左侧偏移格数 */
|
|
35
|
+
offset?: number;
|
|
36
|
+
/** 栅格顺序 */
|
|
37
|
+
order?: number;
|
|
38
|
+
/** 栅格向左移动格数 */
|
|
39
|
+
pull?: number;
|
|
40
|
+
/** 栅格向右移动格数 */
|
|
41
|
+
push?: number;
|
|
42
|
+
/** flex 布局属性 */
|
|
43
|
+
flex?: string | number;
|
|
44
|
+
/** <576px 响应式栅格 */
|
|
45
|
+
xs?: ColSpan | ColSize;
|
|
46
|
+
/** ≥576px 响应式栅格 */
|
|
47
|
+
sm?: ColSpan | ColSize;
|
|
48
|
+
/** ≥768px 响应式栅格 */
|
|
49
|
+
md?: ColSpan | ColSize;
|
|
50
|
+
/** ≥992px 响应式栅格 */
|
|
51
|
+
lg?: ColSpan | ColSize;
|
|
52
|
+
/** ≥1200px 响应式栅格 */
|
|
53
|
+
xl?: ColSpan | ColSize;
|
|
54
|
+
/** ≥1600px 响应式栅格 */
|
|
55
|
+
xxl?: ColSpan | ColSize;
|
|
56
|
+
/** 子元素 */
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
/** 自定义类名 */
|
|
59
|
+
className?: string;
|
|
60
|
+
/** 自定义样式 */
|
|
61
|
+
style?: React.CSSProperties;
|
|
62
|
+
}
|
|
63
|
+
export declare const Col: React.FC<ColProps>;
|
|
64
|
+
type GridType = {
|
|
65
|
+
Row: typeof Row;
|
|
66
|
+
Col: typeof Col;
|
|
67
|
+
};
|
|
68
|
+
declare const Grid: GridType;
|
|
69
|
+
export default Grid;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
import React, { createContext, useContext } from 'react';
|
|
18
|
+
import "./style.less";
|
|
19
|
+
|
|
20
|
+
// ============ Row Context ============
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
var RowContext = /*#__PURE__*/createContext({
|
|
23
|
+
gutter: [0, 0]
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// ============ Row 行组件 ============
|
|
27
|
+
|
|
28
|
+
export var Row = function Row(_ref) {
|
|
29
|
+
var _ref$gutter = _ref.gutter,
|
|
30
|
+
gutter = _ref$gutter === void 0 ? 0 : _ref$gutter,
|
|
31
|
+
justify = _ref.justify,
|
|
32
|
+
align = _ref.align,
|
|
33
|
+
_ref$wrap = _ref.wrap,
|
|
34
|
+
wrap = _ref$wrap === void 0 ? true : _ref$wrap,
|
|
35
|
+
children = _ref.children,
|
|
36
|
+
_ref$className = _ref.className,
|
|
37
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
38
|
+
style = _ref.style;
|
|
39
|
+
// 处理 gutter
|
|
40
|
+
var gutterValue = Array.isArray(gutter) ? gutter : [gutter, 0];
|
|
41
|
+
var _gutterValue = _slicedToArray(gutterValue, 2),
|
|
42
|
+
horizontalGutter = _gutterValue[0],
|
|
43
|
+
verticalGutter = _gutterValue[1];
|
|
44
|
+
|
|
45
|
+
// justify 映射
|
|
46
|
+
var justifyMap = {
|
|
47
|
+
start: 'flex-start',
|
|
48
|
+
end: 'flex-end',
|
|
49
|
+
center: 'center',
|
|
50
|
+
'space-around': 'space-around',
|
|
51
|
+
'space-between': 'space-between',
|
|
52
|
+
'space-evenly': 'space-evenly'
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// align 映射
|
|
56
|
+
var alignMap = {
|
|
57
|
+
top: 'flex-start',
|
|
58
|
+
middle: 'center',
|
|
59
|
+
bottom: 'flex-end',
|
|
60
|
+
stretch: 'stretch'
|
|
61
|
+
};
|
|
62
|
+
var classNames = ['kage-row', className].filter(Boolean).join(' ');
|
|
63
|
+
var rowStyle = _objectSpread({
|
|
64
|
+
marginLeft: horizontalGutter ? -horizontalGutter / 2 : undefined,
|
|
65
|
+
marginRight: horizontalGutter ? -horizontalGutter / 2 : undefined,
|
|
66
|
+
rowGap: verticalGutter || undefined,
|
|
67
|
+
justifyContent: justify ? justifyMap[justify] : undefined,
|
|
68
|
+
alignItems: align ? alignMap[align] : undefined,
|
|
69
|
+
flexWrap: wrap ? 'wrap' : 'nowrap'
|
|
70
|
+
}, style);
|
|
71
|
+
return /*#__PURE__*/_jsx(RowContext.Provider, {
|
|
72
|
+
value: {
|
|
73
|
+
gutter: gutterValue
|
|
74
|
+
},
|
|
75
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
76
|
+
className: classNames,
|
|
77
|
+
style: rowStyle,
|
|
78
|
+
children: children
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// ============ Col 列组件 ============
|
|
84
|
+
|
|
85
|
+
export var Col = function Col(_ref2) {
|
|
86
|
+
var span = _ref2.span,
|
|
87
|
+
offset = _ref2.offset,
|
|
88
|
+
order = _ref2.order,
|
|
89
|
+
pull = _ref2.pull,
|
|
90
|
+
push = _ref2.push,
|
|
91
|
+
flex = _ref2.flex,
|
|
92
|
+
xs = _ref2.xs,
|
|
93
|
+
sm = _ref2.sm,
|
|
94
|
+
md = _ref2.md,
|
|
95
|
+
lg = _ref2.lg,
|
|
96
|
+
xl = _ref2.xl,
|
|
97
|
+
xxl = _ref2.xxl,
|
|
98
|
+
children = _ref2.children,
|
|
99
|
+
_ref2$className = _ref2.className,
|
|
100
|
+
className = _ref2$className === void 0 ? '' : _ref2$className,
|
|
101
|
+
style = _ref2.style;
|
|
102
|
+
var _useContext = useContext(RowContext),
|
|
103
|
+
gutter = _useContext.gutter;
|
|
104
|
+
var _gutter = _slicedToArray(gutter, 1),
|
|
105
|
+
horizontalGutter = _gutter[0];
|
|
106
|
+
|
|
107
|
+
// 构建响应式类名
|
|
108
|
+
var getResponsiveClasses = function getResponsiveClasses() {
|
|
109
|
+
var classes = [];
|
|
110
|
+
var sizes = {
|
|
111
|
+
xs: xs,
|
|
112
|
+
sm: sm,
|
|
113
|
+
md: md,
|
|
114
|
+
lg: lg,
|
|
115
|
+
xl: xl,
|
|
116
|
+
xxl: xxl
|
|
117
|
+
};
|
|
118
|
+
Object.entries(sizes).forEach(function (_ref3) {
|
|
119
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
120
|
+
size = _ref4[0],
|
|
121
|
+
value = _ref4[1];
|
|
122
|
+
if (value !== undefined) {
|
|
123
|
+
if (typeof value === 'number') {
|
|
124
|
+
classes.push("kage-col-".concat(size, "-").concat(value));
|
|
125
|
+
} else if (_typeof(value) === 'object') {
|
|
126
|
+
if (value.span !== undefined) {
|
|
127
|
+
classes.push("kage-col-".concat(size, "-").concat(value.span));
|
|
128
|
+
}
|
|
129
|
+
if (value.offset !== undefined) {
|
|
130
|
+
classes.push("kage-col-".concat(size, "-offset-").concat(value.offset));
|
|
131
|
+
}
|
|
132
|
+
if (value.order !== undefined) {
|
|
133
|
+
classes.push("kage-col-".concat(size, "-order-").concat(value.order));
|
|
134
|
+
}
|
|
135
|
+
if (value.pull !== undefined) {
|
|
136
|
+
classes.push("kage-col-".concat(size, "-pull-").concat(value.pull));
|
|
137
|
+
}
|
|
138
|
+
if (value.push !== undefined) {
|
|
139
|
+
classes.push("kage-col-".concat(size, "-push-").concat(value.push));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
return classes;
|
|
145
|
+
};
|
|
146
|
+
var classNames = ['kage-col', span !== undefined && "kage-col-".concat(span), offset !== undefined && "kage-col-offset-".concat(offset), order !== undefined && "kage-col-order-".concat(order), pull !== undefined && "kage-col-pull-".concat(pull), push !== undefined && "kage-col-push-".concat(push)].concat(_toConsumableArray(getResponsiveClasses()), [className]).filter(Boolean).join(' ');
|
|
147
|
+
var colStyle = _objectSpread({
|
|
148
|
+
paddingLeft: horizontalGutter ? horizontalGutter / 2 : undefined,
|
|
149
|
+
paddingRight: horizontalGutter ? horizontalGutter / 2 : undefined,
|
|
150
|
+
flex: flex !== undefined ? typeof flex === 'number' ? "".concat(flex, " ").concat(flex, " auto") : flex : undefined
|
|
151
|
+
}, style);
|
|
152
|
+
return /*#__PURE__*/_jsx("div", {
|
|
153
|
+
className: classNames,
|
|
154
|
+
style: colStyle,
|
|
155
|
+
children: children
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// ============ Grid 命名空间导出 ============
|
|
160
|
+
|
|
161
|
+
var Grid = {
|
|
162
|
+
Row: Row,
|
|
163
|
+
Col: Col
|
|
164
|
+
};
|
|
165
|
+
export default Grid;
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
// Grid 栅格组件样式
|
|
2
|
+
|
|
3
|
+
@prefix-row: kage-row;
|
|
4
|
+
@prefix-col: kage-col;
|
|
5
|
+
|
|
6
|
+
// 响应式断点
|
|
7
|
+
@screen-xs: 576px;
|
|
8
|
+
@screen-sm: 576px;
|
|
9
|
+
@screen-md: 768px;
|
|
10
|
+
@screen-lg: 992px;
|
|
11
|
+
@screen-xl: 1200px;
|
|
12
|
+
@screen-xxl: 1600px;
|
|
13
|
+
|
|
14
|
+
// ============ Row 样式 ============
|
|
15
|
+
.@{prefix-row} {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-flow: row wrap;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
|
|
20
|
+
&::before,
|
|
21
|
+
&::after {
|
|
22
|
+
display: flex;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// ============ Col 样式 ============
|
|
27
|
+
.@{prefix-col} {
|
|
28
|
+
position: relative;
|
|
29
|
+
max-width: 100%;
|
|
30
|
+
min-height: 1px;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ============ 生成基础栅格 ============
|
|
35
|
+
.@{prefix-col}-0 { display: none; }
|
|
36
|
+
.@{prefix-col}-1 { flex: 0 0 4.16666667%; max-width: 4.16666667%; }
|
|
37
|
+
.@{prefix-col}-2 { flex: 0 0 8.33333333%; max-width: 8.33333333%; }
|
|
38
|
+
.@{prefix-col}-3 { flex: 0 0 12.5%; max-width: 12.5%; }
|
|
39
|
+
.@{prefix-col}-4 { flex: 0 0 16.66666667%; max-width: 16.66666667%; }
|
|
40
|
+
.@{prefix-col}-5 { flex: 0 0 20.83333333%; max-width: 20.83333333%; }
|
|
41
|
+
.@{prefix-col}-6 { flex: 0 0 25%; max-width: 25%; }
|
|
42
|
+
.@{prefix-col}-7 { flex: 0 0 29.16666667%; max-width: 29.16666667%; }
|
|
43
|
+
.@{prefix-col}-8 { flex: 0 0 33.33333333%; max-width: 33.33333333%; }
|
|
44
|
+
.@{prefix-col}-9 { flex: 0 0 37.5%; max-width: 37.5%; }
|
|
45
|
+
.@{prefix-col}-10 { flex: 0 0 41.66666667%; max-width: 41.66666667%; }
|
|
46
|
+
.@{prefix-col}-11 { flex: 0 0 45.83333333%; max-width: 45.83333333%; }
|
|
47
|
+
.@{prefix-col}-12 { flex: 0 0 50%; max-width: 50%; }
|
|
48
|
+
.@{prefix-col}-13 { flex: 0 0 54.16666667%; max-width: 54.16666667%; }
|
|
49
|
+
.@{prefix-col}-14 { flex: 0 0 58.33333333%; max-width: 58.33333333%; }
|
|
50
|
+
.@{prefix-col}-15 { flex: 0 0 62.5%; max-width: 62.5%; }
|
|
51
|
+
.@{prefix-col}-16 { flex: 0 0 66.66666667%; max-width: 66.66666667%; }
|
|
52
|
+
.@{prefix-col}-17 { flex: 0 0 70.83333333%; max-width: 70.83333333%; }
|
|
53
|
+
.@{prefix-col}-18 { flex: 0 0 75%; max-width: 75%; }
|
|
54
|
+
.@{prefix-col}-19 { flex: 0 0 79.16666667%; max-width: 79.16666667%; }
|
|
55
|
+
.@{prefix-col}-20 { flex: 0 0 83.33333333%; max-width: 83.33333333%; }
|
|
56
|
+
.@{prefix-col}-21 { flex: 0 0 87.5%; max-width: 87.5%; }
|
|
57
|
+
.@{prefix-col}-22 { flex: 0 0 91.66666667%; max-width: 91.66666667%; }
|
|
58
|
+
.@{prefix-col}-23 { flex: 0 0 95.83333333%; max-width: 95.83333333%; }
|
|
59
|
+
.@{prefix-col}-24 { flex: 0 0 100%; max-width: 100%; }
|
|
60
|
+
|
|
61
|
+
// ============ Offset ============
|
|
62
|
+
.@{prefix-col}-offset-0 { margin-left: 0; }
|
|
63
|
+
.@{prefix-col}-offset-1 { margin-left: 4.16666667%; }
|
|
64
|
+
.@{prefix-col}-offset-2 { margin-left: 8.33333333%; }
|
|
65
|
+
.@{prefix-col}-offset-3 { margin-left: 12.5%; }
|
|
66
|
+
.@{prefix-col}-offset-4 { margin-left: 16.66666667%; }
|
|
67
|
+
.@{prefix-col}-offset-5 { margin-left: 20.83333333%; }
|
|
68
|
+
.@{prefix-col}-offset-6 { margin-left: 25%; }
|
|
69
|
+
.@{prefix-col}-offset-7 { margin-left: 29.16666667%; }
|
|
70
|
+
.@{prefix-col}-offset-8 { margin-left: 33.33333333%; }
|
|
71
|
+
.@{prefix-col}-offset-9 { margin-left: 37.5%; }
|
|
72
|
+
.@{prefix-col}-offset-10 { margin-left: 41.66666667%; }
|
|
73
|
+
.@{prefix-col}-offset-11 { margin-left: 45.83333333%; }
|
|
74
|
+
.@{prefix-col}-offset-12 { margin-left: 50%; }
|
|
75
|
+
.@{prefix-col}-offset-13 { margin-left: 54.16666667%; }
|
|
76
|
+
.@{prefix-col}-offset-14 { margin-left: 58.33333333%; }
|
|
77
|
+
.@{prefix-col}-offset-15 { margin-left: 62.5%; }
|
|
78
|
+
.@{prefix-col}-offset-16 { margin-left: 66.66666667%; }
|
|
79
|
+
.@{prefix-col}-offset-17 { margin-left: 70.83333333%; }
|
|
80
|
+
.@{prefix-col}-offset-18 { margin-left: 75%; }
|
|
81
|
+
.@{prefix-col}-offset-19 { margin-left: 79.16666667%; }
|
|
82
|
+
.@{prefix-col}-offset-20 { margin-left: 83.33333333%; }
|
|
83
|
+
.@{prefix-col}-offset-21 { margin-left: 87.5%; }
|
|
84
|
+
.@{prefix-col}-offset-22 { margin-left: 91.66666667%; }
|
|
85
|
+
.@{prefix-col}-offset-23 { margin-left: 95.83333333%; }
|
|
86
|
+
.@{prefix-col}-offset-24 { margin-left: 100%; }
|
|
87
|
+
|
|
88
|
+
// ============ Order ============
|
|
89
|
+
.@{prefix-col}-order-0 { order: 0; }
|
|
90
|
+
.@{prefix-col}-order-1 { order: 1; }
|
|
91
|
+
.@{prefix-col}-order-2 { order: 2; }
|
|
92
|
+
.@{prefix-col}-order-3 { order: 3; }
|
|
93
|
+
.@{prefix-col}-order-4 { order: 4; }
|
|
94
|
+
.@{prefix-col}-order-5 { order: 5; }
|
|
95
|
+
.@{prefix-col}-order-6 { order: 6; }
|
|
96
|
+
.@{prefix-col}-order-7 { order: 7; }
|
|
97
|
+
.@{prefix-col}-order-8 { order: 8; }
|
|
98
|
+
.@{prefix-col}-order-9 { order: 9; }
|
|
99
|
+
.@{prefix-col}-order-10 { order: 10; }
|
|
100
|
+
.@{prefix-col}-order-11 { order: 11; }
|
|
101
|
+
.@{prefix-col}-order-12 { order: 12; }
|
|
102
|
+
|
|
103
|
+
// ============ 响应式 xs ============
|
|
104
|
+
.@{prefix-col}-xs-0 { display: none; }
|
|
105
|
+
.@{prefix-col}-xs-1 { flex: 0 0 4.16666667%; max-width: 4.16666667%; }
|
|
106
|
+
.@{prefix-col}-xs-2 { flex: 0 0 8.33333333%; max-width: 8.33333333%; }
|
|
107
|
+
.@{prefix-col}-xs-3 { flex: 0 0 12.5%; max-width: 12.5%; }
|
|
108
|
+
.@{prefix-col}-xs-4 { flex: 0 0 16.66666667%; max-width: 16.66666667%; }
|
|
109
|
+
.@{prefix-col}-xs-5 { flex: 0 0 20.83333333%; max-width: 20.83333333%; }
|
|
110
|
+
.@{prefix-col}-xs-6 { flex: 0 0 25%; max-width: 25%; }
|
|
111
|
+
.@{prefix-col}-xs-7 { flex: 0 0 29.16666667%; max-width: 29.16666667%; }
|
|
112
|
+
.@{prefix-col}-xs-8 { flex: 0 0 33.33333333%; max-width: 33.33333333%; }
|
|
113
|
+
.@{prefix-col}-xs-9 { flex: 0 0 37.5%; max-width: 37.5%; }
|
|
114
|
+
.@{prefix-col}-xs-10 { flex: 0 0 41.66666667%; max-width: 41.66666667%; }
|
|
115
|
+
.@{prefix-col}-xs-11 { flex: 0 0 45.83333333%; max-width: 45.83333333%; }
|
|
116
|
+
.@{prefix-col}-xs-12 { flex: 0 0 50%; max-width: 50%; }
|
|
117
|
+
.@{prefix-col}-xs-13 { flex: 0 0 54.16666667%; max-width: 54.16666667%; }
|
|
118
|
+
.@{prefix-col}-xs-14 { flex: 0 0 58.33333333%; max-width: 58.33333333%; }
|
|
119
|
+
.@{prefix-col}-xs-15 { flex: 0 0 62.5%; max-width: 62.5%; }
|
|
120
|
+
.@{prefix-col}-xs-16 { flex: 0 0 66.66666667%; max-width: 66.66666667%; }
|
|
121
|
+
.@{prefix-col}-xs-17 { flex: 0 0 70.83333333%; max-width: 70.83333333%; }
|
|
122
|
+
.@{prefix-col}-xs-18 { flex: 0 0 75%; max-width: 75%; }
|
|
123
|
+
.@{prefix-col}-xs-19 { flex: 0 0 79.16666667%; max-width: 79.16666667%; }
|
|
124
|
+
.@{prefix-col}-xs-20 { flex: 0 0 83.33333333%; max-width: 83.33333333%; }
|
|
125
|
+
.@{prefix-col}-xs-21 { flex: 0 0 87.5%; max-width: 87.5%; }
|
|
126
|
+
.@{prefix-col}-xs-22 { flex: 0 0 91.66666667%; max-width: 91.66666667%; }
|
|
127
|
+
.@{prefix-col}-xs-23 { flex: 0 0 95.83333333%; max-width: 95.83333333%; }
|
|
128
|
+
.@{prefix-col}-xs-24 { flex: 0 0 100%; max-width: 100%; }
|
|
129
|
+
|
|
130
|
+
// ============ 响应式 sm ============
|
|
131
|
+
@media (min-width: @screen-sm) {
|
|
132
|
+
.@{prefix-col}-sm-0 { display: none; }
|
|
133
|
+
.@{prefix-col}-sm-1 { display: block; flex: 0 0 4.16666667%; max-width: 4.16666667%; }
|
|
134
|
+
.@{prefix-col}-sm-2 { display: block; flex: 0 0 8.33333333%; max-width: 8.33333333%; }
|
|
135
|
+
.@{prefix-col}-sm-3 { display: block; flex: 0 0 12.5%; max-width: 12.5%; }
|
|
136
|
+
.@{prefix-col}-sm-4 { display: block; flex: 0 0 16.66666667%; max-width: 16.66666667%; }
|
|
137
|
+
.@{prefix-col}-sm-5 { display: block; flex: 0 0 20.83333333%; max-width: 20.83333333%; }
|
|
138
|
+
.@{prefix-col}-sm-6 { display: block; flex: 0 0 25%; max-width: 25%; }
|
|
139
|
+
.@{prefix-col}-sm-7 { display: block; flex: 0 0 29.16666667%; max-width: 29.16666667%; }
|
|
140
|
+
.@{prefix-col}-sm-8 { display: block; flex: 0 0 33.33333333%; max-width: 33.33333333%; }
|
|
141
|
+
.@{prefix-col}-sm-9 { display: block; flex: 0 0 37.5%; max-width: 37.5%; }
|
|
142
|
+
.@{prefix-col}-sm-10 { display: block; flex: 0 0 41.66666667%; max-width: 41.66666667%; }
|
|
143
|
+
.@{prefix-col}-sm-11 { display: block; flex: 0 0 45.83333333%; max-width: 45.83333333%; }
|
|
144
|
+
.@{prefix-col}-sm-12 { display: block; flex: 0 0 50%; max-width: 50%; }
|
|
145
|
+
.@{prefix-col}-sm-13 { display: block; flex: 0 0 54.16666667%; max-width: 54.16666667%; }
|
|
146
|
+
.@{prefix-col}-sm-14 { display: block; flex: 0 0 58.33333333%; max-width: 58.33333333%; }
|
|
147
|
+
.@{prefix-col}-sm-15 { display: block; flex: 0 0 62.5%; max-width: 62.5%; }
|
|
148
|
+
.@{prefix-col}-sm-16 { display: block; flex: 0 0 66.66666667%; max-width: 66.66666667%; }
|
|
149
|
+
.@{prefix-col}-sm-17 { display: block; flex: 0 0 70.83333333%; max-width: 70.83333333%; }
|
|
150
|
+
.@{prefix-col}-sm-18 { display: block; flex: 0 0 75%; max-width: 75%; }
|
|
151
|
+
.@{prefix-col}-sm-19 { display: block; flex: 0 0 79.16666667%; max-width: 79.16666667%; }
|
|
152
|
+
.@{prefix-col}-sm-20 { display: block; flex: 0 0 83.33333333%; max-width: 83.33333333%; }
|
|
153
|
+
.@{prefix-col}-sm-21 { display: block; flex: 0 0 87.5%; max-width: 87.5%; }
|
|
154
|
+
.@{prefix-col}-sm-22 { display: block; flex: 0 0 91.66666667%; max-width: 91.66666667%; }
|
|
155
|
+
.@{prefix-col}-sm-23 { display: block; flex: 0 0 95.83333333%; max-width: 95.83333333%; }
|
|
156
|
+
.@{prefix-col}-sm-24 { display: block; flex: 0 0 100%; max-width: 100%; }
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// ============ 响应式 md ============
|
|
160
|
+
@media (min-width: @screen-md) {
|
|
161
|
+
.@{prefix-col}-md-0 { display: none; }
|
|
162
|
+
.@{prefix-col}-md-1 { display: block; flex: 0 0 4.16666667%; max-width: 4.16666667%; }
|
|
163
|
+
.@{prefix-col}-md-2 { display: block; flex: 0 0 8.33333333%; max-width: 8.33333333%; }
|
|
164
|
+
.@{prefix-col}-md-3 { display: block; flex: 0 0 12.5%; max-width: 12.5%; }
|
|
165
|
+
.@{prefix-col}-md-4 { display: block; flex: 0 0 16.66666667%; max-width: 16.66666667%; }
|
|
166
|
+
.@{prefix-col}-md-5 { display: block; flex: 0 0 20.83333333%; max-width: 20.83333333%; }
|
|
167
|
+
.@{prefix-col}-md-6 { display: block; flex: 0 0 25%; max-width: 25%; }
|
|
168
|
+
.@{prefix-col}-md-7 { display: block; flex: 0 0 29.16666667%; max-width: 29.16666667%; }
|
|
169
|
+
.@{prefix-col}-md-8 { display: block; flex: 0 0 33.33333333%; max-width: 33.33333333%; }
|
|
170
|
+
.@{prefix-col}-md-9 { display: block; flex: 0 0 37.5%; max-width: 37.5%; }
|
|
171
|
+
.@{prefix-col}-md-10 { display: block; flex: 0 0 41.66666667%; max-width: 41.66666667%; }
|
|
172
|
+
.@{prefix-col}-md-11 { display: block; flex: 0 0 45.83333333%; max-width: 45.83333333%; }
|
|
173
|
+
.@{prefix-col}-md-12 { display: block; flex: 0 0 50%; max-width: 50%; }
|
|
174
|
+
.@{prefix-col}-md-13 { display: block; flex: 0 0 54.16666667%; max-width: 54.16666667%; }
|
|
175
|
+
.@{prefix-col}-md-14 { display: block; flex: 0 0 58.33333333%; max-width: 58.33333333%; }
|
|
176
|
+
.@{prefix-col}-md-15 { display: block; flex: 0 0 62.5%; max-width: 62.5%; }
|
|
177
|
+
.@{prefix-col}-md-16 { display: block; flex: 0 0 66.66666667%; max-width: 66.66666667%; }
|
|
178
|
+
.@{prefix-col}-md-17 { display: block; flex: 0 0 70.83333333%; max-width: 70.83333333%; }
|
|
179
|
+
.@{prefix-col}-md-18 { display: block; flex: 0 0 75%; max-width: 75%; }
|
|
180
|
+
.@{prefix-col}-md-19 { display: block; flex: 0 0 79.16666667%; max-width: 79.16666667%; }
|
|
181
|
+
.@{prefix-col}-md-20 { display: block; flex: 0 0 83.33333333%; max-width: 83.33333333%; }
|
|
182
|
+
.@{prefix-col}-md-21 { display: block; flex: 0 0 87.5%; max-width: 87.5%; }
|
|
183
|
+
.@{prefix-col}-md-22 { display: block; flex: 0 0 91.66666667%; max-width: 91.66666667%; }
|
|
184
|
+
.@{prefix-col}-md-23 { display: block; flex: 0 0 95.83333333%; max-width: 95.83333333%; }
|
|
185
|
+
.@{prefix-col}-md-24 { display: block; flex: 0 0 100%; max-width: 100%; }
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// ============ 响应式 lg ============
|
|
189
|
+
@media (min-width: @screen-lg) {
|
|
190
|
+
.@{prefix-col}-lg-0 { display: none; }
|
|
191
|
+
.@{prefix-col}-lg-1 { display: block; flex: 0 0 4.16666667%; max-width: 4.16666667%; }
|
|
192
|
+
.@{prefix-col}-lg-2 { display: block; flex: 0 0 8.33333333%; max-width: 8.33333333%; }
|
|
193
|
+
.@{prefix-col}-lg-3 { display: block; flex: 0 0 12.5%; max-width: 12.5%; }
|
|
194
|
+
.@{prefix-col}-lg-4 { display: block; flex: 0 0 16.66666667%; max-width: 16.66666667%; }
|
|
195
|
+
.@{prefix-col}-lg-5 { display: block; flex: 0 0 20.83333333%; max-width: 20.83333333%; }
|
|
196
|
+
.@{prefix-col}-lg-6 { display: block; flex: 0 0 25%; max-width: 25%; }
|
|
197
|
+
.@{prefix-col}-lg-7 { display: block; flex: 0 0 29.16666667%; max-width: 29.16666667%; }
|
|
198
|
+
.@{prefix-col}-lg-8 { display: block; flex: 0 0 33.33333333%; max-width: 33.33333333%; }
|
|
199
|
+
.@{prefix-col}-lg-9 { display: block; flex: 0 0 37.5%; max-width: 37.5%; }
|
|
200
|
+
.@{prefix-col}-lg-10 { display: block; flex: 0 0 41.66666667%; max-width: 41.66666667%; }
|
|
201
|
+
.@{prefix-col}-lg-11 { display: block; flex: 0 0 45.83333333%; max-width: 45.83333333%; }
|
|
202
|
+
.@{prefix-col}-lg-12 { display: block; flex: 0 0 50%; max-width: 50%; }
|
|
203
|
+
.@{prefix-col}-lg-13 { display: block; flex: 0 0 54.16666667%; max-width: 54.16666667%; }
|
|
204
|
+
.@{prefix-col}-lg-14 { display: block; flex: 0 0 58.33333333%; max-width: 58.33333333%; }
|
|
205
|
+
.@{prefix-col}-lg-15 { display: block; flex: 0 0 62.5%; max-width: 62.5%; }
|
|
206
|
+
.@{prefix-col}-lg-16 { display: block; flex: 0 0 66.66666667%; max-width: 66.66666667%; }
|
|
207
|
+
.@{prefix-col}-lg-17 { display: block; flex: 0 0 70.83333333%; max-width: 70.83333333%; }
|
|
208
|
+
.@{prefix-col}-lg-18 { display: block; flex: 0 0 75%; max-width: 75%; }
|
|
209
|
+
.@{prefix-col}-lg-19 { display: block; flex: 0 0 79.16666667%; max-width: 79.16666667%; }
|
|
210
|
+
.@{prefix-col}-lg-20 { display: block; flex: 0 0 83.33333333%; max-width: 83.33333333%; }
|
|
211
|
+
.@{prefix-col}-lg-21 { display: block; flex: 0 0 87.5%; max-width: 87.5%; }
|
|
212
|
+
.@{prefix-col}-lg-22 { display: block; flex: 0 0 91.66666667%; max-width: 91.66666667%; }
|
|
213
|
+
.@{prefix-col}-lg-23 { display: block; flex: 0 0 95.83333333%; max-width: 95.83333333%; }
|
|
214
|
+
.@{prefix-col}-lg-24 { display: block; flex: 0 0 100%; max-width: 100%; }
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// ============ 响应式 xl ============
|
|
218
|
+
@media (min-width: @screen-xl) {
|
|
219
|
+
.@{prefix-col}-xl-0 { display: none; }
|
|
220
|
+
.@{prefix-col}-xl-1 { display: block; flex: 0 0 4.16666667%; max-width: 4.16666667%; }
|
|
221
|
+
.@{prefix-col}-xl-2 { display: block; flex: 0 0 8.33333333%; max-width: 8.33333333%; }
|
|
222
|
+
.@{prefix-col}-xl-3 { display: block; flex: 0 0 12.5%; max-width: 12.5%; }
|
|
223
|
+
.@{prefix-col}-xl-4 { display: block; flex: 0 0 16.66666667%; max-width: 16.66666667%; }
|
|
224
|
+
.@{prefix-col}-xl-5 { display: block; flex: 0 0 20.83333333%; max-width: 20.83333333%; }
|
|
225
|
+
.@{prefix-col}-xl-6 { display: block; flex: 0 0 25%; max-width: 25%; }
|
|
226
|
+
.@{prefix-col}-xl-7 { display: block; flex: 0 0 29.16666667%; max-width: 29.16666667%; }
|
|
227
|
+
.@{prefix-col}-xl-8 { display: block; flex: 0 0 33.33333333%; max-width: 33.33333333%; }
|
|
228
|
+
.@{prefix-col}-xl-9 { display: block; flex: 0 0 37.5%; max-width: 37.5%; }
|
|
229
|
+
.@{prefix-col}-xl-10 { display: block; flex: 0 0 41.66666667%; max-width: 41.66666667%; }
|
|
230
|
+
.@{prefix-col}-xl-11 { display: block; flex: 0 0 45.83333333%; max-width: 45.83333333%; }
|
|
231
|
+
.@{prefix-col}-xl-12 { display: block; flex: 0 0 50%; max-width: 50%; }
|
|
232
|
+
.@{prefix-col}-xl-13 { display: block; flex: 0 0 54.16666667%; max-width: 54.16666667%; }
|
|
233
|
+
.@{prefix-col}-xl-14 { display: block; flex: 0 0 58.33333333%; max-width: 58.33333333%; }
|
|
234
|
+
.@{prefix-col}-xl-15 { display: block; flex: 0 0 62.5%; max-width: 62.5%; }
|
|
235
|
+
.@{prefix-col}-xl-16 { display: block; flex: 0 0 66.66666667%; max-width: 66.66666667%; }
|
|
236
|
+
.@{prefix-col}-xl-17 { display: block; flex: 0 0 70.83333333%; max-width: 70.83333333%; }
|
|
237
|
+
.@{prefix-col}-xl-18 { display: block; flex: 0 0 75%; max-width: 75%; }
|
|
238
|
+
.@{prefix-col}-xl-19 { display: block; flex: 0 0 79.16666667%; max-width: 79.16666667%; }
|
|
239
|
+
.@{prefix-col}-xl-20 { display: block; flex: 0 0 83.33333333%; max-width: 83.33333333%; }
|
|
240
|
+
.@{prefix-col}-xl-21 { display: block; flex: 0 0 87.5%; max-width: 87.5%; }
|
|
241
|
+
.@{prefix-col}-xl-22 { display: block; flex: 0 0 91.66666667%; max-width: 91.66666667%; }
|
|
242
|
+
.@{prefix-col}-xl-23 { display: block; flex: 0 0 95.83333333%; max-width: 95.83333333%; }
|
|
243
|
+
.@{prefix-col}-xl-24 { display: block; flex: 0 0 100%; max-width: 100%; }
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// ============ 响应式 xxl ============
|
|
247
|
+
@media (min-width: @screen-xxl) {
|
|
248
|
+
.@{prefix-col}-xxl-0 { display: none; }
|
|
249
|
+
.@{prefix-col}-xxl-1 { display: block; flex: 0 0 4.16666667%; max-width: 4.16666667%; }
|
|
250
|
+
.@{prefix-col}-xxl-2 { display: block; flex: 0 0 8.33333333%; max-width: 8.33333333%; }
|
|
251
|
+
.@{prefix-col}-xxl-3 { display: block; flex: 0 0 12.5%; max-width: 12.5%; }
|
|
252
|
+
.@{prefix-col}-xxl-4 { display: block; flex: 0 0 16.66666667%; max-width: 16.66666667%; }
|
|
253
|
+
.@{prefix-col}-xxl-5 { display: block; flex: 0 0 20.83333333%; max-width: 20.83333333%; }
|
|
254
|
+
.@{prefix-col}-xxl-6 { display: block; flex: 0 0 25%; max-width: 25%; }
|
|
255
|
+
.@{prefix-col}-xxl-7 { display: block; flex: 0 0 29.16666667%; max-width: 29.16666667%; }
|
|
256
|
+
.@{prefix-col}-xxl-8 { display: block; flex: 0 0 33.33333333%; max-width: 33.33333333%; }
|
|
257
|
+
.@{prefix-col}-xxl-9 { display: block; flex: 0 0 37.5%; max-width: 37.5%; }
|
|
258
|
+
.@{prefix-col}-xxl-10 { display: block; flex: 0 0 41.66666667%; max-width: 41.66666667%; }
|
|
259
|
+
.@{prefix-col}-xxl-11 { display: block; flex: 0 0 45.83333333%; max-width: 45.83333333%; }
|
|
260
|
+
.@{prefix-col}-xxl-12 { display: block; flex: 0 0 50%; max-width: 50%; }
|
|
261
|
+
.@{prefix-col}-xxl-13 { display: block; flex: 0 0 54.16666667%; max-width: 54.16666667%; }
|
|
262
|
+
.@{prefix-col}-xxl-14 { display: block; flex: 0 0 58.33333333%; max-width: 58.33333333%; }
|
|
263
|
+
.@{prefix-col}-xxl-15 { display: block; flex: 0 0 62.5%; max-width: 62.5%; }
|
|
264
|
+
.@{prefix-col}-xxl-16 { display: block; flex: 0 0 66.66666667%; max-width: 66.66666667%; }
|
|
265
|
+
.@{prefix-col}-xxl-17 { display: block; flex: 0 0 70.83333333%; max-width: 70.83333333%; }
|
|
266
|
+
.@{prefix-col}-xxl-18 { display: block; flex: 0 0 75%; max-width: 75%; }
|
|
267
|
+
.@{prefix-col}-xxl-19 { display: block; flex: 0 0 79.16666667%; max-width: 79.16666667%; }
|
|
268
|
+
.@{prefix-col}-xxl-20 { display: block; flex: 0 0 83.33333333%; max-width: 83.33333333%; }
|
|
269
|
+
.@{prefix-col}-xxl-21 { display: block; flex: 0 0 87.5%; max-width: 87.5%; }
|
|
270
|
+
.@{prefix-col}-xxl-22 { display: block; flex: 0 0 91.66666667%; max-width: 91.66666667%; }
|
|
271
|
+
.@{prefix-col}-xxl-23 { display: block; flex: 0 0 95.83333333%; max-width: 95.83333333%; }
|
|
272
|
+
.@{prefix-col}-xxl-24 { display: block; flex: 0 0 100%; max-width: 100%; }
|
|
273
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.less';
|
|
3
|
+
export interface LayoutProps {
|
|
4
|
+
/** 是否有侧边栏(自动检测子组件) */
|
|
5
|
+
hasSider?: boolean;
|
|
6
|
+
/** 子元素 */
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/** 自定义类名 */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** 自定义样式 */
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
interface LayoutComponent extends React.FC<LayoutProps> {
|
|
14
|
+
Header: typeof Header;
|
|
15
|
+
Sider: typeof Sider;
|
|
16
|
+
Content: typeof Content;
|
|
17
|
+
Footer: typeof Footer;
|
|
18
|
+
}
|
|
19
|
+
export interface HeaderProps {
|
|
20
|
+
/** 子元素 */
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
/** 自定义类名 */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** 自定义样式 */
|
|
25
|
+
style?: React.CSSProperties;
|
|
26
|
+
}
|
|
27
|
+
export declare const Header: React.FC<HeaderProps>;
|
|
28
|
+
export interface SiderProps {
|
|
29
|
+
/** 宽度 */
|
|
30
|
+
width?: number | string;
|
|
31
|
+
/** 收缩后的宽度 */
|
|
32
|
+
collapsedWidth?: number | string;
|
|
33
|
+
/** 是否可收起 */
|
|
34
|
+
collapsible?: boolean;
|
|
35
|
+
/** 是否收起状态 */
|
|
36
|
+
collapsed?: boolean;
|
|
37
|
+
/** 默认收起状态 */
|
|
38
|
+
defaultCollapsed?: boolean;
|
|
39
|
+
/** 收起时触发 */
|
|
40
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
41
|
+
/** 触发器位置 */
|
|
42
|
+
trigger?: React.ReactNode | null;
|
|
43
|
+
/** 主题颜色 */
|
|
44
|
+
theme?: 'light' | 'dark';
|
|
45
|
+
/** 断点,触发响应式布局 */
|
|
46
|
+
breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
47
|
+
/** 子元素 */
|
|
48
|
+
children?: React.ReactNode;
|
|
49
|
+
/** 自定义类名 */
|
|
50
|
+
className?: string;
|
|
51
|
+
/** 自定义样式 */
|
|
52
|
+
style?: React.CSSProperties;
|
|
53
|
+
}
|
|
54
|
+
export declare const Sider: React.FC<SiderProps>;
|
|
55
|
+
export interface ContentProps {
|
|
56
|
+
/** 子元素 */
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
/** 自定义类名 */
|
|
59
|
+
className?: string;
|
|
60
|
+
/** 自定义样式 */
|
|
61
|
+
style?: React.CSSProperties;
|
|
62
|
+
}
|
|
63
|
+
export declare const Content: React.FC<ContentProps>;
|
|
64
|
+
export interface FooterProps {
|
|
65
|
+
/** 子元素 */
|
|
66
|
+
children?: React.ReactNode;
|
|
67
|
+
/** 自定义类名 */
|
|
68
|
+
className?: string;
|
|
69
|
+
/** 自定义样式 */
|
|
70
|
+
style?: React.CSSProperties;
|
|
71
|
+
}
|
|
72
|
+
export declare const Footer: React.FC<FooterProps>;
|
|
73
|
+
declare const Layout: LayoutComponent;
|
|
74
|
+
export default Layout;
|