@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.
- package/.circleci/config.yml +31 -39
- package/.nvmrc +1 -1
- package/.storybook/main.js +7 -5
- package/.storybook/preview.js +35 -32
- package/CHANGELOG.md +20 -0
- package/app/stories/form.stories.js +4 -0
- package/app/stories/{pix-background-header.stories.mdx → pix-background-header.mdx} +6 -6
- package/app/stories/pix-background-header.stories.js +4 -0
- package/app/stories/{pix-banner.stories.mdx → pix-banner.mdx} +19 -30
- package/app/stories/pix-banner.stories.js +49 -46
- package/app/stories/{pix-block.stories.mdx → pix-block.mdx} +5 -7
- package/app/stories/pix-block.stories.js +14 -11
- package/app/stories/{pix-button-link.stories.mdx → pix-button-link.mdx} +6 -14
- package/app/stories/pix-button-link.stories.js +87 -87
- package/app/stories/{pix-button-upload.stories.mdx → pix-button-upload.mdx} +5 -8
- package/app/stories/pix-button-upload.stories.js +62 -59
- package/app/stories/{pix-button.stories.mdx → pix-button.mdx} +15 -28
- package/app/stories/pix-button.stories.js +152 -149
- package/app/stories/pix-checkbox.mdx +71 -0
- package/app/stories/pix-checkbox.stories.js +69 -66
- package/app/stories/pix-collapsible.mdx +31 -0
- package/app/stories/pix-collapsible.stories.js +16 -13
- package/app/stories/{pix-dropdown.stories.mdx → pix-dropdown.mdx} +9 -17
- package/app/stories/pix-dropdown.stories.js +114 -110
- package/app/stories/{pix-filter-banner.stories.mdx → pix-filter-banner.mdx} +5 -7
- package/app/stories/pix-filter-banner.stories.js +36 -33
- package/app/stories/{pix-filterable-and-searchable-select.stories.mdx → pix-filterable-and-searchable-select.mdx} +7 -17
- package/app/stories/pix-filterable-and-searchable-select.stories.js +136 -133
- package/app/stories/{pix-icon-button.stories.mdx → pix-icon-button.mdx} +8 -16
- package/app/stories/pix-icon-button.stories.js +60 -57
- package/app/stories/{pix-indicator-card.stories.mdx → pix-indicator-card.mdx} +6 -10
- package/app/stories/pix-indicator-card.stories.js +37 -34
- package/app/stories/{pix-input-code.stories.mdx → pix-input-code.mdx} +5 -7
- package/app/stories/pix-input-code.stories.js +55 -52
- package/app/stories/{pix-input-password.stories.mdx → pix-input-password.mdx} +22 -23
- package/app/stories/pix-input-password.stories.js +60 -57
- package/app/stories/{pix-input.stories.mdx → pix-input.mdx} +14 -20
- package/app/stories/pix-input.stories.js +55 -52
- package/app/stories/pix-message.mdx +54 -0
- package/app/stories/pix-message.stories.js +40 -36
- package/app/stories/{pix-modal.stories.mdx → pix-modal.mdx} +5 -7
- package/app/stories/pix-modal.stories.js +31 -30
- package/app/stories/{pix-multi-select.stories.mdx → pix-multi-select.mdx} +9 -21
- package/app/stories/pix-multi-select.stories.js +106 -99
- package/app/stories/{pix-pagination.stories.mdx → pix-pagination.mdx} +8 -16
- package/app/stories/pix-pagination.stories.js +114 -111
- package/app/stories/{pix-progress-gauge.stories.mdx → pix-progress-gauge.mdx} +6 -10
- package/app/stories/pix-progress-gauge.stories.js +43 -40
- package/app/stories/{pix-radio-button.stories.mdx → pix-radio-button.mdx} +13 -15
- package/app/stories/pix-radio-button.stories.js +35 -32
- package/app/stories/pix-return-to.mdx +34 -0
- package/app/stories/pix-return-to.stories.js +32 -32
- package/app/stories/{pix-search-input.stories.mdx → pix-search-input.mdx} +5 -7
- package/app/stories/pix-search-input.stories.js +56 -52
- package/app/stories/{pix-select.stories.mdx → pix-select.mdx} +12 -28
- package/app/stories/pix-select.stories.js +171 -168
- package/app/stories/pix-selectable-tag.mdx +37 -0
- package/app/stories/pix-selectable-tag.stories.js +37 -34
- package/app/stories/{pix-sidebar.stories.mdx → pix-sidebar.mdx} +5 -7
- package/app/stories/pix-sidebar.stories.js +28 -25
- package/app/stories/{pix-stars.stories.mdx → pix-stars.mdx} +5 -7
- package/app/stories/pix-stars.stories.js +29 -26
- package/app/stories/{pix-tag.stories.mdx → pix-tag.mdx} +9 -10
- package/app/stories/pix-tag.stories.js +39 -39
- package/app/stories/{pix-textarea.stories.mdx → pix-textarea.mdx} +6 -7
- package/app/stories/pix-textarea.stories.js +37 -39
- package/app/stories/pix-toggle.mdx +28 -0
- package/app/stories/pix-toggle.stories.js +52 -49
- package/app/stories/{pix-tooltip.stories.mdx → pix-tooltip.mdx} +14 -28
- package/app/stories/pix-tooltip.stories.js +57 -54
- package/docs/{architecture.stories.mdx → architecture.mdx} +1 -1
- package/docs/{breaking-changes.stories.mdx → breaking-changes.mdx} +1 -1
- package/docs/changelog.mdx +6 -0
- package/docs/{colors-palette.stories.mdx → colors-palette.mdx} +1 -3
- package/docs/{create-component.stories.mdx → create-component.mdx} +24 -30
- package/docs/{design-system.stories.mdx → design-system.mdx} +1 -1
- package/docs/{design-tokens.stories.mdx → design-tokens.mdx} +1 -1
- package/docs/{good-practices-a11y.stories.mdx → good-practices-a11y.mdx} +1 -1
- package/docs/{good-practices-design.stories.mdx → good-practices-design.mdx} +1 -1
- package/docs/{good-practices-responsive.stories.mdx → good-practices-responsive.mdx} +1 -1
- package/docs/{good-practices-style-css.stories.mdx → good-practices-style-css.mdx} +1 -1
- package/docs/{good-practices-tests.stories.mdx → good-practices-tests.mdx} +1 -1
- package/docs/{make-a-release.stories.mdx → make-a-release.mdx} +1 -1
- package/docs/{pix-design-tokens-dev.stories.mdx → pix-design-tokens-dev.mdx} +1 -1
- package/docs/{shadow.stories.mdx → shadow.mdx} +1 -1
- package/docs/{spacing.stories.mdx → spacing.mdx} +1 -1
- package/docs/{storybook.stories.mdx → storybook.mdx} +1 -1
- package/docs/{test-component-without-release.stories.mdx → test-component-without-release.mdx} +1 -1
- package/docs/{typography.stories.mdx → typography.mdx} +1 -3
- package/docs/{use-component.stories.mdx → use-component.mdx} +1 -1
- package/docs/{use-install.stories.mdx → use-install.mdx} +1 -1
- package/package.json +19 -21
- package/app/stories/pix-checkbox.stories.mdx +0 -73
- package/app/stories/pix-collapsible.stories.mdx +0 -36
- package/app/stories/pix-message.stories.mdx +0 -64
- package/app/stories/pix-return-to.stories.mdx +0 -33
- package/app/stories/pix-selectable-tag.stories.mdx +0 -43
- package/app/stories/pix-toggle.stories.mdx +0 -36
- package/docs/changelog.stories.mdx +0 -6
package/.circleci/config.yml
CHANGED
|
@@ -1,68 +1,58 @@
|
|
|
1
1
|
version: 2.1
|
|
2
2
|
|
|
3
3
|
orbs:
|
|
4
|
-
browser-tools: circleci/browser-tools@1.4.
|
|
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
|
|
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
|
-
-
|
|
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
|
|
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
|
-
-
|
|
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
|
|
89
|
-
working_directory: ~/pix-ui
|
|
81
|
+
- image: cimg/node:<< parameters.node-version >>-browsers
|
|
90
82
|
steps:
|
|
91
|
-
-
|
|
92
|
-
|
|
83
|
+
- checkout
|
|
84
|
+
- run: npm ci
|
|
93
85
|
- run: npm run chromatic -- --auto-accept-changes
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
18.17.0
|
package/.storybook/main.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y'],
|
|
3
|
-
stories: ['../docs
|
|
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
|
-
|
|
6
|
-
|
|
5
|
+
framework: {
|
|
6
|
+
name: '@1024pix/storybook-ember',
|
|
7
|
+
options: {}
|
|
7
8
|
},
|
|
8
9
|
};
|
|
10
|
+
export default config;
|
package/.storybook/preview.js
CHANGED
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import { Meta, Story,
|
|
2
|
-
import * as
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-background-header.stories';
|
|
3
3
|
|
|
4
|
-
<Meta
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
|
|
16
|
+
<Story of={ComponentStories.backgroundHeader} height={500} />
|
|
17
|
+
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Meta, Story,
|
|
2
|
-
import * as
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-banner.stories';
|
|
3
3
|
|
|
4
|
-
<Meta
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
<
|
|
52
|
-
|
|
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
|
-
<
|
|
60
|
-
|
|
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
|
-
<
|
|
68
|
-
|
|
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
|
-
<
|
|
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,
|
|
2
|
-
import * as
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
|
+
import * as ComponentStories from './pix-block.stories';
|
|
3
3
|
|
|
4
|
-
<Meta
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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,
|
|
1
|
+
import { Meta, Story, ArgTypes } from '@storybook/blocks';
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as ComponentStories from './pix-button-link.stories';
|
|
4
4
|
|
|
5
|
-
<Meta
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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
|
-
<
|
|
39
|
+
<ArgTypes of={ComponentStories} />
|