@lucca-front/scss 20.3.0-rc.1 → 20.3.0-rc.2

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 (69) hide show
  1. package/dist/lucca-front.min.css +1 -1
  2. package/package.json +2 -2
  3. package/src/commons/base.scss +3 -1
  4. package/src/commons/config.scss +7 -1
  5. package/src/commons/core.scss +1 -1
  6. package/src/commons/utils/color.scss +14 -0
  7. package/src/commons/vars.scss +12 -12
  8. package/src/components/avatar/component.scss +4 -3
  9. package/src/components/avatar/index.scss +4 -0
  10. package/src/components/avatar/mods.scss +17 -2
  11. package/src/components/avatar/vars.scss +4 -0
  12. package/src/components/box/component.scss +1 -1
  13. package/src/components/box/mods.scss +1 -0
  14. package/src/components/box/vars.scss +1 -0
  15. package/src/components/button/component.scss +0 -1
  16. package/src/components/button/index.scss +16 -1
  17. package/src/components/button/mods.scss +16 -1
  18. package/src/components/button/states.scss +38 -9
  19. package/src/components/button/vars.scss +1 -1
  20. package/src/components/buttonGroup/component.scss +17 -0
  21. package/src/components/callout/component.scss +13 -4
  22. package/src/components/callout/index.scss +9 -0
  23. package/src/components/callout/mods.scss +30 -2
  24. package/src/components/callout/vars.scss +5 -0
  25. package/src/components/dataTable/component.scss +2 -0
  26. package/src/components/dataTable/index.scss +20 -0
  27. package/src/components/dataTable/mods.scss +5 -6
  28. package/src/components/dataTable/states.scss +12 -0
  29. package/src/components/dialog/component.scss +2 -2
  30. package/src/components/dialog/index.scss +4 -0
  31. package/src/components/dialog/mods.scss +4 -0
  32. package/src/components/footer/component.scss +0 -1
  33. package/src/components/form/component.scss +10 -0
  34. package/src/components/gauge/component.scss +71 -14
  35. package/src/components/gauge/index.scss +21 -0
  36. package/src/components/gauge/mods.scss +21 -7
  37. package/src/components/gauge/states.scss +8 -0
  38. package/src/components/gauge/vars.scss +16 -1
  39. package/src/components/index.scss +1 -0
  40. package/src/components/inputFramed/component.scss +1 -0
  41. package/src/components/inputFramed/index.scss +4 -0
  42. package/src/components/inputFramed/mods.scss +3 -0
  43. package/src/components/inputFramed/vars.scss +1 -0
  44. package/src/components/numericBadge/states.scss +5 -0
  45. package/src/components/readMore/component.scss +21 -5
  46. package/src/components/readMore/states.scss +2 -0
  47. package/src/components/richText/component.scss +1 -3
  48. package/src/components/segmentedControl/component.scss +1 -0
  49. package/src/components/skeleton/mods.scss +1 -1
  50. package/src/components/suggestion/component.scss +19 -0
  51. package/src/components/suggestion/exports.scss +4 -0
  52. package/src/components/suggestion/index.scss +16 -0
  53. package/src/components/suggestion/mods.scss +0 -0
  54. package/src/components/suggestion/states.scss +12 -0
  55. package/src/components/suggestion/vars.scss +4 -0
  56. package/src/components/tag/component.scss +4 -1
  57. package/src/components/tag/index.scss +12 -0
  58. package/src/components/tag/mods.scss +30 -3
  59. package/src/components/tag/states.scss +6 -0
  60. package/src/components/tag/vars.scss +2 -0
  61. package/src/components/textField/component.scss +1 -0
  62. package/src/components/textField/index.scss +4 -0
  63. package/src/components/textField/states.scss +5 -0
  64. package/src/components/textField/vars.scss +1 -0
  65. package/src/components/textFlow/component.scss +6 -0
  66. package/src/components/timeline/mods.scss +3 -3
  67. package/src/components/title/index.scss +11 -0
  68. package/src/components/title/mods.scss +6 -0
  69. package/src/components/userPopover/component.scss +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucca-front/scss",
3
- "version": "20.3.0-rc.1",
3
+ "version": "20.3.0-rc.2",
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": "20.3.0-rc.1"
26
+ "@lucca-front/icons": "20.3.0-rc.2"
27
27
  }
28
28
  }
@@ -99,7 +99,9 @@
99
99
  }
100
100
  }
101
101
 
102
- button {
102
+ button, button[type] {
103
+ text-rendering: inherit;
104
+
103
105
  &:focus-visible {
104
106
  @include a11y.focusVisible;
105
107
  }
@@ -116,7 +116,7 @@ $borderRadiusTokens: (
116
116
  $product: 'brand' !default;
117
117
  $palettesShades: text, 0, 25, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900; // text is deprecated
118
118
  $palettesStates: 'critical', 'error', 'warning', 'success', 'successContrasted', 'warningContrasted';
119
- $palettesDefault: 'brand', 'brandContrasted', 'neutral', 'navigation';
119
+ $palettesDefault: 'brand', 'brandContrasted', 'neutral', 'navigation', 'AI';
120
120
  $palettesProduct: 'product';
121
121
  $palettesOtherProduct: () !default;
122
122
  $palettesDecorative: 'kiwi', 'lime', 'cucumber', 'mint', 'glacier', 'lagoon', 'blueberry', 'lavender', 'grape', 'watermelon', 'pumpkin',
@@ -140,6 +140,11 @@ $fieldsWidth: 20, 30, 40, 50, 60 !default;
140
140
 
141
141
  // Palettes
142
142
 
143
+ $ai: (
144
+ 500: #BC6FDD,
145
+ 600: #A440CF,
146
+ );
147
+
143
148
  $brand: (
144
149
  // text is deprecated
145
150
  text: #ffffff,
@@ -545,6 +550,7 @@ $productsInterpolation: (
545
550
  );
546
551
 
547
552
  $palettesInterpolation: (
553
+ 'AI': $ai,
548
554
  'lucca': $brand,
549
555
  'brand': $brand,
550
556
  'brandContrasted': $brandContrasted,
@@ -29,7 +29,7 @@ $verticalAlign: 'baseline', 'sub', 'super', 'text-top', 'text-bottom', 'middle',
29
29
  $position: 'absolute', 'relative', 'static', 'fixed', 'sticky';
30
30
  $decoration: 'underline', 'line-through', 'none';
31
31
  $overflow: 'hidden', 'auto', 'visible', 'scroll';
32
- $cursor: 'pointer', 'auto';
32
+ $cursor: 'pointer', 'auto', 'default', 'text';
33
33
 
34
34
  // Tokens
35
35
 
@@ -30,3 +30,17 @@
30
30
  @include core.rosetta('--palettes-success', '--palettes-successContrasted', config.$palettesShades);
31
31
  @include core.rosetta('--palettes-warning', '--palettes-warningContrasted', config.$palettesShades);
32
32
  }
33
+
34
+ @mixin borderGradient($angle: 0, $color1: var(--palettes-neutral-0) , $color2: var(--palettes-neutral-900), $radius: var(--pr-t-border-radius-default), $width: var(--commons-divider-width)) {
35
+ &::before {
36
+ content: '';
37
+ pointer-events: none;
38
+ position: absolute;
39
+ inset: calc(#{$width} * -1);
40
+ padding: #{$width};
41
+ background-image: conic-gradient(from #{$angle}, #{$color1}, #{$color2}, #{$color1});
42
+ border-radius: calc(#{$radius} + #{$width});
43
+ mask: linear-gradient(var(--palettes-neutral-0)) content-box, linear-gradient(var(--palettes-neutral-0));
44
+ mask-composite: exclude;
45
+ }
46
+ }
@@ -82,6 +82,18 @@
82
82
  --commons-font-family: '#{config.$fontFamily}', Tahoma, sans-serif;
83
83
  --commons-font-family-brand: '#{config.$fontFamilyBrand}', sans-serif;
84
84
 
85
+ --commons-background-base: var(--palettes-neutral-25);
86
+
87
+ --commons-divider-color: var(--palettes-neutral-200);
88
+
89
+ --commons-container-padding: 0 var(--pr-t-spacings-200);
90
+ --commons-container-maxWidth: 100rem; // 100 + 0 = 100
91
+
92
+ --commons-navSide-width: 0px;
93
+ /* stylelint-disable-next-line property-disallowed-list */
94
+ --commons-navSide-compact-width: 7.5rem;
95
+ --commons-navSide-mobile-toggle-height: 3.5rem;
96
+
85
97
  @if (config.$fontFamilyCursive) {
86
98
  --commons-font-family-cursive: '#{config.$fontFamilyCursive}', cursive;
87
99
  }
@@ -90,21 +102,14 @@
90
102
  @include core.cssvars('sizes-#{$key}', $map);
91
103
  }
92
104
 
93
- --commons-background-base: var(--palettes-neutral-25);
94
- --commons-divider-color: var(--palettes-neutral-200);
95
-
96
105
  @each $breakpoint, $value in config.$breakpoints {
97
106
  --commons-container-maxWidth#{$breakpoint}: #{function.pxToRem($value)};
98
107
  }
99
108
 
100
- --commons-container-padding: 0 var(--pr-t-spacings-200);
101
-
102
109
  @include media.min('S') {
103
110
  --commons-container-padding: 0 var(--pr-t-spacings-400);
104
111
  }
105
112
 
106
- --commons-container-maxWidth: 100rem; // 100 + 0 = 100
107
-
108
113
  &:has(.navSide) {
109
114
  --commons-container-maxWidth: 85rem; // 85 + 15 = 100
110
115
  }
@@ -113,11 +118,6 @@
113
118
  --commons-container-maxWidth: 92.5rem; // 92.5 + 7.5 = 100
114
119
  }
115
120
 
116
- --commons-navSide-width: 0px;
117
- /* stylelint-disable-next-line property-disallowed-list */
118
- --commons-navSide-compact-width: 7.5rem;
119
- --commons-navSide-mobile-toggle-height: 3.5rem;
120
-
121
121
  @media (prefers-contrast: more) {
122
122
  @media (forced-colors: none) {
123
123
  @include color.contrasted;
@@ -5,14 +5,14 @@
5
5
  @mixin component($atRoot: namespace.$defaultAtRoot) {
6
6
  display: inline-block;
7
7
  vertical-align: middle;
8
- border-radius: var(--pr-t-border-radius-full);
8
+ border-radius: var(--components-avatar-borderRadius);
9
9
  inline-size: var(--components-avatar-size);
10
10
  aspect-ratio: 1;
11
11
 
12
12
  @at-root ($atRoot) {
13
13
  .avatar-picture {
14
- background-color: var(--palettes-neutral-200);
15
- border-radius: var(--pr-t-border-radius-full);
14
+ background-color: var(--components-avatar-picture-background);
15
+ border-radius: var(--components-avatar-borderRadius);
16
16
  background-position: center;
17
17
  background-size: cover;
18
18
  background-repeat: no-repeat;
@@ -31,6 +31,7 @@
31
31
  font-family: var(--pr-t-font-family-brand);
32
32
  line-height: 1;
33
33
  color: var(--pr-t-color-text-reverse);
34
+ display: var(--components-avatar-picture-initials-display);
34
35
  }
35
36
 
36
37
  .avatarWrapper {
@@ -37,6 +37,10 @@
37
37
  @include placeholder;
38
38
  }
39
39
  }
40
+
41
+ &.mod-AI {
42
+ @include AI;
43
+ }
40
44
  }
41
45
 
42
46
  .avatarWrapper {
@@ -1,4 +1,5 @@
1
1
  @use '@lucca-front/icons/src/commons/utils/icon';
2
+ @use '@lucca-front/icons/src/icon/exports' as icons;
2
3
 
3
4
  @mixin XS {
4
5
  --components-avatar-size: 1.5rem;
@@ -72,6 +73,8 @@
72
73
  }
73
74
 
74
75
  @mixin placeholder {
76
+ --components-avatar-picture-initials-display: none;
77
+
75
78
  .avatar-picture {
76
79
  background-color: var(--palettes-neutral-200) !important;
77
80
 
@@ -84,7 +87,19 @@
84
87
  }
85
88
  }
86
89
 
87
- .avatar-picture-initials {
88
- display: none;
90
+ }
91
+
92
+ @mixin AI {
93
+ --components-avatar-borderRadius: var(--pr-t-border-radius-default);
94
+ --components-avatar-picture-background: var(--palettes-neutral-0);
95
+ --components-avatar-picture-initials-display: none;
96
+
97
+ .avatar-picture {
98
+ &::before {
99
+ @include icons.AI;
100
+ @include icon.generate('weather_stars');
101
+
102
+ font-size: var(--components-avatar-AI-size);
103
+ }
89
104
  }
90
105
  }
@@ -5,6 +5,10 @@
5
5
  --components-avatar-scale: 1;
6
6
  --components-avatar-background: var(--pr-t-elevation-surface-default);
7
7
  --components-avatar-placeholder-size: 1.25rem;
8
+ --components-avatar-AI-size: var(--pr-t-font-fontSize-200);
9
+ --components-avatar-borderRadius: var(--pr-t-border-radius-full);
10
+ --components-avatar-picture-background: var(--palettes-neutral-200);
11
+ --components-avatar-picture-initials-display: block;
8
12
  }
9
13
 
10
14
  @mixin varsWrapper {
@@ -2,7 +2,7 @@
2
2
  @use '@lucca-front/scss/src/commons/utils/namespace';
3
3
 
4
4
  @mixin component($atRoot: namespace.$defaultAtRoot) {
5
- border-radius: var(--pr-t-border-radius-default);
5
+ border-radius: var(--components-box-borderRadius);
6
6
  padding: var(--components-box-padding);
7
7
  background-color: var(--components-box-background, var(--pr-t-elevation-surface-raised));
8
8
  display: block;
@@ -44,6 +44,7 @@
44
44
 
45
45
  @mixin withArrow {
46
46
  --components-box-padding: var(--pr-t-spacings-200);
47
+ --components-box-borderRadius: var(--pr-t-border-radius-small) var(--pr-t-border-radius-structure) var(--pr-t-border-radius-structure);
47
48
 
48
49
  .box-arrow {
49
50
  --components-box-arrow-bottom: 100%;
@@ -2,6 +2,7 @@
2
2
  --components-box-background: var(--pr-t-elevation-surface-raised);
3
3
  --components-box-margin: 0 0 var(--pr-t-spacings-200);
4
4
  --components-box-padding: var(--pr-t-spacings-300);
5
+ --components-box-borderRadius: var(--pr-t-border-radius-structure);
5
6
  --components-box-toggle-arrow-size: 0.8rem;
6
7
  --components-box-toggle-arrow-left: 2.5rem;
7
8
  }
@@ -32,7 +32,6 @@
32
32
  text-wrap: balance;
33
33
  text-align: center;
34
34
  border: 0;
35
- text-rendering: inherit;
36
35
 
37
36
  &,
38
37
  &:is(a) {
@@ -7,6 +7,18 @@
7
7
  }
8
8
 
9
9
  @layer mods {
10
+ &.mod-AI {
11
+ @include AI;
12
+
13
+ &.is-success {
14
+ @include successAI;
15
+ }
16
+
17
+ &.is-loading {
18
+ @include loadingAI;
19
+ }
20
+ }
21
+
10
22
  &.mod-block {
11
23
  @include block;
12
24
  }
@@ -140,6 +152,7 @@
140
152
  @include loadingXS;
141
153
  }
142
154
 
155
+ &.mod-AI,
143
156
  &.mod-outlined {
144
157
  @include loadingOutlined;
145
158
  }
@@ -160,6 +173,7 @@
160
173
  &.success {
161
174
  @include success;
162
175
 
176
+ &.mod-AI,
163
177
  &.mod-outlined {
164
178
  @include successOutlined;
165
179
  }
@@ -179,7 +193,8 @@
179
193
 
180
194
  // .disabled is deprecated
181
195
  &.is-disabled,
182
- &.disabled {
196
+ &.disabled,
197
+ &[aria-disabled] {
183
198
  @include disabled;
184
199
  }
185
200
  }
@@ -1,6 +1,7 @@
1
1
  @use '@lucca-front/icons/src/icon/exports' as icons;
2
2
  @use '@lucca-front/icons/src/commons/utils/icon';
3
3
  @use '@lucca-front/scss/src/commons/utils/a11y';
4
+ @use '@lucca-front/scss/src/commons/utils/color';
4
5
  @use '@lucca-front/scss/src/components/numericBadge/exports' as numericBadge;
5
6
 
6
7
  @mixin S {
@@ -83,6 +84,7 @@
83
84
  @mixin ghost {
84
85
  --components-button-backgroundColor: transparent;
85
86
  --components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));
87
+ --components-button-boxShadow: none;
86
88
 
87
89
  &:hover,
88
90
  &:focus-visible {
@@ -118,10 +120,11 @@
118
120
  --components-button-minWidth: 2rem;
119
121
  --components-button-padding: 0;
120
122
 
121
- &::before {
123
+ &::after {
122
124
  @include icon.generate('arrow_chevron_bottom');
123
125
 
124
126
  block-size: 0;
127
+ order: -1;
125
128
  vertical-align: text-top;
126
129
  }
127
130
  }
@@ -243,3 +246,15 @@
243
246
  @mixin counterXS {
244
247
  --components-button-paddingInlineEnd: var(--pr-t-spacings-50);
245
248
  }
249
+
250
+ @mixin AI {
251
+ @include outlined;
252
+
253
+ &:not(:disabled) {
254
+ @include color.borderGradient(135deg, var(--palettes-brand-400), var(--palettes-AI-500));
255
+
256
+ .lucca-icon {
257
+ @include icons.AI;
258
+ }
259
+ }
260
+ }
@@ -1,3 +1,4 @@
1
+ @use '@lucca-front/icons/src/icon/exports' as icons;
1
2
  @use '@lucca-front/scss/src/commons/config';
2
3
  @use '@lucca-front/scss/src/commons/core';
3
4
  @use '@lucca-front/scss/src/commons/utils/keyframe';
@@ -22,10 +23,15 @@
22
23
  --components-button-pointerEvents: none;
23
24
  --components-button-color: transparent;
24
25
  --components-button-userSelect: none;
25
- --components-button-backgroundColor: var(--palettes-product-500);
26
- --commons-loading-frontground: var(--palettes-product-50);
26
+ --components-button-boxShadow: none;
27
+ --components-button-backgroundColor: var(--palettes-500, var(--palettes-product-500));
28
+ --commons-loading-frontground: var(--palettes-50, var(--palettes-product-50));
27
29
 
28
30
  @include loading.spinner(var(--pr-t-font-body-M-lineHeight));
31
+
32
+ .numericBadge {
33
+ @include numericBadge.state;
34
+ }
29
35
  }
30
36
 
31
37
  @mixin loadingS {
@@ -49,12 +55,15 @@
49
55
  --commons-loading-frontground: var(--palettes-neutral-400);
50
56
  }
51
57
 
52
- @mixin state {
58
+ @mixin success {
59
+ --components-button-backgroundColor: var(--palettes-500, var(--palettes-product-500));
53
60
  --components-button-color: transparent;
54
61
  --components-button-pointerEvents: none;
55
62
  --components-button-userSelect: none;
56
63
 
57
64
  &::after {
65
+ @include icon.generate('sign_confirm');
66
+
58
67
  color: var(--palettes-neutral-0);
59
68
  font-size: calc(1.5 * var(--pr-t-font-body-M-fontSize));
60
69
  block-size: var(--pr-t-font-body-M-lineHeight);
@@ -62,15 +71,33 @@
62
71
  margin: auto;
63
72
  position: absolute;
64
73
  }
74
+
75
+ .numericBadge {
76
+ @include numericBadge.state;
77
+ }
65
78
  }
66
79
 
67
- @mixin success {
68
- --components-button-backgroundColor: var(--palettes-product-500);
80
+ @mixin loadingAI {
81
+ .lucca-icon {
82
+ @include icons.transparent;
83
+ }
84
+
85
+ &::before {
86
+ content: none;
87
+ }
88
+ }
89
+
90
+ @mixin successAI {
91
+ .lucca-icon {
92
+ @include icons.transparent;
93
+ }
69
94
 
70
- @include state;
95
+ &::before {
96
+ content: none;
97
+ }
71
98
 
72
99
  &::after {
73
- @include icon.generate('sign_confirm');
100
+ @include icons.AI;
74
101
  }
75
102
  }
76
103
 
@@ -93,7 +120,7 @@
93
120
  --components-button-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-neutral-100);
94
121
 
95
122
  &::after {
96
- color: var(--palettes-product-700);
123
+ color: var(--palettes-700, var(--palettes-product-700));
97
124
  }
98
125
  }
99
126
 
@@ -102,7 +129,7 @@
102
129
  --components-button-boxShadow: none;
103
130
 
104
131
  &::after {
105
- color: var(--palettes-product-700);
132
+ color: var(--palettes-700, var(--palettes-product-700));
106
133
  }
107
134
  }
108
135
 
@@ -113,4 +140,6 @@
113
140
  animation-name: shake;
114
141
  animation-iteration-count: 1;
115
142
  animation-duration: var(--commons-animations-durations-standard);
143
+
144
+ @include keyframe.shake;
116
145
  }
@@ -15,7 +15,7 @@
15
15
  --components-button-width: auto;
16
16
  --components-button-minWidth: none;
17
17
  --components-button-userSelect: auto;
18
- --components-button-boxShadow: none;
18
+ --components-button-boxShadow: var(--pr-t-elevation-shadow-button);
19
19
  --components-button-color: var(--palettes-0, var(--palettes-text, var(--palettes-product-0)));
20
20
  --components-button-backgroundColor: var(--palettes-700, var(--palettes-product-700));
21
21
  --components-button-arrow-transform: none;
@@ -66,5 +66,22 @@
66
66
 
67
67
  &:is(ul) {
68
68
  flex-wrap: wrap;
69
+
70
+ .button.mod-more {
71
+ block-size: 100%;
72
+ min-block-size: 2.25rem;
73
+
74
+ &.mod-S {
75
+ min-block-size: 2rem;
76
+ }
77
+
78
+ &.mod-XS {
79
+ min-block-size: 1.5rem;
80
+ }
81
+
82
+ &::after {
83
+ content: none;
84
+ }
85
+ }
69
86
  }
70
87
  }
@@ -9,9 +9,9 @@
9
9
  align-items: flex-start;
10
10
  position: relative;
11
11
  border-radius: var(--pr-t-border-radius-default);
12
- background-color: var(--palettes-50, var(--palettes-neutral-50));
12
+ background-color: var(--components-callout-backgroundColor);
13
13
  color: var(--pr-t-color-text);
14
- box-shadow: 0 0 0 var(--commons-divider-width) var(--palettes-300, var(--palettes-neutral-300));
14
+ box-shadow: var(--components-callout-boxShadow);
15
15
  gap: var(--components-callout-gap);
16
16
  padding: var(--components-callout-padding);
17
17
  font: var(--components-callout-font);
@@ -40,11 +40,20 @@
40
40
  font-weight: 600;
41
41
  }
42
42
 
43
+ .callout-content-description {
44
+ display: var(--components-callout-content-description-display);
45
+ justify-content: space-between;
46
+ gap: var(--pr-t-spacings-150);
47
+ align-items: flex-start;
48
+
49
+ }
50
+
51
+
43
52
  .callout-content-description-actions {
44
53
  display: flex;
45
54
  gap: var(--pr-t-spacings-75);
46
- margin-block-start: var(--pr-t-spacings-50);
47
- padding-block: var(--pr-t-spacings-50);
55
+ margin-block-start: var(--components-callout-content-description-action-marginBlockStart);
56
+ padding-block: var(--components-callout-content-description-action-paddingBlock);
48
57
  padding-inline: 0;
49
58
 
50
59
  .button {
@@ -11,4 +11,13 @@
11
11
  @include S;
12
12
  }
13
13
  }
14
+
15
+ &.mod-AI {
16
+ @include AI;
17
+ }
18
+
19
+ &:has(.callout-content-description-actions.mod-inline) {
20
+ @include actionsInline;
21
+ }
14
22
  }
23
+
@@ -1,4 +1,5 @@
1
- @use '@lucca-front/icons/src/icon/exports' as icon;
1
+ @use '@lucca-front/icons/src/icon/exports' as icons;
2
+ @use '@lucca-front/scss/src/commons/utils/color';
2
3
  @use '@lucca-front/scss/src/components/button/exports' as button;
3
4
 
4
5
  @mixin S {
@@ -7,7 +8,7 @@
7
8
  --components-callout-kill-size: 1.25rem;
8
9
 
9
10
  .callout-icon {
10
- @include icon.S;
11
+ @include icons.S;
11
12
  }
12
13
 
13
14
  .callout-content-description-actions {
@@ -26,3 +27,30 @@
26
27
  --components-callout-display: inline-flex;
27
28
  --components-callout-padding: var(--pr-t-spacings-100);
28
29
  }
30
+
31
+ @mixin AI {
32
+ --components-callout-boxShadow: var(--pr-t-elevation-shadow-button);
33
+ --components-callout-backgroundColor: var(--pr-t-elevation-surface-raised);
34
+
35
+ @include color.borderGradient(135deg, var(--palettes-brand-400), var(--palettes-AI-500));
36
+
37
+ .callout-icon {
38
+ .lucca-icon {
39
+ @include icons.AI;
40
+ }
41
+ }
42
+ }
43
+
44
+ @mixin actionsInline {
45
+ --components-callout-content-description-display: flex;
46
+ --components-callout-content-description-action-marginBlockStart: 0;
47
+ --components-callout-content-description-action-paddingBlock: 0;
48
+
49
+ .button {
50
+ @include button.XS;
51
+ }
52
+
53
+ .button.mod-onlyIcon {
54
+ @include button.onlyIconXS;
55
+ }
56
+ }
@@ -4,6 +4,11 @@
4
4
  --components-callout-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-150);
5
5
  --components-callout-font: inherit;
6
6
  --components-callout-kill-size: 1.5rem;
7
+ --components-callout-boxShadow: 0 0 0 var(--commons-divider-width) var(--palettes-300, var(--palettes-neutral-300));
8
+ --components-callout-backgroundColor: var(--palettes-50, var(--palettes-neutral-50));
9
+ --components-callout-content-description-display: block;
10
+ --components-callout-content-description-action-marginBlockStart: var(--pr-t-spacings-50);
11
+ --components-callout-content-description-action-paddingBlock: var(--pr-t-spacings-50);
7
12
 
8
13
  // Deprecated
9
14
  --components-callout-fontSize: inherit;
@@ -65,6 +65,8 @@
65
65
  box-shadow: var(--components-dataTable-cell-shadow);
66
66
  background-color: var(--components-dataTable-cell-background);
67
67
  text-align: var(--components-dataTable-cell-textAlign);
68
+ transition-property: background-color;
69
+ transition-duration: var(--commons-animations-durations-fast);
68
70
 
69
71
  &:first-child {
70
72
  inline-size: var(--components-dataTable-cellFirst-width);
@@ -39,6 +39,22 @@
39
39
  @include layoutFixedCells;
40
40
  }
41
41
  }
42
+
43
+ &.mod-hover {
44
+ :is(.dataTable-head-row.mod-selectable, .dataTable-body-row) {
45
+ &:hover {
46
+ @include hover;
47
+ }
48
+
49
+ &.mod-selectable {
50
+ &:has(input:checked) {
51
+ &:hover {
52
+ @include selectedHover;
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
42
58
  }
43
59
 
44
60
  :is(.dataTable-head-row, .dataTable-body-row, .dataTable-foot-row) {
@@ -49,6 +65,10 @@
49
65
 
50
66
  &.mod-selectable {
51
67
  @include selectable;
68
+
69
+ &:has(input:checked) {
70
+ @include selected;
71
+ }
52
72
  }
53
73
 
54
74
  &.mod-draggable {
@@ -38,17 +38,16 @@
38
38
  @mixin group {
39
39
  @include buttonExpand;
40
40
 
41
- --components-dataTable-cell-background: var(--palettes-neutral-25);
42
-
43
41
  font: var(--pr-t-font-heading-4);
42
+
43
+ &,
44
+ &:hover {
45
+ --components-dataTable-cell-background: var(--palettes-neutral-50);
46
+ }
44
47
  }
45
48
 
46
49
  @mixin selectable {
47
50
  --components-dataTable-cellFirst-width: 2.5rem;
48
-
49
- &:has(input:checked) {
50
- --components-dataTable-cell-background: var(--palettes-product-50);
51
- }
52
51
  }
53
52
 
54
53
  @mixin draggable {
@@ -5,3 +5,15 @@
5
5
  @mixin expanded {
6
6
  --components-dataTable-expand-rotation: 0deg;
7
7
  }
8
+
9
+ @mixin hover {
10
+ --components-dataTable-cell-background: var(--palettes-neutral-25);
11
+ }
12
+
13
+ @mixin selected {
14
+ --components-dataTable-cell-background: var(--palettes-product-50);
15
+ }
16
+
17
+ @mixin selectedHover {
18
+ --components-dataTable-cell-background: var(--palettes-product-100);
19
+ }