Skip to content

Commit

Permalink
#1446 - updated preview config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jura committed Nov 19, 2024
1 parent c628ea1 commit f830079
Show file tree
Hide file tree
Showing 28 changed files with 5,278 additions and 6,966 deletions.
19 changes: 13 additions & 6 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import '!style-loader!css-loader!sass-loader!../stories/assets/scss/base-minimal
// }

// Configure Storybook
export const parameters = {
const parameters = {
// actions: { disable: true },
controls: {
matchers: {
Expand Down Expand Up @@ -53,8 +53,8 @@ export const parameters = {
options: {
storySort: {
method: 'alphabetical',
order: ['Getting started', ['Intro', 'How to use our design system?', 'Browser support'], 'Foundation', 'Components', 'Patterns', 'Utilities', 'Templates'],
includeName: true
order: ['Getting started', ['Intro', 'How to use our design system?', 'Browser support', 'Internationalization'], 'Foundation', 'Components', 'Patterns', 'Utilities', 'Templates'],
includeNames: true
},
},
chromatic: {
Expand All @@ -71,7 +71,7 @@ export const parameters = {
}

/* Implementing locale for language switcher */
export const globalTypes = {
const globalTypes = {
locale: {
title: 'Locale',
description: 'locale',
Expand Down Expand Up @@ -202,5 +202,12 @@ const setAccentClass = (Story, context) => {
)
}

export const decorators = [getLangCode, sbFrameReset, setDirection, setAccentClass];
export const tags = ['autodocs'];
// export const decorators = [getLangCode, sbFrameReset, setDirection, setAccentClass];
// export const tags = ['autodocs'];

export default {
parameters: parameters,
globalTypes: globalTypes,
decorators: [getLangCode, sbFrameReset, setDirection, setAccentClass],
tags: ['autodocs'],
}
2 changes: 1 addition & 1 deletion docs/js/accordion.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/all.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/download-modal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/expand-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/filter-search-bar.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/fitText.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/lang-switcher.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/lazyload.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/lightbox-gallery.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/multi-select.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/navigation-data.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/navigation.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/our-expertise.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/parallax.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/resize.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/sdg-modal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/select.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/sidebar.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/smartresize.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/smooth-bg-change.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/sticky.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/js/swiper.min.js

Large diffs are not rendered by default.

12,145 changes: 5,228 additions & 6,917 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --progress",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build --debug-webpack --loglevel verbose"
"build-storybook": "storybook build --loglevel verbose"
},
"keywords": [
"UNDP",
Expand Down Expand Up @@ -127,5 +127,6 @@
},
"bugs": {
"url": "https://github.com/undp/design-system/issues"
}
},
"packageManager": "[email protected]+sha512.65a9c38a8172948f617a53619762cd77e12b9950fe1f9239debcb8d62c652f2081824b986fee7c0af6c0a7df615becebe4bf56e17ec27214a87aa29d9e038b4b"
}
5 changes: 1 addition & 4 deletions stories/Atom/Accessibility/Accessibility.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { Meta, Story } from "@storybook/blocks";

<Meta
title="Foundation/Accessibility"

/>
<Meta title="Foundation/Accessibility" />

# Accessibility

Expand Down
22 changes: 9 additions & 13 deletions stories/Documentation/Howtouse.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Meta, Story } from "@storybook/blocks";
import { Link } from '@storybook/addon-links/react';

<Meta
title="Getting started/How to use our design system?"
Expand All @@ -11,7 +10,7 @@ Using the UNDP design system is very simple. To use the design system you need t

### Steps to integrate

- Include the base styling CSS file in your project [https://cdn.jsdelivr.net/npm/@undp/design-system/docs/css/base-minimal.min.css](https://cdn.jsdelivr.net/npm/@undp/design-system/docs/css/base-minimal.min.css).
- Include the base styling CSS file in your project [https://cdn.jsdelivr.net/npm/@undp/design-system-assets/css/base-minimal.min.css](https://cdn.jsdelivr.net/npm/@undp/design-system-assets/css/base-minimal.min.css).
- Browse the component which you want to integrate.
- Check out the documentation page of the component.
- Copy the HTML of the component in your project.
Expand All @@ -33,36 +32,33 @@ git clone
2. Install project dependencies

```bash
yarn install
npm install
```

3. Runs storybook locally

```bash
yarn run storybook
npm run storybook
```

4. Build storybook

```bash
yarn run build-storybook
npm run build-storybook
```

5. Linting on codebase
5. Run this command whenever compiling CSS and JS

```bash
yarn run lint
```

6. Run this command whenever compiling CSS and JS

```bash
yarn run build
npm run build
```

### Dependencies
(need to be loaded separately)

- jQuery [(https://www.jquery.com/)](https://www.jquery.com/)
- GSAP [(https://greensock.com/gsap/)](https://greensock.com/gsap/)
- Swiper [(https://swiperjs.com/)](https://swiperjs.com/)

### Assets (CSS/JS/Icons) Path

Expand Down
4 changes: 2 additions & 2 deletions stories/Documentation/intro.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, Source, Canvas, Story, Preview } from "@storybook/blocks";
import { Heading } from "../Atom/Typography/Heading/Heading";
import { Meta, Source, Canvas, Story, Preview } from '@storybook/blocks';
import { Heading } from '../Atom/Typography/Heading/Heading';
import { Video } from "../Atom/Video/Video";
import "./documentation.scss";
import { FeaturedContentCard } from "../Components/UIcomponents/Cards/FeaturedCard/FeaturedContentCard";
Expand Down

0 comments on commit f830079

Please sign in to comment.