5htp-core 0.5.9 → 0.6.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 (63) hide show
  1. package/client/app/component.tsx +1 -0
  2. package/client/assets/css/colors.less +244 -0
  3. package/client/assets/css/components/button.less +27 -9
  4. package/client/assets/css/components/card.less +24 -0
  5. package/client/assets/css/components/input.less +0 -4
  6. package/client/assets/css/components/mantine.less +11 -0
  7. package/client/assets/css/components/other.less +1 -0
  8. package/client/assets/css/components/progressbar.less +45 -0
  9. package/client/assets/css/components/table.less +8 -12
  10. package/client/assets/css/components.less +1 -0
  11. package/client/assets/css/core.less +6 -4
  12. package/client/assets/css/text/text.less +0 -9
  13. package/client/assets/css/theme.less +10 -0
  14. package/client/assets/css/utils/layouts.less +8 -4
  15. package/client/assets/css/utils/sizing.less +2 -0
  16. package/client/components/Card/index.tsx +1 -2
  17. package/client/components/Checkbox.tsx +2 -1
  18. package/client/components/DropDown.tsx +11 -5
  19. package/client/components/Input.tsx +1 -0
  20. package/client/components/Rte/ToolbarPlugin/BlockFormat.tsx +1 -1
  21. package/client/components/Rte/ToolbarPlugin/ElementFormat.tsx +5 -3
  22. package/client/components/Rte/ToolbarPlugin/index.tsx +4 -4
  23. package/client/components/Select.tsx +95 -69
  24. package/client/components/Table/index.tsx +34 -23
  25. package/client/components/containers/Popover/index.tsx +1 -1
  26. package/client/components/containers/Popover/popover.less +1 -1
  27. package/client/components/index.ts +3 -2
  28. package/client/components/utils.tsx +5 -5
  29. package/client/index.ts +1 -0
  30. package/client/services/router/components/router.tsx +0 -1
  31. package/client/services/router/index.tsx +1 -2
  32. package/client/services/router/request/api.ts +4 -4
  33. package/common/errors/index.tsx +6 -0
  34. package/common/router/index.ts +8 -2
  35. package/package.json +1 -2
  36. package/server/app/commands.ts +2 -21
  37. package/server/app/container/console/index.ts +1 -6
  38. package/server/app/container/index.ts +0 -2
  39. package/server/app/index.ts +88 -22
  40. package/server/app/service/index.ts +30 -35
  41. package/server/services/auth/index.ts +15 -17
  42. package/server/services/auth/old.ts +1 -1
  43. package/server/services/auth/router/index.ts +24 -12
  44. package/server/services/cache/index.ts +5 -16
  45. package/server/services/cron/index.ts +2 -9
  46. package/server/services/database/index.ts +5 -10
  47. package/server/services/database/stats.ts +0 -2
  48. package/server/services/disks/driver.ts +1 -1
  49. package/server/services/disks/drivers/s3/index.ts +4 -8
  50. package/server/services/disks/index.ts +10 -9
  51. package/server/services/email/index.ts +5 -2
  52. package/server/services/email/transporter.ts +1 -21
  53. package/server/services/fetch/index.ts +9 -11
  54. package/server/services/fetch/service.json +2 -1
  55. package/server/services/prisma/index.ts +1 -14
  56. package/server/services/router/index.ts +28 -53
  57. package/server/services/router/request/api.ts +2 -7
  58. package/server/services/router/service.ts +5 -17
  59. package/server/services/security/encrypt/aes/index.ts +1 -1
  60. package/server/services/socket/index.ts +11 -19
  61. package/types/global/utils.d.ts +44 -1
  62. package/types/icons.d.ts +1 -1
  63. package/server/app/container/patch.ts +0 -15
@@ -69,6 +69,7 @@ export default function App({ context }: {
69
69
  SegmentedControl: { defaultProps: { size: 'md' } },
70
70
  Menu: { defaultProps: { size: 'md' } },
71
71
  MenuItem: { defaultProps: { size: 'md' } },
72
+ Autocomplete: { defaultProps: { size: 'md' } },
72
73
  // Add any others you use...
73
74
  },
74
75
  }} withGlobalStyles withNormalizeCSS>
@@ -0,0 +1,244 @@
1
+ @import (reference) '@/client/assets/vars.less';
2
+
3
+ /*----------------------------------
4
+ - BASIC THEMES
5
+ ----------------------------------*/
6
+
7
+ @whiteTheme: {
8
+ alpha: false;
9
+ background: #FFF;
10
+ foreground: #555;
11
+ accent1: @c1;
12
+ accent2: @c2;
13
+ }
14
+
15
+ @greyTheme: {
16
+ alpha: false;
17
+ background: #F3F3F3;
18
+ foreground: #4D4D4D;
19
+ accent1: @c1;
20
+ accent2: @c2;
21
+ }
22
+
23
+ @silverTheme: {
24
+ alpha: false;
25
+ background: @cBgPage - #080808;
26
+ foreground: #777;
27
+ accent1: @c1;
28
+ accent2: @c2;
29
+ }
30
+
31
+ @darkTheme: {
32
+ alpha: false;
33
+ background: #000;
34
+ foreground: #DDD;
35
+ accent1: #83B2FF;
36
+ accent2: @c2;
37
+ }
38
+
39
+ @darkerTheme: {
40
+ alpha: false;
41
+ background: #181818;
42
+ foreground: #bbb;
43
+ accent1: #fff;
44
+ accent2: @c2;
45
+ }
46
+
47
+ @darkestTheme: {
48
+ alpha: false;
49
+ background: #242424;
50
+ foreground: #ddd;
51
+ accent1: #fff;
52
+ accent2: @c2;
53
+ }
54
+
55
+ /*----------------------------------
56
+ - COLOR THEMES
57
+ ----------------------------------*/
58
+
59
+ @primaryTheme: {
60
+ alpha: false;
61
+ background: #111;
62
+ foreground: #fff;
63
+ accent1: #FFF;
64
+ accent2: #FFF;
65
+ }
66
+
67
+ /*@accentTheme: {
68
+ alpha: false;
69
+ background: @c1;
70
+ foreground: #fff;
71
+ accent1: #fff;
72
+ accent2: #fff;;
73
+ }*/
74
+
75
+
76
+
77
+ @accentTheme: {
78
+ alpha: false;
79
+ background: #EAE8F9;
80
+ foreground: @c1 - #444;
81
+ accent1: #fff;
82
+ accent2: #fff;;
83
+ }
84
+
85
+ .bg.primary {
86
+
87
+ .apply-theme(@primaryTheme);
88
+ }
89
+
90
+ .bg.accent,
91
+ .btn.bg.col.active {
92
+ .apply-theme(@accentTheme);
93
+ }
94
+
95
+ .bg.grey {
96
+ .apply-theme(@greyTheme, @whiteTheme);
97
+ }
98
+
99
+ .card,
100
+ .bg.white {
101
+ .apply-theme(@whiteTheme, @greyTheme);
102
+ }
103
+
104
+ .bg.silver {
105
+ .apply-theme(@silverTheme, @whiteTheme);
106
+
107
+ box-shadow: inset 0 0 20px fade(#000, 5%)
108
+ }
109
+
110
+ .bg.dark {
111
+ .apply-theme(@darkTheme, @darkerTheme);
112
+ }
113
+
114
+ .bg.darker {
115
+ .apply-theme(@darkerTheme, @darkestTheme);
116
+ }
117
+
118
+ /*----------------------------------
119
+ - GRADIENT & IMG THEMES
120
+ ----------------------------------*/
121
+
122
+ .bg.img {
123
+
124
+ .apply-theme({
125
+ alpha: true;
126
+ background: #000;
127
+ foreground: fade(#fff, 60%);
128
+ accent1: #fff;
129
+ accent2: green;
130
+ }, @whiteTheme);
131
+ }
132
+
133
+ .card:not(.bg), .card.bg.white {
134
+ border: 1px solid var(--cLine);
135
+ }
136
+
137
+ .bg.color1 { .color-theme(#0066ff ); }
138
+ .bg.color2 { .color-theme(#00e6da ); }
139
+ .bg.color3 { .color-theme(#00e417 ); }
140
+ .bg.color4 { .color-theme(#ffb700 ); }
141
+ .bg.color5 { .color-theme(#eb4a00 ); }
142
+ .bg.color6 { .color-theme(#e500ac ); }
143
+ .bg.color7 { .color-theme(#6200ff ); }
144
+
145
+ .bg.light1 { .color-theme(#cce0fe ); }
146
+ .bg.light2 { .color-theme(#c7f0ee ); }
147
+ .bg.light3 { .color-theme(#cef5d2 ); }
148
+ .bg.light4 { .color-theme(#feeab6 ); }
149
+ .bg.light5 { .color-theme(#ffdccc ); }
150
+ .bg.light6 { .color-theme(#fcccf0 ); }
151
+ .bg.light7 { .color-theme(#e2d5f7 ); }
152
+
153
+ .bg.success {
154
+ box-shadow: none;
155
+ border: none;
156
+
157
+ .apply-theme({
158
+ alpha: false;
159
+ background: #D7FEEE;
160
+ foreground: darken( #D7FEEE, 80% );
161
+ accent1: #111;
162
+ accent2: #111;
163
+ });
164
+
165
+ &.light {
166
+ .apply-theme({
167
+ alpha: false;
168
+ background: lighten( @cSuccess, 40% );
169
+ foreground: darken( @cSuccess, 50% );
170
+ accent1: #111;
171
+ accent2: #111;
172
+ });
173
+ }
174
+ }
175
+
176
+ .bg.error {
177
+ box-shadow: none;
178
+ border: none;
179
+
180
+ .apply-theme({
181
+ alpha: false;
182
+ background: lighten( @cError, 20% );
183
+ foreground: darken( @cError, 50% );
184
+ accent1: #111;
185
+ accent2: #111;
186
+ });
187
+ }
188
+
189
+ .bg.warn {
190
+ box-shadow: none;
191
+ border: none;
192
+
193
+ .apply-theme({
194
+ alpha: false;
195
+ background: lighten( @cWarn, 20% );
196
+ foreground: darken( @cWarn, 50% );
197
+ accent1: #111;
198
+ accent2: #111;
199
+ });
200
+
201
+ &.light {
202
+ .apply-theme({
203
+ alpha: false;
204
+ background: lighten( @cWarn, 20% );
205
+ foreground: darken( @cWarn, 50% );
206
+ accent1: #111;
207
+ accent2: #111;
208
+ });
209
+ }
210
+ }
211
+
212
+ .bg.info {
213
+ box-shadow: none;
214
+ border: none;
215
+
216
+ .apply-theme({
217
+ alpha: false;
218
+ background: lighten( @cInfo, 50% );
219
+ foreground: darken( @cInfo, 50% );
220
+ accent1: #111;
221
+ accent2: #111;
222
+ });
223
+
224
+ &.light {
225
+ .apply-theme({
226
+ alpha: false;
227
+ background: lighten( @cInfo, 35% );
228
+ foreground: darken( @cInfo, 50% );
229
+ accent1: #111;
230
+ accent2: #111;
231
+ });
232
+ }
233
+ }
234
+
235
+ .fg {
236
+
237
+ &.primary { .build-theme-fg(@c1, #fff); }
238
+
239
+ &.desc { color: var(--cTxtDesc); }
240
+
241
+ &.success { .build-theme-fg( @cSuccess ); }
242
+ &.error { .build-theme-fg( @cError ); }
243
+ &.warn { .build-theme-fg( @cWarn ); }
244
+ }
@@ -18,6 +18,7 @@
18
18
  font-size: 1em;
19
19
  padding: 0 1.5em;
20
20
  height: @sizeComponent;
21
+ min-height: @sizeComponent;
21
22
 
22
23
  // Shape
23
24
  border-radius: @radius;
@@ -159,19 +160,20 @@
159
160
  color: var(--cTxtAccent);
160
161
  }
161
162
 
163
+ &.secondary {
164
+ border: 1px solid var(--cLine);
165
+
166
+ &:hover {
167
+ border-color: var(--cLine2);
168
+ }
169
+ }
170
+
162
171
  /*----------------------------------
163
172
  - STATE
164
173
  ----------------------------------*/
165
174
 
166
175
  cursor: pointer;
167
176
 
168
- &:not(.primary).active {
169
-
170
- &.col {
171
- box-shadow: 0 0 0 0.2em @c2;
172
- }
173
- }
174
-
175
177
  &[disabled] {
176
178
  cursor: default;
177
179
  opacity: 0.5;
@@ -278,7 +280,7 @@
278
280
  &.menu > .btn,
279
281
  &.menu > li > .btn {
280
282
 
281
- > .label {
283
+ &:not(.col) > .label {
282
284
  // All the list items label must be aligned
283
285
  justify-content: flex-start;
284
286
  // Since they're all horizontally aligned,
@@ -288,6 +290,20 @@
288
290
  }
289
291
  }
290
292
 
293
+ .submenu.card {
294
+ animation: aff-submenu 0.1s ease;
295
+ @keyframes aff-submenu {
296
+ 0% {
297
+ opacity: 0;
298
+ transform: scale(0.8);
299
+ }
300
+ 100% {
301
+ opacity: 1;
302
+ transform: scale(1);
303
+ }
304
+ }
305
+ }
306
+
291
307
  ul.col,
292
308
  ul.row {
293
309
 
@@ -322,7 +338,9 @@ ul.col {
322
338
  &.menu > li > .btn {
323
339
 
324
340
  // Align items ver sla gauche
325
- justify-content: flex-start;
341
+ &:not(.col) {
342
+ justify-content: flex-start;
343
+ }
326
344
 
327
345
  // Align all icons by giveing them the same width
328
346
  > i {
@@ -17,6 +17,17 @@
17
17
 
18
18
  background-color: var(--cBg);
19
19
  padding: @cardPadding;
20
+ box-shadow: 0 3px 2px fade(#000, 10%);
21
+ border: 1px solid fade(#000, 10%);
22
+
23
+ &.floating {
24
+ box-shadow: 0 10px 50px fade(black, 15%);
25
+ z-index: 10;
26
+ }
27
+
28
+ &.minimal {
29
+ box-shadow: none;
30
+ }
20
31
 
21
32
  &.row {
22
33
  padding: @cardPadding @cardPaddingLong;
@@ -48,6 +59,15 @@
48
59
  }
49
60
  }
50
61
 
62
+ a&,
63
+ &.clickable {
64
+ text-decoration: none; // Remove a underline
65
+
66
+ &:hover {
67
+ border-color: #aaa;
68
+ }
69
+ }
70
+
51
71
  &.col {
52
72
  padding: @cardPadding @cardPaddingLong;
53
73
 
@@ -92,6 +112,10 @@
92
112
 
93
113
  &.menu {
94
114
  padding: @cardPaddingLong;
115
+
116
+ &.popover {
117
+ padding: @cardPaddingMini;
118
+ }
95
119
  }
96
120
 
97
121
  /*----------------------------------
@@ -49,10 +49,6 @@ form {
49
49
  label {
50
50
  font-weight: 500;
51
51
  color: var(--cTxtBase);
52
-
53
- + p.desc {
54
- margin: 0;
55
- }
56
52
  }
57
53
 
58
54
  .row.champs,
@@ -24,6 +24,17 @@
24
24
  --number-input-height-md: @sizeComponent;
25
25
  }
26
26
 
27
+ .mantine-SegmentedControl-root {
28
+ --segmented-control-height-md: @sizeComponent;
29
+ --mantine-SegmentedControl-height: @sizeComponent;
30
+ }
31
+
32
+ .mantine-TextInput-wrapper textarea {
33
+ --input-line-height: 1.5;
34
+ --input-padding-y: @spacing;
35
+ --input-padding-x: @spacing;
36
+ }
37
+
27
38
 
28
39
 
29
40
  /*----------------------------------
@@ -47,6 +47,7 @@
47
47
 
48
48
  line-height: 1.5;
49
49
  text-align: left;
50
+ white-space: nowrap; // Don't line break in badges
50
51
 
51
52
  padding: 0.4em 0.8em;
52
53
 
@@ -0,0 +1,45 @@
1
+ @import (reference) "@/client/assets/vars.less";
2
+
3
+ div.progressbar {
4
+
5
+ background: var(--cLine);
6
+ position: relative;
7
+
8
+ @hProgress: 0.5rem;
9
+
10
+ &,
11
+ > .progress {
12
+ border-radius: @hProgress / 2rem;
13
+ height: @hProgress;
14
+ }
15
+
16
+ > .progress {
17
+ --cBg: var(--cTxtAccent);
18
+ background: var(--cBg);
19
+ width: 0%;
20
+ max-width: 100%;
21
+ transition: width .25s ease-in;
22
+ }
23
+
24
+ &.col {
25
+
26
+ width: @hProgress * 2rem;
27
+
28
+ &,
29
+ > .progress {
30
+ border-radius: @hProgress;
31
+ }
32
+
33
+ > .progress {
34
+
35
+ width: auto;
36
+ height: 0%;
37
+ max-height: 100%;
38
+
39
+ position: absolute;
40
+ bottom: 0;
41
+ left: 0;
42
+ right: 0;
43
+ }
44
+ }
45
+ }
@@ -1,6 +1,10 @@
1
1
  .table {
2
+
2
3
  overflow: auto;
3
- max-height: 90vh;
4
+
5
+ &.scrollable {
6
+ max-height: 90vh;
7
+ }
4
8
 
5
9
  > table {
6
10
  border-collapse: collapse;
@@ -27,7 +31,6 @@ table {
27
31
 
28
32
  // By default, chrome disables text inherits
29
33
  line-height: inherit;
30
- font-size: 0.9em;
31
34
 
32
35
  th {
33
36
  font-weight: 500;
@@ -37,7 +40,8 @@ table {
37
40
 
38
41
  td, th {
39
42
 
40
- padding: 1em 1em;
43
+ padding: 0.6em 1em;
44
+ font-size: 1rem;
41
45
  text-align: left;
42
46
 
43
47
  &:not(:last-child) {
@@ -74,7 +78,7 @@ table {
74
78
  top: 0;
75
79
  background: var(--cBg);
76
80
  white-space: break-spaces;
77
- z-index: 5;
81
+ z-index: 2;
78
82
  }
79
83
 
80
84
  tbody {
@@ -126,14 +130,6 @@ table {
126
130
  }
127
131
  }
128
132
 
129
- // Size
130
- &.s, .table.s & {
131
- td, th {
132
- padding: 0.7em 1em;
133
- font-size: 1rem;
134
- }
135
- }
136
-
137
133
  // Tableua responsive
138
134
  // Utilisation déconseillée (lauvaise utilisation de l'espace, ergonomie horrible
139
135
  /*@media (max-width: @responsive2) {
@@ -13,6 +13,7 @@
13
13
  @import './components/card.less';
14
14
  @import './components/logo.less';
15
15
  @import './components/table.less';
16
+ @import './components/progressbar.less';
16
17
  @import './components/other.less';
17
18
  @import './components/mantine.less';
18
19
 
@@ -2,8 +2,8 @@
2
2
  @import '@mantine/core/styles.css';
3
3
 
4
4
  // Utils
5
+ @import './colors.less';
5
6
  @import (reference) "./theme.less";
6
-
7
7
  // Apply the theme class
8
8
  .bg {
9
9
  background-color: var(--cBg);
@@ -78,23 +78,25 @@
78
78
  html {
79
79
  font-size: @sTxtPage;
80
80
  line-height: 1.25em;
81
- font-weight: 400;
82
81
  }
83
82
 
84
83
  * {
85
84
  box-sizing: border-box;
86
85
  outline: none;
87
86
  font-size: 1em;
87
+ font-weight: 500;
88
88
  padding: 0;
89
89
  margin: 0;
90
- // Avoids flexbox childrens to overflw parent
91
- min-width: 0;
92
90
 
93
91
  &, &:hover, &:focus {
94
92
  -webkit-tap-highlight-color: transparent;
95
93
  }
96
94
  }
97
95
 
96
+ p {
97
+ font-weight: 400;
98
+ }
99
+
98
100
  body {
99
101
  // Pas propre. A eviter (ex: perturbation smooth scroll
100
102
  //overflow-x: hidden;
@@ -42,15 +42,6 @@ p, .p {
42
42
  margin: 0; // Overwrite browser defaults
43
43
  }
44
44
 
45
- .desc {
46
- font-size: 0.8rem;
47
- color: var(--cTxtDesc);
48
-
49
- i {
50
- height: 1.16rem;
51
- }
52
- }
53
-
54
45
  // Gestion des dépassements
55
46
  //.bouton, // Empêche le label d'être affiché en mode icone only
56
47
  .bouton > .label /* <Select /> */ {
@@ -118,4 +118,14 @@
118
118
  --cTxtAccent: @cAccent;
119
119
 
120
120
  color: var(--cTxtBase);
121
+ }
122
+
123
+ .color-theme( @color ) {
124
+ .apply-theme({
125
+ alpha: false;
126
+ background: @color;
127
+ foreground: #111;
128
+ accent1: #111;
129
+ accent2: #111;
130
+ });
121
131
  }
@@ -134,10 +134,9 @@
134
134
  display: flex;
135
135
  flex-direction: column;
136
136
 
137
- &.scrollable {
138
- > * {
139
- min-height: fit-content;
140
- }
137
+ // Not too precice as it culd override important heights (ex: btn)
138
+ :where(& > *) {
139
+ min-height: fit-content;
141
140
  }
142
141
 
143
142
  // Put this one at first because high possibilities we need to override
@@ -177,6 +176,11 @@
177
176
  .row,
178
177
  .col {
179
178
 
179
+ > * {
180
+ // Avoids flexbox childrens to overflw parent
181
+ min-width: 0;
182
+ }
183
+
180
184
  &.sp-btw { justify-content: space-between; }
181
185
  &.sp-ar { justify-content: space-around; }
182
186
  &.wrap { flex-wrap: wrap; }
@@ -48,6 +48,8 @@
48
48
  // Fixes
49
49
  .w-@{taille1} {
50
50
  width: @taille1 * @sizingUnit !important;
51
+ // Override .scrollable > *, which has a min-width: fit-content
52
+ min-width: 0!important;
51
53
  }
52
54
  .h-@{taille1} {
53
55
  height: @taille1 * @sizingUnit !important;
@@ -7,8 +7,7 @@ import React from 'react';
7
7
  import type { ComponentChild } from 'preact';
8
8
 
9
9
  // Core components
10
- import { Logo } from '@client/components';
11
- import { Link } from '@client/services/router';
10
+ import { Logo, Link } from '@client/components';
12
11
 
13
12
  // Resources
14
13
  import './index.less';
@@ -26,7 +26,7 @@ export default (initProps: Props) => {
26
26
  - INIT
27
27
  ----------------------------------*/
28
28
 
29
- const [{ title }, { errors, required, ...props }] = useMantineInput<Props>(initProps);
29
+ const [{ title, onChange }, { errors, required, ...props }] = useMantineInput<Props>(initProps);
30
30
 
31
31
  /*----------------------------------
32
32
  - RENDER
@@ -37,6 +37,7 @@ export default (initProps: Props) => {
37
37
  error={errors?.join(', ')}
38
38
  required={required}
39
39
  {...props}
40
+ onChange={e => onChange?.(e.target.checked)}
40
41
  />
41
42
  )
42
43
  }
@@ -5,8 +5,8 @@
5
5
  // Npm
6
6
  import React from 'react';
7
7
  import { JSX, ComponentChild } from 'preact';
8
- import { Menu, MenuProps } from '@mantine/core';
9
- import Button, { Props as ButtonProps } from './Button';
8
+ import { Button, Menu, MenuProps } from '@mantine/core';
9
+ import { Props as ButtonProps } from './Button';
10
10
 
11
11
  // Core libs
12
12
  import { useMantineInput, InputBaseProps } from './utils';
@@ -24,12 +24,18 @@ export type Props = ButtonProps & {
24
24
  ----------------------------------*/
25
25
  export default ({
26
26
  label, children,
27
- menuProps = {}, ...btnProps
27
+ menuProps = {}, size, icon, ...btnProps
28
28
  }: Props) => {
29
29
  return (
30
- <Menu {...menuProps}>
30
+ <Menu {...menuProps} size={size}>
31
31
  <Menu.Target>
32
- <Button {...btnProps}>{label}</Button>
32
+ <Button {...btnProps}
33
+ rightSection={<i src="angle-down" />}
34
+ variant="subtle"
35
+ >
36
+ {icon && <i src={icon} />}
37
+ {label}
38
+ </Button>
33
39
  </Menu.Target>
34
40
  <Menu.Dropdown>
35
41
  {children}
@@ -58,6 +58,7 @@ export default (initProps: Props) => {
58
58
  let Component: typeof TextInput | typeof NumberInput | typeof Textarea;
59
59
  if (props.type === 'number') {
60
60
  Component = NumberInput;
61
+ props.min = props.min ?? 0;
61
62
  } else if (props.type === 'longtext' && typeof document !== 'undefined') {
62
63
  Component = Textarea;
63
64
  props.autosize = true;