@onehat/ui 0.4.4 → 0.4.7

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 (82) hide show
  1. package/package.json +2 -1
  2. package/src/Components/Accordion/Accordion.js +1 -1
  3. package/src/Components/Blank.js +1 -1
  4. package/src/Components/Buttons/BackButton.js +1 -1
  5. package/src/Components/Buttons/Button.js +5 -5
  6. package/src/Components/Buttons/CartButtonWithBadge.js +1 -1
  7. package/src/Components/Buttons/PlusMinusButton.js +1 -1
  8. package/src/Components/Buttons/SquareButton.js +1 -0
  9. package/src/Components/Container/Container.js +4 -4
  10. package/src/Components/Container/ScreenContainer.js +1 -1
  11. package/src/Components/Container/Splitter.js +1 -1
  12. package/src/Components/Editor/InlineEditor.js +1 -1
  13. package/src/Components/Filter/DateRange.js +1 -1
  14. package/src/Components/Filter/NumberRange.js +1 -1
  15. package/src/Components/Form/Field/CKEditor/CKEditor.js +1 -1
  16. package/src/Components/Form/Field/Checkbox/CheckboxGroup.js +1 -1
  17. package/src/Components/Form/Field/Color.js +1 -1
  18. package/src/Components/Form/Field/Combo/Combo.js +2 -1
  19. package/src/Components/Form/Field/Combo/PageSizeCombo.js +1 -1
  20. package/src/Components/Form/Field/Date.js +1 -1
  21. package/src/Components/Form/Field/DisplayField.js +1 -1
  22. package/src/Components/Form/Field/File.js +1 -1
  23. package/src/Components/Form/Field/FormikForm.js +1 -1
  24. package/src/Components/Form/Field/Input.js +19 -16
  25. package/src/Components/Form/Field/Json.js +1 -1
  26. package/src/Components/Form/Field/Number.js +1 -1
  27. package/src/Components/Form/Field/RadioGroup/RadioGroup.js +1 -1
  28. package/src/Components/Form/Field/Select/PageSizeSelect.js +1 -1
  29. package/src/Components/Form/Field/Select/Select.js +1 -1
  30. package/src/Components/Form/Field/Slider.js +1 -1
  31. package/src/Components/Form/Field/Tag/Tag.js +2 -1
  32. package/src/Components/Form/Field/Tag/ValueBox.js +1 -1
  33. package/src/Components/Form/Field/Text.js +1 -1
  34. package/src/Components/Form/Field/TextArea.js +1 -1
  35. package/src/Components/Form/Field/Toggle.js +1 -1
  36. package/src/Components/Form/FieldSet.js +1 -1
  37. package/src/Components/Form/Form.js +15 -14
  38. package/src/Components/Form/Label.js +1 -1
  39. package/src/Components/Gluestack/index.js +2 -2
  40. package/src/Components/Grid/Grid.js +1 -1
  41. package/src/Components/Grid/GridHeaderRow.js +16 -4
  42. package/src/Components/Grid/GridRow.js +1 -1
  43. package/src/Components/Grid/HeaderColumnSelectorHandle.js +1 -1
  44. package/src/Components/Grid/HeaderReorderHandle.js +1 -1
  45. package/src/Components/Grid/HeaderResizeHandle.js +1 -1
  46. package/src/Components/Grid/NoRecordsFound.js +1 -1
  47. package/src/Components/Grid/RowDragHandle.js +1 -1
  48. package/src/Components/Hoc/Secondary/withSecondaryWindowedEditor.js +1 -1
  49. package/src/Components/Hoc/withAlert.js +1 -1
  50. package/src/Components/Hoc/withContextMenu.js +1 -1
  51. package/src/Components/Hoc/withFilters.js +1 -1
  52. package/src/Components/Hoc/withModal.js +1 -1
  53. package/src/Components/Hoc/withSideEditor.js +1 -0
  54. package/src/Components/Hoc/withWindowedEditor.js +1 -1
  55. package/src/Components/Layout/Footer.js +1 -1
  56. package/src/Components/Messages/ConfirmationMessage.js +1 -1
  57. package/src/Components/Messages/ErrorMessage.js +1 -1
  58. package/src/Components/Messages/Loading.js +1 -1
  59. package/src/Components/Messages/OkMessage.js +1 -1
  60. package/src/Components/Messages/Unauthorized.js +1 -1
  61. package/src/Components/Messages/WaitMessage.js +1 -1
  62. package/src/Components/Panel/AccordionGridPanel.js +1 -1
  63. package/src/Components/Panel/FormPanel.js +1 -1
  64. package/src/Components/Panel/Header.js +19 -8
  65. package/src/Components/Panel/Mask.js +1 -1
  66. package/src/Components/Panel/Panel.js +1 -1
  67. package/src/Components/Picker/Picker.js +1 -1
  68. package/src/Components/Report/Report.js +1 -1
  69. package/src/Components/Screens/Manager.js +1 -1
  70. package/src/Components/Tab/TabBar.js +15 -13
  71. package/src/Components/Toolbar/FilterToolbar.js +1 -1
  72. package/src/Components/Toolbar/Pagination.js +1 -1
  73. package/src/Components/Toolbar/PaginationToolbar.js +1 -1
  74. package/src/Components/Toolbar/Toolbar.js +1 -1
  75. package/src/Components/Tooltip/Tooltip.js +1 -1
  76. package/src/Components/Tree/Tree.js +1 -1
  77. package/src/Components/Tree/TreeNode.js +1 -1
  78. package/src/Components/Viewer/Viewer.js +1 -1
  79. package/src/Components/index.js +1 -1
  80. package/src/Functions/buildAdditionalButtons.js +1 -1
  81. package/src/PlatformImports/Web/Attachments.js +1 -1
  82. package/src/PlatformImports/Web/File.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.4.4",
3
+ "version": "0.4.7",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -56,6 +56,7 @@
56
56
  "@gluestack-ui/tooltip": "^0.1.35",
57
57
  "@hookform/resolvers": "^3.3.1",
58
58
  "@k-renwick/colour-mixer": "^1.2.1",
59
+ "@legendapp/motion": "^2.4.0",
59
60
  "@onehat/data": "^1.21.19",
60
61
  "nativewind": "4.0.36",
61
62
  "normalize-css-color": "^1.0.2",
@@ -5,7 +5,7 @@ import {
5
5
  Pressable,
6
6
  VStack,
7
7
  VStackNative,
8
- } from '../Gluestack';
8
+ } from '@project-components/Gluestack';
9
9
  import inArray from '../../Functions/inArray.js';
10
10
  import emptyFn from '../../Functions/emptyFn.js';
11
11
  import _ from 'lodash';
@@ -1,4 +1,4 @@
1
- import { Box } from './Gluestack';
1
+ import { Box } from '@project-components/Gluestack';
2
2
  import _ from 'lodash';
3
3
 
4
4
  export default function Blank(props) {
@@ -1,7 +1,7 @@
1
1
  import { forwardRef } from 'react';
2
2
  import {
3
3
  Icon,
4
- } from '../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import Button from './Button';
6
6
  import AngleLeft from '../Icons/AngleLeft.js';
7
7
 
@@ -6,7 +6,7 @@ import {
6
6
  ButtonIcon,
7
7
  ButtonGroup,
8
8
  Tooltip,
9
- } from '../Gluestack';
9
+ } from '@project-components/Gluestack';
10
10
  import withComponent from '../Hoc/withComponent.js';
11
11
  import withTooltip from '../Hoc/withTooltip.js';
12
12
  import _ from 'lodash';
@@ -32,7 +32,7 @@ const ButtonComponent = forwardRef((props, ref) => {
32
32
  icon = cloneElement(icon, {..._icon});
33
33
  }
34
34
  } else {
35
- icon = <ButtonIcon as={icon} {..._icon} />;
35
+ icon = <ButtonIcon className="ButtonIcon" as={icon} {..._icon} />;
36
36
  }
37
37
  }
38
38
  if (rightIcon) {
@@ -41,7 +41,7 @@ const ButtonComponent = forwardRef((props, ref) => {
41
41
  rightIcon = cloneElement(rightIcon, {..._rightIcon});
42
42
  }
43
43
  } else {
44
- rightIcon = <ButtonIcon as={rightIcon} {..._rightIcon} />;
44
+ rightIcon = <ButtonIcon className="ButtonIcon" as={rightIcon} {..._rightIcon} />;
45
45
  }
46
46
  }
47
47
 
@@ -62,9 +62,9 @@ const ButtonComponent = forwardRef((props, ref) => {
62
62
  }
63
63
 
64
64
  let button = <Button {...propsToPass} className={className} ref={ref}>
65
- {isLoading && <ButtonSpinner {..._spinner} />}
65
+ {isLoading && <ButtonSpinner className="ButtonSpinner" {..._spinner} />}
66
66
  {icon}
67
- {text && <ButtonText {..._text}>{text}</ButtonText>}
67
+ {text && <ButtonText className="ButtonText" {..._text}>{text}</ButtonText>}
68
68
  {rightIcon}
69
69
  </Button>;
70
70
  if (tooltip) {
@@ -3,7 +3,7 @@ import {
3
3
  Icon,
4
4
  Pressable,
5
5
  Text,
6
- } from '../Gluestack';
6
+ } from '@project-components/Gluestack';
7
7
  import {
8
8
  Ionicons,
9
9
  } from '@expo/vector-icons';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import {
3
3
  HStack,
4
4
  HStackNative,
5
- } from '../Gluestack';
5
+ } from '@project-components/Gluestack';
6
6
  import IconButton from './IconButton.js';
7
7
  import Plus from '../Icons/Plus.js';
8
8
  import Minus from '../Icons/Minus.js';
@@ -26,6 +26,7 @@ export default function SquareButton(props) {
26
26
 
27
27
  return <IconButton
28
28
  className={`
29
+ SquareButton
29
30
  rounded-md
30
31
  p-2
31
32
  bg-[${bg}]
@@ -2,7 +2,7 @@ import { cloneElement, useState, useEffect, } from 'react';
2
2
  import {
3
3
  HStack,
4
4
  VStack,
5
- } from '../Gluestack';
5
+ } from '@project-components/Gluestack';
6
6
  import {
7
7
  HORIZONTAL,
8
8
  VERTICAL,
@@ -325,13 +325,13 @@ function Container(props) {
325
325
  componentProps = {};
326
326
  }
327
327
 
328
- return <VStack className="w-full flex-1">
328
+ return <VStack className="Container-all w-full flex-1">
329
329
  {northComponent}
330
330
  {(!isNorthCollapsed && !localIsNorthCollapsed) && northSplitter}
331
- <HStack className="w-full" style={{ flex: 100 }}>
331
+ <HStack className="Container-mid w-full" style={{ flex: 100 }}>
332
332
  {westComponent}
333
333
  {(!isWestCollapsed && !localIsWestCollapsed) && westSplitter}
334
- <VStack className="h-full overflow-auto" style={{ flex: 100 }}>
334
+ <VStack className="Container-center h-full overflow-auto" style={{ flex: 100 }}>
335
335
  {centerComponent}
336
336
  </VStack>
337
337
  {(!isEastCollapsed && !localIsEastCollapsed) && eastSplitter}
@@ -8,7 +8,7 @@ import {
8
8
  ScrollView,
9
9
  VStack,
10
10
  VStackNative,
11
- } from '../Gluestack';
11
+ } from '@project-components/Gluestack';
12
12
  import withComponent from '../Hoc/withComponent.js';
13
13
  // import { useHeaderHeight } from '@react-navigation/elements';
14
14
  // import testProps from '../OneHat/functions/testProps';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HStack,
3
3
  VStack,
4
- } from '../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import {
6
6
  HORIZONTAL,
7
7
  VERTICAL,
@@ -2,7 +2,7 @@ import { useState, useEffect, useRef, } from 'react';
2
2
  import {
3
3
  Box,
4
4
  VStack,
5
- } from '../Gluestack';
5
+ } from '@project-components/Gluestack';
6
6
  import withComponent from '../Hoc/withComponent.js';
7
7
  import {
8
8
  UI_MODE_WEB,
@@ -3,7 +3,7 @@ import {
3
3
  HStack,
4
4
  HStackNative,
5
5
  Text,
6
- } from '../Gluestack';
6
+ } from '@project-components/Gluestack';
7
7
  import Date from '../Form/Field/Date.js';
8
8
  import testProps from '../../Functions/testProps.js';
9
9
  import withTooltip from '../Hoc/withTooltip.js';
@@ -2,7 +2,7 @@ import React, { useState, useEffect, } from 'react';
2
2
  import {
3
3
  HStack,
4
4
  Text,
5
- } from '../Gluestack';
5
+ } from '@project-components/Gluestack';
6
6
  import Number from '../Form/Field/Number.js';
7
7
  import withTooltip from '../Hoc/withTooltip.js';
8
8
  import withValue from '../Hoc/withValue.js';
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, useRef, } from 'react';
2
2
  import {
3
3
  HStack,
4
- } from '../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import UiGlobals from '../../../../UiGlobals.js';
6
6
  import { CKEditor } from '@ckeditor/ckeditor5-react'; // https://ckeditor.com/docs/ckeditor5/latest/installation/frameworks/react.html
7
7
  import './ckeditor.css';
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, } from 'react';
2
2
  import {
3
3
  Checkbox, CheckboxGroup,
4
- } from '../../../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import testProps from '../../../../Functions/testProps.js';
6
6
  import withData from '../../../Hoc/withData.js';
7
7
  import withValue from '../../../Hoc/withValue.js';
@@ -4,7 +4,7 @@ import {
4
4
  Popover, PopoverContent, PopoverBody,
5
5
  Pressable,
6
6
  Tooltip,
7
- } from '../../Gluestack';
7
+ } from '@project-components/Gluestack';
8
8
  import { SketchPicker } from 'react-color';
9
9
  import {
10
10
  UI_MODE_WEB,
@@ -11,7 +11,7 @@ import {
11
11
  TextNative,
12
12
  Tooltip,
13
13
  VStack,
14
- } from '../../../Gluestack';
14
+ } from '@project-components/Gluestack';
15
15
  import {
16
16
  UI_MODE_NATIVE,
17
17
  UI_MODE_WEB,
@@ -1011,6 +1011,7 @@ export function ComboComponent(props) {
1011
1011
  const className = `
1012
1012
  Combo-HStack
1013
1013
  flex-1
1014
+ h-[40px]
1014
1015
  justify-center
1015
1016
  items-center
1016
1017
  `;
@@ -1,7 +1,7 @@
1
1
  import { useMemo, } from 'react';
2
2
  import {
3
3
  HStack,
4
- } from '../../../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import ArrayCombo from './ArrayCombo.js';
6
6
 
7
7
  export default function PageSizeCombo(props) {
@@ -7,7 +7,7 @@ import {
7
7
  Popover, PopoverBackdrop, PopoverContent, PopoverBody,
8
8
  Pressable,
9
9
  TextNative,
10
- } from '../../Gluestack';
10
+ } from '@project-components/Gluestack';
11
11
  import {
12
12
  DATE,
13
13
  TIME,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import {
3
3
  Text,
4
- } from '../../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import UiGlobals from '../../../UiGlobals.js';
6
6
  import withComponent from '../../Hoc/withComponent.js';
7
7
  import withTooltip from '../../Hoc/withTooltip.js';
@@ -5,7 +5,7 @@ import {
5
5
  Icon,
6
6
  Text,
7
7
  TextNative,
8
- } from '../../Gluestack';
8
+ } from '@project-components/Gluestack';
9
9
  import {
10
10
  CURRENT_MODE,
11
11
  UI_MODE_WEB,
@@ -8,7 +8,7 @@ import {
8
8
  TextNative,
9
9
  VStack,
10
10
  VStackNative,
11
- } from '../../Gluestack';
11
+ } from '@project-components/Gluestack';
12
12
  import { View, } from 'react-native';
13
13
  import {
14
14
  EDITOR_TYPE__INLINE,
@@ -1,8 +1,7 @@
1
1
  import { forwardRef, useState, useEffect, useRef, } from 'react';
2
2
  import {
3
3
  Input, InputField, InputIcon, InputSlot,
4
- Pressable,
5
- } from '../../Gluestack';
4
+ } from '@project-components/Gluestack';
6
5
  import {
7
6
  hasWidth,
8
7
  hasFlex,
@@ -18,10 +17,10 @@ const InputElement = forwardRef((props, ref) => {
18
17
  testID,
19
18
  value,
20
19
  setValue,
20
+ maxLength,
21
21
  autoSubmit = true, // automatically setValue after user stops typing for autoSubmitDelay
22
22
  autoSubmitDelay = UiGlobals.autoSubmitDelay,
23
23
  disableAutoFlex = false,
24
- maxLength,
25
24
  onKeyPress,
26
25
  onChangeText,
27
26
  leftElement,
@@ -31,6 +30,7 @@ const InputElement = forwardRef((props, ref) => {
31
30
  rightIcon,
32
31
  rightIconHandler,
33
32
  placeholder,
33
+ ...propsToPass
34
34
  } = props,
35
35
  styles = UiGlobals.styles,
36
36
  debouncedSetValueRef = useRef(),
@@ -109,11 +109,12 @@ const InputElement = forwardRef((props, ref) => {
109
109
  if (!disableAutoFlex && !hasWidth(props) && !hasFlex(props)) {
110
110
  style.flex = 1;
111
111
  }
112
+ // flex-1
113
+ // block
114
+ // h-auto
115
+ // h-[10px]
112
116
  let inputClassName = `
113
117
  Input
114
- flex-1
115
- block
116
- h-auto
117
118
  ${styles.FORM_INPUT_BG}
118
119
  ${styles.FORM_INPUT_BG_FOCUS}
119
120
  ${styles.FORM_INPUT_BG_HOVER}
@@ -121,6 +122,7 @@ const InputElement = forwardRef((props, ref) => {
121
122
  inputFieldClassName = `
122
123
  InputField
123
124
  min-h-[40px]
125
+ h-auto
124
126
  w-full
125
127
  p-2
126
128
  text-left
@@ -139,16 +141,16 @@ const InputElement = forwardRef((props, ref) => {
139
141
  style={style}
140
142
  >
141
143
  {leftElement &&
142
- <InputSlot>{leftElement}</InputSlot>}
144
+ <InputSlot className="leftElementInputSlot">{leftElement}</InputSlot>}
143
145
 
144
146
  {leftIcon && leftIconHandler &&
145
- <Pressable onPress={leftIconHandler}>
146
- <InputIcon className="ml-2">
147
+ <InputSlot onPress={leftIconHandler} className="InputSlot">
148
+ <InputIcon className="leftInputIconWithHandler ml-2">
147
149
  {leftIcon}
148
150
  </InputIcon>
149
- </Pressable>}
151
+ </InputSlot>}
150
152
  {leftIcon && !leftIconHandler &&
151
- <InputIcon className="ml-2">
153
+ <InputIcon className="leftInputIcon ml-2">
152
154
  {leftIcon}
153
155
  </InputIcon>}
154
156
 
@@ -161,19 +163,20 @@ const InputElement = forwardRef((props, ref) => {
161
163
  dataFocusVisible={true}
162
164
  variant="outline"
163
165
  placeholder={placeholder}
166
+ {...propsToPass}
164
167
  />
165
168
 
166
169
  {rightElement &&
167
- <InputSlot>{rightElement}</InputSlot>}
170
+ <InputSlot className="rightElementInputSlot">{rightElement}</InputSlot>}
168
171
 
169
172
  {rightIcon && rightIconHandler &&
170
- <Pressable onPress={rightIconHandler}>
171
- <InputIcon className="mr-2">
173
+ <InputSlot onPress={rightIconHandler} className="InputSlot">
174
+ <InputIcon className="rightInputIconWithHandler mr-2">
172
175
  {rightIcon}
173
176
  </InputIcon>
174
- </Pressable>}
177
+ </InputSlot>}
175
178
  {rightIcon && !rightIconHandler &&
176
- <InputIcon className="mr-2">
179
+ <InputIcon className="rightInputIcon mr-2">
177
180
  {rightIcon}
178
181
  </InputIcon>}
179
182
  </Input>;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HStack,
3
3
  Tooltip,
4
- } from '../../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import {
6
6
  UI_MODE_NATIVE,
7
7
  UI_MODE_WEB,
@@ -2,7 +2,7 @@
2
2
  import React, { useState, useEffect, useRef, } from 'react';
3
3
  import {
4
4
  HStack,
5
- } from '../../Gluestack';
5
+ } from '@project-components/Gluestack';
6
6
  import Decimal from 'decimal.js';
7
7
  import UiGlobals from '../../../UiGlobals.js';
8
8
  import IconButton from '../../Buttons/IconButton.js';
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, } from 'react';
2
2
  import {
3
3
  Radio, RadioGroup,
4
- } from '../../../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import testProps from '../../../../Functions/testProps.js';
6
6
  import withComponent from '../../../Hoc/withComponent.js';
7
7
  import withData from '../../../Hoc/withData.js';
@@ -1,7 +1,7 @@
1
1
  import { useMemo, } from 'react';
2
2
  import {
3
3
  HStack,
4
- } from '../../../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import Select from './Select.js';
6
6
 
7
7
  export default function PageSizeSelect(props) {
@@ -1,7 +1,7 @@
1
1
  import { forwardRef, useState, useEffect, useRef, } from 'react';
2
2
  import {
3
3
  Select, SelectBackdrop, SelectContent, SelectDragIndicator, SelectDragIndicatorWrapper, SelectInput, SelectIcon, SelectItem, SelectPortal, SelectTrigger,
4
- } from '../../../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import {
6
6
  hasWidth,
7
7
  hasFlex,
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef, } from 'react';
2
2
  import {
3
3
  HStack,
4
4
  Text,
5
- } from '../../Gluestack';
5
+ } from '@project-components/Gluestack';
6
6
  import {
7
7
  hasWidth,
8
8
  hasFlex,
@@ -2,7 +2,7 @@ import { useRef, } from 'react';
2
2
  import {
3
3
  HStack,
4
4
  VStack,
5
- } from '../../../Gluestack';
5
+ } from '@project-components/Gluestack';
6
6
  import {
7
7
  EDITOR_TYPE__WINDOWED,
8
8
  } from '../../../../Constants/Editor.js';
@@ -249,6 +249,7 @@ function TagComponent(props) {
249
249
 
250
250
  let className = `
251
251
  Tag
252
+ w-full
252
253
  p-0
253
254
  `;
254
255
  if (props.className) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HStack,
3
3
  Text,
4
- } from '../../../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import testProps from '../../../../Functions/testProps.js';
6
6
  import IconButton from '../../../Buttons/IconButton.js';
7
7
  import Eye from '../../../Icons/Eye.js';
@@ -1,7 +1,7 @@
1
1
  import { forwardRef } from 'react';
2
2
  import {
3
3
  TextNative,
4
- } from '../../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import UiGlobals from '../../../UiGlobals.js';
6
6
  import withComponent from '../../Hoc/withComponent.js';
7
7
  import withTooltip from '../../Hoc/withTooltip.js';
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, useRef, } from 'react';
2
2
  import {
3
3
  Textarea, TextareaInput,
4
- } from '../../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import UiGlobals from '../../../UiGlobals.js';
6
6
  import withComponent from '../../Hoc/withComponent.js';
7
7
  import withTooltip from '../../Hoc/withTooltip.js';
@@ -5,7 +5,7 @@ import {
5
5
  Pressable,
6
6
  Switch,
7
7
  Text,
8
- } from '../../Gluestack';
8
+ } from '@project-components/Gluestack';
9
9
  import UiGlobals from '../../../UiGlobals.js';
10
10
  import IconButton from '../../Buttons/IconButton.js';
11
11
  import Na from '../../Icons/Na.js';
@@ -4,7 +4,7 @@ import {
4
4
  HStack,
5
5
  Text,
6
6
  TextNative,
7
- } from '../Gluestack';
7
+ } from '@project-components/Gluestack';
8
8
  import FieldSetContext from '../../Contexts/FieldSetContext.js';
9
9
  import useForceUpdate from '../../Hooks/useForceUpdate.js';
10
10
  import testProps from '../../Functions/testProps.js';
@@ -7,7 +7,7 @@ import {
7
7
  Text,
8
8
  VStack,
9
9
  VStackNative,
10
- } from '../Gluestack';
10
+ } from '@project-components/Gluestack';
11
11
  import {
12
12
  VIEW,
13
13
  } from '../../Constants/Commands.js';
@@ -376,7 +376,7 @@ function Form(props) {
376
376
  dynamicProps = getDynamicProps({ fieldState, formSetValue, formGetValues, formState });
377
377
  }
378
378
 
379
- let elementClassName = 'flex-1';
379
+ let elementClassName = 'Form-Element flex-1';
380
380
  if (type.match(/Tag/)) {
381
381
  elementClassName += ' overflow-auto';
382
382
  }
@@ -433,6 +433,7 @@ function Form(props) {
433
433
  return <HStack
434
434
  key={ix}
435
435
  className={`
436
+ Form-HStack1
436
437
  flex-${flex}
437
438
  ${error ? "bg-[#fdd]" : "bg-white"}
438
439
  ${columnClassName}
@@ -564,7 +565,7 @@ function Form(props) {
564
565
  return buildFromItem(item, ix, {...defaults, ...itemDefaults});
565
566
  });
566
567
 
567
- let elementClassName = '';
568
+ let elementClassName = 'Form-Element';
568
569
  const defaultsClassName = defaults.className;
569
570
  if (defaultsClassName) {
570
571
  elementClassName += ' ' + defaultsClassName;
@@ -644,18 +645,18 @@ function Form(props) {
644
645
  style.width = '50px';
645
646
  }
646
647
  if (containerWidth > styles.FORM_STACK_ROW_THRESHOLD) {
647
- element = <HStack className="HStackA py-1">
648
+ element = <HStack className="Form-HStack2 w-full py-1">
648
649
  <Label style={style}>{label}</Label>
649
650
  {element}
650
651
  </HStack>;
651
652
  } else {
652
- element = <VStack className="HStackA w-full py-1 mt-3">
653
+ element = <VStack className="Form-VStack1 w-full py-1 mt-3">
653
654
  <Label style={style}>{label}</Label>
654
655
  {element}
655
656
  </VStack>;
656
657
  }
657
658
  }
658
- return <HStack key={ix} className="HStackB px-2 pb-1">{element}</HStack>;
659
+ return <HStack key={ix} className="Form-HStack3 w-full px-2 pb-1">{element}</HStack>;
659
660
  }
660
661
 
661
662
 
@@ -720,7 +721,7 @@ function Form(props) {
720
721
  dynamicProps = getDynamicProps({ fieldState, formSetValue, formGetValues, formState });
721
722
  }
722
723
 
723
- let elementClassName = 'field-' + name + ' flex-1 Form-Element';
724
+ let elementClassName = 'Form-Element field-' + name + ' flex-1';
724
725
  const defaultsClassName = defaults.className;
725
726
  if (defaultsClassName) {
726
727
  elementClassName += ' ' + defaultsClassName;
@@ -770,7 +771,7 @@ function Form(props) {
770
771
  if (message) {
771
772
  message = <Text className="text-[#f00]">{message}</Text>;
772
773
  }
773
- element = <VStack className="Form-messageContainer pt-1 flex-1">
774
+ element = <VStack className="Form-VStack4 pt-1 flex-1">
774
775
  {element}
775
776
  {message}
776
777
  </VStack>;
@@ -819,18 +820,18 @@ function Form(props) {
819
820
  style.width = '50px';
820
821
  }
821
822
  if (containerWidth > styles.FORM_STACK_ROW_THRESHOLD) {
822
- element = <HStack className="HStack3 flex-1 py-1">
823
+ element = <HStack className="HStack3 flex-1">
823
824
  <Label style={style}>{requiredIndicator}{label}</Label>
824
825
  {element}
825
826
  </HStack>;
826
827
  } else {
827
- element = <VStack className="VStack3 flex-1 py-1 mt-3">
828
+ element = <VStack className="VStack3 flex-1 mt-3">
828
829
  <Label style={style}>{requiredIndicator}{label}</Label>
829
830
  {element}
830
831
  </VStack>;
831
832
  }
832
833
  } else if (disableLabels && requiredIndicator) {
833
- element = <HStack className="HStack3 flex-1 py-1">
834
+ element = <HStack className="HStack3 flex-1">
834
835
  {requiredIndicator}
835
836
  {element}
836
837
  </HStack>;
@@ -852,8 +853,8 @@ function Form(props) {
852
853
  className={`
853
854
  HStack4
854
855
  flex-none
855
- px-2
856
- pb-1
856
+ pb-2
857
+ h-[50px]
857
858
  ${error ? 'bg-[#fdd]' : ''}
858
859
  `}
859
860
  >
@@ -1075,7 +1076,7 @@ function Form(props) {
1075
1076
  editor = <>
1076
1077
  {containerWidth >= styles.FORM_ONE_COLUMN_THRESHOLD ? <HStack className="Form-formComponents-HStack p-4 gap-4 justify-center">{formComponents}</HStack> : null}
1077
1078
  {containerWidth < styles.FORM_ONE_COLUMN_THRESHOLD ? <VStack className="Form-formComponents-VStack p-4">{formComponents}</VStack> : null}
1078
- <VStack className="Form-AncillaryComponents m-2 pt-4 px-2">{formAncillaryComponents}</VStack>
1079
+ {formAncillaryComponents.length ? <VStack className="Form-AncillaryComponents m-2 pt-4 px-2">{formAncillaryComponents}</VStack> : null}
1079
1080
  </>;
1080
1081
 
1081
1082
  additionalButtons = buildAdditionalButtons(additionalEditButtons);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HStack,
3
3
  TextNative,
4
- } from '../Gluestack';
4
+ } from '@project-components/Gluestack';
5
5
  import styles from '../../Constants/Styles.js';
6
6
 
7
7
  export default function Label(props) {