@terreno/ui 0.13.3 → 0.14.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.
- package/dist/ActionSheet.d.ts +4 -4
- package/dist/ActionSheet.js.map +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Avatar.js.map +1 -1
- package/dist/Banner.js.map +1 -1
- package/dist/Box.js +2 -0
- package/dist/Box.js.map +1 -1
- package/dist/Button.d.ts +2 -2
- package/dist/Button.js +35 -23
- package/dist/Button.js.map +1 -1
- package/dist/Common.d.ts +8 -2
- package/dist/Common.js.map +1 -1
- package/dist/ConsentFormScreen.js +1 -1
- package/dist/ConsentFormScreen.js.map +1 -1
- package/dist/ConsentNavigator.d.ts +1 -1
- package/dist/ConsentNavigator.js +2 -1
- package/dist/ConsentNavigator.js.map +1 -1
- package/dist/CustomSelectField.js +3 -1
- package/dist/CustomSelectField.js.map +1 -1
- package/dist/DataTable.js +1 -1
- package/dist/DataTable.js.map +1 -1
- package/dist/DateTimeActionSheet.js +2 -1
- package/dist/DateTimeActionSheet.js.map +1 -1
- package/dist/DateTimeField.js +3 -2
- package/dist/DateTimeField.js.map +1 -1
- package/dist/DateUtilities.js.map +1 -1
- package/dist/HeightField.js.map +1 -1
- package/dist/Hyperlink.js +19 -9
- package/dist/Hyperlink.js.map +1 -1
- package/dist/IconButton.js.map +1 -1
- package/dist/ImageBackground.d.ts +2 -5
- package/dist/ImageBackground.js +1 -1
- package/dist/ImageBackground.js.map +1 -1
- package/dist/ModalSheet.d.ts +3 -2
- package/dist/ModalSheet.js +1 -1
- package/dist/ModalSheet.js.map +1 -1
- package/dist/OfflineBanner.d.ts +21 -0
- package/dist/OfflineBanner.js +25 -0
- package/dist/OfflineBanner.js.map +1 -0
- package/dist/OpenAPIContext.js +1 -1
- package/dist/OpenAPIContext.js.map +1 -1
- package/dist/Page.js +1 -0
- package/dist/Page.js.map +1 -1
- package/dist/Pagination.js.map +1 -1
- package/dist/Permissions.js +3 -0
- package/dist/Permissions.js.map +1 -1
- package/dist/PickerSelect.js +7 -4
- package/dist/PickerSelect.js.map +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/SelectField.js.map +1 -1
- package/dist/SplitPage.js +7 -2
- package/dist/SplitPage.js.map +1 -1
- package/dist/SplitPage.native.js +4 -1
- package/dist/SplitPage.native.js.map +1 -1
- package/dist/TapToEdit.js +10 -11
- package/dist/TapToEdit.js.map +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/ToastNotifications.js.map +1 -1
- package/dist/Unifier.d.ts +2 -2
- package/dist/Unifier.js +1 -1
- package/dist/Unifier.js.map +1 -1
- package/dist/Utilities.d.ts +8 -4
- package/dist/Utilities.js +1 -1
- package/dist/Utilities.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/ActionSheet.test.tsx +1 -0
- package/src/ActionSheet.tsx +6 -4
- package/src/Avatar.tsx +9 -2
- package/src/Badge.test.tsx +1 -0
- package/src/Banner.tsx +1 -1
- package/src/Box.test.tsx +1 -0
- package/src/Box.tsx +10 -6
- package/src/Button.test.tsx +35 -0
- package/src/Button.tsx +65 -34
- package/src/Common.ts +32 -15
- package/src/ConsentFormScreen.test.tsx +102 -0
- package/src/ConsentFormScreen.tsx +9 -3
- package/src/ConsentNavigator.test.tsx +1 -0
- package/src/ConsentNavigator.tsx +5 -3
- package/src/CustomSelectField.tsx +3 -1
- package/src/DataTable.test.tsx +1 -0
- package/src/DataTable.tsx +1 -1
- package/src/DateTimeActionSheet.tsx +7 -3
- package/src/DateTimeField.test.tsx +1 -0
- package/src/DateTimeField.tsx +3 -2
- package/src/DateUtilities.test.ts +111 -0
- package/src/DateUtilities.tsx +6 -6
- package/src/DecimalRangeActionSheet.test.tsx +28 -0
- package/src/ErrorBoundary.test.tsx +1 -0
- package/src/HeightField.tsx +2 -1
- package/src/Hyperlink.tsx +83 -52
- package/src/IconButton.tsx +1 -1
- package/src/ImageBackground.tsx +5 -6
- package/src/ModalSheet.test.tsx +1 -5
- package/src/ModalSheet.tsx +15 -6
- package/src/NumberField.test.tsx +14 -0
- package/src/OfflineBanner.test.tsx +70 -0
- package/src/OfflineBanner.tsx +54 -0
- package/src/OpenAPIContext.tsx +3 -2
- package/src/Page.tsx +1 -0
- package/src/Pagination.tsx +1 -1
- package/src/Permissions.ts +3 -0
- package/src/PickerSelect.tsx +17 -14
- package/src/SelectBadge.test.tsx +1 -0
- package/src/SelectField.tsx +1 -1
- package/src/Signature.test.tsx +1 -0
- package/src/SplitPage.native.tsx +2 -0
- package/src/SplitPage.tsx +6 -1
- package/src/TapToEdit.test.tsx +17 -0
- package/src/TapToEdit.tsx +11 -11
- package/src/Toast.tsx +1 -1
- package/src/ToastNotifications.tsx +1 -4
- package/src/Tooltip.test.tsx +0 -7
- package/src/Unifier.ts +6 -5
- package/src/Utilities.tsx +9 -6
- package/src/__snapshots__/AddressField.test.tsx.snap +3 -1
- package/src/__snapshots__/Button.test.tsx.snap +92 -50
- package/src/__snapshots__/CustomSelectField.test.tsx.snap +21 -7
- package/src/__snapshots__/DecimalRangeActionSheet.test.tsx.snap +14 -8
- package/src/__snapshots__/ErrorPage.test.tsx.snap +7 -4
- package/src/__snapshots__/Field.test.tsx.snap +18 -6
- package/src/__snapshots__/HeightActionSheet.test.tsx.snap +14 -8
- package/src/__snapshots__/HeightField.test.tsx.snap +35 -20
- package/src/__snapshots__/InfoModalIcon.test.tsx.snap +28 -16
- package/src/__snapshots__/Modal.test.tsx.snap +19 -10
- package/src/__snapshots__/ModalSheet.test.tsx.snap +0 -1
- package/src/__snapshots__/NumberPickerActionSheet.test.tsx.snap +14 -8
- package/src/__snapshots__/Page.test.tsx.snap +7 -4
- package/src/__snapshots__/SelectField.test.tsx.snap +18 -6
- package/src/__snapshots__/TerrenoProvider.test.tsx.snap +0 -2
- package/src/__snapshots__/TimezonePicker.test.tsx.snap +18 -6
- package/src/bunSetup.ts +25 -2
- package/src/index.tsx +1 -0
- package/src/login/__snapshots__/LoginScreen.test.tsx.snap +15 -6
- package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +10 -4
- package/src/table/__snapshots__/TableBadge.test.tsx.snap +3 -1
- package/src/types/react-native-swiper-flatlist.d.ts +1 -0
|
@@ -322,7 +322,9 @@ exports[`TimezonePicker renders correctly with default props 1`] = `
|
|
|
322
322
|
},
|
|
323
323
|
],
|
|
324
324
|
"props": {
|
|
325
|
-
"style":
|
|
325
|
+
"style": {
|
|
326
|
+
"width": "100%",
|
|
327
|
+
},
|
|
326
328
|
"testID": undefined,
|
|
327
329
|
},
|
|
328
330
|
"type": "View",
|
|
@@ -636,7 +638,9 @@ exports[`TimezonePicker hides title when hideTitle is true 1`] = `
|
|
|
636
638
|
},
|
|
637
639
|
],
|
|
638
640
|
"props": {
|
|
639
|
-
"style":
|
|
641
|
+
"style": {
|
|
642
|
+
"width": "100%",
|
|
643
|
+
},
|
|
640
644
|
"testID": undefined,
|
|
641
645
|
},
|
|
642
646
|
"type": "View",
|
|
@@ -965,7 +969,9 @@ exports[`TimezonePicker renders with selected timezone 1`] = `
|
|
|
965
969
|
},
|
|
966
970
|
],
|
|
967
971
|
"props": {
|
|
968
|
-
"style":
|
|
972
|
+
"style": {
|
|
973
|
+
"width": "100%",
|
|
974
|
+
},
|
|
969
975
|
"testID": undefined,
|
|
970
976
|
},
|
|
971
977
|
"type": "View",
|
|
@@ -1294,7 +1300,9 @@ exports[`TimezonePicker renders USA timezones by default 1`] = `
|
|
|
1294
1300
|
},
|
|
1295
1301
|
],
|
|
1296
1302
|
"props": {
|
|
1297
|
-
"style":
|
|
1303
|
+
"style": {
|
|
1304
|
+
"width": "100%",
|
|
1305
|
+
},
|
|
1298
1306
|
"testID": undefined,
|
|
1299
1307
|
},
|
|
1300
1308
|
"type": "View",
|
|
@@ -1623,7 +1631,9 @@ exports[`TimezonePicker renders with short timezone labels 1`] = `
|
|
|
1623
1631
|
},
|
|
1624
1632
|
],
|
|
1625
1633
|
"props": {
|
|
1626
|
-
"style":
|
|
1634
|
+
"style": {
|
|
1635
|
+
"width": "100%",
|
|
1636
|
+
},
|
|
1627
1637
|
"testID": undefined,
|
|
1628
1638
|
},
|
|
1629
1639
|
"type": "View",
|
|
@@ -1952,7 +1962,9 @@ exports[`TimezonePicker calls onChange when timezone is selected 1`] = `
|
|
|
1952
1962
|
},
|
|
1953
1963
|
],
|
|
1954
1964
|
"props": {
|
|
1955
|
-
"style":
|
|
1965
|
+
"style": {
|
|
1966
|
+
"width": "100%",
|
|
1967
|
+
},
|
|
1956
1968
|
"testID": undefined,
|
|
1957
1969
|
},
|
|
1958
1970
|
"type": "View",
|
package/src/bunSetup.ts
CHANGED
|
@@ -6,6 +6,10 @@ type MockComponentProps = Record<string, unknown> & {
|
|
|
6
6
|
style?: unknown;
|
|
7
7
|
testID?: string;
|
|
8
8
|
};
|
|
9
|
+
type MockPresstoPressableProps = MockComponentProps & {
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
onPress?: (...args: unknown[]) => unknown;
|
|
12
|
+
};
|
|
9
13
|
type MockStyleValue = unknown;
|
|
10
14
|
type MockAnimation = {
|
|
11
15
|
start?: (callback?: (result: {finished: boolean}) => void) => void;
|
|
@@ -447,6 +451,25 @@ mock.module("react-native", () => {
|
|
|
447
451
|
};
|
|
448
452
|
});
|
|
449
453
|
|
|
454
|
+
const createMockPresstoPressable = (name: string): React.FC<MockPresstoPressableProps> => {
|
|
455
|
+
return ({children, enabled = true, onPress, ...props}) =>
|
|
456
|
+
React.createElement(
|
|
457
|
+
name,
|
|
458
|
+
{
|
|
459
|
+
...props,
|
|
460
|
+
disabled: !enabled,
|
|
461
|
+
onPress: enabled ? onPress : undefined,
|
|
462
|
+
},
|
|
463
|
+
children
|
|
464
|
+
);
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
mock.module("pressto", () => ({
|
|
468
|
+
PressableOpacity: createMockPresstoPressable("PressableOpacity"),
|
|
469
|
+
PressableScale: createMockPresstoPressable("PressableScale"),
|
|
470
|
+
PressableWithoutFeedback: createMockPresstoPressable("PressableWithoutFeedback"),
|
|
471
|
+
}));
|
|
472
|
+
|
|
450
473
|
// Initialize globalThis.expo early for expo-modules-core
|
|
451
474
|
if (typeof globalThis.expo === "undefined") {
|
|
452
475
|
const EventEmitterClass = class EventEmitter {
|
|
@@ -547,9 +570,9 @@ mock.module("react-signature-canvas", () => {
|
|
|
547
570
|
// mock used by Tooltip.test.tsx so the two don't disagree.
|
|
548
571
|
mock.module("react-native-portalize", () => ({
|
|
549
572
|
Host: ({children}: MockComponentProps) =>
|
|
550
|
-
React.createElement("View", {
|
|
573
|
+
React.createElement("View", {testID: "portal-host"}, children),
|
|
551
574
|
Portal: ({children}: MockComponentProps) =>
|
|
552
|
-
React.createElement("View", {
|
|
575
|
+
React.createElement("View", {testID: "portal"}, children),
|
|
553
576
|
}));
|
|
554
577
|
|
|
555
578
|
// Mock IconButton component
|
package/src/index.tsx
CHANGED
|
@@ -58,6 +58,7 @@ export * from "./ModalSheet";
|
|
|
58
58
|
export * from "./MultiselectField";
|
|
59
59
|
export * from "./NumberField";
|
|
60
60
|
export * from "./NumberPickerActionSheet";
|
|
61
|
+
export * from "./OfflineBanner";
|
|
61
62
|
export * from "./OpenAPIContext";
|
|
62
63
|
export * from "./Page";
|
|
63
64
|
export * from "./Pagination";
|
|
@@ -354,8 +354,11 @@ exports[`LoginScreen renders correctly with all props 1`] = `
|
|
|
354
354
|
],
|
|
355
355
|
"props": {
|
|
356
356
|
"accessibilityHint": "Press to perform action",
|
|
357
|
-
"
|
|
358
|
-
"
|
|
357
|
+
"accessibilityLabel": "Log In",
|
|
358
|
+
"accessibilityRole": "button",
|
|
359
|
+
"accessibilityState": {
|
|
360
|
+
"disabled": true,
|
|
361
|
+
},
|
|
359
362
|
"disabled": true,
|
|
360
363
|
"onPress": [Function: debounced],
|
|
361
364
|
"style": {
|
|
@@ -433,8 +436,11 @@ exports[`LoginScreen renders correctly with all props 1`] = `
|
|
|
433
436
|
],
|
|
434
437
|
"props": {
|
|
435
438
|
"accessibilityHint": "Press to perform action",
|
|
436
|
-
"
|
|
437
|
-
"
|
|
439
|
+
"accessibilityLabel": "Forgot password?",
|
|
440
|
+
"accessibilityRole": "button",
|
|
441
|
+
"accessibilityState": {
|
|
442
|
+
"disabled": true,
|
|
443
|
+
},
|
|
438
444
|
"disabled": true,
|
|
439
445
|
"onPress": [Function: debounced],
|
|
440
446
|
"style": {
|
|
@@ -513,8 +519,11 @@ exports[`LoginScreen renders correctly with all props 1`] = `
|
|
|
513
519
|
],
|
|
514
520
|
"props": {
|
|
515
521
|
"accessibilityHint": "Press to perform action",
|
|
516
|
-
"
|
|
517
|
-
"
|
|
522
|
+
"accessibilityLabel": "Need an account? Sign Up",
|
|
523
|
+
"accessibilityRole": "button",
|
|
524
|
+
"accessibilityState": {
|
|
525
|
+
"disabled": true,
|
|
526
|
+
},
|
|
518
527
|
"disabled": true,
|
|
519
528
|
"onPress": [Function: debounced],
|
|
520
529
|
"style": {
|
|
@@ -669,8 +669,11 @@ exports[`SignUpScreen renders correctly with all props 1`] = `
|
|
|
669
669
|
],
|
|
670
670
|
"props": {
|
|
671
671
|
"accessibilityHint": "Press to perform action",
|
|
672
|
-
"
|
|
673
|
-
"
|
|
672
|
+
"accessibilityLabel": "Sign Up",
|
|
673
|
+
"accessibilityRole": "button",
|
|
674
|
+
"accessibilityState": {
|
|
675
|
+
"disabled": true,
|
|
676
|
+
},
|
|
674
677
|
"disabled": true,
|
|
675
678
|
"onPress": [Function: debounced],
|
|
676
679
|
"style": {
|
|
@@ -748,8 +751,11 @@ exports[`SignUpScreen renders correctly with all props 1`] = `
|
|
|
748
751
|
],
|
|
749
752
|
"props": {
|
|
750
753
|
"accessibilityHint": "Press to perform action",
|
|
751
|
-
"
|
|
752
|
-
"
|
|
754
|
+
"accessibilityLabel": "Already have an account? Log in",
|
|
755
|
+
"accessibilityRole": "button",
|
|
756
|
+
"accessibilityState": {
|
|
757
|
+
"disabled": true,
|
|
758
|
+
},
|
|
753
759
|
"disabled": true,
|
|
754
760
|
"onPress": [Function: debounced],
|
|
755
761
|
"style": {
|
|
@@ -41,6 +41,7 @@ declare module "react-native-swiper-flatlist" {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export const SwiperFlatList: React.ForwardRefExoticComponent<
|
|
44
|
+
// biome-ignore lint/suspicious/noExplicitAny: declaration must use any for the generic to allow consumers to specify their data type without explicit type args
|
|
44
45
|
SwiperFlatListProps<any> & React.RefAttributes<SwiperFlatListRefProps>
|
|
45
46
|
>;
|
|
46
47
|
|