@onehat/ui 0.4.69 → 0.4.71
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 +2 -1
- package/src/Components/Accordion/Accordion.js +1 -0
- package/src/Components/Blank.js +1 -0
- package/src/Components/Buttons/BackButton.js +1 -0
- package/src/Components/Buttons/Button.js +5 -4
- package/src/Components/Buttons/CartButtonWithBadge.js +1 -0
- package/src/Components/Buttons/IconButton.js +9 -8
- package/src/Components/Buttons/PlusMinusButton.js +5 -4
- package/src/Components/Buttons/SquareButton.js +19 -18
- package/src/Components/Container/Container.js +1 -0
- package/src/Components/Container/ContainerColumn.js +4 -3
- package/src/Components/Container/ScreenContainer.js +13 -13
- package/src/Components/Container/Splitter.js +33 -28
- package/src/Components/Editor/InlineEditor.js +32 -30
- package/src/Components/Fab/DynamicFab.js +14 -13
- package/src/Components/Fab/FabWithTooltip.js +1 -0
- package/src/Components/Filter/DateRange.js +8 -7
- package/src/Components/Filter/NumberRange.js +8 -7
- package/src/Components/Form/Field/CKEditor/CKEditor.js +1 -0
- package/src/Components/Form/Field/Checkbox/CheckboxGroup.js +1 -0
- package/src/Components/Form/Field/Color.js +41 -40
- package/src/Components/Form/Field/Combo/Combo.js +173 -172
- package/src/Components/Form/Field/Combo/PageSizeCombo.js +1 -0
- package/src/Components/Form/Field/Date.js +117 -116
- package/src/Components/Form/Field/DisplayField.js +6 -5
- package/src/Components/Form/Field/File.js +1 -0
- package/src/Components/Form/Field/FormikForm.js +1 -0
- package/src/Components/Form/Field/Input.js +15 -14
- package/src/Components/Form/Field/Json.js +8 -6
- package/src/Components/Form/Field/Number.js +31 -30
- package/src/Components/Form/Field/RadioGroup/RadioGroup.js +1 -0
- package/src/Components/Form/Field/Select/PageSizeSelect.js +1 -0
- package/src/Components/Form/Field/Select/Select.js +9 -8
- package/src/Components/Form/Field/Slider.js +15 -14
- package/src/Components/Form/Field/Tag/Tag.js +25 -24
- package/src/Components/Form/Field/Tag/ValueBox.js +32 -31
- package/src/Components/Form/Field/Text.js +9 -8
- package/src/Components/Form/Field/TextArea.js +9 -8
- package/src/Components/Form/Field/Toggle.js +16 -15
- package/src/Components/Form/FieldSet.js +27 -26
- package/src/Components/Form/Form.js +105 -104
- package/src/Components/Form/Label.js +15 -14
- package/src/Components/Grid/Grid.js +48 -46
- package/src/Components/Grid/GridHeaderRow.js +42 -40
- package/src/Components/Grid/GridRow.js +119 -80
- package/src/Components/Grid/HeaderColumnSelectorHandle.js +9 -8
- package/src/Components/Grid/HeaderReorderHandle.js +9 -8
- package/src/Components/Grid/HeaderResizeHandle.js +9 -8
- package/src/Components/Grid/NoRecordsFound.js +4 -3
- package/src/Components/Grid/RowDragHandle.js +1 -0
- package/src/Components/Grid/RowSelectHandle.js +1 -0
- package/src/Components/Hoc/Secondary/withSecondaryEditor.js +1 -1
- package/src/Components/Hoc/Secondary/withSecondaryWindowedEditor.js +6 -5
- package/src/Components/Hoc/withAlert.js +35 -34
- package/src/Components/Hoc/withContextMenu.js +27 -26
- package/src/Components/Hoc/withDnd.js +1 -0
- package/src/Components/Hoc/withEditor.js +1 -1
- package/src/Components/Hoc/withFilters.js +19 -18
- package/src/Components/Hoc/withModal.js +7 -6
- package/src/Components/Hoc/withToast.js +1 -0
- package/src/Components/Hoc/withWindowedEditor.js +6 -5
- package/src/Components/Layout/AsyncOperation.js +1 -0
- package/src/Components/Layout/CenterBox.js +9 -8
- package/src/Components/Layout/Footer.js +11 -10
- package/src/Components/Layout/ScreenHeader.js +5 -4
- package/src/Components/Layout/TextWithTooltip.js +1 -0
- package/src/Components/Messages/ConfirmationMessage.js +6 -5
- package/src/Components/Messages/ErrorMessage.js +40 -39
- package/src/Components/Messages/Loading.js +1 -0
- package/src/Components/Messages/OkMessage.js +11 -10
- package/src/Components/Messages/Unauthorized.js +1 -0
- package/src/Components/Messages/WaitMessage.js +16 -15
- package/src/Components/Panel/AccordionGridPanel.js +1 -0
- package/src/Components/Panel/FormPanel.js +1 -0
- package/src/Components/Panel/Header.js +59 -58
- package/src/Components/Panel/Mask.js +1 -0
- package/src/Components/Panel/Panel.js +7 -6
- package/src/Components/Picker/Picker.js +1 -0
- package/src/Components/Report/Report.js +35 -34
- package/src/Components/Screens/Manager.js +1 -0
- package/src/Components/Screens/ReportsManager.js +1 -0
- package/src/Components/Tab/Tab.js +1 -0
- package/src/Components/Tab/TabBar.js +67 -66
- package/src/Components/Toolbar/FilterToolbar.js +14 -11
- package/src/Components/Toolbar/Pagination.js +26 -25
- package/src/Components/Toolbar/PaginationToolbar.js +13 -12
- package/src/Components/Toolbar/Toolbar.js +13 -12
- package/src/Components/Tooltip/Tooltip.js +1 -0
- package/src/Components/Tree/Tree.js +12 -11
- package/src/Components/Tree/TreeNode.js +20 -19
- package/src/Components/Tree/TreeNodeDragHandle.js +11 -10
- package/src/Components/Viewer/MeterTypeText.js +8 -7
- package/src/Components/Viewer/TextWithLinks.js +16 -15
- package/src/Components/Viewer/Viewer.js +23 -22
- package/src/Components/Window/UploadsDownloadsWindow.js +6 -5
- package/src/Components/index.js +1 -0
- package/src/Hooks/useAsyncRenderers.js +53 -0
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
Pressable,
|
|
6
6
|
Tooltip,
|
|
7
7
|
} from '@project-components/Gluestack';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import { SketchPicker } from 'react-color';
|
|
9
10
|
import {
|
|
10
11
|
UI_MODE_WEB,
|
|
@@ -137,12 +138,12 @@ export function ColorElement(props) {
|
|
|
137
138
|
assembledComponents =
|
|
138
139
|
<HStackNative
|
|
139
140
|
onLayout={() => setIsRendered(true)}
|
|
140
|
-
className={
|
|
141
|
-
ColorElement-HStackNative
|
|
142
|
-
flex-1
|
|
143
|
-
h-full
|
|
144
|
-
items-center
|
|
145
|
-
|
|
141
|
+
className={clsx(
|
|
142
|
+
'ColorElement-HStackNative',
|
|
143
|
+
'flex-1',
|
|
144
|
+
'h-full',
|
|
145
|
+
'items-center',
|
|
146
|
+
)}
|
|
146
147
|
>
|
|
147
148
|
<Pressable
|
|
148
149
|
ref={triggerRef}
|
|
@@ -152,14 +153,14 @@ export function ColorElement(props) {
|
|
|
152
153
|
borderBottomLeftRadius={6}
|
|
153
154
|
borderTopRightRadius={0}
|
|
154
155
|
borderBottomRightRadius={0}
|
|
155
|
-
className={
|
|
156
|
-
ColorElement-Pressable
|
|
157
|
-
bg-${value}
|
|
158
|
-
h-[10px]
|
|
159
|
-
w-[10px]
|
|
160
|
-
border
|
|
161
|
-
border-grey-300
|
|
162
|
-
|
|
156
|
+
className={clsx(
|
|
157
|
+
'ColorElement-Pressable',
|
|
158
|
+
`bg-${value}`,
|
|
159
|
+
'h-[10px]',
|
|
160
|
+
'w-[10px]',
|
|
161
|
+
'border',
|
|
162
|
+
'border-grey-300',
|
|
163
|
+
)}
|
|
163
164
|
/>
|
|
164
165
|
<Input
|
|
165
166
|
ref={inputRef}
|
|
@@ -168,20 +169,20 @@ export function ColorElement(props) {
|
|
|
168
169
|
maxLength={7}
|
|
169
170
|
onBlur={onInputBlur}
|
|
170
171
|
onClick={onInputClick}
|
|
171
|
-
className={
|
|
172
|
-
ColorElement-Input
|
|
173
|
-
flex-1
|
|
174
|
-
h-full
|
|
175
|
-
p-2
|
|
176
|
-
border
|
|
177
|
-
border-grey-300
|
|
178
|
-
border-left-0
|
|
179
|
-
border-top-left-radius-0
|
|
180
|
-
border-bottom-left-radius-0
|
|
181
|
-
border-top-right-radius-6
|
|
182
|
-
border-bottom-right-radius-6
|
|
183
|
-
|
|
184
|
-
|
|
172
|
+
className={clsx(
|
|
173
|
+
'ColorElement-Input',
|
|
174
|
+
'flex-1',
|
|
175
|
+
'h-full',
|
|
176
|
+
'p-2',
|
|
177
|
+
'border',
|
|
178
|
+
'border-grey-300',
|
|
179
|
+
'border-left-0',
|
|
180
|
+
'border-top-left-radius-0',
|
|
181
|
+
'border-bottom-left-radius-0',
|
|
182
|
+
'border-top-right-radius-6',
|
|
183
|
+
'border-bottom-right-radius-6',
|
|
184
|
+
styles.FORM_COLOR_INPUT_CLASSNAME,
|
|
185
|
+
)}
|
|
185
186
|
textAlignIsCenter={true}
|
|
186
187
|
onLayout={(e) => {
|
|
187
188
|
// On web, this is not needed, but on RN it might be, so leave it in for now
|
|
@@ -202,17 +203,17 @@ export function ColorElement(props) {
|
|
|
202
203
|
trigger={emptyFn}
|
|
203
204
|
trapFocus={true}
|
|
204
205
|
placement={'auto'}
|
|
205
|
-
className={
|
|
206
|
-
ColorElement-Popover
|
|
207
|
-
|
|
206
|
+
className={clsx(
|
|
207
|
+
'ColorElement-Popover'
|
|
208
|
+
)}
|
|
208
209
|
>
|
|
209
210
|
<PopoverContent
|
|
210
211
|
position="absolute"
|
|
211
|
-
className={
|
|
212
|
-
ColorElement-PopoverContent
|
|
213
|
-
w-[220px]
|
|
214
|
-
h-[287px]
|
|
215
|
-
|
|
212
|
+
className={clsx(
|
|
213
|
+
'ColorElement-PopoverContent',
|
|
214
|
+
'w-[220px]',
|
|
215
|
+
'h-[287px]',
|
|
216
|
+
)}
|
|
216
217
|
style={{
|
|
217
218
|
top,
|
|
218
219
|
left,
|
|
@@ -221,10 +222,10 @@ export function ColorElement(props) {
|
|
|
221
222
|
>
|
|
222
223
|
<PopoverBody
|
|
223
224
|
ref={pickerRef}
|
|
224
|
-
className={
|
|
225
|
-
ColorElement-PopoverBody
|
|
226
|
-
p-0
|
|
227
|
-
|
|
225
|
+
className={clsx(
|
|
226
|
+
'ColorElement-PopoverBody',
|
|
227
|
+
'p-0',
|
|
228
|
+
)}
|
|
228
229
|
>
|
|
229
230
|
<SketchPicker
|
|
230
231
|
disableAlpha={true}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
TextNative,
|
|
12
12
|
VStackNative,
|
|
13
13
|
} from '@project-components/Gluestack';
|
|
14
|
+
import clsx from 'clsx';
|
|
14
15
|
import {
|
|
15
16
|
UI_MODE_NATIVE,
|
|
16
17
|
UI_MODE_WEB,
|
|
@@ -558,11 +559,11 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
558
559
|
isDisabled={isDisabled || _.isNil(value)}
|
|
559
560
|
onPress={onXButtonPress}
|
|
560
561
|
tooltip="Clear selection"
|
|
561
|
-
className={
|
|
562
|
-
h-full
|
|
563
|
-
mr-1
|
|
564
|
-
|
|
565
|
-
|
|
562
|
+
className={clsx(
|
|
563
|
+
'h-full',
|
|
564
|
+
'mr-1',
|
|
565
|
+
styles.FORM_COMBO_TRIGGER_CLASSNAME
|
|
566
|
+
)}
|
|
566
567
|
/>;
|
|
567
568
|
}
|
|
568
569
|
if (showEyeButton && Editor) {
|
|
@@ -576,24 +577,24 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
576
577
|
isDisabled={isDisabled || _.isNil(value)}
|
|
577
578
|
onPress={onEyeButtonPress}
|
|
578
579
|
tooltip="View selected record"
|
|
579
|
-
className={
|
|
580
|
-
h-full
|
|
581
|
-
mr-1
|
|
582
|
-
|
|
583
|
-
|
|
580
|
+
className={clsx(
|
|
581
|
+
'h-full',
|
|
582
|
+
'mr-1',
|
|
583
|
+
styles.FORM_COMBO_TRIGGER_CLASSNAME
|
|
584
|
+
)}
|
|
584
585
|
/>;
|
|
585
586
|
}
|
|
586
|
-
const triggerClassName =
|
|
587
|
-
Combo-trigger
|
|
588
|
-
self-stretch
|
|
589
|
-
h-auto
|
|
590
|
-
border
|
|
591
|
-
border-l-0
|
|
592
|
-
border-gray-400
|
|
593
|
-
rounded-l-none
|
|
594
|
-
rounded-r-md
|
|
595
|
-
|
|
596
|
-
|
|
587
|
+
const triggerClassName = clsx(
|
|
588
|
+
'Combo-trigger',
|
|
589
|
+
'self-stretch',
|
|
590
|
+
'h-auto',
|
|
591
|
+
'border',
|
|
592
|
+
'border-l-0',
|
|
593
|
+
'border-gray-400',
|
|
594
|
+
'rounded-l-none',
|
|
595
|
+
'rounded-r-md',
|
|
596
|
+
styles.FORM_COMBO_TRIGGER_CLASSNAME,
|
|
597
|
+
);
|
|
597
598
|
trigger = <IconButton
|
|
598
599
|
{...testProps('trigger')}
|
|
599
600
|
ref={triggerRef}
|
|
@@ -614,33 +615,33 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
614
615
|
{...testProps('toggleMenuBtn')}
|
|
615
616
|
ref={inputRef}
|
|
616
617
|
onPress={toggleMenu}
|
|
617
|
-
className={
|
|
618
|
-
Combo-toggleMenuBtn
|
|
619
|
-
h-auto
|
|
620
|
-
self-stretch
|
|
621
|
-
flex-1
|
|
622
|
-
flex-row
|
|
623
|
-
justify-center
|
|
624
|
-
items-center
|
|
625
|
-
m-0
|
|
626
|
-
p-2
|
|
627
|
-
bg-white
|
|
628
|
-
border
|
|
629
|
-
border-grey-400
|
|
630
|
-
rounded-r-none
|
|
631
|
-
|
|
632
|
-
|
|
618
|
+
className={clsx(
|
|
619
|
+
'Combo-toggleMenuBtn',
|
|
620
|
+
'h-auto',
|
|
621
|
+
'self-stretch',
|
|
622
|
+
'flex-1',
|
|
623
|
+
'flex-row',
|
|
624
|
+
'justify-center',
|
|
625
|
+
'items-center',
|
|
626
|
+
'm-0',
|
|
627
|
+
'p-2',
|
|
628
|
+
'bg-white',
|
|
629
|
+
'border',
|
|
630
|
+
'border-grey-400',
|
|
631
|
+
'rounded-r-none',
|
|
632
|
+
styles.FORM_COMBO_INPUT_BG
|
|
633
|
+
)}
|
|
633
634
|
>
|
|
634
635
|
{inputIconElement}
|
|
635
636
|
<TextNative
|
|
636
637
|
numberOfLines={1}
|
|
637
638
|
ellipsizeMode="head"
|
|
638
|
-
className={
|
|
639
|
-
Combo-TextNative
|
|
640
|
-
flex-1
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
639
|
+
className={clsx(
|
|
640
|
+
'Combo-TextNative',
|
|
641
|
+
'flex-1',
|
|
642
|
+
_.isEmpty(textInputValue) ? 'text-grey-400' : 'text-black',
|
|
643
|
+
styles.FORM_COMBO_INPUT_CLASSNAME
|
|
644
|
+
)}
|
|
644
645
|
>{_.isEmpty(textInputValue) ? placeholder : textInputValue}</TextNative>
|
|
645
646
|
</Pressable> :
|
|
646
647
|
<Input
|
|
@@ -659,23 +660,23 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
659
660
|
placeholder={placeholder}
|
|
660
661
|
tooltip={tooltip}
|
|
661
662
|
tooltipPlacement={tooltipPlacement}
|
|
662
|
-
tooltipTriggerClassName={
|
|
663
|
-
grow
|
|
664
|
-
h-auto
|
|
665
|
-
self-stretch
|
|
666
|
-
flex-1
|
|
667
|
-
|
|
668
|
-
className={
|
|
669
|
-
Combo-Input
|
|
670
|
-
grow
|
|
671
|
-
h-auto
|
|
672
|
-
self-stretch
|
|
673
|
-
flex-1
|
|
674
|
-
m-0
|
|
675
|
-
rounded-tr-none
|
|
676
|
-
rounded-br-none
|
|
677
|
-
|
|
678
|
-
|
|
663
|
+
tooltipTriggerClassName={clsx(
|
|
664
|
+
'grow',
|
|
665
|
+
'h-auto',
|
|
666
|
+
'self-stretch',
|
|
667
|
+
'flex-1'
|
|
668
|
+
)}
|
|
669
|
+
className={clsx(
|
|
670
|
+
'Combo-Input',
|
|
671
|
+
'grow',
|
|
672
|
+
'h-auto',
|
|
673
|
+
'self-stretch',
|
|
674
|
+
'flex-1',
|
|
675
|
+
'm-0',
|
|
676
|
+
'rounded-tr-none',
|
|
677
|
+
'rounded-br-none',
|
|
678
|
+
styles.FORM_COMBO_INPUT_CLASSNAME
|
|
679
|
+
)}
|
|
679
680
|
{..._input}
|
|
680
681
|
/>;
|
|
681
682
|
}
|
|
@@ -687,30 +688,30 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
687
688
|
input = <Pressable
|
|
688
689
|
{...testProps('showMenuBtn')}
|
|
689
690
|
onPress={showMenu}
|
|
690
|
-
className={
|
|
691
|
-
h-full
|
|
692
|
-
flex-1
|
|
693
|
-
flex-row
|
|
694
|
-
justify-center
|
|
695
|
-
items-center
|
|
696
|
-
border
|
|
697
|
-
border-grey-400
|
|
698
|
-
rounded-r-none
|
|
699
|
-
|
|
700
|
-
|
|
691
|
+
className={clsx(
|
|
692
|
+
'h-full',
|
|
693
|
+
'flex-1',
|
|
694
|
+
'flex-row',
|
|
695
|
+
'justify-center',
|
|
696
|
+
'items-center',
|
|
697
|
+
'border',
|
|
698
|
+
'border-grey-400',
|
|
699
|
+
'rounded-r-none',
|
|
700
|
+
styles.FORM_COMBO_INPUT_BG,
|
|
701
|
+
)}
|
|
701
702
|
>
|
|
702
703
|
{inputIconElement}
|
|
703
704
|
<TextNative
|
|
704
705
|
numberOfLines={1}
|
|
705
706
|
ellipsizeMode="head"
|
|
706
|
-
className={
|
|
707
|
-
h-full
|
|
708
|
-
flex-1
|
|
709
|
-
m-0
|
|
710
|
-
p-1
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
707
|
+
className={clsx(
|
|
708
|
+
'h-full',
|
|
709
|
+
'flex-1',
|
|
710
|
+
'm-0',
|
|
711
|
+
'p-1',
|
|
712
|
+
_.isEmpty(displayValue) ? 'text-grey-400' : 'text-black',
|
|
713
|
+
styles.FORM_COMBO_INPUT_CLASSNAME,
|
|
714
|
+
)}
|
|
714
715
|
>{_.isEmpty(displayValue) ? placeholder : displayValue}</TextNative>
|
|
715
716
|
</Pressable>;
|
|
716
717
|
}
|
|
@@ -752,14 +753,14 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
752
753
|
showHovers={true}
|
|
753
754
|
getRowProps={() => {
|
|
754
755
|
return {
|
|
755
|
-
className:
|
|
756
|
-
w-full
|
|
757
|
-
pl-4
|
|
758
|
-
pr-2
|
|
759
|
-
py-1
|
|
760
|
-
border-b-1
|
|
761
|
-
border-grey-300
|
|
762
|
-
|
|
756
|
+
className: clsx(
|
|
757
|
+
'w-full',
|
|
758
|
+
'pl-4',
|
|
759
|
+
'pr-2',
|
|
760
|
+
'py-1',
|
|
761
|
+
'border-b-1',
|
|
762
|
+
'border-grey-300',
|
|
763
|
+
),
|
|
763
764
|
};
|
|
764
765
|
}}
|
|
765
766
|
autoAdjustPageSizeToHeight={false}
|
|
@@ -871,9 +872,9 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
871
872
|
}}
|
|
872
873
|
reference="grid"
|
|
873
874
|
parent={self}
|
|
874
|
-
className={
|
|
875
|
-
h-full
|
|
876
|
-
|
|
875
|
+
className={clsx(
|
|
876
|
+
'h-full',
|
|
877
|
+
)}
|
|
877
878
|
style={gridStyle}
|
|
878
879
|
{...gridProps}
|
|
879
880
|
{..._editor}
|
|
@@ -902,21 +903,21 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
902
903
|
placeholder={placeholder}
|
|
903
904
|
tooltip={tooltip}
|
|
904
905
|
tooltipPlacement={tooltipPlacement}
|
|
905
|
-
tooltipTriggerClassName={
|
|
906
|
-
grow
|
|
907
|
-
h-full
|
|
908
|
-
flex-1
|
|
909
|
-
|
|
910
|
-
className={
|
|
911
|
-
Combo-inputClone-Input
|
|
912
|
-
grow
|
|
913
|
-
h-full
|
|
914
|
-
flex-1
|
|
915
|
-
m-0
|
|
916
|
-
rounded-tr-none
|
|
917
|
-
rounded-br-none
|
|
918
|
-
|
|
919
|
-
|
|
906
|
+
tooltipTriggerClassName={clsx(
|
|
907
|
+
'grow',
|
|
908
|
+
'h-full',
|
|
909
|
+
'flex-1'
|
|
910
|
+
)}
|
|
911
|
+
className={clsx(
|
|
912
|
+
'Combo-inputClone-Input',
|
|
913
|
+
'grow',
|
|
914
|
+
'h-full',
|
|
915
|
+
'flex-1',
|
|
916
|
+
'm-0',
|
|
917
|
+
'rounded-tr-none',
|
|
918
|
+
'rounded-br-none',
|
|
919
|
+
styles.FORM_COMBO_INPUT_CLASSNAME,
|
|
920
|
+
)}
|
|
920
921
|
{..._input}
|
|
921
922
|
/>
|
|
922
923
|
</Box>;
|
|
@@ -933,18 +934,18 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
933
934
|
<PopoverBackdrop className="PopoverBackdrop bg-[#000]" />
|
|
934
935
|
<Box
|
|
935
936
|
ref={menuRef}
|
|
936
|
-
className={
|
|
937
|
-
dropdownMenu-Box
|
|
938
|
-
flex-1
|
|
939
|
-
overflow-auto
|
|
940
|
-
bg-white
|
|
941
|
-
p-0
|
|
942
|
-
rounded-none
|
|
943
|
-
border
|
|
944
|
-
border-grey-400
|
|
945
|
-
shadow-md
|
|
946
|
-
max-w-full
|
|
947
|
-
|
|
937
|
+
className={clsx(
|
|
938
|
+
'dropdownMenu-Box',
|
|
939
|
+
'flex-1',
|
|
940
|
+
'overflow-auto',
|
|
941
|
+
'bg-white',
|
|
942
|
+
'p-0',
|
|
943
|
+
'rounded-none',
|
|
944
|
+
'border',
|
|
945
|
+
'border-grey-400',
|
|
946
|
+
'shadow-md',
|
|
947
|
+
'max-w-full',
|
|
948
|
+
)}
|
|
948
949
|
style={{
|
|
949
950
|
top,
|
|
950
951
|
left,
|
|
@@ -970,13 +971,13 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
970
971
|
}}
|
|
971
972
|
onPress={onCheckButtonPress}
|
|
972
973
|
isDisabled={!value}
|
|
973
|
-
className={
|
|
974
|
-
h-full
|
|
975
|
-
border
|
|
976
|
-
border-grey-400
|
|
977
|
-
rounded-md
|
|
978
|
-
|
|
979
|
-
|
|
974
|
+
className={clsx(
|
|
975
|
+
'h-full',
|
|
976
|
+
'border',
|
|
977
|
+
'border-grey-400',
|
|
978
|
+
'rounded-md',
|
|
979
|
+
styles.FORM_COMBO_TRIGGER_CLASSNAME,
|
|
980
|
+
)}
|
|
980
981
|
/>;
|
|
981
982
|
}
|
|
982
983
|
const inputAndTriggerClone = // for RN, this is the actual input and trigger, as we need them to appear up above in the modal
|
|
@@ -988,16 +989,16 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
988
989
|
ref={inputRef}
|
|
989
990
|
numberOfLines={1}
|
|
990
991
|
ellipsizeMode="head"
|
|
991
|
-
className={
|
|
992
|
-
h-full
|
|
993
|
-
flex-1
|
|
994
|
-
m-0
|
|
995
|
-
p-1
|
|
996
|
-
border
|
|
997
|
-
border-grey-400
|
|
998
|
-
rounded-r-none
|
|
999
|
-
|
|
1000
|
-
|
|
992
|
+
className={clsx(
|
|
993
|
+
'h-full',
|
|
994
|
+
'flex-1',
|
|
995
|
+
'm-0',
|
|
996
|
+
'p-1',
|
|
997
|
+
'border',
|
|
998
|
+
'border-grey-400',
|
|
999
|
+
'rounded-r-none',
|
|
1000
|
+
styles.FORM_COMBO_INPUT_CLASSNAME
|
|
1001
|
+
)}
|
|
1001
1002
|
>{textInputValue}</TextNative> :
|
|
1002
1003
|
<Input
|
|
1003
1004
|
{...testProps('input')}
|
|
@@ -1015,17 +1016,17 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
1015
1016
|
placeholder={placeholder}
|
|
1016
1017
|
tooltip={tooltip}
|
|
1017
1018
|
tooltipPlacement={tooltipPlacement}
|
|
1018
|
-
tooltipTriggerClassName={
|
|
1019
|
-
h-full
|
|
1020
|
-
flex-1
|
|
1021
|
-
|
|
1022
|
-
className={
|
|
1023
|
-
h-full
|
|
1024
|
-
flex-1
|
|
1025
|
-
m-0
|
|
1026
|
-
rounded-r-none
|
|
1027
|
-
|
|
1028
|
-
|
|
1019
|
+
tooltipTriggerClassName={clsx(
|
|
1020
|
+
'h-full',
|
|
1021
|
+
'flex-1'
|
|
1022
|
+
)}
|
|
1023
|
+
className={clsx(
|
|
1024
|
+
'h-full',
|
|
1025
|
+
'flex-1',
|
|
1026
|
+
'm-0',
|
|
1027
|
+
'rounded-r-none',
|
|
1028
|
+
styles.FORM_COMBO_INPUT_CLASSNAME,
|
|
1029
|
+
)}
|
|
1029
1030
|
{..._input}
|
|
1030
1031
|
/>}
|
|
1031
1032
|
<IconButton
|
|
@@ -1037,14 +1038,14 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
1037
1038
|
}}
|
|
1038
1039
|
isDisabled={isDisabled}
|
|
1039
1040
|
onPress={() => hideMenu()}
|
|
1040
|
-
className={
|
|
1041
|
-
h-full
|
|
1042
|
-
border
|
|
1043
|
-
border-grey-400
|
|
1044
|
-
rounded-l-none
|
|
1045
|
-
rounded-r-md
|
|
1046
|
-
|
|
1047
|
-
|
|
1041
|
+
className={clsx(
|
|
1042
|
+
'h-full',
|
|
1043
|
+
'border',
|
|
1044
|
+
'border-grey-400',
|
|
1045
|
+
'rounded-l-none',
|
|
1046
|
+
'rounded-r-md',
|
|
1047
|
+
styles.FORM_COMBO_TRIGGER_CLASSNAME,
|
|
1048
|
+
)}
|
|
1048
1049
|
/>
|
|
1049
1050
|
{checkButton}
|
|
1050
1051
|
</HStack>;
|
|
@@ -1052,12 +1053,12 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
1052
1053
|
isOpen={true}
|
|
1053
1054
|
safeAreaTop={true}
|
|
1054
1055
|
onClose={() => setIsMenuShown(false)}
|
|
1055
|
-
className={
|
|
1056
|
-
h-[400px]
|
|
1057
|
-
w-full
|
|
1058
|
-
my-auto
|
|
1059
|
-
p-[5px]
|
|
1060
|
-
|
|
1056
|
+
className={clsx(
|
|
1057
|
+
'h-[400px]',
|
|
1058
|
+
'w-full',
|
|
1059
|
+
'my-auto',
|
|
1060
|
+
'p-[5px]'
|
|
1061
|
+
)}
|
|
1061
1062
|
>
|
|
1062
1063
|
<ModalBackdrop />
|
|
1063
1064
|
<ModalContent>
|
|
@@ -1070,15 +1071,15 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
1070
1071
|
}
|
|
1071
1072
|
}
|
|
1072
1073
|
|
|
1073
|
-
let className =
|
|
1074
|
-
Combo-HStack
|
|
1075
|
-
flex-1
|
|
1076
|
-
items-stretch
|
|
1077
|
-
h-auto
|
|
1078
|
-
self-stretch
|
|
1079
|
-
justify-center
|
|
1080
|
-
items-stretch
|
|
1081
|
-
|
|
1074
|
+
let className = clsx(
|
|
1075
|
+
'Combo-HStack',
|
|
1076
|
+
'flex-1',
|
|
1077
|
+
'items-stretch',
|
|
1078
|
+
'h-auto',
|
|
1079
|
+
'self-stretch',
|
|
1080
|
+
'justify-center',
|
|
1081
|
+
'items-stretch'
|
|
1082
|
+
);
|
|
1082
1083
|
if (props.className) {
|
|
1083
1084
|
className += ' ' + props.className;
|
|
1084
1085
|
}
|
|
@@ -1153,10 +1154,10 @@ export const ComboComponent = forwardRef((props, ref) => {
|
|
|
1153
1154
|
reference="viewer"
|
|
1154
1155
|
selection={viewerSelection}
|
|
1155
1156
|
onEditorClose={onViewerClose}
|
|
1156
|
-
className={
|
|
1157
|
-
w-full
|
|
1158
|
-
p-0
|
|
1159
|
-
|
|
1157
|
+
className={clsx(
|
|
1158
|
+
'w-full',
|
|
1159
|
+
'p-0',
|
|
1160
|
+
)}
|
|
1160
1161
|
{...propsForViewer}
|
|
1161
1162
|
{...viewerProps}
|
|
1162
1163
|
/>
|