jobdone-shared-files 0.0.1-beta.8 → 0.0.1-beta.80

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 (127) hide show
  1. package/.vs/VSWorkspaceState.json +6 -0
  2. package/.vs/jobdone_sharejs/FileContentIndex/a973f22d-a16a-4ca9-ab6a-75ab92ec6af7.vsidx +0 -0
  3. package/.vs/jobdone_sharejs/FileContentIndex/bacf95a3-2185-41c2-b12a-e93bb40f2204.vsidx +0 -0
  4. package/.vs/jobdone_sharejs/config/applicationhost.config +1021 -0
  5. package/.vs/jobdone_sharejs/v17/.wsuo +0 -0
  6. package/.vs/slnx.sqlite +0 -0
  7. package/ProjectManagement/projectNavbar.vue +225 -79
  8. package/README.md +79 -6
  9. package/common/directives/collapse.js +12 -12
  10. package/common/directives/popovers.js +11 -0
  11. package/common/directives/tooltip.js +11 -0
  12. package/common/format.js +26 -12
  13. package/index.js +14 -14
  14. package/lightboxWithOverview.vue +132 -0
  15. package/package.json +19 -18
  16. package/paginate.vue +138 -138
  17. package/style/css/vue-loading-overlay/index.css +40 -40
  18. package/style/scss/Common/Animation.scss +6 -0
  19. package/style/scss/Common/SelectableTable.scss +31 -0
  20. package/style/scss/Common/filepond.scss +28 -0
  21. package/style/scss/Common/thumbnail-group.scss +14 -0
  22. package/style/scss/Layout/LayoutBase.scss +1015 -942
  23. package/style/scss/Layout/LayoutMobile.scss +203 -0
  24. package/style/scss/Layout/LayoutProject.scss +122 -126
  25. package/style/scss/Layout/LayoutSinglePage.scss +13 -13
  26. package/style/scss/Layout/LayoutTwoColumn.scss +56 -56
  27. package/style/scss/Settings/_Mixins.scss +229 -229
  28. package/style/scss/Settings/_MobileVariables.scss +12 -0
  29. package/style/scss/Settings/_basic-import.scss +5 -4
  30. package/style/scss/Settings/_bs-variables-dark.scss +70 -70
  31. package/style/scss/Settings/_bs-variables.scss +1743 -1703
  32. package/style/scss/Settings/_color-mode.scss +122 -122
  33. package/style/scss/Settings/_custom-variables.scss +14 -10
  34. package/tagEditor.vue +263 -263
  35. package/tree.vue +69 -62
  36. package/treeItem.vue +366 -366
  37. package/vueLoadingOverlay.vue +70 -76
  38. package/style/scss/Bootstrap/_accordion.scss +0 -158
  39. package/style/scss/Bootstrap/_alert.scss +0 -68
  40. package/style/scss/Bootstrap/_badge.scss +0 -38
  41. package/style/scss/Bootstrap/_breadcrumb.scss +0 -40
  42. package/style/scss/Bootstrap/_button-group.scss +0 -142
  43. package/style/scss/Bootstrap/_buttons.scss +0 -207
  44. package/style/scss/Bootstrap/_card.scss +0 -238
  45. package/style/scss/Bootstrap/_carousel.scss +0 -238
  46. package/style/scss/Bootstrap/_close.scss +0 -61
  47. package/style/scss/Bootstrap/_containers.scss +0 -41
  48. package/style/scss/Bootstrap/_dropdown.scss +0 -250
  49. package/style/scss/Bootstrap/_forms.scss +0 -9
  50. package/style/scss/Bootstrap/_functions.scss +0 -302
  51. package/style/scss/Bootstrap/_grid.scss +0 -33
  52. package/style/scss/Bootstrap/_helpers.scss +0 -10
  53. package/style/scss/Bootstrap/_images.scss +0 -42
  54. package/style/scss/Bootstrap/_list-group.scss +0 -204
  55. package/style/scss/Bootstrap/_maps.scss +0 -121
  56. package/style/scss/Bootstrap/_mixins.scss +0 -42
  57. package/style/scss/Bootstrap/_modal.scss +0 -237
  58. package/style/scss/Bootstrap/_nav.scss +0 -172
  59. package/style/scss/Bootstrap/_navbar.scss +0 -286
  60. package/style/scss/Bootstrap/_offcanvas.scss +0 -146
  61. package/style/scss/Bootstrap/_pagination.scss +0 -109
  62. package/style/scss/Bootstrap/_placeholders.scss +0 -51
  63. package/style/scss/Bootstrap/_popover.scss +0 -196
  64. package/style/scss/Bootstrap/_progress.scss +0 -68
  65. package/style/scss/Bootstrap/_reboot.scss +0 -610
  66. package/style/scss/Bootstrap/_root.scss +0 -195
  67. package/style/scss/Bootstrap/_spinners.scss +0 -85
  68. package/style/scss/Bootstrap/_tables.scss +0 -164
  69. package/style/scss/Bootstrap/_toasts.scss +0 -73
  70. package/style/scss/Bootstrap/_tooltip.scss +0 -120
  71. package/style/scss/Bootstrap/_transitions.scss +0 -27
  72. package/style/scss/Bootstrap/_type.scss +0 -106
  73. package/style/scss/Bootstrap/_utilities.scss +0 -748
  74. package/style/scss/Bootstrap/_variables-dark.scss +0 -70
  75. package/style/scss/Bootstrap/_variables.scss +0 -1703
  76. package/style/scss/Bootstrap/bootstrap-grid.scss +0 -66
  77. package/style/scss/Bootstrap/bootstrap-reboot.scss +0 -10
  78. package/style/scss/Bootstrap/bootstrap-utilities.scss +0 -19
  79. package/style/scss/Bootstrap/bootstrap.scss +0 -52
  80. package/style/scss/Bootstrap/forms/_floating-labels.scss +0 -90
  81. package/style/scss/Bootstrap/forms/_form-check.scss +0 -188
  82. package/style/scss/Bootstrap/forms/_form-control.scss +0 -201
  83. package/style/scss/Bootstrap/forms/_form-range.scss +0 -91
  84. package/style/scss/Bootstrap/forms/_form-select.scss +0 -81
  85. package/style/scss/Bootstrap/forms/_form-text.scss +0 -11
  86. package/style/scss/Bootstrap/forms/_input-group.scss +0 -132
  87. package/style/scss/Bootstrap/forms/_labels.scss +0 -36
  88. package/style/scss/Bootstrap/forms/_validation.scss +0 -12
  89. package/style/scss/Bootstrap/helpers/_clearfix.scss +0 -3
  90. package/style/scss/Bootstrap/helpers/_color-bg.scss +0 -10
  91. package/style/scss/Bootstrap/helpers/_colored-links.scss +0 -12
  92. package/style/scss/Bootstrap/helpers/_position.scss +0 -36
  93. package/style/scss/Bootstrap/helpers/_ratio.scss +0 -26
  94. package/style/scss/Bootstrap/helpers/_stacks.scss +0 -15
  95. package/style/scss/Bootstrap/helpers/_stretched-link.scss +0 -15
  96. package/style/scss/Bootstrap/helpers/_text-truncation.scss +0 -7
  97. package/style/scss/Bootstrap/helpers/_visually-hidden.scss +0 -8
  98. package/style/scss/Bootstrap/helpers/_vr.scss +0 -8
  99. package/style/scss/Bootstrap/mixins/_alert.scss +0 -18
  100. package/style/scss/Bootstrap/mixins/_backdrop.scss +0 -14
  101. package/style/scss/Bootstrap/mixins/_banner.scss +0 -7
  102. package/style/scss/Bootstrap/mixins/_border-radius.scss +0 -78
  103. package/style/scss/Bootstrap/mixins/_box-shadow.scss +0 -18
  104. package/style/scss/Bootstrap/mixins/_breakpoints.scss +0 -127
  105. package/style/scss/Bootstrap/mixins/_buttons.scss +0 -70
  106. package/style/scss/Bootstrap/mixins/_caret.scss +0 -69
  107. package/style/scss/Bootstrap/mixins/_clearfix.scss +0 -9
  108. package/style/scss/Bootstrap/mixins/_color-mode.scss +0 -21
  109. package/style/scss/Bootstrap/mixins/_color-scheme.scss +0 -7
  110. package/style/scss/Bootstrap/mixins/_container.scss +0 -11
  111. package/style/scss/Bootstrap/mixins/_deprecate.scss +0 -10
  112. package/style/scss/Bootstrap/mixins/_forms.scss +0 -153
  113. package/style/scss/Bootstrap/mixins/_gradients.scss +0 -47
  114. package/style/scss/Bootstrap/mixins/_grid.scss +0 -151
  115. package/style/scss/Bootstrap/mixins/_image.scss +0 -16
  116. package/style/scss/Bootstrap/mixins/_list-group.scss +0 -27
  117. package/style/scss/Bootstrap/mixins/_lists.scss +0 -7
  118. package/style/scss/Bootstrap/mixins/_pagination.scss +0 -10
  119. package/style/scss/Bootstrap/mixins/_reset-text.scss +0 -17
  120. package/style/scss/Bootstrap/mixins/_resize.scss +0 -6
  121. package/style/scss/Bootstrap/mixins/_table-variants.scss +0 -24
  122. package/style/scss/Bootstrap/mixins/_text-truncate.scss +0 -8
  123. package/style/scss/Bootstrap/mixins/_transition.scss +0 -26
  124. package/style/scss/Bootstrap/mixins/_utilities.scss +0 -97
  125. package/style/scss/Bootstrap/mixins/_visually-hidden.scss +0 -29
  126. package/style/scss/Bootstrap/utilities/_api.scss +0 -47
  127. package/style/scss/Bootstrap/vendor/_rfs.scss +0 -354
package/treeItem.vue CHANGED
@@ -1,367 +1,367 @@
1
- <template>
2
- <li class="tree-item" :class="[itemClass]">
3
- <div class="card flex-row d-flex input-group flex-nowrap">
4
- <button class="btn text-primary border-end px-1" :disabled="!item.children" data-bs-toggle="collapse" :data-bs-target="'#collapse-'+item.id">
5
- <span class="material-icons">arrow_drop_down</span>
6
- </button>
7
- <input type="radio" name="tree-item" :id="item.id">
8
- <label class="btn-title d-flex text-start rounded-0 flex-grow-1"
9
- :for="item.id" @click="clickItem(item)">
10
- <div class="btn btn-text border-start">{{item.title}}</div>
11
- <slot name="icon">
12
- <div class="btn d-flex align-items-center border-start rounded-0 text-primary h-100 ms-auto">
13
- <span class="material-icons icon-18"></span>
14
- </div>
15
- </slot>
16
- </label>
17
- </div>
18
- <template v-if="item.children">
19
- <ul :id="'collapse-'+item.id" class="content-children show" v-collapse>
20
- <TreeItem class="children-box" v-for="(subItem, subIndex) in item.children"
21
- :key="subItem.id"
22
- :item="subItem"
23
- :index="subIndex"
24
- :click-item="clickItem"
25
- :active-id="activeId"
26
- :tree-item-class="treeItemClass">
27
- <template v-slot:icon>
28
- <slot name="icon">
29
- <div class="btn d-flex align-items-center border-start rounded-0 text-primary h-100 ms-auto">
30
- <span class="material-icons icon-18"></span>
31
- </div>
32
- </slot>
33
- </template>
34
- </TreeItem>
35
- </ul>
36
- </template>
37
- </li>
38
- </template>
39
-
40
- <script>
41
- import { ref, computed } from 'vue';
42
- import collapse from './common/directives/collapse';
43
- export default {
44
- name: 'TreeItem',
45
- props: {
46
- item: {
47
- type: Object,
48
- required: true
49
- },
50
- index: {
51
- type: Number,
52
- required: true
53
- },
54
- clickItem: {
55
- type: Function
56
- },
57
- activeId: {
58
- type: String,
59
- required: true
60
- },
61
- treeItemClass: {
62
- type: Array,
63
- default: function () {
64
- return [];
65
- }
66
- }
67
- },
68
- directives: {
69
- collapse
70
- },
71
- setup(props, { emit }) {
72
- const itemClass = computed(() => {
73
- var classList = [...props.treeItemClass];
74
- if (props.activeId === props.item.id) {
75
- classList.push('active');
76
- }
77
- return classList;
78
- });
79
- return {
80
- itemClass: itemClass
81
- };
82
- }
83
- }
84
- </script>
85
-
86
- <style scoped lang="scss">
87
- @import "./style/scss/Settings/basic-import";
88
-
89
- li {
90
- list-style-type: none;
91
- }
92
-
93
- // 基本 sizes
94
- .tree-item {
95
- .btn {
96
- --bs-btn-padding-x: 0.75em;
97
- --bs-btn-padding-y: 0.375em;
98
- --bs-btn-font-size: 1em;
99
- }
100
-
101
- .card {
102
- --bs-card-spacer-y: 1em;
103
- --bs-card-spacer-x: 1em;
104
- --bs-card-title-spacer-y: 0.5em;
105
- --bs-card-cap-padding-y: 0.5em;
106
- --bs-card-cap-padding-x: 1em;
107
- --bs-card-img-overlay-padding: 1em;
108
- --bs-card-group-margin: 0.75em;
109
- }
110
-
111
- .material-icons {
112
- font-size: 1.5em;
113
-
114
- &.icon-14 {
115
- font-size: 0.875em;
116
- }
117
-
118
- &.icon-18 {
119
- font-size: 1.125em;
120
- }
121
-
122
- &.icon-28 {
123
- font-size: 1.75em;
124
- }
125
-
126
- &.icon-32 {
127
- font-size: 2em;
128
- }
129
- }
130
- }
131
-
132
- // hover效果與優化
133
- // firefox 暫不支援 has
134
- .tree-item:has([data-bs-toggle="collapse"]:hover) + .collapse {
135
- will-change: height;
136
- }
137
-
138
- .tree-item:hover > .card,
139
- .tree-item .card:focus-within {
140
- background-color: lighten( $primary, 32% );
141
- border-color: rgba( $primary, .4 );
142
- }
143
-
144
- // active效果
145
- .tree-item.active {
146
- > .card {
147
- background-color: lighten( $primary, 30% );
148
- border-color: rgba( $primary, .5 );
149
- }
150
-
151
- .btn-title {
152
- color: $primary;
153
- }
154
- }
155
-
156
- .btn-title {
157
- .btn {
158
- border-radius: 0;
159
-
160
- &:focus, &:active {
161
- border-color: transparent;
162
- }
163
- }
164
-
165
- .btn-text {
166
- width: 100%;
167
- text-align: left;
168
- }
169
- }
170
-
171
- label.btn-title {
172
- cursor: pointer;
173
- }
174
-
175
- // 隱藏 input
176
- .tree-item {
177
- position: relative;
178
-
179
- input[type="checkbox"], input[type="radio"] {
180
- position: absolute;
181
- @include size(0);
182
- pointer-events: none;
183
-
184
- ~ .btn-title .material-icons:before {
185
- content: "\e836";
186
- display: inline-block;
187
- font-family: inherit;
188
- }
189
-
190
- &:checked ~ .btn-title .material-icons:before {
191
- content: "\e837";
192
- }
193
- }
194
- }
195
-
196
-
197
- // 刪除子層標示 UI
198
- .tree-item:has(.btn.text-danger:hover) {
199
- .card {
200
- background-color: lighten( $danger, 43% );
201
- border-color: rgba( $danger, .5 );
202
-
203
- .btn {
204
- color: $danger;
205
- }
206
- }
207
- }
208
- // 刪除子層標示 UI (含子層)
209
- // .tree-child:has(.btn.text-danger:hover){
210
- // .card, + .content-children .card{
211
- // background-color: lighten( $danger, 43% );
212
- // border-color: rgba( $danger, .5 );
213
- // .btn{
214
- // color: $danger;
215
- // }
216
- // }
217
- // }
218
-
219
- .btn-no-children {
220
- cursor: auto;
221
-
222
- &:focus {
223
- border-color: transparent;
224
- }
225
- }
226
-
227
- // 基本 style
228
- $card-margin: .2em;
229
- $line-padding: .7em;
230
-
231
- .tree-item {
232
- display: flex;
233
- flex-direction: column;
234
- width: 100%;
235
- margin-top: $card-margin;
236
-
237
- .card {
238
- position: relative;
239
- flex-grow: 1;
240
- transition: $transition-base;
241
- z-index: 2;
242
- }
243
- }
244
-
245
- .col-action {
246
- @include flex-center;
247
- width: 2.8rem;
248
- }
249
-
250
-
251
- // 開合 style
252
- .btn[data-bs-toggle="collapse"] {
253
- .material-icons {
254
- transition: $transition-base;
255
- }
256
-
257
- &[aria-expanded="false"] .material-icons {
258
- transform: rotate(-90deg);
259
- }
260
-
261
- &:disabled, &.disabled {
262
- border-color: transparent;
263
- }
264
- }
265
-
266
- // 畫線 style
267
- .content-children {
268
- padding-left: 1.5rem;
269
- --tree-border-color: #fff;
270
- position: relative;
271
-
272
- &:before {
273
- content: "";
274
- position: absolute;
275
- display: block;
276
- left: -$line-padding;
277
- bottom: 24px;
278
- width: 1px;
279
- height: 100%;
280
- z-index: 1;
281
- background-color: var(--tree-border-color);
282
- }
283
- // // line color
284
- &:before, .tree-item .card:before, .tree-item .card:after {
285
- background-color: var(--tree-border-color);
286
- }
287
- }
288
-
289
- .tree-item {
290
- &:last-child > .content-children:before {
291
- display: none;
292
- }
293
-
294
- .card {
295
- position: relative;
296
-
297
- &:before, &:after {
298
- content: "";
299
- position: absolute;
300
- left: calc(-#{$line-padding} - #{$border-width});
301
- z-index: 1;
302
- }
303
-
304
- &:before {
305
- bottom: 50%;
306
- width: 1px;
307
- height: calc(100% + #{$card-margin}*2 + #{$border-width}*2);
308
- }
309
-
310
- &:after {
311
- top: 0;
312
- bottom: 0;
313
- width: $line-padding;
314
- height: 1px;
315
- margin: auto;
316
- }
317
- }
318
-
319
- &:nth-child(1) > .card:before {
320
- height: calc(50% + #{$card-margin} + #{$border-width});
321
- }
322
- }
323
-
324
-
325
- // 小版本
326
- .tree-item-sm {
327
- > .card {
328
- font-size: 86%;
329
- }
330
-
331
- .content-children {
332
- padding-left: 1rem;
333
- }
334
-
335
- .content-children:before {
336
- left: -10px;
337
- bottom: 19px;
338
- }
339
- }
340
- // .tree-item-sm + .content-children{
341
- // > .children-box{
342
- // padding-left: 1rem;
343
- // }
344
- // }
345
-
346
-
347
- // 白背景版本
348
- .tree-item-in-white {
349
- .content-children {
350
- --tree-border-color: var(--bs-border-color);
351
- }
352
-
353
- .card {
354
- --bs-card-bg: var(--gray-100);
355
- --bs-card-border-color: var(--bs-border-color);
356
- }
357
-
358
- &:hover > .card,
359
- .card:focus-within {
360
- background-color: $white;
361
- }
362
- // active效果
363
- &.active .card {
364
- background-color: $white;
365
- }
366
- }
1
+ <template>
2
+ <li class="tree-item" :class="[itemClass]">
3
+ <div class="card flex-row d-flex input-group flex-nowrap">
4
+ <button type="button" class="btn text-primary border-end px-1" :disabled="!item.children" data-bs-toggle="collapse" :data-bs-target="'#collapse-'+item.id">
5
+ <span class="material-icons">arrow_drop_down</span>
6
+ </button>
7
+ <input type="radio" name="tree-item" :id="item.id">
8
+ <label class="btn-title d-flex text-start rounded-0 flex-grow-1"
9
+ :for="item.id" @click="clickItem(item)">
10
+ <div class="btn btn-text border-start">{{item.title}}</div>
11
+ <slot name="icon">
12
+ <div class="btn d-flex align-items-center border-start rounded-0 text-primary h-100 ms-auto">
13
+ <span class="material-icons icon-18"></span>
14
+ </div>
15
+ </slot>
16
+ </label>
17
+ </div>
18
+ <template v-if="item.children">
19
+ <ul :id="'collapse-'+item.id" class="content-children show" v-collapse>
20
+ <TreeItem class="children-box" v-for="(subItem, subIndex) in item.children"
21
+ :key="subItem.id"
22
+ :item="subItem"
23
+ :index="subIndex"
24
+ :click-item="clickItem"
25
+ :active-id="activeId"
26
+ :tree-item-class="treeItemClass">
27
+ <template v-slot:icon>
28
+ <slot name="icon">
29
+ <div class="btn d-flex align-items-center border-start rounded-0 text-primary h-100 ms-auto">
30
+ <span class="material-icons icon-18"></span>
31
+ </div>
32
+ </slot>
33
+ </template>
34
+ </TreeItem>
35
+ </ul>
36
+ </template>
37
+ </li>
38
+ </template>
39
+
40
+ <script>
41
+ import { ref, computed } from 'vue';
42
+ import collapse from './common/directives/collapse';
43
+ export default {
44
+ name: 'TreeItem',
45
+ props: {
46
+ item: {
47
+ type: Object,
48
+ required: true
49
+ },
50
+ index: {
51
+ type: Number,
52
+ required: true
53
+ },
54
+ clickItem: {
55
+ type: Function
56
+ },
57
+ activeId: {
58
+ type: String,
59
+ required: true
60
+ },
61
+ treeItemClass: {
62
+ type: Array,
63
+ default: function () {
64
+ return [];
65
+ }
66
+ }
67
+ },
68
+ directives: {
69
+ collapse
70
+ },
71
+ setup(props, { emit }) {
72
+ const itemClass = computed(() => {
73
+ var classList = [...props.treeItemClass];
74
+ if (props.activeId === props.item.id) {
75
+ classList.push('active');
76
+ }
77
+ return classList;
78
+ });
79
+ return {
80
+ itemClass: itemClass
81
+ };
82
+ }
83
+ }
84
+ </script>
85
+
86
+ <style scoped lang="scss">
87
+ @import "./style/scss/Settings/basic-import";
88
+
89
+ li {
90
+ list-style-type: none;
91
+ }
92
+
93
+ // 基本 sizes
94
+ .tree-item {
95
+ .btn {
96
+ --bs-btn-padding-x: 0.75em;
97
+ --bs-btn-padding-y: 0.375em;
98
+ --bs-btn-font-size: 1em;
99
+ }
100
+
101
+ .card {
102
+ --bs-card-spacer-y: 1em;
103
+ --bs-card-spacer-x: 1em;
104
+ --bs-card-title-spacer-y: 0.5em;
105
+ --bs-card-cap-padding-y: 0.5em;
106
+ --bs-card-cap-padding-x: 1em;
107
+ --bs-card-img-overlay-padding: 1em;
108
+ --bs-card-group-margin: 0.75em;
109
+ }
110
+
111
+ .material-icons {
112
+ font-size: 1.5em;
113
+
114
+ &.icon-14 {
115
+ font-size: 0.875em;
116
+ }
117
+
118
+ &.icon-18 {
119
+ font-size: 1.125em;
120
+ }
121
+
122
+ &.icon-28 {
123
+ font-size: 1.75em;
124
+ }
125
+
126
+ &.icon-32 {
127
+ font-size: 2em;
128
+ }
129
+ }
130
+ }
131
+
132
+ // hover效果與優化
133
+ // firefox 暫不支援 has
134
+ .tree-item:has([data-bs-toggle="collapse"]:hover) + .collapse {
135
+ will-change: height;
136
+ }
137
+
138
+ .tree-item:hover > .card,
139
+ .tree-item .card:focus-within {
140
+ background-color: lighten( $primary, 32% );
141
+ border-color: rgba( $primary, .4 );
142
+ }
143
+
144
+ // active效果
145
+ .tree-item.active {
146
+ > .card {
147
+ background-color: lighten( $primary, 30% );
148
+ border-color: rgba( $primary, .5 );
149
+ }
150
+
151
+ .btn-title {
152
+ color: $primary;
153
+ }
154
+ }
155
+
156
+ .btn-title {
157
+ .btn {
158
+ border-radius: 0;
159
+
160
+ &:focus, &:active {
161
+ border-color: transparent;
162
+ }
163
+ }
164
+
165
+ .btn-text {
166
+ width: 100%;
167
+ text-align: left;
168
+ }
169
+ }
170
+
171
+ label.btn-title {
172
+ cursor: pointer;
173
+ }
174
+
175
+ // 隱藏 input
176
+ .tree-item {
177
+ position: relative;
178
+
179
+ input[type="checkbox"], input[type="radio"] {
180
+ position: absolute;
181
+ @include size(0);
182
+ pointer-events: none;
183
+
184
+ ~ .btn-title .material-icons:before {
185
+ content: "\e836";
186
+ display: inline-block;
187
+ font-family: inherit;
188
+ }
189
+
190
+ &:checked ~ .btn-title .material-icons:before {
191
+ content: "\e837";
192
+ }
193
+ }
194
+ }
195
+
196
+
197
+ // 刪除子層標示 UI
198
+ .tree-item:has(.btn.text-danger:hover) {
199
+ .card {
200
+ background-color: lighten( $danger, 43% );
201
+ border-color: rgba( $danger, .5 );
202
+
203
+ .btn {
204
+ color: $danger;
205
+ }
206
+ }
207
+ }
208
+ // 刪除子層標示 UI (含子層)
209
+ // .tree-child:has(.btn.text-danger:hover){
210
+ // .card, + .content-children .card{
211
+ // background-color: lighten( $danger, 43% );
212
+ // border-color: rgba( $danger, .5 );
213
+ // .btn{
214
+ // color: $danger;
215
+ // }
216
+ // }
217
+ // }
218
+
219
+ .btn-no-children {
220
+ cursor: auto;
221
+
222
+ &:focus {
223
+ border-color: transparent;
224
+ }
225
+ }
226
+
227
+ // 基本 style
228
+ $card-margin: .2em;
229
+ $line-padding: .7em;
230
+
231
+ .tree-item {
232
+ display: flex;
233
+ flex-direction: column;
234
+ width: 100%;
235
+ margin-top: $card-margin;
236
+
237
+ .card {
238
+ position: relative;
239
+ flex-grow: 1;
240
+ transition: $transition-base;
241
+ z-index: 2;
242
+ }
243
+ }
244
+
245
+ .col-action {
246
+ @include flex-center;
247
+ width: 2.8rem;
248
+ }
249
+
250
+
251
+ // 開合 style
252
+ .btn[data-bs-toggle="collapse"] {
253
+ .material-icons {
254
+ transition: $transition-base;
255
+ }
256
+
257
+ &[aria-expanded="false"] .material-icons {
258
+ transform: rotate(-90deg);
259
+ }
260
+
261
+ &:disabled, &.disabled {
262
+ border-color: transparent;
263
+ }
264
+ }
265
+
266
+ // 畫線 style
267
+ .content-children {
268
+ padding-left: 1.5rem;
269
+ --tree-border-color: #fff;
270
+ position: relative;
271
+
272
+ &:before {
273
+ content: "";
274
+ position: absolute;
275
+ display: block;
276
+ left: -$line-padding;
277
+ bottom: 24px;
278
+ width: 1px;
279
+ height: 100%;
280
+ z-index: 1;
281
+ background-color: var(--tree-border-color);
282
+ }
283
+ // // line color
284
+ &:before, .tree-item .card:before, .tree-item .card:after {
285
+ background-color: var(--tree-border-color);
286
+ }
287
+ }
288
+
289
+ .tree-item {
290
+ &:last-child > .content-children:before {
291
+ display: none;
292
+ }
293
+
294
+ .card {
295
+ position: relative;
296
+
297
+ &:before, &:after {
298
+ content: "";
299
+ position: absolute;
300
+ left: calc(-#{$line-padding} - #{$border-width});
301
+ z-index: 1;
302
+ }
303
+
304
+ &:before {
305
+ bottom: 50%;
306
+ width: 1px;
307
+ height: calc(100% + #{$card-margin}*2 + #{$border-width}*2);
308
+ }
309
+
310
+ &:after {
311
+ top: 0;
312
+ bottom: 0;
313
+ width: $line-padding;
314
+ height: 1px;
315
+ margin: auto;
316
+ }
317
+ }
318
+
319
+ &:nth-child(1) > .card:before {
320
+ height: calc(50% + #{$card-margin} + #{$border-width});
321
+ }
322
+ }
323
+
324
+
325
+ // 小版本
326
+ .tree-item-sm {
327
+ > .card {
328
+ font-size: 86%;
329
+ }
330
+
331
+ .content-children {
332
+ padding-left: 1rem;
333
+ }
334
+
335
+ .content-children:before {
336
+ left: -10px;
337
+ bottom: 19px;
338
+ }
339
+ }
340
+ // .tree-item-sm + .content-children{
341
+ // > .children-box{
342
+ // padding-left: 1rem;
343
+ // }
344
+ // }
345
+
346
+
347
+ // 白背景版本
348
+ .tree-item-in-white {
349
+ .content-children {
350
+ --tree-border-color: var(--bs-border-color);
351
+ }
352
+
353
+ .card {
354
+ --bs-card-bg: var(--gray-100);
355
+ --bs-card-border-color: var(--bs-border-color);
356
+ }
357
+
358
+ &:hover > .card,
359
+ .card:focus-within {
360
+ background-color: $white;
361
+ }
362
+ // active效果
363
+ &.active .card {
364
+ background-color: $white;
365
+ }
366
+ }
367
367
  </style>