@lucca-front/ng 22.0.5 → 22.0.6-rc.1
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/README.md +6 -0
- package/fesm2022/lucca-front-ng-approbation-inbox.mjs +5 -4
- package/fesm2022/lucca-front-ng-approbation-inbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +22 -15
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills.mjs +4 -4
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll.mjs +2 -3
- package/fesm2022/lucca-front-ng-scroll.mjs.map +1 -1
- package/llms/SKILL.md +248 -0
- package/llms/references/components/activity-feed/activity-feed.component.md +292 -0
- package/llms/references/components/activity-feed/activity-feed.md +90 -0
- package/llms/references/components/animations/animations.component.md +11 -0
- package/llms/references/components/animations/animations.md +7 -0
- package/llms/references/components/api-select/api-select.md +40 -0
- package/llms/references/components/app-layout/app-layout.component.md +65 -0
- package/llms/references/components/app-layout/app-layout.md +81 -0
- package/llms/references/components/approbation-inbox/approbation-inbox.component.md +960 -0
- package/llms/references/components/approbation-inbox/approbation-inbox.md +135 -0
- package/llms/references/components/avatar/avatar.component.md +563 -0
- package/llms/references/components/avatar/avatar.md +93 -0
- package/llms/references/components/box/box.component.md +119 -0
- package/llms/references/components/box/box.md +88 -0
- package/llms/references/components/breadcrumbs/breadcrumbs.component.md +59 -0
- package/llms/references/components/breadcrumbs/breadcrumbs.md +87 -0
- package/llms/references/components/bubble-icon/bubble-icon.component.md +56 -0
- package/llms/references/components/bubble-icon/bubble-icon.md +72 -0
- package/llms/references/components/bubble-illustration/bubble-illustration.component.md +54 -0
- package/llms/references/components/bubble-illustration/bubble-illustration.md +77 -0
- package/llms/references/components/button/button.component.md +252 -0
- package/llms/references/components/button/button.md +124 -0
- package/llms/references/components/calendar/calendar.component.md +708 -0
- package/llms/references/components/calendar/calendar.md +104 -0
- package/llms/references/components/calendar2/calendar2.md +64 -0
- package/llms/references/components/callout/callout.component.md +237 -0
- package/llms/references/components/callout/callout.md +243 -0
- package/llms/references/components/callout-disclosure/callout-disclosure.component.md +230 -0
- package/llms/references/components/callout-disclosure/callout-disclosure.md +196 -0
- package/llms/references/components/callout-popover/callout-popover.component.md +170 -0
- package/llms/references/components/callout-popover/callout-popover.md +201 -0
- package/llms/references/components/card/card.component.md +62 -0
- package/llms/references/components/card/card.md +8 -0
- package/llms/references/components/checkbox/checkbox.component.md +50 -0
- package/llms/references/components/checkbox/checkbox.md +74 -0
- package/llms/references/components/chip/chip.component.md +131 -0
- package/llms/references/components/chip/chip.md +95 -0
- package/llms/references/components/clear/clear.component.md +38 -0
- package/llms/references/components/clear/clear.md +79 -0
- package/llms/references/components/code/code.component.md +33 -0
- package/llms/references/components/code/code.md +47 -0
- package/llms/references/components/color/color.md +32 -0
- package/llms/references/components/color-input/color-input.md +33 -0
- package/llms/references/components/color-picker/color-picker.component.md +29 -0
- package/llms/references/components/color-picker/color-picker.md +25 -0
- package/llms/references/components/comment/comment.component.md +436 -0
- package/llms/references/components/comment/comment.md +125 -0
- package/llms/references/components/container/container.component.md +41 -0
- package/llms/references/components/container/container.md +74 -0
- package/llms/references/components/core-select-department/core-select-department.md +37 -0
- package/llms/references/components/core-select-establishment/core-select-establishment.md +40 -0
- package/llms/references/components/core-select-job-qualification/core-select-job-qualification.md +25 -0
- package/llms/references/components/core-select-occupation-category/core-select-occupation-category.md +25 -0
- package/llms/references/components/core-select-user/core-select-user.md +75 -0
- package/llms/references/components/data-presentation/data-presentation.component.md +47 -0
- package/llms/references/components/data-presentation/data-presentation.md +49 -0
- package/llms/references/components/data-table/data-table.component.md +1603 -0
- package/llms/references/components/data-table/data-table.md +290 -0
- package/llms/references/components/date/date.component.md +31 -0
- package/llms/references/components/date/date.md +140 -0
- package/llms/references/components/dateinput/dateinput.component.md +99 -0
- package/llms/references/components/dateinput/dateinput.md +198 -0
- package/llms/references/components/daterangeinput/daterangeinput.component.md +49 -0
- package/llms/references/components/daterangeinput/daterangeinput.md +186 -0
- package/llms/references/components/departmentselect/departmentselect.component.md +43 -0
- package/llms/references/components/departmentselect/departmentselect.md +43 -0
- package/llms/references/components/dialog/dialog.component.md +462 -0
- package/llms/references/components/dialog/dialog.md +335 -0
- package/llms/references/components/divider/divider.component.md +35 -0
- package/llms/references/components/divider/divider.md +88 -0
- package/llms/references/components/dropdown/dropdown.component.md +272 -0
- package/llms/references/components/dropdown/dropdown.md +172 -0
- package/llms/references/components/duration-picker/duration-picker.md +155 -0
- package/llms/references/components/empty-state/empty-state.component.md +226 -0
- package/llms/references/components/empty-state/empty-state.md +62 -0
- package/llms/references/components/errorpage/errorpage.component.md +57 -0
- package/llms/references/components/errorpage/errorpage.md +75 -0
- package/llms/references/components/establishmentselect/establishmentselect.component.md +30 -0
- package/llms/references/components/establishmentselect/establishmentselect.md +42 -0
- package/llms/references/components/fancy-dialog/fancy-dialog.component.md +9 -0
- package/llms/references/components/fancy-dialog/fancy-dialog.md +107 -0
- package/llms/references/components/fancybox/fancybox.component.md +48 -0
- package/llms/references/components/fancybox/fancybox.md +75 -0
- package/llms/references/components/fieldset/fieldset.component.md +86 -0
- package/llms/references/components/fieldset/fieldset.md +119 -0
- package/llms/references/components/filedropzone/filedropzone.component.md +16 -0
- package/llms/references/components/filedropzone/filedropzone.md +61 -0
- package/llms/references/components/fileentry/fileentry.component.md +58 -0
- package/llms/references/components/fileentry/fileentry.md +246 -0
- package/llms/references/components/fileupload/fileupload.component.md +91 -0
- package/llms/references/components/fileupload/fileupload.md +246 -0
- package/llms/references/components/filterbar/filterbar.component.md +302 -0
- package/llms/references/components/filterbar/filterbar.md +134 -0
- package/llms/references/components/filterpills/filterpills.component.md +60 -0
- package/llms/references/components/filterpills/filterpills.md +180 -0
- package/llms/references/components/footer/footer.component.md +66 -0
- package/llms/references/components/footer/footer.md +115 -0
- package/llms/references/components/form/form.md +37 -0
- package/llms/references/components/form-field/form-field.component.md +46 -0
- package/llms/references/components/form-field/form-field.md +231 -0
- package/llms/references/components/form-header/form-header.md +29 -0
- package/llms/references/components/form-label/form-label.component.md +106 -0
- package/llms/references/components/form-label/form-label.md +98 -0
- package/llms/references/components/gauge/gauge.component.md +55 -0
- package/llms/references/components/gauge/gauge.md +73 -0
- package/llms/references/components/grid/grid.component.md +15 -0
- package/llms/references/components/grid/grid.md +112 -0
- package/llms/references/components/highlight-data/highlight-data.component.md +279 -0
- package/llms/references/components/highlight-data/highlight-data.md +115 -0
- package/llms/references/components/highlight-section/highlight-section.component.md +185 -0
- package/llms/references/components/highlight-section/highlight-section.md +48 -0
- package/llms/references/components/highlight-text/highlight-text.component.md +49 -0
- package/llms/references/components/highlight-text/highlight-text.md +29 -0
- package/llms/references/components/horizontalnavigation/horizontalnavigation.component.md +232 -0
- package/llms/references/components/horizontalnavigation/horizontalnavigation.md +95 -0
- package/llms/references/components/icons/icons.component.md +59 -0
- package/llms/references/components/icons/icons.md +185 -0
- package/llms/references/components/impersonation/impersonation.component.md +52 -0
- package/llms/references/components/impersonation/impersonation.md +52 -0
- package/llms/references/components/index-table/index-table.component.md +2528 -0
- package/llms/references/components/index-table/index-table.md +243 -0
- package/llms/references/components/inlinemessage/inlinemessage.component.md +58 -0
- package/llms/references/components/inlinemessage/inlinemessage.md +57 -0
- package/llms/references/components/input-framed/input-framed.component.md +714 -0
- package/llms/references/components/input-framed/input-framed.md +50 -0
- package/llms/references/components/link/link.component.md +153 -0
- package/llms/references/components/link/link.md +124 -0
- package/llms/references/components/listbox/listbox.component.md +11 -0
- package/llms/references/components/listbox/listbox.md +101 -0
- package/llms/references/components/listing/listing.component.md +366 -0
- package/llms/references/components/listing/listing.md +105 -0
- package/llms/references/components/loading/loading.component.md +37 -0
- package/llms/references/components/loading/loading.md +91 -0
- package/llms/references/components/main-layout/main-layout.component.md +146 -0
- package/llms/references/components/main-layout/main-layout.md +78 -0
- package/llms/references/components/mobile-push/mobile-push.component.md +62 -0
- package/llms/references/components/mobile-push/mobile-push.md +70 -0
- package/llms/references/components/mobileheader/mobileheader.component.md +31 -0
- package/llms/references/components/mobileheader/mobileheader.md +8 -0
- package/llms/references/components/mobilenavigation/mobilenavigation.component.md +43 -0
- package/llms/references/components/mobilenavigation/mobilenavigation.md +8 -0
- package/llms/references/components/modal/modal.component.md +37 -0
- package/llms/references/components/modal/modal.md +61 -0
- package/llms/references/components/multi-select/multi-select.component.md +39 -0
- package/llms/references/components/multi-select/multi-select.md +426 -0
- package/llms/references/components/multilanguagefield/multilanguagefield.component.md +84 -0
- package/llms/references/components/multilanguagefield/multilanguagefield.md +362 -0
- package/llms/references/components/newbadge/newbadge.component.md +23 -0
- package/llms/references/components/newbadge/newbadge.md +38 -0
- package/llms/references/components/number-format-input/number-format-input.md +46 -0
- package/llms/references/components/number-input/number-input.md +49 -0
- package/llms/references/components/numbers/numbers.component.md +46 -0
- package/llms/references/components/numbers/numbers.md +7 -0
- package/llms/references/components/numericbadge/numericbadge.component.md +66 -0
- package/llms/references/components/numericbadge/numericbadge.md +84 -0
- package/llms/references/components/onboarding-empty-state/onboarding-empty-state.md +47 -0
- package/llms/references/components/pageheader/pageheader.component.md +389 -0
- package/llms/references/components/pageheader/pageheader.md +144 -0
- package/llms/references/components/pagination/pagination.component.md +96 -0
- package/llms/references/components/pagination/pagination.md +107 -0
- package/llms/references/components/phonenumberfield/phonenumberfield.component.md +35 -0
- package/llms/references/components/phonenumberfield/phonenumberfield.md +131 -0
- package/llms/references/components/plg-push/plg-push.component.md +91 -0
- package/llms/references/components/plg-push/plg-push.md +82 -0
- package/llms/references/components/popover/popover.component.md +130 -0
- package/llms/references/components/popover/popover.md +235 -0
- package/llms/references/components/popover2/popover2.component.md +103 -0
- package/llms/references/components/popover2/popover2.md +89 -0
- package/llms/references/components/progress-bar/progress-bar.component.md +33 -0
- package/llms/references/components/progress-bar/progress-bar.md +51 -0
- package/llms/references/components/progress-stepper/progress-stepper.component.md +281 -0
- package/llms/references/components/progress-stepper/progress-stepper.md +70 -0
- package/llms/references/components/radiofield/radiofield.component.md +295 -0
- package/llms/references/components/radiofield/radiofield.md +122 -0
- package/llms/references/components/readmore/readmore.component.md +60 -0
- package/llms/references/components/readmore/readmore.md +88 -0
- package/llms/references/components/resource-card/resource-card.component.md +216 -0
- package/llms/references/components/resource-card/resource-card.md +106 -0
- package/llms/references/components/richtextinput/richtextinput.component.md +298 -0
- package/llms/references/components/richtextinput/richtextinput.md +275 -0
- package/llms/references/components/scroll/scroll.md +45 -0
- package/llms/references/components/scrollbox/scrollbox.component.md +63 -0
- package/llms/references/components/scrollbox/scrollbox.md +49 -0
- package/llms/references/components/section-empty-state/section-empty-state.component.md +9 -0
- package/llms/references/components/section-empty-state/section-empty-state.md +41 -0
- package/llms/references/components/segmented-control-tabs/segmented-control-tabs.md +50 -0
- package/llms/references/components/segmentedcontrol/segmentedcontrol.component.md +198 -0
- package/llms/references/components/segmentedcontrol/segmentedcontrol.md +108 -0
- package/llms/references/components/select/select.component.md +237 -0
- package/llms/references/components/select/select.md +57 -0
- package/llms/references/components/select-templating/select-templating.md +117 -0
- package/llms/references/components/sidepanel/sidepanel.component.md +56 -0
- package/llms/references/components/sidepanel/sidepanel.md +7 -0
- package/llms/references/components/simple-select/simple-select.component.md +39 -0
- package/llms/references/components/simple-select/simple-select.md +291 -0
- package/llms/references/components/skeleton/skeleton.component.md +133 -0
- package/llms/references/components/skeleton/skeleton.md +212 -0
- package/llms/references/components/skiplinks/skiplinks.component.md +91 -0
- package/llms/references/components/skiplinks/skiplinks.md +73 -0
- package/llms/references/components/software-icon/software-icon.component.md +61 -0
- package/llms/references/components/software-icon/software-icon.md +107 -0
- package/llms/references/components/sortable-list/sortable-list.component.md +141 -0
- package/llms/references/components/sortable-list/sortable-list.md +84 -0
- package/llms/references/components/statusbadge/statusbadge.component.md +56 -0
- package/llms/references/components/statusbadge/statusbadge.md +63 -0
- package/llms/references/components/switchfield/switchfield.component.md +114 -0
- package/llms/references/components/switchfield/switchfield.md +56 -0
- package/llms/references/components/tableofcontent/tableofcontent.component.md +55 -0
- package/llms/references/components/tableofcontent/tableofcontent.md +41 -0
- package/llms/references/components/tags/tags.component.md +112 -0
- package/llms/references/components/tags/tags.md +115 -0
- package/llms/references/components/text-flow/text-flow.component.md +71 -0
- package/llms/references/components/text-flow/text-flow.md +63 -0
- package/llms/references/components/textareafield/textareafield.component.md +69 -0
- package/llms/references/components/textareafield/textareafield.md +113 -0
- package/llms/references/components/textfield/textfield.component.md +617 -0
- package/llms/references/components/textfield/textfield.md +161 -0
- package/llms/references/components/tile/tile.component.md +91 -0
- package/llms/references/components/tile/tile.md +92 -0
- package/llms/references/components/time/time.component.md +270 -0
- package/llms/references/components/time/time.md +127 -0
- package/llms/references/components/time-picker/time-picker.md +63 -0
- package/llms/references/components/timelines/timelines.component.md +159 -0
- package/llms/references/components/timelines/timelines.md +8 -0
- package/llms/references/components/title-and-text/title-and-text.component.md +14 -0
- package/llms/references/components/title-and-text/title-and-text.md +60 -0
- package/llms/references/components/toasts/toasts.component.md +54 -0
- package/llms/references/components/toasts/toasts.md +112 -0
- package/llms/references/components/tooltip/tooltip.component.md +86 -0
- package/llms/references/components/tooltip/tooltip.md +217 -0
- package/llms/references/components/treeselect/treeselect.component.md +62 -0
- package/llms/references/components/treeselect/treeselect.md +58 -0
- package/llms/references/components/user-select/user-select.md +52 -0
- package/llms/references/components/userpopover/userpopover.component.md +50 -0
- package/llms/references/components/userpopover/userpopover.md +136 -0
- package/llms/references/components/verticalnavigation/verticalnavigation.component.md +236 -0
- package/llms/references/components/verticalnavigation/verticalnavigation.md +115 -0
- package/llms/references/migrations.md +32 -0
- package/llms/references/tools/angular-api.md +337 -0
- package/llms/references/tools/animations.md +173 -0
- package/llms/references/tools/mixins.md +106 -0
- package/llms/references/tools/numbers.md +81 -0
- package/llms/references/tools/scrollbox.md +59 -0
- package/llms/references/tools/utilitaires.md +951 -0
- package/llms/references/types/BubbleIllustration.md +5 -0
- package/llms/references/types/DecorativePalette.md +5 -0
- package/llms/references/types/Gap.md +5 -0
- package/llms/references/types/HighlightDataIllustration.md +5 -0
- package/llms/references/types/HighlightSectionIllustration.md +5 -0
- package/llms/references/types/LuccaIcon.md +5 -0
- package/llms/references/types/MainLayoutIllustrationEndStart.md +5 -0
- package/llms/references/types/MainLayoutIllustrationStartEnd.md +5 -0
- package/llms.txt +221 -0
- package/package.json +12 -6
- package/types/lucca-front-ng-approbation-inbox.d.ts +3 -3
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# pagination — Code & Implementation
|
|
2
|
+
|
|
3
|
+
📖 [Storybook documentation](https://lucca-front.lucca.io/v22.0.0/storybook/?path=/docs/documentation-navigation-pagination-angular--docs)
|
|
4
|
+
|
|
5
|
+
## Angular
|
|
6
|
+
|
|
7
|
+
Mots-clés : pages, page suivante
|
|
8
|
+
|
|
9
|
+
Component selector : `lu-pagination`
|
|
10
|
+
|
|
11
|
+
`LuPagination` permet la navigation entre plusieurs pages, comme pour un tableau.
|
|
12
|
+
|
|
13
|
+
Il propose 2 interfaces différentes (appelé `mod`) :
|
|
14
|
+
* `default` : le plus simple, avec des boutons de navigation et des informations sur la page courante et le nombre total d'éléments
|
|
15
|
+
* `compact` : un mode plus compact, avec les boutons de navigation uniquement
|
|
16
|
+
|
|
17
|
+
### Mod `default`
|
|
18
|
+
|
|
19
|
+
La pagination en mode `default` est le mode par défaut si vous ne précisez rien. Pour l'utiliser, vous devrez :
|
|
20
|
+
|
|
21
|
+
* passer les inputs suivantes :
|
|
22
|
+
* `from` : l'index du premier élément de la page courante
|
|
23
|
+
* `to` : l'index du dernier élément de la page courante
|
|
24
|
+
* `itemsCount` : le nombre total d'éléments
|
|
25
|
+
* `isFirstPage` : un booléen indiquant si la page courante est la première
|
|
26
|
+
* `isLastPage` : un booléen indiquant si la page courante est la dernière
|
|
27
|
+
|
|
28
|
+
* récupérer les outputs suivants :
|
|
29
|
+
* `previousPage` : émis lorsque l'utilisateur clique sur le bouton avec la flèche gauche `<`, correspondant à "précédent"
|
|
30
|
+
* `nextPage` : émis lorsque l'utilisateur clique sur le bouton avec la flèche droite `>`, correspondant à "suivant"
|
|
31
|
+
|
|
32
|
+
Voici un exemple d'utilisation de `LuPagination` en mode `default` :
|
|
33
|
+
|
|
34
|
+
### Mod `compact`
|
|
35
|
+
|
|
36
|
+
Le mode `compact` est une version plus simple de la pagination avec uniquement les boutons de navigation. Pour l'utiliser, vous devrez :
|
|
37
|
+
|
|
38
|
+
* passer les inputs suivants :
|
|
39
|
+
* `isFirstPage` : un booléen indiquant si la page courante est la première
|
|
40
|
+
* `isLastPage` : un booléen indiquant si la page courante est la dernière
|
|
41
|
+
|
|
42
|
+
* récupérer les outputs suivants :
|
|
43
|
+
* `previousPage` : émis lorsque l'utilisateur clique sur le bouton avec la flèche gauche `<`, correspondant à "précédent"
|
|
44
|
+
* `nextPage` : émis lorsque l'utilisateur clique sur le bouton avec la flèche droite `>`, correspondant à "suivant"
|
|
45
|
+
|
|
46
|
+
Voici un exemple d'utilisation de `LuPagination` en mode `compact` :
|
|
47
|
+
|
|
48
|
+
### Pagination
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
import { PAGINATION_MOD, PaginationComponent } from '@lucca-front/ng/pagination';
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```html
|
|
55
|
+
<lu-pagination from="1" to="20" itemsCount="27" isFirstPage />
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## HTML/CSS
|
|
59
|
+
|
|
60
|
+
Classe CSS : `.pagination`
|
|
61
|
+
|
|
62
|
+
### Basic
|
|
63
|
+
|
|
64
|
+
```css
|
|
65
|
+
@forward '@lucca-front/scss/src/components/pagination';
|
|
66
|
+
@forward '@lucca-front/scss/src/components/button';
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<nav class="pagination" role="navigation" aria-label="Pagination des résultats">
|
|
71
|
+
<div class="pagination-count">
|
|
72
|
+
<span class="pagination-count-current">
|
|
73
|
+
<span class="pr-u-mask">Résultats de</span>
|
|
74
|
+
1
|
|
75
|
+
<span aria-hidden="true">–</span>
|
|
76
|
+
<span class="pr-u-mask">à</span>
|
|
77
|
+
10
|
|
78
|
+
</span>
|
|
79
|
+
<span class="pagination-count-separator">sur</span>
|
|
80
|
+
<span class="pagination-count-total">
|
|
81
|
+
50
|
|
82
|
+
<span class="pr-u-mask">pages</span>
|
|
83
|
+
</span>
|
|
84
|
+
</div>
|
|
85
|
+
<div class="pagination-scrolling">
|
|
86
|
+
<button type="button" class="button mod-onlyIcon mod-ghost mod-S" disabled>
|
|
87
|
+
<span aria-hidden="true" class="lucca-icon icon-arrowChevronLeft"></span>
|
|
88
|
+
<span class="pr-u-mask">Précédent</span>
|
|
89
|
+
</button>
|
|
90
|
+
<button type="button" class="button mod-onlyIcon mod-ghost mod-S">
|
|
91
|
+
<span aria-hidden="true" class="lucca-icon icon-arrowChevronRight"></span>
|
|
92
|
+
<span class="pr-u-mask">Suivant</span>
|
|
93
|
+
</button>
|
|
94
|
+
</div>
|
|
95
|
+
</nav>
|
|
96
|
+
```
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# pagination
|
|
2
|
+
|
|
3
|
+
## Import
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { PaginationComponent } from '@lucca-front/ng/pagination';
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## API Reference
|
|
10
|
+
|
|
11
|
+
### PaginationComponent (component)
|
|
12
|
+
|
|
13
|
+
**Selector:** `lu-pagination`
|
|
14
|
+
|
|
15
|
+
#### Inputs
|
|
16
|
+
|
|
17
|
+
| Property | Binding name | Type | Default | Required | Transform | Description |
|
|
18
|
+
|----------|-------------|------|---------|----------|-----------|-------------|
|
|
19
|
+
| `intl` | `intl` | `unknown` | — | — | — | — |
|
|
20
|
+
| `isFirstPage` | `isFirstPage` | `boolean` | `false` | — | `luBooleanAttribute` | Désactive le bouton précédent. |
|
|
21
|
+
| `isLastPage` | `isLastPage` | `boolean` | `false` | — | `luBooleanAttribute` | Désactive le bouton suivant. |
|
|
22
|
+
| `from` | `from` | `unknown` | `undefined` | — | `luOptionalNullableNumberAttribute` | Numéro du dernier élément affiché. |
|
|
23
|
+
| `to` | `to` | `unknown` | `undefined` | — | `luOptionalNullableNumberAttribute` | Numéro du dernier élément affiché. |
|
|
24
|
+
| `itemsCount` | `itemsCount` | `unknown` | `undefined` | — | `luOptionalNullableNumberAttribute` | Nombre total d’éléments. |
|
|
25
|
+
| `mod` | `mod` | `'default' \| 'compact'` | `'default'` | — | — | Affiche la pagination en vue compacte (seulement avec les boutons précédent et suivant). |
|
|
26
|
+
|
|
27
|
+
#### Outputs
|
|
28
|
+
|
|
29
|
+
| Property | Binding name | Type | Notes |
|
|
30
|
+
|----------|-------------|------|-------|
|
|
31
|
+
| `previousPage` | `previousPage` | `void` | — |
|
|
32
|
+
| `nextPage` | `nextPage` | `void` | — |
|
|
33
|
+
|
|
34
|
+
## Related files
|
|
35
|
+
|
|
36
|
+
- 📝 [Code & implementation](./pagination.component.md)
|
|
37
|
+
|
|
38
|
+
- 🎯 [Figma design tokens](https://lucca-front.lucca.io/v22.0.6-rc.1/storybook/llms/references/components/pagination/pagination.figma.md)
|
|
39
|
+
- 📖 [Storybook documentation](https://lucca-front.lucca.io/v22.0.0/storybook/?path=/docs/documentation-navigation-pagination-angular--docs)
|
|
40
|
+
|
|
41
|
+
## Changelog
|
|
42
|
+
|
|
43
|
+
> Diff structurel de l'API (selectors, inputs, outputs, models) entre versions stables, depuis `v21.4.2` jusqu'à `v22.0.0`. Les versions sans changement d'API sont omises.
|
|
44
|
+
|
|
45
|
+
### 22.0.0
|
|
46
|
+
|
|
47
|
+
~ `isFirstPage` : transform booleanAttribute → luBooleanAttribute
|
|
48
|
+
~ `isLastPage` : transform booleanAttribute → luBooleanAttribute
|
|
49
|
+
~ `from` : number | null → unknown, défaut ∅ → undefined, transform ∅ → luOptionalNullableNumberAttribute
|
|
50
|
+
~ `to` : number | null → unknown, défaut ∅ → undefined, transform ∅ → luOptionalNullableNumberAttribute
|
|
51
|
+
~ `itemsCount` : number | null → unknown, défaut ∅ → undefined, transform ∅ → luOptionalNullableNumberAttribute
|
|
52
|
+
|
|
53
|
+
### Notes de release (ZeroHeight)
|
|
54
|
+
|
|
55
|
+
#### 21.3.0
|
|
56
|
+
|
|
57
|
+
##### Added
|
|
58
|
+
|
|
59
|
+
- `PAGINATION_MOD` constant and `PaginationMod` type are now publicly exported and used to type the `mod` input.
|
|
60
|
+
|
|
61
|
+
#### 21.2.2
|
|
62
|
+
|
|
63
|
+
##### Fixed
|
|
64
|
+
|
|
65
|
+
- Missing `button` import prevented the pagination controls from rendering.
|
|
66
|
+
|
|
67
|
+
#### 21.1.4
|
|
68
|
+
|
|
69
|
+
##### Fixed
|
|
70
|
+
|
|
71
|
+
- `mod="compact"` display.
|
|
72
|
+
|
|
73
|
+
#### 21.1.1
|
|
74
|
+
|
|
75
|
+
##### Fixed
|
|
76
|
+
|
|
77
|
+
- `intl` input is now public.
|
|
78
|
+
|
|
79
|
+
#### 21.1.0
|
|
80
|
+
|
|
81
|
+
##### Changed
|
|
82
|
+
|
|
83
|
+
- `intl` input now accepts partial overrides that are merged with the default translations.
|
|
84
|
+
|
|
85
|
+
#### 20.3.3
|
|
86
|
+
|
|
87
|
+
##### Fixed
|
|
88
|
+
|
|
89
|
+
- The pagination can now be displayed with zero item.
|
|
90
|
+
|
|
91
|
+
#### 20.2.1
|
|
92
|
+
|
|
93
|
+
##### Fixed
|
|
94
|
+
|
|
95
|
+
- The component now imports its own styles.
|
|
96
|
+
|
|
97
|
+
#### 20.1.3
|
|
98
|
+
|
|
99
|
+
##### Fixed
|
|
100
|
+
|
|
101
|
+
- Inputs behaviour of the Angular component.
|
|
102
|
+
|
|
103
|
+
#### 20.1.0
|
|
104
|
+
|
|
105
|
+
##### Added
|
|
106
|
+
|
|
107
|
+
- `lu-pagination` component (`pagination`) with the `from`, `to`, `itemsCount`, `isFirstPage`, `isLastPage`, `mod` and `intl` inputs, and the `previousPage` / `nextPage` outputs.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# phonenumberfield — Code & Implementation
|
|
2
|
+
|
|
3
|
+
📖 [Storybook documentation](https://lucca-front.lucca.io/v22.0.0/storybook/?path=/docs/documentation-forms-fields-phonenumberfield-angular--docs)
|
|
4
|
+
|
|
5
|
+
## Angular
|
|
6
|
+
|
|
7
|
+
Component selector : `lu-phone-number-input`
|
|
8
|
+
|
|
9
|
+
### Number input
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import { LOCALE_ID } from '@angular/core';
|
|
13
|
+
import { FormsModule } from '@angular/forms';
|
|
14
|
+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
15
|
+
import { FORM_FIELD_SIZE, FormFieldComponent } from '@lucca-front/ng/form-field';
|
|
16
|
+
import { PHONE_NUMBER_INPUT_AUTOCOMPLETE, PhoneNumberInputComponent } from '@lucca-front/ng/forms/phone-number-input';
|
|
17
|
+
import { INLINE_MESSAGE_STATE } from '@lucca-front/ng/inline-message';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<lu-form-field
|
|
22
|
+
[rolePresentationLabel]="true"
|
|
23
|
+
label="Phone"
|
|
24
|
+
tooltip="Tooltip message"
|
|
25
|
+
inlineMessage="Helper message"
|
|
26
|
+
inlineMessageState="default"
|
|
27
|
+
errorInlineMessage="Invalid Phone Number"
|
|
28
|
+
>
|
|
29
|
+
<lu-phone-number-input label="Phone" [country]="country" [(ngModel)]="model.example" #result="ngModel" required />
|
|
30
|
+
</lu-form-field>
|
|
31
|
+
@if (result.invalid && result.errors.validPhoneNumber) {
|
|
32
|
+
<div>{{ result.errors.validPhoneNumber }}</div>
|
|
33
|
+
}
|
|
34
|
+
<pr-story-model-display>{{ model.example }}</pr-story-model-display>
|
|
35
|
+
```
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# phonenumberfield
|
|
2
|
+
|
|
3
|
+
## Import
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { PhoneNumberInputComponent } from '@lucca-front/ng/forms/phone-number-input';
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## API Reference
|
|
10
|
+
|
|
11
|
+
### PhoneNumberInputComponent (component)
|
|
12
|
+
|
|
13
|
+
**Selector:** `lu-phone-number-input`
|
|
14
|
+
|
|
15
|
+
#### Inputs
|
|
16
|
+
|
|
17
|
+
| Property | Binding name | Type | Default | Required | Transform | Description |
|
|
18
|
+
|----------|-------------|------|---------|----------|-----------|-------------|
|
|
19
|
+
| `label` | `label` | `string` | — | — | — | Modifie le label du champ. |
|
|
20
|
+
| `autocomplete` | `autocomplete` | `'off' \| 'tel'` | — | — | — | — |
|
|
21
|
+
| `allowedCountries` | `allowedCountries` | `ReadonlyArray<CountryCode \| string>` | `[]` | — | — | — |
|
|
22
|
+
| `noAutoPlaceholder` | `noAutoPlaceholder` | `boolean` | `false` | — | `luBooleanAttribute` | — |
|
|
23
|
+
| `defaultCountryCode` | `country` | `CountryCode` | `undefined` | — | — | — |
|
|
24
|
+
|
|
25
|
+
#### Outputs
|
|
26
|
+
|
|
27
|
+
| Property | Binding name | Type | Notes |
|
|
28
|
+
|----------|-------------|------|-------|
|
|
29
|
+
| `countryChange` | `countryChange` | `CountryCode` | — |
|
|
30
|
+
|
|
31
|
+
### Pipes
|
|
32
|
+
|
|
33
|
+
| Pipe | Classe | transform | Description |
|
|
34
|
+
|------|--------|-----------|-------------|
|
|
35
|
+
| `luPhoneNumberFormat` | `PhoneNumberFormatPipe` | `(value: E164Number, format: NumberFormat = 'NATIONAL'): unknown` | — |
|
|
36
|
+
|
|
37
|
+
## Related files
|
|
38
|
+
|
|
39
|
+
- 📝 [Code & implementation](./phonenumberfield.component.md)
|
|
40
|
+
- 🎨 [Design guidelines](https://lucca-front.lucca.io/v22.0.6-rc.1/storybook/llms/references/components/phonenumberfield/phonenumberfield.design.md)
|
|
41
|
+
- 🎯 [Figma design tokens](https://lucca-front.lucca.io/v22.0.6-rc.1/storybook/llms/references/components/phonenumberfield/phonenumberfield.figma.md)
|
|
42
|
+
- 📖 [Storybook documentation](https://lucca-front.lucca.io/v22.0.0/storybook/?path=/docs/documentation-forms-fields-phonenumberfield-angular--docs)
|
|
43
|
+
|
|
44
|
+
## Changelog
|
|
45
|
+
|
|
46
|
+
> Diff structurel de l'API (selectors, inputs, outputs, models) entre versions stables, depuis `v21.4.2` jusqu'à `v22.0.0`. Les versions sans changement d'API sont omises.
|
|
47
|
+
|
|
48
|
+
### 22.0.0
|
|
49
|
+
|
|
50
|
+
~ `noAutoPlaceholder` : transform ∅ → luBooleanAttribute
|
|
51
|
+
|
|
52
|
+
### Notes de release (ZeroHeight)
|
|
53
|
+
|
|
54
|
+
#### 21.1.3
|
|
55
|
+
|
|
56
|
+
##### Fixed
|
|
57
|
+
|
|
58
|
+
- `presentation` display: align the empty-value display with the other form inputs.
|
|
59
|
+
|
|
60
|
+
#### 21.1.0
|
|
61
|
+
|
|
62
|
+
##### Added
|
|
63
|
+
|
|
64
|
+
- `presentation` display mode: render the field as a read-only formatted value when the form field is in presentation mode.
|
|
65
|
+
- `presentation` display: show a `–` placeholder when the value is empty.
|
|
66
|
+
|
|
67
|
+
#### 20.3.3
|
|
68
|
+
|
|
69
|
+
##### Added
|
|
70
|
+
|
|
71
|
+
- SCSS styles are now available as a standalone `phoneNumber` component export from `@lucca-front/scss`.
|
|
72
|
+
|
|
73
|
+
#### 20.3.2
|
|
74
|
+
|
|
75
|
+
##### Fixed
|
|
76
|
+
|
|
77
|
+
- Correct the spacing (margin) applied after the country flag.
|
|
78
|
+
|
|
79
|
+
#### 20.1.2
|
|
80
|
+
|
|
81
|
+
##### Fixed
|
|
82
|
+
|
|
83
|
+
- Sort the country list by translated country name instead of by raw country code.
|
|
84
|
+
|
|
85
|
+
#### 19.2.1
|
|
86
|
+
|
|
87
|
+
##### Changed
|
|
88
|
+
|
|
89
|
+
- Remove the search icon from the country selector dropdown.
|
|
90
|
+
|
|
91
|
+
#### 19.2.0
|
|
92
|
+
|
|
93
|
+
##### Added
|
|
94
|
+
|
|
95
|
+
- `noAutoPlaceholder` input: disable the automatically generated example-number placeholder (enabled by default).
|
|
96
|
+
|
|
97
|
+
#### 18.3.0
|
|
98
|
+
|
|
99
|
+
##### Added
|
|
100
|
+
|
|
101
|
+
- `autocomplete` input (`'off' | 'tel'`): control the browser autocomplete behavior of the phone number field.
|
|
102
|
+
|
|
103
|
+
#### 18.2.3
|
|
104
|
+
|
|
105
|
+
##### Fixed
|
|
106
|
+
|
|
107
|
+
- Validator now takes the selected country code into account when validating the number.
|
|
108
|
+
|
|
109
|
+
#### 18.2.2
|
|
110
|
+
|
|
111
|
+
##### Added
|
|
112
|
+
|
|
113
|
+
- `country` input: set the default country code used to parse and format the number.
|
|
114
|
+
- `countryChange` output: emitted when the detected/selected country code changes.
|
|
115
|
+
- Incomplete numbers are now formatted as they are typed.
|
|
116
|
+
|
|
117
|
+
#### 18.2.1
|
|
118
|
+
|
|
119
|
+
##### Added
|
|
120
|
+
|
|
121
|
+
- Display and search countries by their localized country name.
|
|
122
|
+
|
|
123
|
+
##### Fixed
|
|
124
|
+
|
|
125
|
+
- Catch `libphonenumber-js` exceptions when parsing invalid input.
|
|
126
|
+
|
|
127
|
+
#### 18.2.0
|
|
128
|
+
|
|
129
|
+
##### Added
|
|
130
|
+
|
|
131
|
+
- `lu-phone-number-input` component: a phone number input field with country selection, parsing, formatting and validation powered by `libphonenumber-js`.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# plg-push — Code & Implementation
|
|
2
|
+
|
|
3
|
+
📖 [Storybook documentation](https://lucca-front.lucca.io/v22.0.0/storybook/?path=/docs/documentation-feedback-plg-push-angular-basic--docs)
|
|
4
|
+
|
|
5
|
+
## Angular
|
|
6
|
+
|
|
7
|
+
Component selector : `lu-plg-push`
|
|
8
|
+
|
|
9
|
+
### Push basic
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import { IconComponent } from '@lucca-front/ng/icon';
|
|
13
|
+
import { PLGPushComponent } from '@lucca-front/ng/plg-push';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<lu-plg-push>
|
|
18
|
+
Bénéficiez de toutes les options liées au télétravail avec Timmi Office.
|
|
19
|
+
<a class="link mod-icon" href="#" target="_blank" rel="noopener noreferrer">
|
|
20
|
+
<span class="link-text">Demander un essai gratuit</span>
|
|
21
|
+
<!-- no text node here -->
|
|
22
|
+
<span class="link-icon">
|
|
23
|
+
<lu-icon class="pr-u-displayContents" icon="arrowExternal" alt="Ouvrir dans une nouvelle fenêtre" />
|
|
24
|
+
</span>
|
|
25
|
+
</a>
|
|
26
|
+
</lu-plg-push>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## HTML/CSS
|
|
30
|
+
|
|
31
|
+
Classe CSS : `.plgPush`
|
|
32
|
+
|
|
33
|
+
### Push basic
|
|
34
|
+
|
|
35
|
+
```css
|
|
36
|
+
@forward '@lucca-front/scss/src/components/plgPush';
|
|
37
|
+
@forward '@lucca-front/scss/src/components/button';
|
|
38
|
+
@forward '@lucca-front/scss/src/components/link';
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<div class="plgPush">
|
|
43
|
+
<div class="plgPush-icons">
|
|
44
|
+
<span aria-hidden="true" class="plgPush-icons-front lucca-icon icon-transportRocket mod-S"></span>
|
|
45
|
+
<img class="plgPush-icons-back" alt="" src="https://cdn.lucca.fr/lucca-front/assets/plg-push/shape.svg" />
|
|
46
|
+
</div>
|
|
47
|
+
<div class="plgPush-content">
|
|
48
|
+
<div class="plgPush-content-description">
|
|
49
|
+
Bénéficiez de toutes les options liées au télétravail avec Timmi Office.
|
|
50
|
+
<a class="link mod-icon" href="#" target="_blank" rel="noopener noreferrer">
|
|
51
|
+
<span class="link-text">Demander un essai gratuit</span>
|
|
52
|
+
<!-- no text node here -->
|
|
53
|
+
<span class="link-icon"><span aria-hidden="true" class="lucca-icon icon-arrowExternal"></span></span>
|
|
54
|
+
<span class="pr-u-mask">Ouvrir dans une nouvelle fenêtre</span>
|
|
55
|
+
</a>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<button type="button" class="plgPush-close button mod-onlyIcon mod-S mod-ghost">
|
|
59
|
+
<span aria-hidden="true" class="lucca-icon icon-signClose"></span>
|
|
60
|
+
<span class="pr-u-mask">Fermer</span>
|
|
61
|
+
</button>
|
|
62
|
+
</div>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Push title
|
|
66
|
+
|
|
67
|
+
```css
|
|
68
|
+
@forward '@lucca-front/scss/src/components/plgPush';
|
|
69
|
+
@forward '@lucca-front/scss/src/components/link';
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<div class="plgPush">
|
|
74
|
+
<div class="plgPush-icons">
|
|
75
|
+
<span aria-hidden="true" class="plgPush-icons-front lucca-icon icon-transportRocket mod-S"></span>
|
|
76
|
+
<img class="plgPush-icons-back" alt="" src="https://cdn.lucca.fr/lucca-front/assets/plg-push/shape.svg" />
|
|
77
|
+
</div>
|
|
78
|
+
<div class="plgPush-content">
|
|
79
|
+
<div class="plgPush-content-title">Connaissez-vous Timmi Office ?</div>
|
|
80
|
+
<div class="plgPush-content-description">
|
|
81
|
+
Activez toutes les options liées aux télétravail.
|
|
82
|
+
<a class="link mod-icon" href="#" target="_blank" rel="noopener noreferrer">
|
|
83
|
+
<span class="link-text">Demander un essai gratuit</span>
|
|
84
|
+
<!-- no text node here -->
|
|
85
|
+
<span class="link-icon"><span aria-hidden="true" class="lucca-icon icon-arrowExternal"></span></span>
|
|
86
|
+
<span class="pr-u-mask">Ouvrir dans une nouvelle fenêtre</span>
|
|
87
|
+
</a>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
```
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# plg-push
|
|
2
|
+
|
|
3
|
+
## Import
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { PLGPushComponent } from '@lucca-front/ng/plg-push';
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Basic Usage
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<lu-plg-push > Bénéficiez de toutes les options liées au télétravail avec Timmi Office. <a class="link mod-icon" href="#" target="_blank" rel="noopener noreferrer"> <span class="link-text">Demander un essai gratuit</span><!-- no text node here --><span class="link-icon"><lu-icon class="pr-u-displayContents" icon="arrowExternal" alt="Ouvrir dans une nouvelle fenêtre" /></span> </a>
|
|
13
|
+
</lu-plg-push>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## API Reference
|
|
17
|
+
|
|
18
|
+
### PLGPushComponent (component)
|
|
19
|
+
|
|
20
|
+
**Selector:** `lu-plg-push`
|
|
21
|
+
|
|
22
|
+
#### Inputs
|
|
23
|
+
|
|
24
|
+
| Property | Binding name | Type | Default | Required | Transform | Description |
|
|
25
|
+
|----------|-------------|------|---------|----------|-----------|-------------|
|
|
26
|
+
| `intl` | `intl` | `unknown` | — | — | — | — |
|
|
27
|
+
| `heading` | `heading` | `string` | `''` | — | — | Ajoute un titre au composant. |
|
|
28
|
+
| `removable` | `removable` | `boolean` | `false` | — | `luBooleanAttribute` | Rend le composant supprimable. |
|
|
29
|
+
|
|
30
|
+
#### Models (two-way binding)
|
|
31
|
+
|
|
32
|
+
| Property | Type | Required | Notes |
|
|
33
|
+
|----------|------|----------|-------|
|
|
34
|
+
| `removed` | `unknown` | — | — |
|
|
35
|
+
|
|
36
|
+
## Related files
|
|
37
|
+
|
|
38
|
+
- 📝 [Code & implementation](./plg-push.component.md)
|
|
39
|
+
- 🎨 [Design guidelines](https://lucca-front.lucca.io/v22.0.6-rc.1/storybook/llms/references/components/plg-push/plg-push.design.md)
|
|
40
|
+
- 🎯 [Figma design tokens](https://lucca-front.lucca.io/v22.0.6-rc.1/storybook/llms/references/components/plg-push/plg-push.figma.md)
|
|
41
|
+
- 📖 [Storybook documentation](https://lucca-front.lucca.io/v22.0.0/storybook/?path=/docs/documentation-feedback-plg-push-angular-basic--docs)
|
|
42
|
+
|
|
43
|
+
## Changelog
|
|
44
|
+
|
|
45
|
+
> Diff structurel de l'API (selectors, inputs, outputs, models) entre versions stables, depuis `v21.4.2` jusqu'à `v22.0.0`. Les versions sans changement d'API sont omises.
|
|
46
|
+
|
|
47
|
+
### 22.0.0
|
|
48
|
+
|
|
49
|
+
~ `removable` : transform booleanAttribute → luBooleanAttribute
|
|
50
|
+
|
|
51
|
+
### Notes de release (ZeroHeight)
|
|
52
|
+
|
|
53
|
+
#### 21.1.1
|
|
54
|
+
|
|
55
|
+
##### Fixed
|
|
56
|
+
|
|
57
|
+
- `intl` input is now public so its translations can be overridden.
|
|
58
|
+
|
|
59
|
+
#### 21.1.0
|
|
60
|
+
|
|
61
|
+
##### Added
|
|
62
|
+
|
|
63
|
+
- `intl` input to override the component's translations.
|
|
64
|
+
|
|
65
|
+
#### 21.0.0
|
|
66
|
+
|
|
67
|
+
##### Added
|
|
68
|
+
|
|
69
|
+
- `removable` input to display a close button.
|
|
70
|
+
- `removed` two-way binding model reflecting whether the push has been closed.
|
|
71
|
+
|
|
72
|
+
#### 18.2.3
|
|
73
|
+
|
|
74
|
+
##### Fixed
|
|
75
|
+
|
|
76
|
+
- Link color inside the push.
|
|
77
|
+
|
|
78
|
+
#### 18.2.0
|
|
79
|
+
|
|
80
|
+
##### Added
|
|
81
|
+
|
|
82
|
+
- `lu-plg-push` component with a `heading` input.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# popover — Code & Implementation
|
|
2
|
+
|
|
3
|
+
📖 [Storybook documentation](https://lucca-front.lucca.io/v22.0.0/storybook/?path=/docs/documentation-overlays-popover--docs)
|
|
4
|
+
|
|
5
|
+
## Angular
|
|
6
|
+
|
|
7
|
+
Mots-clés : bulle contextuelle
|
|
8
|
+
|
|
9
|
+
Directive selector : `luPopover2`
|
|
10
|
+
|
|
11
|
+
Popover2 est la nouvelle version de LuPopover, il a été choisi de partir sur une implémentation différente et donc, afin d'éviter les impacts d'un breaking change,
|
|
12
|
+
une nouvelle directive a vu le jour `luPopover2`, dans un nouveau point d'entrée, `@lucca-front/ng/popover2`.
|
|
13
|
+
|
|
14
|
+
### Mise en place
|
|
15
|
+
|
|
16
|
+
Popover2 est fait pour être simple à utiliser, il suffit de l'importer dans votre environement avec `configureLuPopover()` (à placer dans les providers de votre `AppModule` ou lors du bootstrap de `AppComponent` si vous êtes en full standalone).
|
|
17
|
+
|
|
18
|
+
### Utilisation
|
|
19
|
+
|
|
20
|
+
Pour utiliser `Popover2` dans un template, il suffit d'appliquer la directive `[luPopover2]` en renseignant en input une référence à un `ng-template`, exemple:
|
|
21
|
+
|
|
22
|
+
### Paramètres et position
|
|
23
|
+
|
|
24
|
+
Seule la référence au `ng-template` est obligatoire, mais la directive propose des paramètres pour divers usages:
|
|
25
|
+
|
|
26
|
+
- `luPopoverTrigger` permet de définir les évènements déclencheurs d’ouverture du popover :
|
|
27
|
+
- `click` est le cas par défaut, c’est le cas le plus proche d’un comportement natif navigateur et le moins intrusif.
|
|
28
|
+
- `click+hover` ajoute au click l’ouverture au survol. Le popover s’ouvre alors plus facilement (mais peut l’être aussi de manière involontaire).
|
|
29
|
+
- `hover+focus` désactive l’ouverture au click, ce qui permet de le réserver pour une navigation vers une autre page. Il faut cependant bien noter que dans cette configuration le popover n’est plus accessible : il convient donc de s’assurer que les informations contenues dans le popover soient reprises dans la page liée.
|
|
30
|
+
- `luPopoverPosition` par défaut à `above`, permet de régler la position voulue du popover, en cas d'espace manquant dans le rendu, le composant tentera de se positionner d'abord à l'opposé de la position demandée, puis les deux autres à tour de rôle.
|
|
31
|
+
- `luPopoverDisabled` permet de désactiver totalement le popover.
|
|
32
|
+
- `customPositions` à utiliser avec précaution, permet de renseigner des `ConnectionPositionPair` pour totalement remplacer la logique de positionnement, très utile pour les menus qui doivent être `below` mais alignés sur un côté plutôt que l'autre.
|
|
33
|
+
|
|
34
|
+
Les positions custom doivent être déclarées dans le `component.ts` sous forme d'un tableau et passés dans le template en input, exemple pour un menu qui s'ouvre en dessous à gauche (ou au dessus à gauche si pas de place):
|
|
35
|
+
|
|
36
|
+
component.ts:
|
|
37
|
+
|
|
38
|
+
component.html:
|
|
39
|
+
|
|
40
|
+
### Overlays popover
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
44
|
+
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
45
|
+
import { LuPopoverAlignment, LuPopoverModule, LuPopoverPosition, LuPopoverTriggerEvent } from '@lucca-front/ng/popover';
|
|
46
|
+
import { LuPopoverModule } from '@lucca-front/ng/popover';
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<button
|
|
51
|
+
type="button"
|
|
52
|
+
class="button"
|
|
53
|
+
[luPopover]="popover"
|
|
54
|
+
[luPopoverPosition]="position()"
|
|
55
|
+
[luPopoverAlignment]="alignment()"
|
|
56
|
+
[luPopoverTrigger]="trigger()"
|
|
57
|
+
>
|
|
58
|
+
{{ trigger() }} me
|
|
59
|
+
</button>
|
|
60
|
+
<lu-popover #popover>{{ popoverContent() }}</lu-popover>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Users popover
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
import { provideHttpClient } from '@angular/common/http';
|
|
67
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
68
|
+
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
69
|
+
import { ILuUser } from '@lucca-front/ng/user';
|
|
70
|
+
import { LuUserPopoverDirective } from '@lucca-front/ng/user-popover';
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```html
|
|
74
|
+
<button
|
|
75
|
+
type="button"
|
|
76
|
+
class="userPopover_trigger"
|
|
77
|
+
[luUserPopover]="luUserPopover()"
|
|
78
|
+
[luUserPopoverDisabled]="luUserPopoverDisabled()"
|
|
79
|
+
>
|
|
80
|
+
Survolez-moi !
|
|
81
|
+
</button>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## HTML/CSS
|
|
85
|
+
|
|
86
|
+
### Popover
|
|
87
|
+
|
|
88
|
+
```css
|
|
89
|
+
@forward '@lucca-front/scss/src/components/popover';
|
|
90
|
+
@forward '@lucca-front/scss/src/components/avatar';
|
|
91
|
+
@forward '@lucca-front/scss/src/components/userPopover';
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```html
|
|
95
|
+
<section class="lu-popover-content userPopover">
|
|
96
|
+
<div class="userPopover-details">
|
|
97
|
+
<div class="userPopover-details-avatar avatar">
|
|
98
|
+
<div class="avatar-picture" style="background-color: rgb(92, 214, 153)">
|
|
99
|
+
<span class="avatar-picture-initials" translate="no">CA</span>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="userPopover-details-info">
|
|
103
|
+
<h1 class="userPopover-details-info-name pr-u-ellipsis">
|
|
104
|
+
<a class="userPopover-details-info-name-linkOptional" href="#">Chloé Alibert</a>
|
|
105
|
+
</h1>
|
|
106
|
+
<p class="userPopover-details-info-detail pr-u-ellipsis">Technicienne</p>
|
|
107
|
+
<p class="userPopover-details-info-detail pr-u-ellipsis">SAV</p>
|
|
108
|
+
<p class="userPopover-details-info-detail">
|
|
109
|
+
<!--
|
|
110
|
+
<span class="userPopover-details-info-detail-workplace">
|
|
111
|
+
<span aria-hidden="true" class="lucca-icon icon-calendarPlanning mod-S"></span>
|
|
112
|
+
<span class="userPopover-details-info-detail-link-state">Arrivée prévue le 3 mai</span>
|
|
113
|
+
</span>
|
|
114
|
+
<span class="userPopover-details-info-detail-workplace">
|
|
115
|
+
<span aria-hidden="true" class="lucca-icon icon-calendarStrikethrough mod-S"></span>
|
|
116
|
+
<span class="userPopover-details-info-detail-link-state">Parti(e)</span>
|
|
117
|
+
</span>
|
|
118
|
+
-->
|
|
119
|
+
<a class="userPopover-details-info-detail-workplace" href="#">
|
|
120
|
+
<span aria-hidden="true" class="lucca-icon icon-calendarPlanning mod-S"></span>
|
|
121
|
+
<span class="userPopover-details-info-detail-workplace-state">
|
|
122
|
+
Absent(e) –
|
|
123
|
+
<span class="pr-u-textLight">Jusqu’au 28/02/2024 inclus</span>
|
|
124
|
+
</span>
|
|
125
|
+
</a>
|
|
126
|
+
</p>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</section>
|
|
130
|
+
```
|