@onehat/ui 0.4.11 → 0.4.13

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.4.11",
3
+ "version": "0.4.13",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -545,7 +545,8 @@ export function ComboComponent(props) {
545
545
  }
546
546
  const triggerClassName = `
547
547
  Combo-trigger
548
- h-full
548
+ self-stretch
549
+ h-auto
549
550
  border
550
551
  border-l-0
551
552
  border-gray-400
@@ -575,7 +576,8 @@ export function ComboComponent(props) {
575
576
  onPress={toggleMenu}
576
577
  className={`
577
578
  toggleMenuBtn
578
- h-full
579
+ h-auto
580
+ self-stretch
579
581
  flex-1
580
582
  flex-row
581
583
  justify-center
@@ -595,7 +597,8 @@ export function ComboComponent(props) {
595
597
  ellipsizeMode="head"
596
598
  className={`
597
599
  Text
598
- h-full
600
+ h-auto
601
+ self-stretch
599
602
  flex-1
600
603
  ${_.isEmpty(textInputValue) ? "text-grey-400" : "text-black"}
601
604
  ${styles.FORM_COMBO_INPUT_FONTSIZE}
@@ -619,9 +622,8 @@ export function ComboComponent(props) {
619
622
  className={`
620
623
  ComboInput
621
624
  grow
622
- h-full
623
- min-h-0
624
- max-h-[40px]
625
+ h-auto
626
+ self-stretch
625
627
  flex-1
626
628
  m-0
627
629
  rounded-tr-none
@@ -1015,8 +1017,9 @@ export function ComboComponent(props) {
1015
1017
  let className = `
1016
1018
  Combo-HStack
1017
1019
  flex-1
1018
- h-[40px]
1019
- min-h-[40px]
1020
+ items-stretch
1021
+ h-auto
1022
+ self-stretch
1020
1023
  justify-center
1021
1024
  items-stretch
1022
1025
  `;
@@ -30,6 +30,7 @@ const InputElement = forwardRef((props, ref) => {
30
30
  rightIcon,
31
31
  rightIconHandler,
32
32
  placeholder,
33
+ textAlignIsCenter = true,
33
34
  className,
34
35
  ...propsToPass
35
36
  } = props,
@@ -118,11 +119,11 @@ const InputElement = forwardRef((props, ref) => {
118
119
  `,
119
120
  inputFieldClassName = `
120
121
  InputField
121
- min-h-[40px]
122
+ self-stretch
122
123
  h-auto
123
124
  w-full
124
125
  p-2
125
- text-center
126
+ ${textAlignIsCenter ? 'text-center' : 'text-left'}
126
127
  ${styles.FORM_INPUT_FONTSIZE}
127
128
  ${styles.FORM_INPUT_BG}
128
129
  ${styles.FORM_INPUT_BG_FOCUS}
@@ -1,5 +1,5 @@
1
1
  import {
2
- HStack,
2
+ HStackNative,
3
3
  Text,
4
4
  } from '@project-components/Gluestack';
5
5
  import testProps from '../../../../Functions/testProps.js';
@@ -16,7 +16,7 @@ export default function ValueBox(props) {
16
16
  onDelete,
17
17
  } = props,
18
18
  styles = UiGlobals.styles;
19
- return <HStack
19
+ return <HStackNative
20
20
  {...testProps('valueBox-' + text)}
21
21
  className={`
22
22
  max-w-full
@@ -57,5 +57,5 @@ export default function ValueBox(props) {
57
57
  onPress={onDelete}
58
58
  className="h-full"
59
59
  />}
60
- </HStack>;
60
+ </HStackNative>;
61
61
  }
@@ -303,6 +303,7 @@ export default function withFilters(WrappedComponent) {
303
303
  value={getFilterValue(field)}
304
304
  onChangeValue={(value) => onFilterChangeValue(field, value)}
305
305
  isFilter={true}
306
+ minimizeForRow={true}
306
307
  {...filterProps}
307
308
  {...elementProps}
308
309
  className={filterClassName}
@@ -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
 
@@ -58,7 +58,8 @@ export default function withWindowedEditor(WrappedComponent, isTree = false) {
58
58
  selectorSelected,
59
59
  selectorSelectedField,
60
60
  h,
61
-
61
+ style,
62
+
62
63
  ...propsToPass
63
64
  } = props,
64
65
  onEditorCancel = props.onEditorCancel;
@@ -73,8 +74,9 @@ export default function withWindowedEditor(WrappedComponent, isTree = false) {
73
74
  <Modal
74
75
  isOpen={true}
75
76
  onClose={onEditorCancel}
77
+ className="withEditor-Modal"
76
78
  >
77
- <ModalBackdrop />
79
+ <ModalBackdrop className="withEditor-ModalBackdrop" />
78
80
  <Editor
79
81
  editorType={EDITOR_TYPE__WINDOWED}
80
82
  {...propsToPass}
@@ -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>
@@ -282,7 +282,11 @@ function AttachmentsElement(props) {
282
282
  if (canCrud) {
283
283
  _fileMosaic.onDelete = onFileDelete;
284
284
  }
285
- let content = <VStack background={styles.ATTACHMENTS_BG} className="w-[100%] p-1">
285
+ let className = 'w-full p-1 bg-white rounded-[5px]';
286
+ if (props.className) {
287
+ className += ' ' + props.className;
288
+ }
289
+ let content = <VStack className={className}>
286
290
  <HStack className="flex-wrap">
287
291
  {files.map((file) => {
288
292
  return <Box