sprintify-ui 0.2.0 → 0.2.3
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/README.md +16 -0
- package/dist/sprintify-ui.es.js +4984 -4707
- package/dist/style.css +1 -1
- package/dist/types/src/components/BaseDatePicker.vue.d.ts +0 -1
- package/dist/types/src/components/BasePWAPrompt.vue.d.ts +46 -0
- package/dist/types/src/components/index.d.ts +4 -1
- package/dist/types/src/index.d.ts +10 -0
- package/package.json +2 -4
- package/src/assets/flatpickr.css +238 -0
- package/src/assets/main.css +4 -3
- package/src/components/BaseActionItem.vue +9 -4
- package/src/components/BaseActionItemButton.vue +1 -1
- package/src/components/BaseAddressForm.vue +6 -5
- package/src/components/BaseAlert.vue +8 -2
- package/src/components/BaseAppNotifications.vue +4 -1
- package/src/components/BaseAutocomplete.vue +18 -9
- package/src/components/BaseAutocompleteDrawer.vue +28 -10
- package/src/components/BaseAutocompleteFetch.vue +14 -3
- package/src/components/BaseAvatar.vue +1 -1
- package/src/components/BaseBadge.vue +1 -2
- package/src/components/BaseBelongsTo.vue +12 -3
- package/src/components/BaseBreadcrumbs.vue +8 -2
- package/src/components/BaseButton.vue +9 -2
- package/src/components/BaseButtonGroup.vue +4 -1
- package/src/components/BaseCharacterCounter.vue +4 -1
- package/src/components/BaseClickOutside.vue +1 -1
- package/src/components/BaseClipboard.vue +5 -2
- package/src/components/BaseColor.vue +4 -1
- package/src/components/BaseCropper.vue +17 -5
- package/src/components/BaseCropperModal.vue +4 -1
- package/src/components/BaseDataIterator.vue +29 -11
- package/src/components/BaseDataIteratorSectionBox.vue +5 -2
- package/src/components/BaseDataIteratorSectionButton.vue +6 -4
- package/src/components/BaseDataIteratorSectionColumns.vue +5 -2
- package/src/components/BaseDataTable.vue +43 -20
- package/src/components/BaseDataTableRowAction.vue +8 -2
- package/src/components/BaseDatePicker.vue +9 -102
- package/src/components/BaseDateSelect.vue +33 -6
- package/src/components/BaseDisplayRelativeTime.vue +4 -1
- package/src/components/BaseDraggable.vue +1 -1
- package/src/components/BaseDropdown.vue +16 -5
- package/src/components/BaseDropdownAutocomplete.vue +8 -4
- package/src/components/BaseField.vue +5 -2
- package/src/components/BaseFieldI18n.vue +10 -2
- package/src/components/BaseFilePicker.vue +6 -2
- package/src/components/BaseFilePickerCrop.vue +4 -1
- package/src/components/BaseForm.vue +9 -2
- package/src/components/BaseHasMany.vue +16 -4
- package/src/components/BaseHeader.vue +4 -1
- package/src/components/BaseIconPicker.vue +14 -4
- package/src/components/BaseInput.vue +10 -7
- package/src/components/BaseInputError.vue +1 -1
- package/src/components/BaseInputLabel.vue +4 -1
- package/src/components/BaseInputPercent.vue +1 -1
- package/src/components/BaseLayoutNotificationDropdown.vue +11 -5
- package/src/components/BaseLayoutNotificationItem.vue +15 -5
- package/src/components/BaseLayoutNotificationItemContent.vue +5 -2
- package/src/components/BaseLayoutSidebar.vue +22 -5
- package/src/components/BaseLayoutSidebarConfigurable.vue +19 -5
- package/src/components/BaseLayoutStackedConfigurable.vue +24 -7
- package/src/components/BaseMediaGallery.vue +4 -1
- package/src/components/BaseMediaGalleryItem.vue +13 -4
- package/src/components/BaseMediaItem.vue +12 -3
- package/src/components/BaseMediaLibrary.vue +10 -5
- package/src/components/BaseMediaList.vue +1 -1
- package/src/components/BaseMediaListItem.vue +15 -6
- package/src/components/BaseMediaPictures.vue +1 -1
- package/src/components/BaseMediaPicturesItem.vue +9 -3
- package/src/components/BaseMediaPreview.vue +2 -2
- package/src/components/BaseMenu.vue +37 -9
- package/src/components/BaseMenuItem.vue +14 -3
- package/src/components/BaseModalCenter.vue +4 -1
- package/src/components/BaseNavbarItemContent.vue +14 -3
- package/src/components/BaseNavbarSideItem.vue +4 -1
- package/src/components/BaseNavbarSideItemContent.vue +9 -2
- package/src/components/BaseNumber.vue +7 -4
- package/src/components/BasePWAPrompt.stories.js +51 -0
- package/src/components/BasePWAPrompt.vue +107 -0
- package/src/components/BasePagination.vue +2 -2
- package/src/components/BasePanel.vue +4 -1
- package/src/components/BasePassword.vue +6 -2
- package/src/components/BaseProgressCircle.vue +4 -1
- package/src/components/BaseRadioGroup.vue +5 -2
- package/src/components/BaseRichText.vue +1 -2
- package/src/components/BaseSelect.vue +6 -2
- package/src/components/BaseShortcut.vue +11 -4
- package/src/components/BaseSideNavigation.vue +4 -1
- package/src/components/BaseSideNavigationItem.vue +5 -2
- package/src/components/BaseSkeleton.vue +2 -2
- package/src/components/BaseStatistic.vue +15 -4
- package/src/components/BaseStepper.vue +4 -1
- package/src/components/BaseSwitch.stories.js +0 -1
- package/src/components/BaseSwitch.vue +8 -2
- package/src/components/BaseSystemAlert.vue +4 -1
- package/src/components/BaseTabItem.vue +5 -2
- package/src/components/BaseTable.vue +19 -9
- package/src/components/BaseTagAutocomplete.vue +13 -4
- package/src/components/BaseTagAutocompleteFetch.vue +18 -4
- package/src/components/BaseTextareaAutoresize.vue +6 -2
- package/src/components/BaseTimeline.vue +8 -2
- package/src/components/index.ts +6 -0
- package/src/lang/en.json +5 -0
- package/src/lang/fr.json +5 -0
- package/src/svg/BaseEmptyState.vue +5 -1
- package/src/svg/BaseSpinnerLarge.vue +15 -3
- package/src/svg/BaseSpinnerSmall.vue +8 -2
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
@import 'flatpickr/dist/flatpickr.min.css';
|
|
2
|
+
|
|
3
|
+
/* Customise flatpickr */
|
|
4
|
+
* {
|
|
5
|
+
--calendarPadding: 10px;
|
|
6
|
+
--daySize: 36px;
|
|
7
|
+
--daysWidth: calc(var(--daySize)*7);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@keyframes fpFadeInDown {
|
|
11
|
+
from {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
transform: translate3d(0, -8px, 0);
|
|
14
|
+
}
|
|
15
|
+
to {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
transform: translate3d(0, 0, 0);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.flatpickr-calendar {
|
|
22
|
+
border: inherit;
|
|
23
|
+
@apply bg-white dark:bg-slate-800 rounded shadow-lg border border-slate-200 dark:border-slate-700 left-1/2;
|
|
24
|
+
padding: var(--calendarPadding);
|
|
25
|
+
width: calc(var(--daysWidth) + calc(var(--calendarPadding)*2));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@screen lg {
|
|
29
|
+
.flatpickr-calendar {
|
|
30
|
+
@apply left-0 right-auto;
|
|
31
|
+
margin-left: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.flatpickr-right.flatpickr-calendar {
|
|
36
|
+
@apply right-0 left-auto;
|
|
37
|
+
margin-left: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.flatpickr-calendar.animate.open {
|
|
41
|
+
animation: fpFadeInDown 200ms ease-out;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.flatpickr-calendar.static {
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: calc(100% + 4px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.flatpickr-calendar.static.open {
|
|
50
|
+
z-index: 20;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.flatpickr-days {
|
|
54
|
+
width: var(--daysWidth);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dayContainer {
|
|
58
|
+
width: var(--daysWidth);
|
|
59
|
+
min-width: var(--daysWidth);
|
|
60
|
+
max-width: var(--daysWidth);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.flatpickr-day {
|
|
64
|
+
@apply bg-slate-50 dark:bg-slate-700/20 text-sm font-medium text-slate-600 dark:text-slate-100;
|
|
65
|
+
max-width: var(--daySize);
|
|
66
|
+
height: var(--daySize);
|
|
67
|
+
line-height: var(--daySize);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.flatpickr-day,
|
|
71
|
+
.flatpickr-day.prevMonthDay,
|
|
72
|
+
.flatpickr-day.nextMonthDay {
|
|
73
|
+
border: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.flatpickr-day.flatpickr-disabled,
|
|
77
|
+
.flatpickr-day.flatpickr-disabled:hover,
|
|
78
|
+
.flatpickr-day.prevMonthDay,
|
|
79
|
+
.flatpickr-day.nextMonthDay,
|
|
80
|
+
.flatpickr-day.notAllowed,
|
|
81
|
+
.flatpickr-day.notAllowed.prevMonthDay,
|
|
82
|
+
.flatpickr-day.notAllowed.nextMonthDay {
|
|
83
|
+
@apply bg-transparent;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.flatpickr-day,
|
|
87
|
+
.flatpickr-day.prevMonthDay,
|
|
88
|
+
.flatpickr-day.nextMonthDay,
|
|
89
|
+
.flatpickr-day.selected.startRange,
|
|
90
|
+
.flatpickr-day.startRange.startRange,
|
|
91
|
+
.flatpickr-day.endRange.startRange,
|
|
92
|
+
.flatpickr-day.selected.endRange,
|
|
93
|
+
.flatpickr-day.startRange.endRange,
|
|
94
|
+
.flatpickr-day.endRange.endRange,
|
|
95
|
+
.flatpickr-day.selected.startRange.endRange,
|
|
96
|
+
.flatpickr-day.startRange.startRange.endRange,
|
|
97
|
+
.flatpickr-day.endRange.startRange.endRange {
|
|
98
|
+
border-radius: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.flatpickr-day.flatpickr-disabled,
|
|
102
|
+
.flatpickr-day.flatpickr-disabled:hover,
|
|
103
|
+
.flatpickr-day.prevMonthDay,
|
|
104
|
+
.flatpickr-day.nextMonthDay,
|
|
105
|
+
.flatpickr-day.notAllowed,
|
|
106
|
+
.flatpickr-day.notAllowed.prevMonthDay,
|
|
107
|
+
.flatpickr-day.notAllowed.nextMonthDay {
|
|
108
|
+
@apply text-slate-400 dark:text-slate-500;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.rangeMode .flatpickr-day {
|
|
112
|
+
margin: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.flatpickr-day.selected,
|
|
116
|
+
.flatpickr-day.startRange,
|
|
117
|
+
.flatpickr-day.endRange,
|
|
118
|
+
.flatpickr-day.selected.inRange,
|
|
119
|
+
.flatpickr-day.startRange.inRange,
|
|
120
|
+
.flatpickr-day.endRange.inRange,
|
|
121
|
+
.flatpickr-day.selected:focus,
|
|
122
|
+
.flatpickr-day.startRange:focus,
|
|
123
|
+
.flatpickr-day.endRange:focus,
|
|
124
|
+
.flatpickr-day.selected:hover,
|
|
125
|
+
.flatpickr-day.startRange:hover,
|
|
126
|
+
.flatpickr-day.endRange:hover,
|
|
127
|
+
.flatpickr-day.selected.prevMonthDay,
|
|
128
|
+
.flatpickr-day.startRange.prevMonthDay,
|
|
129
|
+
.flatpickr-day.endRange.prevMonthDay,
|
|
130
|
+
.flatpickr-day.selected.nextMonthDay,
|
|
131
|
+
.flatpickr-day.startRange.nextMonthDay,
|
|
132
|
+
.flatpickr-day.endRange.nextMonthDay {
|
|
133
|
+
@apply bg-primary-500 text-primary-50;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.flatpickr-day.inRange,
|
|
137
|
+
.flatpickr-day.prevMonthDay.inRange,
|
|
138
|
+
.flatpickr-day.nextMonthDay.inRange,
|
|
139
|
+
.flatpickr-day.today.inRange,
|
|
140
|
+
.flatpickr-day.prevMonthDay.today.inRange,
|
|
141
|
+
.flatpickr-day.nextMonthDay.today.inRange,
|
|
142
|
+
.flatpickr-day:hover,
|
|
143
|
+
.flatpickr-day.prevMonthDay:hover,
|
|
144
|
+
.flatpickr-day.nextMonthDay:hover,
|
|
145
|
+
.flatpickr-day:focus,
|
|
146
|
+
.flatpickr-day.prevMonthDay:focus,
|
|
147
|
+
.flatpickr-day.nextMonthDay:focus,
|
|
148
|
+
.flatpickr-day.today:hover,
|
|
149
|
+
.flatpickr-day.today:focus {
|
|
150
|
+
@apply bg-primary-400 text-primary-50;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.flatpickr-day.inRange,
|
|
154
|
+
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
|
|
155
|
+
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
|
|
156
|
+
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
|
|
157
|
+
box-shadow: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.flatpickr-months {
|
|
161
|
+
align-items: center;
|
|
162
|
+
margin-top: -8px;
|
|
163
|
+
margin-bottom: 6px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.flatpickr-months .flatpickr-prev-month,
|
|
167
|
+
.flatpickr-months .flatpickr-next-month {
|
|
168
|
+
position: static;
|
|
169
|
+
height: auto;
|
|
170
|
+
@apply text-slate-600 hover:text-slate-900 dark:text-slate-500 dark:hover:text-slate-300;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.flatpickr-months .flatpickr-prev-month svg,
|
|
174
|
+
.flatpickr-months .flatpickr-next-month svg {
|
|
175
|
+
width: 7px;
|
|
176
|
+
height: 11px;
|
|
177
|
+
fill: currentColor;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.flatpickr-months .flatpickr-prev-month:hover svg,
|
|
181
|
+
.flatpickr-months .flatpickr-next-month:hover svg {
|
|
182
|
+
@apply fill-current;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.flatpickr-months .flatpickr-prev-month {
|
|
186
|
+
margin-left: -10px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.flatpickr-months .flatpickr-next-month {
|
|
190
|
+
margin-right: -10px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.flatpickr-months .flatpickr-month {
|
|
194
|
+
@apply text-slate-800 dark:text-slate-100;
|
|
195
|
+
height: auto;
|
|
196
|
+
line-height: inherit;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.flatpickr-current-month {
|
|
200
|
+
@apply text-sm font-medium;
|
|
201
|
+
position: static;
|
|
202
|
+
height: auto;
|
|
203
|
+
width: auto;
|
|
204
|
+
left: auto;
|
|
205
|
+
padding: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.flatpickr-current-month span.cur-month {
|
|
209
|
+
@apply font-medium m-0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.flatpickr-current-month span.cur-month:hover {
|
|
213
|
+
background: none;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.flatpickr-current-month input.cur-year {
|
|
217
|
+
font-weight: inherit;
|
|
218
|
+
box-shadow: none !important;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.numInputWrapper:hover {
|
|
222
|
+
background: none;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.numInputWrapper span {
|
|
226
|
+
display: none;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
span.flatpickr-weekday {
|
|
230
|
+
@apply text-slate-400 dark:text-slate-500 font-medium text-xs;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.flatpickr-calendar.arrowTop::before,
|
|
234
|
+
.flatpickr-calendar.arrowTop::after,
|
|
235
|
+
.flatpickr-calendar.arrowBottom::before,
|
|
236
|
+
.flatpickr-calendar.arrowBottom::after {
|
|
237
|
+
display: none;
|
|
238
|
+
}
|
package/src/assets/main.css
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:aria-current="isActive ? 'page' : undefined"
|
|
13
13
|
@click.prevent="onClick(navigate)"
|
|
14
14
|
>
|
|
15
|
-
<slot :active="isActive"
|
|
15
|
+
<slot :active="isActive" />
|
|
16
16
|
</a>
|
|
17
17
|
</RouterLink>
|
|
18
18
|
<button
|
|
@@ -22,10 +22,15 @@
|
|
|
22
22
|
:class="props.class"
|
|
23
23
|
@click="onClick(action)"
|
|
24
24
|
>
|
|
25
|
-
<slot :active="false"
|
|
25
|
+
<slot :active="false" />
|
|
26
26
|
</button>
|
|
27
|
-
<a
|
|
28
|
-
|
|
27
|
+
<a
|
|
28
|
+
v-else-if="href"
|
|
29
|
+
:href="href"
|
|
30
|
+
:class="props.class"
|
|
31
|
+
@click="onClick()"
|
|
32
|
+
>
|
|
33
|
+
<slot :active="false" />
|
|
29
34
|
</a>
|
|
30
35
|
</template>
|
|
31
36
|
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
/>
|
|
19
19
|
</BaseField>
|
|
20
20
|
|
|
21
|
-
<BaseField
|
|
21
|
+
<BaseField
|
|
22
|
+
:name="`${namePrefix}address_2`"
|
|
23
|
+
class="mb-4"
|
|
24
|
+
>
|
|
22
25
|
<BaseInput
|
|
23
26
|
:model-value="normalizedModelValue.address_2 ?? ''"
|
|
24
27
|
:placeholder="t('sui.address_2_description')"
|
|
@@ -69,8 +72,7 @@
|
|
|
69
72
|
:disabled="props.restrictCountry"
|
|
70
73
|
value-key="id"
|
|
71
74
|
@update:model-value="update('country', $event)"
|
|
72
|
-
|
|
73
|
-
</BaseSelect>
|
|
75
|
+
/>
|
|
74
76
|
</BaseField>
|
|
75
77
|
<BaseField
|
|
76
78
|
v-if="!props.hideRegion"
|
|
@@ -87,8 +89,7 @@
|
|
|
87
89
|
label-key="name"
|
|
88
90
|
value-key="id"
|
|
89
91
|
@update:model-value="update('region', $event)"
|
|
90
|
-
|
|
91
|
-
</BaseSelect>
|
|
92
|
+
/>
|
|
92
93
|
</BaseField>
|
|
93
94
|
</div>
|
|
94
95
|
</template>
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
class="flex w-full items-start rounded-md p-4"
|
|
4
4
|
:class="[backgroundClass, borderClass]"
|
|
5
5
|
>
|
|
6
|
-
<div
|
|
6
|
+
<div
|
|
7
|
+
v-if="showIcon"
|
|
8
|
+
class="mr-3"
|
|
9
|
+
>
|
|
7
10
|
<BaseIcon
|
|
8
11
|
v-if="color == 'warning'"
|
|
9
12
|
icon="heroicons-solid:exclamation"
|
|
@@ -35,7 +38,10 @@
|
|
|
35
38
|
{{ title }}
|
|
36
39
|
</h3>
|
|
37
40
|
|
|
38
|
-
<div
|
|
41
|
+
<div
|
|
42
|
+
v-if="$slots.default"
|
|
43
|
+
:class="[textClass, 'text-sm leading-tight']"
|
|
44
|
+
>
|
|
39
45
|
<slot />
|
|
40
46
|
</div>
|
|
41
47
|
</div>
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
leave-from-class="sm:translate-x-0 translate-y-0 opacity-100"
|
|
13
13
|
leave-to-class="sm:translate-y-0 sm:translate-x-4 translate-y-2 opacity-0"
|
|
14
14
|
>
|
|
15
|
-
<div
|
|
15
|
+
<div
|
|
16
|
+
v-for="notification in notifications"
|
|
17
|
+
:key="notification.id"
|
|
18
|
+
>
|
|
16
19
|
<div
|
|
17
20
|
class="mx-auto mt-4 flex w-full max-w-sm overflow-hidden rounded-lg bg-white shadow-xl"
|
|
18
21
|
>
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
inputSizeClass,
|
|
37
37
|
!visibleFocus
|
|
38
38
|
? [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
'focus:ring-0',
|
|
40
|
+
hasErrorInternal
|
|
41
|
+
? 'focus:border-red-600'
|
|
42
|
+
: 'focus:border-slate-300',
|
|
43
|
+
]
|
|
44
44
|
: '',
|
|
45
45
|
]"
|
|
46
46
|
autocomplete="off"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
@click="open"
|
|
49
49
|
@input="onTextInput"
|
|
50
50
|
@keydown="onTextKeydown"
|
|
51
|
-
|
|
51
|
+
>
|
|
52
52
|
<div
|
|
53
53
|
class="pointer-events-none absolute left-0 top-0 flex h-full items-center justify-center"
|
|
54
54
|
:class="[iconWrapClass]"
|
|
@@ -103,13 +103,22 @@
|
|
|
103
103
|
@scroll-bottom="emit('scrollBottom')"
|
|
104
104
|
>
|
|
105
105
|
<template #empty="emptyProps">
|
|
106
|
-
<slot
|
|
106
|
+
<slot
|
|
107
|
+
name="empty"
|
|
108
|
+
v-bind="{ ...emptyProps, ...slotProps }"
|
|
109
|
+
/>
|
|
107
110
|
</template>
|
|
108
111
|
<template #option="optionProps">
|
|
109
|
-
<slot
|
|
112
|
+
<slot
|
|
113
|
+
name="option"
|
|
114
|
+
v-bind="{ ...optionProps, ...slotProps }"
|
|
115
|
+
/>
|
|
110
116
|
</template>
|
|
111
117
|
<template #footer="footerProps">
|
|
112
|
-
<slot
|
|
118
|
+
<slot
|
|
119
|
+
name="footer"
|
|
120
|
+
v-bind="{ ...footerProps, ...slotProps }"
|
|
121
|
+
/>
|
|
113
122
|
</template>
|
|
114
123
|
</BaseAutocompleteDrawer>
|
|
115
124
|
</div>
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
class="max-h-[214px] w-full overflow-y-auto"
|
|
7
7
|
>
|
|
8
8
|
<!-- Slot empty -->
|
|
9
|
-
<slot
|
|
9
|
+
<slot
|
|
10
|
+
v-if="options.length == 0"
|
|
11
|
+
name="empty"
|
|
12
|
+
>
|
|
10
13
|
<div
|
|
11
14
|
class="flex items-center justify-center px-5 py-10 text-center text-slate-600"
|
|
12
15
|
>
|
|
@@ -15,7 +18,10 @@
|
|
|
15
18
|
</slot>
|
|
16
19
|
|
|
17
20
|
<!-- Option list -->
|
|
18
|
-
<ul
|
|
21
|
+
<ul
|
|
22
|
+
v-else
|
|
23
|
+
:class="twDrawer"
|
|
24
|
+
>
|
|
19
25
|
<li
|
|
20
26
|
v-for="(option, index) in options"
|
|
21
27
|
:key="option.value ? option.value : 'null'"
|
|
@@ -48,7 +54,7 @@
|
|
|
48
54
|
v-if="isSelected(option)"
|
|
49
55
|
icon="heroicons:check-20-solid"
|
|
50
56
|
:class="optionIconClass"
|
|
51
|
-
|
|
57
|
+
/>
|
|
52
58
|
</div>
|
|
53
59
|
</div>
|
|
54
60
|
</slot>
|
|
@@ -65,16 +71,22 @@
|
|
|
65
71
|
>
|
|
66
72
|
<div
|
|
67
73
|
class="absolute inset-0 h-full w-full bg-gradient-to-b from-transparent to-white"
|
|
68
|
-
|
|
74
|
+
/>
|
|
69
75
|
<BaseSpinnerSmall
|
|
70
76
|
class="mx-auto h-7 w-7 text-slate-300"
|
|
71
|
-
|
|
77
|
+
/>
|
|
72
78
|
</div>
|
|
73
79
|
</div>
|
|
74
80
|
|
|
75
81
|
<div ref="footer">
|
|
76
|
-
<div
|
|
77
|
-
|
|
82
|
+
<div
|
|
83
|
+
v-if="$slots.footer"
|
|
84
|
+
class="bg-white"
|
|
85
|
+
>
|
|
86
|
+
<slot
|
|
87
|
+
:options="options"
|
|
88
|
+
name="footer"
|
|
89
|
+
/>
|
|
78
90
|
</div>
|
|
79
91
|
</div>
|
|
80
92
|
|
|
@@ -83,12 +95,18 @@
|
|
|
83
95
|
class="absolute inset-0 h-full w-full space-y-1 bg-white p-2"
|
|
84
96
|
>
|
|
85
97
|
<div class="space-y-1">
|
|
86
|
-
<BaseSkeleton
|
|
87
|
-
|
|
98
|
+
<BaseSkeleton
|
|
99
|
+
class="h-7 w-full"
|
|
100
|
+
delay="0ms"
|
|
101
|
+
/>
|
|
102
|
+
<BaseSkeleton
|
|
103
|
+
class="h-7 w-full opacity-70"
|
|
104
|
+
delay="50ms"
|
|
105
|
+
/>
|
|
88
106
|
<BaseSkeleton
|
|
89
107
|
class="h-7 w-full opacity-30"
|
|
90
108
|
delay="100ms"
|
|
91
|
-
|
|
109
|
+
/>
|
|
92
110
|
</div>
|
|
93
111
|
</div>
|
|
94
112
|
</div>
|
|
@@ -28,15 +28,26 @@
|
|
|
28
28
|
@update:model-value="$emit('update:modelValue', $event)"
|
|
29
29
|
>
|
|
30
30
|
<template #option="optionProps">
|
|
31
|
-
<slot
|
|
31
|
+
<slot
|
|
32
|
+
name="option"
|
|
33
|
+
v-bind="optionProps"
|
|
34
|
+
/>
|
|
32
35
|
</template>
|
|
33
36
|
|
|
34
37
|
<template #footer="footerProps">
|
|
35
|
-
<slot
|
|
38
|
+
<slot
|
|
39
|
+
name="footer"
|
|
40
|
+
v-bind="footerProps"
|
|
41
|
+
:keywords="keywords"
|
|
42
|
+
/>
|
|
36
43
|
</template>
|
|
37
44
|
|
|
38
45
|
<template #empty="emptyProps">
|
|
39
|
-
<slot
|
|
46
|
+
<slot
|
|
47
|
+
name="empty"
|
|
48
|
+
v-bind="emptyProps"
|
|
49
|
+
:first-search="firstSearch"
|
|
50
|
+
>
|
|
40
51
|
<div
|
|
41
52
|
v-if="firstSearch"
|
|
42
53
|
class="flex h-[80px] items-center justify-center px-3 text-center text-base leading-tight text-slate-600"
|
|
@@ -21,13 +21,22 @@
|
|
|
21
21
|
@update:model-value="onUpdate"
|
|
22
22
|
>
|
|
23
23
|
<template #option="optionProps">
|
|
24
|
-
<slot
|
|
24
|
+
<slot
|
|
25
|
+
name="option"
|
|
26
|
+
v-bind="optionProps"
|
|
27
|
+
/>
|
|
25
28
|
</template>
|
|
26
29
|
<template #empty="emptyProps">
|
|
27
|
-
<slot
|
|
30
|
+
<slot
|
|
31
|
+
name="empty"
|
|
32
|
+
v-bind="emptyProps"
|
|
33
|
+
/>
|
|
28
34
|
</template>
|
|
29
35
|
<template #footer="footerProps">
|
|
30
|
-
<slot
|
|
36
|
+
<slot
|
|
37
|
+
name="footer"
|
|
38
|
+
v-bind="footerProps"
|
|
39
|
+
/>
|
|
31
40
|
</template>
|
|
32
41
|
</BaseAutocompleteFetch>
|
|
33
42
|
</template>
|
|
@@ -5,8 +5,14 @@
|
|
|
5
5
|
class="hidden sm:flex"
|
|
6
6
|
aria-label="Breadcrumb"
|
|
7
7
|
>
|
|
8
|
-
<ol
|
|
9
|
-
|
|
8
|
+
<ol
|
|
9
|
+
role="list"
|
|
10
|
+
class="flex items-center space-x-3"
|
|
11
|
+
>
|
|
12
|
+
<li
|
|
13
|
+
v-for="(breadcrumb, index) in breadcrumbs"
|
|
14
|
+
:key="index"
|
|
15
|
+
>
|
|
10
16
|
<div class="flex items-center">
|
|
11
17
|
<svg
|
|
12
18
|
v-if="index > 0"
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component
|
|
2
|
+
<component
|
|
3
|
+
:is="as"
|
|
4
|
+
ref="button"
|
|
5
|
+
class="btn"
|
|
6
|
+
>
|
|
3
7
|
<div
|
|
4
8
|
class="flex items-center justify-center"
|
|
5
9
|
:class="{ 'opacity-0': loading }"
|
|
@@ -11,7 +15,10 @@
|
|
|
11
15
|
v-if="loading"
|
|
12
16
|
class="absolute inset-0 flex h-full w-full items-center justify-center"
|
|
13
17
|
>
|
|
14
|
-
<svg
|
|
18
|
+
<svg
|
|
19
|
+
class="h-4 w-4 animate-spin"
|
|
20
|
+
viewBox="0 0 24 24"
|
|
21
|
+
>
|
|
15
22
|
<path
|
|
16
23
|
fill="currentColor"
|
|
17
24
|
d="M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z"
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
>
|
|
9
9
|
{{ length }}/{{ max }}
|
|
10
10
|
</div>
|
|
11
|
-
<div
|
|
11
|
+
<div
|
|
12
|
+
v-else-if="min && length < min"
|
|
13
|
+
class="text-red-600"
|
|
14
|
+
>
|
|
12
15
|
{{ t('sui.min_x_characters', { x: min }) }} ({{ length }}/{{ min }})
|
|
13
16
|
</div>
|
|
14
17
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
@mouseenter="showTooltip()"
|
|
7
7
|
@mouseleave="hideTooltip()"
|
|
8
8
|
>
|
|
9
|
-
<slot
|
|
9
|
+
<slot />
|
|
10
10
|
<transition
|
|
11
11
|
enter-active-class="transition duration-200 ease-out"
|
|
12
12
|
enter-from-class="transform scale-90 opacity-0"
|
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
<div
|
|
23
23
|
class="ml-2 whitespace-nowrap rounded bg-slate-900 bg-opacity-80 px-3 py-2 text-xs leading-tight text-white backdrop-blur"
|
|
24
24
|
>
|
|
25
|
-
<div
|
|
25
|
+
<div
|
|
26
|
+
v-if="showCopied"
|
|
27
|
+
class="flex items-center"
|
|
28
|
+
>
|
|
26
29
|
<BaseIcon
|
|
27
30
|
class="mr-1 text-green-500"
|
|
28
31
|
icon="heroicons:check-circle-solid"
|