@lucca-front/scss 22.0.5 → 22.1.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 (44) hide show
  1. package/dist/lucca-front.min.css +1 -1
  2. package/package.json +3 -3
  3. package/src/commons/config.scss +1 -1
  4. package/src/commons/utils/highlight-prisme.scss +2 -0
  5. package/src/components/activityFeed/component.scss +7 -5
  6. package/src/components/activityFeed/index.scss +4 -0
  7. package/src/components/activityFeed/states.scss +6 -0
  8. package/src/components/dataTableSticked/mods.scss +6 -0
  9. package/src/components/dialog/component.scss +6 -3
  10. package/src/components/dialog/mods.scss +2 -2
  11. package/src/components/dialog/vars.scss +6 -0
  12. package/src/components/fancyBox/component.scss +87 -14
  13. package/src/components/fancyBox/mods.scss +8 -8
  14. package/src/components/fancyBox/vars.scss +25 -7
  15. package/src/components/highlightData/index.scss +12 -0
  16. package/src/components/highlightData/mods.scss +27 -0
  17. package/src/components/highlightData/vars.scss +9 -0
  18. package/src/components/index.scss +1 -0
  19. package/src/components/link/index.scss +4 -0
  20. package/src/components/link/mods.scss +5 -0
  21. package/src/components/multiSelect/component.scss +17 -0
  22. package/src/components/multiSelect/index.scss +18 -0
  23. package/src/components/multiSelect/mods.scss +33 -0
  24. package/src/components/multiSelect/states.scss +4 -0
  25. package/src/components/multiSelect/vars.scss +1 -0
  26. package/src/components/priorityLevels/component.scss +38 -0
  27. package/src/components/priorityLevels/exports.scss +4 -0
  28. package/src/components/priorityLevels/index.scss +30 -0
  29. package/src/components/priorityLevels/mods.scss +28 -0
  30. package/src/components/priorityLevels/states.scss +0 -0
  31. package/src/components/priorityLevels/vars.scss +8 -0
  32. package/src/components/simpleSelect/component.scss +23 -0
  33. package/src/components/simpleSelect/index.scss +18 -0
  34. package/src/components/simpleSelect/mods.scss +20 -0
  35. package/src/components/simpleSelect/states.scss +4 -0
  36. package/src/components/simpleSelect/vars.scss +1 -0
  37. package/src/components/tag/component.scss +6 -6
  38. package/src/components/tag/index.scss +17 -0
  39. package/src/components/tag/mods.scss +4 -0
  40. package/src/components/tag/states.scss +4 -0
  41. package/src/components/tag/vars.scss +2 -0
  42. package/src/components/textField/index.scss +8 -0
  43. package/src/components/textField/mods.scss +5 -0
  44. package/src/components/userPopover/component.scss +5 -16
@@ -0,0 +1,38 @@
1
+ @use '@lucca-front/scss/src/commons/utils/a11y';
2
+ @use '@lucca-front/scss/src/commons/utils/namespace';
3
+
4
+ @mixin component($atRoot: namespace.$defaultAtRoot) {
5
+ display: flex;
6
+ align-items: center;
7
+ color: var(--pr-t-color-text);
8
+ font: var(--components-priorityLevels-font);
9
+ gap: var(--components-priorityLevels-gap);
10
+ min-block-size: var(--components-priorityLevels-minBlockSize);
11
+
12
+ @at-root ($atRoot) {
13
+ .priorityLevels-icon {
14
+ display: inline-flex;
15
+
16
+ &:focus-visible {
17
+ @include a11y.focusVisible($borderRadius: var(--pr-t-border-radius-small));
18
+ }
19
+ }
20
+
21
+ .priorityLevels-icon .lucca-icon {
22
+ &::before {
23
+ background:
24
+ linear-gradient(
25
+ to right,
26
+ var(--components-priorityLevels-icon-color1) 0%,
27
+ var(--components-priorityLevels-icon-color1) calc(100% / 3),
28
+ var(--components-priorityLevels-icon-color2) calc(100% / 3),
29
+ var(--components-priorityLevels-icon-color2) calc(100% / 3 * 2),
30
+ var(--components-priorityLevels-icon-color3) calc(100% / 3 * 2),
31
+ var(--components-priorityLevels-icon-color3) 100%
32
+ );
33
+ background-clip: text;
34
+ color: transparent;
35
+ }
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,4 @@
1
+ @forward 'vars';
2
+ @forward 'mods';
3
+ @forward 'states';
4
+ @forward 'component';
@@ -0,0 +1,30 @@
1
+ @use 'exports' as *;
2
+
3
+ .priorityLevels {
4
+ @layer components {
5
+ @include vars;
6
+ @include component;
7
+ }
8
+
9
+ @layer mods {
10
+ &.mod-low {
11
+ @include low;
12
+ }
13
+
14
+ &.mod-medium {
15
+ @include medium;
16
+ }
17
+
18
+ &.mod-high {
19
+ @include high;
20
+ }
21
+
22
+ &.mod-S {
23
+ @include S;
24
+ }
25
+
26
+ &.mod-L {
27
+ @include L;
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,28 @@
1
+ @mixin low {
2
+ --components-priorityLevels-icon-color1: var(--pr-t-color-text);
3
+ --components-priorityLevels-icon-color2: var(--palettes-neutral-400);
4
+ --components-priorityLevels-icon-color3: var(--palettes-neutral-400);
5
+ }
6
+
7
+ @mixin medium {
8
+ --components-priorityLevels-icon-color1: var(--palettes-warning-800);
9
+ --components-priorityLevels-icon-color2: var(--palettes-warning-800);
10
+ --components-priorityLevels-icon-color3: var(--palettes-neutral-400);
11
+ }
12
+
13
+ @mixin high {
14
+ --components-priorityLevels-icon-color1: var(--palettes-critical-800);
15
+ --components-priorityLevels-icon-color2: var(--palettes-critical-800);
16
+ --components-priorityLevels-icon-color3: var(--palettes-critical-800);
17
+ }
18
+
19
+ @mixin S {
20
+ --components-priorityLevels-font: var(--pr-t-font-body-XS);
21
+ --components-priorityLevels-minBlockSize: var(--pr-t-font-body-XS-lineHeight);
22
+ --components-priorityLevels-gap: var(--pr-t-spacings-25);
23
+ }
24
+
25
+ @mixin L {
26
+ --components-priorityLevels-font: var(--pr-t-font-body-M);
27
+ --components-priorityLevels-minBlockSize: var(--pr-t-font-body-M-lineHeight);
28
+ }
File without changes
@@ -0,0 +1,8 @@
1
+ @mixin vars {
2
+ --components-priorityLevels-font: var(--pr-t-font-body-S);
3
+ --components-priorityLevels-minBlockSize: var(--pr-t-font-body-S-lineHeight);
4
+ --components-priorityLevels-gap: var(--pr-t-spacings-50);
5
+ --components-priorityLevels-icon-color1: var(--palettes-neutral-400);
6
+ --components-priorityLevels-icon-color2: var(--palettes-neutral-400);
7
+ --components-priorityLevels-icon-color3: var(--palettes-neutral-400);
8
+ }
@@ -3,6 +3,7 @@
3
3
 
4
4
  @mixin component($atRoot: namespace.$defaultAtRoot) {
5
5
  display: block;
6
+ inline-size: var(--components-simpleSelect-width);
6
7
 
7
8
  @at-root ($atRoot) {
8
9
  .simpleSelect-field {
@@ -48,6 +49,28 @@
48
49
  &::placeholder {
49
50
  color: var(--components-simpleSelect-placeholder);
50
51
  }
52
+
53
+ // Below the S breakpoint the trigger is a button instead of a text input, so the native
54
+ // button chrome (centred text, rounded corners on iOS) has to be stripped for it to keep
55
+ // sitting on the value the way the input did. An empty button would collapse to no height
56
+ // and stop covering the value it triggers, hence the stretch.
57
+ &.mod-button {
58
+ appearance: none;
59
+ text-align: start;
60
+ align-self: stretch;
61
+ display: flex;
62
+ align-items: center;
63
+ }
64
+ }
65
+
66
+ // Stands in for the input placeholder, which a button trigger has no equivalent of. It sets its
67
+ // own colour rather than inheriting so it survives `colorPicker` making the trigger transparent.
68
+ .simpleSelect-field-placeholder {
69
+ color: var(--components-simpleSelect-placeholder);
70
+ white-space: nowrap;
71
+ overflow: hidden;
72
+ text-overflow: ellipsis;
73
+ display: block;
51
74
  }
52
75
 
53
76
  .simpleSelect-field-value {
@@ -1,3 +1,5 @@
1
+ @use '@lucca-front/scss/src/commons/config';
2
+
1
3
  @use 'exports' as *;
2
4
 
3
5
  .simpleSelect {
@@ -26,12 +28,22 @@
26
28
 
27
29
  &:has(.simpleSelect-field-input[aria-invalid='true']) {
28
30
  @include invalid;
31
+
32
+ .simpleSelect-field:hover {
33
+ @include invalidHover;
34
+ }
29
35
  }
30
36
 
31
37
  &:has(.simpleSelect-field-input:disabled) {
32
38
  @include disabled;
33
39
  }
34
40
 
41
+ @each $value in config.$fieldsWidth {
42
+ &.mod-width#{$value} {
43
+ @include width($value);
44
+ }
45
+ }
46
+
35
47
  &.mod-S {
36
48
  @include S;
37
49
  }
@@ -58,3 +70,9 @@
58
70
  }
59
71
  }
60
72
  }
73
+
74
+ @layer mods {
75
+ .dialog.mod-select {
76
+ @include select;
77
+ }
78
+ }
@@ -1,6 +1,11 @@
1
+ @use 'sass:math';
1
2
  @use '@lucca-front/icons/src/icon/exports' as icon;
2
3
  @use '@lucca-front/scss/src/components/clear/exports' as clear;
3
4
 
5
+ @mixin width($value) {
6
+ --components-simpleSelect-width: #{math.div($value, 2) * 1rem};
7
+ }
8
+
4
9
  @mixin S {
5
10
  --components-simpleSelect-font: var(--pr-t-font-body-S);
6
11
  --components-simpleSelect-padding: var(--pr-t-spacings-75);
@@ -65,3 +70,18 @@
65
70
  margin: var(--pr-t-spacings-75) calc(var(--pr-t-spacings-100) * -1) calc(var(--pr-t-spacings-100) * -1);
66
71
  }
67
72
  }
73
+
74
+ @mixin select {
75
+ --components-dialog-animationDuration: 0s;
76
+ --components-dialog-insideHeaderTitleAlign: center;
77
+ --components-dialog-insideHeaderTitleFont: var(--pr-t-font-heading-4);
78
+ --components-dialog-insideHeaderColumns: 1fr auto 1fr;
79
+ --components-dialog-inside-header-button-justifySelf: end;
80
+ --components-dialog-insideHeaderAreas:
81
+ 'spacer container close '
82
+ 'content content content';
83
+ --components-dialog-inside-header-paddingInline: var(--pr-t-spacings-200);
84
+ --components-dialog-inside-header-content-paddingBlockStart: var(--pr-t-spacings-100);
85
+ --components-dialog-insideContent-paddingInline: var(--pr-t-spacings-50);
86
+ --components-dialog-insideContent-paddingBlock: var(--pr-t-spacings-50);
87
+ }
@@ -63,6 +63,10 @@
63
63
  --components-simpleSelect-placeholder: var(--pr-t-color-input-text-placeholder-critical);
64
64
  }
65
65
 
66
+ @mixin invalidHover {
67
+ --components-simpleSelect-border-color: var(--pr-t-color-input-border-critical-hover);
68
+ }
69
+
66
70
  @mixin disabled {
67
71
  --components-simpleSelect-background: var(--pr-t-color-input-background-disabled);
68
72
  --components-simpleSelect-placeholder: var(--commons-disabled-placeholder); // Deprecated: no placeholder with disabled state
@@ -1,4 +1,5 @@
1
1
  @mixin vars {
2
+ --components-simpleSelect-width: auto;
2
3
  --components-simpleSelect-font: var(--pr-t-font-body-M);
3
4
  --components-simpleSelect-padding: var(--pr-t-spacings-100);
4
5
  --components-simpleSelect-gap: var(--pr-t-spacings-100);
@@ -5,14 +5,12 @@
5
5
  background-color: var(--components-tag-background);
6
6
  border-radius: var(--pr-t-border-radius-small);
7
7
  padding-block: 0;
8
- padding-inline: var(--pr-t-spacings-50);
9
-
10
- /* autoprefixer: off */
8
+ padding-inline: var(--components-tag-padding-inline);
11
9
  text-decoration: var(--components-tag-decoration);
12
10
  box-shadow: 0 0 0 1px var(--components-tag-shadow);
13
11
  gap: var(--components-tag-gap);
14
12
  cursor: var(--components-tag-cursor);
15
- display: inline-flex;
13
+ display: var(--components-tag-display);
16
14
  align-items: center;
17
15
  text-align: center;
18
16
  vertical-align: baseline;
@@ -42,9 +40,11 @@
42
40
  @at-root ($atRoot) {
43
41
  .tag-content {
44
42
  outline: none;
45
-
46
- /* autoprefixer: off */
47
43
  text-decoration: var(--components-tag-decoration);
44
+
45
+ &:empty {
46
+ display: none;
47
+ }
48
48
  }
49
49
  }
50
50
  }
@@ -40,6 +40,23 @@
40
40
 
41
41
  &:has(.lucca-icon) {
42
42
  @include withIcon;
43
+
44
+ // mask condition is necessary for hiddenLabel
45
+ &:not(:has(.tag-content)),
46
+ &:has(.tag-content:empty),
47
+ &:has(.tag-content.pr-u-mask) {
48
+ @include onlyIcon;
49
+ }
50
+ }
51
+
52
+ &:has(.tag-content:empty) {
53
+ &:not(:has(.lucca-icon)) {
54
+ @include empty;
55
+ }
56
+ }
57
+
58
+ &:empty {
59
+ @include empty;
43
60
  }
44
61
  }
45
62
  }
@@ -78,3 +78,7 @@
78
78
  @mixin withIcon {
79
79
  --components-tag-before-content: ' ';
80
80
  }
81
+
82
+ @mixin onlyIcon {
83
+ --components-tag-padding-inline: var(--pr-t-spacings-25);
84
+ }
@@ -8,3 +8,7 @@
8
8
  @mixin focusVisible {
9
9
  @include a11y.focusVisible;
10
10
  }
11
+
12
+ @mixin empty {
13
+ --components-tag-display: none;
14
+ }
@@ -9,6 +9,8 @@
9
9
  --components-tag-boxShadow: 0 0 0 1px var(--components-tag-shadow);
10
10
  --components-tag-position: static;
11
11
  --components-tag-before-content: none;
12
+ --components-tag-display: inline-flex;
13
+ --components-tag-padding-inline: var(--pr-t-spacings-50);
12
14
 
13
15
  // Deprecated
14
16
  --components-tag-fontSize: var(--pr-t-font-body-S-fontSize);
@@ -1,3 +1,5 @@
1
+ @use '@lucca-front/scss/src/commons/config';
2
+
1
3
  @use 'exports' as *;
2
4
 
3
5
  .textField {
@@ -23,6 +25,12 @@
23
25
  @include XS;
24
26
  }
25
27
 
28
+ @each $value in config.$fieldsWidth {
29
+ &.mod-width#{$value} {
30
+ @include width($value);
31
+ }
32
+ }
33
+
26
34
  &.mod-valueAlignRight {
27
35
  @include valueAlignRight;
28
36
  }
@@ -1,3 +1,4 @@
1
+ @use 'sass:math';
1
2
  @use '@lucca-front/scss/src/components/clear/exports' as clear;
2
3
  @use '@lucca-front/scss/src/components/button/exports' as button;
3
4
  @use '@lucca-front/icons/src/icon/exports' as icon;
@@ -64,6 +65,10 @@
64
65
  }
65
66
  }
66
67
 
68
+ @mixin width($value) {
69
+ --component-textField-width: #{math.div($value, 2) * 1rem};
70
+ }
71
+
67
72
  @mixin valueAlignRight {
68
73
  .textField-input-value {
69
74
  text-align: end;
@@ -42,15 +42,17 @@
42
42
  }
43
43
 
44
44
  .userPopover-details-info-name-linkOptional {
45
- color: currentColor;
46
- text-decoration: underline;
47
45
  text-decoration-thickness: 0.75px;
48
46
  text-underline-offset: 3px;
49
47
 
50
48
  &:hover {
51
- color: currentColor;
52
49
  text-decoration-thickness: 1.5px;
53
50
  }
51
+
52
+ &.link {
53
+ --components-link-color: var(--pr-t-color-text-highlight);
54
+ --components-link-color-hover: var(--pr-t-color-text-highlight);
55
+ }
54
56
  }
55
57
 
56
58
  .userPopover-details-info-detail {
@@ -62,19 +64,6 @@
62
64
  display: flex;
63
65
  align-items: flex-start;
64
66
  gap: var(--pr-t-spacings-50);
65
- color: currentColor;
66
- text-decoration: none;
67
-
68
- &:is(a, button) {
69
- &:hover,
70
- &:focus {
71
- color: currentColor;
72
-
73
- .userPopover-details-info-detail-workplace-state {
74
- text-decoration: underline;
75
- }
76
- }
77
- }
78
67
  }
79
68
  }
80
69