@wuxiaolins/scss 0.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.
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # @bsy-ui/scss 公共样式库
2
+
3
+ ## 介绍
4
+
5
+ 公共样式库,包含了一些常用的样式,主题变量,可以直接引用。
6
+
7
+ ## 安装
8
+
9
+ ```
10
+ pnpm i @bsy-ui/scss --save
11
+ ```
12
+
13
+ ## 引用组件
14
+ ```
15
+ import '@bsy-ui/scss/index.scss';
16
+ ```
package/bsy.scss ADDED
@@ -0,0 +1,92 @@
1
+
2
+ /* 自定义 ant design modal 样式 */
3
+ .bsy-ui-modal-hook {
4
+ .ant-modal {
5
+ .ant-modal-content {
6
+ border-radius: 2px;
7
+ padding: 16px;
8
+ }
9
+ }
10
+ .ant-modal-confirm-content {
11
+ margin-inline-start: 32px !important;
12
+ }
13
+ .ant-modal-close-x {
14
+ line-height: 18px;
15
+ }
16
+ .icon-ant {
17
+ margin: auto !important;
18
+ &.ant-modal-close-icon {
19
+ width: 18px !important;
20
+ height: 18px !important;
21
+ }
22
+ }
23
+ }
24
+
25
+ /* 自定义时间选择器弹出里面的样式 */
26
+ .bsy-ui-date-picker__popup {
27
+ .ant-picker-cell-in-view {
28
+ &.ant-picker-cell-in-range::before,
29
+ &.ant-picker-cell-range-end::before {
30
+ background-color: #ecefff !important;
31
+ }
32
+ }
33
+
34
+ .ant-picker-time-panel-cell-selected .ant-picker-time-panel-cell-inner {
35
+ background-color: #ecefff !important;
36
+ }
37
+ .ant-picker-time-panel-column {
38
+ // 滚动条样式
39
+ &::-webkit-scrollbar {
40
+ width: 4px;
41
+ }
42
+ &::-webkit-scrollbar-track {
43
+ background-color: transparent;
44
+ }
45
+ &::-webkit-scrollbar-thumb {
46
+ background-color: #D8D8D8;
47
+ border-radius: 116px;
48
+ }
49
+ }
50
+ }
51
+
52
+ /* 全局遮罩层 */
53
+ .bsy-frame {
54
+ position: fixed;
55
+ top: 0;
56
+ left: 0;
57
+ right: 0;
58
+ bottom: 0;
59
+ z-index: 1000;
60
+ background-color: rgba(0, 0, 0, 0);
61
+
62
+ &.show {
63
+ background-color: rgba(0, 0, 0, 0.5);
64
+ }
65
+ }
66
+
67
+ // 自定义居中toast
68
+ .bsy-ui-message-custom-toast {
69
+ .ant-message-notice-content {
70
+ color: #fff;
71
+ // background: rgba(0, 0, 0, 0.5468);
72
+ }
73
+ }
74
+
75
+ // 隐藏滚动条
76
+ .bsy-body-no-scroll {
77
+ overflow: hidden !important;
78
+ }
79
+
80
+ // 全屏遮罩层
81
+ .bsy-fullscreen-mask {
82
+ position: fixed;
83
+ top: 0;
84
+ left: 0;
85
+ right: 0;
86
+ bottom: 0;
87
+ z-index: 9999;
88
+ background: rgba(0, 0, 0, 1);
89
+ display: flex;
90
+ align-items: center;
91
+ justify-content: center;
92
+ }
package/flex-box.scss ADDED
@@ -0,0 +1,133 @@
1
+ /**
2
+ * flex-box.css
3
+ **/
4
+
5
+ .flex-wrap {
6
+ display: -webkit-box;
7
+ display: -moz-box;
8
+ display: -ms-flexbox;
9
+ display: -webkit-flex;
10
+ display: flex;
11
+ -webkit-flex-wrap: wrap;
12
+ flex-wrap: wrap;
13
+ min-width: 0;
14
+ }
15
+ .flex-h {
16
+ display: -webkit-box;
17
+ display: -moz-box;
18
+ display: -ms-flexbox;
19
+ display: -webkit-flex;
20
+ display: flex;
21
+ min-width: 0;
22
+ -webkit-align-items: center;
23
+ align-items: center;
24
+ -webkit-box-align: center;
25
+ min-width: 0;
26
+ }
27
+ .flex-box {
28
+ display: -webkit-box;
29
+ display: -moz-box;
30
+ display: -ms-flexbox;
31
+ display: -webkit-flex;
32
+ display: flex;
33
+ min-width: 0;
34
+ }
35
+ .flex-box-v {
36
+ display: -webkit-box;
37
+ display: -moz-box;
38
+ display: -ms-flexbox;
39
+ display: -webkit-flex;
40
+ display: flex;
41
+ -webkit-box-orient: vertical;
42
+ box-orient: vertical;
43
+ -webkit-flex-flow: column;
44
+ flex-flow: column;
45
+ min-width: 0;
46
+ }
47
+ .flex-1 {
48
+ -webkit-box-flex: 1;
49
+ -moz-box-flex: 1;
50
+ box-flex: 1;
51
+ -webkit-flex: 1;
52
+ -ms-flex: 1;
53
+ flex: 1;
54
+ min-width: 0;
55
+ }
56
+ .flex-2 {
57
+ -webkit-box-flex: 2;
58
+ -moz-box-flex: 2;
59
+ -webkit-flex: 2;
60
+ -ms-flex: 2;
61
+ box-flex: 2;
62
+ flex: 2;
63
+ min-width: 0;
64
+ }
65
+ .flex-3 {
66
+ -webkit-box-flex: 3;
67
+ -moz-box-flex: 3;
68
+ -webkit-flex: 3;
69
+ -ms-flex: 3;
70
+ box-flex: 3;
71
+ flex: 3;
72
+ min-width: 0;
73
+ }
74
+ .flex-4 {
75
+ -webkit-box-flex: 4;
76
+ -moz-box-flex: 4;
77
+ -webkit-flex: 4;
78
+ -ms-flex: 4;
79
+ box-flex: 4;
80
+ flex: 4;
81
+ min-width: 0;
82
+ }
83
+ .flex-center-center {
84
+ -webkit-justify-content: center;
85
+ justify-content: center;
86
+ -webkit-align-items: center;
87
+ align-items: center;
88
+ -webkit-box-pack: center;
89
+ -webkit-box-align: center;
90
+ min-width: 0;
91
+ }
92
+ .flex-v-ce,
93
+ .flex-h-ce {
94
+ -webkit-align-items: center;
95
+ align-items: center;
96
+ -webkit-box-align: center;
97
+ min-width: 0;
98
+ }
99
+ .flex-v-zhu,
100
+ .flex-h-zhu {
101
+ -webkit-justify-content: center;
102
+ justify-content: center;
103
+ -webkit-box-pack: center;
104
+ min-width: 0;
105
+ }
106
+ .flex-v-end,
107
+ .flex-h-end {
108
+ -webkit-align-items: flex-end;
109
+ align-items: flex-end;
110
+ -webkit-box-align: flex-end;
111
+ min-width: 0;
112
+ }
113
+ .flex-direction-row-reverse {
114
+ -webkit-flex-direction: row-reverse;
115
+ flex-direction: row-reverse;
116
+ min-width: 0;
117
+ }
118
+ .flex-h-space-between {
119
+ -webkit-justify-content: space-between;
120
+ justify-content: space-between;
121
+ flex-wrap: wrap;
122
+ min-width: 0;
123
+ }
124
+ .flex-wrap {
125
+ flex-wrap: wrap;
126
+ min-width: 0;
127
+ -webkit-justify-content: flex-start;
128
+ justify-content: flex-start;
129
+ }
130
+ .flex-end {
131
+ -webkit-justify-content: flex-end;
132
+ justify-content: flex-end;
133
+ }
package/index.scss ADDED
@@ -0,0 +1,103 @@
1
+ /**
2
+ * 自定义全局变量,包括主题色
3
+ */
4
+ @use "./flex-box.scss" as *;
5
+ @use "./reset.scss" as *;
6
+ @use "./scrollbar.scss" as *;
7
+ @use "./bsy.scss" as *;
8
+
9
+ :root {
10
+ // 主题色
11
+ --theme-primary-color: #4663F7;
12
+ --theme-danger-color: #ff4d4f;
13
+ --theme-success-color: #05CD8A;
14
+ --theme-primary-text-color: #fff;
15
+
16
+ --ant-color-primary: #4663F7;
17
+ --ant-color-primary-hover: #6179f2;
18
+
19
+ //主题浅色
20
+ --theme-primary-light-color: #e6eefd;
21
+
22
+ // 间隔线颜色
23
+ --theme-line-color: #d8d8d8;
24
+ --theme-border-color: #d9d9d9;
25
+ // 滚动条样式
26
+ --theme-scrollbar-color: #ccc;
27
+ --theme-scrollbar-size: 10px;
28
+
29
+ // swiper 滚动条样式
30
+ --swiper-scrollbar-size: 6px;
31
+ --swiper-scrollbar-sides-offset: 35%;
32
+ --swiper-scrollbar-drag-bg-color: #c1c1c1;
33
+ --swiper-scrollbar-bg-color: rgba(0, 0, 0, 0.05);
34
+ --swiper-scrollbar-border-radius: 10px;
35
+ --swiper-scrollbar-right: 0;
36
+
37
+ // 字体颜色
38
+ --theme-font-color: #262626;
39
+ --theme-font-color-3: #3d3d3d;
40
+ --theme-font-color-5: #595959;
41
+ --theme-font-color-8: #8c8c8c;
42
+ --theme-font-color-9: #999;
43
+ --text-color-6: #595959;
44
+
45
+ // 上传组件宽高
46
+ --theme-upload-width: 100px;
47
+ --theme-upload-height: 100px;
48
+ --theme-upload-margin: 16px;
49
+ --theme-upload-border-radius: 8px;
50
+ --theme-upload-custom-width: 72px;
51
+ --theme-upload-custom-height: 72px;
52
+ --theme-upload-bg-color: transparent;
53
+ --theme-upload-sort-bg-color: #F4F6FA;
54
+ --theme-upload-error-color: #FF4D4F;
55
+ --theme-upload-pd: 0;
56
+
57
+ // 顶部菜单颜色
58
+ --theme-top-menu-color: #4b67f4;
59
+ --theme-layout-header-bg-color: #fff;
60
+ --theme-layout-text-color: rgba(38,38,38,0.8);
61
+ --theme-layout-primary-color: #4b67f4;
62
+ --theme-website-font-family: Arial, sans-serif;
63
+
64
+ // 默认地图宽高
65
+ --theme-components-map-width: 277px;
66
+ --theme-components-map-height: 188px;
67
+
68
+ // 主题默认间距
69
+ --theme-default-margin: 16px;
70
+ // 主题默认内边距
71
+ --theme-default-padding: 24px;
72
+
73
+ //
74
+ --theme-search-form-border-color: #d9d9d9;
75
+ --border-color-search-form: #d9d9d9;
76
+ --theme-border-color-search-form: #d9d9d9;
77
+ --border-radius-search-form: 4px;
78
+ --theme-border-radius-search-form: 4px;
79
+
80
+ //
81
+ --theme-tooltip-bg-color: rgba(0, 0, 0, 0.85);
82
+ --theme-hight-light-color: red;
83
+
84
+ // swiper 自定义样式变量
85
+ --swiper-pagination-bullet-inactive-opacity: 0.3;
86
+ --swiper-pagination-bullet-inactive-color: #000;
87
+ --swiper-pagination-bullet-active-color: #fff;
88
+ --swiper-navigation-color: #fff;
89
+ --swiper-navigation-bg-color: #1f2d3d1c;
90
+ --swiper-navigation-button-size: 16px;
91
+ --swiper-pagination-bullet-horizontal-gap: 4px;
92
+ --swiper-pagination-bullet-inactive-width: 3px;
93
+ --swiper-pagination-bullet-inactive-height: 12px;
94
+ --swiper-pagination-bullet-border-radius: 0;
95
+
96
+ // 颜色选择器
97
+ --theme-color-picker-border-color: #d7dce4;
98
+ }
99
+
100
+ .dark {
101
+ --theme-primary-color: #000;
102
+ --theme-primary-text-color: #666;
103
+ }
package/mixin.scss ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * useLineH
3
+ * 定义一个用于创建垂直或水平线条的 SCSS mixin。
4
+ * @param {number} $height - 线条的高度,默认为 84px。
5
+ * @param {number} $width - 线条的宽度,默认为 1px。
6
+ * @example
7
+ * @include useLineH(); // 使用默认值创建一条垂直线条
8
+ * @include useLineH(100px, 2px); // 创建一条高度为 100px、宽度为 2px 的线条
9
+ */
10
+ @mixin useLineH($height: 84px, $width: 1px) {
11
+ width: $width;
12
+ min-width: $width;
13
+ height: $height;
14
+ background-color: var(--theme-line-color);
15
+ }
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@wuxiaolins/scss",
3
+ "version": "0.0.1",
4
+ "private": false,
5
+ "main": "index.scss",
6
+ "files": [
7
+ "*.scss"
8
+ ],
9
+ "keywords": [
10
+ "scss",
11
+ "style",
12
+ "bsy"
13
+ ],
14
+ "license": "MIT",
15
+ "scripts": {
16
+ "publish:build": "node -v",
17
+ "build": "node -v",
18
+ "clean": "rm -rf dist",
19
+ "publish:local": "../../scripts/publish.sh",
20
+ "changeset": "changeset",
21
+ "version-packages": "changeset version"
22
+ },
23
+ "devDependencies": {},
24
+ "author": {
25
+ "name": "bsy"
26
+ },
27
+ "homepage": "https://gitlab.bossyun.com/wuxl/package",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://gitlab.bossyun.com/wuxl/package.git"
31
+ }
32
+ }
package/reset.scss ADDED
@@ -0,0 +1,25 @@
1
+
2
+ .relative {
3
+ position: relative;
4
+ }
5
+ .text-overflow {
6
+ white-space: nowrap;
7
+ overflow: hidden;
8
+ text-overflow: ellipsis;
9
+ }
10
+
11
+ /* 样式重置 */
12
+ input,
13
+ textarea {
14
+ border: none;
15
+ outline: none;
16
+ background-color: transparent;
17
+ }
18
+ /* 按钮样式 */
19
+ button {
20
+ border: none;
21
+ outline: none;
22
+ cursor: pointer;
23
+ background-color: transparent;
24
+ min-width: 0;
25
+ }
package/scrollbar.scss ADDED
@@ -0,0 +1,12 @@
1
+
2
+ /* 自定义滚动条样式 */
3
+ ::-webkit-scrollbar {
4
+ width: var(--theme-scrollbar-size);
5
+ }
6
+ ::-webkit-scrollbar-track {
7
+ background-color: transparent;
8
+ }
9
+ ::-webkit-scrollbar-thumb {
10
+ background-color: var(--theme-scrollbar-color);
11
+ border-radius: 10px;
12
+ }