diff --git a/package-lock.json b/package-lock.json index c8b3f87..348a7fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@fortawesome/free-solid-svg-icons": "^5.15.3", "@fortawesome/vue-fontawesome": "^3.0.0-4", "@popperjs/core": "^2.10.1", + "@vueuse/core": "^6.6.2", "chart.js": "^2.9.4", "simple-syntax-highlighter": "^2.0.6", "tailwind-scrollbar": "^1.3.0", @@ -2064,6 +2065,78 @@ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.20.tgz", "integrity": "sha512-FbpX+hD5BvXCQerEYO7jtAGHlhAkhTQ4KIV73kmLWNlawWhTiVuQxizgVb0BOkX5oG9cIRZ42EG++d/k/Efp0w==" }, + "node_modules/@vueuse/core": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-6.6.2.tgz", + "integrity": "sha512-AUB7WVYFwMPeNtC99m1j3PWf+45EyNWJ78VDaB9F/6LCYeKlcG/6aACL9xWSPslZUz9OsYTO9ZfPhNgv2YqxVw==", + "dependencies": { + "@vueuse/shared": "6.6.2", + "vue-demi": "*" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.1.0", + "vue": "^2.6.0 || ^3.2.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, + "node_modules/@vueuse/core/node_modules/@vueuse/shared": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-6.6.2.tgz", + "integrity": "sha512-wY4GAM5G1vlLRS4O71vw7PH5G5/Yub0xb2+OyIyDjZW/1S5J6bdkpFBp6AJbZ5k3ACtjTDxlUYhPQnrdJTwzTA==", + "dependencies": { + "vue-demi": "*" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.1.0", + "vue": "^2.6.0 || ^3.2.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, + "node_modules/@vueuse/core/node_modules/vue-demi": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.11.4.tgz", + "integrity": "sha512-/3xFwzSykLW2HiiLie43a+FFgNOcokbBJ+fzvFXd0r2T8MYohqvphUyDQ8lbAwzQ3Dlcrb1c9ykifGkhSIAk6A==", + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -12227,6 +12300,31 @@ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.20.tgz", "integrity": "sha512-FbpX+hD5BvXCQerEYO7jtAGHlhAkhTQ4KIV73kmLWNlawWhTiVuQxizgVb0BOkX5oG9cIRZ42EG++d/k/Efp0w==" }, + "@vueuse/core": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-6.6.2.tgz", + "integrity": "sha512-AUB7WVYFwMPeNtC99m1j3PWf+45EyNWJ78VDaB9F/6LCYeKlcG/6aACL9xWSPslZUz9OsYTO9ZfPhNgv2YqxVw==", + "requires": { + "@vueuse/shared": "6.6.2", + "vue-demi": "*" + }, + "dependencies": { + "@vueuse/shared": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-6.6.2.tgz", + "integrity": "sha512-wY4GAM5G1vlLRS4O71vw7PH5G5/Yub0xb2+OyIyDjZW/1S5J6bdkpFBp6AJbZ5k3ACtjTDxlUYhPQnrdJTwzTA==", + "requires": { + "vue-demi": "*" + } + }, + "vue-demi": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.11.4.tgz", + "integrity": "sha512-/3xFwzSykLW2HiiLie43a+FFgNOcokbBJ+fzvFXd0r2T8MYohqvphUyDQ8lbAwzQ3Dlcrb1c9ykifGkhSIAk6A==", + "requires": {} + } + } + }, "@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", diff --git a/package.json b/package.json index 7116a30..1305388 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@fortawesome/free-solid-svg-icons": "^5.15.3", "@fortawesome/vue-fontawesome": "^3.0.0-4", "@popperjs/core": "^2.10.1", + "@vueuse/core": "^6.6.2", "chart.js": "^2.9.4", "simple-syntax-highlighter": "^2.0.6", "tailwind-scrollbar": "^1.3.0", diff --git a/resources/css/app.css b/resources/css/app.css index 277a708..4ce4723 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -7,7 +7,10 @@ @import "./components/breadcrumb.css"; @import "./components/button.css"; @import "./components/collapsible.css"; +@import "./components/dropdown.css"; @import "./components/loading.css"; +@import "./components/radius.css"; + /*Utilities*/ @import 'tailwindcss/utilities'; @@ -169,15 +172,6 @@ @apply inline-flex space-x-2 justify-end } -/*Dropdown*/ -.dropdown{ - @apply relative flex flex-row justify-between border whitespace-nowrap font-semibold p-2 items-center gap-2 cursor-pointer -} -/*Dropdown Child*/ -.dropdown-content{ - @apply flex flex-col whitespace-normal z-10 absolute border rounded-md mt-1 overflow-hidden bg-white -} - /*Form Input*/ /*SelectInput*/ .select-container{ diff --git a/resources/css/components/dropdown.css b/resources/css/components/dropdown.css new file mode 100644 index 0000000..cd4d17a --- /dev/null +++ b/resources/css/components/dropdown.css @@ -0,0 +1,48 @@ +.dropdown { + @apply relative max-w-min select-none +} + +.dropdown-button-trigger { + @apply relative whitespace-nowrap space-x-2 +} + +.dropdown-button-trigger-content { + @apply flex flex-col whitespace-normal z-10 absolute border rounded-md mt-1 overflow-hidden bg-white +} + +.dropdown-rich-trigger { + @apply cursor-pointer +} + +.dropdown-rich-trigger-content { + @apply absolute flex flex-col whitespace-normal z-10 +} + +.dropdown-content-container { + @apply relative z-40 +} + + +.dropdown-content-left { + @apply origin-top-left left-0 +} + +.dropdown-content-center { + @apply origin-top +} + +.dropdown-content-right { + @apply origin-top-right right-0 +} + +.dropdown-content-wide { + @apply min-w-22 +} + +.dropdown-content-fit { + @apply min-w-min +} + +.dropdown-trigger-icon { + @apply w-5 h-5 transform duration-300 +} diff --git a/resources/css/components/radius.css b/resources/css/components/radius.css new file mode 100644 index 0000000..f2738c5 --- /dev/null +++ b/resources/css/components/radius.css @@ -0,0 +1,58 @@ +/*TODO:Apply all of them*/ +.radius-0{ + @apply rounded-none +} +.radius-1{ + @apply rounded-sm +} +.radius-2{ + @apply rounded +} +.radius-3{ + @apply rounded-md +} +.radius-4{ + @apply rounded-lg +} +.radius-5{ + @apply rounded-xl +} +.radius-6{ + @apply rounded-2xl +} +.radius-7{ + @apply rounded-3xl +} +.radius-8{ + @apply rounded-full +} + +/**/ +.group-radius-0{ + @apply rounded-none +} +.group-radius-1{ + @apply first:rounded-t-sm last:rounded-b-sm +} +.group-radius-2{ + @apply first:rounded-t last:rounded-b +} +.group-radius-3{ + @apply first:rounded-t-md last:rounded-b-md +} +.group-radius-4{ + @apply first:rounded-t-lg last:rounded-b-lg +} +.group-radius-5{ + @apply first:rounded-t-xl last:rounded-b-xl +} +.group-radius-6{ + @apply first:rounded-t-2xl last:rounded-b-2xl +} +.group-radius-7{ + @apply first:rounded-t-3xl last:rounded-b-3xl +} +.group-radius-8{ + @apply first:rounded-t-full last:rounded-b-full +} +/**/ diff --git a/resources/js/Components/Alert/TAlert.vue b/resources/js/Components/Alert/TAlert.vue index e0d4a16..b1b14c6 100644 --- a/resources/js/Components/Alert/TAlert.vue +++ b/resources/js/Components/Alert/TAlert.vue @@ -3,11 +3,7 @@
diff --git a/resources/js/Components/Badge/TBadge.vue b/resources/js/Components/Badge/TBadge.vue index 8d27989..de96e01 100644 --- a/resources/js/Components/Badge/TBadge.vue +++ b/resources/js/Components/Badge/TBadge.vue @@ -4,7 +4,6 @@ 'badge', (collapsible || (selectable && !selectIndicator)) && 'cursor-pointer', selectable && !modelValue && !selectActiveStyle && 'filter grayscale opacity-50', - radiusStyle, styleClass() ]" @click.stop="collapsible && toggle(); (selectable && !selectIndicator) && select()" @@ -74,14 +73,12 @@ diff --git a/resources/js/Components/Button/TButton.vue b/resources/js/Components/Button/TButton.vue index 1311735..f70d1f7 100644 --- a/resources/js/Components/Button/TButton.vue +++ b/resources/js/Components/Button/TButton.vue @@ -1,32 +1,22 @@ diff --git a/resources/js/Layouts/AppLayout.vue b/resources/js/Layouts/AppLayout.vue index 9dc6358..30b0b64 100644 --- a/resources/js/Layouts/AppLayout.vue +++ b/resources/js/Layouts/AppLayout.vue @@ -84,7 +84,7 @@
- +