@inseefr/lunatic 0.3.18-v2 → 0.4.3-v2

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 (112) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +25 -25
  3. package/lib/components/button/button.scss +24 -24
  4. package/lib/components/commons/components/combo-box/combo-box.scss +218 -218
  5. package/lib/components/commons/components/create-lunatic-component/create-lunatic-component.js +10 -10
  6. package/lib/components/commons/components/dragger/dragger.scss +7 -7
  7. package/lib/components/commons/components/fab/fab.scss +32 -32
  8. package/lib/components/commons/components/lunatic-component.js +3 -0
  9. package/lib/components/commons/components/lunatic-fieldset-component.js +3 -0
  10. package/lib/components/commons/components/missing/missing.scss +30 -30
  11. package/lib/components/commons/components/orchestrated-component.js +3 -2
  12. package/lib/components/commons/components/variable-status/variable-status.scss +39 -39
  13. package/lib/components/commons/icons/lunatic-icon.scss +4 -4
  14. package/lib/components/commons/use-on-handle-change.js +1 -2
  15. package/lib/components/datepicker/datepicker.scss +1 -1
  16. package/lib/components/declarations/declarations.js +1 -1
  17. package/lib/components/declarations/declarations.scss +36 -36
  18. package/lib/components/dropdown/dropdown-simple/simple-label-renderer.js +1 -1
  19. package/lib/components/dropdown/dropdown-simple/simple-option-renderer.js +1 -1
  20. package/lib/components/dropdown/dropdown.scss +41 -41
  21. package/lib/components/filter-description/component.js +3 -4
  22. package/lib/components/index.scss +139 -139
  23. package/lib/components/input/input.scss +31 -31
  24. package/lib/components/loop/block-for-loop/block-for-loop.js +15 -3
  25. package/lib/components/loop/loop.js +4 -2
  26. package/lib/components/loop/roster-for-loop/roster-for-loop.js +4 -12
  27. package/lib/components/loop/roster-for-loop/roster.scss +42 -42
  28. package/lib/components/modal-controls/modal-controls.scss +63 -63
  29. package/lib/components/pairwise/links/pairwise-links.js +3 -0
  30. package/lib/components/radio/radio-option.js +3 -2
  31. package/lib/components/radio/radio.scss +59 -59
  32. package/lib/components/sequence/sequence.js +8 -7
  33. package/lib/components/sequence/sequence.scss +10 -10
  34. package/lib/components/subsequence/subsequence.js +9 -6
  35. package/lib/components/suggester/default-style.scss +125 -125
  36. package/lib/components/suggester/find-best-label/find-best-label.js +5 -5
  37. package/lib/components/suggester-loader-widget/widget.scss +176 -176
  38. package/lib/components/switch/switch.scss +47 -47
  39. package/lib/components/table/components/table.scss +26 -26
  40. package/lib/components/textarea/textarea.scss +8 -8
  41. package/lib/i18n/build-dictionary.js +16 -16
  42. package/lib/stories/Introduction.stories.mdx +114 -114
  43. package/lib/stories/checkboxOne/checkboxOne.stories.js +35 -0
  44. package/lib/stories/checkboxOne/source.json +36 -0
  45. package/lib/stories/custom-mui/textarea-mui.js +0 -5
  46. package/lib/stories/dropdown/data.json +16 -16
  47. package/lib/stories/dropdown/source.json +122 -98
  48. package/lib/stories/filter-description/filter-description.stories.js +58 -0
  49. package/lib/stories/filter-description/source-options.json +81 -0
  50. package/lib/stories/filter-description/source.json +11 -0
  51. package/lib/stories/input/data.json +5 -5
  52. package/lib/stories/input/source.json +28 -28
  53. package/lib/stories/input-number/input-number.stories.js +35 -0
  54. package/lib/stories/input-number/source.json +37 -0
  55. package/lib/stories/pairwise/block/block.json +3 -3
  56. package/lib/stories/pairwise/links/data.json +12 -12
  57. package/lib/stories/pairwise/links/links.json +141 -141
  58. package/lib/stories/paste-questionnaire/source.json +6290 -0
  59. package/lib/stories/paste-questionnaire/test.stories.js +91 -0
  60. package/lib/stories/questionnaires/logement/data.json +2691 -2691
  61. package/lib/stories/questionnaires/logement/source-sequence.json +34181 -33114
  62. package/lib/stories/questionnaires/logement/source.json +34191 -33124
  63. package/lib/stories/questionnaires/simpsons/source.json +6290 -6290
  64. package/lib/stories/questionnaires-test/V2_DeclarationsSimples.json +848 -0
  65. package/lib/stories/questionnaires-test/V2_MinMaxSum_Boucles.json +509 -0
  66. package/lib/stories/questionnaires-test/V2_QuestSimple_Boucles.json +4091 -0
  67. package/lib/stories/questionnaires-test/V2_TCMRallyeGames.json +2892 -0
  68. package/lib/stories/questionnaires-test/controls/V2_ControlesNonNum_horsBoucle_PasPageFin.json +452 -0
  69. package/lib/stories/questionnaires-test/controls/V2_ControlesNum_horsBoucle_PasPageFin.json +1689 -0
  70. package/lib/stories/questionnaires-test/controls/V2_Controles_BouclesLiees2_PasPageFin.json +709 -0
  71. package/lib/stories/questionnaires-test/controls/V2_Controles_BouclesLiees_PasPageFin.json +368 -0
  72. package/lib/stories/questionnaires-test/controls/controls.stories.js +98 -0
  73. package/lib/stories/questionnaires-test/test-dylan.json +430 -0
  74. package/lib/stories/questionnaires-test/test.stories.js +100 -0
  75. package/lib/stories/radio/radio.stories.js +35 -0
  76. package/lib/stories/radio/source.json +36 -0
  77. package/lib/stories/roster-for-loop/source.json +114 -114
  78. package/lib/stories/suggester/source.json +234 -234
  79. package/lib/stories/switch/README.md +31 -31
  80. package/lib/stories/switch/data-forced.json +48 -48
  81. package/lib/stories/switch/data.json +80 -80
  82. package/lib/stories/table/data-roster.json +1 -1
  83. package/lib/stories/table/data.json +1 -1
  84. package/lib/stories/table/source-roster.json +504 -504
  85. package/lib/stories/table/source.json +19 -19
  86. package/lib/stories/utils/custom-lunatic.scss +28 -28
  87. package/lib/stories/utils/orchestrator.js +24 -8
  88. package/lib/stories/utils/waiting/waiting.scss +21 -21
  89. package/lib/use-lunatic/actions.js +30 -16
  90. package/lib/use-lunatic/commons/calculated-variables.js +124 -0
  91. package/lib/use-lunatic/commons/create-map-pages.js +10 -10
  92. package/lib/use-lunatic/commons/execute-expression/create-execute-expression.js +16 -16
  93. package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.js +11 -0
  94. package/lib/use-lunatic/commons/execute-expression/execute-expression.js +1 -0
  95. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +21 -21
  96. package/lib/use-lunatic/commons/get-components-from-state.js +9 -2
  97. package/lib/use-lunatic/commons/get-data.js +90 -0
  98. package/lib/use-lunatic/reducer/commons/resize-array-variable.js +7 -7
  99. package/lib/use-lunatic/reducer/reduce-go-next-page.js +20 -11
  100. package/lib/use-lunatic/reducer/reduce-go-to-page.js +51 -0
  101. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.js +2 -1
  102. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.js +18 -17
  103. package/lib/use-lunatic/reducer/reduce-on-init.js +8 -7
  104. package/lib/use-lunatic/reducer/reducer.js +8 -3
  105. package/lib/use-lunatic/use-lunatic.js +18 -14
  106. package/lib/utils/store-tools/auto-load.js +2 -2
  107. package/lib/utils/suggester-workers/append-to-index/create-append-task.js +2 -2
  108. package/lib/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +1 -3
  109. package/lib/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +3 -1
  110. package/lib/utils/suggester-workers/commons-tokenizer/filters/compose-filters.js +1 -1
  111. package/package.json +159 -159
  112. package/lib/use-lunatic/reducer/commons/Insee.code-workspace +0 -47
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2019
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2019
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,25 +1,25 @@
1
- <img align="right" src="docs/img/lunatic-logo.png" alt="Lunatic logo"/>
2
-
3
- # Lunatic
4
-
5
- Library of questionnaire components
6
-
7
- [![Lunatic CI](https://github.com/InseeFr/Lunatic/actions/workflows/ci.yml/badge.svg)](https://github.com/InseeFr/Lunatic/actions/workflows/ci.yml)
8
- [![npm version](https://badge.fury.io/js/%40inseefr%2Flunatic.svg)](https://badge.fury.io/js/%40inseefr%2Flunatic)
9
- [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=InseeFr_Lunatic&metric=coverage)](https://sonarcloud.io/dashboard?id=InseeFr_Lunatic)
10
- [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=InseeFr_Lunatic&metric=alert_status)](https://sonarcloud.io/dashboard?id=InseeFr_Lunatic)
11
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
12
-
13
- The documentation can be found in the [docs](https://github.com/InseeFr/Lunatic/tree/master/docs) folder and [browsed online](https://inseefr.github.io/Lunatic).
14
-
15
- [Storybook](https://inseefr.github.io/Lunatic/storybook) is also available online.
16
-
17
- [Storybook of the future major release](https://inseefr.github.io/Lunatic/storybook-v2) under construction is also available online.
18
-
19
- ## Usage
20
-
21
- An [example](https://github.com/InseeFr/Lunatic/tree/master/example/orchestrator) of use of Lunatic is available. This simple orchestrator is deployed [online](https://inseefr.github.io/Lunatic/orchestrator).
22
-
23
- ## Editor
24
-
25
- A Lunatic Model / Lunatic [Editor](https://github.com/InseeFr/Lunatic/tree/master/example/lunatic-editor) is avaible [online](https://inseefr.github.io/Lunatic/editor).
1
+ <img align="right" src="docs/img/lunatic-logo.png" alt="Lunatic logo"/>
2
+
3
+ # Lunatic
4
+
5
+ Library of questionnaire components
6
+
7
+ [![Lunatic CI](https://github.com/InseeFr/Lunatic/actions/workflows/ci.yml/badge.svg)](https://github.com/InseeFr/Lunatic/actions/workflows/ci.yml)
8
+ [![npm version](https://badge.fury.io/js/%40inseefr%2Flunatic.svg)](https://badge.fury.io/js/%40inseefr%2Flunatic)
9
+ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=InseeFr_Lunatic&metric=coverage)](https://sonarcloud.io/dashboard?id=InseeFr_Lunatic)
10
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=InseeFr_Lunatic&metric=alert_status)](https://sonarcloud.io/dashboard?id=InseeFr_Lunatic)
11
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
12
+
13
+ The documentation can be found in the [docs](https://github.com/InseeFr/Lunatic/tree/master/docs) folder and [browsed online](https://inseefr.github.io/Lunatic).
14
+
15
+ [Storybook](https://inseefr.github.io/Lunatic/storybook) is also available online.
16
+
17
+ [Storybook of the future major release](https://inseefr.github.io/Lunatic/storybook-v2) under construction is also available online.
18
+
19
+ ## Usage
20
+
21
+ An [example](https://github.com/InseeFr/Lunatic/tree/master/example/orchestrator) of use of Lunatic is available. This simple orchestrator is deployed [online](https://inseefr.github.io/Lunatic/orchestrator).
22
+
23
+ ## Editor
24
+
25
+ A Lunatic Model / Lunatic [Editor](https://github.com/InseeFr/Lunatic/tree/master/example/lunatic-editor) is avaible [online](https://inseefr.github.io/Lunatic/editor).
@@ -1,24 +1,24 @@
1
- .button-lunatic {
2
- min-width: 20%;
3
- color: white;
4
- border-color: var(--color-primary-dark);
5
- background-color: var(--color-primary-dark);
6
- font-size: 1.2em;
7
- font-weight: bold;
8
- padding: 0.4em;
9
- &:hover,
10
- &:focus:hover {
11
- color: var(--color-primary-dark);
12
- background-color: white;
13
- border-color: var(--color-primary-dark);
14
- }
15
- &:focus {
16
- outline: none;
17
- background-color: var(--color-primary-light);
18
- border-color: var(--color-primary-light);
19
- }
20
- &:disabled {
21
- background: var(--color-disabled);
22
- color: var(--color-primary-dark);
23
- }
24
- }
1
+ .button-lunatic {
2
+ min-width: 20%;
3
+ color: white;
4
+ border-color: var(--color-primary-dark);
5
+ background-color: var(--color-primary-dark);
6
+ font-size: 1.2em;
7
+ font-weight: bold;
8
+ padding: 0.4em;
9
+ &:hover,
10
+ &:focus:hover {
11
+ color: var(--color-primary-dark);
12
+ background-color: white;
13
+ border-color: var(--color-primary-dark);
14
+ }
15
+ &:focus {
16
+ outline: none;
17
+ background-color: var(--color-primary-light);
18
+ border-color: var(--color-primary-light);
19
+ }
20
+ &:disabled {
21
+ background: var(--color-disabled);
22
+ color: var(--color-primary-dark);
23
+ }
24
+ }
@@ -1,218 +1,218 @@
1
- @mixin preventSelect() {
2
- -moz-user-select: -moz-none;
3
- -khtml-user-select: none;
4
- -webkit-user-select: none;
5
- }
6
-
7
- @mixin placeholder {
8
- color: gray;
9
- @include defaultFont();
10
- font-size: 15px;
11
- line-height: 34px;
12
- vertical-align: middle;
13
- font-weight: normal;
14
- }
15
-
16
- @mixin defaultFont {
17
- font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
18
- }
19
-
20
- @mixin selection() {
21
- @include defaultFont();
22
- }
23
-
24
- .lunatic-combo-box-container {
25
- position: relative;
26
- width: 100%;
27
-
28
- &.default-style {
29
- --color-combo-box-selected: Cornsilk;
30
- --color-primary-dark: DarkGreen;
31
- --color-primary-main: FloralWhite;
32
- --color-combo-box-background: snow;
33
- --color-disabled: Gainsboro;
34
- --color-primary-light: GreenYellow;
35
-
36
- margin-bottom: 10px;
37
- .lunatic-combo-box {
38
- min-height: 30px;
39
- min-width: 260px;
40
- width: 100%;
41
-
42
- .lunatic-combo-box-content {
43
- .lunatic-combo-box-selection {
44
- border-radius: 5px;
45
- border: 2px solid var(--color-primary-dark);
46
- background-color: var(--color-combo-box-background);
47
- &:hover {
48
- border-color: var(--color-primary-main);
49
- }
50
- .lunatic-combo-box-input {
51
- height: 34;
52
- line-height: 34px;
53
- font-size: 15px;
54
- padding-left: 4px;
55
- @include selection();
56
-
57
- &::placeholder {
58
- @include placeholder();
59
- }
60
- }
61
-
62
- .lunatic-combo-box-selected {
63
- height: 34px;
64
- line-height: 34px;
65
- background-color: var(--color-combo-box-background);
66
- border-radius: 5px;
67
- padding-left: 4px;
68
- @include selection();
69
- outline: none;
70
-
71
- display: block;
72
- @include placeholder();
73
-
74
- .placeholder {
75
- }
76
-
77
- .selection {
78
- display: inline-block;
79
- line-height: 34px;
80
- font-size: 15px;
81
- }
82
-
83
- &.disabled {
84
- background-color: var(--color-disabled);
85
- }
86
- }
87
- }
88
-
89
- .lunatic-combo-box-panel {
90
- @include defaultFont();
91
- height: 0;
92
- opacity: 0;
93
- background-color: var(--color-combo-box-background);
94
- transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
95
- transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
96
-
97
- &.expended {
98
- border: solid 1px var(--color-primary-light);
99
- opacity: 1;
100
- min-height: 30px;
101
- height: max-content;
102
- box-shadow: 0 2px 2px grey;
103
- border-radius: 4px;
104
- }
105
- &:focus {
106
- }
107
- .lunatic-combo-box-option {
108
- text-overflow: ellipsis;
109
- white-space: nowrap;
110
- overflow: hidden;
111
- margin-bottom: 0.1em;
112
- line-height: 2rem;
113
- display: block;
114
-
115
- &.selected {
116
- color: var(--color-primary-dark);
117
- background-color: var(--color-combo-box-selected);
118
- }
119
- &:hover {
120
- background-color: var(--color-primary-main);
121
- color: var(--color-combo-box-background);
122
- }
123
- }
124
- }
125
- }
126
- }
127
- }
128
-
129
- .lunatic-combo-box-fab {
130
- position: absolute;
131
- right: 4px;
132
- top: 8px;
133
- z-index: 0;
134
- &.focused {
135
- z-index: 1;
136
- }
137
-
138
- .lunatic-icon {
139
- svg {
140
- fill: white;
141
- width: 16px;
142
- height: 16px;
143
- }
144
- }
145
- }
146
-
147
- .lunatic-combo-box {
148
- position: relative;
149
- z-index: 0;
150
-
151
- &:focus {
152
- outline: none;
153
- }
154
-
155
- &.focused {
156
- z-index: 1;
157
- }
158
-
159
- .lunatic-combo-box-content {
160
- position: absolute;
161
- width: 100%;
162
-
163
- .lunatic-combo-box-selection {
164
- position: relative;
165
- .lunatic-combo-box-input {
166
- border: none;
167
- margin: 0;
168
- padding: 0;
169
- background-color: transparent;
170
- &:focus {
171
- outline: none;
172
- }
173
-
174
- width: 100%;
175
- /* */
176
- }
177
-
178
- .lunatic-combo-box-selected {
179
- // position: absolute;
180
- top: 0;
181
- white-space: nowrap;
182
- overflow-x: hidden;
183
- width: 100%;
184
- height: 100%;
185
- display: none;
186
- &.displayed {
187
- display: block;
188
- }
189
-
190
- .placeholder {
191
- }
192
- .selection {
193
- }
194
- }
195
- }
196
-
197
- ul,
198
- li,
199
- div,
200
- span {
201
- margin: 0;
202
- padding: 0;
203
- border: none;
204
- list-style: none;
205
- }
206
-
207
- .lunatic-combo-box-panel {
208
- &:focus {
209
- outline: none;
210
- }
211
- .lunatic-combo-box-option {
212
- white-space: nowrap;
213
- @include preventSelect();
214
- }
215
- }
216
- }
217
- }
218
- }
1
+ @mixin preventSelect() {
2
+ -moz-user-select: -moz-none;
3
+ -khtml-user-select: none;
4
+ -webkit-user-select: none;
5
+ }
6
+
7
+ @mixin placeholder {
8
+ color: gray;
9
+ @include defaultFont();
10
+ font-size: 15px;
11
+ line-height: 34px;
12
+ vertical-align: middle;
13
+ font-weight: normal;
14
+ }
15
+
16
+ @mixin defaultFont {
17
+ font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
18
+ }
19
+
20
+ @mixin selection() {
21
+ @include defaultFont();
22
+ }
23
+
24
+ .lunatic-combo-box-container {
25
+ position: relative;
26
+ width: 100%;
27
+
28
+ &.default-style {
29
+ --color-combo-box-selected: Cornsilk;
30
+ --color-primary-dark: DarkGreen;
31
+ --color-primary-main: FloralWhite;
32
+ --color-combo-box-background: snow;
33
+ --color-disabled: Gainsboro;
34
+ --color-primary-light: GreenYellow;
35
+
36
+ margin-bottom: 10px;
37
+ .lunatic-combo-box {
38
+ min-height: 30px;
39
+ min-width: 260px;
40
+ width: 100%;
41
+
42
+ .lunatic-combo-box-content {
43
+ .lunatic-combo-box-selection {
44
+ border-radius: 5px;
45
+ border: 2px solid var(--color-primary-dark);
46
+ background-color: var(--color-combo-box-background);
47
+ &:hover {
48
+ border-color: var(--color-primary-main);
49
+ }
50
+ .lunatic-combo-box-input {
51
+ height: 34;
52
+ line-height: 34px;
53
+ font-size: 15px;
54
+ padding-left: 4px;
55
+ @include selection();
56
+
57
+ &::placeholder {
58
+ @include placeholder();
59
+ }
60
+ }
61
+
62
+ .lunatic-combo-box-selected {
63
+ height: 34px;
64
+ line-height: 34px;
65
+ background-color: var(--color-combo-box-background);
66
+ border-radius: 5px;
67
+ padding-left: 4px;
68
+ @include selection();
69
+ outline: none;
70
+
71
+ display: block;
72
+ @include placeholder();
73
+
74
+ .placeholder {
75
+ }
76
+
77
+ .selection {
78
+ display: inline-block;
79
+ line-height: 34px;
80
+ font-size: 15px;
81
+ }
82
+
83
+ &.disabled {
84
+ background-color: var(--color-disabled);
85
+ }
86
+ }
87
+ }
88
+
89
+ .lunatic-combo-box-panel {
90
+ @include defaultFont();
91
+ height: 0;
92
+ opacity: 0;
93
+ background-color: var(--color-combo-box-background);
94
+ transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
95
+ transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
96
+
97
+ &.expended {
98
+ border: solid 1px var(--color-primary-light);
99
+ opacity: 1;
100
+ min-height: 30px;
101
+ height: max-content;
102
+ box-shadow: 0 2px 2px grey;
103
+ border-radius: 4px;
104
+ }
105
+ &:focus {
106
+ }
107
+ .lunatic-combo-box-option {
108
+ text-overflow: ellipsis;
109
+ white-space: nowrap;
110
+ overflow: hidden;
111
+ margin-bottom: 0.1em;
112
+ line-height: 2rem;
113
+ display: block;
114
+
115
+ &.selected {
116
+ color: var(--color-primary-dark);
117
+ background-color: var(--color-combo-box-selected);
118
+ }
119
+ &:hover {
120
+ background-color: var(--color-primary-main);
121
+ color: var(--color-combo-box-background);
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ .lunatic-combo-box-fab {
130
+ position: absolute;
131
+ right: 4px;
132
+ top: 8px;
133
+ z-index: 0;
134
+ &.focused {
135
+ z-index: 1;
136
+ }
137
+
138
+ .lunatic-icon {
139
+ svg {
140
+ fill: white;
141
+ width: 16px;
142
+ height: 16px;
143
+ }
144
+ }
145
+ }
146
+
147
+ .lunatic-combo-box {
148
+ position: relative;
149
+ z-index: 0;
150
+
151
+ &:focus {
152
+ outline: none;
153
+ }
154
+
155
+ &.focused {
156
+ z-index: 1;
157
+ }
158
+
159
+ .lunatic-combo-box-content {
160
+ position: absolute;
161
+ width: 100%;
162
+
163
+ .lunatic-combo-box-selection {
164
+ position: relative;
165
+ .lunatic-combo-box-input {
166
+ border: none;
167
+ margin: 0;
168
+ padding: 0;
169
+ background-color: transparent;
170
+ &:focus {
171
+ outline: none;
172
+ }
173
+
174
+ width: 100%;
175
+ /* */
176
+ }
177
+
178
+ .lunatic-combo-box-selected {
179
+ // position: absolute;
180
+ top: 0;
181
+ white-space: nowrap;
182
+ overflow-x: hidden;
183
+ width: 100%;
184
+ height: 100%;
185
+ display: none;
186
+ &.displayed {
187
+ display: block;
188
+ }
189
+
190
+ .placeholder {
191
+ }
192
+ .selection {
193
+ }
194
+ }
195
+ }
196
+
197
+ ul,
198
+ li,
199
+ div,
200
+ span {
201
+ margin: 0;
202
+ padding: 0;
203
+ border: none;
204
+ list-style: none;
205
+ }
206
+
207
+ .lunatic-combo-box-panel {
208
+ &:focus {
209
+ outline: none;
210
+ }
211
+ .lunatic-combo-box-option {
212
+ white-space: nowrap;
213
+ @include preventSelect();
214
+ }
215
+ }
216
+ }
217
+ }
218
+ }
@@ -17,16 +17,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
17
17
 
18
18
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
 
20
- /*
21
- Pour le moment HOC utilisé pour :
22
- Input
23
- InputNumber
24
- DatePicker
25
- Switch
26
- Dropdown
27
- Suggester
28
-
29
-
20
+ /*
21
+ Pour le moment HOC utilisé pour :
22
+ Input
23
+ InputNumber
24
+ DatePicker
25
+ Switch
26
+ Dropdown
27
+ Suggester
28
+
29
+
30
30
  */
31
31
  function getComponent(fieldset) {
32
32
  if (fieldset) {
@@ -1,8 +1,8 @@
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;
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;
8
8
  }