clxx 2.1.8 → 3.0.1

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 (76) hide show
  1. package/AGENTS.md +2 -1
  2. package/README.md +147 -22
  3. package/build/Alert/Wrapper.js +4 -3
  4. package/build/Alert/style.js +11 -7
  5. package/build/AutoGrid/index.js +21 -15
  6. package/build/CarouselNotice/index.d.ts +19 -11
  7. package/build/CarouselNotice/index.js +80 -74
  8. package/build/CarouselNotice/style.js +14 -4
  9. package/build/CitySelect/index.js +30 -55
  10. package/build/CitySelect/style.js +22 -56
  11. package/build/Clickable/index.js +7 -0
  12. package/build/Container/index.d.ts +12 -4
  13. package/build/Container/index.js +94 -89
  14. package/build/Countdowner/index.js +4 -2
  15. package/build/DatePicker/Column.d.ts +9 -0
  16. package/build/DatePicker/Column.js +330 -0
  17. package/build/DatePicker/index.d.ts +32 -0
  18. package/build/DatePicker/index.js +230 -0
  19. package/build/DatePicker/style.d.ts +6 -0
  20. package/build/DatePicker/style.js +130 -0
  21. package/build/Dialog/Wrapper.d.ts +0 -1
  22. package/build/Dialog/Wrapper.js +22 -12
  23. package/build/Dialog/index.d.ts +7 -1
  24. package/build/Dialog/index.js +57 -32
  25. package/build/Dialog/style.js +6 -2
  26. package/build/Effect/useInterval.js +6 -3
  27. package/build/Fixed/index.js +13 -22
  28. package/build/Flex/FlexItem.d.ts +11 -0
  29. package/build/Flex/FlexItem.js +26 -0
  30. package/build/Flex/index.d.ts +2 -10
  31. package/build/Flex/index.js +12 -22
  32. package/build/Indicator/index.d.ts +9 -6
  33. package/build/Indicator/index.js +34 -37
  34. package/build/Indicator/style.d.ts +4 -3
  35. package/build/Indicator/style.js +8 -13
  36. package/build/Loading/Wrapper.js +2 -1
  37. package/build/Loading/style.js +9 -12
  38. package/build/Overlay/index.js +6 -1
  39. package/build/RegionPicker/data.d.ts +6 -0
  40. package/build/RegionPicker/data.js +14486 -0
  41. package/build/RegionPicker/index.d.ts +33 -0
  42. package/build/RegionPicker/index.js +205 -0
  43. package/build/RegionPicker/style.d.ts +4 -0
  44. package/build/RegionPicker/style.js +187 -0
  45. package/build/SafeArea/index.js +14 -17
  46. package/build/ScrollView/index.d.ts +23 -11
  47. package/build/ScrollView/index.js +132 -118
  48. package/build/ScrollView/style.d.ts +1 -1
  49. package/build/ScrollView/style.js +33 -22
  50. package/build/Toast/Toast.d.ts +0 -1
  51. package/build/Toast/Toast.js +6 -4
  52. package/build/Toast/style.d.ts +3 -7
  53. package/build/Toast/style.js +33 -41
  54. package/build/index.d.ts +3 -0
  55. package/build/index.js +7 -1
  56. package/build/utils/color.d.ts +5 -0
  57. package/build/utils/color.js +18 -0
  58. package/build/utils/createApp.d.ts +16 -2
  59. package/build/utils/createApp.js +142 -109
  60. package/build/utils/dom.js +4 -3
  61. package/build/utils/theme.d.ts +2 -0
  62. package/build/utils/theme.js +7 -0
  63. package/package.json +1 -1
  64. package/test/src/date-picker/index.jsx +119 -0
  65. package/test/src/index/index.jsx +2 -0
  66. package/test/src/index.jsx +1 -0
  67. package/test/src/loading/index.jsx +2 -2
  68. package/test/src/region-picker/index.jsx +120 -0
  69. package/test/src/scrollview/BasicSection.jsx +56 -0
  70. package/test/src/scrollview/CustomLoadingSection.jsx +53 -0
  71. package/test/src/scrollview/HeightModeSection.jsx +42 -0
  72. package/test/src/scrollview/ImperativeSection.jsx +56 -0
  73. package/test/src/scrollview/NotScrollableSection.jsx +32 -0
  74. package/test/src/scrollview/PerfSection.jsx +34 -0
  75. package/test/src/scrollview/index.css +92 -8
  76. package/test/src/scrollview/index.jsx +13 -45
@@ -1,18 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBarChangeKeyFrames = getBarChangeKeyFrames;
3
+ exports.barFadeKeyframes = void 0;
4
4
  const react_1 = require("@emotion/react");
5
5
  /**
6
- * 获取转圈每一条bar的过渡动画
7
- * @param color
6
+ * iOS 菊花单条 bar 的不透明度衰减动画
7
+ * 1 -> 0.18 线性衰减;keyframes 与颜色解耦,全局共享单例,
8
+ * 走 opacity 触发 GPU 合成而非 SVG paint,性能更高。
8
9
  */
9
- function getBarChangeKeyFrames(color) {
10
- return (0, react_1.keyframes) `
11
- from {
12
- fill: ${color};
13
- }
14
- to {
15
- fill: transparent;
16
- }
17
- `;
18
- }
10
+ exports.barFadeKeyframes = (0, react_1.keyframes) `
11
+ 0% { opacity: 1; }
12
+ 100% { opacity: 0.18; }
13
+ `;
@@ -17,8 +17,9 @@ function Wrapper(props) {
17
17
  if (typeof overlay === 'object') {
18
18
  overlayProps = Object.assign(Object.assign({}, overlayProps), overlay);
19
19
  }
20
- // 指示器样式
20
+ // 指示器样式:默认 size .48rem,保证带文字 / 不带文字两态指示器大小一致
21
21
  let indicatorProps = {
22
+ size: '.48rem',
22
23
  barWidth: 5,
23
24
  barHeight: 25,
24
25
  barCount: 14,
@@ -20,8 +20,10 @@ exports.LoadingHide = (0, react_1.keyframes) `
20
20
  `;
21
21
  exports.style = {
22
22
  boxCommon: {
23
- backgroundColor: `rgba(0, 0, 0, .8)`,
24
- borderRadius: '.16rem',
23
+ backgroundColor: `rgba(0, 0, 0, .72)`,
24
+ borderRadius: '.2rem',
25
+ backdropFilter: 'blur(20px) saturate(160%)',
26
+ WebkitBackdropFilter: 'blur(20px) saturate(160%)',
25
27
  },
26
28
  box: {
27
29
  width: '1.6rem',
@@ -33,19 +35,14 @@ exports.style = {
33
35
  boxHide: {
34
36
  animation: `${exports.LoadingHide} 200ms`,
35
37
  },
36
- boxWithExtra: [
37
- { padding: '.3rem' },
38
- {
39
- "> div:first-of-type": {
40
- width: '.48rem',
41
- height: '.48rem',
42
- },
43
- },
44
- ],
38
+ boxWithExtra: {
39
+ padding: '.3rem',
40
+ },
45
41
  hint: {
46
- color: "#f5f5f5dd",
42
+ color: "#ffffff",
47
43
  whiteSpace: "nowrap",
48
44
  fontSize: '.28rem',
49
45
  marginLeft: '.2rem',
46
+ fontWeight: 500,
50
47
  },
51
48
  };
@@ -37,13 +37,18 @@ function Overlay(props) {
37
37
  const style = (0, react_1.useMemo)(() => {
38
38
  const styles = [];
39
39
  // 如果是全屏,设置全屏样式
40
+ // 通过 CSS 变量 --clxx-max-width 与 Container 的 maxWidth 联动;
41
+ // PC 端 fixed 默认参照浏览器窗口,这里用 left:50% + translateX(-50%) + maxWidth
42
+ // 让遮罩 / 弹窗水平居中并限制在 Container 视口范围内
40
43
  if (fullScreen) {
41
44
  styles.push({
42
45
  zIndex: 9999,
43
46
  position: "fixed",
44
47
  top: 0,
45
- left: 0,
48
+ left: "50%",
49
+ transform: "translateX(-50%)",
46
50
  width: "100%",
51
+ maxWidth: "var(--clxx-max-width, 100%)",
47
52
  height: "100%",
48
53
  backgroundColor: maskColor,
49
54
  });
@@ -0,0 +1,6 @@
1
+ export interface TreeRegionItem {
2
+ value: string;
3
+ label: string;
4
+ children?: TreeRegionItem[];
5
+ }
6
+ export declare const treeRegionData: TreeRegionItem[];