Skip to content

Commit

Permalink
feat(ui/web): update to use tailwind-primevue css styling
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Shatford <[email protected]>
  • Loading branch information
jordanshatford committed Nov 3, 2024
1 parent aef7327 commit a53e4d9
Show file tree
Hide file tree
Showing 200 changed files with 5,955 additions and 9,407 deletions.
3 changes: 2 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
"@pinia/testing": "^0.1.6",
"@tsconfig/node20": "^20.1.4",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.8.6",
"@types/node": "^22.8.7",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.5.1",
"autoprefixer": "^10.4.20",
"jsdom": "^25.0.1",
"postcss": "^8.4.47",
"postcss-import": "^16.1.0",
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3",
"vite": "^5.4.10",
Expand Down
1 change: 1 addition & 0 deletions apps/web/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default {
plugins: {
'postcss-import': {},
tailwindcss: {},
autoprefixer: {}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/ClipCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ProviderName :provider="clip.provider" class="font-normal" />
</div>
</div>
<div class="flex justify-around gap-2">
<div class="flex justify-around">
<Button
icon="pi pi-play"
title="Play"
Expand Down
4 changes: 1 addition & 3 deletions apps/web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import piniaPluginPersistedState from 'pinia-plugin-persistedstate'
import { createApp } from 'vue'

import { ConfirmationService, PrimeVue, ToastService } from '@cq/ui'
// @ts-expect-error PrimeVue preset not properly typed
import AuraPreset from '@cq/ui/presets/aura'

import App from '@/App.vue'
import { env } from '@/config'
Expand All @@ -22,7 +20,7 @@ Sentry.init({
})

// Prime vue
app.use(PrimeVue, { unstyled: true, pt: AuraPreset })
app.use(PrimeVue, { theme: 'none' })
app.use(ConfirmationService)
app.use(ToastService)

Expand Down
2 changes: 1 addition & 1 deletion packages/player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"devDependencies": {
"@cq/config": "workspace:*",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.8.6",
"@types/node": "^22.8.7",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.5.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"devDependencies": {
"@cq/config": "workspace:*",
"@types/node": "^22.8.6",
"@types/node": "^22.8.7",
"typescript": "^5.6.3"
}
}
2 changes: 1 addition & 1 deletion packages/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"@cq/config": "workspace:*",
"@types/node": "^22.8.6",
"@types/node": "^22.8.7",
"@types/tmi.js": "^1.8.6",
"typescript": "^5.6.3"
}
Expand Down
5 changes: 2 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"type": "module",
"exports": {
".": "./src/index.ts",
"./primeicons": "./src/primevue/icons.ts",
"./presets/aura": "./src/primevue/presets/aura/index.js"
"./primeicons": "./src/primevue/icons.ts"
},
"scripts": {
"build": "pnpm typecheck && vite build",
Expand All @@ -27,7 +26,7 @@
"devDependencies": {
"@cq/config": "workspace:*",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.8.6",
"@types/node": "^22.8.7",
"@vitejs/plugin-vue": "^5.1.4",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.5.1",
Expand Down
48 changes: 25 additions & 23 deletions packages/ui/src/primevue/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
--p-content-border-radius: 6px;
}

/* Light Mode */
/* Light */
:root {
--p-primary-color: var(--p-primary-500);
--p-primary-contrast-color: var(--p-surface-0);
Expand All @@ -46,27 +46,29 @@
}

/*
* Dark Mode
* Change the .p-dark to match the darkMode in tailwind.config.
* For example;
* darkMode: ['selector', '[class*="app-dark"]']
* should match;
* :root.app-dark
* Dark Mode
* Defaults to system, change the selector to match the darkMode in tailwind.config.
* For example;
* darkMode: ['selector', '[class*="app-dark"]']
* should be;
* :root[class="app-dark"] {
*/
:root.app-dark {
--p-primary-color: var(--p-primary-400);
--p-primary-contrast-color: var(--p-surface-900);
--p-primary-hover-color: var(--p-primary-300);
--p-primary-active-color: var(--p-primary-200);
--p-content-border-color: var(--p-surface-700);
--p-content-hover-background: var(--p-surface-800);
--p-content-hover-color: var(--p-surface-0);
--p-highlight-background: color-mix(in srgb, var(--p-primary-400), transparent 84%);
--p-highlight-color: rgba(255, 255, 255, 0.87);
--p-highlight-focus-background: color-mix(in srgb, var(--p-primary-400), transparent 76%);
--p-highlight-focus-color: rgba(255, 255, 255, 0.87);
--p-text-color: var(--p-surface-0);
--p-text-hover-color: var(--p-surface-0);
--p-text-muted-color: var(--p-surface-400);
--p-text-hover-muted-color: var(--p-surface-300);
@media (prefers-color-scheme: dark) {
:root[class='app-dark'] {
--p-primary-color: var(--p-primary-400);
--p-primary-contrast-color: var(--p-surface-900);
--p-primary-hover-color: var(--p-primary-300);
--p-primary-active-color: var(--p-primary-200);
--p-content-border-color: var(--p-surface-700);
--p-content-hover-background: var(--p-surface-800);
--p-content-hover-color: var(--p-surface-0);
--p-highlight-background: color-mix(in srgb, var(--p-primary-400), transparent 84%);
--p-highlight-color: rgba(255, 255, 255, 0.87);
--p-highlight-focus-background: color-mix(in srgb, var(--p-primary-400), transparent 76%);
--p-highlight-focus-color: rgba(255, 255, 255, 0.87);
--p-text-color: var(--p-surface-0);
--p-text-hover-color: var(--p-surface-0);
--p-text-muted-color: var(--p-surface-400);
--p-text-hover-muted-color: var(--p-surface-300);
}
}
76 changes: 0 additions & 76 deletions packages/ui/src/primevue/presets/aura/accordion/index.js

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions packages/ui/src/primevue/presets/aura/accordionheader/index.js

This file was deleted.

21 changes: 0 additions & 21 deletions packages/ui/src/primevue/presets/aura/accordionpanel/index.js

This file was deleted.

Loading

0 comments on commit a53e4d9

Please sign in to comment.