jobdone-shared-files 1.1.19 → 1.1.20-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jobdone-shared-files",
3
- "version": "1.1.19",
3
+ "version": "1.1.20-beta.2",
4
4
  "description": "Shared JS and SCSS for Jobdone Enterprise.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,83 @@
1
+ # Dart Sass 升級指南
2
+
3
+ 本專案已將所有 SCSS 檔案從舊版 LibSass 語法升級至 Dart Sass 語法。
4
+
5
+ ## 主要變更
6
+
7
+ ### 1. @import 替換為 @use
8
+ - ❌ 舊版: `@import "file"`
9
+ - ✅ 新版: `@use "file" as *` 或 `@use "file"`
10
+
11
+ ### 2. 顏色函數更新
12
+ - ❌ 舊版: `lighten($color, 20%)`
13
+ - ✅ 新版: `color.adjust($color, $lightness: 20%)`
14
+
15
+ - ❌ 舊版: `darken($color, 20%)`
16
+ - ✅ 新版: `color.adjust($color, $lightness: -20%)`
17
+
18
+ - ❌ 舊版: `mix($color1, $color2)`
19
+ - ✅ 新版: `color.mix($color1, $color2)`
20
+
21
+ ### 3. 數學函數 (如需要)
22
+ - ❌ 舊版: `$width / 2`
23
+ - ✅ 新版: `math.div($width, 2)` 或直接使用 `calc($width / 2)`
24
+
25
+ ## 檔案結構
26
+
27
+ ```
28
+ styleNew/
29
+ ├── css/
30
+ │ └── vue-loading-overlay/
31
+ │ └── index.css (未變更)
32
+ └── scss/
33
+ ├── Common/
34
+ │ ├── Animation.scss
35
+ │ ├── filepond.scss
36
+ │ ├── SelectableTable.scss
37
+ │ ├── thumbnail-group.scss
38
+ │ └── Tree.scss
39
+ ├── Components/
40
+ │ └── ModalFileRepository.scss
41
+ ├── Layout/
42
+ │ ├── LayoutBase.scss
43
+ │ ├── LayoutInnerColumn.scss
44
+ │ ├── LayoutProject.scss
45
+ │ ├── LayoutSinglePage.scss
46
+ │ └── LayoutTwoColumn.scss
47
+ └── Settings/
48
+ ├── _bs-variables.scss
49
+ ├── _bs-variables-dark.scss
50
+ ├── _color-mode.scss
51
+ ├── _custom-variables.scss
52
+ ├── _Mixins.scss
53
+ └── _MobileVariables.scss
54
+ ```
55
+
56
+ ## 重要提醒
57
+
58
+ 1. **原始檔案未被修改** - 所有舊版檔案仍保留在 `style/` 資料夾中
59
+ 2. **Bootstrap 相容性** - 使用 `@use` 時需確保 Bootstrap 版本支援 Dart Sass
60
+ 3. **命名空間** - 使用 `@use "file" as *` 可以不使用命名空間,直接存取變數和 mixin
61
+
62
+ ## 編譯方式
63
+
64
+ 使用 Dart Sass 編譯:
65
+ ```bash
66
+ sass styleNew/scss/Layout/LayoutBase.scss output.css
67
+ ```
68
+
69
+ ## 注意事項
70
+
71
+ - Dart Sass 不再支援 `/` 作為除法運算子,請使用 `math.div()` 或 `calc()`
72
+ - `@import` 將在未來版本中完全移除,建議全面改用 `@use` 和 `@forward`
73
+ - 顏色函數如 `lighten()`, `darken()` 已棄用,請使用 `color.adjust()` 或 `color.scale()`
74
+
75
+ ## 參考資源
76
+
77
+ - [Dart Sass 官方文件](https://sass-lang.com/documentation)
78
+ - [從 LibSass 遷移到 Dart Sass](https://sass-lang.com/documentation/breaking-changes)
79
+ - [Bootstrap 5 與 Dart Sass](https://getbootstrap.com/docs/5.3/customize/sass/)
80
+
81
+ ---
82
+
83
+ 升級日期: 2025年12月24日
@@ -0,0 +1,39 @@
1
+ .vl-shown {
2
+ overflow: hidden;
3
+ }
4
+
5
+ .vl-overlay {
6
+ bottom: 0;
7
+ left: 0;
8
+ position: absolute;
9
+ right: 0;
10
+ top: 0;
11
+ align-items: center;
12
+ display: none;
13
+ justify-content: center;
14
+ overflow: hidden;
15
+ z-index: 9999;
16
+ }
17
+
18
+ .vl-overlay.vl-active {
19
+ display: flex;
20
+ }
21
+
22
+ .vl-overlay.vl-full-page {
23
+ z-index: 9999;
24
+ position: fixed;
25
+ }
26
+
27
+ .vl-overlay .vl-background {
28
+ bottom: 0;
29
+ left: 0;
30
+ position: absolute;
31
+ right: 0;
32
+ top: 0;
33
+ background: #fff;
34
+ opacity: 0.5;
35
+ }
36
+
37
+ .vl-overlay .vl-icon, .vl-parent {
38
+ position: relative;
39
+ }
@@ -0,0 +1,10 @@
1
+ @use "../../../../bootstrap/scss/functions" as *;
2
+ @use "../Settings/bs-variables" as *;
3
+ @use "../../../../bootstrap/scss/mixins" as *;
4
+ @use "../Settings/custom-variables" as *;
5
+ @use "../Settings/_Mixins" as *;
6
+
7
+ @keyframes fadeIn {
8
+ from { opacity: 0; }
9
+ to { opacity: 1; }
10
+ }
@@ -0,0 +1,38 @@
1
+ @use "../../../../bootstrap/scss/functions" as *;
2
+ @use "../Settings/bs-variables" as *;
3
+ @use "../../../../bootstrap/scss/mixins" as *;
4
+ @use "../Settings/custom-variables" as *;
5
+ @use "../Settings/_Mixins" as *;
6
+
7
+ th.bg-secondary{
8
+ position: relative;
9
+ &:after{
10
+ content: "";
11
+ position: absolute;
12
+ left: 0;
13
+ bottom: -$border-width;
14
+ height: $border-width;
15
+ width: 100%;
16
+ background-color: $secondary;
17
+ }
18
+ }
19
+
20
+ .table{
21
+ background-color: $white;
22
+ }
23
+
24
+ tr:has(.tr-check:checked) > td:not([scope="col"]){
25
+ --active-bg: #f0f1fe;
26
+
27
+ --bs-table-accent-bg: transparent;
28
+ --bs-table-bg: transparent;
29
+ --bs-table-bg-type: var(--active-bg);
30
+ color: var(--bs-table-hover-color);
31
+ }
32
+
33
+ .td-check, .td-avatar-sm{
34
+ width: 2rem;
35
+ }
36
+ .td-avatar-md{
37
+ width: 3rem;
38
+ }
@@ -0,0 +1,283 @@
1
+ @use "sass:color";
2
+ @use "../../../../bootstrap/scss/functions" as *;
3
+ @use "../Settings/bs-variables" as *;
4
+ @use "../../../../bootstrap/scss/mixins" as *;
5
+ @use "../Settings/custom-variables" as *;
6
+ @use "../Settings/_Mixins" as *;
7
+
8
+ li {
9
+ list-style-type: none;
10
+ }
11
+
12
+ // 基本 sizes
13
+ .tree-item {
14
+ .btn {
15
+ --bs-btn-padding-x: 0.75em;
16
+ --bs-btn-padding-y: 0.375em;
17
+ --bs-btn-font-size: 1em;
18
+ }
19
+
20
+ .card {
21
+ --bs-card-spacer-y: 1em;
22
+ --bs-card-spacer-x: 1em;
23
+ --bs-card-title-spacer-y: 0.5em;
24
+ --bs-card-cap-padding-y: 0.5em;
25
+ --bs-card-cap-padding-x: 1em;
26
+ --bs-card-img-overlay-padding: 1em;
27
+ --bs-card-group-margin: 0.75em;
28
+ }
29
+
30
+ .material-icons {
31
+ font-size: 1.5em;
32
+
33
+ &.icon-14 {
34
+ font-size: 0.875em;
35
+ }
36
+
37
+ &.icon-18 {
38
+ font-size: 1.125em;
39
+ }
40
+
41
+ &.icon-28 {
42
+ font-size: 1.75em;
43
+ }
44
+
45
+ &.icon-32 {
46
+ font-size: 2em;
47
+ }
48
+ }
49
+ }
50
+
51
+ // hover效果與優化
52
+ // firefox 暫不支援 has
53
+ .tree-item:has([data-bs-toggle="collapse"]:hover)+.collapse {
54
+ will-change: height;
55
+ }
56
+
57
+ .tree-item:hover>.card,
58
+ .tree-item .card:focus-within {
59
+ background-color: color.adjust($primary, $lightness: 32%);
60
+ border-color: rgba($primary, .4);
61
+ }
62
+
63
+ .tree-item {
64
+ .btn-title .material-icons:is(:empty):before {
65
+ content: "\e836";
66
+ display: inline-block;
67
+ font-family: inherit;
68
+ }
69
+
70
+ // active效果
71
+ &.active {
72
+ >.card {
73
+ background-color: color.adjust($primary, $lightness: 30%);
74
+ border-color: rgba($primary, .5);
75
+ }
76
+
77
+ >.card .btn-title .material-icons:is(:empty):before {
78
+ content: "\e837";
79
+ }
80
+
81
+ .btn-title {
82
+ color: $primary;
83
+ }
84
+ }
85
+ }
86
+
87
+ .btn-title {
88
+ cursor: pointer;
89
+
90
+ .btn {
91
+ border-radius: 0;
92
+
93
+ &:focus,
94
+ &:active {
95
+ border-color: transparent;
96
+ }
97
+ }
98
+
99
+ .btn-text {
100
+ width: 100%;
101
+ text-align: left;
102
+ overflow-wrap: anywhere;
103
+ }
104
+ }
105
+
106
+
107
+ // 刪除子層標示 UI
108
+ .tree-item:has(.btn.text-danger:hover) {
109
+ .card {
110
+ background-color: color.adjust($danger, $lightness: 43%);
111
+ border-color: rgba($danger, .5);
112
+
113
+ .btn {
114
+ color: $danger;
115
+ }
116
+ }
117
+ }
118
+
119
+ // 刪除子層標示 UI (含子層)
120
+ // .tree-child:has(.btn.text-danger:hover){
121
+ // .card, + .content-children .card{
122
+ // background-color: color.adjust($danger, $lightness: 43%);
123
+ // border-color: rgba( $danger, .5 );
124
+ // .btn{
125
+ // color: $danger;
126
+ // }
127
+ // }
128
+ // }
129
+
130
+ .btn-no-children {
131
+ cursor: auto;
132
+
133
+ &:focus {
134
+ border-color: transparent;
135
+ }
136
+ }
137
+
138
+ // 基本 style
139
+ $card-margin: .2em;
140
+ $line-padding: .7em;
141
+
142
+ .tree-item {
143
+ display: flex;
144
+ flex-direction: column;
145
+ width: 100%;
146
+ margin-top: $card-margin;
147
+
148
+ .card {
149
+ position: relative;
150
+ flex-grow: 1;
151
+ transition: $transition-base;
152
+ }
153
+ }
154
+
155
+ .col-action {
156
+ @include flex-center;
157
+ width: 2.8rem;
158
+ }
159
+
160
+
161
+ // 開合 style
162
+ .btn[data-bs-toggle="collapse"] {
163
+ .material-icons {
164
+ transition: $transition-base;
165
+ }
166
+
167
+ &[aria-expanded="false"] .material-icons {
168
+ transform: rotate(-90deg);
169
+ }
170
+
171
+ &:disabled,
172
+ &.disabled {
173
+ border-color: transparent;
174
+ }
175
+ }
176
+
177
+ // 畫線 style
178
+ .content-children {
179
+ padding-left: 1.5rem;
180
+ --tree-border-color: #fff;
181
+ position: relative;
182
+
183
+ &:before {
184
+ content: "";
185
+ position: absolute;
186
+ display: block;
187
+ left: -$line-padding;
188
+ bottom: 24px;
189
+ width: 1px;
190
+ height: 100%;
191
+ z-index: 1;
192
+ background-color: var(--tree-border-color);
193
+ }
194
+
195
+ // // line color
196
+ &:before,
197
+ .tree-item .card:before,
198
+ .tree-item .card:after {
199
+ background-color: var(--tree-border-color);
200
+ }
201
+ }
202
+
203
+ .tree-item {
204
+ &:last-child>.content-children:before {
205
+ display: none;
206
+ }
207
+
208
+ .card {
209
+ position: relative;
210
+
211
+ &:before,
212
+ &:after {
213
+ content: "";
214
+ position: absolute;
215
+ left: calc(-#{$line-padding} - #{$border-width});
216
+ z-index: 1;
217
+ }
218
+
219
+ &:before {
220
+ bottom: 50%;
221
+ width: 1px;
222
+ height: calc(100% + #{$card-margin}*2 + #{$border-width}*2);
223
+ }
224
+
225
+ &:after {
226
+ top: 0;
227
+ bottom: 0;
228
+ width: $line-padding;
229
+ height: 1px;
230
+ margin: auto;
231
+ }
232
+ }
233
+
234
+ &:nth-child(1)>.card:before {
235
+ height: calc(50% + #{$card-margin} + #{$border-width});
236
+ }
237
+ }
238
+
239
+
240
+ // 小版本
241
+ .tree-item-sm {
242
+ >.card {
243
+ font-size: 86%;
244
+ }
245
+
246
+ .content-children {
247
+ padding-left: 1rem;
248
+ }
249
+
250
+ .content-children:before {
251
+ left: -10px;
252
+ bottom: 19px;
253
+ }
254
+ }
255
+
256
+ // .tree-item-sm + .content-children{
257
+ // > .children-box{
258
+ // padding-left: 1rem;
259
+ // }
260
+ // }
261
+
262
+
263
+ // 白背景版本
264
+ .tree-item-in-white {
265
+ .content-children {
266
+ --tree-border-color: var(--bs-border-color);
267
+ }
268
+
269
+ .card {
270
+ --bs-card-bg: var(--gray-100);
271
+ --bs-card-border-color: var(--bs-border-color);
272
+ }
273
+
274
+ &:hover>.card,
275
+ .card:focus-within {
276
+ background-color: $white;
277
+ }
278
+
279
+ // active效果
280
+ &.active .card {
281
+ background-color: $white;
282
+ }
283
+ }
@@ -0,0 +1,32 @@
1
+ @use "../../../../bootstrap/scss/functions" as *;
2
+ @use "../Settings/bs-variables" as *;
3
+ @use "../../../../bootstrap/scss/mixins" as *;
4
+ @use "../Settings/custom-variables" as *;
5
+ @use "../Settings/_Mixins" as *;
6
+
7
+ .can-click{
8
+ cursor: pointer;
9
+ }
10
+
11
+ .filepond--root.filepond--hopper {
12
+ border: 1px dashed var(--bs-gray-400);
13
+ border-radius: 0.5em;
14
+ overflow: hidden;
15
+ }
16
+
17
+ .filepond--drop-label {
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: stretch;
21
+ }
22
+
23
+ .filepond-label-box-cus {
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ width: 100%;
28
+ }
29
+
30
+ .filepond--panel-root {
31
+ background-color: $blue-100 !important;
32
+ }
@@ -0,0 +1,14 @@
1
+
2
+ .thumbnail-group{
3
+ $offset: .5rem;
4
+ position: relative;
5
+ display: inline-flex;
6
+ margin-right: $offset;
7
+ margin-bottom: $offset;
8
+ .thumbnail-pin{
9
+ position: absolute;
10
+ right: -$offset;
11
+ bottom: -$offset;
12
+ box-shadow: $box-shadow;
13
+ }
14
+ }