adtec-core-package 0.0.2 → 0.0.4

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 (164) hide show
  1. package/package.json +10 -4
  2. package/src/App.vue +0 -3
  3. package/src/assets/base.css +0 -86
  4. package/src/assets/main.css +0 -35
  5. package/src/components/ElFlex/ElFlex.vue +297 -0
  6. package/src/components/OperationAuth/operationAuth.vue +26 -0
  7. package/src/components/Search/ElIconSearch.vue +239 -0
  8. package/src/components/Search/ElSearch.vue +132 -0
  9. package/src/components/Title/ElTitle.vue +49 -0
  10. package/src/components/icon/ElIconBtn.vue +182 -0
  11. package/src/components/icon/ElIcons.vue +38 -0
  12. package/src/config/ElementPlusConfig.ts +95 -0
  13. package/src/css/elementUI/affix.scss +7 -0
  14. package/src/css/elementUI/alert.scss +115 -0
  15. package/src/css/elementUI/anchor-link.scss +41 -0
  16. package/src/css/elementUI/anchor.scss +88 -0
  17. package/src/css/elementUI/aside.scss +8 -0
  18. package/src/css/elementUI/autocomplete.scss +89 -0
  19. package/src/css/elementUI/avatar.scss +55 -0
  20. package/src/css/elementUI/backtop.scss +29 -0
  21. package/src/css/elementUI/badge.scss +58 -0
  22. package/src/css/elementUI/base.scss +3 -0
  23. package/src/css/elementUI/breadcrumb-item.scss +0 -0
  24. package/src/css/elementUI/breadcrumb.scss +62 -0
  25. package/src/css/elementUI/button-group.scss +80 -0
  26. package/src/css/elementUI/button.scss +304 -0
  27. package/src/css/elementUI/calendar.scss +80 -0
  28. package/src/css/elementUI/card.scss +45 -0
  29. package/src/css/elementUI/carousel-item.scss +58 -0
  30. package/src/css/elementUI/carousel.scss +188 -0
  31. package/src/css/elementUI/cascader-panel.scss +138 -0
  32. package/src/css/elementUI/cascader.scss +230 -0
  33. package/src/css/elementUI/check-tag.scss +60 -0
  34. package/src/css/elementUI/checkbox-button.scss +140 -0
  35. package/src/css/elementUI/checkbox-group.scss +7 -0
  36. package/src/css/elementUI/checkbox.scss +298 -0
  37. package/src/css/elementUI/col.scss +48 -0
  38. package/src/css/elementUI/collapse-item.scss +0 -0
  39. package/src/css/elementUI/collapse-transition.scss +0 -0
  40. package/src/css/elementUI/collapse.scss +70 -0
  41. package/src/css/elementUI/color/index.scss +20 -0
  42. package/src/css/elementUI/color-picker.scss +392 -0
  43. package/src/css/elementUI/common/popup.scss +47 -0
  44. package/src/css/elementUI/common/transition.scss +122 -0
  45. package/src/css/elementUI/common/var.scss +1549 -0
  46. package/src/css/elementUI/config-provider.scss +0 -0
  47. package/src/css/elementUI/container.scss +14 -0
  48. package/src/css/elementUI/dark/css-vars.scss +39 -0
  49. package/src/css/elementUI/dark/var.scss +222 -0
  50. package/src/css/elementUI/date-picker/date-picker.scss +110 -0
  51. package/src/css/elementUI/date-picker/date-range-picker.scss +113 -0
  52. package/src/css/elementUI/date-picker/date-table.scss +158 -0
  53. package/src/css/elementUI/date-picker/month-table.scss +112 -0
  54. package/src/css/elementUI/date-picker/picker-panel.scss +131 -0
  55. package/src/css/elementUI/date-picker/picker.scss +219 -0
  56. package/src/css/elementUI/date-picker/time-picker.scss +90 -0
  57. package/src/css/elementUI/date-picker/time-range-picker.scss +33 -0
  58. package/src/css/elementUI/date-picker/time-spinner.scss +111 -0
  59. package/src/css/elementUI/date-picker/year-table.scss +108 -0
  60. package/src/css/elementUI/date-picker.scss +9 -0
  61. package/src/css/elementUI/descriptions-item.scss +73 -0
  62. package/src/css/elementUI/descriptions.scss +152 -0
  63. package/src/css/elementUI/dialog.scss +199 -0
  64. package/src/css/elementUI/display.scss +12 -0
  65. package/src/css/elementUI/divider.scss +48 -0
  66. package/src/css/elementUI/drawer.scss +164 -0
  67. package/src/css/elementUI/dropdown-item.scss +0 -0
  68. package/src/css/elementUI/dropdown-menu.scss +0 -0
  69. package/src/css/elementUI/dropdown.scss +208 -0
  70. package/src/css/elementUI/empty.scss +49 -0
  71. package/src/css/elementUI/footer.scss +12 -0
  72. package/src/css/elementUI/form-item.scss +0 -0
  73. package/src/css/elementUI/form.scss +243 -0
  74. package/src/css/elementUI/header.scss +12 -0
  75. package/src/css/elementUI/icon.scss +45 -0
  76. package/src/css/elementUI/image-viewer.scss +139 -0
  77. package/src/css/elementUI/image.scss +49 -0
  78. package/src/css/elementUI/index.scss +110 -0
  79. package/src/css/elementUI/infinite-scroll.scss +0 -0
  80. package/src/css/elementUI/input-number.scss +178 -0
  81. package/src/css/elementUI/input.scss +478 -0
  82. package/src/css/elementUI/link.scss +90 -0
  83. package/src/css/elementUI/loading.scss +104 -0
  84. package/src/css/elementUI/main.scss +14 -0
  85. package/src/css/elementUI/mention.scss +88 -0
  86. package/src/css/elementUI/menu-item-group.scss +0 -0
  87. package/src/css/elementUI/menu-item.scss +0 -0
  88. package/src/css/elementUI/menu.scss +339 -0
  89. package/src/css/elementUI/message-box.scss +213 -0
  90. package/src/css/elementUI/message.scss +98 -0
  91. package/src/css/elementUI/mixins/_button.scss +165 -0
  92. package/src/css/elementUI/mixins/_col.scss +33 -0
  93. package/src/css/elementUI/mixins/_var.scss +67 -0
  94. package/src/css/elementUI/mixins/config.scss +5 -0
  95. package/src/css/elementUI/mixins/function.scss +88 -0
  96. package/src/css/elementUI/mixins/mixins.scss +237 -0
  97. package/src/css/elementUI/mixins/utils.scss +39 -0
  98. package/src/css/elementUI/notification.scss +104 -0
  99. package/src/css/elementUI/option-group.scss +33 -0
  100. package/src/css/elementUI/option.scss +71 -0
  101. package/src/css/elementUI/overlay.scss +17 -0
  102. package/src/css/elementUI/page-header.scss +60 -0
  103. package/src/css/elementUI/pagination.scss +238 -0
  104. package/src/css/elementUI/popconfirm.scss +16 -0
  105. package/src/css/elementUI/popover.scss +61 -0
  106. package/src/css/elementUI/popper.scss +106 -0
  107. package/src/css/elementUI/progress.scss +179 -0
  108. package/src/css/elementUI/radio-button.scss +169 -0
  109. package/src/css/elementUI/radio-group.scss +9 -0
  110. package/src/css/elementUI/radio.scss +215 -0
  111. package/src/css/elementUI/rate.scss +108 -0
  112. package/src/css/elementUI/reset.scss +98 -0
  113. package/src/css/elementUI/result.scss +57 -0
  114. package/src/css/elementUI/row.scss +35 -0
  115. package/src/css/elementUI/scrollbar.scss +97 -0
  116. package/src/css/elementUI/segmented.scss +183 -0
  117. package/src/css/elementUI/select-dropdown-v2.scss +1 -0
  118. package/src/css/elementUI/select-dropdown.scss +57 -0
  119. package/src/css/elementUI/select-v2.scss +4 -0
  120. package/src/css/elementUI/select.scss +253 -0
  121. package/src/css/elementUI/skeleton-item.scss +83 -0
  122. package/src/css/elementUI/skeleton.scss +44 -0
  123. package/src/css/elementUI/slider.scss +212 -0
  124. package/src/css/elementUI/space.scss +20 -0
  125. package/src/css/elementUI/spinner.scss +43 -0
  126. package/src/css/elementUI/statistic.scss +35 -0
  127. package/src/css/elementUI/step.scss +316 -0
  128. package/src/css/elementUI/steps.scss +21 -0
  129. package/src/css/elementUI/sub-menu.scss +0 -0
  130. package/src/css/elementUI/switch.scss +300 -0
  131. package/src/css/elementUI/tab-pane.scss +0 -0
  132. package/src/css/elementUI/table-column.scss +98 -0
  133. package/src/css/elementUI/table-v2.scss +236 -0
  134. package/src/css/elementUI/table.scss +694 -0
  135. package/src/css/elementUI/tabs.scss +659 -0
  136. package/src/css/elementUI/tag.scss +181 -0
  137. package/src/css/elementUI/text.scss +51 -0
  138. package/src/css/elementUI/time-picker.scss +5 -0
  139. package/src/css/elementUI/time-select.scss +37 -0
  140. package/src/css/elementUI/timeline-item.scss +84 -0
  141. package/src/css/elementUI/timeline.scss +46 -0
  142. package/src/css/elementUI/tooltip-v2.scss +95 -0
  143. package/src/css/elementUI/tooltip.scss +0 -0
  144. package/src/css/elementUI/tour.scss +187 -0
  145. package/src/css/elementUI/transfer.scss +203 -0
  146. package/src/css/elementUI/tree-select.scss +41 -0
  147. package/src/css/elementUI/tree.scss +134 -0
  148. package/src/css/elementUI/upload.scss +654 -0
  149. package/src/css/elementUI/var.scss +87 -0
  150. package/src/css/elementUI/virtual-list.scss +40 -0
  151. package/src/interface/ISysMenuDataVo.ts +22 -0
  152. package/src/interface/ISysMenuInfoVo.ts +83 -0
  153. package/src/interface/ISysMenuOperationVo.ts +21 -0
  154. package/src/interface/enum/FlexEnum.ts +85 -0
  155. package/src/views/HomeView.vue +2 -2
  156. package/vite.config.ts +2 -9
  157. package/src/components/HelloWorld.vue +0 -41
  158. package/src/components/TheWelcome.vue +0 -94
  159. package/src/components/WelcomeItem.vue +0 -87
  160. package/src/components/icons/IconCommunity.vue +0 -7
  161. package/src/components/icons/IconDocumentation.vue +0 -7
  162. package/src/components/icons/IconEcosystem.vue +0 -7
  163. package/src/components/icons/IconSupport.vue +0 -7
  164. package/src/components/icons/IconTooling.vue +0 -19
@@ -0,0 +1,181 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+
7
+ @include b(tag) {
8
+ @include set-component-css-var('tag', $tag);
9
+ }
10
+
11
+ $tag-border-width: 1px;
12
+
13
+ $tag-icon-span-gap: () !default;
14
+ $tag-icon-span-gap: map.merge(
15
+ (
16
+ 'large': 8px,
17
+ 'default': 6px,
18
+ 'small': 4px,
19
+ ),
20
+ $tag-icon-span-gap
21
+ );
22
+
23
+ @function returnVarList($var, $type: 'primary') {
24
+ $list: ('fill-color', 'blank');
25
+
26
+ @if $var !=false {
27
+ $list: ('color', $type, $var);
28
+ }
29
+
30
+ @return $list;
31
+ }
32
+
33
+ // false mean --el-color-white
34
+ @mixin genTheme($backgroundColorWeight, $borderColorWeight, $hoverColorWeight) {
35
+ @include css-var-from-global(
36
+ ('tag', 'bg-color'),
37
+ returnVarList($backgroundColorWeight)
38
+ );
39
+ @include css-var-from-global(
40
+ ('tag', 'border-color'),
41
+ returnVarList($borderColorWeight)
42
+ );
43
+ @include css-var-from-global(
44
+ ('tag', 'hover-color'),
45
+ returnVarList($hoverColorWeight)
46
+ );
47
+
48
+ @each $type in $types {
49
+ &.#{bem('tag', '', $type)} {
50
+ @include css-var-from-global(
51
+ ('tag', 'bg-color'),
52
+ returnVarList($backgroundColorWeight, $type)
53
+ );
54
+ @include css-var-from-global(
55
+ ('tag', 'border-color'),
56
+ returnVarList($borderColorWeight, $type)
57
+ );
58
+ @include css-var-from-global(
59
+ ('tag', 'hover-color'),
60
+ returnVarList($hoverColorWeight, $type)
61
+ );
62
+ }
63
+ }
64
+ }
65
+
66
+ @include b(tag) {
67
+ background-color: getCssVar('tag-bg-color');
68
+ border-color: getCssVar('tag-border-color');
69
+ color: getCssVar('tag-text-color');
70
+
71
+ display: inline-flex;
72
+ justify-content: center;
73
+ align-items: center;
74
+ vertical-align: middle;
75
+ height: map.get($tag-height, 'default');
76
+ padding: 0 map.get($tag-padding, 'default') - $border-width;
77
+
78
+ font-size: getCssVar('tag-font-size');
79
+ line-height: 1;
80
+ border-width: $tag-border-width;
81
+ border-style: solid;
82
+ border-radius: getCssVar('tag-border-radius');
83
+ box-sizing: border-box;
84
+ white-space: nowrap;
85
+
86
+ @include set-css-var-value('icon-size', 14px);
87
+ @include genTheme('light-9', 'light-8', '');
88
+
89
+ @include when(hit) {
90
+ border-color: getCssVar('color', 'primary');
91
+ }
92
+
93
+ @include when(round) {
94
+ border-radius: getCssVar('tag', 'border-radius-rounded');
95
+ }
96
+
97
+ .#{$namespace}-tag__close {
98
+ flex-shrink: 0;
99
+ color: getCssVar('tag', 'text-color');
100
+
101
+ &:hover {
102
+ color: getCssVar('color-white');
103
+ background-color: getCssVar('tag-hover-color');
104
+ }
105
+ }
106
+
107
+ @each $type in $types {
108
+ &.#{bem('tag', '', $type)} {
109
+ @include css-var-from-global(('tag', 'text-color'), ('color', $type));
110
+ }
111
+ }
112
+
113
+ $svg-margin-size: 1px;
114
+
115
+ .#{$namespace}-icon {
116
+ border-radius: 50%;
117
+ cursor: pointer;
118
+
119
+ font-size: calc(#{getCssVar('icon-size')} - #{$svg-margin-size * 2});
120
+ height: getCssVar('icon-size');
121
+ width: getCssVar('icon-size');
122
+ }
123
+
124
+ .#{$namespace}-tag__close {
125
+ margin-left: map.get($tag-icon-span-gap, 'default');
126
+ }
127
+
128
+ @include m(dark) {
129
+ @include css-var-from-global(('tag', 'text-color'), ('color', 'white'));
130
+ @include genTheme('', '', 'light-3');
131
+
132
+ @each $type in $types {
133
+ &.#{bem('tag', '', $type)} {
134
+ @include css-var-from-global(('tag', 'text-color'), ('color', 'white'));
135
+ }
136
+ }
137
+ }
138
+
139
+ @include m(plain) {
140
+ @include css-var-from-global(('tag', 'bg-color'), ('fill-color', 'blank'));
141
+ @include genTheme(false, 'light-5', '');
142
+ }
143
+
144
+ &.is-closable {
145
+ padding-right: map.get($tag-icon-span-gap, 'default') - $border-width;
146
+ }
147
+
148
+ @each $size in (large, small) {
149
+ @include m($size) {
150
+ padding: 0 map.get($tag-padding, $size) - $tag-border-width;
151
+ height: map.get($tag-height, $size);
152
+
153
+ @include set-css-var-value(
154
+ 'icon-size',
155
+ #{map.get($tag-icon-size, $size)}
156
+ );
157
+
158
+ .#{$namespace}-tag__close {
159
+ margin-left: map.get($tag-icon-span-gap, $size);
160
+ }
161
+
162
+ &.is-closable {
163
+ padding-right: map.get($tag-icon-span-gap, $size) - $border-width;
164
+ }
165
+ }
166
+ }
167
+
168
+ @include m(small) {
169
+ .#{$namespace}-icon-close {
170
+ transform: scale(0.8);
171
+ }
172
+ }
173
+
174
+ @each $type in $types {
175
+ &.#{bem('tag', '', $type)} {
176
+ @include when(hit) {
177
+ border-color: getCssVar('color', $type);
178
+ }
179
+ }
180
+ }
181
+ }
@@ -0,0 +1,51 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+
7
+ @include b(text) {
8
+ @include set-component-css-var('text', $text);
9
+ }
10
+
11
+ @include b(text) {
12
+ align-self: center;
13
+ margin: 0;
14
+ padding: 0;
15
+ font-size: getCssVar('text', 'font-size');
16
+ color: getCssVar('text', 'color');
17
+ overflow-wrap: break-word;
18
+
19
+ @include when(truncated) {
20
+ display: inline-block;
21
+ max-width: 100%;
22
+ text-overflow: ellipsis;
23
+ white-space: nowrap;
24
+ overflow: hidden;
25
+ }
26
+
27
+ @include when(line-clamp) {
28
+ display: -webkit-inline-box;
29
+ -webkit-box-orient: vertical;
30
+ overflow: hidden;
31
+ }
32
+
33
+ @each $size in (large, default, small) {
34
+ @include m($size) {
35
+ @include set-css-var-value(
36
+ ('text', 'font-size'),
37
+ map.get($text-font-size, $size)
38
+ );
39
+ }
40
+ }
41
+
42
+ @each $type in $types {
43
+ &.#{bem('text', '', $type)} {
44
+ @include css-var-from-global(('text', 'color'), ('color', $type));
45
+ }
46
+ }
47
+
48
+ & > .#{bem('icon')} {
49
+ vertical-align: -2px;
50
+ }
51
+ }
@@ -0,0 +1,5 @@
1
+ @use './date-picker/picker.scss';
2
+ @use './date-picker/picker-panel.scss';
3
+ @use './date-picker/time-spinner.scss';
4
+ @use './date-picker/time-picker.scss';
5
+ @use './date-picker/time-range-picker.scss';
@@ -0,0 +1,37 @@
1
+ @use 'mixins/config' as *;
2
+ @use 'mixins/mixins' as *;
3
+ @use 'common/var' as *;
4
+ @use './date-picker/picker.scss';
5
+ @use './date-picker/date-picker.scss';
6
+
7
+ .time-select {
8
+ margin: 5px 0;
9
+ min-width: 0;
10
+
11
+ .#{$namespace}-picker-panel__content {
12
+ max-height: 200px;
13
+ margin: 0;
14
+ }
15
+
16
+ &-item {
17
+ padding: 8px 10px;
18
+ font-size: 14px;
19
+ line-height: 20px;
20
+
21
+ &.disabled {
22
+ color: getCssVar('datepicker-border-color');
23
+ cursor: not-allowed;
24
+ }
25
+
26
+ &:hover {
27
+ background-color: getCssVar('fill-color', 'light');
28
+ font-weight: bold;
29
+ cursor: pointer;
30
+ }
31
+ }
32
+
33
+ .time-select-item.selected:not(.disabled) {
34
+ color: getCssVar('color-primary');
35
+ font-weight: bold;
36
+ }
37
+ }
@@ -0,0 +1,84 @@
1
+ @use 'mixins/mixins' as *;
2
+ @use 'common/var' as *;
3
+
4
+ @include b(timeline-item) {
5
+ position: relative;
6
+ padding-bottom: 20px;
7
+
8
+ @include e(wrapper) {
9
+ position: relative;
10
+ padding-left: 28px;
11
+ top: -3px;
12
+ }
13
+
14
+ @include e(tail) {
15
+ position: absolute;
16
+ left: 4px;
17
+ height: 100%;
18
+ border-left: 2px solid getCssVar('timeline-node-color');
19
+ }
20
+
21
+ & .#{$namespace}-timeline-item__icon {
22
+ color: getCssVar('color-white');
23
+ font-size: getCssVar('font-size-small');
24
+ }
25
+
26
+ @include e(node) {
27
+ position: absolute;
28
+ background-color: getCssVar('timeline-node-color');
29
+ border-color: getCssVar('timeline-node-color');
30
+ border-radius: 50%;
31
+ box-sizing: border-box;
32
+ display: flex;
33
+ justify-content: center;
34
+ align-items: center;
35
+
36
+ @include m(normal) {
37
+ left: -1px;
38
+ width: getCssVar('timeline-node-size-normal');
39
+ height: getCssVar('timeline-node-size-normal');
40
+ }
41
+ @include m(large) {
42
+ left: -2px;
43
+ width: getCssVar('timeline-node-size-large');
44
+ height: getCssVar('timeline-node-size-large');
45
+ }
46
+ @include when(hollow) {
47
+ background: getCssVar('color-white');
48
+ border-style: solid;
49
+ border-width: 2px;
50
+ }
51
+
52
+ @each $type in (primary, success, warning, danger, info) {
53
+ @include m($type) {
54
+ background-color: getCssVar('color', $type);
55
+ border-color: getCssVar('color', $type);
56
+ }
57
+ }
58
+ }
59
+
60
+ @include e(dot) {
61
+ position: absolute;
62
+ display: flex;
63
+ justify-content: center;
64
+ align-items: center;
65
+ }
66
+
67
+ @include e(content) {
68
+ color: getCssVar('text-color', 'primary');
69
+ }
70
+
71
+ @include e(timestamp) {
72
+ color: getCssVar('text-color', 'secondary');
73
+ line-height: 1;
74
+ font-size: getCssVar('font-size-small');
75
+
76
+ @include when(top) {
77
+ margin-bottom: 8px;
78
+ padding-top: 4px;
79
+ }
80
+ @include when(bottom) {
81
+ margin-top: 8px;
82
+ }
83
+ }
84
+ }
@@ -0,0 +1,46 @@
1
+ @use 'mixins/mixins' as *;
2
+ @use 'mixins/var' as *;
3
+ @use 'common/var' as *;
4
+
5
+ @include b(timeline) {
6
+ @include set-component-css-var('timeline', $timeline);
7
+ }
8
+
9
+ @include b(timeline) {
10
+ margin: 0;
11
+ font-size: getCssVar('font-size', 'base');
12
+ list-style: none;
13
+
14
+ .#{$namespace}-timeline-item:last-child {
15
+ .#{$namespace}-timeline-item__tail {
16
+ display: none;
17
+ }
18
+ }
19
+
20
+ .#{$namespace}-timeline-item__center {
21
+ display: flex;
22
+ align-items: center;
23
+
24
+ .#{$namespace}-timeline-item__wrapper {
25
+ width: 100%;
26
+ }
27
+
28
+ .#{$namespace}-timeline-item__tail {
29
+ top: 0;
30
+ }
31
+ }
32
+
33
+ .#{$namespace}-timeline-item__center:first-child {
34
+ .#{$namespace}-timeline-item__tail {
35
+ height: calc(50% + 10px);
36
+ top: calc(50% - 10px);
37
+ }
38
+ }
39
+
40
+ .#{$namespace}-timeline-item__center:last-child {
41
+ .#{$namespace}-timeline-item__tail {
42
+ display: block;
43
+ height: calc(50% - 10px);
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,95 @@
1
+ @use 'mixins/mixins' as *;
2
+ @use 'mixins/var' as *;
3
+ @use 'common/var' as *;
4
+
5
+ @include b(tooltip-v2) {
6
+ @include e(content) {
7
+ --#{$namespace}-tooltip-v2-padding: 5px 10px;
8
+ --#{$namespace}-tooltip-v2-border-radius: 4px;
9
+
10
+ @include css-var-from-global(
11
+ ('tooltip-v2', 'border-color'),
12
+ ('border-color')
13
+ );
14
+
15
+ border-radius: getCssVar('tooltip-v2-border-radius');
16
+ color: getCssVar('color-black');
17
+ background-color: getCssVar('color-white');
18
+ padding: getCssVar('tooltip-v2-padding');
19
+ border: 1px solid getCssVar('border-color');
20
+
21
+ $content-selector: &;
22
+
23
+ $sides: (
24
+ 'top': 'bottom',
25
+ 'bottom': 'top',
26
+ 'left': 'right',
27
+ 'right': 'left',
28
+ );
29
+
30
+ @include e(arrow) {
31
+ position: absolute;
32
+ color: getCssVar('color-white');
33
+ width: var(--#{$namespace}-tooltip-v2-arrow-width);
34
+ height: var(--#{$namespace}-tooltip-v2-arrow-height);
35
+ pointer-events: none;
36
+ left: var(--#{$namespace}-tooltip-v2-arrow-x);
37
+ top: var(--#{$namespace}-tooltip-v2-arrow-y);
38
+
39
+ &::before {
40
+ content: '';
41
+ width: 0;
42
+ height: 0;
43
+ border: var(--#{$namespace}-tooltip-v2-arrow-border-width) solid
44
+ transparent;
45
+ position: absolute;
46
+ }
47
+
48
+ &::after {
49
+ content: '';
50
+ width: 0;
51
+ height: 0;
52
+ border: var(--#{$namespace}-tooltip-v2-arrow-border-width) solid
53
+ transparent;
54
+ position: absolute;
55
+ }
56
+
57
+ @each $side, $opposite in $sides {
58
+ #{$content-selector}[data-side^='#{$side}'] & {
59
+ #{$opposite}: 0;
60
+ }
61
+
62
+ #{$content-selector}[data-side^='#{$side}'] &::before {
63
+ border-#{$side}-color: var(--#{$namespace}-color-white);
64
+ border-#{$side}-width: var(
65
+ --#{$namespace}-tooltip-v2-arrow-border-width
66
+ );
67
+ border-#{$opposite}: 0;
68
+ #{$side}: calc(100% - 1px);
69
+ }
70
+
71
+ #{$content-selector}[data-side^='#{$side}'] &::after {
72
+ border-#{$side}-color: var(--#{$namespace}-border-color);
73
+ border-#{$side}-width: var(
74
+ --#{$namespace}-tooltip-v2-arrow-border-width
75
+ );
76
+ border-#{$opposite}: 0;
77
+ #{$side}: 100%;
78
+ z-index: -1;
79
+ }
80
+ }
81
+ }
82
+
83
+ &.is-dark {
84
+ --#{$namespace}-tooltip-v2-border-color: transparent;
85
+ background-color: getCssVar('color-black');
86
+ color: getCssVar('color-white');
87
+ border-color: transparent;
88
+
89
+ @include e(arrow) {
90
+ background-color: getCssVar('color-black');
91
+ border-color: transparent;
92
+ }
93
+ }
94
+ }
95
+ }
File without changes
@@ -0,0 +1,187 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'mixins/mixins' as *;
4
+ @use 'mixins/var' as *;
5
+ @use 'common/var' as *;
6
+
7
+ @include b(tour) {
8
+ @include set-component-css-var('tour', $tour);
9
+
10
+ @include e(hollow) {
11
+ transition: all getCssVar('transition-duration') ease;
12
+ }
13
+
14
+ @include e(content) {
15
+ border-radius: getCssVar('tour-border-radius');
16
+ width: var(#{getCssVarName('tour-width')});
17
+ padding: getCssVar('tour-padding-primary');
18
+ background: getCssVar('tour-bg-color');
19
+ box-shadow: getCssVar('box-shadow-light');
20
+ box-sizing: border-box;
21
+ overflow-wrap: break-word;
22
+ outline: none;
23
+
24
+ $content-selector: &;
25
+
26
+ $sides: (
27
+ 'top': 'bottom',
28
+ 'bottom': 'top',
29
+ 'left': 'right',
30
+ 'right': 'left',
31
+ );
32
+
33
+ @include e(arrow) {
34
+ position: absolute;
35
+ background: getCssVar('tour-bg-color');
36
+ width: 10px;
37
+ height: 10px;
38
+ pointer-events: none;
39
+ transform: rotate(45deg);
40
+ box-sizing: border-box;
41
+
42
+ @each $side,
43
+ $adjacency
44
+ in (
45
+ 'top': 'left',
46
+ 'bottom': 'right',
47
+ 'left': 'bottom',
48
+ 'right': 'top'
49
+ )
50
+ {
51
+ #{$content-selector}[data-side^='#{$side}'] & {
52
+ border-#{$side}-color: transparent;
53
+ border-#{$adjacency}-color: transparent;
54
+ }
55
+ }
56
+
57
+ @each $side, $opposite in $sides {
58
+ #{$content-selector}[data-side^='#{$side}'] & {
59
+ #{$opposite}: -5px;
60
+ }
61
+ }
62
+ }
63
+
64
+ @include e(closebtn) {
65
+ position: absolute;
66
+ top: 0;
67
+ right: 0;
68
+ padding: 0;
69
+ width: 40px;
70
+ height: 40px;
71
+ background: transparent;
72
+ border: none;
73
+ outline: none;
74
+ cursor: pointer;
75
+ font-size: var(
76
+ #{getCssVarName('message-close-size')},
77
+ map.get($message, 'close-size')
78
+ );
79
+
80
+ .#{$namespace}-tour__close {
81
+ color: getCssVar('tour-close-color');
82
+ font-size: inherit;
83
+ }
84
+
85
+ &:focus,
86
+ &:hover {
87
+ .#{$namespace}-tour__close {
88
+ color: getCssVar('color', 'primary');
89
+ }
90
+ }
91
+ }
92
+
93
+ @include e(header) {
94
+ padding-bottom: getCssVar('tour-padding-primary');
95
+
96
+ &.show-close {
97
+ padding-right: calc(
98
+ getCssVar('tour-padding-primary') +
99
+ var(
100
+ #{getCssVarName('message-close-size')},
101
+ map.get($message, 'close-size')
102
+ )
103
+ );
104
+ }
105
+ }
106
+
107
+ @include e(title) {
108
+ line-height: getCssVar('tour-font-line-height');
109
+ font-size: getCssVar('tour-title-font-size');
110
+ color: getCssVar('tour-title-text-color');
111
+ font-weight: getCssVar('tour-title-font-weight');
112
+ }
113
+
114
+ @include e(body) {
115
+ color: getCssVar('tour-text-color');
116
+ font-size: getCssVar('tour-font-size');
117
+ img,
118
+ video {
119
+ max-width: 100%;
120
+ }
121
+ }
122
+
123
+ @include e(footer) {
124
+ padding-top: getCssVar('tour-padding-primary');
125
+ box-sizing: border-box;
126
+ display: flex;
127
+ justify-content: space-between;
128
+ }
129
+
130
+ @include b(tour-indicators) {
131
+ display: inline-block;
132
+ flex: 1;
133
+ }
134
+
135
+ @include b(tour-indicator) {
136
+ width: 6px;
137
+ height: 6px;
138
+ display: inline-block;
139
+ border-radius: 50%;
140
+ background: getCssVar('color', 'info-light-9');
141
+ margin-right: 6px;
142
+
143
+ @include when(active) {
144
+ background: getCssVar('color', 'primary');
145
+ }
146
+ }
147
+ }
148
+
149
+ &.#{$namespace}-tour--primary {
150
+ @include set-css-var-value('tour-title-text-color', #fff);
151
+ @include set-css-var-value('tour-text-color', #fff);
152
+ @include set-css-var-value('tour-bg-color', getCssVar('color', 'primary'));
153
+ @include set-css-var-value('tour-close-color', #fff);
154
+
155
+ .#{$namespace}-tour__closebtn {
156
+ &:focus,
157
+ &:hover {
158
+ .#{$namespace}-tour__close {
159
+ color: getCssVar('tour-title-text-color');
160
+ }
161
+ }
162
+ }
163
+
164
+ .#{$namespace}-button--default {
165
+ color: getCssVar('color', 'primary');
166
+ border-color: getCssVar('color', 'primary');
167
+ background: #fff;
168
+ }
169
+
170
+ .#{$namespace}-button--primary {
171
+ border-color: #fff;
172
+ }
173
+
174
+ @include b(tour-indicator) {
175
+ background: rgba(255, 255, 255, 0.15);
176
+ @include when(active) {
177
+ background: #fff;
178
+ }
179
+ }
180
+ }
181
+ }
182
+
183
+ @include b(tour-parent) {
184
+ @include m(hidden) {
185
+ overflow: hidden;
186
+ }
187
+ }