-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR introduces some changes to the documentation. It does not change the released scss package. Update package manager to use modern yarn. Updating to the latest Storybook 8.1.3 Use Vite for compilation instead of Webpack Remove React as a direct dev dependency Simplify the left sidebar by only showing the documentation pages instead of all the "stories" Add links to source code from relevant documentation pages Update the Table of Contents to read a bit better. Update the side bar styles to be a bit nicer.
- Loading branch information
1 parent
cb5ffff
commit ae1b487
Showing
88 changed files
with
12,870 additions
and
19,448 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[*.{js,json,yml}] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
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,4 @@ | ||
/.yarn/** linguist-vendored | ||
/.yarn/releases/* binary | ||
/.yarn/plugins/**/* binary | ||
/.pnp.* binary linguist-generated |
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 |
---|---|---|
|
@@ -16,14 +16,14 @@ jobs: | |
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
node-version: '18.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install 🔧 | ||
run: | # Install npm packages | ||
npm ci | ||
yarn install --immutable | ||
- name: Build 🔧 | ||
run: | # build the Storybook files | ||
npm run build-storybook | ||
yarn build-storybook | ||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
|
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
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# Tools | ||
tools/templates | ||
.yarn/* |
File renamed without changes
File renamed without changes
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 |
---|---|---|
@@ -1,42 +1,42 @@ | ||
/** @type { import('@storybook/html-webpack5').StorybookConfig } */ | ||
import { join, dirname } from 'path' | ||
|
||
/** | ||
* This function is used to resolve the absolute path of a package. | ||
* It is needed in projects that use Yarn PnP or are set up within a monorepo. | ||
*/ | ||
function getAbsolutePath(value) { | ||
return dirname(require.resolve(join(value, 'package.json'))) | ||
} | ||
|
||
/** @type { import('@storybook/html-vite').StorybookConfig } */ | ||
const config = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
{ | ||
name: '@storybook/addon-essentials', | ||
options: { | ||
actions: false, | ||
}, | ||
}, | ||
{ | ||
name: 'storybook-design-token', | ||
options: { | ||
preserveCSSVars: true, | ||
}, | ||
}, | ||
{ | ||
name: '@storybook/addon-styling', | ||
name: '@storybook/addon-essentials', | ||
options: { | ||
sass: { | ||
// Require your Sass preprocessor here | ||
implementation: require('sass'), | ||
}, | ||
backgrounds: false, | ||
}, | ||
}, | ||
'@storybook/addon-mdx-gfm', | ||
], | ||
staticDirs: [ | ||
{ | ||
from: './assets', | ||
to: '/public', | ||
}, | ||
], | ||
framework: { | ||
name: '@storybook/html-webpack5', | ||
name: getAbsolutePath('@storybook/html-vite'), | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: 'tag', | ||
}, | ||
core: { | ||
disableTelemetry: true, // 👈 Disables telemetry | ||
}, | ||
staticDirs: ['./public'], | ||
} | ||
|
||
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,13 @@ | ||
<style lang="sass"> | ||
button[data-action='collapse-root'] { | ||
color: hsl(273, 22%, 18%); | ||
text-transform: capitalize; | ||
font-size: 12px; | ||
letter-spacing: normal; | ||
font-weight: 600; | ||
} | ||
|
||
#storybook-explorer-searchfield { | ||
background-color: white; | ||
} | ||
</style> |
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 |
---|---|---|
@@ -1,16 +1,6 @@ | ||
import { addons } from '@storybook/manager-api' | ||
import rolemodelTheme from './rolemodelTheme' | ||
import OpticsTheme from './theme' | ||
|
||
addons.setConfig({ | ||
enableShortcuts: false, | ||
theme: rolemodelTheme, | ||
toolbar: { | ||
fullscreen: { hidden: true }, | ||
outline: { hidden: true }, | ||
zoom: { hidden: true }, | ||
measure: { hidden: true }, | ||
backgrounds: { hidden: true }, | ||
viewport: { hidden: true }, | ||
grid: { hidden: true }, | ||
}, | ||
theme: OpticsTheme, | ||
}) |
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
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
import { create } from '@storybook/theming' | ||
|
||
const theme = create({ | ||
base: 'light', | ||
brandTitle: 'Optics, a RoleModel Design System', | ||
brandUrl: 'https://docs.optics.rolemodel.design/', | ||
brandImage: './public/optics-logo.svg', | ||
brandTarget: '_self', | ||
// UI | ||
colorSecondary: 'hsl(216 48% 40%)', // --op-color-primary-base | ||
appBg: 'hsl(216 48% 90%)', // --op-color-primary-plus-five | ||
appContentBg: 'hsl(216 48% 90%)', // --op-color-primary-plus-five | ||
appBorderColor: 'hsl(216 4% 90%)', // --op-color-border a.k.a --op-color-neutral-plus-five | ||
|
||
// Typography | ||
fontBase: "'Noto Sans', 'Noto Serif', sans-serif", | ||
fontCode: 'monospace', | ||
|
||
// Text colors | ||
textColor: 'hsl(216 48% 20%)', // --op-color-primary-on-plus-five | ||
|
||
// Toolbar default and active colors | ||
barBg: 'hsl(216 4% 98%)', // --op-color-neutral-plus-eight | ||
barTextColor: 'hsl(216 4% 4%)', // --op-color-neutral-on-plus-eight | ||
}) | ||
|
||
export default theme |
Oops, something went wrong.