@pisell/materials 1.0.402 → 1.0.404
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/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +4 -4
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +16 -59
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +19 -62
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/date-picker/index.js +2 -2
- package/es/components/drag-sort-tree/index.d.ts +1 -0
- package/es/components/drag-sort-tree/index.js +1 -2
- package/es/components/pisell-config-provider/index.js +0 -2
- package/es/components/pisellModal/components/functions/index.d.ts +5 -23
- package/es/components/pisellModal/components/functions/index.js +2 -7
- package/es/components/pisellModal/index.d.ts +5 -20
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.js +26 -30
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +1 -3
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.js +21 -25
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.js +31 -34
- package/es/components/table/Actions/component/ExportImport/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/index.js +25 -32
- package/es/components/table/BasicTable/index.js +2 -1
- package/es/components/table/Gallery/index.js +1 -2
- package/es/components/table/Table/fields/rangePicker/Edit/index.js +11 -13
- package/es/components/table/Table/index.d.ts +2 -2
- package/es/components/table/Table/index.js +42 -68
- package/es/components/table/Table/index.less +0 -3
- package/es/components/table/Table/utils.d.ts +3 -15
- package/es/components/table/Table/utils.js +2 -6
- package/es/components/table/View/index.d.ts +2 -2
- package/es/components/table/View/index.js +16 -20
- package/es/components/table/hooks/useTableSetting.js +7 -29
- package/es/components/table/hooks/useTransDataSource.d.ts +0 -1
- package/es/components/table/hooks/useTransDataSource.js +4 -6
- package/es/components/table/index.js +5 -8
- package/es/components/table/index.less +0 -4
- package/es/components/table/serve.d.ts +0 -1
- package/es/components/table/serve.js +7 -38
- package/es/components/table/types.d.ts +0 -2
- package/es/index.d.ts +1 -3
- package/es/index.js +1 -3
- package/es/locales/en-US.d.ts +0 -12
- package/es/locales/en-US.js +0 -13
- package/es/locales/zh-CN.d.ts +0 -12
- package/es/locales/zh-CN.js +0 -13
- package/es/locales/zh-TW.d.ts +0 -12
- package/es/locales/zh-TW.js +0 -13
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/drag-sort-tree/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/index.js +1 -0
- package/lib/components/pisell-config-provider/index.js +0 -2
- package/lib/components/pisellModal/components/functions/index.d.ts +5 -23
- package/lib/components/pisellModal/components/functions/index.js +7 -13
- package/lib/components/pisellModal/index.d.ts +5 -20
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.js +2 -6
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +1 -2
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.js +2 -6
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.js +2 -4
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/index.js +8 -13
- package/lib/components/table/BasicTable/index.js +2 -1
- package/lib/components/table/Gallery/index.js +1 -2
- package/lib/components/table/Table/fields/rangePicker/Edit/index.js +9 -1
- package/lib/components/table/Table/index.d.ts +2 -2
- package/lib/components/table/Table/index.js +34 -61
- package/lib/components/table/Table/index.less +0 -3
- package/lib/components/table/Table/utils.d.ts +3 -15
- package/lib/components/table/Table/utils.js +1 -7
- package/lib/components/table/View/index.d.ts +2 -2
- package/lib/components/table/View/index.js +19 -23
- package/lib/components/table/hooks/useTableSetting.js +11 -26
- package/lib/components/table/hooks/useTransDataSource.d.ts +0 -1
- package/lib/components/table/hooks/useTransDataSource.js +4 -5
- package/lib/components/table/index.js +4 -5
- package/lib/components/table/index.less +0 -4
- package/lib/components/table/serve.d.ts +0 -1
- package/lib/components/table/serve.js +4 -24
- package/lib/components/table/types.d.ts +0 -2
- package/lib/index.d.ts +1 -3
- package/lib/index.js +0 -6
- package/lib/locales/en-US.d.ts +0 -12
- package/lib/locales/en-US.js +0 -13
- package/lib/locales/zh-CN.d.ts +0 -12
- package/lib/locales/zh-CN.js +0 -13
- package/lib/locales/zh-TW.d.ts +0 -12
- package/lib/locales/zh-TW.js +0 -13
- package/package.json +3 -3
- package/es/components/browserSelect/chevron-down.png +0 -0
- package/es/components/browserSelect/index.d.ts +0 -15
- package/es/components/browserSelect/index.js +0 -36
- package/es/components/browserSelect/index.less +0 -18
- package/es/components/date-picker/constants.d.ts +0 -39
- package/es/components/date-picker/constants.js +0 -76
- package/es/components/date-picker/datePickerCpt.d.ts +0 -8
- package/es/components/date-picker/datePickerCpt.js +0 -370
- package/es/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
- package/es/components/date-picker/hooks/useMediaQuery.js +0 -28
- package/es/components/date-picker/index.less +0 -1880
- package/es/components/picker-view/index.d.ts +0 -2
- package/es/components/picker-view/index.js +0 -2
- package/es/components/pisellTags/index.d.ts +0 -13
- package/es/components/pisellTags/index.js +0 -83
- package/es/components/pisellTags/index.less +0 -17
- package/es/components/pisellTags/utils.d.ts +0 -1
- package/es/components/pisellTags/utils.js +0 -89
- package/lib/components/browserSelect/chevron-down.png +0 -0
- package/lib/components/browserSelect/index.d.ts +0 -15
- package/lib/components/browserSelect/index.js +0 -59
- package/lib/components/browserSelect/index.less +0 -18
- package/lib/components/date-picker/constants.d.ts +0 -39
- package/lib/components/date-picker/constants.js +0 -78
- package/lib/components/date-picker/datePickerCpt.d.ts +0 -8
- package/lib/components/date-picker/datePickerCpt.js +0 -403
- package/lib/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
- package/lib/components/date-picker/hooks/useMediaQuery.js +0 -43
- package/lib/components/date-picker/index.less +0 -1880
- package/lib/components/picker-view/index.d.ts +0 -2
- package/lib/components/picker-view/index.js +0 -36
- package/lib/components/pisellTags/index.d.ts +0 -13
- package/lib/components/pisellTags/index.js +0 -113
- package/lib/components/pisellTags/index.less +0 -17
- package/lib/components/pisellTags/utils.d.ts +0 -1
- package/lib/components/pisellTags/utils.js +0 -86
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
export declare type PisellTagsType = 'pill_color' | 'pill_outline';
|
|
4
|
-
export declare type PisellTagsColor = 'success' | 'warning' | 'error' | 'gray' | string;
|
|
5
|
-
export interface PisellTagsProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
others?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
|
|
8
|
-
type: PisellTagsType;
|
|
9
|
-
icon?: React.ReactNode;
|
|
10
|
-
color?: PisellTagsColor;
|
|
11
|
-
}
|
|
12
|
-
declare const PisellTags: (props: PisellTagsProps) => React.JSX.Element;
|
|
13
|
-
export default PisellTags;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["children", "type", "icon", "color", "style", "others"];
|
|
3
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
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; }
|
|
7
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
-
import React, { useMemo } from 'react';
|
|
12
|
-
import classNames from 'classnames';
|
|
13
|
-
import { generateColorShades } from "./utils";
|
|
14
|
-
import "./index.less";
|
|
15
|
-
|
|
16
|
-
// Pisell Tags 样式类型
|
|
17
|
-
|
|
18
|
-
// 预设颜色枚举
|
|
19
|
-
var pisellTagsColors = {
|
|
20
|
-
success: '#067647',
|
|
21
|
-
warning: '#B54708',
|
|
22
|
-
error: '#B42318',
|
|
23
|
-
gray: '#344054'
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @title: 获取颜色
|
|
28
|
-
* @description:
|
|
29
|
-
* @param {PisellTagsColor} _color
|
|
30
|
-
* @return {*}
|
|
31
|
-
* @Author: zhiwei.Wang
|
|
32
|
-
* @Date: 2024-08-23 16:07
|
|
33
|
-
*/
|
|
34
|
-
var getColor = function getColor(_color) {
|
|
35
|
-
if (_color) {
|
|
36
|
-
return pisellTagsColors[_color] || _color;
|
|
37
|
-
}
|
|
38
|
-
return '#344054';
|
|
39
|
-
};
|
|
40
|
-
var getPillColorStyles = function getPillColorStyles(_color) {
|
|
41
|
-
var colorShades = generateColorShades(_color);
|
|
42
|
-
return {
|
|
43
|
-
'--pisell-tags-bg-color': colorShades['color_50'],
|
|
44
|
-
'--pisell-tags-font-color': colorShades['color_700'],
|
|
45
|
-
'--pisell-tags-border-color': colorShades['color_200']
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
var getPillOutlineStyles = function getPillOutlineStyles(_color) {
|
|
49
|
-
var colorShades = generateColorShades(_color);
|
|
50
|
-
return {
|
|
51
|
-
'--pisell-tags-bg-color': 'transparent',
|
|
52
|
-
'--pisell-tags-font-color': colorShades['color_700'],
|
|
53
|
-
'--pisell-tags-border-color': colorShades['color_600']
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
var PisellTags = function PisellTags(props) {
|
|
57
|
-
var children = props.children,
|
|
58
|
-
type = props.type,
|
|
59
|
-
icon = props.icon,
|
|
60
|
-
color = props.color,
|
|
61
|
-
_props$style = props.style,
|
|
62
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
63
|
-
_props$others = props.others,
|
|
64
|
-
others = _props$others === void 0 ? {} : _props$others,
|
|
65
|
-
otherProps = _objectWithoutProperties(props, _excluded);
|
|
66
|
-
var styles = useMemo(function () {
|
|
67
|
-
var obj = _objectSpread(_objectSpread({}, style), others.style);
|
|
68
|
-
var _color = getColor(props.color);
|
|
69
|
-
if (type === 'pill_color') {
|
|
70
|
-
obj = _objectSpread(_objectSpread({}, obj), getPillColorStyles(_color));
|
|
71
|
-
}
|
|
72
|
-
if (type === 'pill_outline') {
|
|
73
|
-
obj = _objectSpread(_objectSpread({}, obj), getPillOutlineStyles(_color));
|
|
74
|
-
}
|
|
75
|
-
return obj;
|
|
76
|
-
}, [color, style, others.style, type]);
|
|
77
|
-
return /*#__PURE__*/React.createElement("span", _extends({
|
|
78
|
-
style: _objectSpread(_objectSpread({}, styles), style)
|
|
79
|
-
}, others, otherProps, {
|
|
80
|
-
className: classNames('pisell-tags', others.className, otherProps.className)
|
|
81
|
-
}), icon ? icon : null, children);
|
|
82
|
-
};
|
|
83
|
-
export default PisellTags;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
.pisell-tags {
|
|
2
|
-
--pisell-tags-bg-color: #F9FAFB;
|
|
3
|
-
--pisell-tags-font-color: #344054;
|
|
4
|
-
--pisell-tags-border-color: #EAECF0;
|
|
5
|
-
border-radius: 16px;
|
|
6
|
-
border: 1px solid var(--pisell-tags-border-color);
|
|
7
|
-
background: var(--pisell-tags-bg-color);
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
padding: 4px 12px;
|
|
10
|
-
align-items: center;
|
|
11
|
-
gap: 6px;
|
|
12
|
-
|
|
13
|
-
color: var(--pisell-tags-font-color);
|
|
14
|
-
font-size: 14px;
|
|
15
|
-
font-style: normal;
|
|
16
|
-
font-weight: 500;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const generateColorShades: (color: string) => Record<string, string>;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// 定义 RGB 类型,包括 r, g, b 和可选的 a(透明度)分量
|
|
2
|
-
|
|
3
|
-
// 辅助函数:将 16 进制颜色转换为 RGB
|
|
4
|
-
var hexToRgb = function hexToRgb(hex) {
|
|
5
|
-
hex = hex.replace(/^#/, ''); // 去掉开头的 #
|
|
6
|
-
if (hex.length === 3) {
|
|
7
|
-
// 处理三位颜色码,扩展为六位颜色码
|
|
8
|
-
hex = hex.split('').map(function (h) {
|
|
9
|
-
return h + h;
|
|
10
|
-
}).join('');
|
|
11
|
-
}
|
|
12
|
-
var intVal = parseInt(hex, 16); // 将 16 进制转换为整数
|
|
13
|
-
return {
|
|
14
|
-
r: intVal >> 16 & 255,
|
|
15
|
-
// 提取红色分量
|
|
16
|
-
g: intVal >> 8 & 255,
|
|
17
|
-
// 提取绿色分量
|
|
18
|
-
b: intVal & 255 // 提取蓝色分量
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// 辅助函数:将 RGB 转换为 16 进制颜色
|
|
23
|
-
var rgbToHex = function rgbToHex(r, g, b) {
|
|
24
|
-
return '#' + [r, g, b].map(function (x) {
|
|
25
|
-
var hex = x.toString(16); // 将数值转换为 16 进制字符串
|
|
26
|
-
return hex.length === 1 ? '0' + hex : hex; // 确保每个分量都是两位
|
|
27
|
-
}).join(''); // 将 RGB 分量组合为 16 进制颜色码
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
// 辅助函数:解析输入的颜色字符串,并返回 RGB 或 RGBA 对象
|
|
31
|
-
var parseColor = function parseColor(color) {
|
|
32
|
-
if (color.startsWith('#')) {
|
|
33
|
-
return hexToRgb(color); // 处理 16 进制颜色
|
|
34
|
-
} else if (color.startsWith('rgb')) {
|
|
35
|
-
// 处理 RGB 或 RGBA 颜色
|
|
36
|
-
var rgba = color.replace(/rgba?\(|\s+|\)/g, '').split(',').map(Number);
|
|
37
|
-
return {
|
|
38
|
-
r: rgba[0],
|
|
39
|
-
g: rgba[1],
|
|
40
|
-
b: rgba[2],
|
|
41
|
-
a: rgba[3] !== undefined ? rgba[3] : 1
|
|
42
|
-
};
|
|
43
|
-
} else {
|
|
44
|
-
throw new Error('无效的颜色格式');
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
// 生成颜色阶梯的函数
|
|
49
|
-
export var generateColorShades = function generateColorShades(color) {
|
|
50
|
-
var _parseColor = parseColor(color),
|
|
51
|
-
r = _parseColor.r,
|
|
52
|
-
g = _parseColor.g,
|
|
53
|
-
b = _parseColor.b,
|
|
54
|
-
a = _parseColor.a;
|
|
55
|
-
var max = 700;
|
|
56
|
-
var gap = 1 / max;
|
|
57
|
-
|
|
58
|
-
// 定义相对于 700 阶梯的 50, 200, 500 阶梯的比例
|
|
59
|
-
var ratios = {
|
|
60
|
-
50: gap * 50,
|
|
61
|
-
200: gap * 200,
|
|
62
|
-
500: gap * 500,
|
|
63
|
-
600: gap * 600,
|
|
64
|
-
700: gap * 700
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
// 调整颜色分量的函数,基于比例计算新的分量值
|
|
68
|
-
var adjustColorComponent = function adjustColorComponent(component, ratio) {
|
|
69
|
-
return Math.round(component * ratio + 255 * (1 - ratio));
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
// 生成不同阶梯的颜色
|
|
73
|
-
var shades = {
|
|
74
|
-
'color_50': rgbToHex(adjustColorComponent(r, ratios[50]), adjustColorComponent(g, ratios[50]), adjustColorComponent(b, ratios[50])),
|
|
75
|
-
'color_200': rgbToHex(adjustColorComponent(r, ratios[200]), adjustColorComponent(g, ratios[200]), adjustColorComponent(b, ratios[200])),
|
|
76
|
-
'color_500': rgbToHex(adjustColorComponent(r, ratios[500]), adjustColorComponent(g, ratios[500]), adjustColorComponent(b, ratios[500])),
|
|
77
|
-
'color_600': rgbToHex(adjustColorComponent(r, ratios[600]), adjustColorComponent(g, ratios[600]), adjustColorComponent(b, ratios[600])),
|
|
78
|
-
'color_700': color
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
// 如果原始颜色带有透明度 (RGBA),在返回结果中包含透明度信息
|
|
82
|
-
if (a !== undefined) {
|
|
83
|
-
shades['color_50'] = "rgba(".concat(adjustColorComponent(r, ratios[50]), ", ").concat(adjustColorComponent(g, ratios[50]), ", ").concat(adjustColorComponent(b, ratios[50]), ", ").concat(a, ")");
|
|
84
|
-
shades['color_200'] = "rgba(".concat(adjustColorComponent(r, ratios[200]), ", ").concat(adjustColorComponent(g, ratios[200]), ", ").concat(adjustColorComponent(b, ratios[200]), ", ").concat(a, ")");
|
|
85
|
-
shades['color_500'] = "rgba(".concat(adjustColorComponent(r, ratios[500]), ", ").concat(adjustColorComponent(g, ratios[500]), ", ").concat(adjustColorComponent(b, ratios[500]), ", ").concat(a, ")");
|
|
86
|
-
shades['color_600'] = "rgba(".concat(adjustColorComponent(r, ratios[600]), ", ").concat(adjustColorComponent(g, ratios[600]), ", ").concat(adjustColorComponent(b, ratios[600]), ", ").concat(a, ")");
|
|
87
|
-
}
|
|
88
|
-
return shades;
|
|
89
|
-
};
|
|
Binary file
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "./index.less";
|
|
3
|
-
interface BrowserSelectProps extends React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> {
|
|
4
|
-
options: any[];
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* @title: 系统级别的下拉框
|
|
8
|
-
* @description:
|
|
9
|
-
* @param {BrowserSelectProps} props
|
|
10
|
-
* @return {*}
|
|
11
|
-
* @Author: zhiwei.Wang
|
|
12
|
-
* @Date: 2024-01-30 16:43
|
|
13
|
-
*/
|
|
14
|
-
declare const BrowserSelect: (props: BrowserSelectProps) => React.JSX.Element;
|
|
15
|
-
export default BrowserSelect;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/components/browserSelect/index.tsx
|
|
30
|
-
var browserSelect_exports = {};
|
|
31
|
-
__export(browserSelect_exports, {
|
|
32
|
-
default: () => browserSelect_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(browserSelect_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_classnames = __toESM(require("classnames"));
|
|
37
|
-
var import_index = require("./index.less");
|
|
38
|
-
var BrowserSelect = (props) => {
|
|
39
|
-
const { options, ...resetProps } = props;
|
|
40
|
-
const _options = (0, import_react.useMemo)(() => {
|
|
41
|
-
return (props.options || []).map((d) => {
|
|
42
|
-
return /* @__PURE__ */ import_react.default.createElement("option", { value: d.value, key: d.value }, d.label);
|
|
43
|
-
});
|
|
44
|
-
}, [props.options]);
|
|
45
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
46
|
-
"select",
|
|
47
|
-
{
|
|
48
|
-
...resetProps,
|
|
49
|
-
className: (0, import_classnames.default)("date-picker-pisell-browser-select", resetProps.className),
|
|
50
|
-
onChange: (e) => {
|
|
51
|
-
var _a;
|
|
52
|
-
e.persist();
|
|
53
|
-
(_a = resetProps.onChange) == null ? void 0 : _a.call(resetProps, e);
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
_options
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
var browserSelect_default = BrowserSelect;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.date-picker-pisell-browser-select {
|
|
2
|
-
padding: 9px 16px;
|
|
3
|
-
border-radius: 8px;
|
|
4
|
-
background-color: #fff;
|
|
5
|
-
background-image: url('./chevron-down.png');
|
|
6
|
-
color: var(--Gray-true-900, #141414);
|
|
7
|
-
font-size: 16px;
|
|
8
|
-
font-style: normal;
|
|
9
|
-
font-weight: 600;
|
|
10
|
-
border: 1px solid var(--Gray-300, #D0D5DD);
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
appearance: none;
|
|
13
|
-
-webkit-appearance: none;
|
|
14
|
-
-moz-appearance: none;
|
|
15
|
-
background-position: right 10px center;
|
|
16
|
-
background-size: 12px;
|
|
17
|
-
background-repeat: no-repeat;
|
|
18
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
export declare const presetDetailMap: {
|
|
3
|
-
today: {
|
|
4
|
-
getValue: () => dayjs.Dayjs;
|
|
5
|
-
label: () => any;
|
|
6
|
-
};
|
|
7
|
-
yesterday: {
|
|
8
|
-
getValue: () => dayjs.Dayjs;
|
|
9
|
-
label: () => any;
|
|
10
|
-
};
|
|
11
|
-
tomorrow: {
|
|
12
|
-
getValue: () => dayjs.Dayjs;
|
|
13
|
-
label: () => any;
|
|
14
|
-
};
|
|
15
|
-
next_monday: {
|
|
16
|
-
getValue: () => dayjs.Dayjs;
|
|
17
|
-
label: () => any;
|
|
18
|
-
};
|
|
19
|
-
last_friday: {
|
|
20
|
-
getValue: () => dayjs.Dayjs;
|
|
21
|
-
label: () => any;
|
|
22
|
-
};
|
|
23
|
-
first_day_of_this_month: {
|
|
24
|
-
getValue: () => dayjs.Dayjs;
|
|
25
|
-
label: () => any;
|
|
26
|
-
};
|
|
27
|
-
last_day_of_this_month: {
|
|
28
|
-
getValue: () => dayjs.Dayjs;
|
|
29
|
-
label: () => any;
|
|
30
|
-
};
|
|
31
|
-
first_day_of_next_month: {
|
|
32
|
-
getValue: () => dayjs.Dayjs;
|
|
33
|
-
label: () => any;
|
|
34
|
-
};
|
|
35
|
-
last_day_of_last_month: {
|
|
36
|
-
getValue: () => dayjs.Dayjs;
|
|
37
|
-
label: () => any;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/components/date-picker/constants.ts
|
|
30
|
-
var constants_exports = {};
|
|
31
|
-
__export(constants_exports, {
|
|
32
|
-
presetDetailMap: () => presetDetailMap
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(constants_exports);
|
|
35
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
36
|
-
var import_locales = require("../../locales");
|
|
37
|
-
var presetDetailMap = {
|
|
38
|
-
today: {
|
|
39
|
-
getValue: () => (0, import_dayjs.default)().startOf("day"),
|
|
40
|
-
label: () => (0, import_locales.getText)("date-picker-today")
|
|
41
|
-
},
|
|
42
|
-
yesterday: {
|
|
43
|
-
getValue: () => (0, import_dayjs.default)().add(-1, "d").startOf("day"),
|
|
44
|
-
label: () => (0, import_locales.getText)("date-picker-yesterday")
|
|
45
|
-
},
|
|
46
|
-
tomorrow: {
|
|
47
|
-
getValue: () => (0, import_dayjs.default)().add(1, "d").startOf("day"),
|
|
48
|
-
label: () => (0, import_locales.getText)("date-picker-tomorrow")
|
|
49
|
-
},
|
|
50
|
-
next_monday: {
|
|
51
|
-
getValue: () => (0, import_dayjs.default)().startOf("week").add(8, "day").startOf("day"),
|
|
52
|
-
label: () => (0, import_locales.getText)("date-picker-next_monday")
|
|
53
|
-
},
|
|
54
|
-
last_friday: {
|
|
55
|
-
getValue: () => (0, import_dayjs.default)().subtract(1, "week").startOf("week").add(5, "day").startOf("day"),
|
|
56
|
-
label: () => (0, import_locales.getText)("date-picker-last_friday")
|
|
57
|
-
},
|
|
58
|
-
first_day_of_this_month: {
|
|
59
|
-
getValue: () => (0, import_dayjs.default)().startOf("month").startOf("day"),
|
|
60
|
-
label: () => (0, import_locales.getText)("date-picker-first_day_of_this_month")
|
|
61
|
-
},
|
|
62
|
-
last_day_of_this_month: {
|
|
63
|
-
getValue: () => (0, import_dayjs.default)().endOf("month").startOf("day"),
|
|
64
|
-
label: () => (0, import_locales.getText)("date-picker-last_day_of_this_month")
|
|
65
|
-
},
|
|
66
|
-
first_day_of_next_month: {
|
|
67
|
-
getValue: () => (0, import_dayjs.default)().endOf("month").add(1, "day").startOf("day"),
|
|
68
|
-
label: () => (0, import_locales.getText)("date-picker-first_day_of_next_month")
|
|
69
|
-
},
|
|
70
|
-
last_day_of_last_month: {
|
|
71
|
-
getValue: () => (0, import_dayjs.default)().startOf("month").subtract(1, "day").startOf("day"),
|
|
72
|
-
label: () => (0, import_locales.getText)("date-picker-last_day_of_last_month")
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
-
0 && (module.exports = {
|
|
77
|
-
presetDetailMap
|
|
78
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PickerDateProps } from 'antd/es/date-picker/generatePicker';
|
|
3
|
-
import { Dayjs } from 'dayjs';
|
|
4
|
-
import './index.less';
|
|
5
|
-
interface DatePickerCptProps extends PickerDateProps<Dayjs> {
|
|
6
|
-
}
|
|
7
|
-
declare const DatePickerCpt: (props: DatePickerCptProps) => React.JSX.Element;
|
|
8
|
-
export default DatePickerCpt;
|