-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add the palette & theme generation (#140)
* feat: add the palette & theme generation * update eslint * add storybook and theme * add theme to published package * publish the color palette * figure out how to publish types * fix build and tsify constants * refactor: make storybook typescript and update github action a little * better github actions * tsify Utils * tsify state * tsify yamlutils * tsify YamlUtils * tsify some components * tsify misc components * finish typescript migration * some last minute changes
- Loading branch information
1 parent
bf867b9
commit 5831718
Showing
64 changed files
with
9,410 additions
and
2,650 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,5 @@ dist-ssr | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
*storybook.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** @type { import('@storybook/vue3-vite').StorybookConfig } */ | ||
const config = { | ||
stories: ["../{src,theme}/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-themes", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: { | ||
name: "@storybook/vue3-vite", | ||
options: {}, | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import {withThemeByClassName} from "@storybook/addon-themes"; | ||
|
||
// @ts-expect-error no types needed here | ||
import "../src/scss/theme-light.scss"; | ||
// @ts-expect-error no types needed here | ||
import "../src/scss/theme-dark.scss"; | ||
|
||
/** @type { import('@storybook/vue3').Preview } */ | ||
const preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
decorators: [ | ||
withThemeByClassName({ | ||
themes: { | ||
light: "light", | ||
dark: "dark", | ||
}, | ||
defaultTheme: "light", | ||
}), | ||
] | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import globals from "globals"; | ||
import storybook from "eslint-plugin-storybook" | ||
import pluginJs from "@eslint/js"; | ||
import tseslint from "typescript-eslint"; | ||
import pluginVue from "eslint-plugin-vue"; | ||
import {includeIgnoreFile} from "@eslint/compat"; | ||
import path from "node:path"; | ||
import {fileURLToPath} from "node:url"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const gitignorePath = path.resolve(__dirname, ".gitignore"); | ||
|
||
/** @type {import('eslint').Linter.Config[]} */ | ||
export default [ | ||
includeIgnoreFile(gitignorePath), | ||
...storybook.configs["flat/recommended"], | ||
{ | ||
files: ["**/*.{js,mjs,cjs,ts,vue}"], | ||
ignores: ["node_modules", "node"], | ||
}, | ||
{languageOptions: {globals: globals.browser}}, | ||
pluginJs.configs.recommended, | ||
...tseslint.configs.recommended, | ||
{ | ||
files: ["**/*.spec.js", "**/*.spec.ts", "vite.config.js", "vitest.config.js"], | ||
languageOptions: {globals: globals.node}, | ||
}, | ||
...pluginVue.configs["flat/strongly-recommended"], | ||
{ | ||
files: ["**/*.vue", "**/*.tsx", "**/*.jsx"], | ||
languageOptions: {parserOptions: {parser: tseslint.parser}}, | ||
rules: { | ||
"vue/this-in-template": ["error"], | ||
"vue/html-indent": [ | ||
"error", | ||
4, | ||
{ | ||
baseIndent: 1, | ||
}, | ||
], | ||
"vue/script-indent": [ | ||
"error", | ||
4, | ||
{ | ||
baseIndent: 1, | ||
}, | ||
], | ||
"vue/max-attributes-per-line": [ | ||
"error", | ||
{ | ||
singleline: 7, | ||
}, | ||
], | ||
"vue/multi-word-component-names": ["off"], | ||
"vue/no-deprecated-router-link-tag-prop": "off", | ||
"vue/object-curly-spacing": ["error", "never"], | ||
"vue/block-order": [ | ||
"error", | ||
{ | ||
order: ["template", "script", "style"], | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
rules: { | ||
quotes: ["error", "double"], | ||
"object-curly-spacing": ["error", "never"], | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
// args prefixed with '_' are ignored | ||
argsIgnorePattern: "^_", | ||
}, | ||
], | ||
"@typescript-eslint/no-this-alias": "off", | ||
"@typescript-eslint/no-explicit-any": "off" | ||
} | ||
} | ||
]; |
Oops, something went wrong.