@terreno/ui 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/AiSuggestionBox.d.ts +11 -0
  2. package/dist/AiSuggestionBox.js +50 -23
  3. package/dist/AiSuggestionBox.js.map +1 -1
  4. package/dist/Button.js +4 -3
  5. package/dist/Button.js.map +1 -1
  6. package/dist/Common.d.ts +15 -2
  7. package/dist/Common.js.map +1 -1
  8. package/dist/IconButton.js +8 -4
  9. package/dist/IconButton.js.map +1 -1
  10. package/dist/icons/SparklesIcon.d.ts +7 -0
  11. package/dist/icons/SparklesIcon.js +32 -0
  12. package/dist/icons/SparklesIcon.js.map +1 -0
  13. package/dist/icons/index.d.ts +1 -0
  14. package/dist/icons/index.js +1 -0
  15. package/dist/icons/index.js.map +1 -1
  16. package/package.json +2 -2
  17. package/src/ActionSheet.test.tsx +96 -0
  18. package/src/AiSuggestionBox.test.tsx +184 -15
  19. package/src/AiSuggestionBox.tsx +72 -55
  20. package/src/Button.test.tsx +31 -1
  21. package/src/Button.tsx +5 -4
  22. package/src/Common.ts +16 -2
  23. package/src/ErrorBoundary.test.tsx +3 -4
  24. package/src/IconButton.test.tsx +14 -0
  25. package/src/IconButton.tsx +9 -4
  26. package/src/__snapshots__/AiSuggestionBox.test.tsx.snap +489 -102
  27. package/src/__snapshots__/Button.test.tsx.snap +18 -1
  28. package/src/__snapshots__/DecimalRangeActionSheet.test.tsx.snap +2 -0
  29. package/src/__snapshots__/ErrorPage.test.tsx.snap +1 -0
  30. package/src/__snapshots__/HeightActionSheet.test.tsx.snap +2 -0
  31. package/src/__snapshots__/HeightField.test.tsx.snap +5 -0
  32. package/src/__snapshots__/IconButton.test.tsx.snap +4 -0
  33. package/src/__snapshots__/InfoModalIcon.test.tsx.snap +4 -0
  34. package/src/__snapshots__/Modal.test.tsx.snap +3 -0
  35. package/src/__snapshots__/NumberPickerActionSheet.test.tsx.snap +2 -0
  36. package/src/__snapshots__/Page.test.tsx.snap +1 -0
  37. package/src/icons/SparklesIcon.test.tsx +16 -0
  38. package/src/icons/SparklesIcon.tsx +38 -0
  39. package/src/icons/__snapshots__/SparklesIcon.test.tsx.snap +47 -0
  40. package/src/icons/index.ts +1 -0
  41. package/src/login/__snapshots__/LoginScreen.test.tsx.snap +3 -0
  42. package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +2 -0
  43. package/src/testing/resolveTestId.test.ts +101 -0
@@ -56,6 +56,7 @@ const IconButtonComponent: FC<IconButtonProps> = ({
56
56
  indicator,
57
57
  indicatorText,
58
58
  loading: propsLoading = false,
59
+ size = "default",
59
60
  testID,
60
61
  variant = "primary",
61
62
  withConfirmation = false,
@@ -93,6 +94,9 @@ const IconButtonComponent: FC<IconButtonProps> = ({
93
94
  } else if (variant === "destructive") {
94
95
  backgroundColor = theme.text.inverted;
95
96
  color = theme.text.error;
97
+ } else if (variant === "ghost") {
98
+ backgroundColor = "transparent";
99
+ color = theme.surface.secondaryDark;
96
100
  }
97
101
 
98
102
  const indicatorColor = indicator ? theme.surface[indicator] : undefined;
@@ -134,23 +138,24 @@ const IconButtonComponent: FC<IconButtonProps> = ({
134
138
  alignItems: "center",
135
139
  backgroundColor,
136
140
  borderRadius: theme.radius.rounded,
137
- height: 32,
141
+ height: size === "sm" ? 28 : 32,
138
142
  justifyContent: "center",
139
- width: 32,
143
+ width: size === "sm" ? 28 : 32,
140
144
  }}
141
145
  testID={testID}
142
146
  >
143
147
  {loading ? (
144
148
  <ActivityIndicator color={color} size="small" />
145
149
  ) : CustomIcon ? (
146
- <CustomIcon color={color} size={variant === "navigation" ? 20 : 16} />
150
+ <CustomIcon color={color} size={size === "sm" ? 12 : variant === "navigation" ? 20 : 16} />
147
151
  ) : (
148
152
  <FontAwesome6
149
153
  color={color}
150
154
  name={iconName}
151
155
  selectable={undefined}
152
- size={variant === "navigation" ? 20 : 16}
156
+ size={size === "sm" ? 12 : variant === "navigation" ? 20 : 16}
153
157
  solid
158
+ style={{textAlign: "center"}}
154
159
  />
155
160
  )}
156
161
  {Boolean(indicator) && (