@lucca-front/scss 18.3.0-rc.2 → 18.3.0-rc.3

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 (232) hide show
  1. package/dist/lucca-front.min.css +1 -1
  2. package/package.json +2 -2
  3. package/src/commons/utils/container.scss +67 -27
  4. package/src/commons/utils/media.scss +84 -35
  5. package/src/commons/vars.scss +1 -1
  6. package/src/components/_sample/exports.scss +1 -0
  7. package/src/components/_sample/index.scss +39 -2
  8. package/src/components/_sample/responsive.scss +7 -0
  9. package/src/components/actionIcon/exports.scss +1 -0
  10. package/src/components/actionIcon/responsive.scss +0 -0
  11. package/src/components/avatar/exports.scss +1 -0
  12. package/src/components/avatar/responsive.scss +0 -0
  13. package/src/components/box/exports.scss +1 -0
  14. package/src/components/box/responsive.scss +0 -0
  15. package/src/components/breadcrumbs/exports.scss +1 -0
  16. package/src/components/breadcrumbs/responsive.scss +0 -0
  17. package/src/components/button/exports.scss +1 -0
  18. package/src/components/button/responsive.scss +0 -0
  19. package/src/components/buttonGroup/exports.scss +1 -0
  20. package/src/components/buttonGroup/responsive.scss +0 -0
  21. package/src/components/calendar/exports.scss +1 -0
  22. package/src/components/calendar/responsive.scss +0 -0
  23. package/src/components/callout/exports.scss +1 -0
  24. package/src/components/callout/responsive.scss +0 -0
  25. package/src/components/calloutAccordion/exports.scss +1 -0
  26. package/src/components/calloutAccordion/responsive.scss +0 -0
  27. package/src/components/calloutDisclosure/exports.scss +1 -0
  28. package/src/components/calloutDisclosure/responsive.scss +0 -0
  29. package/src/components/calloutFeedbackList/exports.scss +1 -0
  30. package/src/components/calloutFeedbackList/responsive.scss +0 -0
  31. package/src/components/calloutPopover/exports.scss +1 -0
  32. package/src/components/calloutPopover/responsive.scss +0 -0
  33. package/src/components/card/exports.scss +1 -0
  34. package/src/components/card/responsive.scss +0 -0
  35. package/src/components/checkbox/exports.scss +1 -0
  36. package/src/components/checkbox/responsive.scss +0 -0
  37. package/src/components/checkboxField/exports.scss +1 -0
  38. package/src/components/checkboxField/responsive.scss +0 -0
  39. package/src/components/chip/exports.scss +1 -0
  40. package/src/components/chip/responsive.scss +0 -0
  41. package/src/components/clear/exports.scss +1 -0
  42. package/src/components/clear/responsive.scss +0 -0
  43. package/src/components/code/exports.scss +1 -0
  44. package/src/components/code/responsive.scss +0 -0
  45. package/src/components/collapse/exports.scss +1 -0
  46. package/src/components/collapse/responsive.scss +0 -0
  47. package/src/components/comment/component.scss +0 -1
  48. package/src/components/comment/exports.scss +1 -0
  49. package/src/components/comment/index.scss +35 -4
  50. package/src/components/comment/mods.scss +0 -14
  51. package/src/components/comment/responsive.scss +5 -0
  52. package/src/components/container/exports.scss +1 -0
  53. package/src/components/container/responsive.scss +0 -0
  54. package/src/components/contentSection/exports.scss +1 -0
  55. package/src/components/contentSection/responsive.scss +0 -0
  56. package/src/components/dialog/component.scss +1 -1
  57. package/src/components/dialog/exports.scss +1 -0
  58. package/src/components/dialog/index.scss +37 -4
  59. package/src/components/dialog/responsive.scss +0 -0
  60. package/src/components/divider/exports.scss +1 -0
  61. package/src/components/divider/responsive.scss +0 -0
  62. package/src/components/emptyState/component.scss +0 -2
  63. package/src/components/emptyState/exports.scss +1 -0
  64. package/src/components/emptyState/index.scss +62 -0
  65. package/src/components/emptyState/mods.scss +6 -20
  66. package/src/components/emptyState/responsive.scss +27 -0
  67. package/src/components/emptyState/vars.scss +6 -9
  68. package/src/components/emptyStateDeprecated/exports.scss +1 -0
  69. package/src/components/emptyStateDeprecated/responsive.scss +0 -0
  70. package/src/components/errorPage/component.scss +35 -55
  71. package/src/components/errorPage/exports.scss +1 -0
  72. package/src/components/errorPage/index.scss +33 -2
  73. package/src/components/errorPage/responsive.scss +20 -0
  74. package/src/components/field/exports.scss +1 -0
  75. package/src/components/field/responsive.scss +0 -0
  76. package/src/components/fieldset/exports.scss +1 -0
  77. package/src/components/fieldset/responsive.scss +0 -0
  78. package/src/components/file/exports.scss +1 -0
  79. package/src/components/file/responsive.scss +0 -0
  80. package/src/components/filterBar/component.scss +5 -19
  81. package/src/components/filterBar/exports.scss +1 -0
  82. package/src/components/filterBar/index.scss +61 -0
  83. package/src/components/filterBar/responsive.scss +10 -0
  84. package/src/components/filterBar/vars.scss +5 -0
  85. package/src/components/filters/exports.scss +1 -0
  86. package/src/components/filters/index.scss +36 -0
  87. package/src/components/filters/mods.scss +0 -7
  88. package/src/components/filters/responsive.scss +6 -0
  89. package/src/components/footer/component.scss +1 -1
  90. package/src/components/footer/exports.scss +1 -0
  91. package/src/components/footer/index.scss +36 -0
  92. package/src/components/footer/mods.scss +0 -6
  93. package/src/components/footer/responsive.scss +5 -0
  94. package/src/components/form/exports.scss +1 -0
  95. package/src/components/form/responsive.scss +0 -0
  96. package/src/components/formField/responsive.scss +0 -0
  97. package/src/components/formFieldset/responsive.scss +0 -0
  98. package/src/components/formLabel/exports.scss +1 -0
  99. package/src/components/formLabel/responsive.scss +0 -0
  100. package/src/components/formSection/responsive.scss +0 -0
  101. package/src/components/gauge/exports.scss +1 -0
  102. package/src/components/gauge/responsive.scss +0 -0
  103. package/src/components/grid/component.scss +2 -5
  104. package/src/components/grid/exports.scss +1 -0
  105. package/src/components/grid/index.scss +1 -1
  106. package/src/components/grid/responsive.scss +0 -0
  107. package/src/components/gridLegacy/exports.scss +1 -0
  108. package/src/components/gridLegacy/responsive.scss +0 -0
  109. package/src/components/header/exports.scss +1 -0
  110. package/src/components/header/index.scss +37 -0
  111. package/src/components/header/mods.scss +0 -11
  112. package/src/components/header/responsive.scss +14 -0
  113. package/src/components/index.scss +97 -93
  114. package/src/components/indexTable/exports.scss +1 -0
  115. package/src/components/indexTable/index.scss +38 -19
  116. package/src/components/indexTable/mods.scss +0 -149
  117. package/src/components/indexTable/responsive.scss +175 -0
  118. package/src/components/indexTableSorted/responsive.scss +0 -0
  119. package/src/components/inlineMessage/exports.scss +1 -0
  120. package/src/components/inlineMessage/responsive.scss +0 -0
  121. package/src/components/label/exports.scss +1 -0
  122. package/src/components/label/responsive.scss +0 -0
  123. package/src/components/layout/exports.scss +1 -0
  124. package/src/components/layout/responsive.scss +0 -0
  125. package/src/components/link/exports.scss +1 -0
  126. package/src/components/link/responsive.scss +0 -0
  127. package/src/components/list/exports.scss +1 -0
  128. package/src/components/list/responsive.scss +0 -0
  129. package/src/components/loading/exports.scss +1 -0
  130. package/src/components/loading/responsive.scss +0 -0
  131. package/src/components/main/exports.scss +1 -0
  132. package/src/components/main/index.scss +38 -6
  133. package/src/components/main/mods.scss +0 -6
  134. package/src/components/main/responsive.scss +21 -0
  135. package/src/components/main/states.scss +0 -8
  136. package/src/components/menu/exports.scss +1 -0
  137. package/src/components/menu/responsive.scss +0 -0
  138. package/src/components/mobileHeader/exports.scss +1 -0
  139. package/src/components/mobileHeader/responsive.scss +0 -0
  140. package/src/components/mobileNavigation/exports.scss +1 -0
  141. package/src/components/mobileNavigation/responsive.scss +0 -0
  142. package/src/components/multiSelect/exports.scss +1 -0
  143. package/src/components/multiSelect/responsive.scss +0 -0
  144. package/src/components/navside/component.scss +2 -2
  145. package/src/components/navside/exports.scss +1 -0
  146. package/src/components/navside/index.scss +105 -50
  147. package/src/components/navside/mods.scss +0 -44
  148. package/src/components/navside/responsive.scss +56 -0
  149. package/src/components/navside/states.scss +0 -13
  150. package/src/components/newBadge/exports.scss +1 -0
  151. package/src/components/newBadge/responsive.scss +0 -0
  152. package/src/components/notchBox/exports.scss +1 -0
  153. package/src/components/notchBox/responsive.scss +0 -0
  154. package/src/components/numericBadge/exports.scss +1 -0
  155. package/src/components/numericBadge/responsive.scss +0 -0
  156. package/src/components/pageHeader/component.scss +1 -11
  157. package/src/components/pageHeader/exports.scss +1 -0
  158. package/src/components/pageHeader/index.scss +61 -0
  159. package/src/components/pageHeader/mods.scss +0 -7
  160. package/src/components/pageHeader/responsive.scss +17 -0
  161. package/src/components/pagination/exports.scss +1 -0
  162. package/src/components/pagination/responsive.scss +0 -0
  163. package/src/components/popover/exports.scss +1 -0
  164. package/src/components/popover/responsive.scss +0 -0
  165. package/src/components/progress/exports.scss +1 -0
  166. package/src/components/progress/responsive.scss +0 -0
  167. package/src/components/radio/exports.scss +1 -0
  168. package/src/components/radio/responsive.scss +0 -0
  169. package/src/components/radioButtons/exports.scss +1 -0
  170. package/src/components/radioButtons/responsive.scss +0 -0
  171. package/src/components/radioField/exports.scss +1 -0
  172. package/src/components/radioField/responsive.scss +0 -0
  173. package/src/components/scrollBox/exports.scss +1 -0
  174. package/src/components/scrollBox/responsive.scss +0 -0
  175. package/src/components/section/component.scss +2 -2
  176. package/src/components/section/exports.scss +1 -0
  177. package/src/components/section/index.scss +61 -5
  178. package/src/components/section/mods.scss +1 -11
  179. package/src/components/section/responsive.scss +7 -0
  180. package/src/components/section/vars.scss +2 -0
  181. package/src/components/segmentedControl/exports.scss +1 -0
  182. package/src/components/segmentedControl/index.scss +36 -5
  183. package/src/components/segmentedControl/mods.scss +0 -5
  184. package/src/components/segmentedControl/responsive.scss +4 -0
  185. package/src/components/simpleSelect/exports.scss +1 -0
  186. package/src/components/simpleSelect/responsive.scss +0 -0
  187. package/src/components/skeleton/exports.scss +1 -0
  188. package/src/components/skeleton/responsive.scss +0 -0
  189. package/src/components/sortableList/exports.scss +1 -0
  190. package/src/components/sortableList/responsive.scss +0 -0
  191. package/src/components/statusBadge/exports.scss +1 -0
  192. package/src/components/statusBadge/responsive.scss +0 -0
  193. package/src/components/switch/exports.scss +1 -0
  194. package/src/components/switch/responsive.scss +0 -0
  195. package/src/components/switchField/exports.scss +1 -0
  196. package/src/components/switchField/responsive.scss +0 -0
  197. package/src/components/table/exports.scss +1 -0
  198. package/src/components/table/responsive.scss +0 -0
  199. package/src/components/tableFixed/exports.scss +1 -0
  200. package/src/components/tableFixed/responsive.scss +0 -0
  201. package/src/components/tableFixedDeprecated/exports.scss +1 -0
  202. package/src/components/tableFixedDeprecated/responsive.scss +0 -0
  203. package/src/components/tableOfContent/exports.scss +1 -0
  204. package/src/components/tableOfContent/responsive.scss +0 -0
  205. package/src/components/tableSortable/exports.scss +1 -0
  206. package/src/components/tableSortable/responsive.scss +0 -0
  207. package/src/components/tableSticked/exports.scss +1 -0
  208. package/src/components/tableSticked/responsive.scss +0 -0
  209. package/src/components/tableStickedDeprecated/exports.scss +1 -0
  210. package/src/components/tableStickedDeprecated/responsive.scss +0 -0
  211. package/src/components/tag/exports.scss +1 -0
  212. package/src/components/tag/responsive.scss +0 -0
  213. package/src/components/textField/exports.scss +1 -0
  214. package/src/components/textField/responsive.scss +0 -0
  215. package/src/components/textfields/exports.scss +1 -0
  216. package/src/components/textfields/responsive.scss +0 -0
  217. package/src/components/timeline/exports.scss +1 -0
  218. package/src/components/timeline/responsive.scss +0 -0
  219. package/src/components/timepicker/exports.scss +1 -0
  220. package/src/components/timepicker/responsive.scss +0 -0
  221. package/src/components/title/exports.scss +1 -0
  222. package/src/components/title/responsive.scss +0 -0
  223. package/src/components/titleSection/exports.scss +1 -0
  224. package/src/components/titleSection/responsive.scss +0 -0
  225. package/src/components/toast/exports.scss +1 -0
  226. package/src/components/toast/responsive.scss +0 -0
  227. package/src/components/tooltip/exports.scss +1 -0
  228. package/src/components/tooltip/responsive.scss +0 -0
  229. package/src/components/userPopover/exports.scss +1 -0
  230. package/src/components/userPopover/responsive.scss +0 -0
  231. package/src/components/verticalNavigation/exports.scss +1 -0
  232. package/src/components/verticalNavigation/responsive.scss +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucca-front/scss",
3
- "version": "18.3.0-rc.2",
3
+ "version": "18.3.0-rc.3",
4
4
  "description": "A Sass framework for Lucca products.",
5
5
  "main": "src/main.scss",
6
6
  "scripts": {},
@@ -23,6 +23,6 @@
23
23
  "normalize.css": "^8.0.0"
24
24
  },
25
25
  "peerDependencies": {
26
- "@lucca-front/icons": "18.3.0-rc.2"
26
+ "@lucca-front/icons": "18.3.0-rc.3"
27
27
  }
28
28
  }
@@ -1,77 +1,117 @@
1
+ @use 'sass:string';
1
2
  @use '@lucca-front/scss/src/commons/utils/media';
2
3
 
3
- // dans cette page tous les mixins sont des raccourcis vers media.query et media.queries
4
+ @mixin auto($containerName) {
5
+ *:has(> .#{$containerName}:not(.rwd-disableAutoContainer)) {
6
+ container-type: inline-size;
7
+ container-name: string.unquote($containerName);
8
+ }
9
+ }
10
+
11
+ // dans ce qui suit tous les mixins sont des raccourcis vers media.query et media.queries
4
12
 
5
13
  // les raccourcis des requêtes simples et multiples
6
14
 
7
- @mixin query($breakpoint, $property: 'width', $max: false, $name: '') {
8
- @include media.query($breakpoint: $breakpoint, $property: $property, $max: $max, $at: 'container', $name: $name) {
9
- @content;
15
+ @mixin query($breakpoint, $breakpoint2, $axis: 'width', $inverted: false, $containerName: '') {
16
+ // si on breakpoint supplémentaire est passé, c’est queries qu’il faut appeler
17
+ @if $breakpoint2 != null {
18
+ @include queries(
19
+ $breakpoint1: $breakpoint,
20
+ $breakpoint2: $breakpoint2,
21
+ $axis: $axis,
22
+ $at: 'container',
23
+ $containerName: $containerName,
24
+ $inverted: $inverted
25
+ ) {
26
+ @content;
27
+ }
28
+ } @else {
29
+ @include media.query($breakpoint: $breakpoint, $axis: $axis, $inverted: $inverted, $at: 'container', $containerName: $containerName) {
30
+ @content;
31
+ }
10
32
  }
11
33
  }
12
34
 
13
- @mixin queries($breakpoint1, $breakpoint2, $property: 'width', $name: '') {
14
- @include media.queries($breakpoint1, $breakpoint2, $property: $property, $at: 'container', $name: $name) {
35
+ @mixin queries($breakpoint1, $breakpoint2, $inverted: false, $axis: 'width', $containerName: '') {
36
+ @include media.queries($breakpoint1, $breakpoint2, $inverted: $inverted, $axis: $axis, $at: 'container', $containerName: $containerName) {
15
37
  @content;
16
38
  }
17
39
  }
18
40
 
19
- // les raccourcis pour min/max/between
41
+ // les raccourcis pour min/max/inside/outside
42
+
43
+ @mixin min($breakpoint, $axis: 'width', $containerName: '') {
44
+ @include media.query($breakpoint: $breakpoint, $axis: $axis, $at: 'container', $containerName: $containerName) {
45
+ @content;
46
+ }
47
+ }
20
48
 
21
- @mixin min($breakpoint, $property: 'width', $name: '') {
22
- @include media.query($breakpoint: $breakpoint, $property: $property, $at: 'container', $name: $name) {
49
+ @mixin max($breakpoint, $axis: 'width', $containerName: '') {
50
+ @include media.query($breakpoint, $axis: $axis, $inverted: true, $at: 'container', $containerName: $containerName) {
23
51
  @content;
24
52
  }
25
53
  }
26
54
 
27
- @mixin max($breakpoint, $property: 'width', $name: '') {
28
- @include media.query($breakpoint, $property: $property, $max: true, $at: 'container', $name: $name) {
55
+ @mixin inside($breakpoint1, $breakpoint2, $axis: 'width', $containerName: '') {
56
+ @include media.queries($breakpoint1, $breakpoint2, $axis: $axis, $at: 'container', $containerName: $containerName) {
29
57
  @content;
30
58
  }
31
59
  }
32
60
 
33
- @mixin between($breakpoint1, $breakpoint2, $property: 'width', $name: '') {
34
- @include media.queries($breakpoint1, $breakpoint2, $property: $property, $at: 'container', $name: $name) {
61
+ @mixin outside($breakpoint1, $breakpoint2, $axis: 'width', $containerName: '') {
62
+ @include media.queries($breakpoint1, $breakpoint2, $axis: $axis, $at: 'container', $containerName: $containerName, $inverted: true) {
35
63
  @content;
36
64
  }
37
65
  }
38
66
 
39
- // les raccourcis pour minWidth/maxWidth/betweenWidths
67
+ // les raccourcis pour minWidth/maxWidth/insideWidths/outsideWidths
40
68
 
41
- @mixin minWidth($breakpoint, $name: '') {
42
- @include media.query($breakpoint, $at: 'container', $name: $name) {
69
+ @mixin minWidth($breakpoint, $containerName: '') {
70
+ @include media.query($breakpoint, $at: 'container', $containerName: $containerName) {
43
71
  @content;
44
72
  }
45
73
  }
46
74
 
47
- @mixin maxWidth($breakpoint, $name: '') {
48
- @include media.query($breakpoint, $max: true, $at: 'container', $name: $name) {
75
+ @mixin maxWidth($breakpoint, $containerName: '') {
76
+ @include media.query($breakpoint, $inverted: true, $at: 'container', $containerName: $containerName) {
49
77
  @content;
50
78
  }
51
79
  }
52
80
 
53
- @mixin betweenWidths($breakpoint1, $breakpoint2, $name: '') {
54
- @include media.queries($breakpoint1, $breakpoint2, $at: 'container', $name: $name) {
81
+ @mixin insideWidths($breakpoint1, $breakpoint2, $containerName: '') {
82
+ @include media.queries($breakpoint1, $breakpoint2, $at: 'container', $containerName: $containerName) {
55
83
  @content;
56
84
  }
57
85
  }
58
86
 
59
- // les raccourcis pour minHeight/maxHeight/betweenHeights
87
+ @mixin outsideWidths($breakpoint1, $breakpoint2, $containerName: '') {
88
+ @include media.queries($breakpoint1, $breakpoint2, $at: 'container', $containerName: $containerName, $inverted: true) {
89
+ @content;
90
+ }
91
+ }
92
+
93
+ // les raccourcis pour minHeight/maxHeight/insideHeights/outsideHeights
94
+
95
+ @mixin minHeight($breakpoint, $containerName: '') {
96
+ @include media.query($breakpoint, $axis: 'height', $at: 'container', $containerName: $containerName) {
97
+ @content;
98
+ }
99
+ }
60
100
 
61
- @mixin minHeight($breakpoint, $name: '') {
62
- @include media.query($breakpoint, $property: 'height', $at: 'container', $name: $name) {
101
+ @mixin maxHeight($breakpoint, $containerName: '') {
102
+ @include media.query($breakpoint, $inverted: true, $axis: 'height', $at: 'container', $containerName: $containerName) {
63
103
  @content;
64
104
  }
65
105
  }
66
106
 
67
- @mixin maxHeight($breakpoint, $name: '') {
68
- @include media.query($breakpoint, $max: true, $property: 'height', $at: 'container', $name: $name) {
107
+ @mixin insideHeights($breakpoint1, $breakpoint2, $containerName: '') {
108
+ @include media.queries($breakpoint1, $breakpoint2, $axis: 'height', $at: 'container', $containerName: $containerName) {
69
109
  @content;
70
110
  }
71
111
  }
72
112
 
73
- @mixin betweenHeights($breakpoint1, $breakpoint2, $name: '') {
74
- @include media.queries($breakpoint1, $breakpoint2, $property: 'height', $at: 'container', $name: $name) {
113
+ @mixin outsideHeights($breakpoint1, $breakpoint2, $containerName: '') {
114
+ @include media.queries($breakpoint1, $breakpoint2, $axis: 'height', $at: 'container', $containerName: $containerName, $inverted: true) {
75
115
  @content;
76
116
  }
77
117
  }
@@ -13,33 +13,55 @@
13
13
 
14
14
  // les requêtes simples et multiples
15
15
 
16
- @mixin query($breakpoint, $property: 'width', $max: false, $at: 'media', $name: '') {
17
- $reversed: '';
16
+ @mixin query($breakpoint, $breakpoint2: null, $axis: 'width', $inverted: false, $at: 'media', $containerName: '') {
17
+ // si on breakpoint supplémentaire est passé, c’est queries qu’il faut appeler
18
+ @if $breakpoint2 != null {
19
+ @include queries(
20
+ $breakpoint1: $breakpoint,
21
+ $breakpoint2: $breakpoint2,
22
+ $axis: $axis,
23
+ $at: $at,
24
+ $containerName: $containerName,
25
+ $inverted: $inverted
26
+ ) {
27
+ @content;
28
+ }
29
+ } @else {
30
+ $reversed: '';
18
31
 
19
- @if $max {
20
- $reversed: 'not all and';
32
+ @if $inverted {
33
+ $reversed: 'not all and';
21
34
 
22
- @if $at == 'container' {
23
- $reversed: 'not';
35
+ @if $at == 'container' {
36
+ $reversed: 'not';
37
+ }
24
38
  }
25
- }
26
39
 
27
- @if map.get(config.$breakpoints, $breakpoint) {
28
- $breakpoint: pxToEm(map.get(config.$breakpoints, $breakpoint));
29
- }
40
+ @if $at == 'media' {
41
+ $containerName: '';
42
+ }
30
43
 
31
- @#{$at} #{$name} #{$reversed} (min-#{$property}: #{$breakpoint}) {
32
- @content;
44
+ @if map.get(config.$breakpoints, $breakpoint) {
45
+ $breakpoint: pxToEm(map.get(config.$breakpoints, $breakpoint));
46
+ }
47
+
48
+ @#{$at} #{$containerName} #{$reversed} (min-#{$axis}: #{$breakpoint}) {
49
+ @content;
50
+ }
33
51
  }
34
52
  }
35
53
 
36
- @mixin queries($breakpoint1, $breakpoint2, $property: 'width', $at: 'media', $name: '') {
54
+ @mixin queries($breakpoint1, $breakpoint2, $axis: 'width', $at: 'media', $containerName: '', $inverted: false) {
37
55
  $reversed: 'not all and';
38
56
 
39
57
  @if $at == 'container' {
40
58
  $reversed: 'not';
41
59
  }
42
60
 
61
+ @if $at == 'media' {
62
+ $containerName: '';
63
+ }
64
+
43
65
  @if map.get(config.$breakpoints, $breakpoint1) {
44
66
  $breakpoint1: pxToEm(map.get(config.$breakpoints, $breakpoint1));
45
67
  }
@@ -55,34 +77,49 @@
55
77
  $breakpoint1: $breakpointTmp;
56
78
  }
57
79
 
58
- @#{$at} #{$name} (min-#{$property}: #{$breakpoint1}) {
59
- @#{$at} #{$name} #{$reversed} (min-#{$property}: #{$breakpoint2}) {
80
+ // si on souhaite inverser, ce sont deux queries combinées (or)
81
+ @if $inverted == true {
82
+ @#{$at} #{$containerName} #{$reversed} (min-#{$axis}: #{$breakpoint1}), (min-#{$axis}: #{$breakpoint2}) {
60
83
  @content;
61
84
  }
62
85
  }
86
+ // sinon, ce sont deux queries imbriquées (and)
87
+ @else {
88
+ @#{$at} #{$containerName} (min-#{$axis}: #{$breakpoint1}) {
89
+ @#{$at} #{$containerName} #{$reversed} (min-#{$axis}: #{$breakpoint2}) {
90
+ @content;
91
+ }
92
+ }
93
+ }
63
94
  }
64
95
 
65
- // les raccourcis vers les requêtes pour min/max/between
96
+ // les raccourcis vers les requêtes pour min/max/inside/outside
66
97
 
67
- @mixin min($breakpoint, $property: 'width', $at: 'media') {
68
- @include query($breakpoint, $property: $property, $at: $at) {
98
+ @mixin min($breakpoint, $axis: 'width', $at: 'media') {
99
+ @include query($breakpoint, $axis: $axis, $at: $at) {
69
100
  @content;
70
101
  }
71
102
  }
72
103
 
73
- @mixin max($breakpoint, $property: 'width', $at: 'media') {
74
- @include query($breakpoint, $property: $property, $max: true, $at: $at) {
104
+ @mixin max($breakpoint, $axis: 'width', $at: 'media') {
105
+ @include query($breakpoint, $axis: $axis, $inverted: true, $at: $at) {
75
106
  @content;
76
107
  }
77
108
  }
78
109
 
79
- @mixin between($breakpoint1, $breakpoint2, $property: 'width', $at: 'media') {
80
- @include queries($breakpoint1, $breakpoint2, $property: $property, $at: $at) {
110
+ @mixin inside($breakpoint1, $breakpoint2, $axis: 'width', $at: 'media') {
111
+ @include queries($breakpoint1, $breakpoint2, $axis: $axis, $at: $at) {
81
112
  @content;
82
113
  }
83
114
  }
84
115
 
85
- // les raccourcis vers les requêtes pour minWidth/maxWidth/betweenWidths
116
+ @mixin outside($breakpoint1, $breakpoint2, $axis: 'width', $at: 'media', $inverted: true) {
117
+ @include queries($breakpoint1, $breakpoint2, $axis: $axis, $at: $at) {
118
+ @content;
119
+ }
120
+ }
121
+
122
+ // les raccourcis vers les requêtes pour minWidth/maxWidth/insideWidths/outsideWidths
86
123
 
87
124
  @mixin minWidth($breakpoint, $at: 'media') {
88
125
  @include query($breakpoint, $at: $at) {
@@ -91,18 +128,24 @@
91
128
  }
92
129
 
93
130
  @mixin maxWidth($breakpoint, $at: 'media') {
94
- @include query($breakpoint, $max: true, $at: $at) {
131
+ @include query($breakpoint, $inverted: true, $at: $at) {
132
+ @content;
133
+ }
134
+ }
135
+
136
+ @mixin insideWidths($breakpoint1, $breakpoint2, $at: 'media') {
137
+ @include queries($breakpoint1, $breakpoint2, $at: $at) {
95
138
  @content;
96
139
  }
97
140
  }
98
141
 
99
- @mixin betweenWidths($breakpoint1, $breakpoint2, $at: 'media') {
100
- @include queries($breakpoint1, $breakpoint2, $at: $at) {
101
- @content;
102
- }
142
+ @mixin outsideWidths($breakpoint1, $breakpoint2, $at: 'media') {
143
+ @include queries($breakpoint1, $breakpoint2, $at: $at, $inverted: true) {
144
+ @content;
145
+ }
103
146
  }
104
147
 
105
- // les raccourcis vers les requêtes pour minHeight/maxHeight/betweenHeights
148
+ // les raccourcis vers les requêtes pour minHeight/maxHeight/insideHeights/outsideHeights
106
149
 
107
150
  @mixin minHeight($breakpoint, $at: 'media') {
108
151
  @include query($breakpoint, 'height', $at: $at) {
@@ -111,15 +154,21 @@
111
154
  }
112
155
 
113
156
  @mixin maxHeight($breakpoint, $at: 'media') {
114
- @include query($breakpoint, $max: true, $property: 'height', $at: $at) {
157
+ @include query($breakpoint, $inverted: true, $axis: 'height', $at: $at) {
115
158
  @content;
116
159
  }
117
160
  }
118
161
 
119
- @mixin betweenHeights($breakpoint1, $breakpoint2, $at: 'media') {
120
- @include queries($breakpoint1, $breakpoint2, $property: 'height', $at: $at) {
121
- @content;
122
- }
162
+ @mixin insideHeights($breakpoint1, $breakpoint2, $at: 'media') {
163
+ @include queries($breakpoint1, $breakpoint2, $axis: 'height', $at: $at) {
164
+ @content;
165
+ }
166
+ }
167
+
168
+ @mixin outsideHeights($breakpoint1, $breakpoint2, $at: 'media') {
169
+ @include queries($breakpoint1, $breakpoint2, $axis: 'height', $at: $at, $inverted: true) {
170
+ @content;
171
+ }
123
172
  }
124
173
 
125
174
  // Touch detection
@@ -133,4 +182,4 @@
133
182
  @media not (any-pointer: coarse) {
134
183
  @content;
135
184
  }
136
- }
185
+ }
@@ -63,6 +63,6 @@
63
63
  --commons-container-padding: 3.5rem;
64
64
 
65
65
  --commons-navSide-width: 0rem; // unit is required for calc
66
- --commons-navSide-compact-width: 7.5rem;
66
+ --commons-navSide-compact-width: 7.5rem; // deprecated
67
67
  --commons-navSide-mobile-toggle-height: 3.5rem;
68
68
  }
@@ -5,4 +5,5 @@
5
5
  @forward 'vars';
6
6
  @forward 'mods';
7
7
  @forward 'states';
8
+ @forward 'responsive';
8
9
  @forward 'component';
@@ -1,9 +1,12 @@
1
1
  // This file contains all the connections required to make the component functional.
2
2
  // The component’s mixins are requested, then assigned to classes.
3
- // To add the component to the list of all existing components, call it from `components/index` with `@forward 'sample';`.
4
- // Modifiers and states are optional and must be prefixed by `.mod-` and `.is-`.
3
+ // To add the component to the list of all existing components, call it from `components/index` with `@use 'sample';`.
4
+ // Modifiers and states are optional and must be prefixed by `.mod-`, `.rwd-` and `.is-`.
5
+ // A responsive mixin and varible define the default behaviour but can be overridden. All this settings must be preserved.
5
6
 
6
7
  @use 'exports' as *;
8
+ @use '@lucca-front/scss/src/commons/utils/media';
9
+ @use '@lucca-front/scss/src/commons/utils/container';
7
10
 
8
11
  .sample {
9
12
  @include vars;
@@ -17,3 +20,37 @@
17
20
  @include sampleStateA;
18
21
  }
19
22
  }
23
+
24
+ @mixin responsive(
25
+ $breakpoint: 'M',
26
+ $breakpoint2: null,
27
+ $inverted: false,
28
+ $at: 'container',
29
+ $containerName: 'sample',
30
+ $responsiveSelector: null,
31
+ $axis: 'width',
32
+ $selector: '.sample'
33
+ ) {
34
+ @if ($at == 'container') {
35
+ @include container.auto($containerName);
36
+ }
37
+
38
+ #{if($responsiveSelector, $selector + '.rwd-' + $responsiveSelector, $selector)} {
39
+ @include media.query(
40
+ $breakpoint: $breakpoint,
41
+ $breakpoint2: $breakpoint2,
42
+ $inverted: $inverted,
43
+ $at: $at,
44
+ $containerName: $containerName,
45
+ $axis: $axis
46
+ ) {
47
+ @include sampleBehaviour;
48
+ }
49
+ }
50
+ }
51
+
52
+ $defaultResponsive: true !default;
53
+
54
+ @if $defaultResponsive {
55
+ @include responsive;
56
+ }
@@ -0,0 +1,7 @@
1
+ // All responsive behaviours are defined in this file through various mixins.
2
+ // The file may be empty but must be present.
3
+ // All property values modified by a responsive behaviour are modified through a CSS variable.
4
+
5
+ @mixin sampleBehaviour {
6
+ --components-sample-property1: otherValue;
7
+ }
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';
File without changes
@@ -3,7 +3,6 @@
3
3
  @use '@lucca-front/scss/src/commons/utils/reset';
4
4
 
5
5
  @mixin component($atRoot: namespace.$defaultAtRoot) {
6
- container: comment / inline-size;
7
6
  display: flex;
8
7
  flex-direction: column;
9
8
  gap: var(--pr-t-spacings-50);
@@ -1,4 +1,5 @@
1
1
  @forward 'vars';
2
2
  @forward 'mods';
3
3
  @forward 'states';
4
+ @forward 'responsive';
4
5
  @forward 'component';