@inseefr/lunatic 3.0.0-rc.1 → 3.0.0-rc.10

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 (185) hide show
  1. package/lib/components/CheckboxBoolean/CheckboxBoolean.js +39 -19
  2. package/lib/components/CheckboxGroup/CheckboxGroup.js +3 -2
  3. package/lib/components/CheckboxGroup/CustomCheckboxGroup.js +4 -5
  4. package/lib/components/CheckboxGroup/CustomCheckboxGroup.spec.js +3 -0
  5. package/lib/components/CheckboxOne/CheckboxOne.js +6 -7
  6. package/lib/components/Datepicker/Datepicker.js +43 -29
  7. package/lib/components/Dropdown/Dropdown.js +37 -37
  8. package/lib/components/Duration/Duration.js +41 -17
  9. package/lib/components/FilterDescription/FilterDescription.js +2 -3
  10. package/lib/components/Input/Input.js +39 -22
  11. package/lib/components/InputNumber/InputNumber.js +45 -35
  12. package/lib/components/InputNumber/__snapshots__/InputNumber.spec.tsx.snap +0 -2
  13. package/lib/components/Loop/Loop.js +52 -29
  14. package/lib/components/LunaticComponents.js +60 -51
  15. package/lib/components/Question/Question.js +23 -14
  16. package/lib/components/Radio/Radio.js +2 -2
  17. package/lib/components/RosterForLoop/RosterForLoop.js +13 -36
  18. package/lib/components/Roundabout/CustomRoundabout.js +2 -2
  19. package/lib/components/Roundabout/Roundabout.js +0 -1
  20. package/lib/components/Roundabout/RoundaboutItButton.js +2 -2
  21. package/lib/components/Roundabout/extra.js +6 -6
  22. package/lib/components/Sequence/Sequence.js +2 -3
  23. package/lib/components/Subsequence/Subsequence.js +2 -2
  24. package/lib/components/Subsequence/Subsequence.spec.js +1 -1
  25. package/lib/components/Suggester/CustomSuggester.js +9 -6
  26. package/lib/components/Suggester/Suggester.js +67 -4
  27. package/lib/components/Suggester/SuggesterNotification.js +2 -2
  28. package/lib/components/Summary/Summary.js +3 -3
  29. package/lib/components/Switch/Switch.js +42 -22
  30. package/lib/components/Textarea/Textarea.js +43 -24
  31. package/lib/components/library.js +0 -2
  32. package/lib/components/shared/Button/Button.js +2 -3
  33. package/lib/components/shared/Button/IconButton.js +0 -1
  34. package/lib/components/shared/Checkbox/CheckboxOption.js +2 -3
  35. package/lib/components/shared/Combobox/Combobox.js +5 -4
  36. package/lib/components/shared/Combobox/ComboboxContainer.js +2 -2
  37. package/lib/components/shared/Combobox/ComboboxContentBox.js +2 -2
  38. package/lib/components/shared/Combobox/Panel/ComboboxOption.js +2 -2
  39. package/lib/components/shared/Combobox/Panel/ComboboxPanelContainer.js +2 -2
  40. package/lib/components/shared/Combobox/Selection/ComboboxClearButton.js +2 -2
  41. package/lib/components/shared/Combobox/Selection/ComboboxInput.js +2 -2
  42. package/lib/components/shared/Combobox/Selection/ComboboxLabelSelection.js +2 -2
  43. package/lib/components/shared/ComponentErrors/ComponentErrors.js +0 -1
  44. package/lib/components/shared/Declarations/Declarations.js +6 -7
  45. package/lib/components/shared/Declarations/Declarations.spec.js +5 -5
  46. package/lib/components/shared/Fieldset/Fieldset.js +2 -3
  47. package/lib/components/shared/HOC/{customizedComponent.js → slottableComponent.js} +35 -13
  48. package/lib/components/shared/Icons/lunatic-icon.js +0 -1
  49. package/lib/components/shared/Label/Label.js +2 -3
  50. package/lib/components/shared/MDLabel/RouterLink.js +2 -2
  51. package/lib/components/shared/Missing/Missing.js +0 -1
  52. package/lib/components/shared/ModalControls/ModalControls.js +0 -1
  53. package/lib/components/shared/Notification.js +2 -2
  54. package/lib/components/shared/Radio/RadioGroup.js +4 -4
  55. package/lib/components/shared/Radio/RadioOption.js +2 -2
  56. package/lib/components/shared/Table/Table.js +2 -3
  57. package/lib/components/shared/Table/Tbody.js +2 -2
  58. package/lib/components/shared/Table/Td.js +2 -2
  59. package/lib/components/shared/Table/Th.js +2 -2
  60. package/lib/components/shared/Table/Thead.js +2 -2
  61. package/lib/components/shared/Table/Tr.js +2 -2
  62. package/lib/components/shared/VariableStatus/VariableStatus.js +0 -1
  63. package/lib/components/shared/suggester-loader-widget/dragger/dragger.js +0 -1
  64. package/lib/components/shared/suggester-loader-widget/widget.js +0 -1
  65. package/lib/css/components/Button.scss +24 -0
  66. package/lib/css/components/CheckboxGroup.scss +13 -0
  67. package/lib/css/components/CheckboxOne.scss +19 -0
  68. package/lib/css/components/CheckboxOption.scss +19 -0
  69. package/lib/css/components/Combobox.scss +206 -0
  70. package/lib/css/components/ComponentErrors.scss +5 -0
  71. package/lib/css/components/Datepicker.scss +19 -0
  72. package/lib/css/components/Declarations.scss +42 -0
  73. package/lib/css/components/Dragger.scss +8 -0
  74. package/lib/css/components/Dropdown.scss +38 -0
  75. package/lib/css/components/Duration.scss +9 -0
  76. package/lib/css/components/Fieldset.scss +5 -0
  77. package/lib/css/components/IconButton.scss +38 -0
  78. package/lib/css/components/Input.scss +42 -0
  79. package/lib/css/components/InputNumber.scss +11 -0
  80. package/lib/css/components/Label.scss +6 -0
  81. package/lib/css/components/Missing.scss +27 -0
  82. package/lib/css/components/ModalControls.scss +48 -0
  83. package/lib/css/components/RadioGroup.scss +21 -0
  84. package/lib/css/components/RosterForLoop.scss +39 -0
  85. package/lib/css/components/Roundabout.scss +13 -0
  86. package/lib/css/components/Sequence.scss +10 -0
  87. package/lib/css/components/Suggester.scss +170 -0
  88. package/lib/css/components/SuggesterWidget.scss +176 -0
  89. package/lib/css/components/Table.scss +27 -0
  90. package/lib/css/components/Textarea.scss +8 -0
  91. package/lib/css/components/VariableStatus.scss +36 -0
  92. package/lib/css/main.scss +181 -0
  93. package/lib/hooks/useSuggesterInfo.js +14 -12
  94. package/lib/main.css +1063 -0
  95. package/lib/main.css.map +1 -0
  96. package/lib/src/components/CheckboxBoolean/CheckboxBoolean.d.ts +10 -5
  97. package/lib/src/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  98. package/lib/src/components/CheckboxOne/CheckboxOne.d.ts +5 -12
  99. package/lib/src/components/Datepicker/Datepicker.d.ts +8 -10
  100. package/lib/src/components/Dropdown/Dropdown.d.ts +9 -12
  101. package/lib/src/components/Duration/Duration.d.ts +9 -7
  102. package/lib/src/components/FilterDescription/FilterDescription.d.ts +1 -1
  103. package/lib/src/components/Input/Input.d.ts +9 -8
  104. package/lib/src/components/InputNumber/InputNumber.d.ts +9 -10
  105. package/lib/src/components/Loop/Loop.d.ts +11 -18
  106. package/lib/src/components/LunaticComponents.d.ts +4 -2
  107. package/lib/src/components/Question/Question.d.ts +6 -4
  108. package/lib/src/components/RosterForLoop/RosterForLoop.d.ts +2 -22
  109. package/lib/src/components/Roundabout/Roundabout.d.ts +0 -1
  110. package/lib/src/components/Sequence/Sequence.d.ts +1 -2
  111. package/lib/src/components/Subsequence/Subsequence.d.ts +1 -1
  112. package/lib/src/components/Suggester/CustomSuggester.d.ts +7 -3
  113. package/lib/src/components/Suggester/Suggester.d.ts +1 -2
  114. package/lib/src/components/Suggester/SuggesterType.d.ts +6 -0
  115. package/lib/src/components/Suggester/helpers.d.ts +2 -2
  116. package/lib/src/components/Switch/Switch.d.ts +9 -0
  117. package/lib/src/components/Textarea/Textarea.d.ts +9 -10
  118. package/lib/src/components/library.d.ts +26 -93
  119. package/lib/src/components/shared/Button/Button.d.ts +0 -1
  120. package/lib/src/components/shared/Button/IconButton.d.ts +0 -1
  121. package/lib/src/components/shared/Checkbox/CheckboxOption.d.ts +0 -1
  122. package/lib/src/components/shared/Combobox/Combobox.d.ts +1 -1
  123. package/lib/src/components/shared/ComponentErrors/ComponentErrors.d.ts +0 -1
  124. package/lib/src/components/shared/Declarations/Declarations.d.ts +2 -3
  125. package/lib/src/components/shared/Fieldset/Fieldset.d.ts +0 -1
  126. package/lib/src/components/shared/HOC/slottableComponent.d.ts +105 -0
  127. package/lib/src/components/shared/Icons/lunatic-icon.d.ts +0 -1
  128. package/lib/src/components/shared/Label/Label.d.ts +0 -1
  129. package/lib/src/components/shared/Missing/Missing.d.ts +0 -1
  130. package/lib/src/components/shared/ModalControls/ModalControls.d.ts +0 -1
  131. package/lib/src/components/shared/Radio/RadioGroup.d.ts +1 -1
  132. package/lib/src/components/shared/Table/Table.d.ts +0 -1
  133. package/lib/src/components/shared/VariableStatus/VariableStatus.d.ts +0 -1
  134. package/lib/src/components/shared/suggester-loader-widget/dragger/dragger.d.ts +0 -1
  135. package/lib/src/components/shared/suggester-loader-widget/widget.d.ts +0 -1
  136. package/lib/src/components/type.d.ts +7 -7
  137. package/lib/src/hooks/use-track-changes.d.ts +9 -1
  138. package/lib/src/hooks/useSuggesterInfo.d.ts +1 -1
  139. package/lib/src/index.d.ts +1 -1
  140. package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +106 -59
  141. package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +87 -58
  142. package/lib/src/use-lunatic/commons/fill-components/fill-iterations.d.ts +47 -38
  143. package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +159 -87
  144. package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -1
  145. package/lib/src/use-lunatic/lunatic-context.d.ts +1 -4
  146. package/lib/src/use-lunatic/replace-component-sequence.d.ts +23 -5
  147. package/lib/src/use-lunatic/type-source.d.ts +55 -46
  148. package/lib/src/use-lunatic/type.d.ts +4 -4
  149. package/lib/src/use-lunatic/use-lunatic.d.ts +63 -32
  150. package/lib/src/utils/variables.d.ts +10 -2
  151. package/lib/stories/{component-set/component-set.stories.js → behaviour/slots.stories.js} +36 -25
  152. package/lib/stories/checkbox-group/checkbox-group.stories.js +1 -6
  153. package/lib/stories/disabled/source.json +1 -1
  154. package/lib/stories/loop/source-roster.json +2 -2
  155. package/lib/stories/pairwise/pairwise-links.stories.js +1 -9
  156. package/lib/stories/suggester/fakeReferentiel.json +12 -0
  157. package/lib/stories/suggester/source-option-responses.json +145 -0
  158. package/lib/stories/suggester/suggester.stories.js +45 -7
  159. package/lib/stories/utils/orchestrator.js +4 -4
  160. package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +0 -1
  161. package/lib/use-lunatic/lunatic-context.js +2 -10
  162. package/lib/use-lunatic/replace-component-sequence.js +2 -3
  163. package/lib/use-lunatic/use-lunatic.js +1 -4
  164. package/lib/use-lunatic/use-lunatic.test.js +12 -37
  165. package/package.json +2 -2
  166. package/lib/components/ComponentSet/ComponentSet.js +0 -68
  167. package/lib/components/Dropdown/DropdownWritable.js +0 -58
  168. package/lib/components/Dropdown/renderer/WritableLabelRenderer.js +0 -38
  169. package/lib/components/Dropdown/renderer/WritableOptionRenderer.js +0 -140
  170. package/lib/src/components/ComponentSet/ComponentSet.d.ts +0 -7
  171. package/lib/src/components/Dropdown/DropdownWritable.d.ts +0 -17
  172. package/lib/src/components/Dropdown/renderer/WritableLabelRenderer.d.ts +0 -8
  173. package/lib/src/components/Dropdown/renderer/WritableOptionRenderer.d.ts +0 -8
  174. package/lib/src/components/shared/HOC/customizedComponent.d.ts +0 -5
  175. package/lib/src/components/type-custom.d.ts +0 -101
  176. package/lib/stories/checkbox-group/sourceComponentset.json +0 -424
  177. package/lib/stories/component-set/data-loop.json +0 -18
  178. package/lib/stories/component-set/data-roundabout.json +0 -25
  179. package/lib/stories/component-set/data.json +0 -25
  180. package/lib/stories/component-set/source-loop.json +0 -308
  181. package/lib/stories/component-set/source-roundabout.json +0 -434
  182. package/lib/stories/component-set/source.json +0 -113
  183. package/lib/stories/pairwise/source-componentset.json +0 -292
  184. package/lib/stories/suggester/source-component-set.json +0 -113
  185. /package/lib/components/{type-custom.js → Suggester/SuggesterType.js} +0 -0
@@ -14,7 +14,6 @@ var _Icons = require("../Icons");
14
14
  var _loaderRow = _interopRequireDefault(require("./loader-row"));
15
15
  var _tools = require("./tools");
16
16
  var _widgetContainer = _interopRequireDefault(require("./widget-container"));
17
- require("./widget.scss");
18
17
  var _jsxRuntime = require("react/jsx-runtime");
19
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
19
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -0,0 +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
+ }
@@ -0,0 +1,13 @@
1
+
2
+ .lunatic-checkbox-group {
3
+ legend {
4
+ .label-description {
5
+ font-weight: lighter;
6
+ display: block;
7
+ }
8
+ }
9
+ .lunatic-checkbox-group-option {
10
+ display: flex;
11
+ font-size: 13px;
12
+ }
13
+ }
@@ -0,0 +1,19 @@
1
+ .lunatic-checkbox-one {
2
+ legend {
3
+ .label-description {
4
+ font-weight: lighter;
5
+ }
6
+ }
7
+ .lunatic-input-radio {
8
+ display: flex;
9
+
10
+ label {
11
+ display: flex;
12
+ gap:0.5em;
13
+ align-items: center;
14
+ .label-description {
15
+ font-weight: lighter;
16
+ }
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ .checkbox-modality {
2
+ .lunatic-input-checkbox {
3
+ display: flex;
4
+ .label-description {
5
+ font-weight: lighter;
6
+ }
7
+
8
+ .lunatic-label {
9
+ font-weight: normal;
10
+ display: flex;
11
+ gap: 0.5em;
12
+ align-items: center;
13
+ }
14
+ }
15
+ }
16
+ .lunatic-checkbox-label {
17
+ gap: 0.5em;
18
+ align-items: center;
19
+ }
@@ -0,0 +1,206 @@
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
+ .lunatic-combo-box-content {
42
+ .lunatic-combo-box-selection {
43
+ border-radius: 5px;
44
+ border: 2px solid var(--color-primary-dark);
45
+ background-color: var(--color-combo-box-background);
46
+ &:hover {
47
+ border-color: var(--color-primary-main);
48
+ }
49
+ .lunatic-combo-box-input {
50
+ height: 34px;
51
+ line-height: 34px;
52
+ font-size: 15px;
53
+ padding-left: 4px;
54
+ @include selection();
55
+
56
+ &::placeholder {
57
+ @include placeholder();
58
+ }
59
+ }
60
+
61
+ .lunatic-combo-box-selected {
62
+ height: 42px;
63
+ line-height: 34px;
64
+ background-color: var(--color-combo-box-background);
65
+ border-radius: 5px;
66
+ padding-left: 4px;
67
+ @include selection();
68
+ outline: none;
69
+ overflow-y: hidden;
70
+ display: block;
71
+ @include placeholder();
72
+
73
+ .selection {
74
+ display: inline-block;
75
+ line-height: 34px;
76
+ font-size: 15px;
77
+ }
78
+
79
+ &.disabled {
80
+ background-color: var(--color-disabled);
81
+ }
82
+ }
83
+ }
84
+
85
+ .lunatic-combo-box-panel {
86
+ @include defaultFont();
87
+ height: 0;
88
+ opacity: 0;
89
+ background-color: var(--color-combo-box-background);
90
+ transition: opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
91
+ transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
92
+
93
+ &.expanded {
94
+ border: solid 1px var(--color-primary-light);
95
+ opacity: 1;
96
+ min-height: 30px;
97
+ height: max-content;
98
+ box-shadow: 0 2px 2px grey;
99
+ border-radius: 4px;
100
+ }
101
+ .lunatic-combo-box-option {
102
+ text-overflow: ellipsis;
103
+ white-space: nowrap;
104
+ overflow: hidden;
105
+ margin-bottom: 0.1em;
106
+ line-height: 2rem;
107
+ display: block;
108
+
109
+ &.selected {
110
+ color: var(--color-primary-dark);
111
+ background-color: var(--color-combo-box-selected);
112
+ }
113
+ &:hover {
114
+ background-color: var(--color-primary-main);
115
+ color: var(--color-combo-box-background);
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+
123
+ .lunatic-combo-box-fab {
124
+ position: absolute;
125
+ right: 4px;
126
+ top: 8px;
127
+ z-index: 0;
128
+ &.focused {
129
+ z-index: 1;
130
+ }
131
+
132
+ .lunatic-icon {
133
+ svg {
134
+ fill: white;
135
+ width: 16px;
136
+ height: 16px;
137
+ margin: auto;
138
+ }
139
+ }
140
+ }
141
+
142
+ .lunatic-combo-box {
143
+ position: relative;
144
+ z-index: 0;
145
+
146
+ &:focus {
147
+ outline: none;
148
+ }
149
+
150
+ &.focused {
151
+ z-index: 1;
152
+ }
153
+
154
+ .lunatic-combo-box-content {
155
+ position: absolute;
156
+ width: 100%;
157
+
158
+ .lunatic-combo-box-selection {
159
+ position: relative;
160
+ .lunatic-combo-box-input {
161
+ border: none;
162
+ margin: 0;
163
+ padding: 0;
164
+ background-color: transparent;
165
+ &:focus {
166
+ outline: none;
167
+ }
168
+
169
+ width: 100%;
170
+ }
171
+
172
+ .lunatic-combo-box-selected {
173
+ // position: absolute;
174
+ top: 0;
175
+ white-space: nowrap;
176
+ overflow-x: hidden;
177
+ width: 100%;
178
+ display: none;
179
+ &.displayed {
180
+ display: block;
181
+ }
182
+ }
183
+ }
184
+
185
+ ul,
186
+ li,
187
+ div,
188
+ span {
189
+ margin: 0;
190
+ padding: 0;
191
+ border: none;
192
+ list-style: none;
193
+ }
194
+
195
+ .lunatic-combo-box-panel {
196
+ &:focus {
197
+ outline: none;
198
+ }
199
+ .lunatic-combo-box-option {
200
+ white-space: nowrap;
201
+ @include preventSelect();
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
@@ -0,0 +1,5 @@
1
+ .lunatic-errors {
2
+ .lunatic-error {
3
+ color: red;
4
+ }
5
+ }
@@ -0,0 +1,19 @@
1
+ .lunaticDatepickerFields {
2
+ display: flex;
3
+ align-items: flex-end;
4
+ gap: 1rem;
5
+ }
6
+
7
+ .lunaticDatepickerField input {
8
+ width: 3.5em;
9
+ }
10
+
11
+ .lunaticDatepickerFieldLarge input {
12
+ width: 4.5em;
13
+ }
14
+
15
+ .lunaticDatepickerHint {
16
+ display: block;
17
+ font-weight: 400;
18
+ font-size: .9em;
19
+ }
@@ -0,0 +1,42 @@
1
+ .lunatic-component {
2
+ .lunatic-declarations {
3
+ margin-bottom: 0.4rem;
4
+ }
5
+
6
+ .declaration-instruction {
7
+ font-style: italic;
8
+ font-size: 80%;
9
+ }
10
+
11
+ .declaration-statement {
12
+ font-style: italic;
13
+ font-size: 80%;
14
+ color: blue;
15
+ }
16
+
17
+ .declaration-help {
18
+ font-style: italic;
19
+ font-size: 80%;
20
+ color: green;
21
+ }
22
+
23
+ .CODECARD {
24
+ font-style: bold;
25
+ font-size: 80%;
26
+ color: grey;
27
+ border: solid 1px grey;
28
+ width: fit-content;
29
+ padding: 1em;
30
+ &:before {
31
+ content: "→ "
32
+ }
33
+ }
34
+
35
+ .declaration-message_filter {
36
+ font-size: 100%;
37
+ color: rgb(73, 66, 66);
38
+ &:before {
39
+ content: '→ ';
40
+ }
41
+ }
42
+ }
@@ -0,0 +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;
8
+ }
@@ -0,0 +1,38 @@
1
+ @mixin defaultFont {
2
+ font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
3
+ }
4
+
5
+ @mixin disableSelect {
6
+ -moz-user-select: none; /* Firefox */
7
+ -ms-user-select: none; /* Internet Explorer */
8
+ -khtml-user-select: none; /* KHTML browsers (e.g. Konqueror) */
9
+ -webkit-user-select: none; /* Chrome, Safari, and Opera */
10
+ -webkit-touch-callout: none; /* Disable Android and iOS callouts*/
11
+ }
12
+
13
+ .lunatic-component {
14
+ .lunatic-dropdown {
15
+ .lunatic-dropdown-option {
16
+ text-overflow: ellipsis;
17
+ white-space: nowrap;
18
+ overflow: hidden;
19
+ margin-bottom: 0.1em;
20
+ line-height: 2rem;
21
+ display: block;
22
+
23
+ &.selected {
24
+ color: var(--color-primary-dark);
25
+ background-color: goldenrod;
26
+ }
27
+
28
+ &:hover {
29
+ background-color: var(--color-primary-main);
30
+ color: white;
31
+ }
32
+
33
+ .prefix {
34
+ color: red;
35
+ }
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,9 @@
1
+ .duration-fields,
2
+ .duration-field {
3
+ display: flex;
4
+ align-items: center;
5
+ gap: 1rem;
6
+ }
7
+ .duration-field {
8
+ gap: .5rem;
9
+ }
@@ -0,0 +1,5 @@
1
+ fieldset {
2
+ border: 0;
3
+ margin: 0;
4
+ padding: 0;
5
+ }
@@ -0,0 +1,38 @@
1
+ .lunatic-icon {
2
+ display: flex;
3
+ align-items: center;
4
+ }
5
+
6
+ // floating action button
7
+ .lunatic-fab {
8
+ width: 32px;
9
+ height: 32px;
10
+ border-radius: 50%;
11
+ margin: 0;
12
+ padding: 0;
13
+ outline: inherit;
14
+ border: none;
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%);
18
+
19
+ &:hover {
20
+ cursor: pointer;
21
+ background-color: navy;
22
+ transition: background-color 1s;
23
+ }
24
+
25
+ &.mini {
26
+ width: 18px;
27
+ height: 18px;
28
+ }
29
+
30
+ &:focus {
31
+ border: solid 1px black;
32
+ }
33
+
34
+ &:disabled {
35
+ cursor: default;
36
+ background-color: darkgray;
37
+ }
38
+ }
@@ -0,0 +1,42 @@
1
+ .lunatic-component {
2
+ .lunatic-input,
3
+ .lunatic-datepicker,
4
+ .lunatic-textarea,
5
+ .lunatic-input-number {
6
+ label {
7
+ font-size: 12px;
8
+ .label-description {
9
+ font-size: 12px;
10
+ font-weight: lighter;
11
+ display: block;
12
+ }
13
+ }
14
+ input {
15
+ font: inherit;
16
+ border: 0;
17
+ border-bottom: 0.125rem double rgba(0, 0, 0, 0.42);
18
+ margin: 0;
19
+ padding: 0.375rem 0 0.375rem 0.4375rem;
20
+ display: inline-block;
21
+ min-width: 0;
22
+ box-sizing: content-box;
23
+ background: none;
24
+ &:focus {
25
+ outline: none;
26
+ border-bottom: 0.125rem solid var(--color-primary-main);
27
+ }
28
+ &:hover {
29
+ border-bottom: 0.125rem solid black;
30
+ }
31
+ &:read-only {
32
+ background-color: var(--color-disabled);
33
+ }
34
+ }
35
+
36
+ .warning {
37
+ box-sizing: border-box;
38
+ border: solid 2px var(--color-error);
39
+ background-color: var(--color-error);
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,11 @@
1
+ // see input.scss
2
+
3
+ .lunatic-component {
4
+ .lunatic-input-number {
5
+ display: inline-block;
6
+
7
+ .label-description {
8
+ display: block;
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,6 @@
1
+ .lunatic-label {
2
+ .label-description {
3
+ font-weight: lighter;
4
+ display: block;
5
+ }
6
+ }
@@ -0,0 +1,27 @@
1
+ .missing-buttons {
2
+ margin-top: 1em;
3
+ }
4
+ .missing-buttons .button-lunatic {
5
+ width: 4em;
6
+ font-size: 1em;
7
+ font-weight: normal;
8
+ }
9
+ .missing-buttons .button-lunatic {
10
+ background-color: var(--color-very-very-light);
11
+ color: var(--color-primary-dark);
12
+ }
13
+ .missing-buttons .button-lunatic:not(:disabled):hover {
14
+ background-color: white;
15
+ color: var(--color-primary-main);
16
+ }
17
+ .missing-buttons .button-lunatic:disabled {
18
+ opacity: .5;
19
+ }
20
+ .missing-button-active .button-lunatic {
21
+ background-color: var(--color-primary-dark);
22
+ color: var(--color-very-very-light);
23
+ }
24
+ .missing-buttons .missing-button-active .button-lunatic:hover {
25
+ background-color: var(--color-primary-main);
26
+ color: white;
27
+ }
@@ -0,0 +1,48 @@
1
+ .lunatic-modal-controls {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ background-color: rgba(50, 50, 50, 0.5);
8
+ z-index: 101;
9
+
10
+ .modal-content {
11
+ background-color: snow;
12
+ height: fit-content;
13
+ width: 50%;
14
+ margin: auto;
15
+ margin-top: 38vh;
16
+ display: flex;
17
+ flex-direction: column;
18
+ border-radius: 8px;
19
+ overflow-wrap: break-word;
20
+ .body {
21
+ color: black;
22
+ font-size: 16px;
23
+ font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
24
+ }
25
+
26
+ .modal-buttons {
27
+ align-self: end;
28
+ margin: 0 0.2em 0.2em 0;
29
+ :first-child {
30
+ margin-right: 0.5em;
31
+ }
32
+ }
33
+ }
34
+
35
+ .errors {
36
+ ul,
37
+ li,
38
+ div,
39
+ span {
40
+ border: none;
41
+ list-style: none;
42
+ }
43
+ }
44
+ ul {
45
+ margin: 1em;
46
+ padding: 0;
47
+ }
48
+ }
@@ -0,0 +1,21 @@
1
+ .lunatic-radio-group {
2
+ legend {
3
+ .label-description {
4
+ font-weight: lighter;
5
+ }
6
+ }
7
+ .lunatic-input-radio {
8
+ display: flex;
9
+
10
+ .label-description {
11
+ font-weight: lighter;
12
+ }
13
+
14
+ .lunatic-label {
15
+ font-weight: normal;
16
+ display: flex;
17
+ align-items: center;
18
+ gap: 0.5em;
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,39 @@
1
+ // .lunatic-component {
2
+ // .table-lunatic {
3
+ // table-layout: fixed;
4
+ // border-collapse: collapse;
5
+ // margin-top: 0.3em;
6
+ // margin-bottom: 0.3em;
7
+ // & td,
8
+ // th {
9
+ // border: 0.15em solid var(--color-primary-dark);
10
+ // padding: 0.2em;
11
+ // }
12
+ // & td {
13
+ // .field,
14
+ // .field-with-tooltip {
15
+ // display: flex;
16
+ // justify-content: center;
17
+ // align-items: center;
18
+ // }
19
+ // }
20
+ // }
21
+
22
+ // .table-lunatic .tooltip-lunatic img {
23
+ // height: 20px;
24
+ // width: 20px;
25
+ // }
26
+ // }
27
+
28
+ .lunatic-table {
29
+ table-layout: fixed;
30
+ border-collapse: collapse;
31
+ margin-top: 0.3em;
32
+ margin-bottom: 0.3em;
33
+ .lunatic-table-thead {
34
+ .lunatic-table-th {
35
+ border: 0.15em solid var(--color-primary-dark);
36
+ padding: 0.2em;
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,13 @@
1
+ .lunatic-roundabout {
2
+ background-color: transparent;
3
+
4
+ .roundabout-it-button {
5
+ &.complete {
6
+ background-color: lightgreen;
7
+ }
8
+
9
+ &.partial {
10
+ background-color: cornflowerblue;
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,10 @@
1
+ .lunatic-component {
2
+ .sequence-lunatic {
3
+ padding: 0;
4
+ font-size: 0.875rem;
5
+ color: var(--color-primary-light);
6
+ background-color: var(--color-secondary-contrast-text);
7
+ border: 0;
8
+ height: 1.875rem;
9
+ }
10
+ }