Skip to content

Commit 0c43202

Browse files
committed
chore: run migration steps for tailwind v4
1 parent 76bab4f commit 0c43202

File tree

94 files changed

+1540
-1190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1540
-1190
lines changed

spring-boot-admin-server-ui/.storybook/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
const vueJsx = require('@vitejs/plugin-vue-jsx').default;
12
const { mergeConfig } = require('vite');
3+
24
const path = require('path');
35
const frontend = path.resolve(__dirname, '../src/main/frontend/');
46
module.exports = {
@@ -18,6 +20,7 @@ module.exports = {
1820
},
1921
async viteFinal(config) {
2022
config.plugins = config.plugins.filter((p) => p.name !== 'vue-docgen');
23+
config.plugins.push(vueJsx());
2124
return mergeConfig(config, {
2225
resolve: {
2326
alias: {

spring-boot-admin-server-ui/package-lock.json

Lines changed: 1272 additions & 989 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spring-boot-admin-server-ui/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
"@typescript-eslint/eslint-plugin": "^8.0.0",
8686
"@typescript-eslint/parser": "^8.0.0",
8787
"@vitejs/plugin-vue": "5.2.1",
88+
"@vitejs/plugin-vue-jsx": "^4.1.1",
8889
"@vue/eslint-config-typescript": "^14.0.0",
8990
"@vue/test-utils": "2.4.6",
9091
"autoprefixer": "10.4.20",
@@ -102,6 +103,7 @@
102103
"rollup-plugin-visualizer": "5.14.0",
103104
"sass": "^1.57.1",
104105
"storybook": "8.5.8",
106+
"storybook-vue3-router": "^5.0.0",
105107
"tailwindcss": "4.0.7",
106108
"ts-node-dev": "^2.0.0",
107109
"typescript": "^5.0.3",
@@ -127,5 +129,6 @@
127129
},
128130
"overrides": {
129131
"esbuild": "0.25.0"
130-
}
132+
},
133+
"packageManager": "[email protected]+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
131134
}

spring-boot-admin-server-ui/src/main/frontend/components/sba-alert.stories.ts renamed to spring-boot-admin-server-ui/src/main/frontend/components/sba-alert.stories.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@ export default {
2020
title: 'Components/Alert',
2121
};
2222

23-
const Template = (args) => ({
24-
components: { SbaAlert },
25-
setup() {
26-
return { args };
27-
},
28-
template: '<sba-alert v-bind="args" />',
29-
});
23+
const Template = (args) => <sba-alert {...args} />;
3024

3125
export const AlertError = {
3226
render: Template,

spring-boot-admin-server-ui/src/main/frontend/components/sba-alert.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<div
1919
v-if="hasError"
2020
:class="classNames(alertClass, borderClassNames)"
21-
class="rounded-b px-4 py-3 shadow-sm backdrop-filter backdrop-blur-xs bg-opacity-80 my-3"
21+
class="rounded-b px-4 py-3 shadow backdrop-filter backdrop-blur-xs my-3"
2222
role="alert"
2323
>
2424
<div class="flex">
@@ -70,13 +70,13 @@ export default defineComponent({
7070
return {
7171
classNames,
7272
alertClass: {
73-
'bg-red-100 border-red-400 text-red-700':
73+
'bg-red-100/80 border-red-400 text-red-700':
7474
this.severity.toUpperCase() === Severity.ERROR,
75-
'bg-orange-100 border-orange-500 text-orange-700':
75+
'bg-orange-100/80 border-orange-500 text-orange-700':
7676
this.severity.toUpperCase() === Severity.WARN,
77-
'bg-blue-100 border-blue-500 text-blue-900':
77+
'bg-blue-100/80 border-blue-500 text-blue-900':
7878
this.severity.toUpperCase() === Severity.INFO,
79-
'bg-teal-100 border-teal-500 text-teal-900':
79+
'bg-teal-100/80 border-teal-500 text-teal-900':
8080
this.severity.toUpperCase() === Severity.SUCCESS,
8181
},
8282
textColor: {

spring-boot-admin-server-ui/src/main/frontend/components/sba-button-group.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
</div>
55
</template>
66

7-
<style type="text/css">
7+
<style>
8+
@reference "@/index.css";
9+
810
.btn-group {
911
@apply inline-flex z-0 relative -space-x-px;
1012
}
@@ -15,14 +17,14 @@
1517
}
1618
1719
.btn-group button:first-child:not(:last-child) {
18-
@apply rounded-r-none !important;
20+
@apply rounded-r-none!;
1921
}
2022
2123
.btn-group button:not(:first-child):not(:last-child) {
22-
@apply rounded-none !important;
24+
@apply rounded-none!;
2325
}
2426
2527
.btn-group button:last-child:not(:first-child) {
26-
@apply rounded-l-none !important;
28+
@apply rounded-l-none!;
2729
}
2830
</style>

spring-boot-admin-server-ui/src/main/frontend/components/sba-button.stories.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,3 @@ export const SuccessButton = {
6464
class: 'is-success',
6565
},
6666
};
67-
68-
const SizeTemplate = () => {
69-
return {
70-
components: { SbaButton },
71-
template: `
72-
<sba-button size="xs">button xs</sba-button>
73-
<sba-button size="sm">button sm</sba-button>
74-
<sba-button size="base">button base</sba-button>
75-
`,
76-
};
77-
};
78-
79-
export const ButtonSizes = {
80-
render: SizeTemplate,
81-
};

spring-boot-admin-server-ui/src/main/frontend/components/sba-button.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export default {
5151
</script>
5252

5353
<style scoped>
54+
@reference "@/index.css";
55+
5456
.btn {
5557
@apply rounded-l rounded-r font-medium text-sm text-center text-black border-gray-300 border border-gray-300 bg-white;
5658
@apply focus:ring-2 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500;
@@ -100,10 +102,4 @@ export default {
100102
.btn.is-primary {
101103
@apply text-white bg-blue-600 hover:bg-blue-700 focus:ring-blue-300;
102104
}
103-
104-
@supports (-moz-appearance: none) {
105-
.backdrop-filter.bg-opacity-40 {
106-
--tw-bg-opacity: 1 !important;
107-
}
108-
}
109105
</style>

spring-boot-admin-server-ui/src/main/frontend/components/sba-checkbox.stories.ts renamed to spring-boot-admin-server-ui/src/main/frontend/components/sba-checkbox.stories.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,10 @@ export default {
2121
};
2222

2323
const Template = (args) => {
24-
return {
25-
components: { SbaCheckbox },
26-
setup() {
27-
return { args };
28-
},
29-
template: '<sba-checkbox v-bind="args" />{{args}}',
30-
};
24+
return <sba-checkbox {...args} />;
3125
};
3226

33-
export const OneButton = {
27+
export const WithLabel = {
3428
render: Template,
3529

3630
args: {
Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,25 @@
11
<template>
22
<div class="flex items-center">
3-
<input
4-
:id="id"
5-
:checked="modelValue"
6-
type="checkbox"
7-
class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded"
8-
:name="name"
9-
@change="$emit('update:modelValue', $event.target.checked)"
10-
/>
11-
<label :for="id" class="ml-2 font-medium text-gray-700" v-text="label" />
3+
<label>
4+
<input
5+
:id="id"
6+
:checked="modelValue"
7+
type="checkbox"
8+
class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded"
9+
@change="$emit('update:modelValue', $event.target.checked)"
10+
/>
11+
<span class="ml-2 font-medium text-gray-700">{{ label }}</span>
12+
</label>
1213
</div>
1314
</template>
1415

15-
<script>
16-
export default {
17-
props: {
18-
name: {
19-
type: String,
20-
required: false,
21-
default: null,
22-
},
23-
modelValue: {
24-
type: Boolean,
25-
required: true,
26-
},
27-
label: {
28-
type: String,
29-
required: true,
30-
},
31-
},
32-
emits: ['update:modelValue'],
33-
computed: {
34-
id() {
35-
return 'checkbox-' + this._.uid;
36-
},
37-
},
38-
};
16+
<script setup lang="ts">
17+
import { defineEmits, defineProps } from 'vue';
18+
19+
defineProps<{
20+
modelValue: boolean;
21+
label: string;
22+
}>();
23+
24+
defineEmits(['update:modelValue']);
3925
</script>

spring-boot-admin-server-ui/src/main/frontend/components/sba-dropdown/sba-dropdown-divider.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
</template>
44

55
<style scoped>
6+
@reference "@/index.css";
7+
68
.sba-dropdown-divider {
79
height: 0;
810
margin: 0.25rem 0;

spring-boot-admin-server-ui/src/main/frontend/components/sba-dropdown/sba-dropdown-item.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ const onClick = ($event, close) => {
7878
</script>
7979

8080
<style scoped>
81+
@reference "@/index.css";
82+
8183
.sba-dropdown-item {
8284
@apply flex w-full items-center rounded-md px-2 py-2 hover:bg-sba-700 hover:text-white;
8385
}

spring-boot-admin-server-ui/src/main/frontend/components/sba-dropdown/sba-dropdown.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ defineProps({
4949
</script>
5050

5151
<style scoped>
52+
@reference "@/index.css";
53+
5254
.submenu {
5355
@apply inline-block text-left text-white cursor-pointer lg:relative;
5456
}
@@ -74,7 +76,7 @@ defineProps({
7476
}
7577
7678
.submenu-items {
77-
@apply absolute right-0 text-black w-56 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none;
79+
@apply absolute right-0 text-black w-56 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black/5 focus:outline-none;
7880
}
7981
8082
.submenu-opener--link {

spring-boot-admin-server-ui/src/main/frontend/components/sba-formatted-obj.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ export default {
4545
</script>
4646

4747
<style>
48+
@reference "@/index.css";
49+
4850
.formatted {
4951
white-space: break-spaces;
5052
word-break: break-word;

spring-boot-admin-server-ui/src/main/frontend/components/sba-icon-button.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<template>
1818
<sba-button
19-
class="border-none sm:m-1 !bg-transparent"
19+
class="border-none p-0! sm:m-1 bg-transparent!"
2020
:title="title"
2121
size="xs"
2222
v-on="$attrs"
@@ -53,3 +53,4 @@ export default {
5353
</script>
5454

5555
<style></style>
56+
@reference "@/index.css";

spring-boot-admin-server-ui/src/main/frontend/components/sba-input.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class="block text-sm font-medium text-gray-700"
2424
v-text="label"
2525
/>
26-
<div :class="{ 'mt-1': hasLabel }" class="flex rounded shadow-sm">
26+
<div :class="{ 'mt-1': hasLabel }" class="flex rounded shadow">
2727
<!-- PREPEND -->
2828
<label
2929
v-if="$slots.prepend"
@@ -54,7 +54,7 @@
5454
:type="type"
5555
:value="modelValue"
5656
:aria-label="label || placeholder"
57-
class="focus:z-10 p-2 relative flex-1 block w-full rounded-none bg-opacity-40 backdrop-blur-sm"
57+
class="focus:z-10 p-2 relative flex-1 block w-full rounded-none bg-white/40 backdrop-blur-sm"
5858
@input="handleInput"
5959
/>
6060
<!-- APPEND -->

spring-boot-admin-server-ui/src/main/frontend/components/sba-modal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
leave-from="opacity-100"
1111
leave-to="opacity-0"
1212
>
13-
<div class="fixed inset-0 bg-black bg-opacity-25" />
13+
<div class="fixed inset-0 bg-black/25" />
1414
</TransitionChild>
1515

1616
<div class="fixed inset-0 overflow-y-auto">

spring-boot-admin-server-ui/src/main/frontend/components/sba-nav/sba-nav-dropdown.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ defineProps({
6262
</script>
6363

6464
<style scoped>
65+
@reference "@/index.css";
66+
6567
.submenu {
6668
@apply inline-block text-left text-white cursor-pointer lg:relative;
6769
}
@@ -91,7 +93,7 @@ defineProps({
9193
}
9294
9395
.submenu-items {
94-
@apply absolute right-0 text-black w-56 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none;
96+
@apply absolute right-0 text-black w-56 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black/5 focus:outline-none;
9597
}
9698
9799
.submenu-opener--link {

spring-boot-admin-server-ui/src/main/frontend/components/sba-nav/sba-nav-item.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ defineProps({
3838
</script>
3939

4040
<style scoped>
41+
@reference "@/index.css";
42+
4143
.sba-nav-item {
4244
@apply px-3 py-2 rounded lg:self-center hover:bg-sba-700;
4345
}
4446
</style>
4547
<style>
48+
@reference "@/index.css";
49+
4650
.sba-nav-item.is-active {
4751
@apply bg-sba-700;
4852
}

spring-boot-admin-server-ui/src/main/frontend/components/sba-navbar/sba-navbar-brand.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ defineProps({
1212
</script>
1313

1414
<style>
15+
@reference "@/index.css";
16+
1517
.brand {
1618
@apply flex items-center text-white mr-4;
1719
}

spring-boot-admin-server-ui/src/main/frontend/components/sba-navbar/sba-navbar-toggle.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ const handleClick = () => {
6363
</script>
6464

6565
<style>
66+
@reference "@/index.css";
67+
6668
.sba-navbar-toggle {
6769
@apply ml-auto inline-flex bg-gray-800 items-center justify-center p-2 rounded-md text-gray-400;
6870
@apply xl:hidden;

spring-boot-admin-server-ui/src/main/frontend/components/sba-navbar/sba-navbar.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ function toggleNavigation() {
5050
</script>
5151

5252
<style scoped>
53+
@reference "@/index.css";
54+
5355
.sba-navbar {
5456
@apply bg-black fixed flex flex-wrap justify-start mx-auto top-0 w-full z-50 items-center px-4 py-2 text-white;
5557
@apply sm:px-6;

spring-boot-admin-server-ui/src/main/frontend/components/sba-pagination-nav.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<template>
1818
<div>
1919
<sba-button-group
20-
class="relative z-0 btn-group rounded shadow-sm -space-x-px"
20+
class="relative z-0 btn-group rounded shadow -space-x-px"
2121
aria-label="Pagination"
2222
>
2323
<sba-button :disabled="modelValue <= 1" @click="goPrev()">
@@ -140,8 +140,10 @@ export default {
140140
</script>
141141

142142
<style scoped>
143+
@reference "@/index.css";
144+
143145
.is-active {
144-
@apply bg-indigo-50 border border-indigo-500 z-10 !important;
146+
@apply bg-indigo-50 border border-indigo-500 z-10!;
145147
@apply font-extrabold;
146148
}
147149
</style>

0 commit comments

Comments
 (0)