panelui-native 0.108.0 → 0.110.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/lib/module/components/avatar-cropper/avatar-cropper-math.js +320 -0
- package/lib/module/components/avatar-cropper/avatar-cropper-math.js.map +1 -0
- package/lib/module/components/avatar-cropper/index.js +656 -0
- package/lib/module/components/avatar-cropper/index.js.map +1 -0
- package/lib/module/components/badge/index.js +85 -4
- package/lib/module/components/badge/index.js.map +1 -1
- package/lib/module/components/button/index.js +12 -0
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/button-group/index.js +3 -0
- package/lib/module/components/button-group/index.js.map +1 -1
- package/lib/module/components/checkbox/index.js +54 -4
- package/lib/module/components/checkbox/index.js.map +1 -1
- package/lib/module/components/chip/index.js +23 -1
- package/lib/module/components/chip/index.js.map +1 -1
- package/lib/module/components/input/index.js +14 -0
- package/lib/module/components/input/index.js.map +1 -1
- package/lib/module/components/map/index.js +157 -5
- package/lib/module/components/map/index.js.map +1 -1
- package/lib/module/components/map/map-insets.js +174 -0
- package/lib/module/components/map/map-insets.js.map +1 -0
- package/lib/module/components/radio-group/index.js +49 -3
- package/lib/module/components/radio-group/index.js.map +1 -1
- package/lib/module/components/select/index.js +54 -2
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/components/switch/index.js +42 -3
- package/lib/module/components/switch/index.js.map +1 -1
- package/lib/module/components/tabs/index.js +147 -1
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/textarea/index.js +18 -0
- package/lib/module/components/textarea/index.js.map +1 -1
- package/lib/module/components/toggle-button/index.js +34 -2
- package/lib/module/components/toggle-button/index.js.map +1 -1
- package/lib/module/icons/index.js +6 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/panel-ui-provider.js +22 -10
- package/lib/module/providers/panel-ui-provider.js.map +1 -1
- package/lib/typescript/src/components/avatar-cropper/avatar-cropper-math.d.ts +98 -0
- package/lib/typescript/src/components/avatar-cropper/avatar-cropper-math.d.ts.map +1 -0
- package/lib/typescript/src/components/avatar-cropper/index.d.ts +168 -0
- package/lib/typescript/src/components/avatar-cropper/index.d.ts.map +1 -0
- package/lib/typescript/src/components/badge/index.d.ts +68 -0
- package/lib/typescript/src/components/badge/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +12 -0
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button-group/index.d.ts +9 -0
- package/lib/typescript/src/components/button-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/checkbox/index.d.ts +89 -0
- package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/chip/index.d.ts +24 -0
- package/lib/typescript/src/components/chip/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input/index.d.ts +30 -0
- package/lib/typescript/src/components/input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/map/index.d.ts +67 -1
- package/lib/typescript/src/components/map/index.d.ts.map +1 -1
- package/lib/typescript/src/components/map/map-insets.d.ts +80 -0
- package/lib/typescript/src/components/map/map-insets.d.ts.map +1 -0
- package/lib/typescript/src/components/radio-group/index.d.ts +188 -1
- package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/select/index.d.ts +9 -1
- package/lib/typescript/src/components/select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/switch/index.d.ts +38 -0
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tabs/index.d.ts +10 -1
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/textarea/index.d.ts +18 -0
- package/lib/typescript/src/components/textarea/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toggle-button/index.d.ts +24 -0
- package/lib/typescript/src/components/toggle-button/index.d.ts.map +1 -1
- package/lib/typescript/src/icons/index.d.ts +2 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +8 -7
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
- package/package.json +9 -1
- package/src/components/avatar-cropper/avatar-cropper-math.ts +311 -0
- package/src/components/avatar-cropper/index.tsx +808 -0
- package/src/components/badge/index.tsx +30 -4
- package/src/components/button/index.tsx +9 -2
- package/src/components/button-group/index.tsx +1 -0
- package/src/components/checkbox/index.tsx +47 -3
- package/src/components/chip/index.tsx +5 -1
- package/src/components/input/index.tsx +6 -0
- package/src/components/map/index.tsx +215 -5
- package/src/components/map/map-insets.ts +169 -0
- package/src/components/radio-group/index.tsx +56 -4
- package/src/components/select/index.tsx +50 -1
- package/src/components/switch/index.tsx +16 -4
- package/src/components/tabs/index.tsx +61 -0
- package/src/components/textarea/index.tsx +6 -0
- package/src/components/toggle-button/index.tsx +16 -1
- package/src/icons/index.tsx +3 -0
- package/src/index.ts +24 -3
- package/src/providers/panel-ui-provider.tsx +21 -11
package/src/index.ts
CHANGED
|
@@ -75,6 +75,22 @@ export {
|
|
|
75
75
|
type AvatarBadgeProps,
|
|
76
76
|
type AvatarGroupProps,
|
|
77
77
|
} from './components/avatar';
|
|
78
|
+
export {
|
|
79
|
+
AvatarCropper,
|
|
80
|
+
hasAvatarCropperExport,
|
|
81
|
+
pickAvatarImage,
|
|
82
|
+
type AvatarCrop,
|
|
83
|
+
type AvatarCropOptions,
|
|
84
|
+
type AvatarCropResult,
|
|
85
|
+
type AvatarCropperCanvasProps,
|
|
86
|
+
type AvatarCropperHandle,
|
|
87
|
+
type AvatarCropperProps,
|
|
88
|
+
type AvatarCropperResetProps,
|
|
89
|
+
type AvatarCropperRotateProps,
|
|
90
|
+
type AvatarCropperShape,
|
|
91
|
+
type AvatarCropperSource,
|
|
92
|
+
type PickAvatarImageOptions,
|
|
93
|
+
} from './components/avatar-cropper';
|
|
78
94
|
export {
|
|
79
95
|
Attachment,
|
|
80
96
|
type AttachmentProps,
|
|
@@ -108,7 +124,7 @@ export {
|
|
|
108
124
|
type AnimatedBadgeSize,
|
|
109
125
|
type AnimatedBadgeStatus,
|
|
110
126
|
} from './components/animated-badge';
|
|
111
|
-
export { Badge, type BadgeProps } from './components/badge';
|
|
127
|
+
export { Badge, type BadgeProps, type BadgeSize } from './components/badge';
|
|
112
128
|
export {
|
|
113
129
|
BarChart,
|
|
114
130
|
useBarChart,
|
|
@@ -346,6 +362,8 @@ export {
|
|
|
346
362
|
type MapPopupProps,
|
|
347
363
|
type MapControlsProps,
|
|
348
364
|
type MapControlsPosition,
|
|
365
|
+
type MapOverlayProps,
|
|
366
|
+
type MapOverlayPosition,
|
|
349
367
|
type MapRouteProps,
|
|
350
368
|
type MapArcProps,
|
|
351
369
|
type MapGeoJSONProps,
|
|
@@ -380,6 +398,7 @@ export {
|
|
|
380
398
|
type SelectItemProps,
|
|
381
399
|
type SelectGroupProps,
|
|
382
400
|
type SelectPresentation,
|
|
401
|
+
type SelectSize,
|
|
383
402
|
type SelectSheetProps,
|
|
384
403
|
} from './components/select';
|
|
385
404
|
export {
|
|
@@ -417,6 +436,7 @@ export {
|
|
|
417
436
|
type TabsTriggerProps,
|
|
418
437
|
type TabsContentProps,
|
|
419
438
|
type TabsVariant,
|
|
439
|
+
type TabsSize,
|
|
420
440
|
type TabsKeepMounted,
|
|
421
441
|
type TabsAnimation,
|
|
422
442
|
} from './components/tabs';
|
|
@@ -462,7 +482,7 @@ export {
|
|
|
462
482
|
type DateRange,
|
|
463
483
|
} from './components/calendar';
|
|
464
484
|
export { Card, type CardProps } from './components/card';
|
|
465
|
-
export { Checkbox, type CheckboxProps } from './components/checkbox';
|
|
485
|
+
export { Checkbox, type CheckboxProps, type CheckboxSize } from './components/checkbox';
|
|
466
486
|
export {
|
|
467
487
|
Chip,
|
|
468
488
|
useChip,
|
|
@@ -1110,6 +1130,7 @@ export {
|
|
|
1110
1130
|
RadioGroup,
|
|
1111
1131
|
type RadioGroupProps,
|
|
1112
1132
|
type RadioGroupItemProps,
|
|
1133
|
+
type RadioSize,
|
|
1113
1134
|
} from './components/radio-group';
|
|
1114
1135
|
export {
|
|
1115
1136
|
Rating,
|
|
@@ -1408,7 +1429,7 @@ export {
|
|
|
1408
1429
|
type SwipeOpenSide,
|
|
1409
1430
|
type SwipeHandle,
|
|
1410
1431
|
} from './components/swipe';
|
|
1411
|
-
export { Switch, type SwitchProps } from './components/switch';
|
|
1432
|
+
export { Switch, type SwitchProps, type SwitchSize } from './components/switch';
|
|
1412
1433
|
export {
|
|
1413
1434
|
TimePicker,
|
|
1414
1435
|
type TimePickerProps,
|
|
@@ -53,23 +53,33 @@ function KeyboardPassthrough({ children }: KeyboardHostProps) {
|
|
|
53
53
|
|
|
54
54
|
let keyboardProvider: ComponentType<KeyboardHostProps> | undefined;
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The controller's provider, or undefined when it cannot be used.
|
|
58
|
+
*
|
|
59
|
+
* The `require` has to stay a statement directly inside the `try` block, with
|
|
60
|
+
* the native check as an early return above it rather than an `if` around it.
|
|
61
|
+
* Metro resolves every literal `require` when it bundles, and it only lets a
|
|
62
|
+
* missing package through when the call sits directly in a `try` block — one
|
|
63
|
+
* `if` deeper and it is a hard dependency, so an app without the controller
|
|
64
|
+
* fails to build before this `catch` could ever run.
|
|
65
|
+
* `test/optional-requires.test.mjs` holds every optional peer to that.
|
|
66
|
+
*/
|
|
67
|
+
function loadKeyboardProvider(): ComponentType<KeyboardHostProps> | undefined {
|
|
60
68
|
try {
|
|
61
|
-
if (TurboModuleRegistry.get('KeyboardController')
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
69
|
+
if (TurboModuleRegistry.get('KeyboardController') === null) return undefined;
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
71
|
+
const controller = require('react-native-keyboard-controller');
|
|
72
|
+
return controller?.KeyboardProvider;
|
|
66
73
|
} catch {
|
|
67
74
|
// Not installed, or installed without its native half. Either way the
|
|
68
75
|
// pass-through is the answer.
|
|
76
|
+
return undefined;
|
|
69
77
|
}
|
|
78
|
+
}
|
|
70
79
|
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
function resolveKeyboardProvider(): ComponentType<KeyboardHostProps> {
|
|
81
|
+
if (!keyboardProvider) keyboardProvider = loadKeyboardProvider() ?? KeyboardPassthrough;
|
|
82
|
+
return keyboardProvider;
|
|
73
83
|
}
|
|
74
84
|
|
|
75
85
|
export interface PanelUIProviderProps {
|