@lemon-fe/kits 1.0.0-116 → 1.0.0-118

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.
@@ -28,8 +28,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
28
28
 
29
29
  import React, { useState, cloneElement, useRef, useEffect, useContext } from 'react';
30
30
  import { Modal, Input, message, ConfigProvider } from 'antd';
31
- import SearchIcon from "../Icons/Search";
32
31
  import { prefixClassName } from "../utils";
32
+ import SearchIcon from "../Icons/Search";
33
33
  import Icons from "../Icons";
34
34
  var prefix = prefixClassName('popup');
35
35
 
@@ -0,0 +1,8 @@
1
+ import { type TooltipProps } from 'antd';
2
+ import type { ReactNode } from 'react';
3
+ interface TipMarkProps extends Omit<TooltipProps, 'title' | 'overlay'> {
4
+ infoContent: string | ReactNode;
5
+ mode?: string;
6
+ }
7
+ declare const TipMark: ({ infoContent, mode, placement, style, className, ...props }: TipMarkProps) => JSX.Element;
8
+ export default TipMark;
@@ -0,0 +1,60 @@
1
+ var _excluded = ["infoContent", "mode", "placement", "style", "className"];
2
+
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
+
5
+ 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; }
6
+
7
+ 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; }
8
+
9
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
+
11
+ 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; }
12
+
13
+ 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; }
14
+
15
+ import { Tooltip, Popover } from 'antd';
16
+ import { prefixClassName } from "../utils";
17
+ import classNames from 'classnames';
18
+ import React from 'react';
19
+
20
+ var TipMark = function TipMark(_ref) {
21
+ var infoContent = _ref.infoContent,
22
+ _ref$mode = _ref.mode,
23
+ mode = _ref$mode === void 0 ? 'toolTip' : _ref$mode,
24
+ _ref$placement = _ref.placement,
25
+ placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
26
+ style = _ref.style,
27
+ className = _ref.className,
28
+ props = _objectWithoutProperties(_ref, _excluded);
29
+
30
+ var prefix = prefixClassName('tip-mark');
31
+ var icon = /*#__PURE__*/React.createElement("svg", {
32
+ xmlns: "http://www.w3.org/2000/svg",
33
+ width: "12",
34
+ height: "12",
35
+ viewBox: "0 0 12 12",
36
+ style: _objectSpread({
37
+ marginLeft: 2
38
+ }, style),
39
+ className: classNames(prefix(), className)
40
+ }, /*#__PURE__*/React.createElement("path", {
41
+ fill: "#333",
42
+ fillRule: "evenodd",
43
+ d: "M6 0a6 6 0 1 1 0 12A6 6 0 0 1 6 0Zm-.061 8.04a.673.673 0 0 0-.48.183.613.613 0 0 0-.193.471c0 .192.062.35.193.472a.68.68 0 0 0 .48.192c.192 0 .35-.061.48-.183a.639.639 0 0 0 .201-.48c0-.193-.07-.35-.192-.472a.694.694 0 0 0-.49-.184ZM6.096 3c-.646 0-1.153.183-1.528.55C4.183 3.917 4 4.424 4 5.07h.996c0-.367.07-.655.218-.856.166-.245.437-.358.82-.358.298 0 .534.078.7.244.157.166.244.393.244.682a.967.967 0 0 1-.236.62l-.104.122c-.568.507-.909.873-1.022 1.11-.123.235-.175.523-.175.855v.122h1.004V7.49c0-.21.044-.393.131-.568.079-.157.193-.305.35-.436.14-.123.26-.23.363-.323l.18-.164c.103-.096.173-.164.208-.203.21-.28.323-.638.323-1.074 0-.533-.175-.952-.524-1.258C7.126 3.148 6.664 3 6.096 3Z",
44
+ opacity: ".5"
45
+ }));
46
+
47
+ if (mode === 'toolTip') {
48
+ return /*#__PURE__*/React.createElement(Tooltip, _extends({
49
+ title: infoContent,
50
+ placement: placement
51
+ }, props), icon);
52
+ }
53
+
54
+ return /*#__PURE__*/React.createElement(Popover, _extends({
55
+ content: infoContent,
56
+ placement: placement
57
+ }, props), icon);
58
+ };
59
+
60
+ export default TipMark;
package/es/index.d.ts CHANGED
@@ -36,6 +36,7 @@ export * from './components/DataGrid/hooks';
36
36
  export type { ColDef, ColGroupDef, ColumnState, GridOptions, GridReadyEvent, ICellEditorParams, ICellRendererParams, IHeaderParams, RowDataUpdatedEvent, CellValueChangedEvent, NavigateToNextCellParams, TabToNextCellParams, AgGridEvent, GroupCellRendererParams as IGroupCellRendererParams, Column, CellPosition, } from '@ag-grid-community/core';
37
37
  export { GridApi, ColumnApi } from '@ag-grid-community/core';
38
38
  export * from '@ag-grid-community/react';
39
+ export { default as TipMark } from './components/TipMark';
39
40
  export { default as BasicLayout } from './layouts/BasicLayout';
40
41
  export { default as BlankLayout } from './layouts/BlankLayout';
41
42
  export { default as MicroLayout } from './layouts/MicroLayout';
package/es/index.js CHANGED
@@ -29,6 +29,7 @@ export * from "./components/DataGrid/typings";
29
29
  export * from "./components/DataGrid/hooks";
30
30
  export { GridApi, ColumnApi } from '@ag-grid-community/core';
31
31
  export * from '@ag-grid-community/react';
32
+ export { default as TipMark } from "./components/TipMark";
32
33
  export { default as BasicLayout } from "./layouts/BasicLayout";
33
34
  export { default as BlankLayout } from "./layouts/BlankLayout";
34
35
  export { default as MicroLayout } from "./layouts/MicroLayout";
@@ -244,3 +244,6 @@ span.@{ant-prefix}-radio + * {
244
244
  margin-right: 4px;
245
245
  }
246
246
  }
247
+
248
+ /** tooltip **/
249
+ @tooltip-arrow-width: 5px * sqrt(2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "1.0.0-116",
3
+ "version": "1.0.0-118",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -38,7 +38,7 @@
38
38
  "@ag-grid-community/react": "29.2.0",
39
39
  "@ag-grid-community/styles": "29.2.0",
40
40
  "@ant-design/icons": "^4.7.0",
41
- "@lemon-fe/hooks": "^0.1.142",
41
+ "@lemon-fe/hooks": "^0.1.147",
42
42
  "@lemon-fe/utils": "^0.1.117",
43
43
  "antd": "4.24.8",
44
44
  "async-validator": "^4.2.5",
@@ -84,6 +84,7 @@
84
84
  "gh-pages": "^3.0.0",
85
85
  "husky": "^8.0.1",
86
86
  "lint-staged": "^10.0.7",
87
+ "prettier-plugin-sort-imports": "^1.7.2",
87
88
  "react": "^18.2.0",
88
89
  "react-dom": "^18.2.0"
89
90
  }