@whitesev/pops 2.1.12 → 2.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.
@@ -61,7 +61,7 @@ export interface PopsPanelDeepMenuDetails extends PopsPanelCommonDetails<PopsPan
61
61
  /** 右侧的总容器的标题头容器 */
62
62
  sectionContainerHeaderContainer: HTMLUListElement;
63
63
  /** 右侧的总容器的标题头 */
64
- sectionContainerHeader: HTMLDivElement;
64
+ sectionContainerHeader: HTMLLIElement;
65
65
  /** 右侧的内容容器 */
66
66
  sectionBodyContainer: HTMLUListElement;
67
67
  }) => void;
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
- "$schema": "https://json.schemastore.org/package.json",
3
2
  "name": "@whitesev/pops",
4
- "version": "2.1.12",
3
+ "version": "2.2.0",
5
4
  "type": "module",
6
5
  "description": "弹窗库",
7
6
  "main": "dist/index.cjs.js",
@@ -37,13 +36,13 @@
37
36
  "license": "MIT",
38
37
  "dependencies": {
39
38
  "any-touch": "^2.2.0",
40
- "worker-timers": "^8.0.21"
39
+ "worker-timers": "^8.0.23"
41
40
  },
42
41
  "devDependencies": {
43
42
  "@rollup/plugin-commonjs": "^28.0.6",
44
43
  "@rollup/plugin-node-resolve": "^16.0.1",
45
44
  "@rollup/plugin-typescript": "12.1.4",
46
- "rollup": "^4.44.2",
45
+ "rollup": "^4.45.0",
47
46
  "rollup-plugin-clear": "^2.0.7",
48
47
  "rollup-plugin-import-css": "^4.0.1",
49
48
  "tslib": "^2.8.1",
package/src/Pops.ts CHANGED
@@ -36,7 +36,7 @@ class Pops {
36
36
  /** 配置 */
37
37
  config = {
38
38
  /** 版本号 */
39
- version: "2025.7.11",
39
+ version: "2025.7.13",
40
40
  cssText: PopsCSS,
41
41
  /** icon图标的svg代码 */
42
42
  iconSVG: PopsIcon.$data,
@@ -262,6 +262,7 @@ export const PanelHandlerComponents = () => {
262
262
  : asideConfig.title;
263
263
  PopsSafeUtils.setSafeHTML($li, title);
264
264
  /* 处理className */
265
+ this.setElementClassName($li, "pops-panel-aside-item");
265
266
  this.setElementClassName($li, asideConfig.className);
266
267
  this.setElementAttributes($li, asideConfig.attributes);
267
268
  this.setElementProps($li, asideConfig.props);
@@ -2726,14 +2727,18 @@ export const PanelHandlerComponents = () => {
2726
2727
  });
2727
2728
  Reflect.set($deepMenuContainer, "__formConfig__", formConfig);
2728
2729
  let $deepMenuHeaderUL = popsDOMUtils.createElement("ul", {
2729
- className: "pops-panel-deepMenu-container-header-ul",
2730
+ className:
2731
+ "pops-panel-container-header-ul pops-panel-deepMenu-container-header-ul",
2732
+ });
2733
+ let $deepMenuMain = popsDOMUtils.createElement("ul", {
2734
+ className: "pops-panel-container-main-ul",
2730
2735
  });
2731
- let $deepMenuBodyUL = popsDOMUtils.createElement("ul");
2732
2736
  // 标题文字
2733
2737
  let headerTitleText = formConfig.headerTitle ?? formConfig.text;
2734
- let $header = popsDOMUtils.createElement("div", {
2735
- className: "pops-panel-deepMenu-container-header",
2736
- innerHTML: `<p>${headerTitleText}</p>`,
2738
+ let $header = popsDOMUtils.createElement("li", {
2739
+ className:
2740
+ "pops-panel-container-header-title-text pops-panel-deepMenu-container-header",
2741
+ innerHTML: /*html*/ `<p class="pops-panel-deepMenu-container-header-title-text">${headerTitleText}</p>`,
2737
2742
  });
2738
2743
  let $headerLeftArrow = popsDOMUtils.createElement("i", {
2739
2744
  className: "pops-panel-deepMenu-container-left-arrow-icon",
@@ -2762,12 +2767,12 @@ export const PanelHandlerComponents = () => {
2762
2767
  );
2763
2768
  $deepMenuHeaderUL.appendChild($header);
2764
2769
  $deepMenuContainer.appendChild($deepMenuHeaderUL);
2765
- $deepMenuContainer.appendChild($deepMenuBodyUL);
2770
+ $deepMenuContainer.appendChild($deepMenuMain);
2766
2771
 
2767
2772
  if (formConfig.forms && Array.isArray(formConfig.forms)) {
2768
2773
  for (let index = 0; index < formConfig.forms.length; index++) {
2769
2774
  let formItemConfig = formConfig.forms[index];
2770
- this.initFormItem($deepMenuBodyUL, formItemConfig);
2775
+ this.initFormItem($deepMenuMain, formItemConfig);
2771
2776
  }
2772
2777
  }
2773
2778
  that.$el.$content?.appendChild($deepMenuContainer);
@@ -2777,7 +2782,7 @@ export const PanelHandlerComponents = () => {
2777
2782
  sectionContainer: $deepMenuContainer,
2778
2783
  sectionContainerHeaderContainer: $deepMenuHeaderUL,
2779
2784
  sectionContainerHeader: $header,
2780
- sectionBodyContainer: $deepMenuBodyUL,
2785
+ sectionBodyContainer: $deepMenuMain,
2781
2786
  });
2782
2787
  }
2783
2788
  that.triggerRenderRightContainer($deepMenuContainer);
@@ -2879,12 +2884,12 @@ export const PanelHandlerComponents = () => {
2879
2884
  let formContainerListElement = document.createElement("li");
2880
2885
  /* 每一项<li>内的子<ul>元素 */
2881
2886
  let formContainerULElement = document.createElement("ul");
2882
- formContainerULElement.classList.add(
2883
- "pops-panel-forms-container-item-formlist"
2884
- );
2885
2887
  formContainerListElement.classList.add(
2886
2888
  "pops-panel-forms-container-item"
2887
2889
  );
2890
+ formContainerULElement.classList.add(
2891
+ "pops-panel-forms-container-item-formlist"
2892
+ );
2888
2893
  /* 区域头部的文字 */
2889
2894
  let formHeaderDivElement = popsDOMUtils.createElement("div", {
2890
2895
  className: "pops-panel-forms-container-item-header-text",
@@ -3057,6 +3062,9 @@ export const PanelHandlerComponents = () => {
3057
3062
  headerTitleText.trim() !== ""
3058
3063
  ) {
3059
3064
  let $containerHeaderTitle = document.createElement("li");
3065
+ $containerHeaderTitle.classList.add(
3066
+ "pops-panel-container-header-title-text"
3067
+ );
3060
3068
  Reflect.set($containerHeaderTitle, "__asideConfig__", asideConfig);
3061
3069
  PopsSafeUtils.setSafeHTML($containerHeaderTitle, headerTitleText);
3062
3070
  this.sectionContainerHeaderULElement.appendChild(
@@ -9,7 +9,9 @@
9
9
 
10
10
  --pops-panel-forms-margin-top-bottom: 10px;
11
11
  --pops-panel-forms-margin-left-right: 20px;
12
- --pops-panel-forms-header-icon-size: 20px;
12
+ --pops-panel-forms-header-icon-size: calc(
13
+ var(--pops-panel-forms-container-li-padding-left-right) + 1px
14
+ );
13
15
  --pops-panel-forms-header-padding-top-bottom: 15px;
14
16
  --pops-panel-forms-header-padding-left-right: 10px;
15
17
  --pops-panel-forms-container-item-left-text-gap: 6px;
@@ -83,8 +85,10 @@ section.pops-panel-container .pops-panel-deepMenu-container-header-ul {
83
85
  border-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
84
86
  flex: 0 auto;
85
87
  }
86
- section.pops-panel-container .pops-panel-container-header-ul li {
87
- text-align: left;
88
+ section.pops-panel-container .pops-panel-container-header-ul li,
89
+ section.pops-panel-container
90
+ .pops-panel-container-header-ul
91
+ li.pops-panel-container-header-title-text {
88
92
  display: flex;
89
93
  justify-content: flex-start !important;
90
94
  margin: 0px !important;
@@ -93,10 +97,11 @@ section.pops-panel-container .pops-panel-container-header-ul li {
93
97
  var(--pops-panel-forms-margin-left-right) +
94
98
  var(--pops-panel-forms-container-li-padding-left-right)
95
99
  );
100
+ text-align: left;
96
101
  }
97
- section.pops-panel-container > ul:last-child {
102
+ section.pops-panel-container ul.pops-panel-container-main-ul {
98
103
  overflow: auto;
99
- flex: 1;
104
+ /*flex: 1;*/
100
105
  }
101
106
  aside.pops-panel-aside ul li {
102
107
  margin: 6px 8px;
@@ -136,13 +141,18 @@ section.pops-panel-container .pops-panel-forms-container-item-header-text {
136
141
  section.pops-panel-container li.pops-panel-forms-container-item {
137
142
  display: block;
138
143
  }
139
- section.pops-panel-container .pops-panel-forms-container-item ul {
144
+ section.pops-panel-container
145
+ .pops-panel-forms-container-item
146
+ ul.pops-panel-forms-container-item-formlist {
140
147
  border-radius: var(--pops-panel-forms-container-item-border-radius);
141
148
  background: var(--pops-panel-forms-container-item-bg-color);
142
149
  margin: var(--pops-panel-forms-container-item-margin-top-bottom)
143
150
  var(--pops-panel-forms-margin-left-right);
144
151
  }
145
- section.pops-panel-container .pops-panel-forms-container-item ul li {
152
+ section.pops-panel-container
153
+ .pops-panel-forms-container-item
154
+ ul.pops-panel-forms-container-item-formlist
155
+ li {
146
156
  display: flex;
147
157
  justify-content: space-between;
148
158
  align-items: center;
@@ -160,7 +170,10 @@ section.pops-panel-container
160
170
  margin: 0px;
161
171
  border-bottom: 0;
162
172
  }
163
- section.pops-panel-container .pops-panel-forms-container-item ul li:last-child {
173
+ section.pops-panel-container
174
+ .pops-panel-forms-container-item
175
+ ul.pops-panel-forms-container-item-formlist
176
+ li:last-child {
164
177
  border: 0;
165
178
  }
166
179
  /* 左侧的文字 */
@@ -1090,7 +1103,9 @@ section.pops-panel-container
1090
1103
  display: flex;
1091
1104
  align-items: center;
1092
1105
  }
1093
- .pops-panel-deepMenu-container .pops-panel-deepMenu-container-header {
1106
+ section.pops-panel-deepMenu-container
1107
+ .pops-panel-container-header-ul
1108
+ li.pops-panel-deepMenu-container-header {
1094
1109
  display: flex;
1095
1110
  align-items: center;
1096
1111
  width: -webkit-fill-available;
@@ -1101,6 +1116,7 @@ section.pops-panel-container
1101
1116
  var(--pops-panel-forms-container-li-padding-left-right) -
1102
1117
  var(--pops-panel-forms-header-icon-size)
1103
1118
  );
1119
+ gap: 0px;
1104
1120
  }
1105
1121
  .pops-panel-deepMenu-container .pops-panel-deepMenu-container-left-arrow-icon {
1106
1122
  width: var(--pops-panel-forms-header-icon-size);
@@ -69,7 +69,7 @@ export interface PopsPanelDeepMenuDetails
69
69
  /** 右侧的总容器的标题头容器 */
70
70
  sectionContainerHeaderContainer: HTMLUListElement;
71
71
  /** 右侧的总容器的标题头 */
72
- sectionContainerHeader: HTMLDivElement;
72
+ sectionContainerHeader: HTMLLIElement;
73
73
  /** 右侧的内容容器 */
74
74
  sectionBodyContainer: HTMLUListElement;
75
75
  }