Skip to content

Commit 7b41ffa

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into feat/quick-date-prop
2 parents 86114b7 + 4fc7833 commit 7b41ffa

File tree

26 files changed

+138
-63
lines changed

26 files changed

+138
-63
lines changed

Diff for: .nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.16.0
1+
v18.20.2

Diff for: package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"devDependencies": {
77
"lerna": "^3.20.2",
88
"syncpack": "^9.8.6",
9-
"yorkie": "^2.0.0"
9+
"yorkie": "^2.0.0",
10+
"tsx": "^4.6.1"
1011
},
1112
"private": true,
1213
"scripts": {

Diff for: packages/create-vuestic/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"devDependencies": {
2323
"@types/node": "^18.16.0",
2424
"@types/prompts": "^2.4.2",
25-
"tsup": "^6.5.0",
26-
"tsx": "^3.12.1"
25+
"tsup": "^6.5.0"
2726
}
2827
}

Diff for: packages/deploy/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"release": "tsx release-script/release-script.ts"
77
},
88
"devDependencies": {
9-
"tsx": "^3.12.1",
109
"inquirer": "^9.0.0",
1110
"typescript": "^5",
1211
"chalk": "^5.2.0"

Diff for: packages/docs/components/Recaptcha.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ watchEffect(() => {
4444
})
4545
</script>
4646

47-
<style scoped lang='scss'>
47+
<style lang="scss" scoped>
4848
4949
</style>

Diff for: packages/docs/components/landing/forms/RequestAuditForm.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const submitForm = async () => {
125125
}
126126
</script>
127127

128-
<style scoped lang='scss'>
128+
<style lang="scss" scoped>
129129
@import "@/assets";
130130
131131
.form {
@@ -138,7 +138,7 @@ const submitForm = async () => {
138138
}
139139
140140
&__text {
141-
@include text-font();
141+
font-size: 0.9rem;
142142
}
143143
144144
&__title {

Diff for: packages/docs/components/landing/modals/RequestAuditModal.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const emit = defineEmits<{
3131
}>()
3232
</script>
3333

34-
<style scoped lang='scss'>
34+
<style lang="scss" scoped>
3535
@import "@/assets";
3636
3737
:global(.request-audit-modal .va-modal__close) {
@@ -42,7 +42,7 @@ const emit = defineEmits<{
4242
4343
.request-audit-modal {
4444
&__content {
45-
padding: 64px 40px;
45+
padding: 40px;
4646
4747
@include xs(padding, 32px);
4848

Diff for: packages/github-utilities/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"dependencies": {
99
"chalk": "^5.2.0",
1010
"inquirer": "^9.0.0",
11-
"tsx": "^3.12.1",
1211
"typescript": "^5",
1312
"dotenv": "^16.3.1"
1413
}

Diff for: packages/ui/src/components/va-alert/VaAlert.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ defineExpose({
147147
})
148148
</script>
149149

150-
<style lang='scss'>
150+
<style lang="scss">
151151
@import "../../styles/resources";
152152
@import "variables";
153153

Diff for: packages/ui/src/components/va-button/VaButton.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ defineExpose({
185185
})
186186
</script>
187187

188-
<style lang='scss'>
188+
<style lang="scss">
189189
@import 'variables';
190190
@import '../../styles/resources';
191191

Diff for: packages/ui/src/components/va-data-table/VaDataTable.stories.ts

+31
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,34 @@ export const ExpandableRow = () => ({
197197
</VaDataTable>
198198
`,
199199
})
200+
201+
export const NoDataText = () => ({
202+
components: { VaDataTable, VaPagination },
203+
data: () => ({ columns, items }),
204+
205+
template: `
206+
<VaDataTable :items="[]" :columns="columns" no-data-html="Test no data" />
207+
`,
208+
})
209+
210+
export const NoDataTextSlot = () => ({
211+
components: { VaDataTable, VaPagination },
212+
data: () => ({ columns, items }),
213+
214+
template: `
215+
<VaDataTable :items="[]" :columns="columns">
216+
<template #no-data>
217+
<div class="text-center">No data Test</div>
218+
</template>
219+
</VaDataTable>
220+
`,
221+
})
222+
223+
export const NoFilteredDataText = () => ({
224+
components: { VaDataTable, VaPagination },
225+
data: () => ({ columns, items }),
226+
227+
template: `
228+
<VaDataTable :items="[]" :columns="columns" filter="Aaa" no-data-filtered-html="Test no filtered data" />
229+
`,
230+
})

Diff for: packages/ui/src/components/va-data-table/VaDataTable.vue

+12-4
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,11 @@
7676
<td
7777
class="va-data-table__table-td no-data"
7878
colspan="99999"
79-
v-html="noDataHtml"
80-
/>
79+
>
80+
<slot name="no-data">
81+
<div v-html="noDataHtml" />
82+
</slot>
83+
</td>
8184
</tr>
8285

8386
<tr
@@ -88,8 +91,13 @@
8891
<td
8992
class="va-data-table__table-td no-data"
9093
colspan="99999"
91-
v-html="noDataFilteredHtml"
92-
/>
94+
>
95+
<slot name="no-filtered-data">
96+
<slot name="no-data">
97+
<div v-html="noDataFilteredHtml" />
98+
</slot>
99+
</slot>
100+
</td>
93101
</tr>
94102

95103
<template

Diff for: packages/ui/src/components/va-file-upload/VaFileUpload.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ provide(VaFileUploadKey, {
219219
const fileUploadListProps = filterComponentProps(VaFileUploadListProps)
220220
</script>
221221

222-
<style lang='scss'>
222+
<style lang="scss">
223223
@import "../../styles/resources";
224224
@import "variables";
225225

Diff for: packages/ui/src/components/va-file-upload/VaFileUploadGalleryItem/VaFileUploadGalleryItem.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const { t, tp } = useTranslation()
138138
const { textColorComputed } = useTextColor(toRef(props, 'color'))
139139
</script>
140140

141-
<style lang='scss'>
141+
<style lang="scss">
142142
@import "variables";
143143
@import "../../../styles/resources";
144144

Diff for: packages/ui/src/components/va-file-upload/VaFileUploadList/VaFileUploadList.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const itemProps = filterComponentProps(VaFileUploadListItemProps)
102102
const singleItemProps = filterComponentProps(VaFileUploadSingleItemProps)
103103
</script>
104104

105-
<style lang='scss'>
105+
<style lang="scss">
106106
.va-file-upload-list {
107107
display: flex;
108108
flex-wrap: wrap;

Diff for: packages/ui/src/components/va-file-upload/VaFileUploadListItem/VaFileUploadListItem.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const computedClasses = useBem('va-file-upload-list-item', () => ({
9595
}))
9696
</script>
9797

98-
<style lang='scss'>
98+
<style lang="scss">
9999
@import "../../../styles/resources";
100100
@import "variables";
101101

Diff for: packages/ui/src/components/va-file-upload/VaFileUploadSingleItem/VaFileUploadSingleItem.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const { t, tp } = useTranslation()
5151
const { disabled } = useStrictInject(VaFileUploadKey, INJECTION_ERROR_MESSAGE)
5252
</script>
5353

54-
<style lang='scss'>
54+
<style lang="scss">
5555
.va-file-upload-single-item {
5656
width: 100%;
5757

Diff for: packages/ui/src/components/va-form/VaForm.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ defineExpose({
129129
} satisfies Form)
130130
</script>
131131

132-
<style lang='scss'>
132+
<style lang="scss">
133133
.va-form {
134134
font-family: var(--va-font-family);
135135
}

Diff for: packages/ui/src/components/va-message-list/VaMessageListWrapper.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const messagesComputed = computed(() => props.error ? props.errorMessages : prop
4141
const errorLimit = computed(() => props.error ? Number(props.errorCount) : 99)
4242
</script>
4343

44-
<style lang='scss'>
44+
<style lang="scss">
4545
@import 'variables';
4646
4747
.va-message-list-wrapper {

Diff for: packages/ui/src/components/va-pagination/VaPagination.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ defineExpose({
341341
})
342342
</script>
343343

344-
<style lang='scss'>
344+
<style lang="scss">
345345
@import "../../styles/resources";
346346
@import "variables";
347347

Diff for: packages/ui/src/components/va-slider/VaSlider.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ watch(hasMouseDown, (hasMouseDown) => {
696696
})
697697
</script>
698698

699-
<style lang='scss'>
699+
<style lang="scss">
700700
@import "../../styles/resources";
701701
@import "variables";
702702

Diff for: packages/ui/src/components/va-tabs/VaTabs.demo.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,13 @@
348348
<template #tabs>
349349
<va-tab
350350
name="Link 1"
351-
to="/demo/components/va-breadcrumbs/VaBreadcrumbs.demo.vue"
351+
to="/1"
352352
>
353353
Link 1
354354
</va-tab>
355355
<va-tab
356356
name="Link 2"
357-
to="/demo/components/va-tabs/VaTabs.demo.vue"
357+
to="/2"
358358
>
359359
Active link
360360
</va-tab>

Diff for: packages/ui/src/components/va-tabs/VaTabs.vue

+5
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ import {
7676
StyleValue,
7777
WritableComputedRef,
7878
onMounted,
79+
watchEffect,
7980
} from 'vue'
8081
8182
import {
@@ -279,6 +280,10 @@ const updateTabsState = () => {
279280
updateStartingXPoint()
280281
}
281282
283+
watchEffect(() => {
284+
updateTabsState()
285+
})
286+
282287
const updatePagination = () => {
283288
const tabsClientWidth = getClientWidth(tabs.value)
284289
const wrapperClientWidth = getClientWidth(wrapper.value)

Diff for: packages/ui/src/components/va-tabs/components/VaTab/VaTab.vue

+14-18
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,19 @@
66
role="tab"
77
:aria-selected="isActive"
88
:aria-disabled="$props.disabled || parentDisabled"
9-
:href="hrefComputed"
10-
:target="target"
11-
:to="to"
12-
:replace="replace"
13-
:exact="exact"
14-
:active-class="activeClass"
15-
:exact-active-class="exactActiveClass"
169
:class="classComputed"
1710
:style="computedStyle"
1811
@mouseenter="updateHoverState(true)"
1912
@mouseleave="updateHoverState(false)"
13+
@focus="onFocus"
14+
@click="onTabClick"
15+
@keydown.enter="onTabKeydown"
16+
:tabindex="tabIndexComputed"
17+
v-on="keyboardFocusListeners"
18+
v-bind="linkAttributesComputed"
2019
>
2120
<div
2221
class="va-tab__content"
23-
:tabindex="tabIndexComputed"
24-
@focus="onFocus"
25-
@click="onTabClick"
26-
@keydown.enter="onTabKeydown"
27-
v-on="keyboardFocusListeners"
2822
>
2923
<slot>
3024
<va-icon
@@ -43,7 +37,7 @@
4337
</template>
4438

4539
<script lang="ts" setup>
46-
import { computed, inject, onBeforeUnmount, onMounted, ref, shallowRef } from 'vue'
40+
import { computed, inject, nextTick, onBeforeUnmount, onMounted, ref, shallowRef } from 'vue'
4741
4842
import {
4943
useComponentPresetProp,
@@ -85,7 +79,7 @@ const leftSidePosition = ref(0)
8579
8680
const { keyboardFocusListeners, hasKeyboardFocus } = useKeyboardOnlyFocus()
8781
88-
const { tagComputed, hrefComputed, isActiveRouterLink } = useRouterLink(props)
82+
const { tagComputed, isActiveRouterLink, linkAttributesComputed } = useRouterLink(props)
8983
const classComputed = computed(() => ({ 'va-tab--disabled': props.disabled }))
9084
const {
9185
parentDisabled,
@@ -122,12 +116,14 @@ const updateSidePositions = () => {
122116
leftSidePosition.value = componentOffsetLeft
123117
}
124118
125-
const onTabClick = () => {
119+
const onTabClick = async () => {
120+
await nextTick()
126121
selectTab(tabComponent)
127122
emit('click')
128123
}
129124
130-
const onTabKeydown = () => {
125+
const onTabKeydown = async () => {
126+
await nextTick()
131127
selectTab(tabComponent)
132128
emit('keydown-enter')
133129
}
@@ -180,6 +176,8 @@ onBeforeUnmount(() => {
180176
vertical-align: var(--va-tab-vertical-align);
181177
color: var(--va-tab-color);
182178
179+
@include keyboard-focus-outline($radius: 2px, $offset: -2px);
180+
183181
&__content {
184182
align-items: var(--va-tab-content-align-items);
185183
color: var(--va-tab-content-color);
@@ -194,8 +192,6 @@ onBeforeUnmount(() => {
194192
white-space: var(--va-tab-content-white-space);
195193
padding: var(--va-tab-content-padding);
196194
cursor: var(--va-tab-content-cursor);
197-
198-
@include keyboard-focus-outline($radius: 2px, $offset: -2px);
199195
}
200196
201197
&__icon {

Diff for: packages/ui/src/composables/useRouterLink.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export const useRouterLink = (props: ExtractPropTypes<typeof useRouterLinkProps>
3333

3434
if (globalConfig.routerComponent && props.to) { return globalConfig.routerComponent }
3535

36-
if (props.to) { return 'router-link' }
36+
if (props.to && vueRouter.value !== undefined) { return 'router-link' }
37+
if (props.to && vueRouter.value === undefined) { return 'a' }
3738

3839
return props.tag || 'div'
3940
})
@@ -73,10 +74,15 @@ export const useRouterLink = (props: ExtractPropTypes<typeof useRouterLinkProps>
7374
})
7475

7576
const hrefComputed = computed(() => {
77+
if (props.href) { return props.href }
78+
79+
if (vueRoute.value === undefined && props.to) {
80+
return props.to
81+
}
82+
7683
// to resolve href on server for SEO optimization
7784
// https://github.com/nuxt/nuxt.js/issues/8204
78-
// @ts-ignore
79-
return props.href || (props.to ? vueRouter.value?.resolve(props.to, vueRoute.value).href : undefined)
85+
return props.to ? vueRouter.value?.resolve(props.to, vueRoute.value).href : undefined
8086
})
8187

8288
return {

0 commit comments

Comments
 (0)