Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions biblionode-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ __screenshots__/
# System files
.DS_Store
Thumbs.db

*storybook.log
storybook-static
3 changes: 3 additions & 0 deletions biblionode-ui/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"plugins": ["prettier-plugin-tailwindcss"],
"tailwindStylesheet": "./src/tailwind.css",
"printWidth": 100,
"semi": true,
"singleQuote": true,
"overrides": [
{
Expand Down
13 changes: 13 additions & 0 deletions biblionode-ui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { StorybookConfig } from '@storybook/angular';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-a11y',
'@storybook/addon-docs',
'@storybook/addon-onboarding',
'@storybook/addon-themes',
],
framework: '@storybook/angular',
};
export default config;
1 change: 1 addition & 0 deletions biblionode-ui/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet" />
29 changes: 29 additions & 0 deletions biblionode-ui/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { Preview } from '@storybook/angular';
import { setCompodocJson } from '@storybook/addon-docs/angular';
import { withThemeByClassName } from '@storybook/addon-themes';
import docJson from '../documentation.json';
setCompodocJson(docJson);

const preview: Preview = {
parameters: {
backgrounds: { disable: true },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;

export const decorators = [
withThemeByClassName({
themes: {
light: 'light bg-gray-100',
dark: 'dark bg-mauve-950',
},
defaultTheme: 'light',
}),
];
10 changes: 10 additions & 0 deletions biblionode-ui/.storybook/tsconfig.doc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This tsconfig is used by Compodoc to generate the documentation for the project.
// If Compodoc is not used, this file can be deleted.
{
"extends": "./tsconfig.json",
// Exclude all files that are not needed for documentation generation.
"exclude": ["../src/test.ts", "../src/**/*.spec.ts", "../src/**/*.stories.ts"],
// Please make sure to include all files from which Compodoc should generate documentation.
"include": ["../src/**/*"],
"files": ["./typings.d.ts"]
}
12 changes: 12 additions & 0 deletions biblionode-ui/.storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../tsconfig.app.json",
"compilerOptions": {
"types": ["node"],
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"moduleResolution": "bundler"
},
"exclude": ["../src/test.ts", "../src/**/*.spec.ts"],
"include": ["../src/**/*.stories.*", "./preview.ts"],
"files": ["./typings.d.ts"]
}
4 changes: 4 additions & 0 deletions biblionode-ui/.storybook/typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.md' {
const content: string;
export default content;
}
37 changes: 35 additions & 2 deletions biblionode-ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
"input": "public"
}
],
"styles": ["src/tailwind.css", "src/styles.scss"]
"styles": [
"src/tailwind.css",
"src/styles.scss"
]
},
"configurations": {
"production": {
Expand Down Expand Up @@ -72,8 +75,38 @@
},
"test": {
"builder": "@angular/build:unit-test"
},
"storybook": {
"builder": "@storybook/angular:start-storybook",
"options": {
"configDir": ".storybook",
"browserTarget": "biblionode-ui:build",
"compodoc": true,
"compodocArgs": [
"-e",
"json",
"-d",
"."
],
"port": 6006
}
},
"build-storybook": {
"builder": "@storybook/angular:build-storybook",
"options": {
"configDir": ".storybook",
"browserTarget": "biblionode-ui:build",
"compodoc": true,
"compodocArgs": [
"-e",
"json",
"-d",
"."
],
"outputDir": "storybook-static"
}
}
}
}
}
}
}
Loading
Loading