From 1acf3776efacc7e2b8491b2f92172539930ce86b Mon Sep 17 00:00:00 2001 From: rijkvanzanten Date: Tue, 20 Jun 2023 17:33:23 -0400 Subject: [PATCH] Add theme section in histoire --- components/histoire.setup.ts | 2 +- components/package.json | 2 +- components/src/theme.css | 13 ---- components/src/theme/colors.story.vue | 96 +++++++++++++++++++++++++++ components/src/theme/fonts.story.vue | 29 ++++++++ components/src/theme/main.css | 65 ++++++++++++++++++ 6 files changed, 192 insertions(+), 15 deletions(-) delete mode 100644 components/src/theme.css create mode 100644 components/src/theme/colors.story.vue create mode 100644 components/src/theme/fonts.story.vue create mode 100644 components/src/theme/main.css diff --git a/components/histoire.setup.ts b/components/histoire.setup.ts index 6c4d23b6..80e09ed9 100644 --- a/components/histoire.setup.ts +++ b/components/histoire.setup.ts @@ -2,7 +2,7 @@ import { defineSetupVue3 } from '@histoire/plugin-vue'; import { createI18n } from 'vue-i18n'; import { createMemoryHistory, createRouter } from 'vue-router'; -import './src/theme.css'; +import './src/theme/main.css'; export const setupVue3 = defineSetupVue3(({ app }) => { app.use( diff --git a/components/package.json b/components/package.json index 06e6a6ac..6f06dd75 100644 --- a/components/package.json +++ b/components/package.json @@ -15,7 +15,7 @@ "exports": { ".": "./dist/index.js", "./package.json": "./package.json", - "./styles": "./src/theme.css" + "./styles": "./src/theme/main.css" }, "main": "dist/index.js", "files": [ diff --git a/components/src/theme.css b/components/src/theme.css deleted file mode 100644 index 89f5bf6d..00000000 --- a/components/src/theme.css +++ /dev/null @@ -1,13 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Fira+Code&family=Inter:wght@300;500;700&family=Poppins:wght@600&display=swap'); - -:root { - --family-display: 'Poppins', sans-serif; - --family-body: 'Inter', sans-serif; - --family-code: 'Fira Code', monospace; - - --primary-100: #f0eeff; - --primary-500: #6644ff; - - --secondary-100: #ffeef9; - --secondary-500: #ff99dd; -} diff --git a/components/src/theme/colors.story.vue b/components/src/theme/colors.story.vue new file mode 100644 index 00000000..87fd9b82 --- /dev/null +++ b/components/src/theme/colors.story.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/components/src/theme/fonts.story.vue b/components/src/theme/fonts.story.vue new file mode 100644 index 00000000..bf753d3a --- /dev/null +++ b/components/src/theme/fonts.story.vue @@ -0,0 +1,29 @@ + + + diff --git a/components/src/theme/main.css b/components/src/theme/main.css new file mode 100644 index 00000000..3380fc0f --- /dev/null +++ b/components/src/theme/main.css @@ -0,0 +1,65 @@ +@import url('https://fonts.googleapis.com/css2?family=Fira+Code&family=Inter:wght@300;500;700&family=Poppins:wght@600&display=swap'); + +:root { + --family-display: 'Poppins', sans-serif; + --family-body: 'Inter', sans-serif; + --family-code: 'Fira Code', monospace; + + --primary: var(--purple-400); + --secondary: var(--pink-200); + + --purple-50: #ede5ff; + --purple-100: #d0c0fd; + --purple-200: #af95fd; + --purple-300: #8968ff; + --purple-400: #6644ff; + --purple-500: #3419fd; + --purple-600: #1216f7; + --purple-700: #000cef; + --purple-800: #0004eb; + --purple-900: #0000dc; + + --pink-50: #fee7f7; + --pink-100: #fcc2eb; + --pink-200: #ff99dd; + --pink-300: #ff6ecc; + --pink-400: #ff4cba; + --pink-500: #ff28a7; + --pink-600: #f527a1; + --pink-700: #dc2798; + --pink-800: #c52791; + --pink-900: #9a2685; + + --green-50: #dff6f1; + --green-100: #afe9d9; + --green-200: #78dcc1; + --green-300: #2ecda8; + --green-400: #00c095; + --green-500: #00b284; + --green-600: #00a476; + --green-700: #009366; + --green-800: #008258; + --green-900: #00653c; + + --orange-50: #fff4e3; + --orange-100: #ffe3ba; + --orange-200: #ffd18f; + --orange-300: #ffbe64; + --orange-400: #ffb048; + --orange-500: #ffa339; + --orange-600: #fa9736; + --orange-700: #f38832; + --orange-800: #ec7a2f; + --orange-900: #e0642b; + + --red-50: #fce5e9; + --red-100: #f7bdc8; + --red-200: #f193a5; + --red-300: #ea6b82; + --red-400: #e35169; + --red-500: #dd3f53; + --red-600: #cd3a51; + --red-700: #b7344d; + --red-800: #a32f4a; + --red-900: #802442; +}