Skip to content

Commit

Permalink
[FEATURE] Organiser les composants comme dans Figma (PIX-14598)
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Nov 18, 2024
2 parents eee12f9 + 499d3c6 commit 2a4e929
Show file tree
Hide file tree
Showing 65 changed files with 144 additions and 121 deletions.
3 changes: 3 additions & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ import storybookCustomTheme from './storybook-custom-theme';

addons.setConfig({
theme: storybookCustomTheme,
sidebar: {
showRoots: true,
},
});
34 changes: 23 additions & 11 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,35 @@ const preview = {
options: {
storySort: {
order: [
'Utiliser Pix UI',
['Installation', 'Utiliser un composant'],
'Développement',
'CHANGELOG',
'Pix UI',
[
'Design System',
'Créer un composant',
'Bonnes pratiques',
'Breaking changes',
'Faire une release',
'Architecture',
'Storybook',
'Installation',
'Utiliser un composant',
'Développement',
[
'Design System',
'Créer un composant',
'Bonnes pratiques',
'Breaking changes',
'Faire une release',
'Architecture',
'Storybook',
],
],
'Design Tokens',
'Actions',
'Forms',
'Navigation',
'Feedback',
'Data display',
'Overlay',
'Other',
],
},
},
},

tags: ['autodocs']
tags: ['autodocs'],
};
export default preview;
3 changes: 3 additions & 0 deletions app/components/pix-checkbox.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
// WORKAROUND: necessary for storybook to resolve the import
import '@formatjs/intl';

export { default } from '@1024pix/pix-ui/components/pix-checkbox';
3 changes: 3 additions & 0 deletions app/components/pix-radio-button.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
// WORKAROUND: necessary for storybook to resolve the import
import '@formatjs/intl';

export { default } from '@1024pix/pix-ui/components/pix-radio-button';
7 changes: 3 additions & 4 deletions app/stories/form.mdx → app/stories/form-example.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Meta, Story, Canvas } from '@storybook/addon-docs';
import * as stories from './form.stories';
import * as ComponentStories from './form-example.stories';

<Meta of={stories} />
<Meta of={ComponentStories} />

# Formulaire avec les composants Pix UI

Un formulaire complet avec les composants Pix UI :

<Story of={stories.form} height={700} />

<Story of={ComponentStories.form} height={700} />
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { action } from '@storybook/addon-actions';

export default {
title: 'Form/Exemple de formulaire',
title: 'Forms/Exemple de formulaire',
};

export const form = (args) => {
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-background-header.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Layout/Background Header',
title: 'Other/Background Header',
};

export const backgroundHeader = (args) => {
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-banner.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Notification/Banner',
title: 'Feedback/Banner',
argTypes: {
actionLabel: {
name: 'actionLabel',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-block.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Layout/Block',
title: 'Other/Contenu',
argTypes: {
shadow: {
name: 'shadow',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-button-link.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Basics/ButtonLink',
title: 'Actions/ButtonLink',

argTypes: {
href: {
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-button-upload.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { action } from '@storybook/addon-actions';

export default {
title: 'Basics/ButtonUpload',
title: 'Actions/ButtonUpload',
argTypes: {
id: {
name: 'id',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-button.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { ICONS } from '../../addon/helpers/icons';

export default {
title: 'Basics/Button',
title: 'Actions/Button',
argTypes: {
type: {
name: 'type',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-checkbox-variant-tile.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import pixCheckboxStories from './pix-checkbox.stories.js';

export default {
title: 'Form/Inputs/Checkbox/Variant Tile',
title: 'Forms/Checkbox/Variant Tile',
argTypes: {
variant: {
name: 'variant',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-checkbox.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Form/Inputs/Checkbox',
title: 'Forms/Checkbox',
argTypes: {
id: {
name: 'id',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-collapsible.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { ICONS } from '../../addon/helpers/icons';

export default {
title: 'Others/Collapsible',
title: 'Data display/Collapsible',
argTypes: {
iconName: {
name: 'iconName',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-filter-banner.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { action } from '@storybook/addon-actions';

export default {
title: 'Form/Filter banner',
title: 'Other/Filter banner',
argTypes: {
title: {
name: 'title',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { action } from '@storybook/addon-actions';

export default {
title: 'Form/Filterable and searchable select',
title: 'Other/Filterable and searchable select',
argTypes: {
label: {
name: 'label',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-icon-button.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { action } from '@storybook/addon-actions';
import { ICONS } from '../../addon/helpers/icons';

export default {
title: 'Basics/Icon button',
title: 'Actions/Icon button',
argTypes: {
ariaLabel: {
name: 'ariaLabel',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-icon.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { ICONS } from '../../addon/helpers/icons.js';

export default {
title: 'Others/Icon',
title: 'Design Tokens/Icon',
argTypes: {
name: {
name: 'name',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-indicator-card.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { ICONS } from '../../addon/helpers/icons.js';

export default {
title: 'Others/Indicator Card',
title: 'Other/Indicator Card',
argTypes: {
title: {
name: 'Title',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-input-code.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Form/Inputs/Code',
title: 'Forms/Code',
argTypes: {
ariaLabel: {
name: 'ariaLabel',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-input-password.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Form/Inputs/Password',
title: 'Forms/Password',
argTypes: {
id: {
name: 'id',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-input.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Form/Inputs/Input',
title: 'Forms/Input',
argTypes: {
id: {
name: 'id',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-label.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Form/Label',
title: 'Forms/Label',
argTypes: {
for: {
name: 'for',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-message.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Notification/Message',
title: 'Feedback/Message',
render: (args) => ({
template: hbs`<PixMessage @type={{this.type}} @withIcon={{this.withIcon}}>
Ceci est un message
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-modal.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Basics/Modal',
title: 'Overlay/Modal',
render: (args) => ({
template: hbs`<PixModal
@showModal={{this.showModal}}
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-multi-select.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { action } from '@storybook/addon-actions';

export default {
title: 'Form/Multi Select',
title: 'Forms/Multi Select',
render: (args) => ({
template: hbs`{{! template-lint-disable no-forbidden-elements }}
<style>
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-navigation.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Layout/Navigation',
title: 'Navigation/Navigation',
argTypes: {
variant: {
description: 'Variante de la navigation',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-pagination.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Basics/Pagination',
title: 'Navigation/Pagination',
render: (args) => ({
template: hbs`<PixPagination
@pagination={{this.pagination}}
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-progress-gauge.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Others/Progress Gauge',
title: 'Data display/Progress Gauge',
argTypes: {
value: {
name: 'value',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-radio-button-variant-tile.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import pixRadioButtonStories from './pix-radio-button.stories.js';

export default {
title: 'Form/Inputs/Radio Button/Variant Tile',
title: 'Forms/Radio Button/Variant Tile',
argTypes: {
variant: {
name: 'variant',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-radio-button.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Form/Inputs/Radio Button',
title: 'Forms/Radio Button',
argTypes: {
id: {
name: 'id',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-return-to.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Basics/Return To',
title: 'Other/Return To',
render: (args) => ({
template: hbs`<PixReturnTo
@route='profile'
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-search-input.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { hbs } from 'ember-cli-htmlbars';
import { action } from '@storybook/addon-actions';

export default {
title: 'Others/SearchInput',
title: 'Forms/SearchInput',
argTypes: {
id: {
name: 'id',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-select.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { action } from '@storybook/addon-actions';
import { ICONS } from '../../addon/helpers/icons';

export default {
title: 'Form/Select',
title: 'Forms/Select',
argTypes: {
options: {
name: 'options',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-selectable-tag.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'basics/Tag/Selectable Tag',
title: 'Data display/Tag/Selectable Tag',
argTypes: {
label: {
name: 'label',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-sidebar.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Basics/Sidebar',
title: 'Navigation/Sidebar',
argTypes: {
showSidebar: {
name: 'showSidebar',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-stars.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Others/PixStars',
title: 'Data display/PixStars',
argTypes: {
count: {
name: 'count',
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-tag.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Basics/Tag',
title: 'Data display/Tag',
render: (args) => ({
template: hbs`<PixTag @color={{this.color}}>
Contenu du tag
Expand Down
2 changes: 1 addition & 1 deletion app/stories/pix-textarea.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hbs } from 'ember-cli-htmlbars';

export default {
title: 'Form/Textarea',
title: 'Forms/Textarea',
argTypes: {
id: {
name: 'id',
Expand Down
Loading

0 comments on commit 2a4e929

Please sign in to comment.