diff --git a/frontend/package-lock.json b/frontend/package-lock.json index dcda36f..cf4f308 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -2989,6 +2989,18 @@ "node": ">=6.0.0" } }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", @@ -5825,6 +5837,14 @@ "integrity": "sha512-7VPMEPuYznPSoR21NE1zvd2Xna6c/CloiZCfcMXR1Jny6PjX0N4Nsa38zcBFo/FMK+BlA+FLKbJCQ0i2yxp+Xg==", "dev": true }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/bundle": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/bundle/-/bundle-2.1.0.tgz", @@ -16903,6 +16923,29 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/spawn-error-forwarder": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz", @@ -17548,6 +17591,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/terser": { + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz", + "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 9db7cbf..4f65cf1 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -2,6 +2,7 @@ "name": "realt-properties-map-frontend", "version": "1.7.1", "license": "Apache-2.0", + "type": "module", "scripts": { "dev": "PORT=3010 vite", "build": "vite build", diff --git a/frontend/postcss.config.cjs b/frontend/postcss.config.js similarity index 94% rename from frontend/postcss.config.cjs rename to frontend/postcss.config.js index a2fb072..1f5e3a7 100644 --- a/frontend/postcss.config.cjs +++ b/frontend/postcss.config.js @@ -1,4 +1,4 @@ -module.exports = { +export default { plugins: { 'tailwindcss': {}, 'postcss-preset-mantine': {}, diff --git a/frontend/src/components/Map/MapWrapper.scss b/frontend/src/components/Map/MapWrapper.scss index b40108c..061a45f 100644 --- a/frontend/src/components/Map/MapWrapper.scss +++ b/frontend/src/components/Map/MapWrapper.scss @@ -1,4 +1,4 @@ -@use '../../theme/variables.scss' as *; +@forward '../../theme/variables'; .map { height: 100vh; diff --git a/frontend/src/components/PropertyPanel/propertyPanelContent.scss b/frontend/src/components/PropertyPanel/propertyPanelContent.scss index f2c7464..354521e 100644 --- a/frontend/src/components/PropertyPanel/propertyPanelContent.scss +++ b/frontend/src/components/PropertyPanel/propertyPanelContent.scss @@ -1,65 +1,65 @@ -@use '../../theme/variables' as *; +@forward '../../theme/variables'; .red-property { - color: $red; + color: var(--red); } .green-property { - color: $green; + color: var(--green); } .yellow-property { - color: $yellow; + color: var(--yellow); } .singleFamily-icon { - color: $singleFamily; + color: var(--singleFamily); } .multiFamily-icon { - color: $multiFamily; + color: var(--multiFamily); background-image: linear-gradient(45deg, transparent 50%, rgba(0,0,0,0.1) 50%); background-size: 10px 10px; } .duplex-icon { - color: $duplex; + color: var(--duplex); } .condominium-icon { - color: $condominium; + color: var(--condominium); } .mixedUse-icon { - color: $mixedUse; + color: var(--mixedUse); background-image: linear-gradient(-45deg, transparent 50%, rgba(0,0,0,0.1) 50%); background-size: 10px 10px; } .quadplex-icon { - color: $quadplex; + color: var(--quadplex); } .commercial-icon { - color: $commercial; + color: var(--commercial); } .sfrPortfolio-icon { - color: $sfrPortfolio; + color: var(--sfrPortfolio); background-image: linear-gradient(90deg, transparent 50%, rgba(0,0,0,0.1) 50%); background-size: 10px 10px; } .mfrPortfolio-icon { - color: $mfrPortfolio; + color: var(--mfrPortfolio); background-image: linear-gradient(0deg, transparent 50%, rgba(0,0,0,0.1) 50%); background-size: 10px 10px; } .loan-icon { - color: $loan; + color: var(--loan); } .stack-icon { - color: $stack; + color: var(--stack); } \ No newline at end of file diff --git a/frontend/src/index.scss b/frontend/src/index.scss index 6e6a7a7..8137354 100644 --- a/frontend/src/index.scss +++ b/frontend/src/index.scss @@ -1,4 +1,4 @@ -@use './theme/variables.scss' as *; +@forward './theme/variables'; @tailwind base; @tailwind components; diff --git a/frontend/src/theme/variables.scss b/frontend/src/theme/variables.scss index 06ede73..712d7a7 100644 --- a/frontend/src/theme/variables.scss +++ b/frontend/src/theme/variables.scss @@ -1,15 +1,17 @@ -$red: #f44336; -$green: #43a047; -$yellow: #fdd835; +:root { + --red: #f44336; + --green: #43a047; + --yellow: #fdd835; -$singleFamily: #1e88e5; -$multiFamily: #43a047; -$duplex: #ff9800; -$condominium: #9c27b0; -$mixedUse: #e91e63; -$quadplex: #fdd835; -$commercial: #f44336; -$sfrPortfolio: #795548; -$mfrPortfolio: #009688; -$loan: #673ab7; -$stack: #757575; \ No newline at end of file + --singleFamily: #1e88e5; + --multiFamily: #43a047; + --duplex: #ff9800; + --condominium: #9c27b0; + --mixedUse: #e91e63; + --quadplex: #fdd835; + --commercial: #f44336; + --sfrPortfolio: #795548; + --mfrPortfolio: #009688; + --loan: #673ab7; + --stack: #757575; +} \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 07b0ffb..5b35f4d 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' +import * as sass from 'sass-embedded' -// https://vite.dev/config/ export default defineConfig({ plugins: [react()], server: { @@ -14,6 +14,15 @@ export default defineConfig({ global: 'window', }, css: { - postcss: './postcss.config.cjs' + preprocessorOptions: { + scss: { + implementation: sass, + sassOptions: { + style: 'expanded', + sourceMap: true, + } + } + }, + postcss: './postcss.config.js' } })