@dataloop-ai/components 0.16.45 → 0.16.47
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/.eslintrc.js +2 -2
- package/package.json +10 -9
- package/src/App.vue +120 -58
- package/src/assets/globals.scss +2 -0
- package/src/components/basic/DlAlert/DlAlert.vue +1 -1
- package/src/components/basic/DlButton/DlButton.vue +13 -13
- package/src/components/basic/DlCard/DlCard.vue +234 -0
- package/src/components/basic/DlCard/index.ts +3 -0
- package/src/components/basic/DlCard/types.ts +20 -0
- package/src/components/basic/DlChip/DlChip.vue +1 -0
- package/src/components/basic/DlEllipsis/DlEllipsis.vue +90 -0
- package/src/components/basic/DlEllipsis/index.ts +2 -0
- package/src/components/basic/DlListItem/DlListItem.vue +11 -5
- package/src/components/basic/index.ts +2 -0
- package/src/components/compound/DlCharts/charts/DlBarChart/DlBarChart.vue +8 -1
- package/src/components/compound/DlCharts/charts/DlColumnChart/DlColumnChart.vue +22 -6
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/DlConfusionMatrix.vue +542 -0
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/index.ts +2 -0
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/utils.ts +96 -0
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChart.vue +2 -2
- package/src/components/compound/DlCharts/charts/DlLineChart/DlLineChart.vue +22 -6
- package/src/components/compound/DlCharts/charts/index.ts +1 -0
- package/src/components/compound/DlCharts/components/DlBrush.vue +8 -1
- package/src/components/compound/DlCharts/components/DlChartScrollBar.vue +34 -21
- package/src/components/compound/DlCharts/types/DlConfusionMatrix.types.ts +19 -0
- package/src/components/compound/DlCharts/types/index.ts +2 -1
- package/src/components/compound/DlCharts/types/props.ts +14 -0
- package/src/components/compound/DlDialogBox/DlDialogBox.vue +1 -1
- package/src/components/compound/DlDialogBox/components/DlDialogBoxFooter.vue +1 -0
- package/src/components/compound/DlDropdownButton/DlDropdownButton.vue +58 -12
- package/src/components/compound/DlInput/DlInput.vue +45 -23
- package/src/components/compound/DlJsonEditor/DlJsonEditor.vue +13 -29
- package/src/components/compound/DlPagination/DlPagination.vue +14 -4
- package/src/components/compound/DlPagination/components/PageNavigation.vue +24 -25
- package/src/components/compound/DlPagination/components/PaginationLegend.vue +2 -1
- package/src/components/compound/DlPagination/components/QuickNavigation.vue +1 -0
- package/src/components/compound/DlSearches/DlSmartSearch/DlSmartSearch.vue +86 -49
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +86 -69
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSuggestionsDropdown.vue +43 -4
- package/src/components/compound/DlSearches/DlSmartSearch/utils/highlightSyntax.ts +1 -55
- package/src/components/compound/DlSearches/DlSmartSearch/utils/index.ts +42 -10
- package/src/components/compound/DlSearches/DlSmartSearch/utils/utils.ts +107 -0
- package/src/components/compound/DlSelect/DlSelect.vue +41 -8
- package/src/components/compound/DlTable/DlTable.vue +13 -10
- package/src/components/compound/DlTable/styles/dl-table-styles.scss +16 -4
- package/src/components/compound/DlToggleButton/DlToggleButton.vue +109 -0
- package/src/components/compound/DlToggleButton/config.ts +27 -0
- package/src/components/compound/DlToggleButton/index.ts +3 -0
- package/src/components/compound/DlToggleButton/types.ts +4 -0
- package/src/components/compound/index.ts +1 -0
- package/src/components/compound/types.ts +1 -0
- package/src/components/essential/DlColorPicker/DlColorPicker.vue +4 -1
- package/src/components/essential/DlColorPicker/components/DlColors.vue +2 -6
- package/src/components/essential/DlIcon/DlIcon.vue +5 -1
- package/src/components/essential/DlMenu/DlMenu.vue +30 -2
- package/src/components/essential/DlSeparator/DlSeparator.vue +66 -0
- package/src/components/essential/DlSeparator/index.ts +2 -0
- package/src/components/essential/DlSpinner/DlSpinner.vue +53 -217
- package/src/components/essential/DlSpinner/components/DlSpinnerCircle.vue +156 -0
- package/src/components/essential/DlSpinner/components/DlSpinnerClock.vue +191 -0
- package/src/components/essential/DlSpinner/components/DlSpinnerDots.vue +225 -0
- package/src/components/essential/DlSpinner/components/DlSpinnerGrid.vue +278 -0
- package/src/components/essential/DlSpinner/components/DlSpinnerLogo.vue +264 -0
- package/src/components/essential/DlSpinner/index.ts +14 -1
- package/src/components/essential/DlSpinner/types.ts +7 -0
- package/src/components/essential/index.ts +1 -0
- package/src/components/essential/types.ts +1 -0
- package/src/components/shared/DlItemSection/DlItemSection.vue +21 -15
- package/src/components/shared/DlVirtualScroll/DlVirtualScroll.vue +36 -21
- package/src/components/shared/DlVirtualScroll/useVirtualScroll.ts +8 -10
- package/src/{demo → demos}/DlButtonDemo.vue +15 -0
- package/src/demos/DlCardDemo.vue +47 -0
- package/src/{demo → demos}/DlColorPickerDemo.vue +16 -1
- package/src/demos/DlConfusionMatrixDemo.vue +53 -0
- package/src/{demo → demos}/DlDialogBoxDemo.vue +4 -1
- package/src/demos/DlDropdownButtonDemo.vue +386 -0
- package/src/demos/DlEllipsisDemo.vue +30 -0
- package/src/{demo → demos}/DlLineChartDemo.vue +8 -8
- package/src/{demo → demos}/DlMenuDemo.vue +61 -2
- package/src/{demo → demos}/DlSearchDemo.vue +3 -2
- package/src/demos/DlSeparatorDemo.vue +44 -0
- package/src/demos/DlSpinnerDemo.vue +59 -0
- package/src/{demo → demos}/DlTableDemo.vue +117 -29
- package/src/demos/DlToggleButtonDemo.vue +55 -0
- package/src/{demo → demos}/DlTooltipDemo.vue +43 -2
- package/src/{demo → demos}/DlWidgetDemo.vue +34 -19
- package/src/{demo → demos}/SmartSearchDemo/DlSmartSearchDemo.vue +2 -50
- package/src/{demo → demos}/index.ts +14 -56
- package/src/hooks/use-arrow-navigation.ts +58 -0
- package/src/hooks/use-suggestions.ts +97 -74
- package/src/utils/colors.ts +1 -1
- package/src/utils/draggable-table.ts +2 -2
- package/src/utils/index.ts +1 -0
- package/src/utils/parse-smart-query.ts +87 -0
- package/src/components/compound/DlCharts/types.ts +0 -1
- package/src/demo/DlDropdownButtonDemo.vue +0 -260
- package/src/demo/DlSpinnerDemo.vue +0 -20
- /package/src/{demo → demos}/BarChartDemo.vue +0 -0
- /package/src/{demo → demos}/ColumnChartDemo.vue +0 -0
- /package/src/{demo → demos}/DlAccordionDemo.vue +0 -0
- /package/src/{demo → demos}/DlAlertDemo.vue +0 -0
- /package/src/{demo → demos}/DlAvatarDemo.vue +0 -0
- /package/src/{demo → demos}/DlBadgeDemo.vue +0 -0
- /package/src/{demo → demos}/DlChartDoughnutDemo.vue +0 -0
- /package/src/{demo → demos}/DlCheckboxDemo.vue +0 -0
- /package/src/{demo → demos}/DlChipDemo.vue +0 -0
- /package/src/{demo → demos}/DlCounterDemo.vue +0 -0
- /package/src/{demo → demos}/DlDateTimeRangeDemo.vue +0 -0
- /package/src/{demo → demos}/DlIconDemo.vue +0 -0
- /package/src/{demo → demos}/DlInputDemo.vue +0 -0
- /package/src/{demo → demos}/DlKpiDemo.vue +0 -0
- /package/src/{demo → demos}/DlLinkDemo.vue +0 -0
- /package/src/{demo → demos}/DlListDemo.vue +0 -0
- /package/src/{demo → demos}/DlOptionGroupDemo.vue +0 -0
- /package/src/{demo → demos}/DlPaginationDemo.vue +0 -0
- /package/src/{demo → demos}/DlPanelContainerDemo.vue +0 -0
- /package/src/{demo → demos}/DlPopupDemo.vue +0 -0
- /package/src/{demo → demos}/DlProgressBarDemo.vue +0 -0
- /package/src/{demo → demos}/DlProgressChartDemo.vue +0 -0
- /package/src/{demo → demos}/DlRadioDemo.vue +0 -0
- /package/src/{demo → demos}/DlRangeDemo.vue +0 -0
- /package/src/{demo → demos}/DlSelectDemo.vue +0 -0
- /package/src/{demo → demos}/DlSkeletonDemo.vue +0 -0
- /package/src/{demo → demos}/DlSliderDemo.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/CenteredStepperInDialogBox.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/DlStepperDemo.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/SimpleStepper.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/StepperInDialogBox.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/index.ts +0 -0
- /package/src/{demo → demos}/DlStepperDemo/steps/AssignmentsStep.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/steps/DataStep.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/steps/GeneralStep.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/steps/InstructionStep.vue +0 -0
- /package/src/{demo → demos}/DlStepperDemo/steps/QualityStep.vue +0 -0
- /package/src/{demo → demos}/DlSwitchDemo.vue +0 -0
- /package/src/{demo → demos}/DlTabsDemo.vue +0 -0
- /package/src/{demo → demos}/DlTdDemo.vue +0 -0
- /package/src/{demo → demos}/DlTextAreaDemo.vue +0 -0
- /package/src/{demo → demos}/DlTextHolderDemo.vue +0 -0
- /package/src/{demo → demos}/DlThDemo.vue +0 -0
- /package/src/{demo → demos}/DlToastDemo.vue +0 -0
- /package/src/{demo → demos}/DlTrDemo.vue +0 -0
- /package/src/{demo → demos}/DlTrendDemo.vue +0 -0
- /package/src/{demo → demos}/DlTypographyDemo.vue +0 -0
- /package/src/{demo → demos}/SmartSearchDemo/schema.ts +0 -0
|
@@ -1,117 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
id="Layer_2"
|
|
13
|
-
data-name="Layer 2"
|
|
14
|
-
viewBox="0 0 140 140"
|
|
15
|
-
>
|
|
16
|
-
<g
|
|
17
|
-
id="Layer_1-2"
|
|
18
|
-
data-name="Layer 1"
|
|
19
|
-
>
|
|
20
|
-
<path
|
|
21
|
-
class="dl-svg"
|
|
22
|
-
d="M70,0C31.33,0,0,31.33,0,70s31.33,70,70,70,70-31.33,70-70S108.67,0,70,0Zm0,131.97c-34.2,0-61.97-27.77-61.97-61.97S35.8,8.03,70,8.03s61.97,27.77,61.97,61.97-27.77,61.97-61.97,61.97Z"
|
|
23
|
-
/>
|
|
24
|
-
</g>
|
|
25
|
-
</svg>
|
|
26
|
-
</div>
|
|
27
|
-
<div
|
|
28
|
-
ref="spinColor"
|
|
29
|
-
class="spin-loader"
|
|
30
|
-
>
|
|
31
|
-
<svg
|
|
32
|
-
id="Layer_2"
|
|
33
|
-
data-name="Layer 2"
|
|
34
|
-
viewBox="0 0 140 140"
|
|
35
|
-
>
|
|
36
|
-
<defs>
|
|
37
|
-
<linearGradient
|
|
38
|
-
id="linear-gradient"
|
|
39
|
-
x1="12.53"
|
|
40
|
-
y1="229.07"
|
|
41
|
-
x2="119.46"
|
|
42
|
-
y2="229.07"
|
|
43
|
-
gradientTransform="translate(0 246.89) scale(1 -1)"
|
|
44
|
-
gradientUnits="userSpaceOnUse"
|
|
45
|
-
>
|
|
46
|
-
<stop
|
|
47
|
-
offset="0"
|
|
48
|
-
:stop-color="color"
|
|
49
|
-
stop-opacity="0"
|
|
50
|
-
/>
|
|
51
|
-
<stop
|
|
52
|
-
offset=".12"
|
|
53
|
-
:stop-color="color"
|
|
54
|
-
stop-opacity="0"
|
|
55
|
-
/>
|
|
56
|
-
<stop
|
|
57
|
-
offset=".34"
|
|
58
|
-
:stop-color="color"
|
|
59
|
-
/>
|
|
60
|
-
<stop
|
|
61
|
-
offset=".69"
|
|
62
|
-
:stop-color="color"
|
|
63
|
-
/>
|
|
64
|
-
<stop
|
|
65
|
-
offset=".91"
|
|
66
|
-
:stop-color="color"
|
|
67
|
-
stop-opacity="0"
|
|
68
|
-
/>
|
|
69
|
-
</linearGradient>
|
|
70
|
-
</defs>
|
|
71
|
-
<g
|
|
72
|
-
id="Layer_1-2"
|
|
73
|
-
data-name="Layer 1"
|
|
74
|
-
>
|
|
75
|
-
<g>
|
|
76
|
-
<path
|
|
77
|
-
class="spinner-color-bg"
|
|
78
|
-
d="M70,0C31.33,0,0,31.33,0,70s31.33,70,70,70,70-31.33,70-70S108.67,0,70,0Zm0,131.97c-34.2,0-61.97-27.77-61.97-61.97S35.8,8.03,70,8.03s61.97,27.77,61.97,61.97-27.77,61.97-61.97,61.97Z"
|
|
79
|
-
/>
|
|
80
|
-
<path
|
|
81
|
-
class="spinner-color"
|
|
82
|
-
d="M114.87,25.82c1.38-1.38,2.87-2.75,4.25-4.13,.46-.34,.46-1.03,0-1.49C106.49,7.69,89.16,0,70,0,46.36,0,25.48,11.7,12.74,29.72c-.34,.46-.23,.92,.11,1.38l4.25,4.25c.46,.46,1.15,.34,1.61-.11,11.25-16.52,29.95-27.2,51.3-27.2,16.98,0,32.25,6.77,43.49,17.79,.34,.34,1.03,.34,1.38,0Z"
|
|
83
|
-
/>
|
|
84
|
-
</g>
|
|
85
|
-
</g>
|
|
86
|
-
</svg>
|
|
87
|
-
</div>
|
|
88
|
-
<div
|
|
89
|
-
ref="dlIcon"
|
|
90
|
-
class="dl-icon"
|
|
91
|
-
>
|
|
92
|
-
<svg
|
|
93
|
-
viewBox="0 0 51 45"
|
|
94
|
-
fill="none"
|
|
95
|
-
>
|
|
96
|
-
<path
|
|
97
|
-
d="M23.2962 0.558083H0.830566V32.2536L10.1727 44.284H23.2962V38.5002H12.6195L6.39136 30.4028V6.11058H23.2962V0.558083Z"
|
|
98
|
-
:fill="iconColor"
|
|
99
|
-
/>
|
|
100
|
-
<path
|
|
101
|
-
d="M27.5224 6.11058V0.558083C33.3056 -0.137737 52.8796 3.56565 50.6553 25.0816C48.9091 41.9727 34.3436 44.901 27.5224 44.284V38.5002C41.2242 39.4256 45.0945 29.1689 45.3169 23.9249C46.2067 8.19281 33.8246 5.49365 27.5224 6.11058Z"
|
|
102
|
-
:fill="iconColor"
|
|
103
|
-
/>
|
|
104
|
-
<path
|
|
105
|
-
d="M23.2962 19.0664V13.5139H13.0643V27.3952L16.8457 31.7909H23.2962V26.2384H19.07L18.6251 25.5443V19.0664H23.2962Z"
|
|
106
|
-
:fill="iconColor"
|
|
107
|
-
/>
|
|
108
|
-
<path
|
|
109
|
-
d="M27.5224 19.0664V13.5139C31.2296 13.2054 38.644 14.5782 38.644 22.5367C38.644 30.4953 31.2296 32.0223 27.5224 31.7909V26.2384C29.3018 26.7782 33.3056 26.9038 33.3056 22.9994C33.3056 19.0664 29.5984 18.758 27.5224 19.0664Z"
|
|
110
|
-
:fill="iconColor"
|
|
111
|
-
/>
|
|
112
|
-
</svg>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
2
|
+
<div>
|
|
3
|
+
<component
|
|
4
|
+
:is="spinnerType"
|
|
5
|
+
:size="size"
|
|
6
|
+
:color="color"
|
|
7
|
+
:thickness="thickness"
|
|
8
|
+
:border-color="borderColor"
|
|
9
|
+
:icon-size="iconSize"
|
|
10
|
+
:icon-color="iconColor"
|
|
11
|
+
/>
|
|
115
12
|
<div
|
|
116
13
|
v-if="text"
|
|
117
14
|
class="spinner-text"
|
|
@@ -122,11 +19,23 @@
|
|
|
122
19
|
</div>
|
|
123
20
|
</template>
|
|
124
21
|
|
|
125
|
-
<script>
|
|
126
|
-
import { defineComponent } from 'vue-demi'
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { defineComponent, PropType } from 'vue-demi'
|
|
24
|
+
import DlSpinnerGrid from './components/DlSpinnerGrid.vue'
|
|
25
|
+
import DlSpinnerCircle from './components/DlSpinnerCircle.vue'
|
|
26
|
+
import DlSpinnerClock from './components/DlSpinnerClock.vue'
|
|
27
|
+
import DlSpinnerDots from './components/DlSpinnerDots.vue'
|
|
28
|
+
import DlSpinnerLogo from './components/DlSpinnerLogo.vue'
|
|
29
|
+
import { DlSpinnerTypes } from './types'
|
|
127
30
|
|
|
128
31
|
export default defineComponent({
|
|
129
|
-
|
|
32
|
+
components: {
|
|
33
|
+
DlSpinnerGrid,
|
|
34
|
+
DlSpinnerCircle,
|
|
35
|
+
DlSpinnerClock,
|
|
36
|
+
DlSpinnerDots,
|
|
37
|
+
DlSpinnerLogo
|
|
38
|
+
},
|
|
130
39
|
props: {
|
|
131
40
|
text: {
|
|
132
41
|
type: String,
|
|
@@ -136,17 +45,13 @@ export default defineComponent({
|
|
|
136
45
|
type: Object,
|
|
137
46
|
default: null
|
|
138
47
|
},
|
|
139
|
-
|
|
140
|
-
type: String
|
|
141
|
-
default: '
|
|
142
|
-
},
|
|
143
|
-
iconSize: {
|
|
144
|
-
type: String,
|
|
145
|
-
default: '50px'
|
|
48
|
+
type: {
|
|
49
|
+
type: String as PropType<DlSpinnerTypes>,
|
|
50
|
+
default: 'default'
|
|
146
51
|
},
|
|
147
|
-
|
|
52
|
+
size: {
|
|
148
53
|
type: String,
|
|
149
|
-
default: '
|
|
54
|
+
default: '60px'
|
|
150
55
|
},
|
|
151
56
|
color: {
|
|
152
57
|
type: String,
|
|
@@ -156,104 +61,35 @@ export default defineComponent({
|
|
|
156
61
|
type: String,
|
|
157
62
|
default: 'var(--dl-color-tooltip-background)'
|
|
158
63
|
},
|
|
159
|
-
|
|
64
|
+
iconSize: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: '25px'
|
|
67
|
+
},
|
|
68
|
+
borderColor: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: 'var(--dl-color-separator)'
|
|
71
|
+
},
|
|
72
|
+
thickness: {
|
|
160
73
|
type: String,
|
|
161
|
-
default: '
|
|
74
|
+
default: '3px'
|
|
162
75
|
}
|
|
163
76
|
},
|
|
164
77
|
computed: {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
78
|
+
spinnerType() {
|
|
79
|
+
switch (this.type.toLowerCase()) {
|
|
80
|
+
case DlSpinnerTypes.GRID:
|
|
81
|
+
return 'DlSpinnerGrid'
|
|
82
|
+
case DlSpinnerTypes.CIRCLE:
|
|
83
|
+
return 'DlSpinnerCircle'
|
|
84
|
+
case DlSpinnerTypes.DOTS:
|
|
85
|
+
return 'DlSpinnerDots'
|
|
86
|
+
case DlSpinnerTypes.CLOCK:
|
|
87
|
+
return 'DlSpinnerClock'
|
|
88
|
+
case DlSpinnerTypes.LOGO:
|
|
89
|
+
default:
|
|
90
|
+
return 'DlSpinnerLogo'
|
|
171
91
|
}
|
|
172
92
|
}
|
|
173
|
-
},
|
|
174
|
-
mounted() {
|
|
175
|
-
window.onresize = this.resizeSpinner
|
|
176
|
-
this.resizeSpinner()
|
|
177
|
-
},
|
|
178
|
-
methods: {
|
|
179
|
-
resizeSpinner() {
|
|
180
|
-
const spinColor = this.$refs.spinColor
|
|
181
|
-
const spinBg = this.$refs.spinBg
|
|
182
|
-
const icon = this.$refs.dlIcon
|
|
183
|
-
|
|
184
|
-
const info = spinBg.getBoundingClientRect()
|
|
185
|
-
const x = info.x + window.scrollX
|
|
186
|
-
const y = info.y + window.scrollY
|
|
187
|
-
|
|
188
|
-
spinColor.style.left = `${x}px`
|
|
189
|
-
spinColor.style.top = `${y}px`
|
|
190
|
-
icon.style.top = `${
|
|
191
|
-
y +
|
|
192
|
-
spinBg.offsetHeight -
|
|
193
|
-
spinBg.offsetHeight / 2 -
|
|
194
|
-
icon.offsetHeight / 2.3
|
|
195
|
-
}px`
|
|
196
|
-
icon.style.left = `${
|
|
197
|
-
x +
|
|
198
|
-
spinBg.offsetWidth -
|
|
199
|
-
spinBg.offsetWidth / 2 -
|
|
200
|
-
icon.offsetWidth / 2.3
|
|
201
|
-
}px`
|
|
202
|
-
}
|
|
203
93
|
}
|
|
204
94
|
})
|
|
205
95
|
</script>
|
|
206
|
-
|
|
207
|
-
<style scoped lang="scss">
|
|
208
|
-
.spin-loader,
|
|
209
|
-
.spin-bg {
|
|
210
|
-
width: var(--dl-spinner-size);
|
|
211
|
-
height: var(--dl-spinner-size);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.spin-loader {
|
|
215
|
-
position: absolute;
|
|
216
|
-
animation: spin var(--dl-spinner-roation-speed) linear infinite;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.dl-icon {
|
|
220
|
-
position: absolute;
|
|
221
|
-
width: var(--dl-spinner-icon-size);
|
|
222
|
-
height: var(--dl-spinner-icon-size);
|
|
223
|
-
opacity: 1;
|
|
224
|
-
animation: pulse var(--dl-spinner-roation-speed) infinite;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.dl-svg {
|
|
228
|
-
fill: var(--dl-spinner-border-color);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.spinner-color-bg {
|
|
232
|
-
fill: none;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.spinner-color {
|
|
236
|
-
fill: url(#linear-gradient);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
@keyframes spin {
|
|
240
|
-
0% {
|
|
241
|
-
transform: rotate(0deg);
|
|
242
|
-
}
|
|
243
|
-
100% {
|
|
244
|
-
transform: rotate(360deg);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
@keyframes pulse {
|
|
249
|
-
0% {
|
|
250
|
-
opacity: 1;
|
|
251
|
-
}
|
|
252
|
-
50% {
|
|
253
|
-
opacity: 0;
|
|
254
|
-
}
|
|
255
|
-
100% {
|
|
256
|
-
opacity: 1;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
</style>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="spinner-wrapper">
|
|
3
|
+
<svg
|
|
4
|
+
class="dl-spinner dl-spinner-mat"
|
|
5
|
+
:width="size"
|
|
6
|
+
:height="size"
|
|
7
|
+
viewBox="25 25 50 50"
|
|
8
|
+
>
|
|
9
|
+
<circle
|
|
10
|
+
class="spinner-path"
|
|
11
|
+
cx="50"
|
|
12
|
+
cy="50"
|
|
13
|
+
r="20"
|
|
14
|
+
fill="none"
|
|
15
|
+
:stroke="color"
|
|
16
|
+
:stroke-width="thickness"
|
|
17
|
+
stroke-miterlimit="10"
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts">
|
|
24
|
+
import { defineComponent } from 'vue-demi'
|
|
25
|
+
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
props: {
|
|
28
|
+
color: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'var(--dl-color-secondary)'
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '40px'
|
|
35
|
+
},
|
|
36
|
+
thickness: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: '5px'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style lang="scss">
|
|
45
|
+
.spinner-wrapper {
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
align-items: center;
|
|
49
|
+
}
|
|
50
|
+
.dl-spinner {
|
|
51
|
+
vertical-align: middle;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.dl-spinner-mat {
|
|
55
|
+
animation: spinCircle 2s linear infinite;
|
|
56
|
+
transform-origin: center center;
|
|
57
|
+
}
|
|
58
|
+
.spinner-path {
|
|
59
|
+
stroke-dasharray: 1, 200 #{'/* rtl:ignore */'};
|
|
60
|
+
stroke-dashoffset: 0 #{'/* rtl:ignore */'};
|
|
61
|
+
animation: dash 1.5s ease-in-out infinite;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.spinner {
|
|
65
|
+
position: relative;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.spin-loader,
|
|
69
|
+
.spin-bg {
|
|
70
|
+
width: var(--dl-spinner-size);
|
|
71
|
+
height: var(--dl-spinner-size);
|
|
72
|
+
top: 0;
|
|
73
|
+
left: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.spin-loader {
|
|
77
|
+
position: absolute;
|
|
78
|
+
animation: spin 2s linear infinite;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.dl-spinner-icon {
|
|
82
|
+
top: var(--icon-top);
|
|
83
|
+
left: var(--icon-top);
|
|
84
|
+
position: absolute;
|
|
85
|
+
width: var(--dl-spinner-icon-size);
|
|
86
|
+
height: var(--dl-spinner-icon-size);
|
|
87
|
+
opacity: 1;
|
|
88
|
+
animation: pulse 2s infinite;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.dl-svg {
|
|
92
|
+
fill: var(--dl-spinner-border-color);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.spinner-color-bg {
|
|
96
|
+
fill: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.spinner-color {
|
|
100
|
+
fill: url(#linear-gradient);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@keyframes dash {
|
|
104
|
+
0% {
|
|
105
|
+
stroke-dasharray: 1, 200;
|
|
106
|
+
stroke-dashoffset: 0;
|
|
107
|
+
}
|
|
108
|
+
50% {
|
|
109
|
+
stroke-dasharray: 89, 200;
|
|
110
|
+
stroke-dashoffset: -35px;
|
|
111
|
+
}
|
|
112
|
+
100% {
|
|
113
|
+
stroke-dasharray: 89, 200;
|
|
114
|
+
stroke-dashoffset: -124px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@keyframes spinCircle {
|
|
119
|
+
0% {
|
|
120
|
+
transform: rotate3d(0, 0, 1, 0deg) #{'/* rtl:ignore */'};
|
|
121
|
+
}
|
|
122
|
+
25% {
|
|
123
|
+
transform: rotate3d(0, 0, 1, 90deg) #{'/* rtl:ignore */'};
|
|
124
|
+
}
|
|
125
|
+
50% {
|
|
126
|
+
transform: rotate3d(0, 0, 1, 180deg) #{'/* rtl:ignore */'};
|
|
127
|
+
}
|
|
128
|
+
75% {
|
|
129
|
+
transform: rotate3d(0, 0, 1, 270deg) #{'/* rtl:ignore */'};
|
|
130
|
+
}
|
|
131
|
+
100% {
|
|
132
|
+
transform: rotate3d(0, 0, 1, 359deg) #{'/* rtl:ignore */'};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@keyframes spin {
|
|
137
|
+
0% {
|
|
138
|
+
transform: rotate(0deg);
|
|
139
|
+
}
|
|
140
|
+
100% {
|
|
141
|
+
transform: rotate(360deg);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@keyframes pulse {
|
|
146
|
+
0% {
|
|
147
|
+
opacity: 1;
|
|
148
|
+
}
|
|
149
|
+
50% {
|
|
150
|
+
opacity: 0;
|
|
151
|
+
}
|
|
152
|
+
100% {
|
|
153
|
+
opacity: 1;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
</style>
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="spinner-wrapper">
|
|
3
|
+
<svg
|
|
4
|
+
class="dl-spinner"
|
|
5
|
+
:width="size"
|
|
6
|
+
:height="size"
|
|
7
|
+
viewBox="0 0 100 100"
|
|
8
|
+
preserveAspectRatio="xMidYMid"
|
|
9
|
+
>
|
|
10
|
+
<circle
|
|
11
|
+
cx="50"
|
|
12
|
+
cy="50"
|
|
13
|
+
r="48"
|
|
14
|
+
fill="none"
|
|
15
|
+
stroke-width="4"
|
|
16
|
+
stroke-miterlimit="10"
|
|
17
|
+
:stroke="color"
|
|
18
|
+
/>
|
|
19
|
+
<line
|
|
20
|
+
stroke-linecap="round"
|
|
21
|
+
stroke-width="4"
|
|
22
|
+
stroke-miterlimit="10"
|
|
23
|
+
:stroke="color"
|
|
24
|
+
x1="50"
|
|
25
|
+
y1="50"
|
|
26
|
+
x2="85"
|
|
27
|
+
y2="50.5"
|
|
28
|
+
>
|
|
29
|
+
<animateTransform
|
|
30
|
+
attributeName="transform"
|
|
31
|
+
type="rotate"
|
|
32
|
+
from="0 50 50"
|
|
33
|
+
to="360 50 50"
|
|
34
|
+
dur="2s"
|
|
35
|
+
repeatCount="indefinite"
|
|
36
|
+
/>
|
|
37
|
+
</line>
|
|
38
|
+
|
|
39
|
+
<line
|
|
40
|
+
stroke-linecap="round"
|
|
41
|
+
stroke-width="4"
|
|
42
|
+
stroke-miterlimit="10"
|
|
43
|
+
:stroke="color"
|
|
44
|
+
x1="50"
|
|
45
|
+
y1="50"
|
|
46
|
+
x2="49.5"
|
|
47
|
+
y2="74"
|
|
48
|
+
>
|
|
49
|
+
<animateTransform
|
|
50
|
+
attributeName="transform"
|
|
51
|
+
type="rotate"
|
|
52
|
+
from="0 50 50"
|
|
53
|
+
to="360 50 50"
|
|
54
|
+
dur="15s"
|
|
55
|
+
repeatCount="indefinite"
|
|
56
|
+
/>
|
|
57
|
+
</line>
|
|
58
|
+
</svg>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script lang="ts">
|
|
63
|
+
import { defineComponent } from 'vue-demi'
|
|
64
|
+
|
|
65
|
+
export default defineComponent({
|
|
66
|
+
props: {
|
|
67
|
+
size: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: '40px'
|
|
70
|
+
},
|
|
71
|
+
color: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: 'var(--dl-color-secondary)'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style lang="scss">
|
|
80
|
+
.spinner-wrapper {
|
|
81
|
+
display: flex;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
align-items: center;
|
|
84
|
+
}
|
|
85
|
+
.dl-spinner {
|
|
86
|
+
vertical-align: middle;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.dl-spinner-mat {
|
|
90
|
+
animation: spinCircle 2s linear infinite;
|
|
91
|
+
transform-origin: center center;
|
|
92
|
+
}
|
|
93
|
+
.spinner-path {
|
|
94
|
+
stroke-dasharray: 1, 200 #{'/* rtl:ignore */'};
|
|
95
|
+
stroke-dashoffset: 0 #{'/* rtl:ignore */'};
|
|
96
|
+
animation: dash 1.5s ease-in-out infinite;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.spinner {
|
|
100
|
+
position: relative;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.spin-loader,
|
|
104
|
+
.spin-bg {
|
|
105
|
+
width: var(--dl-spinner-size);
|
|
106
|
+
height: var(--dl-spinner-size);
|
|
107
|
+
top: 0;
|
|
108
|
+
left: 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.spin-loader {
|
|
112
|
+
position: absolute;
|
|
113
|
+
animation: spin 2s linear infinite;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.dl-spinner-icon {
|
|
117
|
+
top: var(--icon-top);
|
|
118
|
+
left: var(--icon-top);
|
|
119
|
+
position: absolute;
|
|
120
|
+
width: var(--dl-spinner-icon-size);
|
|
121
|
+
height: var(--dl-spinner-icon-size);
|
|
122
|
+
opacity: 1;
|
|
123
|
+
animation: pulse 2s infinite;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.dl-svg {
|
|
127
|
+
fill: var(--dl-spinner-border-color);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.spinner-color-bg {
|
|
131
|
+
fill: none;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.spinner-color {
|
|
135
|
+
fill: url(#linear-gradient);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@keyframes dash {
|
|
139
|
+
0% {
|
|
140
|
+
stroke-dasharray: 1, 200;
|
|
141
|
+
stroke-dashoffset: 0;
|
|
142
|
+
}
|
|
143
|
+
50% {
|
|
144
|
+
stroke-dasharray: 89, 200;
|
|
145
|
+
stroke-dashoffset: -35px;
|
|
146
|
+
}
|
|
147
|
+
100% {
|
|
148
|
+
stroke-dasharray: 89, 200;
|
|
149
|
+
stroke-dashoffset: -124px;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@keyframes spinCircle {
|
|
154
|
+
0% {
|
|
155
|
+
transform: rotate3d(0, 0, 1, 0deg) #{'/* rtl:ignore */'};
|
|
156
|
+
}
|
|
157
|
+
25% {
|
|
158
|
+
transform: rotate3d(0, 0, 1, 90deg) #{'/* rtl:ignore */'};
|
|
159
|
+
}
|
|
160
|
+
50% {
|
|
161
|
+
transform: rotate3d(0, 0, 1, 180deg) #{'/* rtl:ignore */'};
|
|
162
|
+
}
|
|
163
|
+
75% {
|
|
164
|
+
transform: rotate3d(0, 0, 1, 270deg) #{'/* rtl:ignore */'};
|
|
165
|
+
}
|
|
166
|
+
100% {
|
|
167
|
+
transform: rotate3d(0, 0, 1, 359deg) #{'/* rtl:ignore */'};
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@keyframes spin {
|
|
172
|
+
0% {
|
|
173
|
+
transform: rotate(0deg);
|
|
174
|
+
}
|
|
175
|
+
100% {
|
|
176
|
+
transform: rotate(360deg);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@keyframes pulse {
|
|
181
|
+
0% {
|
|
182
|
+
opacity: 1;
|
|
183
|
+
}
|
|
184
|
+
50% {
|
|
185
|
+
opacity: 0;
|
|
186
|
+
}
|
|
187
|
+
100% {
|
|
188
|
+
opacity: 1;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
</style>
|