@lucca-front/scss 22.1.0-rc.1 → 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 (65) hide show
  1. package/dist/lucca-front.min.css +1 -1
  2. package/package.json +3 -3
  3. package/src/commons/base.scss +20 -2
  4. package/src/commons/config.scss +30 -1
  5. package/src/commons/core.scss +25 -7
  6. package/src/commons/utils/highlight-prisme.scss +3 -2
  7. package/src/commons/vars.scss +11 -1
  8. package/src/components/activityFeed/component.scss +10 -6
  9. package/src/components/activityFeed/index.scss +4 -0
  10. package/src/components/activityFeed/states.scss +6 -0
  11. package/src/components/bubbleIcon/mods.scss +9 -3
  12. package/src/components/button/mods.scss +8 -13
  13. package/src/components/calendar/component.scss +2 -5
  14. package/src/components/callout/mods.scss +1 -6
  15. package/src/components/dataTable/component.scss +2 -0
  16. package/src/components/dataTableSticked/mods.scss +12 -0
  17. package/src/components/dialog/component.scss +7 -3
  18. package/src/components/dialog/mods.scss +2 -2
  19. package/src/components/dialog/vars.scss +6 -0
  20. package/src/components/fancyBox/component.scss +87 -14
  21. package/src/components/fancyBox/mods.scss +8 -8
  22. package/src/components/fancyBox/vars.scss +25 -7
  23. package/src/components/filterPill/component.scss +0 -5
  24. package/src/components/filterPill/index.scss +0 -5
  25. package/src/components/highlightData/index.scss +12 -0
  26. package/src/components/highlightData/mods.scss +27 -0
  27. package/src/components/highlightData/vars.scss +9 -0
  28. package/src/components/index.scss +1 -1
  29. package/src/components/indexTable/component.scss +2 -0
  30. package/src/components/link/index.scss +4 -0
  31. package/src/components/link/mods.scss +5 -0
  32. package/src/components/listboxOption/component.scss +5 -0
  33. package/src/components/multiSelect/component.scss +17 -0
  34. package/src/components/multiSelect/index.scss +18 -0
  35. package/src/components/multiSelect/mods.scss +39 -0
  36. package/src/components/multiSelect/states.scss +4 -0
  37. package/src/components/multiSelect/vars.scss +1 -0
  38. package/src/components/priorityLevels/component.scss +38 -0
  39. package/src/components/priorityLevels/index.scss +30 -0
  40. package/src/components/priorityLevels/mods.scss +28 -0
  41. package/src/components/priorityLevels/vars.scss +8 -0
  42. package/src/components/simpleSelect/component.scss +23 -0
  43. package/src/components/simpleSelect/index.scss +18 -0
  44. package/src/components/simpleSelect/mods.scss +20 -0
  45. package/src/components/simpleSelect/states.scss +4 -0
  46. package/src/components/simpleSelect/vars.scss +1 -0
  47. package/src/components/tableSortable/component.scss +7 -1
  48. package/src/components/tableSortable/index.scss +6 -0
  49. package/src/components/tableSortable/mods.scss +11 -0
  50. package/src/components/tableSortable/vars.scss +2 -0
  51. package/src/components/tag/component.scss +1 -1
  52. package/src/components/tag/index.scss +7 -0
  53. package/src/components/tag/mods.scss +5 -6
  54. package/src/components/tag/vars.scss +1 -0
  55. package/src/components/textField/index.scss +8 -0
  56. package/src/components/textField/mods.scss +5 -0
  57. package/src/components/tooltip/component.scss +13 -1
  58. package/src/components/tooltip/vars.scss +1 -0
  59. package/src/components/userPopover/component.scss +5 -16
  60. package/src/components/icon/component.scss +0 -8
  61. package/src/components/icon/index.scss +0 -67
  62. package/src/components/icon/mods.scss +0 -67
  63. package/src/components/icon/vars.scss +0 -4
  64. /package/src/components/{icon → priorityLevels}/exports.scss +0 -0
  65. /package/src/components/{icon → priorityLevels}/states.scss +0 -0
@@ -1,16 +1,16 @@
1
1
  @mixin narrow {
2
- --components-fancyBox-imageWidth: 11.25rem;
3
- --components-fancyBox-imageHeight: 9rem;
4
- --components-fancyBox-offsetInline: -8.75rem;
5
- --components-fancyBox-offsetBlock: -0.5rem;
2
+ --components-fancyBox-content-foregroundStartEnd-inlineSize: 11.25rem;
3
+ --components-fancyBox-content-foregroundStartEnd-blockSize: 9rem;
4
+ --components-fancyBox-content-foregroundStartEnd-insetInlineEnd: -8.75rem;
5
+ --components-fancyBox-content-foregroundStartEnd-insetBlockStart: -0.5rem;
6
6
  }
7
7
 
8
8
  @mixin S {
9
- --components-fancyBox-offsetInline: -9rem;
10
- --components-fancyBox-offsetBlock: -0.75rem;
11
- --components-fancyBox-imageWidth: 9.375rem;
12
- --components-fancyBox-imageHeight: 7.5rem;
13
9
  --components-fancyBox-contentMinInlineSize: min(17rem, 100%);
14
10
  --components-fancyBox-contentPaddingBlock: var(--pr-t-spacings-150);
15
11
  --components-fancyBox-contentPaddingInline: var(--pr-t-spacings-200);
12
+ --components-fancyBox-content-foregroundStartEnd-insetInlineEnd: -9rem;
13
+ --components-fancyBox-content-foregroundStartEnd-insetBlockStart: -0.75rem;
14
+ --components-fancyBox-content-foregroundStartEnd-inlineSize: 9.375rem;
15
+ --components-fancyBox-content-foregroundStartEnd-blockSize: 7.5rem;
16
16
  }
@@ -1,19 +1,37 @@
1
1
  @mixin vars {
2
2
  --components-fancyBox-paddingInline: var(--pr-t-spacings-200);
3
3
  --components-fancyBox-marginInline: auto;
4
-
5
- // Content
6
4
  --components-fancyBox-contentMinBlockSize: 7rem;
7
5
  --components-fancyBox-contentMinInlineSize: min(22rem, 100%);
8
6
  --components-fancyBox-contentPaddingBlock: var(--pr-t-spacings-300);
9
7
  --components-fancyBox-contentPaddingInline: var(--pr-t-spacings-700);
10
8
 
11
- // Visuals
9
+ --components-fancyBox-content-foregroundStartEnd-insetBlockStart: -1.5rem;
10
+ --components-fancyBox-content-foregroundStartEnd-insetInlineEnd: -10rem;
11
+ --components-fancyBox-content-foregroundStartEnd-inlineSize: 12.5rem;
12
+ --components-fancyBox-content-foregroundStartEnd-blockSize: 10rem;
13
+
14
+ --components-fancyBox-content-backgroundStartEnd-insetBlockStart: var(--components-fancyBox-content-foregroundStartEnd-insetBlockStart);
15
+ --components-fancyBox-content-backgroundStartEnd-insetInlineEnd: var(--components-fancyBox-content-foregroundStartEnd-insetInlineEnd);
16
+ --components-fancyBox-content-backgroundStartEnd-inlineSize: var(--components-fancyBox-content-foregroundStartEnd-inlineSize);
17
+ --components-fancyBox-content-backgroundStartEnd-blockSize: var(--components-fancyBox-content-foregroundStartEnd-blockSize);
18
+
19
+ --components-fancyBox-content-foregroundEndStart-insetBlockEnd: var(--components-fancyBox-content-foregroundStartEnd-insetBlockStart);
20
+ --components-fancyBox-content-foregroundEndStart-insetInlineStart: var(--components-fancyBox-content-foregroundStartEnd-insetInlineEnd);
21
+ --components-fancyBox-content-foregroundEndStart-inlineSize: var(--components-fancyBox-content-foregroundStartEnd-inlineSize);
22
+ --components-fancyBox-content-foregroundEndStart-blockSize: var(--components-fancyBox-content-foregroundStartEnd-blockSize);
23
+
24
+ --components-fancyBox-content-backgroundEndStart-insetBlockEnd: var(--components-fancyBox-content-foregroundStartEnd-insetBlockStart);
25
+ --components-fancyBox-content-backgroundEndStart-insetInlineStart: var(--components-fancyBox-content-foregroundStartEnd-insetInlineEnd);
26
+ --components-fancyBox-content-backgroundEndStart-inlineSize: var(--components-fancyBox-content-foregroundStartEnd-inlineSize);
27
+ --components-fancyBox-content-backgroundEndStart-blockSize: var(--components-fancyBox-content-foregroundStartEnd-blockSize);
28
+
29
+ // Deprecated
30
+ --components-fancyBox-offsetInline: var(--components-fancyBox-content-foregroundStartEnd-insetInlineEnd);
31
+ --components-fancyBox-offsetBlock: var(--components-fancyBox-content-foregroundStartEnd-insetBlockStart);
32
+ --components-fancyBox-imageWidth: var(--components-fancyBox-content-foregroundStartEnd-inlineSize);
33
+ --components-fancyBox-imageHeight: var(--components-fancyBox-content-foregroundStartEnd-blockSize);
12
34
  --components-fancyBox-background-left: none;
13
35
  --components-fancyBox-background-right: none;
14
36
  --components-fancyBox-foreground: none;
15
- --components-fancyBox-imageWidth: 12.5rem;
16
- --components-fancyBox-imageHeight: 10rem;
17
- --components-fancyBox-offsetInline: -10rem;
18
- --components-fancyBox-offsetBlock: -1.5rem;
19
37
  }
@@ -106,7 +106,6 @@
106
106
  font-weight: var(--components-filterPill-label-fontWeight);
107
107
  overflow: hidden;
108
108
  text-overflow: ellipsis;
109
- outline: none;
110
109
  text-align: center;
111
110
  flex-shrink: 0;
112
111
  max-inline-size: var(--components-filterPill-label-maxInlineSize);
@@ -170,10 +169,6 @@
170
169
  cursor: var(--components-filterPill-label-cursor);
171
170
  max-inline-size: 15rem;
172
171
 
173
- &:focus-visible {
174
- outline: none;
175
- }
176
-
177
172
  .lucca-icon {
178
173
  color: var(--components-filterPill-arrowColor);
179
174
  }
@@ -19,11 +19,6 @@
19
19
  @include active;
20
20
  }
21
21
 
22
- &:has(.filterPill-label:focus-visible),
23
- &:has(.filterPill-value:focus-visible) {
24
- @include focusVisible;
25
- }
26
-
27
22
  &[aria-expanded='true'] {
28
23
  @include opened;
29
24
  }
@@ -15,6 +15,18 @@
15
15
  @include dark;
16
16
  }
17
17
 
18
+ &.palette-success {
19
+ @include success;
20
+ }
21
+
22
+ &.palette-warning {
23
+ @include warning;
24
+ }
25
+
26
+ &.palette-critical {
27
+ @include critical;
28
+ }
29
+
18
30
  &.mod-valueFirst {
19
31
  @include valueFirst;
20
32
  }
@@ -4,6 +4,33 @@
4
4
 
5
5
  @mixin dark {
6
6
  --components-highlightData-background: var(--palettes-100, var(--palettes-product-100));
7
+ --palettes-assets-primary: var(--components-highlightData-bubble-primary-dark);
8
+ --palettes-assets-secondary: var(--components-highlightData-bubble-secondary-dark);
9
+ --palettes-assets-brand: var(--components-highlightData-bubble-brand-dark);
10
+ }
11
+
12
+ @mixin success {
13
+ --components-highlightData-bubble-primary-light: var(--palettes-success-100);
14
+ --components-highlightData-bubble-primary-dark: var(--palettes-success-300);
15
+ --components-highlightData-bubble-secondary-light: var(--palettes-brand-300);
16
+ --components-highlightData-bubble-secondary-dark: var(--palettes-brand-100);
17
+ --components-highlightData-bubble-brand-dark: var(--palettes-assets-primary-light);
18
+ }
19
+
20
+ @mixin warning {
21
+ --components-highlightData-bubble-primary-light: var(--palettes-warning-100);
22
+ --components-highlightData-bubble-primary-dark: var(--palettes-warning-300);
23
+ --components-highlightData-bubble-secondary-light: var(--palettes-brand-300);
24
+ --components-highlightData-bubble-secondary-dark: var(--palettes-assets-brand-lighter);
25
+ --components-highlightData-bubble-brand-dark: var(--palettes-assets-primary-dark);
26
+ }
27
+
28
+ @mixin critical {
29
+ --components-highlightData-bubble-primary-light: var(--palettes-critical-100);
30
+ --components-highlightData-bubble-primary-dark: var(--palettes-critical-300);
31
+ --components-highlightData-bubble-secondary-light: var(--palettes-brand-300);
32
+ --components-highlightData-bubble-secondary-dark: var(--palettes-assets-brand-lighter);
33
+ --components-highlightData-bubble-brand-dark: var(--palettes-brand-300);
7
34
  }
8
35
 
9
36
  @mixin valueFirst {
@@ -18,4 +18,13 @@
18
18
  --components-highlightData-illustrations-width: 86px;
19
19
  --components-highlightData-illustrations-height: 72px;
20
20
  --components-highlightData-illustrations-display: grid;
21
+ --components-highlightData-bubble-primary-light: var(--palettes-assets-primary-light);
22
+ --components-highlightData-bubble-primary-dark: var(--palettes-assets-primary-dark);
23
+ --components-highlightData-bubble-secondary-light: var(--palettes-assets-secondary-light);
24
+ --components-highlightData-bubble-secondary-dark: var(--palettes-assets-secondary-lighter);
25
+ --components-highlightData-bubble-brand-light: var(--palettes-assets-brand-dark);
26
+ --components-highlightData-bubble-brand-dark: var(--palettes-assets-brand-lighter);
27
+ --palettes-assets-primary: var(--components-highlightData-bubble-primary-light);
28
+ --palettes-assets-secondary: var(--components-highlightData-bubble-secondary-light);
29
+ --palettes-assets-brand: var(--components-highlightData-bubble-brand-light);
21
30
  }
@@ -116,7 +116,7 @@
116
116
  @forward 'bubbleIllustration';
117
117
  @forward 'bubbleIcon';
118
118
  @forward 'softwareIcon';
119
- @forward 'icon';
119
+ @forward 'priorityLevels';
120
120
  @forward 'progressStepper';
121
121
  @forward 'activityFeed';
122
122
  @forward 'impersonation';
@@ -277,6 +277,8 @@
277
277
 
278
278
  .statusBadge,
279
279
  .tag,
280
+ lu-tag,
281
+ pr-tag,
280
282
  .avatar {
281
283
  vertical-align: top;
282
284
  }
@@ -20,6 +20,10 @@
20
20
  }
21
21
  }
22
22
 
23
+ &.mod-neutral {
24
+ @include neutral;
25
+ }
26
+
23
27
  @include media.isNotTouchDevice {
24
28
  &.mod-hiddenIcon {
25
29
  &:not(:hover, :focus-visible) {
@@ -10,6 +10,11 @@
10
10
  --components-link-color-hover: var(--palettes-brand-800);
11
11
  }
12
12
 
13
+ @mixin neutral {
14
+ --components-link-color: var(--pr-t-color-text);
15
+ --components-link-color-hover: var(--palettes-neutral-900);
16
+ }
17
+
13
18
  @mixin hasLinkText {
14
19
  --components-link-textDecoration: none;
15
20
  }
@@ -66,6 +66,11 @@
66
66
  }
67
67
  }
68
68
 
69
+ .listboxOption-content-value {
70
+ flex-grow: 1;
71
+ min-inline-size: 0;
72
+ }
73
+
69
74
  .listboxOption-content-checkboxField.checkboxField {
70
75
  margin-block-start: var(--pr-t-spacings-25);
71
76
  display: var(--components-listboxOption-content-checkboxField-display);
@@ -8,6 +8,7 @@
8
8
 
9
9
  @mixin component($atRoot: namespace.$defaultAtRoot) {
10
10
  display: flex;
11
+ inline-size: var(--components-multiSelect-width);
11
12
  box-shadow: 0 0 0 1px var(--components-multiSelect-border-color);
12
13
  background-color: var(--components-multiSelect-background);
13
14
  border-radius: var(--pr-t-border-radius-input);
@@ -69,6 +70,22 @@
69
70
  &::placeholder {
70
71
  color: var(--components-multiSelect-placeholder);
71
72
  }
73
+
74
+ // Below the S breakpoint the trigger is a button instead of a text input, so the native
75
+ // button chrome has to be stripped and its text — standing in for the placeholder, which a
76
+ // button has no equivalent of — coloured and aligned the way the placeholder was.
77
+ &.mod-button {
78
+ appearance: none;
79
+ text-align: start;
80
+ color: var(--components-multiSelect-placeholder);
81
+ white-space: nowrap;
82
+ overflow: hidden;
83
+ text-overflow: ellipsis;
84
+
85
+ &:empty {
86
+ @include a11y.mask;
87
+ }
88
+ }
72
89
  }
73
90
 
74
91
  .multipleSelect-displayer-label {
@@ -1,3 +1,5 @@
1
+ @use '@lucca-front/scss/src/commons/config';
2
+
1
3
  @use 'exports' as *;
2
4
 
3
5
  .multiSelect {
@@ -7,6 +9,12 @@
7
9
  }
8
10
 
9
11
  @layer mods {
12
+ @each $value in config.$fieldsWidth {
13
+ &.mod-width#{$value} {
14
+ @include width($value);
15
+ }
16
+ }
17
+
10
18
  &.mod-S {
11
19
  @include S;
12
20
  }
@@ -41,6 +49,10 @@
41
49
 
42
50
  &:has(.multipleSelect-displayer-search[aria-invalid='true']) {
43
51
  @include invalid;
52
+
53
+ &:hover {
54
+ @include invalidHover;
55
+ }
44
56
  }
45
57
 
46
58
  &:has(.multipleSelect-displayer-search:disabled) {
@@ -73,3 +85,9 @@
73
85
  }
74
86
  }
75
87
  }
88
+
89
+ @layer mods {
90
+ .dialog.mod-select {
91
+ @include select;
92
+ }
93
+ }
@@ -1,9 +1,14 @@
1
+ @use 'sass:math';
1
2
  @use '@lucca-front/icons/src/icon/exports' as icon;
2
3
  @use '@lucca-front/scss/src/commons/utils/a11y';
3
4
  @use '@lucca-front/scss/src/components/clear/exports' as clear;
4
5
  @use '@lucca-front/scss/src/components/chip/exports' as chip;
5
6
  @use '@lucca-front/scss/src/components/numericBadge/exports' as numericBadge;
6
7
 
8
+ @mixin width($value) {
9
+ --components-multiSelect-width: #{math.div($value, 2) * 1rem};
10
+ }
11
+
7
12
  @mixin S {
8
13
  --components-multiSelect-font: var(--pr-t-font-body-S);
9
14
  --components-multiSelect-padding: var(--pr-t-spacings-75);
@@ -57,6 +62,12 @@
57
62
  overflow: auto;
58
63
  }
59
64
 
65
+ .multiSelect-field-icon {
66
+ &.mod-search {
67
+ margin-inline-start: auto;
68
+ }
69
+ }
70
+
60
71
  .lu-picker-content {
61
72
  animation: none;
62
73
  box-shadow: none;
@@ -70,3 +81,31 @@
70
81
  }
71
82
  }
72
83
  }
84
+
85
+ @mixin select {
86
+ --components-dialog-animationDuration: 0s;
87
+ --components-dialog-insideHeaderTitleAlign: center;
88
+ --components-dialog-insideHeaderTitleFont: var(--pr-t-font-heading-4);
89
+ --components-dialog-insideHeaderColumns: 1fr auto 1fr;
90
+ --components-dialog-inside-header-button-justifySelf: end;
91
+ --components-dialog-insideHeaderAreas:
92
+ 'spacer container close '
93
+ 'content content content';
94
+ --components-dialog-inside-header-paddingInline: var(--pr-t-spacings-200);
95
+ --components-dialog-inside-header-content-paddingBlockStart: var(--pr-t-spacings-100);
96
+ --components-dialog-insideContent-paddingInline: var(--pr-t-spacings-50);
97
+ --components-dialog-insideContent-paddingBlock: var(--pr-t-spacings-50);
98
+
99
+ // The sheet is how the select is reached on a touch device, where there is no hover to reveal
100
+ // either the tree's onlyParent/onlyChildren buttons or a group's « select all » link: inside a
101
+ // sheet both are shown for good. The tree buttons also leave their absolute position on the way,
102
+ // so that being there all the time shortens the option's label instead of covering it.
103
+ .optionItem-icons {
104
+ position: static;
105
+ opacity: 1;
106
+ }
107
+
108
+ .listboxOption-content {
109
+ --components-listboxOption-content-link-opacity: 1;
110
+ }
111
+ }
@@ -11,6 +11,10 @@
11
11
  --components-multiSelect-placeholder: var(--pr-t-color-input-text-placeholder-critical);
12
12
  }
13
13
 
14
+ @mixin invalidHover {
15
+ --components-multiSelect-border-color: var(--pr-t-color-input-border-critical-hover);
16
+ }
17
+
14
18
  @mixin disabled {
15
19
  --components-multiSelect-background: var(--pr-t-color-input-background-disabled);
16
20
  --components-multiSelect-placeholder: var(--commons-disabled-placeholder);
@@ -1,4 +1,5 @@
1
1
  @mixin vars {
2
+ --components-multiSelect-width: auto;
2
3
  --components-multiSelect-font: var(--pr-t-font-body-M);
3
4
  --components-multiSelect-padding: var(--pr-t-spacings-100);
4
5
  --components-multiSelect-gap: var(--pr-t-spacings-100);
@@ -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,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
+ }
@@ -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);
@@ -7,7 +7,8 @@
7
7
  font-weight: var(--components-sortable-fontWeight);
8
8
  vertical-align: top;
9
9
  align-items: flex-end;
10
- white-space: wrap;
10
+ min-inline-size: var(--components-sortable-minInlineSize);
11
+ max-inline-size: var(--components-sortable-maxInlineSize);
11
12
  inset-inline-start: var(--components-sortable-offset);
12
13
  padding: 0 var(--pr-t-spacings-50);
13
14
  gap: var(--pr-t-spacings-25);
@@ -20,11 +21,16 @@
20
21
  @include button.ghost;
21
22
 
22
23
  @at-root ($atRoot) {
24
+ .tableSortable-label {
25
+ min-inline-size: 0;
26
+ }
27
+
23
28
  .tableSortable-arrows {
24
29
  margin-block-end: var(--components-sortable-arrowsOffset);
25
30
  position: relative;
26
31
  inline-size: 1rem;
27
32
  block-size: 1rem;
33
+ flex-shrink: 0;
28
34
  }
29
35
 
30
36
  .tableSortable-arrows-ascending,
@@ -7,6 +7,12 @@
7
7
  }
8
8
  }
9
9
 
10
+ .tableSortable.mod-ellipsis {
11
+ @layer mods {
12
+ @include ellipsis;
13
+ }
14
+ }
15
+
10
16
  .table-head-row-cell,
11
17
  .dataTable-head-row-cell,
12
18
  .indexTable-head-row-cell {
@@ -1,3 +1,14 @@
1
+ @use '@lucca-front/scss/src/commons/utils/text';
2
+
3
+ @mixin ellipsis {
4
+ --components-sortable-minInlineSize: 0;
5
+ --components-sortable-maxInlineSize: 100%;
6
+
7
+ .tableSortable-label {
8
+ @include text.ellipsis;
9
+ }
10
+ }
11
+
1
12
  @mixin sortAlignEnd {
2
13
  --components-sortable-direction: row-reverse;
3
14
  --components-sortable-offset: var(--pr-t-spacings-50);