@1024pix/pix-ui 38.0.0 → 38.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/.circleci/config.yml +31 -39
  2. package/.nvmrc +1 -1
  3. package/.storybook/main.js +7 -5
  4. package/.storybook/preview.js +35 -32
  5. package/CHANGELOG.md +20 -0
  6. package/app/stories/form.stories.js +4 -0
  7. package/app/stories/{pix-background-header.stories.mdx → pix-background-header.mdx} +6 -6
  8. package/app/stories/pix-background-header.stories.js +4 -0
  9. package/app/stories/{pix-banner.stories.mdx → pix-banner.mdx} +19 -30
  10. package/app/stories/pix-banner.stories.js +49 -46
  11. package/app/stories/{pix-block.stories.mdx → pix-block.mdx} +5 -7
  12. package/app/stories/pix-block.stories.js +14 -11
  13. package/app/stories/{pix-button-link.stories.mdx → pix-button-link.mdx} +6 -14
  14. package/app/stories/pix-button-link.stories.js +87 -87
  15. package/app/stories/{pix-button-upload.stories.mdx → pix-button-upload.mdx} +5 -8
  16. package/app/stories/pix-button-upload.stories.js +62 -59
  17. package/app/stories/{pix-button.stories.mdx → pix-button.mdx} +15 -28
  18. package/app/stories/pix-button.stories.js +152 -149
  19. package/app/stories/pix-checkbox.mdx +71 -0
  20. package/app/stories/pix-checkbox.stories.js +69 -66
  21. package/app/stories/pix-collapsible.mdx +31 -0
  22. package/app/stories/pix-collapsible.stories.js +16 -13
  23. package/app/stories/{pix-dropdown.stories.mdx → pix-dropdown.mdx} +9 -17
  24. package/app/stories/pix-dropdown.stories.js +114 -110
  25. package/app/stories/{pix-filter-banner.stories.mdx → pix-filter-banner.mdx} +5 -7
  26. package/app/stories/pix-filter-banner.stories.js +36 -33
  27. package/app/stories/{pix-filterable-and-searchable-select.stories.mdx → pix-filterable-and-searchable-select.mdx} +7 -17
  28. package/app/stories/pix-filterable-and-searchable-select.stories.js +136 -133
  29. package/app/stories/{pix-icon-button.stories.mdx → pix-icon-button.mdx} +8 -16
  30. package/app/stories/pix-icon-button.stories.js +60 -57
  31. package/app/stories/{pix-indicator-card.stories.mdx → pix-indicator-card.mdx} +6 -10
  32. package/app/stories/pix-indicator-card.stories.js +37 -34
  33. package/app/stories/{pix-input-code.stories.mdx → pix-input-code.mdx} +5 -7
  34. package/app/stories/pix-input-code.stories.js +55 -52
  35. package/app/stories/{pix-input-password.stories.mdx → pix-input-password.mdx} +22 -23
  36. package/app/stories/pix-input-password.stories.js +60 -57
  37. package/app/stories/{pix-input.stories.mdx → pix-input.mdx} +14 -20
  38. package/app/stories/pix-input.stories.js +55 -52
  39. package/app/stories/pix-message.mdx +54 -0
  40. package/app/stories/pix-message.stories.js +40 -36
  41. package/app/stories/{pix-modal.stories.mdx → pix-modal.mdx} +5 -7
  42. package/app/stories/pix-modal.stories.js +31 -30
  43. package/app/stories/{pix-multi-select.stories.mdx → pix-multi-select.mdx} +9 -21
  44. package/app/stories/pix-multi-select.stories.js +106 -99
  45. package/app/stories/{pix-pagination.stories.mdx → pix-pagination.mdx} +8 -16
  46. package/app/stories/pix-pagination.stories.js +114 -111
  47. package/app/stories/{pix-progress-gauge.stories.mdx → pix-progress-gauge.mdx} +6 -10
  48. package/app/stories/pix-progress-gauge.stories.js +43 -40
  49. package/app/stories/{pix-radio-button.stories.mdx → pix-radio-button.mdx} +13 -15
  50. package/app/stories/pix-radio-button.stories.js +35 -32
  51. package/app/stories/pix-return-to.mdx +34 -0
  52. package/app/stories/pix-return-to.stories.js +32 -32
  53. package/app/stories/{pix-search-input.stories.mdx → pix-search-input.mdx} +5 -7
  54. package/app/stories/pix-search-input.stories.js +56 -52
  55. package/app/stories/{pix-select.stories.mdx → pix-select.mdx} +12 -28
  56. package/app/stories/pix-select.stories.js +171 -168
  57. package/app/stories/pix-selectable-tag.mdx +37 -0
  58. package/app/stories/pix-selectable-tag.stories.js +37 -34
  59. package/app/stories/{pix-sidebar.stories.mdx → pix-sidebar.mdx} +5 -7
  60. package/app/stories/pix-sidebar.stories.js +28 -25
  61. package/app/stories/{pix-stars.stories.mdx → pix-stars.mdx} +5 -7
  62. package/app/stories/pix-stars.stories.js +29 -26
  63. package/app/stories/{pix-tag.stories.mdx → pix-tag.mdx} +9 -10
  64. package/app/stories/pix-tag.stories.js +39 -39
  65. package/app/stories/{pix-textarea.stories.mdx → pix-textarea.mdx} +6 -7
  66. package/app/stories/pix-textarea.stories.js +37 -39
  67. package/app/stories/pix-toggle.mdx +28 -0
  68. package/app/stories/pix-toggle.stories.js +52 -49
  69. package/app/stories/{pix-tooltip.stories.mdx → pix-tooltip.mdx} +14 -28
  70. package/app/stories/pix-tooltip.stories.js +57 -54
  71. package/docs/{architecture.stories.mdx → architecture.mdx} +1 -1
  72. package/docs/{breaking-changes.stories.mdx → breaking-changes.mdx} +1 -1
  73. package/docs/changelog.mdx +6 -0
  74. package/docs/{colors-palette.stories.mdx → colors-palette.mdx} +1 -3
  75. package/docs/{create-component.stories.mdx → create-component.mdx} +24 -30
  76. package/docs/{design-system.stories.mdx → design-system.mdx} +1 -1
  77. package/docs/{design-tokens.stories.mdx → design-tokens.mdx} +1 -1
  78. package/docs/{good-practices-a11y.stories.mdx → good-practices-a11y.mdx} +1 -1
  79. package/docs/{good-practices-design.stories.mdx → good-practices-design.mdx} +1 -1
  80. package/docs/{good-practices-responsive.stories.mdx → good-practices-responsive.mdx} +1 -1
  81. package/docs/{good-practices-style-css.stories.mdx → good-practices-style-css.mdx} +1 -1
  82. package/docs/{good-practices-tests.stories.mdx → good-practices-tests.mdx} +1 -1
  83. package/docs/{make-a-release.stories.mdx → make-a-release.mdx} +1 -1
  84. package/docs/{pix-design-tokens-dev.stories.mdx → pix-design-tokens-dev.mdx} +1 -1
  85. package/docs/{shadow.stories.mdx → shadow.mdx} +1 -1
  86. package/docs/{spacing.stories.mdx → spacing.mdx} +1 -1
  87. package/docs/{storybook.stories.mdx → storybook.mdx} +1 -1
  88. package/docs/{test-component-without-release.stories.mdx → test-component-without-release.mdx} +1 -1
  89. package/docs/{typography.stories.mdx → typography.mdx} +1 -3
  90. package/docs/{use-component.stories.mdx → use-component.mdx} +1 -1
  91. package/docs/{use-install.stories.mdx → use-install.mdx} +1 -1
  92. package/package.json +19 -21
  93. package/app/stories/pix-checkbox.stories.mdx +0 -73
  94. package/app/stories/pix-collapsible.stories.mdx +0 -36
  95. package/app/stories/pix-message.stories.mdx +0 -64
  96. package/app/stories/pix-return-to.stories.mdx +0 -33
  97. package/app/stories/pix-selectable-tag.stories.mdx +0 -43
  98. package/app/stories/pix-toggle.stories.mdx +0 -36
  99. package/docs/changelog.stories.mdx +0 -6
@@ -1,68 +1,58 @@
1
1
  version: 2.1
2
2
 
3
3
  orbs:
4
- browser-tools: circleci/browser-tools@1.4.1
4
+ browser-tools: circleci/browser-tools@1.4.3
5
5
 
6
6
  workflows:
7
7
  version: 2
8
8
  build-and-test:
9
9
  jobs:
10
- - install:
11
- filters:
12
- branches:
13
- ignore:
14
- - gh-pages
15
10
  - lint-and-test:
11
+ matrix:
12
+ parameters:
13
+ node-version:
14
+ - "16.20.1"
15
+ - "18.17.0"
16
16
  filters:
17
17
  branches:
18
18
  ignore:
19
19
  - gh-pages
20
- requires:
21
- - install
22
20
  - try-scenarios:
23
21
  matrix:
24
22
  parameters:
25
23
  try-scenario:
26
24
  - embroider-safe
27
25
  - embroider-optimized
26
+ node-version:
27
+ - "16.20.1"
28
+ - "18.17.0"
28
29
  filters:
29
30
  branches:
30
31
  ignore:
31
32
  - gh-pages
32
- requires:
33
- - install
34
33
  - chromatic-deployment:
34
+ matrix:
35
+ parameters:
36
+ node-version:
37
+ - "16.20.1"
38
+ - "18.17.0"
35
39
  filters:
36
40
  branches:
37
41
  ignore:
38
42
  - gh-pages
39
- requires:
40
- - install
41
43
 
42
44
  jobs:
43
- install:
44
- docker:
45
- - image: cimg/node:16.20.0-browsers
46
- resource_class: medium+
47
- working_directory: ~/pix-ui
48
- steps:
49
- - checkout
50
- - run: npm ci
51
- - persist_to_workspace:
52
- root: ~/pix-ui
53
- paths:
54
- - .
55
-
56
45
  lint-and-test:
46
+ parameters:
47
+ node-version:
48
+ type: string
57
49
  docker:
58
- - image: cimg/node:16.20.0-browsers
50
+ - image: cimg/node:<< parameters.node-version >>-browsers
59
51
  resource_class: medium+
60
- working_directory: ~/pix-ui
61
52
  steps:
62
- - attach_workspace:
63
- at: ~/pix-ui
64
53
  - browser-tools/install-chrome
65
- - browser-tools/install-chromedriver
54
+ - checkout
55
+ - run: npm ci
66
56
  - run: npm run lint:js
67
57
  - run: npm run lint:hbs
68
58
  - run: npm run lint:scss
@@ -72,22 +62,24 @@ jobs:
72
62
  parameters:
73
63
  try-scenario:
74
64
  type: string
65
+ node-version:
66
+ type: string
75
67
  docker:
76
- - image: cimg/node:16.20.0-browsers
68
+ - image: cimg/node:<< parameters.node-version >>-browsers
77
69
  resource_class: medium+
78
- working_directory: ~/pix-ui
79
70
  steps:
80
- - attach_workspace:
81
- at: ~/pix-ui
82
71
  - browser-tools/install-chrome
83
- - browser-tools/install-chromedriver
72
+ - checkout
73
+ - run: npm ci
84
74
  - run: npx ember try:one << parameters.try-scenario >>
85
75
 
86
76
  chromatic-deployment:
77
+ parameters:
78
+ node-version:
79
+ type: string
87
80
  docker:
88
- - image: cimg/node:16.20.0-browsers
89
- working_directory: ~/pix-ui
81
+ - image: cimg/node:<< parameters.node-version >>-browsers
90
82
  steps:
91
- - attach_workspace:
92
- at: ~/pix-ui
83
+ - checkout
84
+ - run: npm ci
93
85
  - run: npm run chromatic -- --auto-accept-changes
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 16
1
+ 18.17.0
@@ -1,8 +1,10 @@
1
- module.exports = {
2
- addons: ['@storybook/addon-essentials', '@storybook/addon-a11y'],
3
- stories: ['../docs/**/*.stories.@(mdx)', '../app/**/*.stories.@(js|mdx)'],
1
+ const config = {
2
+ addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', '@storybook/addon-mdx-gfm'],
3
+ stories: ['../docs/**/*.@(mdx|stories.@(mdx))', '../app/*/*.@(mdx|stories.@(js|jsx|ts|tsx))'],
4
4
  staticDirs: ['../dist'],
5
- core: {
6
- builder: 'webpack5',
5
+ framework: {
6
+ name: '@1024pix/storybook-ember',
7
+ options: {}
7
8
  },
8
9
  };
10
+ export default config;
@@ -1,36 +1,39 @@
1
- export const parameters = {
2
- layout: 'centered',
3
- a11y: {
4
- element: '#root',
5
- },
6
- viewMode: 'docs',
7
- docs: {
8
- iframeHeight: 400,
9
- transformSource: (src) => {
10
- const match = /hbs`\s?([\s\S]*)`/g.exec(src);
11
- return match ? match[1] : src;
1
+ const preview = {
2
+ parameters: {
3
+ layout: 'centered',
4
+ a11y: {
5
+ element: '#root',
12
6
  },
13
- },
14
- controls: { expanded: true },
15
- previewTabs: {
16
- 'storybook/docs/panel': { index: -1 },
17
- },
18
- options: {
19
- storySort: {
20
- order: [
21
- 'Utiliser Pix UI',
22
- ['Installation', 'Utiliser un composant'],
23
- 'Développement',
24
- [
25
- 'Design System',
26
- 'Créer un composant',
27
- 'Bonnes pratiques',
28
- 'Breaking changes',
29
- 'Faire une release',
30
- 'Architecture',
31
- 'Storybook'
7
+ viewMode: 'docs',
8
+ docs: {
9
+ iframeHeight: 400,
10
+ transformSource: (src) => {
11
+ const match = /hbs`\s?([\s\S]*)`/g.exec(src);
12
+ return match ? match[1] : src;
13
+ },
14
+ },
15
+ controls: { expanded: true },
16
+ previewTabs: {
17
+ 'storybook/docs/panel': { index: -1 },
18
+ },
19
+ options: {
20
+ storySort: {
21
+ order: [
22
+ 'Utiliser Pix UI',
23
+ ['Installation', 'Utiliser un composant'],
24
+ 'Développement',
25
+ [
26
+ 'Design System',
27
+ 'Créer un composant',
28
+ 'Bonnes pratiques',
29
+ 'Breaking changes',
30
+ 'Faire une release',
31
+ 'Architecture',
32
+ 'Storybook'
33
+ ],
32
34
  ],
33
- ],
35
+ },
34
36
  },
35
- },
37
+ }
36
38
  };
39
+ export default preview;
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Pix-UI Changelog
2
2
 
3
+ ## v38.2.0 (25/07/2023)
4
+
5
+
6
+ ### :building_construction: Tech
7
+ - [#383](https://github.com/1024pix/pix-ui/pull/383) [TECH] Ajouter la compatibilité avec node18.
8
+
9
+ ## v38.1.0 (25/07/2023)
10
+
11
+
12
+ ### :rocket: Amélioration
13
+ - [#445](https://github.com/1024pix/pix-ui/pull/445) [FEATURE] :sparkles: Upgrade storybook to v7.1.0.
14
+
15
+ ### :coffee: Autre
16
+ - [#447](https://github.com/1024pix/pix-ui/pull/447) chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.5.
17
+ - [#446](https://github.com/1024pix/pix-ui/pull/446) [BUMP] Update browser-tools orb to v1.4.3 (.circleci).
18
+ - [#418](https://github.com/1024pix/pix-ui/pull/418) [BUMP] Update dependency @ember/test-helpers to v3 (dossier racine).
19
+ - [#433](https://github.com/1024pix/pix-ui/pull/433) chore(deps): bump tough-cookie from 4.0.0 to 4.1.3.
20
+ - [#437](https://github.com/1024pix/pix-ui/pull/437) [BUMP] Update dependency @1024pix/ember-testing-library to ^0.7.0 (dossier racine).
21
+ - [#434](https://github.com/1024pix/pix-ui/pull/434) chore(deps): bump semver from 5.7.1 to 5.7.2.
22
+
3
23
  ## v38.0.0 (12/07/2023)
4
24
 
5
25
 
@@ -1,6 +1,10 @@
1
1
  import { hbs } from 'ember-cli-htmlbars';
2
2
  import { action } from '@storybook/addon-actions';
3
3
 
4
+ export default {
5
+ title: 'Form',
6
+ };
7
+
4
8
  export const form = (args) => {
5
9
  return {
6
10
  template: hbs`<form>
@@ -1,7 +1,7 @@
1
- import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs';
2
- import * as stories from './pix-background-header.stories.js';
1
+ import { Meta, Story, ArgTypes } from '@storybook/blocks';
2
+ import * as ComponentStories from './pix-background-header.stories';
3
3
 
4
- <Meta title="Layout/Background Header" component="PixBackgroundHeader" />
4
+ <Meta of={ComponentStories} />
5
5
 
6
6
  # Pix Background Header
7
7
 
@@ -12,9 +12,9 @@ Les enfants de la bannière se mettrons en colonne.
12
12
 
13
13
  > Le `BackgroundHeader` se couple bien avec un ou plusieurs `PixBlock`.
14
14
 
15
- <Canvas>
16
- <Story name="Background Header" story={stories.backgroundHeader} height={500} />
17
- </Canvas>
15
+
16
+ <Story of={ComponentStories.backgroundHeader} height={500} />
17
+
18
18
 
19
19
  ## Usage
20
20
 
@@ -1,5 +1,9 @@
1
1
  import { hbs } from 'ember-cli-htmlbars';
2
2
 
3
+ export default {
4
+ title: 'Layout/Background Header',
5
+ };
6
+
3
7
  export const backgroundHeader = (args) => {
4
8
  return {
5
9
  template: hbs`<PixBackgroundHeader>
@@ -1,7 +1,7 @@
1
- import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs';
2
- import * as stories from './pix-banner.stories.js';
1
+ import { Meta, Story, ArgTypes } from '@storybook/blocks';
2
+ import * as ComponentStories from './pix-banner.stories';
3
3
 
4
- <Meta title="Notification/Banner" component="PixBanner" argTypes={stories.argsTypes} />
4
+ <Meta of={ComponentStories} />
5
5
 
6
6
  # Pix Banner
7
7
 
@@ -13,60 +13,49 @@ Une `Banner` permet de mettre en avant une information importante.
13
13
 
14
14
  Bannière Information (par défaut).
15
15
 
16
- <Canvas>
17
- <Story name="Default" story={stories.Default} height={75} />
18
- </Canvas>
16
+ <Story of={ComponentStories.Default} height={75}/>
19
17
 
20
18
  ## Warning
21
19
 
22
20
  Bannière pour les alertes.
23
21
 
24
- <Canvas>
25
- <Story name="Warning" story={stories.warning} height={75} />
26
- </Canvas>
22
+ <Story of={ComponentStories.warning} height={75} />
27
23
 
28
24
  ## Error
29
25
 
30
26
  Bannière pour les erreurs.
31
27
 
32
- <Canvas>
33
- <Story name="Error" story={stories.error} height={75} />
34
- </Canvas>
28
+ <Story of={ComponentStories.error} height={75} />
35
29
 
36
30
  ## Communication
37
31
 
38
- <Canvas isColumn>
39
- Bannière pour Pix App
40
- <Story name="Communication Pix App" story={stories.communicationPixApp} height={75} />
41
- Bannière pour Pix Orga
42
- <Story name="Pix Orga" story={stories.communicationPixOrga} height={75} />
43
- Bannière pour Pix Certif
44
- <Story name="Pix Certif" story={stories.communicationPixCertif} height={75} />
45
- </Canvas>
32
+ Bannière pour Pix App
33
+ <Story of={ComponentStories.communicationPixApp} height={75} />
34
+ Bannière pour Pix Orga
35
+ <Story of={ComponentStories.communicationPixOrga} height={75} />
36
+ Bannière pour Pix Certif
37
+ <Story of={ComponentStories.communicationPixCertif} height={75} />
46
38
 
47
39
  ## With Internal Link
48
40
 
49
41
  Bannière contenant un lien interne.
50
42
 
51
- <Canvas>
52
- <Story name="With internal link" story={stories.withInternalLink} height={100} />
53
- </Canvas>
43
+ <Story of={ComponentStories.withInternalLink} height={100} />
44
+
54
45
 
55
46
  ## With External Link
56
47
 
57
48
  Bannière contenant un lien externe.
58
49
 
59
- <Canvas>
60
- <Story name="With external link" story={stories.withExternalLink} height={100} />
61
- </Canvas>
50
+ <Story of={ComponentStories.withExternalLink} height={100} />
51
+
62
52
 
63
53
  ## With Close Icon
64
54
 
65
55
  Bannière contenant un bouton qui permet de fermer la bannière.
66
56
 
67
- <Canvas>
68
- <Story name="With close icon" story={stories.withCloseIcon} height={100} />
69
- </Canvas>
57
+ <Story of={ComponentStories.withCloseIcon} height={100} />
58
+
70
59
 
71
60
  ## Usage
72
61
 
@@ -94,4 +83,4 @@ Bannière contenant un bouton qui permet de fermer la bannière.
94
83
 
95
84
  ## Arguments
96
85
 
97
- <ArgsTable story="Default" />
86
+ <ArgTypes of={ComponentStories} />
@@ -1,5 +1,54 @@
1
1
  import { hbs } from 'ember-cli-htmlbars';
2
2
 
3
+ export default {
4
+ title: 'Notification/Banner',
5
+ argTypes: {
6
+ actionLabel: {
7
+ name: 'actionLabel',
8
+ description: 'Nom de l‘action',
9
+ type: { name: 'string', required: false },
10
+ },
11
+ actionUrl: {
12
+ name: 'actionUrl',
13
+ description: 'Lien de l‘action',
14
+ type: { name: 'string', required: false },
15
+ },
16
+ type: {
17
+ name: 'type',
18
+ description: 'Définit le type de bannière',
19
+ type: { name: 'string', required: false },
20
+ table: { defaultValue: { summary: 'information' } },
21
+ control: {
22
+ type: 'select',
23
+ },
24
+ options: [
25
+ 'information',
26
+ 'warning',
27
+ 'error',
28
+ 'communication',
29
+ 'communication-orga',
30
+ 'communication-certif',
31
+ ],
32
+ },
33
+ canCloseBanner: {
34
+ name: 'canCloseBanner',
35
+ description: 'Afficher la croix pour fermer la bannière',
36
+ type: { name: 'boolean', required: false },
37
+ table: {
38
+ type: { summary: 'boolean' },
39
+ defaultValue: { summary: false },
40
+ },
41
+ },
42
+ onCloseBannerTriggerAction: {
43
+ name: 'onCloseBannerTriggerAction',
44
+ description:
45
+ 'Fonction à appeler lors de la fermeture de la bannière. Doit être utilisé avec le paramètre canCloseBanner',
46
+ type: { required: false },
47
+ control: { disable: true },
48
+ },
49
+ },
50
+ };
51
+
3
52
  const Template = (args) => {
4
53
  return {
5
54
  template: hbs`<PixBanner
@@ -61,49 +110,3 @@ withCloseIcon.args = {
61
110
  type: 'information',
62
111
  canCloseBanner: true,
63
112
  };
64
-
65
- export const argsTypes = {
66
- actionLabel: {
67
- name: 'actionLabel',
68
- description: 'Nom de l‘action',
69
- type: { name: 'string', required: false },
70
- },
71
- actionUrl: {
72
- name: 'actionUrl',
73
- description: 'Lien de l‘action',
74
- type: { name: 'string', required: false },
75
- },
76
- type: {
77
- name: 'type',
78
- description: 'Définit le type de bannière',
79
- type: { name: 'string', required: false },
80
- table: { defaultValue: { summary: 'information' } },
81
- control: {
82
- type: 'select',
83
- },
84
- options: [
85
- 'information',
86
- 'warning',
87
- 'error',
88
- 'communication',
89
- 'communication-orga',
90
- 'communication-certif',
91
- ],
92
- },
93
- canCloseBanner: {
94
- name: 'canCloseBanner',
95
- description: 'Afficher la croix pour fermer la bannière',
96
- type: { name: 'boolean', required: false },
97
- table: {
98
- type: { summary: 'boolean' },
99
- defaultValue: { summary: false },
100
- },
101
- },
102
- onCloseBannerTriggerAction: {
103
- name: 'onCloseBannerTriggerAction',
104
- description:
105
- 'Fonction à appeler lors de la fermeture de la bannière. Doit être utilisé avec le paramètre canCloseBanner',
106
- type: { required: false },
107
- control: { disable: true },
108
- },
109
- };
@@ -1,7 +1,7 @@
1
- import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs';
2
- import * as stories from './pix-block.stories.js';
1
+ import { Meta, Story, ArgTypes } from '@storybook/blocks';
2
+ import * as ComponentStories from './pix-block.stories';
3
3
 
4
- <Meta title="Layout/Block" component="PixBlock" argTypes={stories.argTypes} />
4
+ <Meta of={ComponentStories} />
5
5
 
6
6
  # Pix Block
7
7
 
@@ -13,9 +13,7 @@ Un \`Block\` est un bloc de fond blanc dont les bords sont arrondis et ayant une
13
13
 
14
14
  > Il est souvent utilisé dans le PixBackgroundHeader.
15
15
 
16
- <Canvas>
17
- <Story name="Block" story={stories.block} height={60} />
18
- </Canvas>
16
+ <Story of={ComponentStories.block} height={60} />
19
17
 
20
18
  ## Usage
21
19
 
@@ -31,4 +29,4 @@ Un \`Block\` est un bloc de fond blanc dont les bords sont arrondis et ayant une
31
29
 
32
30
  ## Arguments
33
31
 
34
- <ArgsTable story="Block" />
32
+ <ArgTypes of={ComponentStories} />
@@ -1,19 +1,22 @@
1
1
  import { hbs } from 'ember-cli-htmlbars';
2
2
 
3
+ export default {
4
+ title: 'Layout/Block',
5
+ argTypes: {
6
+ shadow: {
7
+ name: 'shadow',
8
+ description: 'Ombre sur le bloc',
9
+ type: { name: 'string', required: false },
10
+ table: { defaultValue: { summary: 'light' } },
11
+ control: { type: 'select' },
12
+ options: ['light', 'heavy'],
13
+ },
14
+ },
15
+ };
16
+
3
17
  export const block = (args) => ({
4
18
  template: hbs`<PixBlock @shadow={{this.shadow}}>
5
19
  Lorem ipsum
6
20
  </PixBlock>`,
7
21
  context: args,
8
22
  });
9
-
10
- export const argTypes = {
11
- shadow: {
12
- name: 'shadow',
13
- description: 'Ombre sur le bloc',
14
- type: { name: 'string', required: false },
15
- table: { defaultValue: { summary: 'light' } },
16
- control: { type: 'select' },
17
- options: ['light', 'heavy'],
18
- },
19
- };
@@ -1,8 +1,8 @@
1
- import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs';
1
+ import { Meta, Story, ArgTypes } from '@storybook/blocks';
2
2
 
3
- import * as stories from './pix-button-link.stories.js';
3
+ import * as ComponentStories from './pix-button-link.stories';
4
4
 
5
- <Meta title="Basics/ButtonLink" component="PixButtonLink" argTypes={stories.argTypes} />
5
+ <Meta of={ComponentStories} />
6
6
 
7
7
  # ButtonLink
8
8
 
@@ -17,9 +17,7 @@ Affiche un bouton avec les propriétés de lien HTML définies.
17
17
  Prend en entrée la propriété `@href`.
18
18
  Redirige directement les attributs de la balise HTML `<a>` (eg. `target`...).
19
19
 
20
- <Canvas>
21
- <Story name="Lien HTML" story={stories.htmlLink} height={60} />
22
- </Canvas>
20
+ <Story of={ComponentStories.htmlLink} />
23
21
 
24
22
  ```html
25
23
  <PixButtonLink @href="https://pix.fr" target="_blank"> Libellé du lien </PixButtonLink>
@@ -34,14 +32,8 @@ Prend en entrée la propriété `@route` et `@model`.
34
32
 
35
33
  Un bouton de route EmberJS peut être désactivé via la propriété `@isDisabled`.
36
34
 
37
- <Canvas>
38
- <Story name="Route EmberJS" story={stories.emberLink} height={60} />
39
- </Canvas>
40
-
41
- ```html
42
- <PixButtonLink @route="ma.route.ember" @model="mon-model"> Libellé du lien </PixButtonLink>
43
- ```
35
+ <Story of={ComponentStories.emberLink} />
44
36
 
45
37
  ## Arguments
46
38
 
47
- <ArgsTable story="Lien HTML" />
39
+ <ArgTypes of={ComponentStories} />