@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
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div style="display: flex; gap: 20px; flex-direction: column">
|
|
4
|
+
<h2>Splitted</h2>
|
|
5
|
+
<dl-dropdown-button
|
|
6
|
+
auto-close
|
|
7
|
+
outlined
|
|
8
|
+
split
|
|
9
|
+
label="Dropdown Button Outlined"
|
|
10
|
+
>
|
|
11
|
+
<dl-list>
|
|
12
|
+
<dl-list-item clickable>
|
|
13
|
+
<dl-item-section> Photos </dl-item-section>
|
|
14
|
+
</dl-list-item>
|
|
15
|
+
|
|
16
|
+
<dl-list-item clickable>
|
|
17
|
+
<dl-item-section> Videos </dl-item-section>
|
|
18
|
+
</dl-list-item>
|
|
19
|
+
|
|
20
|
+
<dl-list-item clickable>
|
|
21
|
+
<dl-item-section> Articles </dl-item-section>
|
|
22
|
+
</dl-list-item>
|
|
23
|
+
</dl-list>
|
|
24
|
+
</dl-dropdown-button>
|
|
25
|
+
|
|
26
|
+
<dl-dropdown-button
|
|
27
|
+
disabled
|
|
28
|
+
auto-close
|
|
29
|
+
outlined
|
|
30
|
+
split
|
|
31
|
+
label="Dropdown Button Outlined"
|
|
32
|
+
>
|
|
33
|
+
<dl-list>
|
|
34
|
+
<dl-list-item clickable>
|
|
35
|
+
<dl-item-section> Photos </dl-item-section>
|
|
36
|
+
</dl-list-item>
|
|
37
|
+
|
|
38
|
+
<dl-list-item clickable>
|
|
39
|
+
<dl-item-section> Videos </dl-item-section>
|
|
40
|
+
</dl-list-item>
|
|
41
|
+
|
|
42
|
+
<dl-list-item clickable>
|
|
43
|
+
<dl-item-section> Articles </dl-item-section>
|
|
44
|
+
</dl-list-item>
|
|
45
|
+
</dl-list>
|
|
46
|
+
</dl-dropdown-button>
|
|
47
|
+
|
|
48
|
+
<dl-dropdown-button
|
|
49
|
+
split
|
|
50
|
+
label="Dropdown Button Contained"
|
|
51
|
+
>
|
|
52
|
+
<dl-list>
|
|
53
|
+
<dl-list-item clickable>
|
|
54
|
+
<dl-item-section> Photos </dl-item-section>
|
|
55
|
+
</dl-list-item>
|
|
56
|
+
|
|
57
|
+
<dl-list-item clickable>
|
|
58
|
+
<dl-item-section> Videos </dl-item-section>
|
|
59
|
+
</dl-list-item>
|
|
60
|
+
|
|
61
|
+
<dl-list-item clickable>
|
|
62
|
+
<dl-item-section> Articles </dl-item-section>
|
|
63
|
+
</dl-list-item>
|
|
64
|
+
</dl-list>
|
|
65
|
+
</dl-dropdown-button>
|
|
66
|
+
|
|
67
|
+
<dl-dropdown-button
|
|
68
|
+
v-model="showing"
|
|
69
|
+
auto-close
|
|
70
|
+
split
|
|
71
|
+
:label="name"
|
|
72
|
+
main-btn-style="width: 120px"
|
|
73
|
+
@click="onClick"
|
|
74
|
+
>
|
|
75
|
+
<dl-list>
|
|
76
|
+
<dl-list-item
|
|
77
|
+
clickable
|
|
78
|
+
@click="() => onClose('Photos')"
|
|
79
|
+
>
|
|
80
|
+
<dl-item-section> Photos </dl-item-section>
|
|
81
|
+
</dl-list-item>
|
|
82
|
+
|
|
83
|
+
<dl-list-item
|
|
84
|
+
clickable
|
|
85
|
+
@click="() => onClose('Videos and long text')"
|
|
86
|
+
>
|
|
87
|
+
<dl-item-section :no-wrap="true">
|
|
88
|
+
Videos and long text ideos and long text ideos and
|
|
89
|
+
long text ideos and long text ideos and long text
|
|
90
|
+
</dl-item-section>
|
|
91
|
+
</dl-list-item>
|
|
92
|
+
|
|
93
|
+
<dl-list-item
|
|
94
|
+
clickable
|
|
95
|
+
@click="() => onClose('Articles')"
|
|
96
|
+
>
|
|
97
|
+
<dl-item-section> Articles </dl-item-section>
|
|
98
|
+
</dl-list-item>
|
|
99
|
+
</dl-list>
|
|
100
|
+
</dl-dropdown-button>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<div style="display: flex; gap: 20px; flex-direction: column">
|
|
104
|
+
<h2>One Button</h2>
|
|
105
|
+
<div
|
|
106
|
+
class="grid grid-cols-3"
|
|
107
|
+
style="column-gap: 10px"
|
|
108
|
+
>
|
|
109
|
+
<dl-dropdown-button
|
|
110
|
+
auto-close
|
|
111
|
+
outlined
|
|
112
|
+
label="Dropdown Button Outlined"
|
|
113
|
+
>
|
|
114
|
+
<dl-list>
|
|
115
|
+
<dl-list-item clickable>
|
|
116
|
+
<dl-item-section> Photos </dl-item-section>
|
|
117
|
+
</dl-list-item>
|
|
118
|
+
|
|
119
|
+
<dl-list-item clickable>
|
|
120
|
+
<dl-item-section> Videos </dl-item-section>
|
|
121
|
+
</dl-list-item>
|
|
122
|
+
|
|
123
|
+
<dl-list-item clickable>
|
|
124
|
+
<dl-item-section> Articles </dl-item-section>
|
|
125
|
+
</dl-list-item>
|
|
126
|
+
</dl-list>
|
|
127
|
+
</dl-dropdown-button>
|
|
128
|
+
|
|
129
|
+
<dl-dropdown-button
|
|
130
|
+
disabled
|
|
131
|
+
auto-close
|
|
132
|
+
outlined
|
|
133
|
+
label="Dropdown Button Outlined"
|
|
134
|
+
>
|
|
135
|
+
<dl-list>
|
|
136
|
+
<dl-list-item clickable>
|
|
137
|
+
<dl-item-section> Photos </dl-item-section>
|
|
138
|
+
</dl-list-item>
|
|
139
|
+
|
|
140
|
+
<dl-list-item clickable>
|
|
141
|
+
<dl-item-section> Videos </dl-item-section>
|
|
142
|
+
</dl-list-item>
|
|
143
|
+
|
|
144
|
+
<dl-list-item clickable>
|
|
145
|
+
<dl-item-section> Articles </dl-item-section>
|
|
146
|
+
</dl-list-item>
|
|
147
|
+
</dl-list>
|
|
148
|
+
</dl-dropdown-button>
|
|
149
|
+
|
|
150
|
+
<dl-dropdown-button
|
|
151
|
+
auto-close
|
|
152
|
+
label="Dropdown Button Contained"
|
|
153
|
+
max-height="210px"
|
|
154
|
+
>
|
|
155
|
+
<dl-list>
|
|
156
|
+
<dl-list-item clickable>
|
|
157
|
+
<dl-item-section> Photos </dl-item-section>
|
|
158
|
+
</dl-list-item>
|
|
159
|
+
|
|
160
|
+
<dl-list-item clickable>
|
|
161
|
+
<dl-item-section> Videos </dl-item-section>
|
|
162
|
+
</dl-list-item>
|
|
163
|
+
|
|
164
|
+
<dl-list-item clickable>
|
|
165
|
+
<dl-item-section> Articles </dl-item-section>
|
|
166
|
+
</dl-list-item>
|
|
167
|
+
<dl-list-item clickable>
|
|
168
|
+
<dl-item-section> Photos </dl-item-section>
|
|
169
|
+
</dl-list-item>
|
|
170
|
+
|
|
171
|
+
<dl-list-item clickable>
|
|
172
|
+
<dl-item-section> Videos </dl-item-section>
|
|
173
|
+
</dl-list-item>
|
|
174
|
+
|
|
175
|
+
<dl-list-item clickable>
|
|
176
|
+
<dl-item-section> Articles </dl-item-section>
|
|
177
|
+
</dl-list-item>
|
|
178
|
+
<dl-list-item clickable>
|
|
179
|
+
<dl-item-section> Photos </dl-item-section>
|
|
180
|
+
</dl-list-item>
|
|
181
|
+
|
|
182
|
+
<dl-list-item clickable>
|
|
183
|
+
<dl-item-section> Videos </dl-item-section>
|
|
184
|
+
</dl-list-item>
|
|
185
|
+
|
|
186
|
+
<dl-list-item clickable>
|
|
187
|
+
<dl-item-section> Articles </dl-item-section>
|
|
188
|
+
</dl-list-item>
|
|
189
|
+
</dl-list>
|
|
190
|
+
</dl-dropdown-button>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<div
|
|
194
|
+
class="grid grid-cols-3"
|
|
195
|
+
style="column-gap: 10px"
|
|
196
|
+
>
|
|
197
|
+
<dl-dropdown-button
|
|
198
|
+
auto-close
|
|
199
|
+
:model-value="showing"
|
|
200
|
+
:label="name"
|
|
201
|
+
main-btn-style="width: 150px;"
|
|
202
|
+
@show="onOpen"
|
|
203
|
+
>
|
|
204
|
+
<dl-list>
|
|
205
|
+
<dl-list-item
|
|
206
|
+
clickable
|
|
207
|
+
@click="() => onClose('Photos')"
|
|
208
|
+
>
|
|
209
|
+
<dl-item-section> Photos </dl-item-section>
|
|
210
|
+
</dl-list-item>
|
|
211
|
+
|
|
212
|
+
<dl-list-item
|
|
213
|
+
clickable
|
|
214
|
+
@click="() => onClose('Videos and long text')"
|
|
215
|
+
>
|
|
216
|
+
<dl-item-section>
|
|
217
|
+
Videos and long text
|
|
218
|
+
</dl-item-section>
|
|
219
|
+
</dl-list-item>
|
|
220
|
+
<dl-list-item
|
|
221
|
+
clickable
|
|
222
|
+
@click="() => onClose('Movies and long text')"
|
|
223
|
+
>
|
|
224
|
+
<dl-item-section>
|
|
225
|
+
Movies and long text
|
|
226
|
+
</dl-item-section>
|
|
227
|
+
</dl-list-item>
|
|
228
|
+
|
|
229
|
+
<dl-list-item
|
|
230
|
+
clickable
|
|
231
|
+
@click="() => onClose('Articles')"
|
|
232
|
+
>
|
|
233
|
+
<dl-item-section> Articles </dl-item-section>
|
|
234
|
+
</dl-list-item>
|
|
235
|
+
</dl-list>
|
|
236
|
+
</dl-dropdown-button>
|
|
237
|
+
|
|
238
|
+
<dl-dropdown-button
|
|
239
|
+
auto-close
|
|
240
|
+
:model-value="showing"
|
|
241
|
+
label="Ellipsis for very long text"
|
|
242
|
+
main-btn-style="width: 150px;"
|
|
243
|
+
:overflow="true"
|
|
244
|
+
:no-wrap="true"
|
|
245
|
+
tooltip="Tooltip message"
|
|
246
|
+
@show="onOpen"
|
|
247
|
+
>
|
|
248
|
+
<dl-list>
|
|
249
|
+
<dl-list-item
|
|
250
|
+
clickable
|
|
251
|
+
@click="() => onClose('Photos')"
|
|
252
|
+
>
|
|
253
|
+
<dl-item-section> Photos </dl-item-section>
|
|
254
|
+
</dl-list-item>
|
|
255
|
+
|
|
256
|
+
<dl-list-item
|
|
257
|
+
clickable
|
|
258
|
+
@click="() => onClose('Videos and long text')"
|
|
259
|
+
>
|
|
260
|
+
<dl-item-section :no-wrap="true">
|
|
261
|
+
<dl-ellipsis
|
|
262
|
+
text="Very very very very long long long long text text text"
|
|
263
|
+
:middle-ellipsis="true"
|
|
264
|
+
/>
|
|
265
|
+
</dl-item-section>
|
|
266
|
+
</dl-list-item>
|
|
267
|
+
<dl-list-item
|
|
268
|
+
clickable
|
|
269
|
+
@click="() => onClose('Movies and long text')"
|
|
270
|
+
>
|
|
271
|
+
<dl-item-section :no-wrap="true">
|
|
272
|
+
<dl-ellipsis
|
|
273
|
+
text="Very very very very long long long long text text text"
|
|
274
|
+
/>
|
|
275
|
+
</dl-item-section>
|
|
276
|
+
</dl-list-item>
|
|
277
|
+
|
|
278
|
+
<dl-list-item
|
|
279
|
+
clickable
|
|
280
|
+
@click="() => onClose('Articles')"
|
|
281
|
+
>
|
|
282
|
+
<dl-item-section> Articles </dl-item-section>
|
|
283
|
+
</dl-list-item>
|
|
284
|
+
</dl-list>
|
|
285
|
+
</dl-dropdown-button>
|
|
286
|
+
|
|
287
|
+
<dl-dropdown-button
|
|
288
|
+
auto-close
|
|
289
|
+
:model-value="showing"
|
|
290
|
+
:label="arrowNavigationLabel"
|
|
291
|
+
main-btn-style="width: 150px;"
|
|
292
|
+
:overflow="true"
|
|
293
|
+
:no-wrap="true"
|
|
294
|
+
tooltip="Tooltip message"
|
|
295
|
+
:arrow-nav-items="listItems"
|
|
296
|
+
@show="onOpen"
|
|
297
|
+
@highlightedIndex="setHighlightedIndex"
|
|
298
|
+
@handleSelectedItem="handleSelectedItem"
|
|
299
|
+
>
|
|
300
|
+
<dl-list>
|
|
301
|
+
<dl-list-item
|
|
302
|
+
v-for="(item, index) in listItems"
|
|
303
|
+
:key="index"
|
|
304
|
+
clickable
|
|
305
|
+
:is-highlighted="index === highlightedIndex"
|
|
306
|
+
>
|
|
307
|
+
<dl-item-section>
|
|
308
|
+
{{ item }}
|
|
309
|
+
</dl-item-section>
|
|
310
|
+
</dl-list-item>
|
|
311
|
+
</dl-list>
|
|
312
|
+
</dl-dropdown-button>
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
</div>
|
|
316
|
+
</template>
|
|
317
|
+
|
|
318
|
+
<script lang="ts">
|
|
319
|
+
import { defineComponent, ref } from 'vue-demi'
|
|
320
|
+
import {
|
|
321
|
+
DlListItem,
|
|
322
|
+
DlItemSection,
|
|
323
|
+
DlList,
|
|
324
|
+
DlDropdownButton,
|
|
325
|
+
DlEllipsis
|
|
326
|
+
} from '../components'
|
|
327
|
+
|
|
328
|
+
export default defineComponent({
|
|
329
|
+
name: 'DlDropdownButtonDemo',
|
|
330
|
+
components: {
|
|
331
|
+
DlListItem,
|
|
332
|
+
DlItemSection,
|
|
333
|
+
DlList,
|
|
334
|
+
DlDropdownButton,
|
|
335
|
+
DlEllipsis
|
|
336
|
+
},
|
|
337
|
+
setup() {
|
|
338
|
+
const highlightedIndex = ref(-1)
|
|
339
|
+
const name = ref('Dropdown Button Controlled')
|
|
340
|
+
const showing = ref(false)
|
|
341
|
+
const arrowNavigationLabel = ref('Arrow Navigation Label')
|
|
342
|
+
|
|
343
|
+
const listItems = ref([
|
|
344
|
+
'New tab',
|
|
345
|
+
'New incognito tab',
|
|
346
|
+
'Recent tabs',
|
|
347
|
+
'History',
|
|
348
|
+
'Downloads',
|
|
349
|
+
'Settings',
|
|
350
|
+
'Help & Feedback'
|
|
351
|
+
])
|
|
352
|
+
|
|
353
|
+
const handleSelectedItem = (value: any) => {
|
|
354
|
+
arrowNavigationLabel.value = value
|
|
355
|
+
showing.value = false
|
|
356
|
+
}
|
|
357
|
+
const onClose = (newName: string) => {
|
|
358
|
+
name.value = newName
|
|
359
|
+
showing.value = false
|
|
360
|
+
alert(name.value)
|
|
361
|
+
}
|
|
362
|
+
const onOpen = () => {
|
|
363
|
+
showing.value = true
|
|
364
|
+
}
|
|
365
|
+
const onClick = () => {
|
|
366
|
+
alert(name.value)
|
|
367
|
+
}
|
|
368
|
+
const setHighlightedIndex = (value: number) => {
|
|
369
|
+
highlightedIndex.value = value
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
return {
|
|
373
|
+
listItems,
|
|
374
|
+
onClose,
|
|
375
|
+
onOpen,
|
|
376
|
+
onClick,
|
|
377
|
+
name,
|
|
378
|
+
showing,
|
|
379
|
+
setHighlightedIndex,
|
|
380
|
+
handleSelectedItem,
|
|
381
|
+
highlightedIndex,
|
|
382
|
+
arrowNavigationLabel
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
})
|
|
386
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="width: 90%">
|
|
3
|
+
<div style="white-space: nowrap; width: 350px">
|
|
4
|
+
<p style="font-weight: bold">
|
|
5
|
+
Ellipsis at the end
|
|
6
|
+
</p>
|
|
7
|
+
<dl-ellipsis
|
|
8
|
+
text="Lorem ipsum dolor sit amet consectetur adipisicing elit."
|
|
9
|
+
/>
|
|
10
|
+
</div>
|
|
11
|
+
<div style="white-space: nowrap; width: 350px">
|
|
12
|
+
<p style="font-weight: bold">
|
|
13
|
+
Ellipsis at the middle
|
|
14
|
+
</p>
|
|
15
|
+
<dl-ellipsis
|
|
16
|
+
text="Lorem ipsum dolor sit amet consectetur adipisicing elit. "
|
|
17
|
+
middle-ellipsis="true"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script lang="ts">
|
|
24
|
+
import { defineComponent } from 'vue-demi'
|
|
25
|
+
import { DlEllipsis } from '../components'
|
|
26
|
+
|
|
27
|
+
export default defineComponent({
|
|
28
|
+
components: { DlEllipsis }
|
|
29
|
+
})
|
|
30
|
+
</script>
|
|
@@ -282,29 +282,29 @@ const data = {
|
|
|
282
282
|
datasets: [
|
|
283
283
|
{
|
|
284
284
|
label: 'Discarded',
|
|
285
|
-
backgroundColor: '--dl-color-
|
|
286
|
-
borderColor: '--dl-color-
|
|
285
|
+
backgroundColor: '--dl-color-chart-7',
|
|
286
|
+
borderColor: '--dl-color-chart-7',
|
|
287
287
|
pointRadius: 4,
|
|
288
288
|
data: randomIntFromInterval(0, 4)
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
label: 'Undiscarded',
|
|
292
|
-
backgroundColor: '--dl-color-
|
|
293
|
-
borderColor: '--dl-color-
|
|
292
|
+
backgroundColor: '--dl-color-chart-1',
|
|
293
|
+
borderColor: '--dl-color-chart-1',
|
|
294
294
|
pointRadius: 4,
|
|
295
295
|
data: randomIntFromInterval(2, 6)
|
|
296
296
|
},
|
|
297
297
|
{
|
|
298
298
|
label: 'Completed',
|
|
299
|
-
backgroundColor: '--dl-color-
|
|
300
|
-
borderColor: '--dl-color-
|
|
299
|
+
backgroundColor: '--dl-color-chart-14',
|
|
300
|
+
borderColor: '--dl-color-chart-14',
|
|
301
301
|
pointRadius: 4,
|
|
302
302
|
data: randomIntFromInterval(1, 5)
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
305
|
label: 'Uncompleted',
|
|
306
|
-
backgroundColor: '--dl-color-
|
|
307
|
-
borderColor: '--dl-color-
|
|
306
|
+
backgroundColor: '--dl-color-secondary',
|
|
307
|
+
borderColor: '--dl-color-secondary',
|
|
308
308
|
pointRadius: 4,
|
|
309
309
|
data: randomIntFromInterval(0, 5)
|
|
310
310
|
}
|
|
@@ -486,6 +486,27 @@
|
|
|
486
486
|
</dl-list>
|
|
487
487
|
</dl-menu>
|
|
488
488
|
</dl-button>
|
|
489
|
+
|
|
490
|
+
<h4>Arrow navigation</h4>
|
|
491
|
+
<dl-button :label="arrowNavigationLabel">
|
|
492
|
+
<dl-menu
|
|
493
|
+
@show="onShow"
|
|
494
|
+
@hide="onHide"
|
|
495
|
+
>
|
|
496
|
+
<dl-list style="min-width: 100px">
|
|
497
|
+
<dl-list-item
|
|
498
|
+
v-for="(item, index) in listItems"
|
|
499
|
+
:key="index"
|
|
500
|
+
clickable
|
|
501
|
+
:is-highlighted="index === highlightedIndex"
|
|
502
|
+
>
|
|
503
|
+
<dl-item-section>
|
|
504
|
+
{{ item }}
|
|
505
|
+
</dl-item-section>
|
|
506
|
+
</dl-list-item>
|
|
507
|
+
</dl-list>
|
|
508
|
+
</dl-menu>
|
|
509
|
+
</dl-button>
|
|
489
510
|
</div>
|
|
490
511
|
</div>
|
|
491
512
|
</div>
|
|
@@ -500,7 +521,8 @@ import {
|
|
|
500
521
|
DlList,
|
|
501
522
|
DlMenu
|
|
502
523
|
} from '../components'
|
|
503
|
-
import { defineComponent, onMounted, ref } from 'vue-demi'
|
|
524
|
+
import { defineComponent, onMounted, ref, watch } from 'vue-demi'
|
|
525
|
+
import { useArrowNavigation } from '../hooks/use-arrow-navigation'
|
|
504
526
|
|
|
505
527
|
export default defineComponent({
|
|
506
528
|
name: 'DlMenuDemo',
|
|
@@ -514,11 +536,48 @@ export default defineComponent({
|
|
|
514
536
|
},
|
|
515
537
|
setup() {
|
|
516
538
|
const showing = ref(false)
|
|
539
|
+
const isMenuOpen = ref(false)
|
|
540
|
+
const arrowNavigationLabel = ref('Arrow Navigation Label')
|
|
541
|
+
|
|
542
|
+
const listItems = ref([
|
|
543
|
+
'New tab',
|
|
544
|
+
'New incognito tab',
|
|
545
|
+
'Recent tabs',
|
|
546
|
+
'History',
|
|
547
|
+
'Downloads',
|
|
548
|
+
'Settings',
|
|
549
|
+
'Help & Feedback'
|
|
550
|
+
])
|
|
551
|
+
|
|
552
|
+
const onShow = (value: any) => {
|
|
553
|
+
isMenuOpen.value = !!value
|
|
554
|
+
}
|
|
555
|
+
const onHide = (value: any) => {
|
|
556
|
+
isMenuOpen.value = !value
|
|
557
|
+
}
|
|
558
|
+
const { selectedItem, highlightedIndex } = useArrowNavigation(
|
|
559
|
+
listItems,
|
|
560
|
+
isMenuOpen
|
|
561
|
+
)
|
|
562
|
+
|
|
563
|
+
watch(selectedItem, (value: string) => {
|
|
564
|
+
arrowNavigationLabel.value = value
|
|
565
|
+
})
|
|
566
|
+
|
|
517
567
|
onMounted(() => {
|
|
518
568
|
// @ts-ignore
|
|
519
569
|
window.menuDemo = { showing }
|
|
520
570
|
})
|
|
521
|
-
return {
|
|
571
|
+
return {
|
|
572
|
+
showing,
|
|
573
|
+
listItems,
|
|
574
|
+
onShow,
|
|
575
|
+
onHide,
|
|
576
|
+
isMenuOpen,
|
|
577
|
+
selectedItem,
|
|
578
|
+
highlightedIndex,
|
|
579
|
+
arrowNavigationLabel
|
|
580
|
+
}
|
|
522
581
|
}
|
|
523
582
|
})
|
|
524
583
|
</script>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
with-search-btn
|
|
7
7
|
highlight-matches
|
|
8
8
|
placeholder="Search here"
|
|
9
|
-
:auto-suggest-items="
|
|
9
|
+
:auto-suggest-items="suggestItems"
|
|
10
10
|
/>
|
|
11
11
|
</div>
|
|
12
12
|
</template>
|
|
@@ -21,7 +21,8 @@ export default defineComponent({
|
|
|
21
21
|
},
|
|
22
22
|
setup() {
|
|
23
23
|
const searchValue = ref<string>('')
|
|
24
|
-
|
|
24
|
+
const suggestItems = ['foo', 'foo bar', 'bar', 'bar foo']
|
|
25
|
+
return { searchValue, suggestItems }
|
|
25
26
|
}
|
|
26
27
|
})
|
|
27
28
|
</script>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div style="display: flex">
|
|
4
|
+
<p>
|
|
5
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas
|
|
6
|
+
eos amet, nobis unde animi atque itaque? Provident suscipit enim
|
|
7
|
+
eos sequi dolor minima optio tempora error tenetur, autem
|
|
8
|
+
ratione cumque!
|
|
9
|
+
</p>
|
|
10
|
+
<DlSeparator type="vertical" />
|
|
11
|
+
<p>
|
|
12
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas
|
|
13
|
+
eos amet, nobis unde animi atque itaque? Provident suscipit enim
|
|
14
|
+
eos sequi dolor minima optio tempora error tenetur, autem
|
|
15
|
+
ratione cumque!
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
<div>
|
|
19
|
+
<p>
|
|
20
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas
|
|
21
|
+
eos amet, nobis unde animi atque itaque? Provident suscipit enim
|
|
22
|
+
eos sequi dolor minima optio tempora error tenetur, autem
|
|
23
|
+
ratione cumque!
|
|
24
|
+
</p>
|
|
25
|
+
<DlSeparator width="100%" />
|
|
26
|
+
<p>
|
|
27
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas
|
|
28
|
+
eos amet, nobis unde animi atque itaque? Provident suscipit enim
|
|
29
|
+
eos sequi dolor minima optio tempora error tenetur, autem
|
|
30
|
+
ratione cumque!
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
import { defineComponent } from 'vue-demi'
|
|
38
|
+
import { DlSeparator } from '../components'
|
|
39
|
+
|
|
40
|
+
export default defineComponent({
|
|
41
|
+
name: 'DlSeparatorDemo',
|
|
42
|
+
components: { DlSeparator }
|
|
43
|
+
})
|
|
44
|
+
</script>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="spinner-dl">
|
|
3
|
+
<div class="spinner-container">
|
|
4
|
+
<span class="spinner-title">Dl Spinner</span>
|
|
5
|
+
<dl-spinner
|
|
6
|
+
type="default"
|
|
7
|
+
text="Loading..."
|
|
8
|
+
:text-styles="{
|
|
9
|
+
fontSize: '1em',
|
|
10
|
+
marginTop: '15px',
|
|
11
|
+
marginLeft: '10px'
|
|
12
|
+
}"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="spinner-container">
|
|
17
|
+
<span class="spinner-title">Circle Spinner</span>
|
|
18
|
+
<dl-spinner type="circle" />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="spinner-container">
|
|
22
|
+
<span class="spinner-title">Grid Spinner</span>
|
|
23
|
+
<dl-spinner type="grid" />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="spinner-container">
|
|
27
|
+
<span class="spinner-title">Dots Spinner</span>
|
|
28
|
+
<dl-spinner type="dots" />
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="spinner-container">
|
|
32
|
+
<span class="spinner-title">Clock Spinner</span>
|
|
33
|
+
<dl-spinner type="clock" />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
import { defineComponent } from 'vue-demi'
|
|
40
|
+
import { DlSpinner } from '../components'
|
|
41
|
+
|
|
42
|
+
export default defineComponent({
|
|
43
|
+
components: {
|
|
44
|
+
DlSpinner
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style lang="scss">
|
|
50
|
+
.spinner-container {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
align-items: center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.spinner-title {
|
|
57
|
+
margin-bottom: 20px;
|
|
58
|
+
}
|
|
59
|
+
</style>
|