@type-dom/ui 0.0.5 → 0.0.6

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 (24) hide show
  1. package/package.json +4 -3
  2. package/src/components/basic/td-button/td-button.style.js +3 -3
  3. package/src/components/basic/td-link/td-link.style.d.ts +1 -1
  4. package/src/components/basic/td-link/td-link.style.js +3 -3
  5. package/src/components/basic/td-text/td-text.style.js +2 -2
  6. package/src/components/data/td-check-tag/td-check-tag.style.d.ts +1 -1
  7. package/src/components/data/td-check-tag/td-check-tag.style.js +2 -2
  8. package/src/components/data/td-descriptions/td-descriptions.style.js +3 -3
  9. package/src/components/data/td-image/util.js +1 -2
  10. package/src/components/data/td-result/td-result.style.d.ts +1 -1
  11. package/src/components/data/td-segmented/td-segmented.style.js +3 -3
  12. package/src/components/data/td-tag/td-tag.style.d.ts +1 -1
  13. package/src/components/data/td-tag/td-tag.style.js +3 -3
  14. package/src/components/feedback/td-alert/td-alert.style.js +3 -3
  15. package/src/components/feedback/td-focus-trap/utils.d.ts +1 -1
  16. package/src/components/feedback/td-message/td-message.style.js +3 -3
  17. package/src/components/feedback/td-message-box/td-message-box.style.js +3 -3
  18. package/src/components/feedback/td-notification/td-notification.class.js +1 -1
  19. package/src/components/feedback/td-notification/td-notification.style.js +3 -3
  20. package/src/components/form/td-input/widget/utils.js +1 -2
  21. package/src/components/navigation/td-affix/td-affix.class.d.ts +2 -2
  22. package/src/components/navigation/td-tabs/td-tabs.style.js +2 -2
  23. package/src/styles/function.js +10 -11
  24. package/src/styles/var.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@type-dom/ui",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "dependencies": {
5
5
  "@type-dom/svgs": "*",
6
6
  "rxjs": "^7.5.7",
@@ -16,5 +16,6 @@
16
16
  "publishConfig": {
17
17
  "access": "public",
18
18
  "registry": "https://registry.npmjs.org/"
19
- }
20
- }
19
+ },
20
+ "types": "./src/index.d.ts"
21
+ }
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.$buttonBorderRadius = exports.$borderRightColor = exports.buttonPlain = exports.$buttonPlainColors = exports.buttonVariant = exports.$buttonStateColors = exports.$tdButtonBase = exports.$sizeOpts = exports.$buttonIconSpanGap = void 0;
3
+ exports.$buttonBorderRadius = exports.$borderRightColor = exports.$buttonPlainColors = exports.$buttonStateColors = exports.$tdButtonBase = exports.$sizeOpts = exports.$buttonIconSpanGap = void 0;
4
+ exports.buttonVariant = buttonVariant;
5
+ exports.buttonPlain = buttonPlain;
4
6
  const var_1 = require("../../../styles/var");
5
7
  exports.$buttonIconSpanGap = {
6
8
  large: '8px',
@@ -108,7 +110,6 @@ function buttonVariant($type) {
108
110
  // @include button-plain($type);
109
111
  // }
110
112
  }
111
- exports.buttonVariant = buttonVariant;
112
113
  for (const $type of [
113
114
  'default',
114
115
  'primary',
@@ -146,7 +147,6 @@ function buttonPlain($type) {
146
147
  }
147
148
  };
148
149
  }
149
- exports.buttonPlain = buttonPlain;
150
150
  for (const $type of [
151
151
  'default',
152
152
  'primary',
@@ -12,5 +12,5 @@ export declare let $linkTextColor: string;
12
12
  export declare function useType(config?: ITdLinkConfig): void;
13
13
  export declare const $linkStyle: IStyle;
14
14
  export declare const $linkInnerStyle: IStyle;
15
- export declare const $linkStateColors: Record<IType, Record<string, IStyle<0 | (string & {}), string & {}>>>;
15
+ export declare const $linkStateColors: Record<IType, Record<string, IStyle>>;
16
16
  export declare function buttonVariant($type: IType): void;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buttonVariant = exports.$linkStateColors = exports.$linkInnerStyle = exports.$linkStyle = exports.useType = exports.$linkTextColor = exports.$link = void 0;
3
+ exports.$linkStateColors = exports.$linkInnerStyle = exports.$linkStyle = exports.$linkTextColor = exports.$link = void 0;
4
+ exports.useType = useType;
5
+ exports.buttonVariant = buttonVariant;
4
6
  const var_1 = require("../../../styles/var");
5
7
  // Link
6
8
  // css3 var in packages/theme-chalk/src/link.scss
@@ -22,7 +24,6 @@ function useType(config) {
22
24
  exports.$link.disabledTextColor = var_1.$colors[(config === null || config === void 0 ? void 0 : config.type) || 'default']['light-5'];
23
25
  buttonVariant((config === null || config === void 0 ? void 0 : config.type) || 'default');
24
26
  }
25
- exports.useType = useType;
26
27
  exports.$linkStyle = {
27
28
  display: 'inline-flex',
28
29
  flexDirection: 'row',
@@ -72,4 +73,3 @@ function buttonVariant($type) {
72
73
  }
73
74
  };
74
75
  }
75
- exports.buttonVariant = buttonVariant;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buttonVariant = exports.$textStateColors = exports.sizeOpts = exports.$baseText = void 0;
3
+ exports.$textStateColors = exports.sizeOpts = exports.$baseText = void 0;
4
+ exports.buttonVariant = buttonVariant;
4
5
  const var_1 = require("../../../styles/var");
5
6
  exports.$baseText = {
6
7
  alignSelf: 'center',
@@ -55,7 +56,6 @@ function buttonVariant($type) {
55
56
  }
56
57
  };
57
58
  }
58
- exports.buttonVariant = buttonVariant;
59
59
  for (const $type of [
60
60
  'primary',
61
61
  'success',
@@ -2,6 +2,6 @@ import { IStyle } from '@type-dom/css-type';
2
2
  import { IType } from '../../../styles/var';
3
3
  export declare const $checkTag: IStyle;
4
4
  export declare const $checkTagHover: IStyle;
5
- export declare const $checkTagChecked: Record<IType, IStyle<0 | (string & {}), string & {}>>;
5
+ export declare const $checkTagChecked: Record<IType, IStyle>;
6
6
  export declare const $checkTagCheckedHover: Record<IType, string>;
7
7
  export declare function useType(): void;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useType = exports.$checkTagCheckedHover = exports.$checkTagChecked = exports.$checkTagHover = exports.$checkTag = void 0;
3
+ exports.$checkTagCheckedHover = exports.$checkTagChecked = exports.$checkTagHover = exports.$checkTag = void 0;
4
+ exports.useType = useType;
4
5
  const var_1 = require("../../../styles/var");
5
6
  const transition_1 = require("../../../styles/transition");
6
7
  exports.$checkTag = {
@@ -36,4 +37,3 @@ function useType() {
36
37
  exports.$checkTagCheckedHover[type] = var_1.$colors[type]['light-7'];
37
38
  }
38
39
  }
39
- exports.useType = useType;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useBordered = exports.$descriptionsCellContentStyle = exports.$descriptionsCellLabelStyle = exports.$descriptionsItemVerticalLabelPaddingBottom = exports.useSize = exports.$descriptionsItemLabelMarginRight = exports.$descriptionsBodyTableCellStyle = exports.$descriptionsBodyTableStyle = exports.$descriptionsBodyStyle = exports.$descriptionsHeaderTitleStyle = exports.$descriptionsHeaderStyle = exports.$descriptionsStyle = exports.$descriptions = exports.$descriptionsCellFontSize = exports.$descriptionsBorderedCellPadding = exports.$descriptionsCellPaddingBottom = exports.$descriptionsTitleFontSize = exports.$descriptionsHeaderMarginBottom = void 0;
3
+ exports.$descriptionsCellContentStyle = exports.$descriptionsCellLabelStyle = exports.$descriptionsItemVerticalLabelPaddingBottom = exports.$descriptionsItemLabelMarginRight = exports.$descriptionsBodyTableCellStyle = exports.$descriptionsBodyTableStyle = exports.$descriptionsBodyStyle = exports.$descriptionsHeaderTitleStyle = exports.$descriptionsHeaderStyle = exports.$descriptionsStyle = exports.$descriptions = exports.$descriptionsCellFontSize = exports.$descriptionsBorderedCellPadding = exports.$descriptionsCellPaddingBottom = exports.$descriptionsTitleFontSize = exports.$descriptionsHeaderMarginBottom = void 0;
4
+ exports.useSize = useSize;
5
+ exports.useBordered = useBordered;
4
6
  const var_1 = require("../../../styles/var");
5
7
  const td_input_style_1 = require("../../form/td-input/td-input.style");
6
8
  exports.$descriptionsHeaderMarginBottom = {
@@ -101,7 +103,6 @@ function useSize(config) {
101
103
  }
102
104
  // }
103
105
  }
104
- exports.useSize = useSize;
105
106
  exports.$descriptionsItemVerticalLabelPaddingBottom = {
106
107
  large: '8px',
107
108
  default: '6px',
@@ -139,4 +140,3 @@ function useBordered(config) {
139
140
  }
140
141
  }
141
142
  }
142
- exports.useBordered = useBordered;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.wheelHandler = void 0;
3
+ exports.wheelHandler = wheelHandler;
4
4
  function wheelHandler(e) {
5
5
  if (!e.ctrlKey)
6
6
  return false;
@@ -16,4 +16,3 @@ function wheelHandler(e) {
16
16
  return false;
17
17
  }
18
18
  }
19
- exports.wheelHandler = wheelHandler;
@@ -13,4 +13,4 @@ export declare const $titlePStyle: IStyle;
13
13
  export declare const $subTitleStyle: IStyle;
14
14
  export declare const $subTitlePStyle: IStyle;
15
15
  export declare const $extraStyle: IStyle;
16
- export declare const $icon: Record<IType, IStyle<0 | (string & {}), string & {}>>;
16
+ export declare const $icon: Record<IType, IStyle>;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useSize = exports.useStyle = exports.$segmentedItemLabelStyle = exports.$segmentedItemInputStyle = exports.$segmentedItemSelectedStyle = exports.$segmentedItemStyle = exports.$segmentedGroupStyle = exports.$segmentedStyle = exports.$segmented = exports.$segmentedItemPadding = exports.$segmentedFontSize = exports.$segmentedBorderRadius = void 0;
3
+ exports.$segmentedItemLabelStyle = exports.$segmentedItemInputStyle = exports.$segmentedItemSelectedStyle = exports.$segmentedItemStyle = exports.$segmentedGroupStyle = exports.$segmentedStyle = exports.$segmented = exports.$segmentedItemPadding = exports.$segmentedFontSize = exports.$segmentedBorderRadius = void 0;
4
+ exports.useStyle = useStyle;
5
+ exports.useSize = useSize;
4
6
  const var_1 = require("../../../styles/var");
5
7
  const td_button_style_1 = require("../../basic/td-button/td-button.style");
6
8
  const td_input_style_1 = require("../../form/td-input/td-input.style");
@@ -129,7 +131,6 @@ function useStyle(config) {
129
131
  //
130
132
  // }
131
133
  }
132
- exports.useStyle = useStyle;
133
134
  function useSize(config) {
134
135
  const size = (config === null || config === void 0 ? void 0 : config.size) || 'default';
135
136
  exports.$segmentedStyle.minHeight = td_input_style_1.$inputHeight[size];
@@ -139,4 +140,3 @@ function useSize(config) {
139
140
  exports.$segmentedItemStyle.borderRadius = parseInt(exports.$segmentedBorderRadius[size]) - 2 + 'px';
140
141
  exports.$segmentedItemStyle.padding = exports.$segmentedItemPadding[size];
141
142
  }
142
- exports.useSize = useSize;
@@ -41,5 +41,5 @@ export declare const $tagTypes: Record<IType, {
41
41
  hit: string;
42
42
  }>;
43
43
  export declare function genTheme($backgroundColorWeight: string | false, $borderColorWeight: string, $hoverColorWeight: string): void;
44
- export declare const $tagSizes: Record<ISize, IStyle<0 | (string & {}), string & {}>>;
44
+ export declare const $tagSizes: Record<ISize, IStyle>;
45
45
  export declare function useType(): void;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useType = exports.$tagSizes = exports.genTheme = exports.$tagTypes = exports.$iconSize = exports.$tagIconSpanGap = exports.$tagBorderWidth = exports.$tagIconSize = exports.$tagPadding = exports.$tagHeight = exports.$tag = void 0;
3
+ exports.$tagSizes = exports.$tagTypes = exports.$iconSize = exports.$tagIconSpanGap = exports.$tagBorderWidth = exports.$tagIconSize = exports.$tagPadding = exports.$tagHeight = exports.$tag = void 0;
4
+ exports.genTheme = genTheme;
5
+ exports.useType = useType;
4
6
  const var_1 = require("../../../styles/var");
5
7
  exports.$tag = {
6
8
  fontSize: '12px',
@@ -50,7 +52,6 @@ function genTheme($backgroundColorWeight, $borderColorWeight, $hoverColorWeight)
50
52
  const hoverColor = returnVarList($hoverColorWeight, 'primary');
51
53
  console.log('hoverColor is ', hoverColor);
52
54
  }
53
- exports.genTheme = genTheme;
54
55
  function returnVarList($var, $type = 'primary') {
55
56
  console.log('returnVarList . ');
56
57
  let $list = var_1.$fillColor.blank;
@@ -77,4 +78,3 @@ function useType() {
77
78
  }
78
79
  }
79
80
  }
80
- exports.useType = useType;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useType = exports.useStyle = exports.$alertCloseBtnStyle = exports.$alertDescriptionStyle = exports.$alertTitleStyle = exports.$alertIconStyle = exports.$alertContentStyle = exports.$alertStyle = exports.$alert = void 0;
3
+ exports.$alertCloseBtnStyle = exports.$alertDescriptionStyle = exports.$alertTitleStyle = exports.$alertIconStyle = exports.$alertContentStyle = exports.$alertStyle = exports.$alert = void 0;
4
+ exports.useStyle = useStyle;
5
+ exports.useType = useType;
4
6
  const var_1 = require("../../../styles/var");
5
7
  exports.$alert = {
6
8
  padding: '8px 16px',
@@ -82,7 +84,6 @@ function useStyle(config) {
82
84
  exports.$alertTitleStyle.fontSize = exports.$alert.titleWithDescriptionFontSize;
83
85
  }
84
86
  }
85
- exports.useStyle = useStyle;
86
87
  function useType(config) {
87
88
  const effect = (config === null || config === void 0 ? void 0 : config.effect) || 'light';
88
89
  const $alertBgColor = var_1.$colors[(config === null || config === void 0 ? void 0 : config.type) || 'info']['light-9'];
@@ -99,4 +100,3 @@ function useType(config) {
99
100
  }
100
101
  // if (config.)
101
102
  }
102
- exports.useType = useType;
@@ -21,5 +21,5 @@ export declare const isFocusCausedByUserEvent: () => boolean;
21
21
  export declare const useFocusReason: () => {
22
22
  focusReason: typeof focusReason;
23
23
  };
24
- export declare const createFocusOutPreventedEvent: (detail: CustomEventInit['detail']) => CustomEvent<any>;
24
+ export declare const createFocusOutPreventedEvent: (detail: CustomEventInit["detail"]) => CustomEvent<any>;
25
25
  export {};
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useType = exports.$messageIconStyle = exports.useStyle = exports.$messageCloseBtnStyle = exports.$messageBadgeStyle = exports.$messageContentStyle = exports.$messageStyle = exports.$message = void 0;
3
+ exports.$messageIconStyle = exports.$messageCloseBtnStyle = exports.$messageBadgeStyle = exports.$messageContentStyle = exports.$messageStyle = exports.$message = void 0;
4
+ exports.useStyle = useStyle;
5
+ exports.useType = useType;
4
6
  const var_1 = require("../../../styles/var");
5
7
  exports.$message = {
6
8
  // bgColor: getCssVar('color', 'info', 'light-9'),
@@ -77,7 +79,6 @@ function useStyle(config) {
77
79
  exports.$messageStyle.boxShadow = undefined;
78
80
  }
79
81
  }
80
- exports.useStyle = useStyle;
81
82
  exports.$messageIconStyle = {};
82
83
  function useType(config) {
83
84
  const type = (config === null || config === void 0 ? void 0 : config.type) || 'info';
@@ -101,4 +102,3 @@ function useType(config) {
101
102
  exports.$messageContentStyle.overflowWrap = 'break-word';
102
103
  exports.$messageIconStyle.color = $messageTextColor;
103
104
  }
104
- exports.useType = useType;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useType = exports.useStyle = exports.$messageBoxBtnsStyle = exports.$messageBoxErrorMsgStyle = exports.$messageBoxMessagePStyle = exports.$messageBoxMessageStyle = exports.$messageBoxStatusStyle = exports.$messageBoxInputStyle = exports.$messageBoxContainerStyle = exports.$messageBoxContentStyle = exports.$messageBoxHeaderBtnStyle = exports.$messageBoxTitleStyle = exports.$messageBoxHeaderCloseStyle = exports.$messageBoxHeaderStyle = exports.$messageBoxOverlayStyle = exports.$messageBoxStyle = exports.$messageBox = void 0;
3
+ exports.$messageBoxBtnsStyle = exports.$messageBoxErrorMsgStyle = exports.$messageBoxMessagePStyle = exports.$messageBoxMessageStyle = exports.$messageBoxStatusStyle = exports.$messageBoxInputStyle = exports.$messageBoxContainerStyle = exports.$messageBoxContentStyle = exports.$messageBoxHeaderBtnStyle = exports.$messageBoxTitleStyle = exports.$messageBoxHeaderCloseStyle = exports.$messageBoxHeaderStyle = exports.$messageBoxOverlayStyle = exports.$messageBoxStyle = exports.$messageBox = void 0;
4
+ exports.useStyle = useStyle;
5
+ exports.useType = useType;
4
6
  const var_1 = require("../../../styles/var");
5
7
  const td_message_style_1 = require("../td-message/td-message.style");
6
8
  exports.$messageBox = {
@@ -172,11 +174,9 @@ function useStyle(config) {
172
174
  delete exports.$messageBoxContainerStyle.justifyContent;
173
175
  }
174
176
  }
175
- exports.useStyle = useStyle;
176
177
  function useType(config) {
177
178
  const type = (config === null || config === void 0 ? void 0 : config.type) || 'info';
178
179
  const $messageBoxColor = var_1.$colors[type].base;
179
180
  // $messageBoxIconStyle.color = $messageBoxColor;
180
181
  exports.$messageBoxStatusStyle.color = $messageBoxColor;
181
182
  }
182
- exports.useType = useType;
@@ -193,8 +193,8 @@ class TdNotification extends ui_abstract_1.UI {
193
193
  close() {
194
194
  this.visible = false;
195
195
  this.notification.ctrl.hide();
196
- this.destroy(); // todo 应该是 Transition 的 afterLeave 触发 destroy;
197
196
  const position = this.props.position || 'top-right';
197
+ this.destroy(); // todo 应该是 Transition 的 afterLeave 触发 destroy; 会删除props
198
198
  TdNotification.notifications[position] = TdNotification.notifications[position].filter((notification) => notification !== this);
199
199
  TdNotification.notifyId = TdNotification.notifyId - 1;
200
200
  let verticalOffset = this.props.offset || 0;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useType = exports.useStyle = exports.$notificationCloseBtnStyle = exports.$notificationIconStyle = exports.$notificationContentStyle = exports.$notificationTitleStyle = exports.$notificationGroupStyle = exports.$notificationStyle = exports.$notification = exports.$messageCloseSize = void 0;
3
+ exports.$notificationCloseBtnStyle = exports.$notificationIconStyle = exports.$notificationContentStyle = exports.$notificationTitleStyle = exports.$notificationGroupStyle = exports.$notificationStyle = exports.$notification = exports.$messageCloseSize = void 0;
4
+ exports.useStyle = useStyle;
5
+ exports.useType = useType;
4
6
  const var_1 = require("../../../styles/var");
5
7
  const td_message_style_1 = require("../td-message/td-message.style");
6
8
  exports.$messageCloseSize = td_message_style_1.$message.closeSize;
@@ -121,7 +123,6 @@ exports.$notificationCloseBtnStyle = {
121
123
  function useStyle(config) {
122
124
  useType(config);
123
125
  }
124
- exports.useStyle = useStyle;
125
126
  function useType(config) {
126
127
  // @each $type in (success, info, warning, error) {
127
128
  // & .#{$namespace}-notification--#{$type} {
@@ -135,4 +136,3 @@ function useType(config) {
135
136
  const $notificationIconColor = var_1.$colors[(config === null || config === void 0 ? void 0 : config.type) || 'info'].base;
136
137
  exports.$notificationStyle.color = $notificationIconColor;
137
138
  }
138
- exports.useType = useType;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.calcTextareaHeight = void 0;
3
+ exports.calcTextareaHeight = calcTextareaHeight;
4
4
  const utils_1 = require("@type-dom/utils");
5
5
  let hiddenTextarea = undefined;
6
6
  const HIDDEN_STYLE = `
@@ -78,4 +78,3 @@ function calcTextareaHeight(targetElement, minRows = 1, maxRows) {
78
78
  hiddenTextarea = undefined;
79
79
  return result;
80
80
  }
81
- exports.calcTextareaHeight = calcTextareaHeight;
@@ -18,8 +18,8 @@ export declare class TdAffix extends UI implements ITdAffix {
18
18
  private scrollContainer?;
19
19
  private windowHeight?;
20
20
  constructor(params?: ITdAffixConfig);
21
- get rootStyle(): IStyle<0 | (string & {}), string & {}>;
22
- get affixStyle(): IStyle<0 | (string & {}), string & {}>;
21
+ get rootStyle(): IStyle;
22
+ get affixStyle(): IStyle;
23
23
  mounted(): void;
24
24
  change(): void;
25
25
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useStyle = exports.$tabsContentStyle = exports.$tabsItemStyle = exports.$tabsNavStyle = exports.$tabsNavPrevStyle = exports.$tabNavNextStyle = exports.$tabsNavWrapAfterStyle = exports.$tabsNavScrollStyle = exports.$tabsNavWrapStyle = exports.$tabsNewTabStyle = exports.$tabsActiveBarStyle = exports.$tabsHeaderVerticalStyle = exports.$tabsHeaderStyle = exports.$tabsStyle = exports.$tabs = void 0;
3
+ exports.$tabsContentStyle = exports.$tabsItemStyle = exports.$tabsNavStyle = exports.$tabsNavPrevStyle = exports.$tabNavNextStyle = exports.$tabsNavWrapAfterStyle = exports.$tabsNavScrollStyle = exports.$tabsNavWrapStyle = exports.$tabsNewTabStyle = exports.$tabsActiveBarStyle = exports.$tabsHeaderVerticalStyle = exports.$tabsHeaderStyle = exports.$tabsStyle = exports.$tabs = void 0;
4
+ exports.useStyle = useStyle;
4
5
  const var_1 = require("../../../styles/var");
5
6
  const transition_1 = require("../../../styles/transition");
6
7
  const utils_1 = require("@type-dom/utils");
@@ -125,4 +126,3 @@ exports.$tabsContentStyle = {
125
126
  };
126
127
  function useStyle(config) {
127
128
  }
128
- exports.useStyle = useStyle;
@@ -1,6 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bem = exports.getCssVarWithDefault = exports.getCssVar = exports.getCssVarName = exports.joinVarName = exports.hitAllSpecialNestRule = exports.containPseudoClass = exports.containWhenFlag = exports.containsModifier = exports.selectorToString = void 0;
3
+ exports.selectorToString = selectorToString;
4
+ exports.containsModifier = containsModifier;
5
+ exports.containWhenFlag = containWhenFlag;
6
+ exports.containPseudoClass = containPseudoClass;
7
+ exports.hitAllSpecialNestRule = hitAllSpecialNestRule;
8
+ exports.joinVarName = joinVarName;
9
+ exports.getCssVarName = getCssVarName;
10
+ exports.getCssVar = getCssVar;
11
+ exports.getCssVarWithDefault = getCssVarWithDefault;
12
+ exports.bem = bem;
4
13
  const config = require("./config");
5
14
  // BEM support Func
6
15
  function selectorToString($selector) {
@@ -9,28 +18,23 @@ function selectorToString($selector) {
9
18
  $selector = $selector.slice(2, -2);
10
19
  return $selector;
11
20
  }
12
- exports.selectorToString = selectorToString;
13
21
  function containsModifier($selector) {
14
22
  $selector = selectorToString($selector);
15
23
  return !!$selector.indexOf(config.$modifierSeparator);
16
24
  }
17
- exports.containsModifier = containsModifier;
18
25
  function containWhenFlag($selector) {
19
26
  $selector = selectorToString($selector);
20
27
  return !!$selector.indexOf('.' + config.$statePrefix);
21
28
  }
22
- exports.containWhenFlag = containWhenFlag;
23
29
  function containPseudoClass($selector) {
24
30
  $selector = selectorToString($selector);
25
31
  return !!$selector.indexOf(':');
26
32
  }
27
- exports.containPseudoClass = containPseudoClass;
28
33
  function hitAllSpecialNestRule($selector) {
29
34
  return (containsModifier($selector) ||
30
35
  containWhenFlag($selector) ||
31
36
  containPseudoClass($selector));
32
37
  }
33
- exports.hitAllSpecialNestRule = hitAllSpecialNestRule;
34
38
  // join var name
35
39
  // joinVarName(('button', 'text-color')) => '--el-button-text-color'
36
40
  function joinVarName($list) {
@@ -42,24 +46,20 @@ function joinVarName($list) {
42
46
  }
43
47
  return $name;
44
48
  }
45
- exports.joinVarName = joinVarName;
46
49
  // getCssVarName('button', 'text-color') => '--el-button-text-color'
47
50
  function getCssVarName(...$args) {
48
51
  return joinVarName($args);
49
52
  }
50
- exports.getCssVarName = getCssVarName;
51
53
  // getCssVar('button', 'text-color') => var(--el-button-text-color)
52
54
  function getCssVar(...$args) {
53
55
  // return var(#{joinVarName($args)});
54
56
  return joinVarName($args);
55
57
  }
56
- exports.getCssVar = getCssVar;
57
58
  // getCssVarWithDefault(('button', 'text-color'), red) => var(--el-button-text-color, red)
58
59
  function getCssVarWithDefault($args, $default) {
59
60
  // return var(#{joinVarName($args)}, #{$default});
60
61
  return joinVarName($args) || $default;
61
62
  }
62
- exports.getCssVarWithDefault = getCssVarWithDefault;
63
63
  // bem('block', 'element', 'modifier') => 'el-block__element--modifier'
64
64
  function bem($block, $element, $modifier) {
65
65
  let $name = config.$namespace + config.$commonSeparator + $block;
@@ -72,4 +72,3 @@ function bem($block, $element, $modifier) {
72
72
  // debug $name;
73
73
  return $name;
74
74
  }
75
- exports.bem = bem;
package/src/styles/var.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.$svgMonochromeGrey = exports.$border = exports.$ellipsisStyle = exports.$scrollbar = exports.$colorDangerRgb = exports.$colorPrimaryRgb = exports.$transitionDurationFast = exports.$transitionDuration = exports.$paddingHorizontalMap = exports.$paddingVerticalMap = exports.$borderRadiusMap = exports.$fontSizeMap = exports.$buttonTextColor = exports.$buttonBgColor = exports.$buttonBorderColor = exports.$buttonActiveShadePercent = exports.$buttonHoverTintPercent = exports.$buttonBorderWidth = exports.$button = exports.setColorMixLevel = exports.$colorInfo = exports.$colorError = exports.$colorDanger = exports.$colorWarning = exports.$colorSuccess = exports.$colorPrimary = exports.$colorBlack = exports.$colorWhite = exports.$colors = exports.$overlayColor = exports.$commonComponentSize = exports.componentSizeMap = exports.componentSizes = exports.$disabled = exports.$zIndex = exports.$fontSizes = exports.fontFamily = exports.$boxShadow = exports.$borderRadius = exports.$borderColorHover = exports.$borderStyle = exports.$borderWidth = exports.$bgColor = exports.$fillColor = exports.$borderColor = exports.$textColor = exports.$types = exports.$fontLineHeightPrimary = exports.$fontWeightPrimary = void 0;
3
+ exports.$svgMonochromeGrey = exports.$border = exports.$ellipsisStyle = exports.$scrollbar = exports.$colorDangerRgb = exports.$colorPrimaryRgb = exports.$transitionDurationFast = exports.$transitionDuration = exports.$paddingHorizontalMap = exports.$paddingVerticalMap = exports.$borderRadiusMap = exports.$fontSizeMap = exports.$buttonTextColor = exports.$buttonBgColor = exports.$buttonBorderColor = exports.$buttonActiveShadePercent = exports.$buttonHoverTintPercent = exports.$buttonBorderWidth = exports.$button = exports.$colorInfo = exports.$colorError = exports.$colorDanger = exports.$colorWarning = exports.$colorSuccess = exports.$colorPrimary = exports.$colorBlack = exports.$colorWhite = exports.$colors = exports.$overlayColor = exports.$commonComponentSize = exports.componentSizeMap = exports.componentSizes = exports.$disabled = exports.$zIndex = exports.$fontSizes = exports.fontFamily = exports.$boxShadow = exports.$borderRadius = exports.$borderColorHover = exports.$borderStyle = exports.$borderWidth = exports.$bgColor = exports.$fillColor = exports.$borderColor = exports.$textColor = exports.$types = exports.$fontLineHeightPrimary = exports.$fontWeightPrimary = void 0;
4
+ exports.setColorMixLevel = setColorMixLevel;
4
5
  /**
5
6
  * scss/var
6
7
  */
@@ -187,7 +188,6 @@ function setColorMixLevel($type, $number, $mode = 'light', $mixColor = exports.$
187
188
  // );
188
189
  // return $colors;
189
190
  }
190
- exports.setColorMixLevel = setColorMixLevel;
191
191
  // $colors.primary.light-i
192
192
  // --el-color-primary-light-i
193
193
  // 10% 53a8ff