panelui-native 0.32.0 → 0.35.2
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/README.md +2 -1
- package/lib/module/components/button/index.js +106 -11
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/drawer/index.js +477 -0
- package/lib/module/components/drawer/index.js.map +1 -0
- package/lib/module/components/panelside/index.js +1024 -0
- package/lib/module/components/panelside/index.js.map +1 -0
- package/lib/module/components/progress/index.js +64 -24
- package/lib/module/components/progress/index.js.map +1 -1
- package/lib/module/components/select/index.js +14 -3
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/components/swipe/index.js +537 -0
- package/lib/module/components/swipe/index.js.map +1 -0
- package/lib/module/icons/index.js +20 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +4 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/index.js +30 -0
- package/lib/module/native/index.js.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +22 -1
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/drawer/index.d.ts +146 -0
- package/lib/typescript/src/components/drawer/index.d.ts.map +1 -0
- package/lib/typescript/src/components/panelside/index.d.ts +354 -0
- package/lib/typescript/src/components/panelside/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progress/index.d.ts +25 -4
- package/lib/typescript/src/components/progress/index.d.ts.map +1 -1
- package/lib/typescript/src/components/select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/swipe/index.d.ts +206 -0
- package/lib/typescript/src/components/swipe/index.d.ts.map +1 -0
- package/lib/typescript/src/icons/index.d.ts +1 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/index.d.ts +20 -0
- package/lib/typescript/src/native/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/button/index.tsx +140 -8
- package/src/components/drawer/index.tsx +662 -0
- package/src/components/panelside/index.tsx +1358 -0
- package/src/components/progress/index.tsx +93 -25
- package/src/components/select/index.tsx +23 -3
- package/src/components/swipe/index.tsx +687 -0
- package/src/icons/index.tsx +14 -0
- package/src/index.ts +42 -0
- package/src/native/index.ts +51 -0
package/src/index.ts
CHANGED
|
@@ -304,6 +304,18 @@ export {
|
|
|
304
304
|
type ChipVariant,
|
|
305
305
|
type ChipSize,
|
|
306
306
|
} from './components/chip';
|
|
307
|
+
export {
|
|
308
|
+
Drawer,
|
|
309
|
+
type DrawerProps,
|
|
310
|
+
type DrawerTriggerProps,
|
|
311
|
+
type DrawerContentProps,
|
|
312
|
+
type DrawerHeaderProps,
|
|
313
|
+
type DrawerBodyProps,
|
|
314
|
+
type DrawerFooterProps,
|
|
315
|
+
type DrawerCloseProps,
|
|
316
|
+
type DrawerSide,
|
|
317
|
+
type DrawerSize,
|
|
318
|
+
} from './components/drawer';
|
|
307
319
|
export {
|
|
308
320
|
EmptyState,
|
|
309
321
|
type EmptyStateProps,
|
|
@@ -349,6 +361,26 @@ export {
|
|
|
349
361
|
type NumberInputProps,
|
|
350
362
|
} from './components/number-input';
|
|
351
363
|
export { OtpInput, type OtpInputProps } from './components/otp-input';
|
|
364
|
+
export {
|
|
365
|
+
Panelside,
|
|
366
|
+
usePanelside,
|
|
367
|
+
type PanelsideProps,
|
|
368
|
+
type PanelsidePanelProps,
|
|
369
|
+
type PanelsideHeaderProps,
|
|
370
|
+
type PanelsideSearchProps,
|
|
371
|
+
type PanelsideContentProps,
|
|
372
|
+
type PanelsideGroupProps,
|
|
373
|
+
type PanelsideGroupLabelProps,
|
|
374
|
+
type PanelsideItemProps,
|
|
375
|
+
type PanelsideActionProps,
|
|
376
|
+
type PanelsideFooterProps,
|
|
377
|
+
type PanelsideCtaProps,
|
|
378
|
+
type PanelsideSceneProps,
|
|
379
|
+
type PanelsideTriggerProps,
|
|
380
|
+
type PanelsideMode,
|
|
381
|
+
type PanelsideSwipeFrom,
|
|
382
|
+
type UsePanelsideResult,
|
|
383
|
+
} from './components/panelside';
|
|
352
384
|
export { Textarea, type TextareaProps } from './components/textarea';
|
|
353
385
|
export {
|
|
354
386
|
Item,
|
|
@@ -588,6 +620,15 @@ export {
|
|
|
588
620
|
type StepsOrientation,
|
|
589
621
|
} from './components/steps';
|
|
590
622
|
export { Surface, type SurfaceProps } from './components/surface';
|
|
623
|
+
export {
|
|
624
|
+
Swipe,
|
|
625
|
+
type SwipeProps,
|
|
626
|
+
type SwipePanelProps,
|
|
627
|
+
type SwipeActionProps,
|
|
628
|
+
type SwipeActionColor,
|
|
629
|
+
type SwipeOpenSide,
|
|
630
|
+
type SwipeHandle,
|
|
631
|
+
} from './components/swipe';
|
|
591
632
|
export { Switch, type SwitchProps } from './components/switch';
|
|
592
633
|
export {
|
|
593
634
|
Timeline,
|
|
@@ -670,6 +711,7 @@ export {
|
|
|
670
711
|
ListChecksIcon,
|
|
671
712
|
LockIcon,
|
|
672
713
|
MaximizeIcon,
|
|
714
|
+
MenuIcon,
|
|
673
715
|
MessageCircleIcon,
|
|
674
716
|
MicIcon,
|
|
675
717
|
MinusIcon,
|
package/src/native/index.ts
CHANGED
|
@@ -97,3 +97,54 @@ export function getNativeUI(): NativeUIModule | null {
|
|
|
97
97
|
export function hasNativeUI(): boolean {
|
|
98
98
|
return getNativeUI() !== null;
|
|
99
99
|
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The SwiftUI view modifiers, for the handful of things the portable props
|
|
103
|
+
* cannot express.
|
|
104
|
+
*
|
|
105
|
+
* The universal components cover the common ground — a variant, a size, an
|
|
106
|
+
* enabled flag — but the platform has looks with no cross-platform equivalent,
|
|
107
|
+
* and Liquid Glass is the one that matters: it is the material iOS 26 draws its
|
|
108
|
+
* own floating controls in, and nothing in the portable API asks for it. A
|
|
109
|
+
* modifier is how SwiftUI is configured, so this is the door to it.
|
|
110
|
+
*
|
|
111
|
+
* iOS only, and lazily resolved like everything else here. Android's toolkit
|
|
112
|
+
* has its own modifier system and no equivalent material, so asking for glass
|
|
113
|
+
* there is not a downgrade — it is a different question.
|
|
114
|
+
*/
|
|
115
|
+
interface SwiftUIModifiers {
|
|
116
|
+
buttonStyle: (
|
|
117
|
+
style:
|
|
118
|
+
| 'automatic'
|
|
119
|
+
| 'bordered'
|
|
120
|
+
| 'borderedProminent'
|
|
121
|
+
| 'borderless'
|
|
122
|
+
| 'glass'
|
|
123
|
+
| 'glassProminent'
|
|
124
|
+
| 'plain'
|
|
125
|
+
) => unknown;
|
|
126
|
+
buttonBorderShape: (
|
|
127
|
+
shape: 'automatic' | 'capsule' | 'roundedRectangle' | 'circle',
|
|
128
|
+
cornerRadius?: number
|
|
129
|
+
) => unknown;
|
|
130
|
+
controlSize: (size: 'mini' | 'small' | 'regular' | 'large' | 'extraLarge') => unknown;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
let modifiersResolved = false;
|
|
134
|
+
let modifiers: SwiftUIModifiers | null = null;
|
|
135
|
+
|
|
136
|
+
export function getSwiftUIModifiers(): SwiftUIModifiers | null {
|
|
137
|
+
if (modifiersResolved) return modifiers;
|
|
138
|
+
modifiersResolved = true;
|
|
139
|
+
|
|
140
|
+
if (Platform.OS !== 'ios') return null;
|
|
141
|
+
|
|
142
|
+
try {
|
|
143
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
144
|
+
modifiers = require('@expo/ui/swift-ui/modifiers') as SwiftUIModifiers;
|
|
145
|
+
} catch {
|
|
146
|
+
modifiers = null;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return modifiers;
|
|
150
|
+
}
|