@lingxiteam/theme-utils 0.1.15 → 0.2.0

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.
Files changed (58) hide show
  1. package/README.md +5 -11
  2. package/dist/config/Button.js +1 -1
  3. package/dist/config/Card.js +1 -1
  4. package/dist/config/Cascader.d.ts +0 -1
  5. package/dist/config/Cascader.js +1 -2
  6. package/dist/config/Checkbox.d.ts +0 -1
  7. package/dist/config/Checkbox.js +1 -2
  8. package/dist/config/CheckboxGroup.d.ts +0 -1
  9. package/dist/config/CheckboxGroup.js +1 -2
  10. package/dist/config/Container.d.ts +0 -1
  11. package/dist/config/Container.js +1 -2
  12. package/dist/config/DatePicker.d.ts +0 -1
  13. package/dist/config/DatePicker.js +1 -2
  14. package/dist/config/Description.d.ts +0 -1
  15. package/dist/config/Description.js +0 -1
  16. package/dist/config/Form.d.ts +0 -1
  17. package/dist/config/Form.js +1 -2
  18. package/dist/config/Radio.d.ts +0 -1
  19. package/dist/config/Radio.js +1 -2
  20. package/dist/config/RangePicker.d.ts +0 -1
  21. package/dist/config/RangePicker.js +1 -2
  22. package/dist/config/Select.d.ts +0 -1
  23. package/dist/config/Select.js +1 -2
  24. package/dist/config/StdUpload.d.ts +0 -1
  25. package/dist/config/StdUpload.js +1 -2
  26. package/dist/config/Tabs.js +1 -1
  27. package/dist/config/Tag.d.ts +53 -0
  28. package/dist/config/Tag.js +232 -1
  29. package/dist/config/TimePicker.d.ts +0 -1
  30. package/dist/config/TimePicker.js +1 -2
  31. package/dist/config/TreeSelect.d.ts +0 -1
  32. package/dist/config/TreeSelect.js +1 -2
  33. package/dist/css.d.ts +1 -1
  34. package/dist/css.js +1 -2
  35. package/dist/h5config/Accordion.d.ts +0 -1
  36. package/dist/h5config/Accordion.js +1 -2
  37. package/dist/h5config/Card.d.ts +0 -1
  38. package/dist/h5config/Card.js +1 -2
  39. package/dist/h5config/DForm.d.ts +0 -2
  40. package/dist/h5config/DForm.js +1 -3
  41. package/dist/h5config/DformFile.d.ts +0 -1
  42. package/dist/h5config/DformFile.js +1 -2
  43. package/dist/h5config/DformSwitch.d.ts +0 -1
  44. package/dist/h5config/DformSwitch.js +1 -2
  45. package/dist/h5config/FilterItems.d.ts +0 -1
  46. package/dist/h5config/FilterItems.js +1 -2
  47. package/dist/h5config/Grid.js +1 -1
  48. package/dist/h5config/NoticeBarPlus.js +1 -1
  49. package/dist/h5config/SearchView.js +1 -1
  50. package/dist/h5config/StaticTabs.d.ts +18 -1
  51. package/dist/h5config/StaticTabs.js +23 -12
  52. package/dist/h5config/Table.d.ts +1 -2
  53. package/dist/h5config/Table.js +3 -4
  54. package/dist/lx-mobile.d.ts +0 -2
  55. package/dist/lx-mobile.js +6 -16
  56. package/dist/lx.d.ts +0 -2
  57. package/dist/lx.js +4 -14
  58. package/package.json +1 -1
@@ -1,6 +1,5 @@
1
1
  export var StaticTabs = {
2
2
  type: 'StaticTabs',
3
- hasPrefixClass: true,
4
3
  variable: {
5
4
  // TODO: 代码中写死
6
5
  // headBgColor: {
@@ -59,6 +58,11 @@ export var StaticTabs = {
59
58
  label: '选项文本颜色',
60
59
  groupsName: '选项'
61
60
  },
61
+ lineHeight: {
62
+ type: 'px',
63
+ label: '选项文本行高',
64
+ groupsName: '选项'
65
+ },
62
66
  fontSize: {
63
67
  type: 'px',
64
68
  label: '选项文本尺寸',
@@ -85,11 +89,16 @@ export var StaticTabs = {
85
89
  value: '500'
86
90
  }]
87
91
  },
88
- // lineColor: {
89
- // type: 'color',
90
- // label: '头部下分割线颜色',
91
- // groupsName: '边框',
92
- // },
92
+ borderColor: {
93
+ type: 'color',
94
+ label: '边框颜色',
95
+ groupsName: '选项'
96
+ },
97
+ lineColor: {
98
+ type: 'color',
99
+ label: '头部下分割线颜色',
100
+ groupsName: '边框'
101
+ },
93
102
  bodyBgColor: {
94
103
  type: 'color',
95
104
  label: '内容区域背景颜色',
@@ -101,18 +110,20 @@ export var StaticTabs = {
101
110
  title: '静态标签页',
102
111
  defaultValue: [{
103
112
  selectTextColor: '#108ee9',
104
- textColor: '#FFF',
113
+ textColor: '#108ee9',
105
114
  selectBgColor: '#FFF',
106
- backgroundColor: '#108ee9',
115
+ backgroundColor: '#FFF',
107
116
  selectFontWeight: '400',
108
117
  fontWeight: '400',
109
118
  fontSize: '15px',
119
+ lineHeight: '100%',
110
120
  selectBorderRadius: '12px',
111
- bodyBgColor: 'rgba(0,0,0,0)'
112
- // lineColor: '#108ee9',
121
+ // paddingValue:'8px 0 8px 0',
122
+ bodyBgColor: 'rgba(0,0,0,0)',
123
+ borderColor: 'rgba(0,0,0,0)',
124
+ lineColor: '#108ee9'
113
125
  }],
114
-
115
- tpl: ".use-app-statictabs {\n .am-tabs-default-bar-content .am-tabs-default-bar-tab-active{\n background: selectBgColor;\n color: selectTextColor;\n position: relative;\n border-top-left-radius: selectBorderRadius;\n border-top-right-radius: selectBorderRadius;\n transform: perspective(200px) rotateX(25deg);\n transform-origin: top center;\n font-weight: selectFontWeight;\n }\n .am-tabs-default-bar-bottom .am-tabs-default-bar-content, .am-tabs-default-bar-top .am-tabs-default-bar-content{\n background: backgroundColor;\n }\n .am-tabs-bottom, .am-tabs-top{\n border-radius: selectBorderRadius;\n }\n .am-tabs-default-bar-content .am-tabs-default-bar-tab-active::before, .am-tabs-default-bar-content .am-tabs-default-bar-tab-active::after{\n background: radial-gradient(0.24rem at 0.3rem 0, transparent 0.3rem, selectBgColor 0.23rem);\n }\n .am-tabs-default-bar-tab{\n color: textColor;\n font-weight: fontWeight;\n font-size: fontSize;\n }\n .am-tabs-pane-wrap {\n background-color: bodyBgColor;\n }\n }\n",
126
+ tpl: "\n .am-tabs-default-bar-top .am-tabs-default-bar-tab{\nfont-weight: fontWeight;\nborder-top-left-radius: selectBorderRadius;\n border-top-right-radius: selectBorderRadius;\n color: textColor;\nfont-size: fontSize;\nborder: 1px solid borderColor;\nbackground-color: backgroundColor;\n }\n .am-tabs-default-bar-content .am-tabs-default-bar-tab-active::before, .am-tabs-default-bar-content .am-tabs-default-bar-tab-active::after{\n background: selectBgColor;\n }\n .am-tabs-default-bar-content .am-tabs-default-bar-tab-active::before{\n left: 0;\n }\n .am-tabs-bottom, .am-tabs-top{\n border-radius: selectBorderRadius;\n }\n .am-tabs-default-bar-content .am-tabs-default-bar-tab-active {\n background-color: selectBgColor;\n color: selectTextColor;\nfont-weight: selectFontWeight;\n }\n .am-tabs-pane-wrap{\n background-color: bodyBgColor;\n }\n .am-tabs-default-bar-animated .am-tabs-default-bar-underline{\n border-color: lineColor;\n }",
116
127
  components: [{
117
128
  id: 'StaticTabs_828878',
118
129
  label: '静态标签页',
@@ -1,6 +1,5 @@
1
- export declare const Table: {
1
+ export declare const DynamicTable: {
2
2
  type: string;
3
- hasPrefixClass: boolean;
4
3
  variable: {
5
4
  textColor: {
6
5
  type: string;
@@ -1,6 +1,5 @@
1
- export var Table = {
2
- type: 'Table',
3
- hasPrefixClass: true,
1
+ export var DynamicTable = {
2
+ type: 'DynamicTable',
4
3
  variable: {
5
4
  textColor: {
6
5
  type: 'color',
@@ -118,7 +117,7 @@ export var Table = {
118
117
  // fHeadBgColor: '#FAFAFA',
119
118
  }],
120
119
 
121
- tpl: ".appDynamicTable {\n .table-header{\n font-weight: fontWeight;\n font-size: fontSize;\n color: textColor;\n }\n .ag-header-row{\n font-size: headFontSize;\n }\n .table-body{\n --dynamic-table-header-bg-color: headBgColor;\n --ag-odd-row-background-color: bodyBgColor;\n --dynamic-table-header-color: headTextColor;\n }\n .ag-root-wrapper{\n border-radius: borderRadius;\n }\n .ag-theme-segmentation {\n --ag-background-color: bodyBgColor;\n --ag-borders-critical: borderColor;\n --ag-row-border-color: borderColor;\n --ag-header-border-color: borderColor;\n }\n .ag-theme-zebra {\n --ag-background-color: bodyBgColor;\n --ag-odd-row-background-color: zebraBgColor;\n --ag-borders: none;\n --ag-row-border-color: none;\n}\n .ag-theme-border {\n --ag-background-color: bodyBgColor;\n --ag-border-color: borderColor;\n --ag-cell-horizontal-border: solid borderColor;\n}\n }\n",
120
+ tpl: "\n .appDynamicTable {\n .table-header{\n font-weight: fontWeight;\n font-size: fontSize;\n color: textColor;\n }\n .ag-header-row{\n font-size: headFontSize;\n }\n .table-body{\n --dynamic-table-header-bg-color: headBgColor;\n --ag-odd-row-background-color: bodyBgColor;\n --dynamic-table-header-color: headTextColor;\n }\n .ag-root-wrapper{\n border-radius: borderRadius;\n }\n .ag-theme-segmentation {\n --ag-background-color: bodyBgColor;\n --ag-borders-critical: borderColor;\n --ag-row-border-color: borderColor;\n --ag-header-border-color: borderColor;\n }\n .ag-theme-zebra {\n --ag-background-color: bodyBgColor;\n --ag-odd-row-background-color: zebraBgColor;\n --ag-borders: none;\n --ag-row-border-color: none;\n}\n .ag-theme-border {\n --ag-background-color: bodyBgColor;\n --ag-border-color: borderColor;\n --ag-cell-horizontal-border: solid borderColor;\n}\n }\n",
122
121
  // tpl: `
123
122
  // .appDynamicTable {
124
123
  // .table-body{
@@ -1,5 +1,4 @@
1
1
  export declare const MOBILE_ASSETS_CSS_TPL: any;
2
- export declare const mobileExtend: any;
3
2
  export declare const MOBILE_ASSETS_COMPONENT_LIST: unknown[];
4
3
  export declare function getMobileItemByType(type: string): any;
5
4
  export declare function px2rem(obj: any): any;
@@ -8,4 +7,3 @@ export declare function parseValueRem(values: any): any;
8
7
  export declare function stringifyMobileCssByTypePreview(type: string, values: any): string;
9
8
  export declare function stringifyMobileCssByType(type: string, values: any): string;
10
9
  export declare function parseMobileCssByType(type: string, css: string): any;
11
- export declare function prefixMobileCSS(type: string, values: any, prefix: string): string;
package/dist/lx-mobile.js CHANGED
@@ -4,10 +4,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  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; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  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); }
7
- import { stringifyCss, parseCss, prefixAnyCSS } from "./css";
7
+ import { stringifyCss, parseCss } from "./css";
8
8
  import { objToListByGroupsName } from "./utils";
9
9
  import { Button } from "./h5config/Button";
10
- import { Table } from "./h5config/Table";
10
+ import { DynamicTable } from "./h5config/Table";
11
11
  import { FilterItems } from "./h5config/FilterItems";
12
12
  import { NoticeBarPlus } from "./h5config/NoticeBarPlus";
13
13
  import { StaticTabs } from "./h5config/StaticTabs";
@@ -39,7 +39,7 @@ export var MOBILE_ASSETS_CSS_TPL = {
39
39
  // TODO: 分割线 style 写死,最后修改方案
40
40
  // Divider,
41
41
  Card: Card,
42
- Table: Table,
42
+ DynamicTable: DynamicTable,
43
43
  FilterItems: FilterItems,
44
44
  NoticeBarPlus: NoticeBarPlus,
45
45
  StaticTabs: StaticTabs,
@@ -64,7 +64,7 @@ export var MOBILE_ASSETS_CSS_TPL = {
64
64
  DformFile: DformFile,
65
65
  Accordion: Accordion
66
66
  };
67
- export var mobileExtend = {
67
+ var extend = {
68
68
  DformInput: 'DForm',
69
69
  DformTextArea: 'DForm',
70
70
  DformInputNumber: 'DForm',
@@ -131,8 +131,8 @@ export function parseValueRem(values) {
131
131
 
132
132
  // 临时解决方案,将只对它有影响的值,生成继承的样式
133
133
  export function stringifyMobileCssByTypePreview(type, values) {
134
- if (mobileExtend[type]) {
135
- var cfg = getMobileItemByType(mobileExtend[type]);
134
+ if (extend[type]) {
135
+ var cfg = getMobileItemByType(extend[type]);
136
136
  var _item = getMobileItemByType(type);
137
137
  return stringifyCss(cfg.tpl, px2rem(_objectSpread(_objectSpread({}, cfg.defaultValue[0]), values))) + stringifyCss(_item.tpl, px2rem(values));
138
138
  }
@@ -146,14 +146,4 @@ export function stringifyMobileCssByType(type, values) {
146
146
  export function parseMobileCssByType(type, css) {
147
147
  var item = getMobileItemByType(type);
148
148
  return parseValueRem(parseCss(item.tpl, css));
149
- }
150
- export function prefixMobileCSS(type, values, prefix) {
151
- if (mobileExtend[type]) {
152
- var _cfg$itemCustomTpl;
153
- var cfg = getMobileItemByType(mobileExtend[type]);
154
- var _item2 = getMobileItemByType(type);
155
- return prefixAnyCSS(stringifyCss((_cfg$itemCustomTpl = cfg === null || cfg === void 0 ? void 0 : cfg.itemCustomTpl) !== null && _cfg$itemCustomTpl !== void 0 ? _cfg$itemCustomTpl : cfg === null || cfg === void 0 ? void 0 : cfg.tpl, px2rem(_objectSpread(_objectSpread({}, cfg.defaultValue[0]), values))), prefix, cfg === null || cfg === void 0 ? void 0 : cfg.hasPrefixClass) + prefixAnyCSS(stringifyCss(_item2.tpl, px2rem(values)), prefix, _item2 === null || _item2 === void 0 ? void 0 : _item2.hasPrefixClass);
156
- }
157
- var item = getMobileItemByType(type);
158
- return prefixAnyCSS(stringifyCss(item.tpl, px2rem(values)), prefix, item === null || item === void 0 ? void 0 : item.hasPrefixClass);
159
149
  }
package/dist/lx.d.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  export declare const ASSETS_CSS_TPL: any;
2
- export declare const pcExtend: any;
3
2
  export declare const ASSETS_COMPONENT_LIST: unknown[];
4
3
  export declare function getItemByType(type: string): any;
5
4
  export declare function stringifyCssByType(type: string, values: any): string;
6
5
  export declare function stringifyCssByTypePreview(type: string, values: any): string;
7
6
  export declare function parseCssByType(type: string, css: string): any;
8
- export declare function prefixCSS(type: string, values: any, prefix: string): string;
package/dist/lx.js CHANGED
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  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; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  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); }
7
- import { stringifyCss, parseCss, prefixAnyCSS } from "./css";
7
+ import { stringifyCss, parseCss } from "./css";
8
8
  import { objToListByGroupsName } from "./utils";
9
9
  import { Button } from "./config/Button";
10
10
  // 文本放在不同的组件下,会有不同的效果,暂不支持配置
@@ -64,7 +64,7 @@ export var ASSETS_CSS_TPL = {
64
64
  Tree: Tree,
65
65
  Description: Description
66
66
  };
67
- export var pcExtend = {
67
+ var extend = {
68
68
  Input: 'Form',
69
69
  TextArea: 'Form',
70
70
  InputNumber: 'Form',
@@ -97,8 +97,8 @@ export function stringifyCssByType(type, values) {
97
97
 
98
98
  // 临时解决方案,将只对它有影响的值,生成继承的样式
99
99
  export function stringifyCssByTypePreview(type, values) {
100
- if (pcExtend[type]) {
101
- var cfg = getItemByType(pcExtend[type]);
100
+ if (extend[type]) {
101
+ var cfg = getItemByType(extend[type]);
102
102
  var _item = getItemByType(type);
103
103
  return stringifyCss(cfg.tpl, _objectSpread(_objectSpread({}, cfg.defaultValue[0]), values)) + stringifyCss(_item.tpl, values);
104
104
  }
@@ -108,14 +108,4 @@ export function stringifyCssByTypePreview(type, values) {
108
108
  export function parseCssByType(type, css) {
109
109
  var item = getItemByType(type);
110
110
  return parseCss(item.tpl, css);
111
- }
112
- export function prefixCSS(type, values, prefix) {
113
- if (pcExtend[type]) {
114
- var _cfg$itemCustomTpl;
115
- var cfg = getItemByType(pcExtend[type]);
116
- var _item2 = getItemByType(type);
117
- return prefixAnyCSS(stringifyCss((_cfg$itemCustomTpl = cfg === null || cfg === void 0 ? void 0 : cfg.itemCustomTpl) !== null && _cfg$itemCustomTpl !== void 0 ? _cfg$itemCustomTpl : cfg === null || cfg === void 0 ? void 0 : cfg.tpl, _objectSpread(_objectSpread({}, cfg.defaultValue[0]), values)), prefix, cfg === null || cfg === void 0 ? void 0 : cfg.hasPrefixClass) + prefixAnyCSS(stringifyCss(_item2.tpl, values), prefix, _item2 === null || _item2 === void 0 ? void 0 : _item2.hasPrefixClass);
118
- }
119
- var item = getItemByType(type);
120
- return prefixAnyCSS(stringifyCss(item.tpl, values), prefix, item === null || item === void 0 ? void 0 : item.hasPrefixClass);
121
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingxiteam/theme-utils",
3
- "version": "0.1.15",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",