@inseefr/lunatic 3.4.8 → 3.4.10-rc.0

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 (160) hide show
  1. package/components/CheckboxGroup/CheckboxGroup.js +3 -1
  2. package/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
  3. package/components/CheckboxGroup/CustomCheckboxGroup.d.ts +1 -1
  4. package/components/CheckboxGroup/CustomCheckboxGroup.js +2 -5
  5. package/components/CheckboxGroup/CustomCheckboxGroup.js.map +1 -1
  6. package/components/CheckboxOne/CheckboxOne.js +3 -1
  7. package/components/CheckboxOne/CheckboxOne.js.map +1 -1
  8. package/components/Datepicker/Datepicker.js +7 -1
  9. package/components/Datepicker/Datepicker.js.map +1 -1
  10. package/components/Input/Input.js +3 -1
  11. package/components/Input/Input.js.map +1 -1
  12. package/components/InputNumber/InputNumber.spec.js +12 -0
  13. package/components/InputNumber/InputNumber.spec.js.map +1 -1
  14. package/components/InputNumber/InputNumberThousand.js +3 -1
  15. package/components/InputNumber/InputNumberThousand.js.map +1 -1
  16. package/components/Radio/Radio.d.ts +1 -0
  17. package/components/Radio/Radio.js +3 -1
  18. package/components/Radio/Radio.js.map +1 -1
  19. package/components/library.d.ts +1 -0
  20. package/components/shared/Checkbox/CheckboxOption.d.ts +4 -0
  21. package/components/shared/Checkbox/CheckboxOption.js +4 -2
  22. package/components/shared/Checkbox/CheckboxOption.js.map +1 -1
  23. package/components/shared/Checkbox/CheckboxOption.spec.js +14 -0
  24. package/components/shared/Checkbox/CheckboxOption.spec.js.map +1 -1
  25. package/components/shared/Radio/RadioGroup.d.ts +1 -1
  26. package/components/shared/Radio/RadioGroup.js +2 -2
  27. package/components/shared/Radio/RadioGroup.js.map +1 -1
  28. package/components/shared/Radio/RadioOption.d.ts +1 -0
  29. package/components/shared/Radio/RadioOption.js +2 -2
  30. package/components/shared/Radio/RadioOption.js.map +1 -1
  31. package/components/shared/Radio/RadioOption.spec.js +12 -0
  32. package/components/shared/Radio/RadioOption.spec.js.map +1 -1
  33. package/components/type.d.ts +3 -0
  34. package/esm/components/CheckboxGroup/CheckboxGroup.js +3 -1
  35. package/esm/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
  36. package/esm/components/CheckboxGroup/CustomCheckboxGroup.d.ts +1 -1
  37. package/esm/components/CheckboxGroup/CustomCheckboxGroup.js +2 -6
  38. package/esm/components/CheckboxGroup/CustomCheckboxGroup.js.map +1 -1
  39. package/esm/components/CheckboxOne/CheckboxOne.js +3 -1
  40. package/esm/components/CheckboxOne/CheckboxOne.js.map +1 -1
  41. package/esm/components/Datepicker/Datepicker.js +7 -1
  42. package/esm/components/Datepicker/Datepicker.js.map +1 -1
  43. package/esm/components/Input/Input.js +3 -1
  44. package/esm/components/Input/Input.js.map +1 -1
  45. package/esm/components/InputNumber/InputNumber.spec.js +12 -0
  46. package/esm/components/InputNumber/InputNumber.spec.js.map +1 -1
  47. package/esm/components/InputNumber/InputNumberThousand.js +3 -1
  48. package/esm/components/InputNumber/InputNumberThousand.js.map +1 -1
  49. package/esm/components/Radio/Radio.d.ts +1 -0
  50. package/esm/components/Radio/Radio.js +3 -1
  51. package/esm/components/Radio/Radio.js.map +1 -1
  52. package/esm/components/library.d.ts +1 -0
  53. package/esm/components/shared/Checkbox/CheckboxOption.d.ts +4 -0
  54. package/esm/components/shared/Checkbox/CheckboxOption.js +5 -3
  55. package/esm/components/shared/Checkbox/CheckboxOption.js.map +1 -1
  56. package/esm/components/shared/Checkbox/CheckboxOption.spec.js +14 -0
  57. package/esm/components/shared/Checkbox/CheckboxOption.spec.js.map +1 -1
  58. package/esm/components/shared/Radio/RadioGroup.d.ts +1 -1
  59. package/esm/components/shared/Radio/RadioGroup.js +2 -2
  60. package/esm/components/shared/Radio/RadioGroup.js.map +1 -1
  61. package/esm/components/shared/Radio/RadioOption.d.ts +1 -0
  62. package/esm/components/shared/Radio/RadioOption.js +2 -2
  63. package/esm/components/shared/Radio/RadioOption.js.map +1 -1
  64. package/esm/components/shared/Radio/RadioOption.spec.js +12 -0
  65. package/esm/components/shared/Radio/RadioOption.spec.js.map +1 -1
  66. package/esm/components/type.d.ts +3 -0
  67. package/esm/main.css +5 -2
  68. package/esm/main.css.map +1 -1
  69. package/esm/use-lunatic/commons/fill-components/fill-components.d.ts +1 -0
  70. package/esm/use-lunatic/commons/fill-components/fill-components.js +1 -1
  71. package/esm/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
  72. package/esm/use-lunatic/commons/page.js +4 -1
  73. package/esm/use-lunatic/commons/page.js.map +1 -1
  74. package/esm/use-lunatic/lunatic-context.d.ts +7 -1
  75. package/esm/use-lunatic/lunatic-context.js +7 -1
  76. package/esm/use-lunatic/lunatic-context.js.map +1 -1
  77. package/esm/use-lunatic/props/getComponentTypeProps.d.ts +3 -0
  78. package/esm/use-lunatic/props/propOptions.d.ts +1 -1
  79. package/esm/use-lunatic/props/propOptions.js.map +1 -1
  80. package/esm/use-lunatic/reducer/reducerInitializer.d.ts +2 -1
  81. package/esm/use-lunatic/reducer/reducerInitializer.js +3 -1
  82. package/esm/use-lunatic/reducer/reducerInitializer.js.map +1 -1
  83. package/esm/use-lunatic/type.d.ts +7 -0
  84. package/esm/use-lunatic/use-lunatic.js +11 -3
  85. package/esm/use-lunatic/use-lunatic.js.map +1 -1
  86. package/main.css +5 -2
  87. package/main.css.map +1 -1
  88. package/package.json +6 -1
  89. package/src/components/CheckboxGroup/CheckboxGroup.tsx +3 -0
  90. package/src/components/CheckboxGroup/CustomCheckboxGroup.tsx +3 -14
  91. package/src/components/CheckboxOne/CheckboxOne.tsx +3 -0
  92. package/src/components/Datepicker/Datepicker.tsx +8 -1
  93. package/src/components/Input/Input.tsx +4 -0
  94. package/src/components/Input/__snapshots__/Input.spec.tsx.snap +2 -0
  95. package/src/components/InputNumber/InputNumber.spec.tsx +20 -0
  96. package/src/components/InputNumber/InputNumberThousand.tsx +4 -0
  97. package/src/components/InputNumber/__snapshots__/InputNumber.spec.tsx.snap +2 -0
  98. package/src/components/Radio/Radio.tsx +3 -0
  99. package/src/components/RosterForLoop/__snapshots__/RosterForLoop.spec.tsx.snap +2 -0
  100. package/src/components/shared/Checkbox/CheckboxOption.spec.tsx +21 -0
  101. package/src/components/shared/Checkbox/CheckboxOption.tsx +54 -33
  102. package/src/components/shared/Radio/RadioGroup.tsx +3 -0
  103. package/src/components/shared/Radio/RadioOption.spec.tsx +36 -0
  104. package/src/components/shared/Radio/RadioOption.tsx +5 -1
  105. package/src/components/type.ts +3 -0
  106. package/src/css/components/CheckboxOne.scss +1 -1
  107. package/src/css/components/CheckboxOption.scss +14 -18
  108. package/src/css/components/Combobox.scss +3 -2
  109. package/src/css/components/Datepicker.scss +8 -8
  110. package/src/css/components/Declarations.scss +1 -1
  111. package/src/css/components/Dragger.scss +6 -6
  112. package/src/css/components/Duration.scss +4 -4
  113. package/src/css/components/IconButton.scss +4 -2
  114. package/src/css/components/Input.scss +3 -0
  115. package/src/css/components/Missing.scss +1 -1
  116. package/src/css/components/Roundabout.scss +3 -3
  117. package/src/css/components/Suggester.scss +2 -2
  118. package/src/css/components/Table.scss +9 -7
  119. package/src/css/main.scss +167 -167
  120. package/src/stories/behaviour/filter/dataLoop.json +22 -0
  121. package/src/stories/behaviour/filter/filter.stories.jsx +36 -0
  122. package/src/stories/behaviour/filter/source.json +238 -0
  123. package/src/stories/behaviour/filter/sourceLoop.json +372 -0
  124. package/src/stories/behaviour/missing/missing.stories.jsx +9 -0
  125. package/src/stories/behaviour/paste/test.stories.jsx +5 -0
  126. package/src/stories/checkbox-group/checkbox-group.stories.jsx +25 -6
  127. package/src/stories/checkbox-one/checkboxOne.stories.jsx +24 -2
  128. package/src/stories/overview/overview.stories.jsx +8 -1
  129. package/src/stories/radio/radio.stories.jsx +46 -6
  130. package/src/stories/utils/default-arg-types.js +12 -1
  131. package/src/stories/utils/default-args.js +3 -0
  132. package/src/stories/utils/orchestrator.jsx +8 -1
  133. package/src/stories/utils/orchestrator.scss +9 -7
  134. package/src/stories/utils/overview.scss +0 -1
  135. package/src/use-lunatic/commons/fill-components/fill-components.ts +4 -1
  136. package/src/use-lunatic/commons/page.ts +4 -1
  137. package/src/use-lunatic/lunatic-context.tsx +9 -0
  138. package/src/use-lunatic/props/propOptions.ts +2 -1
  139. package/src/use-lunatic/reducer/reducerInitializer.tsx +4 -0
  140. package/src/use-lunatic/type.ts +5 -0
  141. package/src/use-lunatic/use-lunatic.test.ts +68 -1
  142. package/src/use-lunatic/use-lunatic.ts +10 -1
  143. package/tsconfig.build.tsbuildinfo +1 -1
  144. package/use-lunatic/commons/fill-components/fill-components.d.ts +1 -0
  145. package/use-lunatic/commons/fill-components/fill-components.js +1 -1
  146. package/use-lunatic/commons/fill-components/fill-components.js.map +1 -1
  147. package/use-lunatic/commons/page.js +4 -1
  148. package/use-lunatic/commons/page.js.map +1 -1
  149. package/use-lunatic/lunatic-context.d.ts +7 -1
  150. package/use-lunatic/lunatic-context.js +9 -2
  151. package/use-lunatic/lunatic-context.js.map +1 -1
  152. package/use-lunatic/props/getComponentTypeProps.d.ts +3 -0
  153. package/use-lunatic/props/propOptions.d.ts +1 -1
  154. package/use-lunatic/props/propOptions.js.map +1 -1
  155. package/use-lunatic/reducer/reducerInitializer.d.ts +2 -1
  156. package/use-lunatic/reducer/reducerInitializer.js +3 -1
  157. package/use-lunatic/reducer/reducerInitializer.js.map +1 -1
  158. package/use-lunatic/type.d.ts +7 -0
  159. package/use-lunatic/use-lunatic.js +11 -3
  160. package/use-lunatic/use-lunatic.js.map +1 -1
@@ -3,6 +3,7 @@ import type { LunaticBaseProps } from '../../type';
3
3
  import { slottableComponent } from '../HOC/slottableComponent';
4
4
  import { Label } from '../Label/Label';
5
5
  import { useKeyboardKey } from '../../../hooks/useKeyboardKey';
6
+ import { CustomInput } from '../../Input/Input';
6
7
 
7
8
  export type CheckboxOptionProps = {
8
9
  disabled?: boolean;
@@ -15,6 +16,10 @@ export type CheckboxOptionProps = {
15
16
  codeModality?: string;
16
17
  shortcut?: boolean;
17
18
  invalid?: boolean;
19
+ detailAlwaysDisplayed?: boolean;
20
+ detailLabel?: ReactNode;
21
+ detailValue?: string | null;
22
+ onDetailChange?: (value: string) => void;
18
23
  };
19
24
 
20
25
  function LunaticCheckboxOption({
@@ -25,11 +30,16 @@ function LunaticCheckboxOption({
25
30
  onCheck,
26
31
  label,
27
32
  description,
33
+ detailAlwaysDisplayed,
34
+ detailLabel,
35
+ detailValue,
36
+ onDetailChange,
28
37
  codeModality,
29
38
  shortcut,
30
39
  invalid,
31
40
  }: CheckboxOptionProps) {
32
41
  const isEnabled = !readOnly && !disabled;
42
+ const hasDetail = !!onDetailChange;
33
43
  const hasKeyboardShortcut = Boolean(shortcut && codeModality && isEnabled);
34
44
  const onClickOption = () => {
35
45
  if (isEnabled) {
@@ -55,40 +65,51 @@ function LunaticCheckboxOption({
55
65
  );
56
66
 
57
67
  return (
58
- <div
59
- id={id}
60
- role="checkbox"
61
- aria-invalid={invalid}
62
- aria-disabled={disabled}
63
- aria-readonly={readOnly}
64
- className="lunatic-input-checkbox"
65
- aria-checked={checked}
66
- tabIndex={0}
67
- onClick={onClickOption}
68
- onKeyDown={handleKeyDown}
69
- aria-labelledby={labelId}
70
- >
71
- <div className="lunatic-input-checkbox__icon">
72
- {checked && (
73
- <svg
74
- xmlns="http://www.w3.org/2000/svg"
75
- fill="none"
76
- viewBox="0 0 14 11"
77
- >
78
- <path
79
- d="M5 11 0 6l1.4-1.4L5 8.2 12.6.6 14 2l-9 9Z"
80
- fill="currentColor"
81
- />
82
- </svg>
83
- )}
68
+ <>
69
+ <div
70
+ id={id}
71
+ role="checkbox"
72
+ aria-invalid={invalid}
73
+ aria-disabled={disabled}
74
+ aria-readonly={readOnly}
75
+ className="lunatic-input-checkbox"
76
+ aria-checked={checked}
77
+ tabIndex={0}
78
+ onClick={onClickOption}
79
+ onKeyDown={handleKeyDown}
80
+ aria-labelledby={labelId}
81
+ >
82
+ <div className="lunatic-input-checkbox__icon">
83
+ {checked && (
84
+ <svg
85
+ xmlns="http://www.w3.org/2000/svg"
86
+ fill="none"
87
+ viewBox="0 0 14 11"
88
+ >
89
+ <path
90
+ d="M5 11 0 6l1.4-1.4L5 8.2 12.6.6 14 2l-9 9Z"
91
+ fill="currentColor"
92
+ />
93
+ </svg>
94
+ )}
95
+ </div>
96
+ <Label id={labelId} htmlFor={id} description={description}>
97
+ {codeModality && (
98
+ <span className="code-modality">{codeModality.toUpperCase()}</span>
99
+ )}{' '}
100
+ {label}
101
+ </Label>
84
102
  </div>
85
- <Label id={labelId} htmlFor={id} description={description}>
86
- {codeModality && (
87
- <span className="code-modality">{codeModality.toUpperCase()}</span>
88
- )}{' '}
89
- {label}
90
- </Label>
91
- </div>
103
+ {hasDetail && (checked || detailAlwaysDisplayed) && (
104
+ <CustomInput
105
+ id="detailId"
106
+ label={detailLabel ?? 'Précisez :'}
107
+ value={typeof detailValue === 'string' ? detailValue : ''}
108
+ onChange={onDetailChange}
109
+ disabled={disabled}
110
+ />
111
+ )}
112
+ </>
92
113
  );
93
114
  }
94
115
 
@@ -22,6 +22,7 @@ export type RadioGroupProps = Pick<
22
22
  | 'description'
23
23
  | 'declarations'
24
24
  | 'orientation'
25
+ | 'detailAlwaysDisplayed'
25
26
  > & {
26
27
  errors?: LunaticError[];
27
28
  clearable?: boolean;
@@ -44,6 +45,7 @@ function LunaticRadioGroup({
44
45
  readOnly,
45
46
  declarations,
46
47
  orientation,
48
+ detailAlwaysDisplayed,
47
49
  }: RadioGroupProps) {
48
50
  const onKeyDown = useListKeyboardHandler(options);
49
51
  const maxIndex = options.length;
@@ -61,6 +63,7 @@ function LunaticRadioGroup({
61
63
  id={radioId}
62
64
  index={index}
63
65
  checked={value === option.value}
66
+ detailAlwaysDisplayed={detailAlwaysDisplayed}
64
67
  onKeyDown={onKeyDown}
65
68
  checkboxStyle={checkboxStyle}
66
69
  codeModality={shortcut ? codeModality : undefined}
@@ -73,4 +73,40 @@ describe('RadioOption', () => {
73
73
  fireEvent.keyDown(option, { key: 'Enter', code: 'Enter' });
74
74
  expect(onKeyDownMock).toHaveBeenCalled();
75
75
  });
76
+
77
+ it('renders the detail when checked', () => {
78
+ const { getByText } = render(
79
+ <RadioOption
80
+ id="radio-option"
81
+ label="Test Option"
82
+ onDetailChange={() => {}}
83
+ detailLabel="My detail"
84
+ checked
85
+ />
86
+ );
87
+ expect(getByText('My detail')).toBeInTheDocument();
88
+ });
89
+ it('does not render the detail when unchecked', () => {
90
+ const { queryByText } = render(
91
+ <RadioOption
92
+ id="radio-option"
93
+ label="Test Option"
94
+ onDetailChange={() => {}}
95
+ detailLabel="My detail"
96
+ />
97
+ );
98
+ expect(queryByText('My detail')).toBeNull();
99
+ });
100
+ it('renders the details when unchecked with the detail always displayed attribute', () => {
101
+ const { getByText } = render(
102
+ <RadioOption
103
+ id="radio-option"
104
+ label="Test Option"
105
+ onDetailChange={() => {}}
106
+ detailLabel="My detail"
107
+ detailAlwaysDisplayed
108
+ />
109
+ );
110
+ expect(getByText('My detail')).toBeInTheDocument();
111
+ });
76
112
  });
@@ -17,6 +17,7 @@ export type Props = {
17
17
  labelledBy?: string;
18
18
  codeModality?: string;
19
19
  invalid?: boolean;
20
+ detailAlwaysDisplayed?: boolean;
20
21
  } & InterpretedOption;
21
22
 
22
23
  function LunaticRadioOption({
@@ -30,10 +31,12 @@ function LunaticRadioOption({
30
31
  shortcut,
31
32
  codeModality,
32
33
  id,
34
+ invalid,
33
35
  labelledBy,
34
36
  description,
35
37
  label,
36
38
  onDetailChange,
39
+ detailAlwaysDisplayed,
37
40
  detailLabel,
38
41
  detailValue,
39
42
  onCheck,
@@ -80,6 +83,7 @@ function LunaticRadioOption({
80
83
  <div
81
84
  id={id}
82
85
  role="radio"
86
+ aria-invalid={invalid}
83
87
  aria-disabled={disabled}
84
88
  className={classnames(
85
89
  'lunatic-input-checkbox',
@@ -113,7 +117,7 @@ function LunaticRadioOption({
113
117
  {label}
114
118
  </Label>
115
119
  </div>
116
- {hasDetail && checked && (
120
+ {hasDetail && (checked || detailAlwaysDisplayed) && (
117
121
  <CustomInput
118
122
  id="detailId"
119
123
  label={detailLabel ?? 'Précisez :'}
@@ -191,6 +191,7 @@ export type ComponentPropsByType = {
191
191
  detailLabel?: ReactNode;
192
192
  }[];
193
193
  orientation?: 'horizontal' | 'vertical';
194
+ detailAlwaysDisplayed?: boolean;
194
195
  componentType?: 'CheckboxGroup';
195
196
  };
196
197
  CheckboxOne: LunaticBaseProps<string | null> &
@@ -198,6 +199,7 @@ export type ComponentPropsByType = {
198
199
  options: Array<InterpretedOption>;
199
200
  componentType?: 'CheckboxOne';
200
201
  orientation?: 'horizontal' | 'vertical';
202
+ detailAlwaysDisplayed?: boolean;
201
203
  };
202
204
  Switch: LunaticBaseProps<boolean> &
203
205
  LunaticExtraProps & {
@@ -217,6 +219,7 @@ export type ComponentPropsByType = {
217
219
  response: { name: string };
218
220
  componentType?: 'Radio';
219
221
  orientation?: 'horizontal' | 'vertical';
222
+ detailAlwaysDisplayed?: boolean;
220
223
  };
221
224
  Roundabout: LunaticBaseProps<string> &
222
225
  LunaticExtraProps & {
@@ -9,7 +9,7 @@
9
9
 
10
10
  label {
11
11
  display: flex;
12
- gap:0.5em;
12
+ gap: 0.5em;
13
13
  align-items: center;
14
14
  .label-description {
15
15
  font-weight: lighter;
@@ -12,12 +12,12 @@
12
12
  display: flex;
13
13
  align-items: center;
14
14
  cursor: pointer;
15
- gap: .5rem;
16
- padding: .3rem 0;
15
+ gap: 0.5rem;
16
+ padding: 0.3rem 0;
17
17
 
18
18
  label {
19
19
  display: flex;
20
- gap: .5em;
20
+ gap: 0.5em;
21
21
  cursor: inherit;
22
22
  margin: 0;
23
23
  font-weight: normal;
@@ -31,33 +31,30 @@
31
31
  height: 18px;
32
32
  flex: none;
33
33
  border-radius: 2px;
34
- color: #FFF;
34
+ color: #fff;
35
35
  border: 2px solid var(--color-primary-dark);
36
36
 
37
37
  svg {
38
- transform: scale(.9);
38
+ transform: scale(0.9);
39
39
  }
40
40
  }
41
41
 
42
- .lunatic-input-checkbox[aria-checked="true"] .lunatic-input-checkbox__icon {
42
+ .lunatic-input-checkbox[aria-checked='true'] .lunatic-input-checkbox__icon {
43
43
  background-color: var(--color-primary-dark);
44
44
  }
45
45
 
46
- .lunatic-input-checkbox[aria-disabled="true"],
47
- .lunatic-input-checkbox[aria-readonly="true"] {
46
+ .lunatic-input-checkbox[aria-disabled='true'],
47
+ .lunatic-input-checkbox[aria-readonly='true'] {
48
48
  cursor: default;
49
49
 
50
- .lunatic-input-checkbox__icon
51
- {
50
+ .lunatic-input-checkbox__icon {
52
51
  border-color: var(--color-primary-light);
53
52
  background-color: var(--color-disabled);
54
53
  }
55
54
  }
56
55
 
57
- .lunatic-input-checkbox[aria-disabled="true"][aria-checked="true"],
58
- .lunatic-input-checkbox[aria-readonly="true"][aria-checked="true"]
59
- {
60
-
56
+ .lunatic-input-checkbox[aria-disabled='true'][aria-checked='true'],
57
+ .lunatic-input-checkbox[aria-readonly='true'][aria-checked='true'] {
61
58
  .lunatic-input-checkbox__icon {
62
59
  color: var(--color-primary-light);
63
60
  }
@@ -71,15 +68,14 @@
71
68
  svg {
72
69
  display: none;
73
70
  }
74
-
75
71
  }
76
72
 
77
- .lunatic-input-radio[aria-checked="true"] .lunatic-input-checkbox__icon {
73
+ .lunatic-input-radio[aria-checked='true'] .lunatic-input-checkbox__icon {
78
74
  background: transparent;
79
75
  }
80
76
 
81
- .lunatic-input-radio[aria-checked="true"] .lunatic-input-checkbox__icon::after {
82
- content:'';
77
+ .lunatic-input-radio[aria-checked='true'] .lunatic-input-checkbox__icon::after {
78
+ content: '';
83
79
  width: 10px;
84
80
  height: 10px;
85
81
  border-radius: 10px;
@@ -86,13 +86,14 @@
86
86
  height: 0;
87
87
  opacity: 0;
88
88
  background-color: var(--color-combo-box-background);
89
- transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
89
+ transition:
90
+ opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
90
91
  transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
91
92
 
92
93
  &.expanded {
93
94
  display: flex;
94
95
  flex-direction: column;
95
- gap: .2rem;
96
+ gap: 0.2rem;
96
97
  border: solid 1px var(--color-primary-light);
97
98
  opacity: 1;
98
99
  min-height: 30px;
@@ -1,19 +1,19 @@
1
1
  .lunaticDatepickerFields {
2
- display: flex;
3
- align-items: flex-end;
4
- gap: 1rem;
2
+ display: flex;
3
+ align-items: flex-end;
4
+ gap: 1rem;
5
5
  }
6
6
 
7
7
  .lunaticDatepickerField input {
8
- width: 3.5em;
8
+ width: 3.5em;
9
9
  }
10
10
 
11
11
  .lunaticDatepickerFieldLarge input {
12
- width: 4.5em;
12
+ width: 4.5em;
13
13
  }
14
14
 
15
15
  .lunaticDatepickerHint {
16
- display: block;
17
- font-weight: 400;
18
- font-size: .9em;
16
+ display: block;
17
+ font-weight: 400;
18
+ font-size: 0.9em;
19
19
  }
@@ -28,7 +28,7 @@
28
28
  width: fit-content;
29
29
  padding: 1em;
30
30
  &:before {
31
- content: ""
31
+ content: '';
32
32
  }
33
33
  }
34
34
 
@@ -1,8 +1,8 @@
1
1
  .lunatic-dragger {
2
- display: inline-block;
3
- width: 100%;
4
- height: 100%;
5
- -moz-user-select: -moz-none;
6
- -khtml-user-select: none;
7
- -webkit-user-select: none;
2
+ display: inline-block;
3
+ width: 100%;
4
+ height: 100%;
5
+ -moz-user-select: -moz-none;
6
+ -khtml-user-select: none;
7
+ -webkit-user-select: none;
8
8
  }
@@ -1,9 +1,9 @@
1
1
  .duration-fields,
2
2
  .duration-field {
3
- display: flex;
4
- align-items: center;
5
- gap: 1rem;
3
+ display: flex;
4
+ align-items: center;
5
+ gap: 1rem;
6
6
  }
7
7
  .duration-field {
8
- gap: .5rem;
8
+ gap: 0.5rem;
9
9
  }
@@ -13,8 +13,10 @@
13
13
  outline: inherit;
14
14
  border: none;
15
15
  background-color: royalblue;
16
- box-shadow: 0px 3px 5px -1px rgb(0 0 0 / 20%),
17
- 0px 6px 10px 0px rgb(0 0 0 / 14%), 0px 1px 18px 0px rgb(0 0 0 / 12%);
16
+ box-shadow:
17
+ 0px 3px 5px -1px rgb(0 0 0 / 20%),
18
+ 0px 6px 10px 0px rgb(0 0 0 / 14%),
19
+ 0px 1px 18px 0px rgb(0 0 0 / 12%);
18
20
 
19
21
  &:hover {
20
22
  cursor: pointer;
@@ -21,6 +21,9 @@
21
21
  min-width: 0;
22
22
  box-sizing: content-box;
23
23
  background: none;
24
+ overflow: hidden;
25
+ text-overflow: ellipsis;
26
+ white-space: nowrap;
24
27
  &:focus {
25
28
  outline: none;
26
29
  border-bottom: 0.125rem solid var(--color-primary-main);
@@ -15,7 +15,7 @@
15
15
  color: var(--color-primary-main);
16
16
  }
17
17
  .missing-buttons .button-lunatic:disabled {
18
- opacity: .5;
18
+ opacity: 0.5;
19
19
  }
20
20
  .missing-button-active .button-lunatic {
21
21
  background-color: var(--color-primary-dark);
@@ -8,7 +8,7 @@
8
8
  display: grid;
9
9
  grid-template-columns: 1fr max-content;
10
10
  justify-content: space-between;
11
- gap: .5rem;
11
+ gap: 0.5rem;
12
12
  }
13
13
 
14
14
  .lunatic-roundabout__item .lunatic-errors {
@@ -17,7 +17,7 @@
17
17
 
18
18
  .lunatic-roundabout__item + .lunatic-roundabout__item {
19
19
  border-top: 1px solid var(--color-secondary-dark);
20
- padding-top: .5rem;
20
+ padding-top: 0.5rem;
21
21
  margin-top: 1rem;
22
22
  }
23
23
 
@@ -27,5 +27,5 @@
27
27
  }
28
28
  .lunatic-roundabout__button-progress,
29
29
  .lunatic-roundabout__button-progress:focus {
30
- background-color: var(--color-primary-main)
30
+ background-color: var(--color-primary-main);
31
31
  }
@@ -53,7 +53,6 @@
53
53
  min-width: 260px;
54
54
  width: 100%;
55
55
  .lunatic-suggester-content {
56
-
57
56
  &.focused {
58
57
  .lunatic-suggester-selection {
59
58
  }
@@ -107,7 +106,8 @@
107
106
  height: 0;
108
107
  opacity: 0;
109
108
  background-color: white;
110
- transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
109
+ transition:
110
+ opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
111
111
  transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
112
112
  &.expended {
113
113
  border: solid 1px var(--color-primary-light);
@@ -21,10 +21,12 @@
21
21
  top: 0;
22
22
  z-index: 2;
23
23
  border-collapse: separate;
24
- background-color: #FFF;
24
+ background-color: #fff;
25
25
  // Borders does not work on position sticky element, use box-shadow to imitate border
26
- border-top: none!important;
27
- box-shadow: inset 0 1px 0 var(--color-primary-dark), inset 0 -1px 0 var(--color-primary-dark);
26
+ border-top: none !important;
27
+ box-shadow:
28
+ inset 0 1px 0 var(--color-primary-dark),
29
+ inset 0 -1px 0 var(--color-primary-dark);
28
30
  }
29
31
 
30
32
  td {
@@ -37,7 +39,7 @@
37
39
  }
38
40
  }
39
41
 
40
- .lunatic-component .table-lunatic .tooltip-lunatic img {
41
- height: 20px;
42
- width: 20px;
43
- }
42
+ .lunatic-component .table-lunatic .tooltip-lunatic img {
43
+ height: 20px;
44
+ width: 20px;
45
+ }