wx-sky-ui 1.0.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.
- package/LICENSE +21 -0
- package/README.md +138 -0
- package/miniprogram_dist/action-sheet/index.d.ts +0 -0
- package/miniprogram_dist/action-sheet/index.js +67 -0
- package/miniprogram_dist/action-sheet/index.js.map +1 -0
- package/miniprogram_dist/action-sheet/index.json +6 -0
- package/miniprogram_dist/action-sheet/index.wxml +62 -0
- package/miniprogram_dist/action-sheet/index.wxss +227 -0
- package/miniprogram_dist/action-sheet/index.wxss.map +1 -0
- package/miniprogram_dist/badge/index.d.ts +0 -0
- package/miniprogram_dist/badge/index.js +114 -0
- package/miniprogram_dist/badge/index.js.map +1 -0
- package/miniprogram_dist/badge/index.json +6 -0
- package/miniprogram_dist/badge/index.wxml +16 -0
- package/miniprogram_dist/badge/index.wxss +105 -0
- package/miniprogram_dist/badge/index.wxss.map +1 -0
- package/miniprogram_dist/button/index.d.ts +0 -0
- package/miniprogram_dist/button/index.js +140 -0
- package/miniprogram_dist/button/index.js.map +1 -0
- package/miniprogram_dist/button/index.json +6 -0
- package/miniprogram_dist/button/index.wxml +28 -0
- package/miniprogram_dist/button/index.wxss +211 -0
- package/miniprogram_dist/button/index.wxss.map +1 -0
- package/miniprogram_dist/cell/index.d.ts +0 -0
- package/miniprogram_dist/cell/index.js +55 -0
- package/miniprogram_dist/cell/index.js.map +1 -0
- package/miniprogram_dist/cell/index.json +6 -0
- package/miniprogram_dist/cell/index.wxml +37 -0
- package/miniprogram_dist/cell/index.wxss +82 -0
- package/miniprogram_dist/cell/index.wxss.map +1 -0
- package/miniprogram_dist/checkbox/index.d.ts +0 -0
- package/miniprogram_dist/checkbox/index.js +50 -0
- package/miniprogram_dist/checkbox/index.js.map +1 -0
- package/miniprogram_dist/checkbox/index.json +6 -0
- package/miniprogram_dist/checkbox/index.wxml +16 -0
- package/miniprogram_dist/checkbox/index.wxss +87 -0
- package/miniprogram_dist/checkbox/index.wxss.map +1 -0
- package/miniprogram_dist/common/utils/index.d.ts +22 -0
- package/miniprogram_dist/common/utils/index.js +46 -0
- package/miniprogram_dist/common/utils/index.js.map +1 -0
- package/miniprogram_dist/datetime-picker/calendar.d.ts +1 -0
- package/miniprogram_dist/datetime-picker/calendar.js +424 -0
- package/miniprogram_dist/datetime-picker/calendar.js.map +1 -0
- package/miniprogram_dist/datetime-picker/calendar.json +8 -0
- package/miniprogram_dist/datetime-picker/calendar.wxml +86 -0
- package/miniprogram_dist/datetime-picker/calendar.wxss +352 -0
- package/miniprogram_dist/datetime-picker/calendar.wxss.map +1 -0
- package/miniprogram_dist/datetime-picker/index.d.ts +1 -0
- package/miniprogram_dist/datetime-picker/index.js +672 -0
- package/miniprogram_dist/datetime-picker/index.js.map +1 -0
- package/miniprogram_dist/datetime-picker/index.json +9 -0
- package/miniprogram_dist/datetime-picker/index.wxml +125 -0
- package/miniprogram_dist/datetime-picker/index.wxss +243 -0
- package/miniprogram_dist/datetime-picker/index.wxss.map +1 -0
- package/miniprogram_dist/datetime-picker/time-picker.d.ts +0 -0
- package/miniprogram_dist/datetime-picker/time-picker.js +83 -0
- package/miniprogram_dist/datetime-picker/time-picker.js.map +1 -0
- package/miniprogram_dist/datetime-picker/time-picker.json +6 -0
- package/miniprogram_dist/datetime-picker/time-picker.wxml +36 -0
- package/miniprogram_dist/datetime-picker/time-picker.wxss +75 -0
- package/miniprogram_dist/datetime-picker/time-picker.wxss.map +1 -0
- package/miniprogram_dist/datetime-picker/util.d.ts +172 -0
- package/miniprogram_dist/datetime-picker/util.js +404 -0
- package/miniprogram_dist/datetime-picker/util.js.map +1 -0
- package/miniprogram_dist/dialog/index.d.ts +0 -0
- package/miniprogram_dist/dialog/index.js +81 -0
- package/miniprogram_dist/dialog/index.js.map +1 -0
- package/miniprogram_dist/dialog/index.json +6 -0
- package/miniprogram_dist/dialog/index.wxml +55 -0
- package/miniprogram_dist/dialog/index.wxss +143 -0
- package/miniprogram_dist/dialog/index.wxss.map +1 -0
- package/miniprogram_dist/dropdown-select/index.d.ts +4 -0
- package/miniprogram_dist/dropdown-select/index.js +84 -0
- package/miniprogram_dist/dropdown-select/index.js.map +1 -0
- package/miniprogram_dist/dropdown-select/index.json +6 -0
- package/miniprogram_dist/dropdown-select/index.wxml +42 -0
- package/miniprogram_dist/dropdown-select/index.wxss +189 -0
- package/miniprogram_dist/dropdown-select/index.wxss.map +1 -0
- package/miniprogram_dist/editor/index.d.ts +0 -0
- package/miniprogram_dist/editor/index.js +254 -0
- package/miniprogram_dist/editor/index.js.map +1 -0
- package/miniprogram_dist/editor/index.json +6 -0
- package/miniprogram_dist/editor/index.wxml +142 -0
- package/miniprogram_dist/editor/index.wxss +613 -0
- package/miniprogram_dist/editor/index.wxss.map +1 -0
- package/miniprogram_dist/float-button/index.d.ts +0 -0
- package/miniprogram_dist/float-button/index.js +281 -0
- package/miniprogram_dist/float-button/index.js.map +1 -0
- package/miniprogram_dist/float-button/index.json +8 -0
- package/miniprogram_dist/float-button/index.wxml +68 -0
- package/miniprogram_dist/float-button/index.wxss +119 -0
- package/miniprogram_dist/float-button/index.wxss.map +1 -0
- package/miniprogram_dist/html-renderer/index.d.ts +1 -0
- package/miniprogram_dist/html-renderer/index.js +74 -0
- package/miniprogram_dist/html-renderer/index.js.map +1 -0
- package/miniprogram_dist/html-renderer/index.json +6 -0
- package/miniprogram_dist/html-renderer/index.wxml +79 -0
- package/miniprogram_dist/html-renderer/index.wxss +200 -0
- package/miniprogram_dist/html-renderer/index.wxss.map +1 -0
- package/miniprogram_dist/html-renderer/parser.d.ts +12 -0
- package/miniprogram_dist/html-renderer/parser.js +103 -0
- package/miniprogram_dist/html-renderer/parser.js.map +1 -0
- package/miniprogram_dist/icon/index.d.ts +1 -0
- package/miniprogram_dist/icon/index.js +231 -0
- package/miniprogram_dist/icon/index.js.map +1 -0
- package/miniprogram_dist/icon/index.json +6 -0
- package/miniprogram_dist/icon/index.wxml +13 -0
- package/miniprogram_dist/icon/index.wxss +14 -0
- package/miniprogram_dist/icon/index.wxss.map +1 -0
- package/miniprogram_dist/icon/presets.d.ts +7 -0
- package/miniprogram_dist/icon/presets.js +68 -0
- package/miniprogram_dist/icon/presets.js.map +1 -0
- package/miniprogram_dist/index.d.ts +6 -0
- package/miniprogram_dist/index.js +9 -0
- package/miniprogram_dist/index.js.map +1 -0
- package/miniprogram_dist/input/index.d.ts +0 -0
- package/miniprogram_dist/input/index.js +137 -0
- package/miniprogram_dist/input/index.js.map +1 -0
- package/miniprogram_dist/input/index.json +6 -0
- package/miniprogram_dist/input/index.wxml +57 -0
- package/miniprogram_dist/input/index.wxss +331 -0
- package/miniprogram_dist/input/index.wxss.map +1 -0
- package/miniprogram_dist/nav-bar/index.d.ts +0 -0
- package/miniprogram_dist/nav-bar/index.js +162 -0
- package/miniprogram_dist/nav-bar/index.js.map +1 -0
- package/miniprogram_dist/nav-bar/index.json +9 -0
- package/miniprogram_dist/nav-bar/index.wxml +46 -0
- package/miniprogram_dist/nav-bar/index.wxss +160 -0
- package/miniprogram_dist/nav-bar/index.wxss.map +1 -0
- package/miniprogram_dist/popup-select/index.d.ts +4 -0
- package/miniprogram_dist/popup-select/index.js +70 -0
- package/miniprogram_dist/popup-select/index.js.map +1 -0
- package/miniprogram_dist/popup-select/index.json +6 -0
- package/miniprogram_dist/popup-select/index.wxml +48 -0
- package/miniprogram_dist/popup-select/index.wxss +184 -0
- package/miniprogram_dist/popup-select/index.wxss.map +1 -0
- package/miniprogram_dist/progress/index.d.ts +0 -0
- package/miniprogram_dist/progress/index.js +120 -0
- package/miniprogram_dist/progress/index.js.map +1 -0
- package/miniprogram_dist/progress/index.json +6 -0
- package/miniprogram_dist/progress/index.wxml +31 -0
- package/miniprogram_dist/progress/index.wxss +163 -0
- package/miniprogram_dist/progress/index.wxss.map +1 -0
- package/miniprogram_dist/radio/index.d.ts +0 -0
- package/miniprogram_dist/radio/index.js +52 -0
- package/miniprogram_dist/radio/index.js.map +1 -0
- package/miniprogram_dist/radio/index.json +6 -0
- package/miniprogram_dist/radio/index.wxml +16 -0
- package/miniprogram_dist/radio/index.wxss +62 -0
- package/miniprogram_dist/radio/index.wxss.map +1 -0
- package/miniprogram_dist/rate/index.d.ts +0 -0
- package/miniprogram_dist/rate/index.js +128 -0
- package/miniprogram_dist/rate/index.js.map +1 -0
- package/miniprogram_dist/rate/index.json +6 -0
- package/miniprogram_dist/rate/index.wxml +31 -0
- package/miniprogram_dist/rate/index.wxss +89 -0
- package/miniprogram_dist/rate/index.wxss.map +1 -0
- package/miniprogram_dist/select-input/index.d.ts +0 -0
- package/miniprogram_dist/select-input/index.js +116 -0
- package/miniprogram_dist/select-input/index.js.map +1 -0
- package/miniprogram_dist/select-input/index.json +6 -0
- package/miniprogram_dist/select-input/index.wxml +43 -0
- package/miniprogram_dist/select-input/index.wxss +143 -0
- package/miniprogram_dist/select-input/index.wxss.map +1 -0
- package/miniprogram_dist/skeleton/index.d.ts +0 -0
- package/miniprogram_dist/skeleton/index.js +102 -0
- package/miniprogram_dist/skeleton/index.js.map +1 -0
- package/miniprogram_dist/skeleton/index.json +6 -0
- package/miniprogram_dist/skeleton/index.wxml +40 -0
- package/miniprogram_dist/skeleton/index.wxss +103 -0
- package/miniprogram_dist/skeleton/index.wxss.map +1 -0
- package/miniprogram_dist/slider/index.d.ts +0 -0
- package/miniprogram_dist/slider/index.js +180 -0
- package/miniprogram_dist/slider/index.js.map +1 -0
- package/miniprogram_dist/slider/index.json +6 -0
- package/miniprogram_dist/slider/index.wxml +38 -0
- package/miniprogram_dist/slider/index.wxss +132 -0
- package/miniprogram_dist/slider/index.wxss.map +1 -0
- package/miniprogram_dist/subsection/index.d.ts +0 -0
- package/miniprogram_dist/subsection/index.js +85 -0
- package/miniprogram_dist/subsection/index.js.map +1 -0
- package/miniprogram_dist/subsection/index.json +6 -0
- package/miniprogram_dist/subsection/index.wxml +55 -0
- package/miniprogram_dist/subsection/index.wxss +150 -0
- package/miniprogram_dist/subsection/index.wxss.map +1 -0
- package/miniprogram_dist/swipe-cell/index.d.ts +0 -0
- package/miniprogram_dist/swipe-cell/index.js +91 -0
- package/miniprogram_dist/swipe-cell/index.js.map +1 -0
- package/miniprogram_dist/swipe-cell/index.json +6 -0
- package/miniprogram_dist/swipe-cell/index.wxml +30 -0
- package/miniprogram_dist/swipe-cell/index.wxss +42 -0
- package/miniprogram_dist/swipe-cell/index.wxss.map +1 -0
- package/miniprogram_dist/swiper/index.d.ts +0 -0
- package/miniprogram_dist/swiper/index.js +82 -0
- package/miniprogram_dist/swiper/index.js.map +1 -0
- package/miniprogram_dist/swiper/index.json +6 -0
- package/miniprogram_dist/swiper/index.wxml +53 -0
- package/miniprogram_dist/swiper/index.wxss +123 -0
- package/miniprogram_dist/swiper/index.wxss.map +1 -0
- package/miniprogram_dist/switch/index.d.ts +0 -0
- package/miniprogram_dist/switch/index.js +53 -0
- package/miniprogram_dist/switch/index.js.map +1 -0
- package/miniprogram_dist/switch/index.json +6 -0
- package/miniprogram_dist/switch/index.wxml +21 -0
- package/miniprogram_dist/switch/index.wxss +198 -0
- package/miniprogram_dist/switch/index.wxss.map +1 -0
- package/miniprogram_dist/tag/index.d.ts +0 -0
- package/miniprogram_dist/tag/index.js +114 -0
- package/miniprogram_dist/tag/index.js.map +1 -0
- package/miniprogram_dist/tag/index.json +6 -0
- package/miniprogram_dist/tag/index.wxml +19 -0
- package/miniprogram_dist/tag/index.wxss +182 -0
- package/miniprogram_dist/tag/index.wxss.map +1 -0
- package/miniprogram_dist/textarea/index.d.ts +0 -0
- package/miniprogram_dist/textarea/index.js +143 -0
- package/miniprogram_dist/textarea/index.js.map +1 -0
- package/miniprogram_dist/textarea/index.json +6 -0
- package/miniprogram_dist/textarea/index.wxml +59 -0
- package/miniprogram_dist/textarea/index.wxss +242 -0
- package/miniprogram_dist/textarea/index.wxss.map +1 -0
- package/miniprogram_dist/toast/index.d.ts +0 -0
- package/miniprogram_dist/toast/index.js +92 -0
- package/miniprogram_dist/toast/index.js.map +1 -0
- package/miniprogram_dist/toast/index.json +8 -0
- package/miniprogram_dist/toast/index.wxml +30 -0
- package/miniprogram_dist/toast/index.wxss +116 -0
- package/miniprogram_dist/toast/index.wxss.map +1 -0
- package/miniprogram_dist/uploader/index.d.ts +8 -0
- package/miniprogram_dist/uploader/index.js +192 -0
- package/miniprogram_dist/uploader/index.js.map +1 -0
- package/miniprogram_dist/uploader/index.json +8 -0
- package/miniprogram_dist/uploader/index.wxml +88 -0
- package/miniprogram_dist/uploader/index.wxss +179 -0
- package/miniprogram_dist/uploader/index.wxss.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<view
|
|
2
|
+
class="sky-cell {{ isLink || clickable ? 'sky-cell--clickable' : '' }} {{ border ? 'sky-cell--border' : '' }}"
|
|
3
|
+
hover-class="none"
|
|
4
|
+
style="{{ customStyle }}"
|
|
5
|
+
bindtap="onTap"
|
|
6
|
+
>
|
|
7
|
+
<!-- 左侧图标展示区 -->
|
|
8
|
+
<view class="sky-cell__icon-wrap">
|
|
9
|
+
<image wx:if="{{ icon }}" class="sky-cell__left-icon" src="{{ icon }}" mode="aspectFit"></image>
|
|
10
|
+
<slot wx:else name="icon"></slot>
|
|
11
|
+
</view>
|
|
12
|
+
|
|
13
|
+
<!-- 标题及描述区 -->
|
|
14
|
+
<view class="sky-cell__title-wrap">
|
|
15
|
+
<view class="sky-cell__title">
|
|
16
|
+
<text wx:if="{{ title }}">{{ title }}</text>
|
|
17
|
+
<slot wx:else name="title"></slot>
|
|
18
|
+
</view>
|
|
19
|
+
<view class="sky-cell__label" wx:if="{{ label }}">
|
|
20
|
+
<text>{{ label }}</text>
|
|
21
|
+
</view>
|
|
22
|
+
<view class="sky-cell__label-slot" wx:else>
|
|
23
|
+
<slot name="label"></slot>
|
|
24
|
+
</view>
|
|
25
|
+
</view>
|
|
26
|
+
|
|
27
|
+
<!-- 右侧数值展示区 -->
|
|
28
|
+
<view class="sky-cell__value-wrap">
|
|
29
|
+
<text wx:if="{{ value }}">{{ value }}</text>
|
|
30
|
+
<slot wx:else name="value"></slot>
|
|
31
|
+
</view>
|
|
32
|
+
|
|
33
|
+
<!-- 右侧链接跳转手绘箭头 -->
|
|
34
|
+
<view wx:if="{{ isLink }}" class="sky-cell__arrow-wrap">
|
|
35
|
+
<view class="sky-cell__arrow"></view>
|
|
36
|
+
</view>
|
|
37
|
+
</view>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.sky-cell {
|
|
2
|
+
position: relative;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
width: 100%;
|
|
5
|
+
padding: 30rpx 36rpx;
|
|
6
|
+
background-color: #ffffff;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
align-items: center;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
transition: background-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
12
|
+
}
|
|
13
|
+
.sky-cell__icon-wrap {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
}
|
|
18
|
+
.sky-cell__icon-wrap .sky-cell__left-icon {
|
|
19
|
+
width: 40rpx;
|
|
20
|
+
height: 40rpx;
|
|
21
|
+
margin-right: 16rpx;
|
|
22
|
+
}
|
|
23
|
+
.sky-cell__title-wrap {
|
|
24
|
+
flex: 1;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
}
|
|
29
|
+
.sky-cell__title-wrap .sky-cell__title {
|
|
30
|
+
font-size: 30rpx;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
color: #212529;
|
|
33
|
+
line-height: 1.4;
|
|
34
|
+
}
|
|
35
|
+
.sky-cell__title-wrap .sky-cell__label {
|
|
36
|
+
font-size: 24rpx;
|
|
37
|
+
color: #868e96;
|
|
38
|
+
margin-top: 8rpx;
|
|
39
|
+
line-height: 1.5;
|
|
40
|
+
}
|
|
41
|
+
.sky-cell__title-wrap .sky-cell__label-slot {
|
|
42
|
+
margin-top: 8rpx;
|
|
43
|
+
}
|
|
44
|
+
.sky-cell__value-wrap {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: flex-end;
|
|
48
|
+
font-size: 28rpx;
|
|
49
|
+
color: #868e96;
|
|
50
|
+
text-align: right;
|
|
51
|
+
}
|
|
52
|
+
.sky-cell__arrow-wrap {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
margin-left: 16rpx;
|
|
57
|
+
}
|
|
58
|
+
.sky-cell__arrow-wrap .sky-cell__arrow {
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
width: 14rpx;
|
|
61
|
+
height: 14rpx;
|
|
62
|
+
border-top: 3rpx solid #adb5bd;
|
|
63
|
+
border-right: 3rpx solid #adb5bd;
|
|
64
|
+
transform: rotate(45deg);
|
|
65
|
+
}
|
|
66
|
+
.sky-cell--border::after {
|
|
67
|
+
content: " ";
|
|
68
|
+
position: absolute;
|
|
69
|
+
bottom: 0;
|
|
70
|
+
left: 36rpx;
|
|
71
|
+
right: 36rpx;
|
|
72
|
+
height: 1px;
|
|
73
|
+
background-color: #f1f3f5;
|
|
74
|
+
transform: scaleY(0.5);
|
|
75
|
+
transform-origin: center bottom;
|
|
76
|
+
}
|
|
77
|
+
.sky-cell--clickable {
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
.sky-cell--clickable:active {
|
|
81
|
+
background-color: #f1f3f5 !important;
|
|
82
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["cell/index.scss","common/style/theme.scss"],"names":[],"mappings":"AAOA;EACE;EACA;EACA;EAGA;EACA,kBC8BgB;ED3BhB;EACA;EACA;EACA;EAGA;;AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA,OCIa;EDHb;;AAIF;EACE;EACA,OCNa;EDOb;EACA;;AAGF;EACE;;AAKJ;EACE;EACA;EACA;EACA;EACA,OCtBe;EDuBf;;AAIF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EAGA;EACA;EACA;;AAMF;EACE;EACA;EACA;EAGA;EACA;EACA;EACA,kBC5Da;ED+Db;EACA;;AAKJ;EACE;;AAGA;EACE","file":"index.wxss","sourcesContent":["@use \"../common/style/theme.scss\" as *;\n@use \"../common/style/mixins.scss\" as *;\n\n// ==========================================\n// Skyline-UI Cell 单元格样式 (Sass)\n// ==========================================\n\n.sky-cell {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n \n // 大方宽敞的留白比例\n padding: 30rpx 36rpx;\n background-color: $sky-color-white;\n \n // 全 Flex 盒模型排版\n display: flex;\n flex-direction: row;\n align-items: center;\n overflow: hidden;\n \n // 平滑过渡\n transition: background-color $sky-transition-duration $sky-transition-timing;\n\n // ==================== 1. 左侧图标区 ====================\n &__icon-wrap {\n display: flex;\n align-items: center;\n justify-content: center;\n \n .sky-cell__left-icon {\n width: 40rpx;\n height: 40rpx;\n margin-right: 16rpx;\n }\n }\n\n // ==================== 2. 标题与描述区 ====================\n &__title-wrap {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n \n // 标题文字排版 (暗黑墨色,中粗)\n .sky-cell__title {\n font-size: 30rpx;\n font-weight: 500;\n color: $sky-color-gray-9;\n line-height: 1.4;\n }\n \n // 详细描述排版 (浅灰次级)\n .sky-cell__label {\n font-size: 24rpx;\n color: $sky-color-gray-6;\n margin-top: 8rpx;\n line-height: 1.5;\n }\n \n .sky-cell__label-slot {\n margin-top: 8rpx;\n }\n }\n\n // ==================== 3. 右侧数值区 ====================\n &__value-wrap {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n font-size: 28rpx;\n color: $sky-color-gray-6;\n text-align: right;\n }\n\n // ==================== 4. 右侧手绘箭头区 ====================\n &__arrow-wrap {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 16rpx;\n \n .sky-cell__arrow {\n box-sizing: border-box;\n width: 14rpx;\n height: 14rpx;\n \n // 纯 CSS 物理手绘 1px 细线箭头 (高保真无锯齿)\n border-top: 3rpx solid $sky-color-gray-5;\n border-right: 3rpx solid $sky-color-gray-5;\n transform: rotate(45deg);\n }\n }\n\n // ==================== 5. 1px 极细底边线 (精细收缩) ====================\n &--border {\n &::after {\n content: \" \";\n position: absolute;\n bottom: 0;\n \n // 左右对齐缩回,不贴外边缘 (高品质 UI 黄金分割细节)\n left: 36rpx;\n right: 36rpx;\n height: 1px;\n background-color: $sky-color-gray-2; // 极淡灰底线\n \n // 微信硬件渲染优化\n transform: scaleY(0.5);\n transform-origin: center bottom;\n }\n }\n\n // ==================== 6. 点击态反馈 ====================\n &--clickable {\n cursor: pointer;\n\n // 极其平缓温润的微变暗反馈 (变暗约 6%),既克制优雅,又能清晰感知\n &:active {\n background-color: $sky-color-gray-2 !important;\n }\n }\n}\n","// ==========================================\r\n// Skyline-UI 极具质感的现代设计系统 (SCSS)\r\n// ==========================================\r\n\r\n// --- 品牌色体系 (HSL Tailored Colors) ---\r\n$sky-brand-h: 250; // 主品牌色相 (优雅深紫/蓝色调)\r\n$sky-brand-s: 85%;\r\n$sky-brand-l: 55%;\r\n\r\n$sky-color-primary: hsl($sky-brand-h, $sky-brand-s, $sky-brand-l);\r\n$sky-color-primary-hover: hsl($sky-brand-h, $sky-brand-s, $sky-brand-l - 8%);\r\n$sky-color-primary-active: hsl($sky-brand-h, $sky-brand-s, $sky-brand-l - 15%);\r\n$sky-color-primary-light: hsl($sky-brand-h, $sky-brand-s, 95%);\r\n\r\n// 辅助色体系 (意图表达)\r\n$sky-color-success: hsl(150, 80%, 40%);\r\n$sky-color-success-active: hsl(150, 80%, 32%);\r\n$sky-color-success-light: hsl(150, 80%, 96%);\r\n\r\n$sky-color-warning: hsl(35, 90%, 50%);\r\n$sky-color-warning-active: hsl(35, 90%, 42%);\r\n$sky-color-warning-light: hsl(35, 90%, 96%);\r\n\r\n$sky-color-danger: hsl(355, 85%, 55%);\r\n$sky-color-danger-active: hsl(355, 85%, 45%);\r\n$sky-color-danger-light: hsl(355, 85%, 96%);\r\n\r\n$sky-color-info: hsl(200, 85%, 50%);\r\n$sky-color-info-active: hsl(200, 85%, 42%);\r\n$sky-color-info-light: hsl(200, 85%, 96%);\r\n\r\n// --- Tag 标签组件专用色系 (莫兰迪低饱和) ---\r\n$sky-tag-blue: #edf2ff;\r\n$sky-tag-blue-text: #3b5bdb;\r\n$sky-tag-green: #ebfbee;\r\n$sky-tag-green-text: #2b8a3e;\r\n$sky-tag-yellow: #fff9db;\r\n$sky-tag-yellow-text: #f08c00;\r\n$sky-tag-red: #ffeef0;\r\n$sky-tag-red-text: #fa5252;\r\n$sky-tag-info: #e7f5ff;\r\n$sky-tag-info-text: #1c7ed6;\r\n\r\n// --- 纯净的中性色调 (Sleek Grays) ---\r\n$sky-color-white: #ffffff;\r\n$sky-color-gray-1: #f8f9fa; // 极浅背景\r\n$sky-color-gray-2: #f1f3f5; // 浅灰背景\r\n$sky-color-gray-3: #e9ecef; // 边框线/失效态\r\n$sky-color-gray-4: #dee2e6;\r\n$sky-color-gray-5: #adb5bd; // 提示文本\r\n$sky-color-gray-6: #868e96;\r\n$sky-color-gray-7: #495057; // 次级文本\r\n$sky-color-gray-8: #343a40;\r\n$sky-color-gray-9: #212529; // 主级文本\r\n\r\n// --- 阴影系统 (Premium Shadows) ---\r\n$sky-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);\r\n$sky-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);\r\n$sky-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);\r\n$sky-shadow-primary: 0 4px 14px rgba(100, 80, 240, 0.2);\r\n\r\n// --- 圆角规范 (Borders) ---\r\n$sky-border-radius-xs: 4rpx;\r\n$sky-border-radius-sm: 8rpx;\r\n$sky-border-radius-md: 12rpx;\r\n$sky-border-radius-lg: 20rpx;\r\n$sky-border-radius-round: 9999rpx;\r\n\r\n// --- 字体与字号规范 (Typography) ---\r\n$sky-font-family: -apple-system, BlinkMacSystemFont, \"Helvetica Neue\", Helvetica, \"Segoe UI\", Arial, Roboto, sans-serif;\r\n$sky-font-size-xs: 20rpx;\r\n$sky-font-size-sm: 24rpx;\r\n$sky-font-size-md: 28rpx;\r\n$sky-font-size-lg: 32rpx;\r\n$sky-font-size-xl: 36rpx;\r\n\r\n// --- 动效与过渡 (Transitions) ---\r\n$sky-transition-duration: 200ms;\r\n$sky-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);\r\n\r\n// --- 间距规范 (Spacing) ---\r\n$sky-spacing-xs: 8rpx;\r\n$sky-spacing-sm: 16rpx;\r\n$sky-spacing-md: 24rpx;\r\n$sky-spacing-lg: 32rpx;\r\n$sky-spacing-xl: 48rpx;\r\n\r\n// --- 组件高度规范 (Component Heights) ---\r\n$sky-height-sm: 56rpx;\r\n$sky-height-md: 72rpx;\r\n$sky-height-lg: 88rpx;\r\n$sky-height-xl: 96rpx;\r\n\r\n// --- 层级规范 (Z-Index) ---\r\n$sky-z-dropdown: 100;\r\n$sky-z-fixed: 500;\r\n$sky-z-popup: 1000;\r\n$sky-z-toast: 2000;\r\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Component({
|
|
3
|
+
options: {
|
|
4
|
+
virtualHost: true // 开启虚拟节点以减少 Skyline 节点层级
|
|
5
|
+
},
|
|
6
|
+
properties: {
|
|
7
|
+
// 是否被选中
|
|
8
|
+
checked: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
value: false
|
|
11
|
+
},
|
|
12
|
+
// 是否禁用
|
|
13
|
+
disabled: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
value: false
|
|
16
|
+
},
|
|
17
|
+
// 复选选项代表的值
|
|
18
|
+
value: {
|
|
19
|
+
type: null,
|
|
20
|
+
value: ''
|
|
21
|
+
},
|
|
22
|
+
// 显示的主文本
|
|
23
|
+
label: {
|
|
24
|
+
type: String,
|
|
25
|
+
value: ''
|
|
26
|
+
},
|
|
27
|
+
// 主题变体:primary, success, warning, danger, info
|
|
28
|
+
type: {
|
|
29
|
+
type: String,
|
|
30
|
+
value: 'primary'
|
|
31
|
+
},
|
|
32
|
+
// 附加样式
|
|
33
|
+
customStyle: {
|
|
34
|
+
type: String,
|
|
35
|
+
value: ''
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
onTap() {
|
|
40
|
+
if (this.data.disabled) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
// 复选框最常规也最符合直觉的逻辑:点击自身会进行 checked 状态的反选
|
|
44
|
+
const nextChecked = !this.data.checked;
|
|
45
|
+
this.triggerEvent('change', nextChecked);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/checkbox/index.ts"],"names":[],"mappings":";AAAA,SAAS,CAAC;IACR,OAAO,EAAE;QACP,WAAW,EAAE,IAAI,CAAC,yBAAyB;KAC5C;IAED,UAAU,EAAE;QACV,QAAQ;QACR,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,KAAK;SACb;QACD,OAAO;QACP,QAAQ,EAAE;YACR,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,KAAK;SACb;QACD,WAAW;QACX,KAAK,EAAE;YACL,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,EAAE;SACV;QACD,SAAS;QACT,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,EAAE;SACV;QACD,+CAA+C;QAC/C,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,SAAS;SACjB;QACD,OAAO;QACP,WAAW,EAAE;YACX,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,EAAE;SACV;KACF;IAED,OAAO,EAAE;QACP,KAAK;YACH,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACvB,OAAO;YACT,CAAC;YACD,wCAAwC;YACxC,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;YACvC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QAC3C,CAAC;KACF;CACF,CAAC,CAAC","file":"index.js","sourcesContent":["Component({\r\n options: {\r\n virtualHost: true // 开启虚拟节点以减少 Skyline 节点层级\r\n },\r\n\r\n properties: {\r\n // 是否被选中\r\n checked: {\r\n type: Boolean,\r\n value: false\r\n },\r\n // 是否禁用\r\n disabled: {\r\n type: Boolean,\r\n value: false\r\n },\r\n // 复选选项代表的值\r\n value: {\r\n type: null,\r\n value: ''\r\n },\r\n // 显示的主文本\r\n label: {\r\n type: String,\r\n value: ''\r\n },\r\n // 主题变体:primary, success, warning, danger, info\r\n type: {\r\n type: String,\r\n value: 'primary'\r\n },\r\n // 附加样式\r\n customStyle: {\r\n type: String,\r\n value: ''\r\n }\r\n },\r\n\r\n methods: {\r\n onTap() {\r\n if (this.data.disabled) {\r\n return;\r\n }\r\n // 复选框最常规也最符合直觉的逻辑:点击自身会进行 checked 状态的反选\r\n const nextChecked = !this.data.checked;\r\n this.triggerEvent('change', nextChecked);\r\n }\r\n }\r\n});\r\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<view
|
|
2
|
+
class="sky-checkbox {{ checked ? 'sky-checkbox--checked' : '' }} {{ disabled ? 'sky-checkbox--disabled' : '' }} sky-checkbox--{{ type }}"
|
|
3
|
+
style="{{ customStyle }}"
|
|
4
|
+
bindtap="onTap"
|
|
5
|
+
>
|
|
6
|
+
<!-- 复选标记方框 -->
|
|
7
|
+
<view class="sky-checkbox__icon-wrap">
|
|
8
|
+
<view class="sky-checkbox__check-mark"></view>
|
|
9
|
+
</view>
|
|
10
|
+
|
|
11
|
+
<!-- 选项文字 -->
|
|
12
|
+
<view class="sky-checkbox__label">
|
|
13
|
+
<text wx:if="{{ label }}">{{ label }}</text>
|
|
14
|
+
<slot wx:else></slot>
|
|
15
|
+
</view>
|
|
16
|
+
</view>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
.sky-checkbox {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
align-items: center;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
outline: none;
|
|
7
|
+
-webkit-tap-highlight-color: transparent;
|
|
8
|
+
}
|
|
9
|
+
.sky-checkbox__icon-wrap {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
width: 40rpx;
|
|
12
|
+
height: 40rpx;
|
|
13
|
+
border-radius: 8rpx;
|
|
14
|
+
margin-right: 16rpx;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
border: 3rpx solid #dee2e6;
|
|
20
|
+
background-color: #ffffff;
|
|
21
|
+
transition: background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
22
|
+
}
|
|
23
|
+
.sky-checkbox__check-mark {
|
|
24
|
+
position: relative;
|
|
25
|
+
width: 20rpx;
|
|
26
|
+
height: 12rpx;
|
|
27
|
+
margin-top: -3rpx;
|
|
28
|
+
transform: rotate(-45deg);
|
|
29
|
+
}
|
|
30
|
+
.sky-checkbox__check-mark::before {
|
|
31
|
+
content: " ";
|
|
32
|
+
position: absolute;
|
|
33
|
+
left: 0;
|
|
34
|
+
bottom: 0;
|
|
35
|
+
width: 3.5rpx;
|
|
36
|
+
height: 0;
|
|
37
|
+
border-radius: 2rpx;
|
|
38
|
+
background-color: #ffffff;
|
|
39
|
+
transition: height 80ms linear;
|
|
40
|
+
}
|
|
41
|
+
.sky-checkbox__check-mark::after {
|
|
42
|
+
content: " ";
|
|
43
|
+
position: absolute;
|
|
44
|
+
left: 0;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
height: 3.5rpx;
|
|
47
|
+
width: 0;
|
|
48
|
+
border-radius: 2rpx;
|
|
49
|
+
background-color: #ffffff;
|
|
50
|
+
transition: width 120ms linear;
|
|
51
|
+
transition-delay: 80ms;
|
|
52
|
+
}
|
|
53
|
+
.sky-checkbox__label {
|
|
54
|
+
font-size: 28rpx;
|
|
55
|
+
color: #343a40;
|
|
56
|
+
line-height: 1.4;
|
|
57
|
+
}
|
|
58
|
+
.sky-checkbox--disabled {
|
|
59
|
+
opacity: 0.5;
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
}
|
|
62
|
+
.sky-checkbox--checked .sky-checkbox__check-mark::before {
|
|
63
|
+
height: 12rpx;
|
|
64
|
+
}
|
|
65
|
+
.sky-checkbox--checked .sky-checkbox__check-mark::after {
|
|
66
|
+
width: 22rpx;
|
|
67
|
+
}
|
|
68
|
+
.sky-checkbox--checked.sky-checkbox--primary .sky-checkbox__icon-wrap {
|
|
69
|
+
background-color: hsl(250, 85%, 55%);
|
|
70
|
+
border-color: hsl(250, 85%, 55%);
|
|
71
|
+
}
|
|
72
|
+
.sky-checkbox--checked.sky-checkbox--success .sky-checkbox__icon-wrap {
|
|
73
|
+
background-color: hsl(150, 80%, 40%);
|
|
74
|
+
border-color: hsl(150, 80%, 40%);
|
|
75
|
+
}
|
|
76
|
+
.sky-checkbox--checked.sky-checkbox--warning .sky-checkbox__icon-wrap {
|
|
77
|
+
background-color: hsl(35, 90%, 50%);
|
|
78
|
+
border-color: hsl(35, 90%, 50%);
|
|
79
|
+
}
|
|
80
|
+
.sky-checkbox--checked.sky-checkbox--danger .sky-checkbox__icon-wrap {
|
|
81
|
+
background-color: hsl(355, 85%, 55%);
|
|
82
|
+
border-color: hsl(355, 85%, 55%);
|
|
83
|
+
}
|
|
84
|
+
.sky-checkbox--checked.sky-checkbox--info .sky-checkbox__icon-wrap {
|
|
85
|
+
background-color: hsl(200, 85%, 50%);
|
|
86
|
+
border-color: hsl(200, 85%, 50%);
|
|
87
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["checkbox/index.scss","common/style/theme.scss","common/style/mixins.scss"],"names":[],"mappings":"AAOA;EACE;EACA;EACA;EACA;EAGA;EACA;;AAGA;EACE;EACA;EACA;EACA,eCyCmB;EDxCnB;EERF;EACA;EACA;EACA;EFWE;EACA,kBCcc;EDZd;;AAMF;EACE;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBCVY;EDaZ;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBCzBY;ED4BZ;EACA;;AAKJ;EACE;EACA,OC5Be;ED6Bf;;AAIF;EACE;EACA;;AAOE;EACE;;AAEF;EACE;;AAQJ;EACE,kBClGc;EDmGd,cCnGc;;ADwGhB;EACE,kBCnGc;EDoGd,cCpGc;;ADyGhB;EACE,kBCtGc;EDuGd,cCvGc;;AD4GhB;EACE,kBCzGa;ED0Gb,cC1Ga;;AD+Gf;EACE,kBC5GW;ED6GX,cC7GW","file":"index.wxss","sourcesContent":["@use \"../common/style/theme.scss\" as *;\n@use \"../common/style/mixins.scss\" as *;\n\n// ==========================================\n// Skyline-UI Checkbox 复选组件样式 (Sass)\n// ==========================================\n\n.sky-checkbox {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n cursor: pointer;\n \n // 极致的高级防直角打磨细节\n outline: none;\n -webkit-tap-highlight-color: transparent; // 彻底消除移动端点击时默认的半透明直角高亮框\n \n // ==================== 1. 外围方框 ====================\n &__icon-wrap {\n box-sizing: border-box;\n width: 40rpx;\n height: 40rpx;\n border-radius: $sky-border-radius-sm; // 精致圆角方框 (8rpx)\n margin-right: 16rpx;\n \n // 弹性 Flex 居中对勾\n @include flex-center;\n \n // 默认中性浅灰边框\n border: 3rpx solid $sky-color-gray-4;\n background-color: $sky-color-white;\n \n transition: background-color $sky-transition-duration $sky-transition-timing,\n border-color $sky-transition-duration $sky-transition-timing;\n }\n\n // ==================== 2. 手画对勾骨架 (Precision Check Mark) ====================\n \n &__check-mark {\n position: relative;\n width: 20rpx;\n height: 12rpx;\n margin-top: -3rpx; // 向上微调,保证重心绝对几何居中\n transform: rotate(-45deg); // 逆时针旋转 45 度形成斜上对勾\n \n // 2a. 对勾短边 (::before)\n &::before {\n content: \" \";\n position: absolute;\n left: 0;\n bottom: 0;\n width: 3.5rpx;\n height: 0; // 初始隐藏\n border-radius: 2rpx;\n background-color: $sky-color-white;\n \n // 短边先延伸 (无延迟)\n transition: height 80ms linear;\n }\n \n // 2b. 对勾长边 (::after)\n &::after {\n content: \" \";\n position: absolute;\n left: 0;\n bottom: 0;\n height: 3.5rpx;\n width: 0; // 初始隐藏\n border-radius: 2rpx;\n background-color: $sky-color-white;\n \n // 长边后延伸 (延迟 80ms,完美呈现“一笔画手手写”视觉感)\n transition: width 120ms linear;\n transition-delay: 80ms;\n }\n }\n\n // ==================== 3. 选项文字 ====================\n &__label {\n font-size: 28rpx;\n color: $sky-color-gray-8;\n line-height: 1.4;\n }\n\n // ==================== 4. 禁用态 ====================\n &--disabled {\n opacity: 0.5;\n pointer-events: none; // 彻底失效\n }\n\n // ==================== 5. 选中状态与一笔画激活 ====================\n \n &--checked {\n .sky-checkbox__check-mark {\n &::before {\n height: 12rpx; // 短边画出\n }\n &::after {\n width: 22rpx; // 长边画出\n }\n }\n }\n\n // HSL 主题色绑定\n \n &--checked.sky-checkbox--primary {\n .sky-checkbox__icon-wrap {\n background-color: $sky-color-primary;\n border-color: $sky-color-primary;\n }\n }\n\n &--checked.sky-checkbox--success {\n .sky-checkbox__icon-wrap {\n background-color: $sky-color-success;\n border-color: $sky-color-success;\n }\n }\n\n &--checked.sky-checkbox--warning {\n .sky-checkbox__icon-wrap {\n background-color: $sky-color-warning;\n border-color: $sky-color-warning;\n }\n }\n\n &--checked.sky-checkbox--danger {\n .sky-checkbox__icon-wrap {\n background-color: $sky-color-danger;\n border-color: $sky-color-danger;\n }\n }\n\n &--checked.sky-checkbox--info {\n .sky-checkbox__icon-wrap {\n background-color: $sky-color-info;\n border-color: $sky-color-info;\n }\n }\n}\n","// ==========================================\r\n// Skyline-UI 极具质感的现代设计系统 (SCSS)\r\n// ==========================================\r\n\r\n// --- 品牌色体系 (HSL Tailored Colors) ---\r\n$sky-brand-h: 250; // 主品牌色相 (优雅深紫/蓝色调)\r\n$sky-brand-s: 85%;\r\n$sky-brand-l: 55%;\r\n\r\n$sky-color-primary: hsl($sky-brand-h, $sky-brand-s, $sky-brand-l);\r\n$sky-color-primary-hover: hsl($sky-brand-h, $sky-brand-s, $sky-brand-l - 8%);\r\n$sky-color-primary-active: hsl($sky-brand-h, $sky-brand-s, $sky-brand-l - 15%);\r\n$sky-color-primary-light: hsl($sky-brand-h, $sky-brand-s, 95%);\r\n\r\n// 辅助色体系 (意图表达)\r\n$sky-color-success: hsl(150, 80%, 40%);\r\n$sky-color-success-active: hsl(150, 80%, 32%);\r\n$sky-color-success-light: hsl(150, 80%, 96%);\r\n\r\n$sky-color-warning: hsl(35, 90%, 50%);\r\n$sky-color-warning-active: hsl(35, 90%, 42%);\r\n$sky-color-warning-light: hsl(35, 90%, 96%);\r\n\r\n$sky-color-danger: hsl(355, 85%, 55%);\r\n$sky-color-danger-active: hsl(355, 85%, 45%);\r\n$sky-color-danger-light: hsl(355, 85%, 96%);\r\n\r\n$sky-color-info: hsl(200, 85%, 50%);\r\n$sky-color-info-active: hsl(200, 85%, 42%);\r\n$sky-color-info-light: hsl(200, 85%, 96%);\r\n\r\n// --- Tag 标签组件专用色系 (莫兰迪低饱和) ---\r\n$sky-tag-blue: #edf2ff;\r\n$sky-tag-blue-text: #3b5bdb;\r\n$sky-tag-green: #ebfbee;\r\n$sky-tag-green-text: #2b8a3e;\r\n$sky-tag-yellow: #fff9db;\r\n$sky-tag-yellow-text: #f08c00;\r\n$sky-tag-red: #ffeef0;\r\n$sky-tag-red-text: #fa5252;\r\n$sky-tag-info: #e7f5ff;\r\n$sky-tag-info-text: #1c7ed6;\r\n\r\n// --- 纯净的中性色调 (Sleek Grays) ---\r\n$sky-color-white: #ffffff;\r\n$sky-color-gray-1: #f8f9fa; // 极浅背景\r\n$sky-color-gray-2: #f1f3f5; // 浅灰背景\r\n$sky-color-gray-3: #e9ecef; // 边框线/失效态\r\n$sky-color-gray-4: #dee2e6;\r\n$sky-color-gray-5: #adb5bd; // 提示文本\r\n$sky-color-gray-6: #868e96;\r\n$sky-color-gray-7: #495057; // 次级文本\r\n$sky-color-gray-8: #343a40;\r\n$sky-color-gray-9: #212529; // 主级文本\r\n\r\n// --- 阴影系统 (Premium Shadows) ---\r\n$sky-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);\r\n$sky-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);\r\n$sky-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);\r\n$sky-shadow-primary: 0 4px 14px rgba(100, 80, 240, 0.2);\r\n\r\n// --- 圆角规范 (Borders) ---\r\n$sky-border-radius-xs: 4rpx;\r\n$sky-border-radius-sm: 8rpx;\r\n$sky-border-radius-md: 12rpx;\r\n$sky-border-radius-lg: 20rpx;\r\n$sky-border-radius-round: 9999rpx;\r\n\r\n// --- 字体与字号规范 (Typography) ---\r\n$sky-font-family: -apple-system, BlinkMacSystemFont, \"Helvetica Neue\", Helvetica, \"Segoe UI\", Arial, Roboto, sans-serif;\r\n$sky-font-size-xs: 20rpx;\r\n$sky-font-size-sm: 24rpx;\r\n$sky-font-size-md: 28rpx;\r\n$sky-font-size-lg: 32rpx;\r\n$sky-font-size-xl: 36rpx;\r\n\r\n// --- 动效与过渡 (Transitions) ---\r\n$sky-transition-duration: 200ms;\r\n$sky-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);\r\n\r\n// --- 间距规范 (Spacing) ---\r\n$sky-spacing-xs: 8rpx;\r\n$sky-spacing-sm: 16rpx;\r\n$sky-spacing-md: 24rpx;\r\n$sky-spacing-lg: 32rpx;\r\n$sky-spacing-xl: 48rpx;\r\n\r\n// --- 组件高度规范 (Component Heights) ---\r\n$sky-height-sm: 56rpx;\r\n$sky-height-md: 72rpx;\r\n$sky-height-lg: 88rpx;\r\n$sky-height-xl: 96rpx;\r\n\r\n// --- 层级规范 (Z-Index) ---\r\n$sky-z-dropdown: 100;\r\n$sky-z-fixed: 500;\r\n$sky-z-popup: 1000;\r\n$sky-z-toast: 2000;\r\n","// ==========================================\r\n// Skyline-UI Flex 布局与样式混合宏 (SCSS)\r\n// ==========================================\r\n\r\n@mixin flex-row {\r\n display: flex;\r\n flex-direction: row;\r\n}\r\n\r\n@mixin flex-column {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n@mixin flex-center {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n\r\n@mixin flex-align-center {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n}\r\n\r\n@mixin absolute-full {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n// 文本溢出隐藏 (在微信小程序 Flex 布局下,通常需要在容器上设置 overflow 和 flex)\r\n@mixin text-ellipsis {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n\r\n// 多行文本溢出隐藏\r\n@mixin text-ellipsis-multiline($lines: 2) {\r\n display: -webkit-box;\r\n -webkit-box-orient: vertical;\r\n -webkit-line-clamp: $lines;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n\r\n// 安全区域底部适配\r\n@mixin safe-area-bottom {\r\n padding-bottom: constant(safe-area-inset-bottom);\r\n padding-bottom: env(safe-area-inset-bottom);\r\n}\r\n\r\n// 1px 高清屏边框 (使用 transform 缩放方案)\r\n@mixin hairline-border($color: $sky-color-gray-3, $radius: 0) {\r\n position: relative;\r\n &::after {\r\n content: '';\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 200%;\r\n height: 200%;\r\n border: 1px solid $color;\r\n border-radius: $radius * 2;\r\n transform: scale(0.5);\r\n transform-origin: 0 0;\r\n box-sizing: border-box;\r\n pointer-events: none;\r\n }\r\n}\r\n\r\n// 禁用态通用样式\r\n@mixin disabled-state {\r\n opacity: 0.5;\r\n pointer-events: none;\r\n cursor: not-allowed;\r\n}\r\n\r\n// 按钮重置\r\n@mixin button-reset {\r\n border: none;\r\n outline: none;\r\n padding: 0;\r\n margin: 0;\r\n background: none;\r\n -webkit-tap-highlight-color: transparent;\r\n}\r\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* skyline-ui 公共工具函数
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* rpx 转 px
|
|
6
|
+
* @param rpx - rpx 值
|
|
7
|
+
* @param windowWidth - 屏幕宽度(px),默认从 wx.getSystemInfoSync 获取
|
|
8
|
+
*/
|
|
9
|
+
export declare function rpxToPx(rpx: number, windowWidth?: number): number;
|
|
10
|
+
/**
|
|
11
|
+
* 解析带单位的值为 px 数值
|
|
12
|
+
* @param value - 支持 rpx/px/纯数字
|
|
13
|
+
*/
|
|
14
|
+
export declare function parsePx(value: string | number): number;
|
|
15
|
+
/**
|
|
16
|
+
* 判断颜色值是否为渐变色
|
|
17
|
+
*/
|
|
18
|
+
export declare function isGradientColor(color: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* 空操作函数,用于阻止滚动穿透
|
|
21
|
+
*/
|
|
22
|
+
export declare function noop(): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* skyline-ui 公共工具函数
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.rpxToPx = rpxToPx;
|
|
7
|
+
exports.parsePx = parsePx;
|
|
8
|
+
exports.isGradientColor = isGradientColor;
|
|
9
|
+
exports.noop = noop;
|
|
10
|
+
/**
|
|
11
|
+
* rpx 转 px
|
|
12
|
+
* @param rpx - rpx 值
|
|
13
|
+
* @param windowWidth - 屏幕宽度(px),默认从 wx.getSystemInfoSync 获取
|
|
14
|
+
*/
|
|
15
|
+
function rpxToPx(rpx, windowWidth) {
|
|
16
|
+
const width = windowWidth || wx.getSystemInfoSync().windowWidth;
|
|
17
|
+
return Math.round((rpx * width) / 750);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 解析带单位的值为 px 数值
|
|
21
|
+
* @param value - 支持 rpx/px/纯数字
|
|
22
|
+
*/
|
|
23
|
+
function parsePx(value) {
|
|
24
|
+
if (typeof value === 'number')
|
|
25
|
+
return value;
|
|
26
|
+
const valStr = String(value);
|
|
27
|
+
if (valStr.indexOf('rpx') !== -1) {
|
|
28
|
+
const num = parseFloat(valStr);
|
|
29
|
+
return rpxToPx(num);
|
|
30
|
+
}
|
|
31
|
+
return parseFloat(valStr) || 0;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 判断颜色值是否为渐变色
|
|
35
|
+
*/
|
|
36
|
+
function isGradientColor(color) {
|
|
37
|
+
return color.indexOf('gradient') !== -1;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 空操作函数,用于阻止滚动穿透
|
|
41
|
+
*/
|
|
42
|
+
function noop() {
|
|
43
|
+
// intentionally empty
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAOH,0BAGC;AAMD,0BAQC;AAKD,0CAEC;AAKD,oBAEC;AApCD;;;;GAIG;AACH,SAAgB,OAAO,CAAC,GAAW,EAAE,WAAoB;IACvD,MAAM,KAAK,GAAG,WAAW,IAAI,EAAE,CAAC,iBAAiB,EAAE,CAAC,WAAW,CAAC;IAChE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;AACzC,CAAC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,KAAsB;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QACjC,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/B,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,SAAgB,eAAe,CAAC,KAAa;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,SAAgB,IAAI;IAClB,sBAAsB;AACxB,CAAC","file":"index.js","sourcesContent":["/**\n * skyline-ui 公共工具函数\n */\n\n/**\n * rpx 转 px\n * @param rpx - rpx 值\n * @param windowWidth - 屏幕宽度(px),默认从 wx.getSystemInfoSync 获取\n */\nexport function rpxToPx(rpx: number, windowWidth?: number): number {\n const width = windowWidth || wx.getSystemInfoSync().windowWidth;\n return Math.round((rpx * width) / 750);\n}\n\n/**\n * 解析带单位的值为 px 数值\n * @param value - 支持 rpx/px/纯数字\n */\nexport function parsePx(value: string | number): number {\n if (typeof value === 'number') return value;\n const valStr = String(value);\n if (valStr.indexOf('rpx') !== -1) {\n const num = parseFloat(valStr);\n return rpxToPx(num);\n }\n return parseFloat(valStr) || 0;\n}\n\n/**\n * 判断颜色值是否为渐变色\n */\nexport function isGradientColor(color: string): boolean {\n return color.indexOf('gradient') !== -1;\n}\n\n/**\n * 空操作函数,用于阻止滚动穿透\n */\nexport function noop(): void {\n // intentionally empty\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|