@whitesev/pops 4.2.3 → 4.2.4

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 (41) hide show
  1. package/dist/index.amd.js +56 -1
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.amd.min.js +1 -1
  4. package/dist/index.amd.min.js.map +1 -1
  5. package/dist/index.cjs.js +56 -1
  6. package/dist/index.cjs.js.map +1 -1
  7. package/dist/index.cjs.min.js +1 -1
  8. package/dist/index.cjs.min.js.map +1 -1
  9. package/dist/index.esm.js +56 -1
  10. package/dist/index.esm.js.map +1 -1
  11. package/dist/index.esm.min.js +1 -1
  12. package/dist/index.esm.min.js.map +1 -1
  13. package/dist/index.iife.js +56 -1
  14. package/dist/index.iife.js.map +1 -1
  15. package/dist/index.iife.min.js +1 -1
  16. package/dist/index.iife.min.js.map +1 -1
  17. package/dist/index.system.js +56 -1
  18. package/dist/index.system.js.map +1 -1
  19. package/dist/index.system.min.js +1 -1
  20. package/dist/index.system.min.js.map +1 -1
  21. package/dist/index.umd.js +56 -1
  22. package/dist/index.umd.js.map +1 -1
  23. package/dist/index.umd.min.js +1 -1
  24. package/dist/index.umd.min.js.map +1 -1
  25. package/dist/types/src/Pops.d.ts +19 -0
  26. package/dist/types/src/PopsCSS.d.ts +12 -0
  27. package/dist/types/src/components/tooltip/index.d.ts +18 -0
  28. package/package.json +14 -14
  29. package/src/PopsCSS.ts +13 -0
  30. package/src/components/alert/index.ts +4 -0
  31. package/src/components/confirm/index.ts +4 -0
  32. package/src/components/drawer/index.ts +4 -0
  33. package/src/components/folder/index.ts +4 -0
  34. package/src/components/iframe/index.ts +4 -0
  35. package/src/components/loading/index.ts +1 -0
  36. package/src/components/panel/index.ts +4 -0
  37. package/src/components/prompt/index.ts +4 -0
  38. package/src/components/rightClickMenu/index.ts +4 -0
  39. package/src/components/searchSuggestion/index.ts +4 -0
  40. package/src/components/tooltip/index.ts +4 -0
  41. package/src/css/skeleton.css +43 -0
package/dist/index.umd.js CHANGED
@@ -4,7 +4,7 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.pops = factory());
5
5
  })(this, (function () { 'use strict';
6
6
 
7
- const version = "4.2.3";
7
+ const version = "4.2.4";
8
8
 
9
9
  const GlobalConfig = {
10
10
  config: {},
@@ -3007,6 +3007,8 @@
3007
3007
 
3008
3008
  var panelComponents_Select_CSS = ".pops {\n max-height: 300px;\n}\n.select-container {\n --el-font-size-base: 14px;\n --el-text-color-regular: #606266;\n --el-color-primary: #409eff;\n --el-fill-color-light: #f5f7fa;\n --el-disable-color: #a8abb2;\n}\n.select-item {\n cursor: pointer;\n font-size: var(--el-font-size-base);\n padding: 0 20px 0 20px;\n position: relative;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--el-text-color-regular);\n min-height: 34px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n box-sizing: border-box;\n}\n.select-item[aria-disabled],\n.select-item[disabled] {\n cursor: not-allowed;\n color: var(--el-disable-color);\n background: unset;\n}\n.select-item:hover {\n background-color: var(--el-fill-color-light);\n}\n.select-item.select-item-is-selected:has(.pops-panel-input input) {\n background-color: #e7e7e7;\n}\n.select-item.select-item-is-selected {\n color: var(--el-color-primary);\n font-weight: 700;\n}\n.select-item.select-item-is-selected:not(:has(.pops-panel-input))::after {\n content: \"\";\n position: absolute;\n top: 50%;\n right: 12px;\n border-top: none;\n border-right: none;\n background-repeat: no-repeat;\n background-position: center;\n background-color: var(--el-color-primary);\n mask: url(\"data:image/svg+xml;utf8,%3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z'%3E%3C/path%3E%3C/svg%3E\")\n no-repeat;\n mask-size: 100% 100%;\n -webkit-mask: url(\"data:image/svg+xml;utf8,%3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z'%3E%3C/path%3E%3C/svg%3E\")\n no-repeat;\n -webkit-mask-size: 100% 100%;\n transform: translateY(-50%);\n width: 12px;\n height: 12px;\n}\n\n.select-item .pops-panel-input {\n width: 100%;\n margin: 5px 0px;\n}\n.select-item .pops-panel-input:has(.pops-panel-input-valid-error) {\n margin-bottom: 0px;\n}\n\n.select-item .select-item-text {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n@media (prefers-color-scheme: dark) {\n .select-container {\n --el-text-color-regular: #f2f2f2;\n --el-disable-color: #8d9095;\n --el-fill-color-light: #262727;\n }\n}\n";
3009
3009
 
3010
+ var skeletonCSS = ".pops-skeleton-item {\n --el-skeleton-color: #f0f2f5;\n --el-skeleton-to-color: #e6e8eb;\n width: 100%;\n height: 18px;\n border-radius: 4px;\n background: var(--el-skeleton-color);\n display: inline-block;\n}\n.pops-skeleton-item[data-circle] {\n border-radius: 50%;\n}\n.pops-skeleton-item[data-img] {\n width: unset;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 0px;\n}\n.pops-skeleton-item[data-img] svg {\n color: #dcdfe6;\n fill: currentcolor;\n width: 22%;\n height: 22%;\n}\n.pops-skeleton-item[data-animated] {\n background: linear-gradient(\n 90deg,\n var(--el-skeleton-color) 25%,\n var(--el-skeleton-to-color) 37%,\n var(--el-skeleton-color) 63%\n );\n background-size: 400% 100%;\n animation: pops-el-skeleton-loading 1.4s ease infinite;\n}\n@keyframes pops-el-skeleton-loading {\n 0% {\n background-position: 100% 50%;\n }\n 100% {\n background-position: 0 50%;\n }\n}\n";
3011
+
3010
3012
  const PopsCSS = {
3011
3013
  /** 主CSS */
3012
3014
  index: indexCSS,
@@ -3042,6 +3044,18 @@
3042
3044
  rightClickMenu: rightClickMenuCSS,
3043
3045
  /** pops.panel的select组件 */
3044
3046
  panelComponents_Select: panelComponents_Select_CSS,
3047
+ /**
3048
+ * pops.skeleton
3049
+ *
3050
+ * 需要设置元素className为`pops-skeleton-item`
3051
+ *
3052
+ * 支持以下属性
3053
+ *
3054
+ * + `data-animated`: 加载中的动画
3055
+ * + `data-circle`: 圆形
3056
+ * + `data-img`: 头像图片,需要在它内部添加图片的svg `PopsIcon.getIcon("picture")`
3057
+ */
3058
+ skeletonCSS: skeletonCSS,
3045
3059
  };
3046
3060
 
3047
3061
  const PopsAnimation = {
@@ -4415,6 +4429,10 @@
4415
4429
  name: "common",
4416
4430
  css: PopsCSS.common,
4417
4431
  },
4432
+ {
4433
+ name: "skeleton",
4434
+ css: PopsCSS.skeletonCSS,
4435
+ },
4418
4436
  {
4419
4437
  name: "alertCSS",
4420
4438
  css: PopsCSS.alertCSS,
@@ -4623,6 +4641,10 @@
4623
4641
  name: "common",
4624
4642
  css: PopsCSS.common,
4625
4643
  },
4644
+ {
4645
+ name: "skeleton",
4646
+ css: PopsCSS.skeletonCSS,
4647
+ },
4626
4648
  {
4627
4649
  name: "confirmCSS",
4628
4650
  css: PopsCSS.confirmCSS,
@@ -4831,6 +4853,10 @@
4831
4853
  name: "common",
4832
4854
  css: PopsCSS.common,
4833
4855
  },
4856
+ {
4857
+ name: "skeleton",
4858
+ css: PopsCSS.skeletonCSS,
4859
+ },
4834
4860
  {
4835
4861
  name: "drawerCSS",
4836
4862
  css: PopsCSS.drawerCSS,
@@ -5040,6 +5066,7 @@
5040
5066
  <style data-model-name="index">${PopsCSS.index}</style>
5041
5067
  <style data-model-name="anim">${PopsCSS.anim}</style>
5042
5068
  <style data-model-name="common">${PopsCSS.common}</style>
5069
+ <style data-model-name="skeleton">${PopsCSS.skeletonCSS}</style>
5043
5070
  `
5044
5071
  : ""}
5045
5072
  <style data-model-name="loadingCSS">
@@ -5316,6 +5343,10 @@
5316
5343
  name: "common",
5317
5344
  css: PopsCSS.common,
5318
5345
  },
5346
+ {
5347
+ name: "skeleton",
5348
+ css: PopsCSS.skeletonCSS,
5349
+ },
5319
5350
  {
5320
5351
  name: "folderCSS",
5321
5352
  css: PopsCSS.folderCSS,
@@ -6253,6 +6284,10 @@
6253
6284
  name: "common",
6254
6285
  css: PopsCSS.common,
6255
6286
  },
6287
+ {
6288
+ name: "skeleton",
6289
+ css: PopsCSS.skeletonCSS,
6290
+ },
6256
6291
  {
6257
6292
  name: "iframeCSS",
6258
6293
  css: PopsCSS.iframeCSS,
@@ -7952,6 +7987,10 @@
7952
7987
  name: "common",
7953
7988
  css: PopsCSS.common,
7954
7989
  },
7990
+ {
7991
+ name: "skeleton",
7992
+ css: PopsCSS.skeletonCSS,
7993
+ },
7955
7994
  {
7956
7995
  name: "tooltipCSS",
7957
7996
  css: PopsCSS.tooltipCSS,
@@ -11834,6 +11873,10 @@
11834
11873
  name: "common",
11835
11874
  css: PopsCSS.common,
11836
11875
  },
11876
+ {
11877
+ name: "skeleton",
11878
+ css: PopsCSS.skeletonCSS,
11879
+ },
11837
11880
  {
11838
11881
  name: "panelCSS",
11839
11882
  css: PopsCSS.panelCSS,
@@ -12098,6 +12141,10 @@
12098
12141
  name: "common",
12099
12142
  css: PopsCSS.common,
12100
12143
  },
12144
+ {
12145
+ name: "skeleton",
12146
+ css: PopsCSS.skeletonCSS,
12147
+ },
12101
12148
  {
12102
12149
  name: "promptCSS",
12103
12150
  css: PopsCSS.promptCSS,
@@ -12323,6 +12370,10 @@
12323
12370
  name: "common",
12324
12371
  css: PopsCSS.common,
12325
12372
  },
12373
+ {
12374
+ name: "skeleton",
12375
+ css: PopsCSS.skeletonCSS,
12376
+ },
12326
12377
  {
12327
12378
  name: "rightClickMenu",
12328
12379
  css: PopsCSS.rightClickMenu,
@@ -12961,6 +13012,10 @@
12961
13012
  name: "common",
12962
13013
  css: PopsCSS.common,
12963
13014
  },
13015
+ {
13016
+ name: "skeleton",
13017
+ css: PopsCSS.skeletonCSS,
13018
+ },
12964
13019
  ]);
12965
13020
  // 添加自定义style
12966
13021
  PopsElementHandler.addStyle($shadowRoot, config.style);