@onehat/ui 0.4.12 → 0.4.14
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.
- package/package.json +1 -1
- package/src/Components/Buttons/IconButton.js +3 -6
- package/src/Components/Editor/InlineEditor.js +2 -2
- package/src/Components/Form/Field/Color.js +24 -7
- package/src/Components/Form/Field/Combo/Combo.js +14 -27
- package/src/Components/Form/Field/Date.js +29 -30
- package/src/Components/Form/Field/FormikForm.js +2 -2
- package/src/Components/Form/Field/Input.js +3 -7
- package/src/Components/Form/Field/Number.js +0 -4
- package/src/Components/Form/Field/Select/Select.js +1 -4
- package/src/Components/Form/Field/Tag/Tag.js +3 -3
- package/src/Components/Form/Field/Tag/ValueBox.js +5 -3
- package/src/Components/Form/Field/Text.js +1 -1
- package/src/Components/Form/Field/TextArea.js +1 -6
- package/src/Components/Form/Field/Toggle.js +1 -1
- package/src/Components/Form/FieldSet.js +10 -20
- package/src/Components/Form/Form.js +22 -9
- package/src/Components/Form/Label.js +2 -1
- package/src/Components/Grid/GridHeaderRow.js +5 -7
- package/src/Components/Grid/GridRow.js +9 -6
- package/src/Components/Hoc/withFilters.js +1 -1
- package/src/Components/Hoc/withModal.js +2 -2
- package/src/Components/Hoc/withWindowedEditor.js +2 -1
- package/src/Components/Layout/Footer.js +1 -1
- package/src/Components/Panel/Header.js +6 -10
- package/src/Components/Tab/TabBar.js +3 -3
- package/src/Components/Toolbar/Toolbar.js +1 -1
- package/src/Components/Tree/Tree.js +1 -1
- package/src/Components/Tree/TreeNode.js +3 -5
- package/src/Constants/Styles.js +58 -76
- package/src/PlatformImports/Web/File.js +1 -2
package/package.json
CHANGED
|
@@ -14,14 +14,11 @@ const IconButtonElement = forwardRef((props, ref) => {
|
|
|
14
14
|
|
|
15
15
|
let buttonClassName = `
|
|
16
16
|
IconButton
|
|
17
|
-
${styles.ICON_BUTTON_PY}
|
|
18
|
-
${styles.ICON_BUTTON_PX}
|
|
19
|
-
${styles.ICON_BUTTON_BG}
|
|
20
|
-
${styles.ICON_BUTTON_BG_HOVER}
|
|
21
|
-
${styles.ICON_BUTTON_BG_ACTIVE}
|
|
22
|
-
${styles.ICON_BUTTON_BG_DISABLED}
|
|
23
17
|
rounded-md
|
|
24
18
|
self-center
|
|
19
|
+
px-[10px]
|
|
20
|
+
py-[10px]
|
|
21
|
+
${styles.ICON_BUTTON_CLASSNAME}
|
|
25
22
|
`;
|
|
26
23
|
if (props.className) {
|
|
27
24
|
buttonClassName += ' ' + props.className;
|
|
@@ -157,8 +157,8 @@ function InlineEditor(props) {
|
|
|
157
157
|
py-1
|
|
158
158
|
border-t-4
|
|
159
159
|
border-b-4
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
border-t-primary-100
|
|
161
|
+
border-b-primary-100
|
|
162
162
|
`}
|
|
163
163
|
/>
|
|
164
164
|
</VStack>
|
|
@@ -137,7 +137,12 @@ export function ColorElement(props) {
|
|
|
137
137
|
assembledComponents =
|
|
138
138
|
<HStackNative
|
|
139
139
|
onLayout={() => setIsRendered(true)}
|
|
140
|
-
className=
|
|
140
|
+
className={`
|
|
141
|
+
ColorElement-HStackNative
|
|
142
|
+
flex-1
|
|
143
|
+
h-full
|
|
144
|
+
items-center
|
|
145
|
+
`}
|
|
141
146
|
>
|
|
142
147
|
<Pressable
|
|
143
148
|
ref={triggerRef}
|
|
@@ -147,7 +152,14 @@ export function ColorElement(props) {
|
|
|
147
152
|
borderBottomLeftRadius={6}
|
|
148
153
|
borderTopRightRadius={0}
|
|
149
154
|
borderBottomRightRadius={0}
|
|
150
|
-
className={`
|
|
155
|
+
className={`
|
|
156
|
+
ColorElement-Pressable
|
|
157
|
+
bg-${value}
|
|
158
|
+
h-[10px]
|
|
159
|
+
w-[10px]
|
|
160
|
+
border
|
|
161
|
+
border-grey-300
|
|
162
|
+
`}
|
|
151
163
|
/>
|
|
152
164
|
<Input
|
|
153
165
|
ref={inputRef}
|
|
@@ -157,6 +169,7 @@ export function ColorElement(props) {
|
|
|
157
169
|
onBlur={onInputBlur}
|
|
158
170
|
onClick={onInputClick}
|
|
159
171
|
className={`
|
|
172
|
+
ColorElement-Input
|
|
160
173
|
flex-1
|
|
161
174
|
h-full
|
|
162
175
|
p-2
|
|
@@ -167,9 +180,7 @@ export function ColorElement(props) {
|
|
|
167
180
|
border-bottom-left-radius-0
|
|
168
181
|
border-top-right-radius-6
|
|
169
182
|
border-bottom-right-radius-6
|
|
170
|
-
${styles.
|
|
171
|
-
${styles.FORM_COLOR_INPUT_BG}
|
|
172
|
-
${styles.FORM_COLOR_INPUT_BG_FOCUS}
|
|
183
|
+
${styles.FORM_COLOR_INPUT_CLASSNAME}
|
|
173
184
|
`}
|
|
174
185
|
onLayout={(e) => {
|
|
175
186
|
// On web, this is not needed, but on RN it might be, so leave it in for now
|
|
@@ -190,11 +201,14 @@ export function ColorElement(props) {
|
|
|
190
201
|
trigger={emptyFn}
|
|
191
202
|
trapFocus={true}
|
|
192
203
|
placement={'auto'}
|
|
193
|
-
{
|
|
204
|
+
className={`
|
|
205
|
+
ColorElement-Popover
|
|
206
|
+
`}
|
|
194
207
|
>
|
|
195
208
|
<PopoverContent
|
|
196
209
|
position="absolute"
|
|
197
210
|
className={`
|
|
211
|
+
ColorElement-PopoverContent
|
|
198
212
|
w-[220px]
|
|
199
213
|
h-[287px]
|
|
200
214
|
`}
|
|
@@ -206,7 +220,10 @@ export function ColorElement(props) {
|
|
|
206
220
|
>
|
|
207
221
|
<PopoverBody
|
|
208
222
|
ref={pickerRef}
|
|
209
|
-
className=
|
|
223
|
+
className={`
|
|
224
|
+
ColorElement-PopoverBody
|
|
225
|
+
p-0
|
|
226
|
+
`}
|
|
210
227
|
>
|
|
211
228
|
<SketchPicker
|
|
212
229
|
disableAlpha={true}
|
|
@@ -519,8 +519,7 @@ export function ComboComponent(props) {
|
|
|
519
519
|
className={`
|
|
520
520
|
h-full
|
|
521
521
|
mr-1
|
|
522
|
-
${styles.
|
|
523
|
-
${styles.FORM_COMBO_TRIGGER_BG_HOVER}
|
|
522
|
+
${styles.FORM_COMBO_TRIGGER_CLASSNAME}
|
|
524
523
|
`}
|
|
525
524
|
/>;
|
|
526
525
|
}
|
|
@@ -538,8 +537,7 @@ export function ComboComponent(props) {
|
|
|
538
537
|
className={`
|
|
539
538
|
h-full
|
|
540
539
|
mr-1
|
|
541
|
-
${styles.
|
|
542
|
-
${styles.FORM_COMBO_TRIGGER_BG_HOVER}
|
|
540
|
+
${styles.FORM_COMBO_TRIGGER_CLASSNAME}
|
|
543
541
|
`}
|
|
544
542
|
/>;
|
|
545
543
|
}
|
|
@@ -552,8 +550,7 @@ export function ComboComponent(props) {
|
|
|
552
550
|
border-gray-400
|
|
553
551
|
rounded-l-none
|
|
554
552
|
rounded-r-md
|
|
555
|
-
${styles.
|
|
556
|
-
${styles.FORM_COMBO_TRIGGER_BG_HOVER}
|
|
553
|
+
${styles.FORM_COMBO_TRIGGER_CLASSNAME}
|
|
557
554
|
`;
|
|
558
555
|
trigger = <IconButton
|
|
559
556
|
{...testProps('trigger')}
|
|
@@ -575,7 +572,7 @@ export function ComboComponent(props) {
|
|
|
575
572
|
{...testProps('toggleMenuBtn')}
|
|
576
573
|
onPress={toggleMenu}
|
|
577
574
|
className={`
|
|
578
|
-
toggleMenuBtn
|
|
575
|
+
Combo-toggleMenuBtn
|
|
579
576
|
h-auto
|
|
580
577
|
self-stretch
|
|
581
578
|
flex-1
|
|
@@ -596,12 +593,12 @@ export function ComboComponent(props) {
|
|
|
596
593
|
numberOfLines={1}
|
|
597
594
|
ellipsizeMode="head"
|
|
598
595
|
className={`
|
|
599
|
-
|
|
596
|
+
Combo-TextNative
|
|
600
597
|
h-auto
|
|
601
598
|
self-stretch
|
|
602
599
|
flex-1
|
|
603
600
|
${_.isEmpty(textInputValue) ? "text-grey-400" : "text-black"}
|
|
604
|
-
${styles.
|
|
601
|
+
${styles.FORM_COMBO_INPUT_CLASSNAME}
|
|
605
602
|
`}
|
|
606
603
|
>{_.isEmpty(textInputValue) ? placeholder : textInputValue}</TextNative>
|
|
607
604
|
</Pressable> :
|
|
@@ -620,7 +617,7 @@ export function ComboComponent(props) {
|
|
|
620
617
|
autoSubmitDelay={500}
|
|
621
618
|
placeholder={placeholder}
|
|
622
619
|
className={`
|
|
623
|
-
|
|
620
|
+
Combo-Input
|
|
624
621
|
grow
|
|
625
622
|
h-auto
|
|
626
623
|
self-stretch
|
|
@@ -628,9 +625,7 @@ export function ComboComponent(props) {
|
|
|
628
625
|
m-0
|
|
629
626
|
rounded-tr-none
|
|
630
627
|
rounded-br-none
|
|
631
|
-
${styles.
|
|
632
|
-
${styles.FORM_COMBO_INPUT_BG}
|
|
633
|
-
${styles.FORM_COMBO_INPUT_BG_FOCUS}
|
|
628
|
+
${styles.FORM_COMBO_INPUT_CLASSNAME}
|
|
634
629
|
`}
|
|
635
630
|
{..._input}
|
|
636
631
|
/>;
|
|
@@ -665,7 +660,7 @@ export function ComboComponent(props) {
|
|
|
665
660
|
m-0
|
|
666
661
|
p-1
|
|
667
662
|
${_.isEmpty(displayValue) ? "text-grey-400" : "text-black"}
|
|
668
|
-
${styles.
|
|
663
|
+
${styles.FORM_COMBO_INPUT_CLASSNAME}
|
|
669
664
|
`}
|
|
670
665
|
>{_.isEmpty(displayValue) ? placeholder : displayValue}</TextNative>
|
|
671
666
|
</Pressable>;
|
|
@@ -854,9 +849,7 @@ export function ComboComponent(props) {
|
|
|
854
849
|
m-0
|
|
855
850
|
rounded-tr-none
|
|
856
851
|
rounded-br-none
|
|
857
|
-
${styles.
|
|
858
|
-
${styles.FORM_COMBO_INPUT_BG}
|
|
859
|
-
${styles.FORM_COMBO_INPUT_BG_FOCUS}
|
|
852
|
+
${styles.FORM_COMBO_INPUT_CLASSNAME}
|
|
860
853
|
`}
|
|
861
854
|
{..._input}
|
|
862
855
|
/>
|
|
@@ -915,8 +908,7 @@ export function ComboComponent(props) {
|
|
|
915
908
|
border
|
|
916
909
|
border-grey-400
|
|
917
910
|
rounded-md
|
|
918
|
-
${styles.
|
|
919
|
-
${styles.FORM_COMBO_TRIGGER_BG_HOVER}
|
|
911
|
+
${styles.FORM_COMBO_TRIGGER_CLASSNAME}
|
|
920
912
|
`}
|
|
921
913
|
/>;
|
|
922
914
|
}
|
|
@@ -937,9 +929,7 @@ export function ComboComponent(props) {
|
|
|
937
929
|
border
|
|
938
930
|
border-grey-400
|
|
939
931
|
rounded-r-none
|
|
940
|
-
${styles.
|
|
941
|
-
${styles.FORM_COMBO_INPUT_BG_FOCUS}
|
|
942
|
-
${styles.FORM_COMBO_INPUT_FONTSIZE}
|
|
932
|
+
${styles.FORM_COMBO_INPUT_CLASSNAME}
|
|
943
933
|
`}
|
|
944
934
|
>{textInputValue}</TextNative> :
|
|
945
935
|
<Input
|
|
@@ -961,9 +951,7 @@ export function ComboComponent(props) {
|
|
|
961
951
|
flex-1
|
|
962
952
|
m-0
|
|
963
953
|
rounded-r-none
|
|
964
|
-
${styles.
|
|
965
|
-
${styles.FORM_COMBO_INPUT_BG}
|
|
966
|
-
${styles.FORM_COMBO_INPUT_BG_FOCUS}
|
|
954
|
+
${styles.FORM_COMBO_INPUT_CLASSNAME}
|
|
967
955
|
`}
|
|
968
956
|
{..._input}
|
|
969
957
|
/>}
|
|
@@ -982,8 +970,7 @@ export function ComboComponent(props) {
|
|
|
982
970
|
border-grey-400
|
|
983
971
|
rounded-l-none
|
|
984
972
|
rounded-r-md
|
|
985
|
-
${styles.
|
|
986
|
-
${styles.FORM_COMBO_TRIGGER_BG_HOVER}
|
|
973
|
+
${styles.FORM_COMBO_TRIGGER_CLASSNAME}
|
|
987
974
|
`}
|
|
988
975
|
/>
|
|
989
976
|
{checkButton}
|
|
@@ -292,9 +292,9 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
292
292
|
isDisabled={isDisabled}
|
|
293
293
|
onPress={onClearBtn}
|
|
294
294
|
className={`
|
|
295
|
+
Date-xBtn
|
|
295
296
|
h-full
|
|
296
|
-
${styles.
|
|
297
|
-
${styles.FORM_COMBO_TRIGGER_BG_HOVER}
|
|
297
|
+
${styles.FORM_COMBO_TRIGGER_CLASSNAME}
|
|
298
298
|
`}
|
|
299
299
|
/>;
|
|
300
300
|
}
|
|
@@ -304,20 +304,20 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
304
304
|
icon={Calendar}
|
|
305
305
|
_icon={{
|
|
306
306
|
size: 'sm',
|
|
307
|
-
className: styles.
|
|
307
|
+
className: styles.FORM_DATE_TRIGGER_ICON_CLASSNAME,
|
|
308
308
|
}}
|
|
309
309
|
onPress={onTriggerPress}
|
|
310
310
|
onBlur={onTriggerBlur}
|
|
311
311
|
isDisabled={isDisabled}
|
|
312
312
|
className={`
|
|
313
|
+
Date-trigger
|
|
313
314
|
h-10
|
|
314
315
|
w-10
|
|
315
316
|
border
|
|
316
317
|
border-grey-400
|
|
317
318
|
rounded-l-md
|
|
318
319
|
rounded-r-none
|
|
319
|
-
${styles.
|
|
320
|
-
${styles.FORM_DATE_ICON_BG_HOVER}
|
|
320
|
+
${styles.FORM_DATE_TRIGGER_CLASSNAME}
|
|
321
321
|
`}
|
|
322
322
|
/>;
|
|
323
323
|
|
|
@@ -326,13 +326,14 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
326
326
|
<Pressable
|
|
327
327
|
{...testProps('togglePickerBtn')}
|
|
328
328
|
onPress={togglePicker}
|
|
329
|
-
className="flex-1 h-full"
|
|
329
|
+
className="Date-togglePickerBtn flex-1 h-full"
|
|
330
330
|
>
|
|
331
331
|
<TextNative
|
|
332
332
|
ref={inputRef}
|
|
333
333
|
numberOfLines={1}
|
|
334
334
|
ellipsizeMode="head"
|
|
335
335
|
className={`
|
|
336
|
+
Date-TextNative
|
|
336
337
|
flex-1
|
|
337
338
|
h-full
|
|
338
339
|
m-0
|
|
@@ -343,9 +344,7 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
343
344
|
rounded-l-none
|
|
344
345
|
rounded-r-md
|
|
345
346
|
${_.isEmpty(textInputValue) ? "text-grey-400" : "text-black"}
|
|
346
|
-
${styles.
|
|
347
|
-
${styles.FORM_DATE_INPUT_BG_FOCUS}
|
|
348
|
-
${styles.FORM_DATE_READOUT_FONTSIZE}
|
|
347
|
+
${styles.FORM_DATE_INPUT_CLASSNAME}
|
|
349
348
|
`}
|
|
350
349
|
>{_.isEmpty(textInputValue) ? placeholder : textInputValue}</TextNative>
|
|
351
350
|
</Pressable> :
|
|
@@ -369,13 +368,12 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
369
368
|
// setTop(Math.round(height));
|
|
370
369
|
// }}
|
|
371
370
|
className={`
|
|
371
|
+
Date-Input
|
|
372
372
|
flex-1
|
|
373
373
|
h-full
|
|
374
374
|
m-0
|
|
375
375
|
rounded-r-lg
|
|
376
|
-
${styles.
|
|
377
|
-
${styles.FORM_DATE_INPUT_BG_FOCUS}
|
|
378
|
-
${styles.FORM_DATE_READOUT_FONTSIZE}
|
|
376
|
+
${styles.FORM_DATE_INPUT_CLASSNAME}
|
|
379
377
|
${_.isEmpty(textInputValue) ? 'text-grey-400' : 'text-black'}
|
|
380
378
|
`}
|
|
381
379
|
autoSubmitDelay={1000}
|
|
@@ -407,8 +405,8 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
407
405
|
rounded-r-md
|
|
408
406
|
${_.isEmpty(textInputValue) ? "text-grey-400" : "text-black"}
|
|
409
407
|
${styles.FORM_DATE_READOUT_FONTSIZE}
|
|
410
|
-
${styles.
|
|
411
|
-
${styles.
|
|
408
|
+
${styles.FORM_DATE_INPUT_CLASSNAME}
|
|
409
|
+
${styles.FORM_DATE_INPUT_CLASSNAME_FOCUS}
|
|
412
410
|
`}
|
|
413
411
|
>{_.isEmpty(textInputValue) ? placeholder : textInputValue}</TextNative>
|
|
414
412
|
</Pressable>;
|
|
@@ -422,13 +420,13 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
422
420
|
hidePicker();
|
|
423
421
|
}}
|
|
424
422
|
trigger={emptyFn}
|
|
425
|
-
className="block"
|
|
423
|
+
className="Date-Popover block"
|
|
426
424
|
>
|
|
427
425
|
<PopoverBackdrop className="PopoverBackdrop bg-[#000]" />
|
|
428
426
|
<PopoverContent
|
|
429
427
|
ref={pickerRef}
|
|
430
428
|
className={`
|
|
431
|
-
PopoverContent
|
|
429
|
+
Date-PopoverContent
|
|
432
430
|
`}
|
|
433
431
|
style={{
|
|
434
432
|
top,
|
|
@@ -440,7 +438,7 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
440
438
|
>
|
|
441
439
|
<PopoverBody
|
|
442
440
|
className={`
|
|
443
|
-
PopoverBody
|
|
441
|
+
Date-PopoverBody
|
|
444
442
|
overflow-hidden
|
|
445
443
|
`}
|
|
446
444
|
>
|
|
@@ -463,10 +461,10 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
463
461
|
<HStack className="h-[10px]">
|
|
464
462
|
<IconButton
|
|
465
463
|
{...testProps('hidePickerBtn')}
|
|
464
|
+
icon={Calendar}
|
|
466
465
|
_icon={{
|
|
467
|
-
as: Calendar,
|
|
468
|
-
color: styles.FORM_DATE_ICON_COLOR,
|
|
469
466
|
size: 'sm',
|
|
467
|
+
className: styles.FORM_DATE_TRIGGER_ICON_CLASSNAME,
|
|
470
468
|
}}
|
|
471
469
|
isDisabled={isDisabled}
|
|
472
470
|
onPress={() => hidePicker()}
|
|
@@ -477,8 +475,7 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
477
475
|
border-grey-400
|
|
478
476
|
rounded-l-md
|
|
479
477
|
rounded-r-none
|
|
480
|
-
${styles.
|
|
481
|
-
${styles.FORM_DATE_ICON_BG_HOVER}
|
|
478
|
+
${styles.FORM_DATE_TRIGGER_CLASSNAME}
|
|
482
479
|
`}
|
|
483
480
|
/>
|
|
484
481
|
{disableDirectEntry ?
|
|
@@ -497,9 +494,7 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
497
494
|
rounded-l-none
|
|
498
495
|
rounded-r-md
|
|
499
496
|
${_.isEmpty(textInputValue) ? "text-grey-400" : "text-black"}
|
|
500
|
-
${styles.
|
|
501
|
-
${styles.FORM_DATE_INPUT_BG_FOCUS}
|
|
502
|
-
${styles.FORM_DATE_READOUT_FONTSIZE}
|
|
497
|
+
${styles.FORM_DATE_INPUT_CLASSNAME}
|
|
503
498
|
`}
|
|
504
499
|
>{textInputValue}</TextNative> :
|
|
505
500
|
<Input
|
|
@@ -521,9 +516,7 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
521
516
|
rounded-tr-none
|
|
522
517
|
rounded-br-none
|
|
523
518
|
${_.isEmpty(textInputValue) ? 'text-grey-400' : 'text-black'}
|
|
524
|
-
${styles.
|
|
525
|
-
${styles.FORM_DATE_INPUT_BG}
|
|
526
|
-
${styles.FORM_DATE_INPUT_BG_FOCUS}
|
|
519
|
+
${styles.FORM_DATE_INPUT_CLASSNAME}
|
|
527
520
|
`}
|
|
528
521
|
{..._input}
|
|
529
522
|
/>}
|
|
@@ -532,7 +525,13 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
532
525
|
isOpen={true}
|
|
533
526
|
safeAreaTop={true}
|
|
534
527
|
onClose={() => setIsPickerShown(false)}
|
|
535
|
-
className=
|
|
528
|
+
className={`
|
|
529
|
+
Date-Modal
|
|
530
|
+
my-auto
|
|
531
|
+
w-full
|
|
532
|
+
h-[400px]
|
|
533
|
+
p-3
|
|
534
|
+
`}
|
|
536
535
|
>
|
|
537
536
|
<ModalBackdrop />
|
|
538
537
|
<ModalContent>
|
|
@@ -548,7 +547,7 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
548
547
|
timeFormat={mode === TIME || mode === DATETIME ? 'HH:mm:ss' : false}
|
|
549
548
|
onChange={onPickerChange}
|
|
550
549
|
/> */}
|
|
551
|
-
<Box className="bg-white">
|
|
550
|
+
<Box className="Date-Box bg-white">
|
|
552
551
|
<Datetime
|
|
553
552
|
{...testProps('picker')}
|
|
554
553
|
initialDate={moment(value).toDate()}
|
|
@@ -570,7 +569,7 @@ export const DateElement = forwardRef((props, ref) => {
|
|
|
570
569
|
flex-1
|
|
571
570
|
justify-center
|
|
572
571
|
items-center
|
|
573
|
-
${styles.
|
|
572
|
+
${styles.FORM_DATE_CLASSNAME}
|
|
574
573
|
`;
|
|
575
574
|
if (props.className) {
|
|
576
575
|
className += props.className;
|
|
@@ -642,12 +642,12 @@ function FormikForm(props) {
|
|
|
642
642
|
title += ' for ' + record.displayValue;
|
|
643
643
|
}
|
|
644
644
|
title = <Text
|
|
645
|
-
className={` ${styles.
|
|
645
|
+
className={` ${styles.FORM_ANCILLARY_TITLE_CLASSNAME} font-bold `}
|
|
646
646
|
>{title}</Text>;
|
|
647
647
|
}
|
|
648
648
|
if (description) {
|
|
649
649
|
description = <Text
|
|
650
|
-
className={` ${styles.
|
|
650
|
+
className={` ${styles.FORM_ANCILLARY_DESCRIPTION_CLASSNAME} italic-italic `}
|
|
651
651
|
>{description}</Text>;
|
|
652
652
|
}
|
|
653
653
|
components.push(<VStack key={'ancillary-' + ix} className="mx-1 my-3">{title}{description}{element}</VStack>);
|
|
@@ -113,9 +113,7 @@ const InputElement = forwardRef((props, ref) => {
|
|
|
113
113
|
}
|
|
114
114
|
let inputClassName = `
|
|
115
115
|
Input
|
|
116
|
-
${styles.
|
|
117
|
-
${styles.FORM_INPUT_BG_FOCUS}
|
|
118
|
-
${styles.FORM_INPUT_BG_HOVER}
|
|
116
|
+
${styles.FORM_INPUT_CLASSNAME}
|
|
119
117
|
`,
|
|
120
118
|
inputFieldClassName = `
|
|
121
119
|
InputField
|
|
@@ -124,10 +122,8 @@ const InputElement = forwardRef((props, ref) => {
|
|
|
124
122
|
w-full
|
|
125
123
|
p-2
|
|
126
124
|
${textAlignIsCenter ? 'text-center' : 'text-left'}
|
|
127
|
-
${styles.
|
|
128
|
-
${styles.
|
|
129
|
-
${styles.FORM_INPUT_BG_FOCUS}
|
|
130
|
-
${styles.FORM_INPUT_BG_HOVER}
|
|
125
|
+
${styles.FORM_INPUT_CLASSNAME}
|
|
126
|
+
${styles.FORM_INPUT_FIELD_CLASSNAME}
|
|
131
127
|
`;
|
|
132
128
|
if (className) {
|
|
133
129
|
inputClassName += className;
|
|
@@ -72,10 +72,7 @@ const SelectElement = forwardRef((props, ref) => {
|
|
|
72
72
|
w-full
|
|
73
73
|
text-left
|
|
74
74
|
rounded-lg
|
|
75
|
-
${styles.
|
|
76
|
-
${styles.FORM_SELECT_BG}
|
|
77
|
-
${styles.FORM_SELECT_BG_FOCUS}
|
|
78
|
-
${styles.FORM_SELECT_BG_HOVER}
|
|
75
|
+
${styles.FORM_SELECT_CLASSNAME}
|
|
79
76
|
`;
|
|
80
77
|
if (props.className) {
|
|
81
78
|
className += props.className;
|
|
@@ -274,15 +274,15 @@ function TagComponent(props) {
|
|
|
274
274
|
w-full
|
|
275
275
|
min-h-[40px]
|
|
276
276
|
max-h-[200px]
|
|
277
|
+
mb-1
|
|
278
|
+
p-1
|
|
277
279
|
flex-wrap
|
|
278
280
|
overflow-auto
|
|
279
281
|
border
|
|
280
282
|
border-grey-300
|
|
281
283
|
rounded-md
|
|
282
284
|
bg-grey-100
|
|
283
|
-
${styles.
|
|
284
|
-
${styles.FORM_TAG_MB}
|
|
285
|
-
${styles.FORM_TAG_PADDING}
|
|
285
|
+
${styles.FORM_TAG_CLASSNAME}
|
|
286
286
|
`,
|
|
287
287
|
comboClassName = '';
|
|
288
288
|
if (_combo.className) {
|
|
@@ -19,6 +19,7 @@ export default function ValueBox(props) {
|
|
|
19
19
|
return <HStackNative
|
|
20
20
|
{...testProps('valueBox-' + text)}
|
|
21
21
|
className={`
|
|
22
|
+
ValueBox-HStackNative
|
|
22
23
|
max-w-full
|
|
23
24
|
items-center
|
|
24
25
|
mr-1
|
|
@@ -37,12 +38,13 @@ export default function ValueBox(props) {
|
|
|
37
38
|
className: 'text-grey-600',
|
|
38
39
|
}}
|
|
39
40
|
onPress={onView}
|
|
40
|
-
className="h-full"
|
|
41
|
+
className="ValueBox-eyeBtn h-full"
|
|
41
42
|
/>
|
|
42
43
|
<Text
|
|
43
44
|
className={`
|
|
45
|
+
ValueBox-Text
|
|
44
46
|
text-grey-600
|
|
45
|
-
${styles.
|
|
47
|
+
${styles.FORM_TAG_VALUEBOX_CLASSNAME}
|
|
46
48
|
${onDelete ? 'mr-0' : 'mr-1'}
|
|
47
49
|
`}
|
|
48
50
|
>{text}</Text>
|
|
@@ -55,7 +57,7 @@ export default function ValueBox(props) {
|
|
|
55
57
|
className: 'text-grey-600',
|
|
56
58
|
}}
|
|
57
59
|
onPress={onDelete}
|
|
58
|
-
className="h-full"
|
|
60
|
+
className="ValueBox-xBtn h-full"
|
|
59
61
|
/>}
|
|
60
62
|
</HStackNative>;
|
|
61
63
|
}
|
|
@@ -83,9 +83,7 @@ const
|
|
|
83
83
|
inputClassName = `
|
|
84
84
|
TextAreaInput
|
|
85
85
|
flex-1
|
|
86
|
-
${styles.
|
|
87
|
-
${styles.FORM_TEXTAREA_FONTSIZE}
|
|
88
|
-
${styles.FORM_TEXTAREA_HEIGHT}
|
|
86
|
+
${styles.FORM_TEXTAREA_CLASSNAME}
|
|
89
87
|
`;
|
|
90
88
|
if (props.className) {
|
|
91
89
|
inputClassName += ' ' + props.className;
|
|
@@ -99,9 +97,6 @@ const
|
|
|
99
97
|
<TextareaInput
|
|
100
98
|
ref={props.outerRef}
|
|
101
99
|
onChangeText={onChangeTextLocal}
|
|
102
|
-
_focus={{
|
|
103
|
-
bg: styles.FORM_TEXTAREA_BG,
|
|
104
|
-
}}
|
|
105
100
|
value={localValue}
|
|
106
101
|
className={inputClassName}
|
|
107
102
|
placeholder={placeholder}
|
|
@@ -109,7 +109,7 @@ export default function FieldSet(props) {
|
|
|
109
109
|
numberOfLines={1}
|
|
110
110
|
ellipsizeMode="head"
|
|
111
111
|
className={`
|
|
112
|
-
FieldSet-title-
|
|
112
|
+
FieldSet-title-TextNative
|
|
113
113
|
flex-1
|
|
114
114
|
py-1
|
|
115
115
|
px-3
|
|
@@ -119,25 +119,15 @@ export default function FieldSet(props) {
|
|
|
119
119
|
>{title}</TextNative>
|
|
120
120
|
|
|
121
121
|
{showToggleAllCheckbox &&
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
>Toggle All?</TextNative>
|
|
132
|
-
<CheckboxButton
|
|
133
|
-
{...testProps('toggleAllBtn')}
|
|
134
|
-
isChecked={getIsAllChecked()}
|
|
135
|
-
onPress={onToggleAllChecked}
|
|
136
|
-
_icon={{
|
|
137
|
-
size: 'lg',
|
|
138
|
-
}}
|
|
139
|
-
/>
|
|
140
|
-
</HStack>}
|
|
122
|
+
<CheckboxButton
|
|
123
|
+
{...testProps('toggleAllBtn')}
|
|
124
|
+
isChecked={getIsAllChecked()}
|
|
125
|
+
onPress={onToggleAllChecked}
|
|
126
|
+
className="FieldSet-title-showToggleAllCheckbox self-right"
|
|
127
|
+
_icon={{
|
|
128
|
+
size: 'lg',
|
|
129
|
+
}}
|
|
130
|
+
/>}
|
|
141
131
|
|
|
142
132
|
{isCollapsible &&
|
|
143
133
|
<IconButton
|
|
@@ -646,7 +646,7 @@ function Form(props) {
|
|
|
646
646
|
}
|
|
647
647
|
if (containerWidth > styles.FORM_STACK_ROW_THRESHOLD) {
|
|
648
648
|
if (!style.width) {
|
|
649
|
-
style.width = '
|
|
649
|
+
style.width = '120px';
|
|
650
650
|
}
|
|
651
651
|
element = <HStack className="Form-HStack1 w-full py-1">
|
|
652
652
|
<Label style={style}>{label}</Label>
|
|
@@ -812,7 +812,15 @@ function Form(props) {
|
|
|
812
812
|
isRequired = true;
|
|
813
813
|
}
|
|
814
814
|
if (isRequired) {
|
|
815
|
-
requiredIndicator = <Text
|
|
815
|
+
requiredIndicator = <Text
|
|
816
|
+
className={`
|
|
817
|
+
Form-requiredIndicator
|
|
818
|
+
self-center
|
|
819
|
+
text-[#f00]
|
|
820
|
+
text-[30px]
|
|
821
|
+
pr-1
|
|
822
|
+
`}
|
|
823
|
+
>*</Text>;
|
|
816
824
|
}
|
|
817
825
|
}
|
|
818
826
|
if (!disableLabels && label && editorType !== EDITOR_TYPE__INLINE) {
|
|
@@ -822,15 +830,21 @@ function Form(props) {
|
|
|
822
830
|
}
|
|
823
831
|
if (containerWidth > styles.FORM_STACK_ROW_THRESHOLD) {
|
|
824
832
|
if (!style.width) {
|
|
825
|
-
style.width = '
|
|
833
|
+
style.width = '120px';
|
|
826
834
|
}
|
|
827
835
|
element = <HStack className="Form-HStack8 w-full">
|
|
828
|
-
<Label style={style}>
|
|
836
|
+
<Label style={style}>
|
|
837
|
+
{requiredIndicator}
|
|
838
|
+
{label}
|
|
839
|
+
</Label>
|
|
829
840
|
{element}
|
|
830
841
|
</HStack>;
|
|
831
842
|
} else {
|
|
832
843
|
element = <VStack className="Form-VStack9 w-full mt-3">
|
|
833
|
-
<Label style={style}>
|
|
844
|
+
<Label style={style}>
|
|
845
|
+
{requiredIndicator}
|
|
846
|
+
{label}
|
|
847
|
+
</Label>
|
|
834
848
|
{element}
|
|
835
849
|
</VStack>;
|
|
836
850
|
}
|
|
@@ -907,7 +921,7 @@ function Form(props) {
|
|
|
907
921
|
className={`
|
|
908
922
|
Form-Ancillary-Title
|
|
909
923
|
font-bold
|
|
910
|
-
${styles.
|
|
924
|
+
${styles.FORM_ANCILLARY_TITLE_CLASSNAME}
|
|
911
925
|
`}
|
|
912
926
|
>{title}</Text>;
|
|
913
927
|
}
|
|
@@ -916,7 +930,7 @@ function Form(props) {
|
|
|
916
930
|
className={`
|
|
917
931
|
Form-Ancillary-Description
|
|
918
932
|
italic
|
|
919
|
-
${styles.
|
|
933
|
+
${styles.FORM_ANCILLARY_DESCRIPTION_CLASSNAME}
|
|
920
934
|
`}
|
|
921
935
|
>{description}</Text>;
|
|
922
936
|
}
|
|
@@ -1280,8 +1294,7 @@ function Form(props) {
|
|
|
1280
1294
|
justify-center
|
|
1281
1295
|
items-center
|
|
1282
1296
|
rounded-b-lg
|
|
1283
|
-
bg-
|
|
1284
|
-
${styles.GRID_INLINE_EDITOR_BG}
|
|
1297
|
+
bg-primary-700
|
|
1285
1298
|
`}
|
|
1286
1299
|
>{footerButtons}</HStack>
|
|
1287
1300
|
</Box>;
|
|
@@ -16,8 +16,9 @@ export default function Label(props) {
|
|
|
16
16
|
}
|
|
17
17
|
let textClassName = `
|
|
18
18
|
Label-TextNative
|
|
19
|
+
flex
|
|
19
20
|
text-ellipsis
|
|
20
|
-
${styles.
|
|
21
|
+
${styles.FORM_LABEL_CLASSNAME}
|
|
21
22
|
`;
|
|
22
23
|
if (props._text?.className) {
|
|
23
24
|
textClassName += ' ' + props._text.className;
|
|
@@ -363,8 +363,7 @@ export default function GridHeaderRow(props) {
|
|
|
363
363
|
items-center
|
|
364
364
|
justify-center
|
|
365
365
|
${rowClassName}
|
|
366
|
-
${styles.
|
|
367
|
-
${styles.GRID_HEADER_BG_HOVER}
|
|
366
|
+
${styles.GRID_HEADER_PRESSABLE_CLASSNAME}
|
|
368
367
|
`}
|
|
369
368
|
style={rowStyle}
|
|
370
369
|
>
|
|
@@ -404,9 +403,9 @@ export default function GridHeaderRow(props) {
|
|
|
404
403
|
text-center
|
|
405
404
|
overflow-hidden
|
|
406
405
|
text-ellipsis
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
${styles.
|
|
406
|
+
px-2
|
|
407
|
+
py-3
|
|
408
|
+
${styles.GRID_HEADER_CLASSNAME}
|
|
410
409
|
`}
|
|
411
410
|
>{header}</TextNative>
|
|
412
411
|
|
|
@@ -419,8 +418,7 @@ export default function GridHeaderRow(props) {
|
|
|
419
418
|
GridHeaderRow-Icon
|
|
420
419
|
text-center
|
|
421
420
|
text-grey-500
|
|
422
|
-
${styles.
|
|
423
|
-
${styles.GRID_HEADER_ICON_MR}
|
|
421
|
+
${styles.GRID_HEADER_ICON_CLASSNAME}
|
|
424
422
|
`} />}
|
|
425
423
|
|
|
426
424
|
{isOver && UiGlobals.mode === UI_MODE_WEB && // only works for web for now
|
|
@@ -180,10 +180,10 @@ function GridRow(props) {
|
|
|
180
180
|
GridRow-Element
|
|
181
181
|
self-center
|
|
182
182
|
text-ellipsis
|
|
183
|
+
px-2
|
|
184
|
+
py-3
|
|
183
185
|
${colClassName}
|
|
184
|
-
${styles.
|
|
185
|
-
${styles.GRID_CELL_PX}
|
|
186
|
-
${styles.GRID_CELL_PY}
|
|
186
|
+
${styles.GRID_CELL_CLASSNAME}
|
|
187
187
|
`}
|
|
188
188
|
numberOfLines={1}
|
|
189
189
|
ellipsizeMode="head"
|
|
@@ -228,8 +228,11 @@ function GridRow(props) {
|
|
|
228
228
|
self-center
|
|
229
229
|
overflow-hidden
|
|
230
230
|
text-ellipsis
|
|
231
|
+
truncate
|
|
232
|
+
whitespace-nowrap
|
|
233
|
+
overflow-hidden
|
|
231
234
|
${colClassName}
|
|
232
|
-
${styles.
|
|
235
|
+
${styles.GRID_CELL_CLASSNAME}
|
|
233
236
|
${styles.GRID_CELL_PX}
|
|
234
237
|
${styles.GRID_CELL_PY}
|
|
235
238
|
`}
|
|
@@ -278,7 +281,7 @@ function GridRow(props) {
|
|
|
278
281
|
rowContents = <HStack
|
|
279
282
|
ref={dragSourceRef}
|
|
280
283
|
className={`
|
|
281
|
-
dragSourceRef
|
|
284
|
+
GridRow-dragSourceRef
|
|
282
285
|
w-full
|
|
283
286
|
flex-1
|
|
284
287
|
grow-1
|
|
@@ -292,7 +295,7 @@ function GridRow(props) {
|
|
|
292
295
|
rowContents = <HStack
|
|
293
296
|
ref={dropTargetRef}
|
|
294
297
|
className={`
|
|
295
|
-
dropTargetRef
|
|
298
|
+
GridRow-dropTargetRef
|
|
296
299
|
w-full
|
|
297
300
|
flex-1
|
|
298
301
|
grow-1
|
|
@@ -313,7 +313,7 @@ export default function withFilters(WrappedComponent) {
|
|
|
313
313
|
<Label
|
|
314
314
|
className="min-w-0 mr-1"
|
|
315
315
|
_text={{
|
|
316
|
-
className: UiGlobals.styles.
|
|
316
|
+
className: UiGlobals.styles.FILTER_LABEL_CLASSNAME,
|
|
317
317
|
}}
|
|
318
318
|
>{title}</Label>
|
|
319
319
|
{filterElement}
|
|
@@ -184,9 +184,9 @@ export default function withModal(WrappedComponent) {
|
|
|
184
184
|
<Modal
|
|
185
185
|
isOpen={true}
|
|
186
186
|
onClose={onCancel}
|
|
187
|
-
className="Modal"
|
|
187
|
+
className="withModal-Modal"
|
|
188
188
|
>
|
|
189
|
-
<ModalBackdrop />
|
|
189
|
+
<ModalBackdrop className="withModal-ModalBackdrop" />
|
|
190
190
|
{modalBody}
|
|
191
191
|
</Modal>}
|
|
192
192
|
|
|
@@ -74,8 +74,9 @@ export default function withWindowedEditor(WrappedComponent, isTree = false) {
|
|
|
74
74
|
<Modal
|
|
75
75
|
isOpen={true}
|
|
76
76
|
onClose={onEditorCancel}
|
|
77
|
+
className="withEditor-Modal"
|
|
77
78
|
>
|
|
78
|
-
<ModalBackdrop />
|
|
79
|
+
<ModalBackdrop className="withEditor-ModalBackdrop" />
|
|
79
80
|
<Editor
|
|
80
81
|
editorType={EDITOR_TYPE__WINDOWED}
|
|
81
82
|
{...propsToPass}
|
|
@@ -55,7 +55,7 @@ export default function Header(props) {
|
|
|
55
55
|
icon={Xmark}
|
|
56
56
|
_icon={{
|
|
57
57
|
// size: styles.PANEL_HEADER_ICON_SIZE,
|
|
58
|
-
className: styles.
|
|
58
|
+
className: styles.PANEL_HEADER_ICON_CLASSNAME,
|
|
59
59
|
}}
|
|
60
60
|
className={closeClassName}
|
|
61
61
|
/>;
|
|
@@ -76,7 +76,7 @@ export default function Header(props) {
|
|
|
76
76
|
icon={isCollapsed ? Plus : Minus}
|
|
77
77
|
_icon={{
|
|
78
78
|
size: styles.PANEL_HEADER_ICON_SIZE,
|
|
79
|
-
className: styles.
|
|
79
|
+
className: styles.PANEL_HEADER_ICON_CLASSNAME,
|
|
80
80
|
}}
|
|
81
81
|
className={collapseClassName}
|
|
82
82
|
/>;
|
|
@@ -131,8 +131,7 @@ export default function Header(props) {
|
|
|
131
131
|
Header-TextNative1
|
|
132
132
|
flex-1
|
|
133
133
|
font-bold
|
|
134
|
-
${styles.
|
|
135
|
-
${styles.PANEL_HEADER_TEXT_FONTSIZE}
|
|
134
|
+
${styles.PANEL_HEADER_TEXT_CLASSNAME}
|
|
136
135
|
`}>{title}</TextNative>
|
|
137
136
|
</div>
|
|
138
137
|
</VStack>
|
|
@@ -169,8 +168,7 @@ export default function Header(props) {
|
|
|
169
168
|
Header-TextNative2
|
|
170
169
|
flex-1
|
|
171
170
|
font-bold
|
|
172
|
-
${styles.
|
|
173
|
-
${styles.PANEL_HEADER_TEXT_FONTSIZE}
|
|
171
|
+
${styles.PANEL_HEADER_TEXT_CLASSNAME}
|
|
174
172
|
`}
|
|
175
173
|
>{title}</TextNative>
|
|
176
174
|
{collapseBtn}
|
|
@@ -211,8 +209,7 @@ export default function Header(props) {
|
|
|
211
209
|
font-bold
|
|
212
210
|
w-[200px]
|
|
213
211
|
text-right
|
|
214
|
-
${styles.
|
|
215
|
-
${styles.PANEL_HEADER_TEXT_FONTSIZE}
|
|
212
|
+
${styles.PANEL_HEADER_TEXT_CLASSNAME}
|
|
216
213
|
`}
|
|
217
214
|
>{title}</TextNative>
|
|
218
215
|
</VStack>
|
|
@@ -246,8 +243,7 @@ export default function Header(props) {
|
|
|
246
243
|
Header-TextNative4
|
|
247
244
|
font-bold
|
|
248
245
|
flex-1
|
|
249
|
-
${styles.
|
|
250
|
-
${styles.PANEL_HEADER_TEXT_FONTSIZE}
|
|
246
|
+
${styles.PANEL_HEADER_TEXT_CLASSNAME}
|
|
251
247
|
`}>{title}</TextNative>
|
|
252
248
|
{collapseBtn}
|
|
253
249
|
</HStack>
|
|
@@ -155,10 +155,10 @@ function TabBar(props) {
|
|
|
155
155
|
buttonProps = {
|
|
156
156
|
className: `
|
|
157
157
|
${styles.TAB_BG}
|
|
158
|
+
${isCollapsed ? 'justify-center' : 'justify-start'}
|
|
158
159
|
${styles.TAB_BG_HOVER}
|
|
159
160
|
${styles.TAB_BG_ACTIVE}
|
|
160
161
|
${styles.TAB_BG_DISABLED}
|
|
161
|
-
${isCollapsed ? 'justify-center' : 'justify-start'}
|
|
162
162
|
`,
|
|
163
163
|
},
|
|
164
164
|
textProps = {
|
|
@@ -496,10 +496,10 @@ function TabBar(props) {
|
|
|
496
496
|
className={`
|
|
497
497
|
${isCollapsed ? 'w-[50px]' : 'w-[' + tabWidth + 'px]'}
|
|
498
498
|
${isCollapsed ? 'pl-1' : 'pl-4'}
|
|
499
|
-
${styles.TAB_BAR_BG}
|
|
500
499
|
items-center
|
|
501
500
|
justify-start
|
|
502
501
|
py-2
|
|
502
|
+
${styles.TAB_BAR_CLASSNAME}
|
|
503
503
|
`}
|
|
504
504
|
>
|
|
505
505
|
{renderedTabs}
|
|
@@ -521,11 +521,11 @@ function TabBar(props) {
|
|
|
521
521
|
{...testProps('TabBar')}
|
|
522
522
|
className={`
|
|
523
523
|
${isCollapsed ? 'h-[38px]' : 'h-[' + tabHeight + 'px]'}
|
|
524
|
-
${styles.TAB_BAR_BG}
|
|
525
524
|
items-center
|
|
526
525
|
justify-start
|
|
527
526
|
p-1
|
|
528
527
|
pb-0
|
|
528
|
+
${styles.TAB_BAR_CLASSNAME}
|
|
529
529
|
`}
|
|
530
530
|
>
|
|
531
531
|
<ScrollView
|
|
@@ -1380,7 +1380,7 @@ function TreeComponent(props) {
|
|
|
1380
1380
|
<ScrollView {...testProps('ScrollView')} className="ScrollView flex-1 w-full">
|
|
1381
1381
|
{!treeNodes?.length ?
|
|
1382
1382
|
<CenterBox>
|
|
1383
|
-
<NoRecordsFound text={noneFoundText} onRefresh={reloadTree} />
|
|
1383
|
+
{Repository.isLoading ? <Loading /> : <NoRecordsFound text={noneFoundText} onRefresh={reloadTree} />}
|
|
1384
1384
|
</CenterBox> :
|
|
1385
1385
|
treeNodes}
|
|
1386
1386
|
</ScrollView>
|
|
@@ -65,7 +65,7 @@ export default function TreeNode(props) {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
let className = `
|
|
68
|
-
|
|
68
|
+
TreeNode
|
|
69
69
|
items-center
|
|
70
70
|
flex
|
|
71
71
|
flex-1
|
|
@@ -101,15 +101,13 @@ export default function TreeNode(props) {
|
|
|
101
101
|
ellipsizeMode="head"
|
|
102
102
|
// {...propsToPass}
|
|
103
103
|
className={`
|
|
104
|
-
|
|
104
|
+
TreeNode-TextNative
|
|
105
105
|
self-center
|
|
106
106
|
overflow-hidden
|
|
107
107
|
flex
|
|
108
108
|
flex-1
|
|
109
109
|
text-ellipsis
|
|
110
|
-
${styles.
|
|
111
|
-
${styles.TREE_NODE_PX}
|
|
112
|
-
${styles.TREE_NODE_FONTSIZE}
|
|
110
|
+
${styles.TREE_NODE_CLASSNAME}
|
|
113
111
|
`}
|
|
114
112
|
style={{ userSelect: 'none', }}
|
|
115
113
|
>{text}</TextNative>
|
package/src/Constants/Styles.js
CHANGED
|
@@ -11,77 +11,63 @@ const defaults = {
|
|
|
11
11
|
ATTACHMENTS_MAX_FILESIZE: 1024 * 1024 * 5, // 5MB
|
|
12
12
|
DEFAULT_WINDOW_WIDTH: 900,
|
|
13
13
|
DEFAULT_WINDOW_HEIGHT: 800,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
FORM_COMBO_INPUT_BG_FOCUS: 'focus:bg-' + FOCUS,
|
|
14
|
+
FILTER_LABEL_CLASSNAME: 'text-' + DEFAULT_FONTSIZE,
|
|
15
|
+
FORM_ANCILLARY_TITLE_CLASSNAME: 'text-[22px]',
|
|
16
|
+
FORM_ANCILLARY_DESCRIPTION_CLASSNAME: 'text-[16px]',
|
|
17
|
+
FORM_COLOR_INPUT_CLASSNAME: 'text-' + DEFAULT_FONTSIZE + ' ' +
|
|
18
|
+
'bg-' + WHITE + ' ' +
|
|
19
|
+
'focus:bg-' + FOCUS,
|
|
20
|
+
FORM_COMBO_INPUT_CLASSNAME: 'text-' + DEFAULT_FONTSIZE + ' ' +
|
|
21
|
+
'bg-' + WHITE + ' ' +
|
|
22
|
+
'focus:bg-' + FOCUS,
|
|
24
23
|
FORM_COMBO_MENU_HEIGHT: 250,
|
|
25
24
|
FORM_COMBO_MENU_MIN_WIDTH: 250,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
FORM_COMBO_TRIGGER_CLASSNAME: 'bg-' + WHITE + ' ' +
|
|
26
|
+
'hover:bg-grey-300',
|
|
27
|
+
FORM_DATE_CLASSNAME: 'h-[40px]',
|
|
28
|
+
FORM_DATE_TRIGGER_CLASSNAME: 'bg-primary-200 ' +
|
|
29
|
+
'hover:bg-primary-400',
|
|
30
|
+
FORM_DATE_TRIGGER_ICON_CLASSNAME: 'text-' + WHITE,
|
|
31
|
+
FORM_DATE_INPUT_CLASSNAME: 'bg-' + WHITE + ' ' +
|
|
32
|
+
'focus:bg-' + FOCUS + ' ' +
|
|
33
|
+
'text-' + DEFAULT_FONTSIZE,
|
|
34
34
|
FORM_FIELDSET_FONTSIZE: 'text-' + DEFAULT_FONTSIZE,
|
|
35
35
|
FORM_FIELDSET_BG: 'bg-[#f6f6f6]',
|
|
36
|
-
FORM_FILE_ICON_BG: 'bg-primary-200',
|
|
37
|
-
FORM_FILE_ICON_BG_HOVER: 'hover:bg-primary-400',
|
|
38
|
-
FORM_FILE_ICON_COLOR: 'text-' + WHITE,
|
|
39
|
-
FORM_FILE_INPUT_FONTSIZE: 'text-' + DEFAULT_FONTSIZE,
|
|
40
|
-
FORM_FILE_READOUT_FONTSIZE: 'text-' + DEFAULT_FONTSIZE,
|
|
41
|
-
FORM_FILE_READOUT_BG: 'bg-' + WHITE,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
FORM_TAG_MB: 'mb-1',
|
|
54
|
-
FORM_TAG_MIN_HEIGHT: 'min-h-10',
|
|
55
|
-
FORM_TAG_PADDING: 'p-1',
|
|
56
|
-
FORM_TAG_VALUEBOX_FONTSIZE: 'text-' + DEFAULT_FONTSIZE,
|
|
36
|
+
// FORM_FILE_ICON_BG: 'bg-primary-200',
|
|
37
|
+
// FORM_FILE_ICON_BG_HOVER: 'hover:bg-primary-400',
|
|
38
|
+
// FORM_FILE_ICON_COLOR: 'text-' + WHITE,
|
|
39
|
+
// FORM_FILE_INPUT_FONTSIZE: 'text-' + DEFAULT_FONTSIZE,
|
|
40
|
+
// FORM_FILE_READOUT_FONTSIZE: 'text-' + DEFAULT_FONTSIZE,
|
|
41
|
+
// FORM_FILE_READOUT_BG: 'bg-' + WHITE,
|
|
42
|
+
FORM_INPUT_CLASSNAME: 'bg-' + WHITE + ' ' +
|
|
43
|
+
'focus:bg-' + FOCUS + ' ' +
|
|
44
|
+
'hover:bg-' + HOVER,
|
|
45
|
+
FORM_INPUT_FIELD_CLASSNAME: 'text-' + DEFAULT_FONTSIZE,
|
|
46
|
+
FORM_LABEL_CLASSNAME: 'text-' + DEFAULT_FONTSIZE,
|
|
47
|
+
FORM_SELECT_CLASSNAME: 'text-' + DEFAULT_FONTSIZE + ' ' +
|
|
48
|
+
'bg-grey-100 ' +
|
|
49
|
+
'focus:bg-' + FOCUS + ' ' +
|
|
50
|
+
'hover:bg-' + HOVER,
|
|
51
|
+
FORM_TAG_CLASSNAME: '',
|
|
52
|
+
FORM_TAG_VALUEBOX_CLASSNAME: 'text-' + DEFAULT_FONTSIZE,
|
|
57
53
|
FORM_TAG_VALUEBOX_ICON_SIZE: 'sm',
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
FORM_TEXT_CLASSNAME: 'text-' + DEFAULT_FONTSIZE,
|
|
55
|
+
FORM_TEXTAREA_CLASSNAME: 'bg-' + WHITE + ' ' +
|
|
56
|
+
'text-' + DEFAULT_FONTSIZE + ' ' +
|
|
57
|
+
'h-[130px]',
|
|
62
58
|
FORM_TOGGLE_BG: null,
|
|
63
|
-
|
|
59
|
+
FORM_TOGGLE_READOUT_CLASSNAME: 'text-' + DEFAULT_FONTSIZE,
|
|
64
60
|
FORM_TOGGLE_SIZE: 'md',
|
|
65
61
|
FORM_TOGGLE_ON_COLOR: '#0b0',
|
|
66
|
-
FORM_TOGGLE_ON_HOVER_COLOR: '#090',
|
|
67
62
|
FORM_TOGGLE_OFF_COLOR: '#f00',
|
|
68
|
-
FORM_TOGGLE_OFF_HOVER_COLOR: '#c00',
|
|
69
63
|
FORM_ONE_COLUMN_THRESHOLD: 900, // only allow one column in form unless form is wider than this
|
|
70
64
|
FORM_STACK_ROW_THRESHOLD: 400, // stack labels & fields if row is less than this width
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
GRID_HEADER_FONTSIZE: 'text-' + DEFAULT_FONTSIZE,
|
|
77
|
-
GRID_HEADER_CELL_PX: 'px-2',
|
|
78
|
-
GRID_HEADER_CELL_PY: 'py-3',
|
|
79
|
-
GRID_HEADER_ICON_MT: 'mt-3',
|
|
80
|
-
GRID_HEADER_ICON_MR: 'mt-2',
|
|
65
|
+
GRID_CELL_CLASSNAME: 'text-' + DEFAULT_FONTSIZE,
|
|
66
|
+
GRID_HEADER_PRESSABLE_CLASSNAME: 'bg-[#eee] ' +
|
|
67
|
+
'hover:bg-[#ddd]',
|
|
68
|
+
GRID_HEADER_CLASSNAME: 'text-' + DEFAULT_FONTSIZE,
|
|
69
|
+
GRID_HEADER_ICON_CLASSNAME: 'mt-3 mr-2',
|
|
81
70
|
GRID_HEADER_ICON_SIZE: 'sm',
|
|
82
|
-
GRID_INLINE_EDITOR_BORDER_TOP_COLOR: 'border-t-primary-100',
|
|
83
|
-
GRID_INLINE_EDITOR_BORDER_BOTTOM_COLOR: 'border-b-primary-100',
|
|
84
|
-
GRID_INLINE_EDITOR_BG: 'bg-primary-700',
|
|
85
71
|
GRID_NAV_COLUMN_COLOR: 'text-grey-400',
|
|
86
72
|
GRID_ROW_BG: '#fff', // must be hex
|
|
87
73
|
GRID_ROW_ALTERNATE_BG: '#ddd', // must be hex
|
|
@@ -91,25 +77,22 @@ const defaults = {
|
|
|
91
77
|
GRID_REORDER_BORDER_COLOR: 'border-[#23d9ea]',
|
|
92
78
|
GRID_REORDER_BORDER_WIDTH: 'border-4',
|
|
93
79
|
GRID_REORDER_BORDER_STYLE: 'border-dashed',
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
ICON_BUTTON_BG_ACTIVE_HOVER: 'hover:bg-grey-200',
|
|
99
|
-
ICON_BUTTON_PX: 'px-[10px]',
|
|
100
|
-
ICON_BUTTON_PY: 'py-[10px]',
|
|
80
|
+
ICON_BUTTON_CLASSNAME: 'bg-grey-100 ' +
|
|
81
|
+
'active:bg-grey-900/50 ' +
|
|
82
|
+
'disabled:bg-grey-200 ' +
|
|
83
|
+
'hover:bg-grey-900/20',
|
|
101
84
|
INLINE_EDITOR_MIN_WIDTH: 'min-w-[150px]',
|
|
102
|
-
|
|
85
|
+
PANEL_FOOTER_CLASSNAME: 'border-t-primary-300', // :alpha.50
|
|
103
86
|
PANEL_HEADER_BG: 'bg-primary-500',
|
|
104
|
-
|
|
87
|
+
PANEL_HEADER_ICON_CLASSNAME: 'text-' + WHITE,
|
|
105
88
|
PANEL_HEADER_ICON_SIZE: 'md',
|
|
106
|
-
|
|
107
|
-
|
|
89
|
+
PANEL_HEADER_TEXT_CLASSNAME: 'text-' + WHITE + ' ' +
|
|
90
|
+
'text-[18px]',
|
|
108
91
|
SLIDER_MIN_TRACK_COLOR: '#000',
|
|
109
92
|
SLIDER_MAX_TRACK_COLOR: '#ccc',
|
|
110
93
|
SLIDER_THUMB_COLOR: '#000',
|
|
111
94
|
SLIDER_READOUT_FONTSIZE: 'text-' + DEFAULT_FONTSIZE,
|
|
112
|
-
|
|
95
|
+
TAB_BAR_CLASSNAME: 'bg-grey-300',
|
|
113
96
|
TAB_BG: 'bg-grey-300',
|
|
114
97
|
TAB_BG_ACTIVE: 'active:bg-grey-900/50',
|
|
115
98
|
TAB_BG_CURRENT: 'bg-grey-0',
|
|
@@ -127,17 +110,16 @@ const defaults = {
|
|
|
127
110
|
TAB_ICON_COLOR_DISABLED: 'group-disabled/button:text-grey-400',
|
|
128
111
|
TAB_FONTSIZE: 'text-md',
|
|
129
112
|
TEXT_FONTSIZE: 'text-' + DEFAULT_FONTSIZE,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
113
|
+
TREE_NODE_CLASSNAME: 'text-' + DEFAULT_FONTSIZE + ' ' +
|
|
114
|
+
'px-2 ' +
|
|
115
|
+
'py-3',
|
|
133
116
|
TREE_NODE_BG: '#fff', // must be hex
|
|
134
117
|
TREE_NODE_BG_HOVER: '#cce', // must be hex
|
|
135
118
|
TREE_NODE_SELECTED_BG: '#ff0', // must be hex
|
|
136
119
|
TREE_NODE_SELECTED_BG_HOVER: '#cc0', // must be hex
|
|
137
120
|
TREE_NODE_HIGHLIGHTED_BG: '#0f0', // must be hex
|
|
138
|
-
|
|
121
|
+
TOOLBAR_CLASSNAME: 'bg-grey-200',
|
|
139
122
|
TOOLBAR_ITEMS_COLOR: 'text-grey-800',
|
|
140
|
-
TOOLBAR_ITEMS_DISABLED_COLOR: 'disabled:text-grey-400',
|
|
141
123
|
TOOLBAR_ITEMS_ICON_SIZE: 'sm',
|
|
142
124
|
VIEWER_ANCILLARY_FONTSIZE: 'text-[22px]',
|
|
143
125
|
};
|