@flipova/foundation 2.4.4 → 3.0.0-beta.1
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/CHANGES.md +66 -0
- package/COMPONENTS.md +102 -0
- package/DOCS.md +261 -0
- package/LICENSE +1 -1
- package/README.md +169 -118
- package/components/contract/index.ts +3 -0
- package/components/contract/recipes/accordion.ts +42 -0
- package/components/contract/recipes/avatar.ts +41 -0
- package/components/contract/recipes/badge.ts +46 -0
- package/components/contract/recipes/button.ts +58 -0
- package/components/contract/recipes/calendar.ts +118 -0
- package/components/contract/recipes/card.ts +21 -0
- package/components/contract/recipes/checkbox.ts +33 -0
- package/components/contract/recipes/divider.ts +9 -0
- package/components/contract/recipes/fab.ts +31 -0
- package/components/contract/recipes/feedback.ts +66 -0
- package/components/contract/recipes/formcontrol.ts +16 -0
- package/components/contract/recipes/heading.ts +16 -0
- package/components/contract/recipes/icon.ts +40 -0
- package/components/contract/recipes/index.ts +30 -0
- package/components/contract/recipes/input.ts +39 -0
- package/components/contract/recipes/layout.ts +44 -0
- package/components/contract/recipes/link.ts +6 -0
- package/components/contract/recipes/modal.ts +40 -0
- package/components/contract/recipes/overlay.ts +250 -0
- package/components/contract/recipes/progress.ts +27 -0
- package/components/contract/recipes/radio.ts +39 -0
- package/components/contract/recipes/select.ts +63 -0
- package/components/contract/recipes/skeleton.ts +25 -0
- package/components/contract/recipes/slider.ts +50 -0
- package/components/contract/recipes/spinner.ts +12 -0
- package/components/contract/recipes/switch.ts +26 -0
- package/components/contract/recipes/table.ts +37 -0
- package/components/contract/recipes/tabs.ts +31 -0
- package/components/contract/recipes/text.ts +12 -0
- package/components/contract/recipes/textarea.ts +37 -0
- package/components/contract/recipes/util.ts +15 -0
- package/components/contract/theme.ts +116 -0
- package/components/contract/types.ts +598 -0
- package/components/providers/css-vars.ts +43 -0
- package/components/providers/flipova/components/Accordion.tsx +41 -0
- package/components/providers/flipova/components/ActionSheet.tsx +34 -0
- package/components/providers/flipova/components/Alert.tsx +15 -0
- package/components/providers/flipova/components/AlertDialog.tsx +31 -0
- package/components/providers/flipova/components/Avatar.tsx +30 -0
- package/components/providers/flipova/components/Badge.tsx +14 -0
- package/components/providers/flipova/components/BottomSheet.tsx +24 -0
- package/components/providers/flipova/components/Box.tsx +1 -0
- package/components/providers/flipova/components/Button.tsx +31 -0
- package/components/providers/flipova/components/Calendar.tsx +85 -0
- package/components/providers/flipova/components/Card.tsx +13 -0
- package/components/providers/flipova/components/Center.tsx +11 -0
- package/components/providers/flipova/components/Checkbox.tsx +24 -0
- package/components/providers/flipova/components/DateTimePicker.tsx +45 -0
- package/components/providers/flipova/components/Divider.tsx +9 -0
- package/components/providers/flipova/components/Drawer.tsx +18 -0
- package/components/providers/flipova/components/Fab.tsx +22 -0
- package/components/providers/flipova/components/FlatList.tsx +1 -0
- package/components/providers/flipova/components/FormControl.tsx +27 -0
- package/components/providers/flipova/components/Grid.tsx +18 -0
- package/components/providers/flipova/components/HStack.tsx +13 -0
- package/components/providers/flipova/components/Heading.tsx +19 -0
- package/components/providers/flipova/components/Icon.tsx +20 -0
- package/components/providers/flipova/components/Image.tsx +1 -0
- package/components/providers/flipova/components/ImageBackground.tsx +1 -0
- package/components/providers/flipova/components/ImageViewer.tsx +25 -0
- package/components/providers/flipova/components/Input.tsx +29 -0
- package/components/providers/flipova/components/InputAccessoryView.tsx +1 -0
- package/components/providers/flipova/components/KeyboardAvoidingView.tsx +1 -0
- package/components/providers/flipova/components/Link.tsx +21 -0
- package/components/providers/flipova/components/LiquidGlass.tsx +13 -0
- package/components/providers/flipova/components/Menu.tsx +43 -0
- package/components/providers/flipova/components/Modal.tsx +24 -0
- package/components/providers/flipova/components/Popover.tsx +23 -0
- package/components/providers/flipova/components/Portal.tsx +42 -0
- package/components/providers/flipova/components/Pressable.tsx +1 -0
- package/components/providers/flipova/components/Progress.tsx +22 -0
- package/components/providers/flipova/components/RadioGroup.tsx +36 -0
- package/components/providers/flipova/components/RefreshControl.tsx +1 -0
- package/components/providers/flipova/components/SafeAreaView.tsx +1 -0
- package/components/providers/flipova/components/ScrollView.tsx +1 -0
- package/components/providers/flipova/components/SectionList.tsx +1 -0
- package/components/providers/flipova/components/Select.tsx +61 -0
- package/components/providers/flipova/components/Skeleton.tsx +25 -0
- package/components/providers/flipova/components/Slider.tsx +52 -0
- package/components/providers/flipova/components/Spinner.tsx +19 -0
- package/components/providers/flipova/components/StatusBar.tsx +1 -0
- package/components/providers/flipova/components/Switch.tsx +21 -0
- package/components/providers/flipova/components/Table.tsx +33 -0
- package/components/providers/flipova/components/Tabs.tsx +39 -0
- package/components/providers/flipova/components/Text.tsx +13 -0
- package/components/providers/flipova/components/Textarea.tsx +28 -0
- package/components/providers/flipova/components/Toast.tsx +28 -0
- package/components/providers/flipova/components/Tooltip.tsx +34 -0
- package/components/providers/flipova/components/VStack.tsx +13 -0
- package/components/providers/flipova/components/View.tsx +1 -0
- package/components/providers/flipova/components/VirtualizedList.tsx +1 -0
- package/components/providers/flipova/index.tsx +189 -0
- package/components/providers/gluestack/index.tsx +226 -0
- package/components/providers/gluestack/more.tsx +151 -0
- package/components/{ui → providers/gluestack/ui}/accordion/index.tsx +2 -2
- package/components/{ui → providers/gluestack/ui}/actionsheet/index.tsx +15 -15
- package/components/{ui → providers/gluestack/ui}/alert/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/alert-dialog/index.tsx +3 -3
- package/components/{ui → providers/gluestack/ui}/badge/index.tsx +2 -2
- package/components/{ui → providers/gluestack/ui}/bottomsheet/index.tsx +11 -10
- package/components/{ui → providers/gluestack/ui}/box/index.tsx +4 -1
- package/components/{ui → providers/gluestack/ui}/button/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/calendar/index.tsx +4 -4
- package/components/{ui → providers/gluestack/ui}/card/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/center/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/checkbox/index.tsx +9 -8
- package/components/{ui → providers/gluestack/ui}/date-time-picker/index.tsx +4 -4
- package/components/providers/gluestack/ui/date-time-picker/index.web.tsx +197 -0
- package/components/{ui → providers/gluestack/ui}/divider/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/drawer/index.tsx +2 -2
- package/components/{ui → providers/gluestack/ui}/fab/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/form-control/index.tsx +3 -3
- package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/config.ts +1 -62
- package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/tokens.js +1 -1
- package/components/{ui → providers/gluestack/ui}/grid/index.tsx +3 -3
- package/components/{ui → providers/gluestack/ui}/heading/index.tsx +7 -7
- package/components/{ui → providers/gluestack/ui}/hstack/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/icon/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/image/index.tsx +0 -1
- package/components/{ui → providers/gluestack/ui}/image-viewer/index.tsx +96 -99
- package/components/providers/gluestack/ui/index.ts +58 -0
- package/components/{ui → providers/gluestack/ui}/input/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/link/index.tsx +2 -2
- package/components/{ui → providers/gluestack/ui}/liquid-glass/index.tsx +2 -2
- package/components/{ui → providers/gluestack/ui}/menu/index.tsx +5 -4
- package/components/{ui → providers/gluestack/ui}/modal/index.tsx +19 -17
- package/components/{ui → providers/gluestack/ui}/popover/index.tsx +4 -4
- package/components/{ui → providers/gluestack/ui}/portal/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/progress/index.tsx +2 -2
- package/components/{ui → providers/gluestack/ui}/radio/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/select/index.tsx +8 -12
- package/components/{ui → providers/gluestack/ui}/select/select-actionsheet.tsx +13 -13
- package/components/{ui → providers/gluestack/ui}/skeleton/index.tsx +2 -2
- package/components/{ui → providers/gluestack/ui}/slider/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/spinner/index.tsx +2 -2
- package/components/{ui → providers/gluestack/ui}/table/index.tsx +33 -33
- package/components/{ui → providers/gluestack/ui}/tabs/TabsAnimatedIndicator.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/tabs/index.tsx +2 -2
- package/components/{ui → providers/gluestack/ui}/text/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/toast/index.tsx +4 -4
- package/components/{ui → providers/gluestack/ui}/tooltip/index.tsx +1 -1
- package/components/{ui → providers/gluestack/ui}/vstack/index.tsx +1 -1
- package/components/providers/index.ts +2 -0
- package/components/providers/paper/index.tsx +449 -0
- package/components/providers/provider.tsx +80 -0
- package/components/providers/reusables/classes.ts +163 -0
- package/components/providers/reusables/index.tsx +289 -0
- package/components/providers/rn-base/Box.tsx +7 -0
- package/components/providers/rn-base/FlatList.tsx +16 -0
- package/components/providers/rn-base/Image.tsx +18 -0
- package/components/providers/rn-base/ImageBackground.tsx +11 -0
- package/components/providers/rn-base/InputAccessoryView.tsx +9 -0
- package/components/providers/rn-base/KeyboardAvoidingView.tsx +15 -0
- package/components/providers/rn-base/Pressable.tsx +19 -0
- package/components/providers/rn-base/RefreshControl.tsx +16 -0
- package/components/providers/rn-base/SafeAreaView.tsx +11 -0
- package/components/providers/rn-base/ScrollView.tsx +11 -0
- package/components/providers/rn-base/SectionList.tsx +22 -0
- package/components/providers/rn-base/StatusBar.tsx +17 -0
- package/components/providers/rn-base/View.tsx +7 -0
- package/components/providers/rn-base/VirtualizedList.tsx +18 -0
- package/components/providers/rn-base/index.tsx +64 -0
- package/components/providers/tamagui/index.tsx +375 -0
- package/components/providers/types.ts +17 -0
- package/components/theme/design-theme.ts +230 -0
- package/components/ui/create.tsx +14 -0
- package/components/ui/index.ts +68 -58
- package/components/ui/resolve.ts +40 -0
- package/design/canonical.index.txt +2 -16
- package/design/manifest.xml +4 -3
- package/design/schema.xsd +44 -434
- package/design/themes.xml +7 -177
- package/design/tools/{npm.js → cli.js} +173 -73
- package/design/tools/gui/index.html +998 -0
- package/design/tools/lib/check.js +533 -0
- package/design/tools/lib/contract.js +23 -0
- package/design/tools/lib/edit.js +166 -0
- package/design/tools/lib/generate.js +465 -0
- package/design/tools/lib/gui.js +614 -0
- package/design/tools/lib/lint.js +139 -0
- package/design/tools/lib/registry.js +135 -0
- package/design/tools/lib/util.js +53 -0
- package/design/tools/lib/xml.js +257 -0
- package/design/tools/lib/xsd.js +408 -0
- package/dist/chunk-2QM2ZUDS.mjs +1308 -0
- package/dist/chunk-2QM2ZUDS.mjs.map +1 -0
- package/dist/chunk-2T2TCUYF.js +1371 -0
- package/dist/chunk-2T2TCUYF.js.map +1 -0
- package/dist/chunk-6UKTC4KF.js +43 -0
- package/dist/chunk-6UKTC4KF.js.map +1 -0
- package/dist/chunk-6Z4WRTI4.mjs +37 -0
- package/dist/chunk-6Z4WRTI4.mjs.map +1 -0
- package/dist/chunk-G3K6J5KY.js +157 -0
- package/dist/chunk-G3K6J5KY.js.map +1 -0
- package/dist/chunk-GM45RCSI.mjs +96 -0
- package/dist/chunk-GM45RCSI.mjs.map +1 -0
- package/dist/chunk-GQJLHH2P.mjs +3 -0
- package/dist/chunk-GQJLHH2P.mjs.map +1 -0
- package/dist/chunk-ICNR56VP.js +1653 -0
- package/dist/chunk-ICNR56VP.js.map +1 -0
- package/dist/chunk-J5LGTIGS.mjs +9 -0
- package/dist/chunk-J5LGTIGS.mjs.map +1 -0
- package/dist/chunk-LRPZLF2K.mjs +30 -0
- package/dist/chunk-LRPZLF2K.mjs.map +1 -0
- package/dist/chunk-OC4MXNXU.js +32 -0
- package/dist/chunk-OC4MXNXU.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +11 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-RWVTZUEG.js +161 -0
- package/dist/chunk-RWVTZUEG.js.map +1 -0
- package/dist/chunk-V473I5XQ.js +4 -0
- package/dist/chunk-V473I5XQ.js.map +1 -0
- package/dist/chunk-V4ULAISZ.js +915 -0
- package/dist/chunk-V4ULAISZ.js.map +1 -0
- package/dist/chunk-WRJERTJS.mjs +145 -0
- package/dist/chunk-WRJERTJS.mjs.map +1 -0
- package/dist/chunk-YIBPE3KQ.mjs +864 -0
- package/dist/chunk-YIBPE3KQ.mjs.map +1 -0
- package/dist/chunk-YUAQIZPN.mjs +1556 -0
- package/dist/chunk-YUAQIZPN.mjs.map +1 -0
- package/dist/contract/index.d.mts +304 -0
- package/dist/contract/index.d.ts +304 -0
- package/dist/contract/index.js +256 -0
- package/dist/contract/index.js.map +1 -0
- package/dist/contract/index.mjs +3 -0
- package/dist/contract/index.mjs.map +1 -0
- package/dist/index.d.mts +4 -40
- package/dist/index.d.ts +4 -40
- package/dist/index.js +73 -992
- package/dist/index.mjs +2 -1
- package/dist/providers/flipova/index.d.mts +133 -0
- package/dist/providers/flipova/index.d.ts +133 -0
- package/dist/providers/flipova/index.js +249 -0
- package/dist/providers/flipova/index.js.map +1 -0
- package/dist/providers/flipova/index.mjs +4 -0
- package/dist/providers/flipova/index.mjs.map +1 -0
- package/dist/providers/gluestack/index.d.mts +7 -0
- package/dist/providers/gluestack/index.d.ts +7 -0
- package/dist/providers/gluestack/index.js +240 -0
- package/dist/providers/gluestack/index.js.map +1 -0
- package/dist/providers/gluestack/index.mjs +238 -0
- package/dist/providers/gluestack/index.mjs.map +1 -0
- package/dist/providers/gluestack/ui/index.d.mts +3472 -0
- package/dist/providers/gluestack/ui/index.d.ts +3472 -0
- package/dist/{chunk-LCTFQJZM.js → providers/gluestack/ui/index.js} +860 -2297
- package/dist/providers/gluestack/ui/index.js.map +1 -0
- package/dist/{chunk-2R66P5X5.mjs → providers/gluestack/ui/index.mjs} +468 -2062
- package/dist/providers/gluestack/ui/index.mjs.map +1 -0
- package/dist/providers/index.d.mts +37 -0
- package/dist/providers/index.d.ts +37 -0
- package/dist/providers/index.js +28 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/index.mjs +3 -0
- package/dist/providers/index.mjs.map +1 -0
- package/dist/providers/paper/index.d.mts +30 -0
- package/dist/providers/paper/index.d.ts +30 -0
- package/dist/providers/paper/index.js +362 -0
- package/dist/providers/paper/index.js.map +1 -0
- package/dist/providers/paper/index.mjs +353 -0
- package/dist/providers/paper/index.mjs.map +1 -0
- package/dist/providers/reusables/index.d.mts +60 -0
- package/dist/providers/reusables/index.d.ts +60 -0
- package/dist/providers/reusables/index.js +348 -0
- package/dist/providers/reusables/index.js.map +1 -0
- package/dist/providers/reusables/index.mjs +311 -0
- package/dist/providers/reusables/index.mjs.map +1 -0
- package/dist/providers/tamagui/index.d.mts +15 -0
- package/dist/providers/tamagui/index.d.ts +15 -0
- package/dist/providers/tamagui/index.js +275 -0
- package/dist/providers/tamagui/index.js.map +1 -0
- package/dist/providers/tamagui/index.mjs +270 -0
- package/dist/providers/tamagui/index.mjs.map +1 -0
- package/dist/theme-BznFrVT1.d.mts +566 -0
- package/dist/theme-BznFrVT1.d.ts +566 -0
- package/dist/types-C7P80VKR.d.ts +22 -0
- package/dist/types-Tspvmask.d.mts +22 -0
- package/dist/ui/index.d.mts +190 -7017
- package/dist/ui/index.d.ts +190 -7017
- package/dist/ui/index.js +73 -992
- package/dist/ui/index.mjs +2 -1
- package/package.json +136 -35
- package/components/ui/date-time-picker/index.web.tsx +0 -195
- package/design/documentation.xml +0 -607
- package/design/tools/design.js +0 -188
- package/design/tools/requirements.txt +0 -35
- package/design/tools/sources/.checker/__init__.py +0 -81
- package/design/tools/sources/.checker/checks.py +0 -198
- package/design/tools/sources/.checker/cli.py +0 -154
- package/design/tools/sources/.checker/io.py +0 -242
- package/design/tools/sources/.checker/model.py +0 -144
- package/design/tools/sources/.checker/registry.py +0 -115
- package/design/tools/sources/.checker/report.py +0 -21
- package/design/tools/sources/.docgen/__init__.py +0 -45
- package/design/tools/sources/.docgen/cli.py +0 -101
- package/design/tools/sources/.docgen/model.py +0 -147
- package/design/tools/sources/.docgen/reference.py +0 -97
- package/design/tools/sources/.docgen/site.py +0 -145
- package/design/tools/sources/.docgen/xsddoc.py +0 -329
- package/design/tools/sources/.generate/__init__.py +0 -35
- package/design/tools/sources/.generate/cli.py +0 -76
- package/design/tools/sources/.generate/common.py +0 -33
- package/design/tools/sources/.generate/config.py +0 -177
- package/design/tools/sources/.generate/model.py +0 -51
- package/design/tools/sources/.generate/tokens.py +0 -141
- package/design/tools/sources/.linter/__init__.py +0 -9
- package/design/tools/sources/.linter/cli.py +0 -44
- package/design/tools/sources/.linter/discovery.py +0 -30
- package/design/tools/sources/.linter/errors.py +0 -45
- package/design/tools/sources/.linter/linter.py +0 -68
- package/design/tools/sources/.xmleditor/__init__.py +0 -74
- package/design/tools/sources/.xmleditor/blocks.py +0 -185
- package/design/tools/sources/.xmleditor/cli.py +0 -141
- package/design/tools/sources/.xmleditor/editor.py +0 -906
- package/design/tools/sources/.xmleditor/model.py +0 -708
- package/design/tools/sources/.xmleditor/widgets.py +0 -1832
- package/design/tools/sources/.xmleditor/xsdmodel.py +0 -753
- package/design/tools/sources/checker.py +0 -55
- package/design/tools/sources/docgen.py +0 -66
- package/design/tools/sources/generate.py +0 -48
- package/design/tools/sources/linter.py +0 -54
- package/design/tools/sources/ruff.toml +0 -12
- package/design/tools/sources/xmleditor.py +0 -62
- package/design/tools/unix/_venv_python.sh +0 -16
- package/design/tools/unix/check.sh +0 -13
- package/design/tools/unix/doc.sh +0 -14
- package/design/tools/unix/gen.sh +0 -14
- package/design/tools/unix/lint.sh +0 -10
- package/design/tools/unix/run.sh +0 -20
- package/design/tools/unix/verify.sh +0 -12
- package/design/tools/unix/xmledit.sh +0 -12
- package/design/tools/windows/check.cmd +0 -12
- package/design/tools/windows/doc.cmd +0 -12
- package/design/tools/windows/gen.cmd +0 -11
- package/design/tools/windows/lint.cmd +0 -9
- package/design/tools/windows/run.cmd +0 -26
- package/design/tools/windows/verify.cmd +0 -10
- package/design/tools/windows/xmledit.cmd +0 -10
- package/dist/chunk-2R66P5X5.mjs.map +0 -1
- package/dist/chunk-LCTFQJZM.js.map +0 -1
- /package/components/{ui → providers/gluestack/ui}/accordion/ANIMATION_CUSTOMIZATION.md +0 -0
- /package/components/{ui → providers/gluestack/ui}/accordion/AccordionAnimatedHeight.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/accordion/AccordionAnimatedIcon.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/accordion/AnimatedHeight.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/accordion/AnimatedIcon.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/accordion/MIGRATION_SUMMARY.md +0 -0
- /package/components/{ui → providers/gluestack/ui}/accordion/USAGE_EXAMPLE.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/accordion/animation-config.ts +0 -0
- /package/components/{ui → providers/gluestack/ui}/avatar/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/box/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/box/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/calendar/creator.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/calendar/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/card/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/card/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/center/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/center/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/date-time-picker/creator.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/date-time-picker/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/flat-list/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/script.ts +0 -0
- /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/theme-context.ts +0 -0
- /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/tokens.d.ts +0 -0
- /package/components/{ui → providers/gluestack/ui}/gluestack-ui-provider/useGluestackColors.ts +0 -0
- /package/components/{ui → providers/gluestack/ui}/grid/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/grid/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/heading/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/heading/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/hstack/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/hstack/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/icon/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/image-background/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/image-viewer/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/input-accessory-view/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/keyboard-avoiding-view/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/pressable/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/refresh-control/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/safe-area-view/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/scroll-view/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/section-list/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/skeleton/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/skeleton/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/status-bar/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/switch/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/table/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/table/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/tabs/animation-config.ts +0 -0
- /package/components/{ui → providers/gluestack/ui}/tabs/creator.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/text/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/text/styles.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/textarea/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/view/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/virtualized-list/index.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/vstack/index.web.tsx +0 -0
- /package/components/{ui → providers/gluestack/ui}/vstack/styles.tsx +0 -0
|
@@ -0,0 +1,864 @@
|
|
|
1
|
+
import { VirtualizedList, View, StatusBar, SectionList, ScrollView, SafeAreaView, RefreshControl, Pressable, KeyboardAvoidingView, InputAccessoryView, ImageBackground, Image, FlatList, Box } from './chunk-WRJERTJS.mjs';
|
|
2
|
+
import { defineAdapter, useResolvedTheme } from './chunk-6Z4WRTI4.mjs';
|
|
3
|
+
import { stackRecipe, tooltipRecipe, toastRecipe, textareaRecipe, textRecipe, tabsRecipe, tableRecipe, switchRecipe, spinnerRecipe, sliderRecipe, sliderFraction, skeletonRecipe, selectRecipe, radioRecipe, progressRecipe, popoverRecipe, modalRecipe, menuRecipe, buttonRecipe, liquidGlassRecipe, linkRecipe, inputRecipe, imageViewerRecipe, iconRecipe, headingRecipe, gridRecipe, formControlRecipe, fabRecipe, drawerRecipe, dividerRecipe, checkboxRecipe, centerRecipe, cardRecipe, calendarRecipe, WEEKDAYS, MONTHS, monthGrid, sheetRecipe, badgeRecipe, avatarRecipe, initialsOf, alertDialogRecipe, alertRecipe, accordionRecipe, sliderValue, parseDate, shiftMonth } from './chunk-2QM2ZUDS.mjs';
|
|
4
|
+
import React5, { createContext, useState, useRef, useEffect, useContext, useId } from 'react';
|
|
5
|
+
import { View as View$1, Pressable as Pressable$1, Text, TextInput, Switch as Switch$1, ActivityIndicator, PanResponder, Animated, ScrollView as ScrollView$1, Modal as Modal$1, Linking, Image as Image$1 } from 'react-native';
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function Accordion({ items, type = "single", value, defaultValue = [], onValueChange, testID }) {
|
|
9
|
+
const t = useResolvedTheme();
|
|
10
|
+
const r = accordionRecipe(t);
|
|
11
|
+
const [inner, setInner] = useState(defaultValue);
|
|
12
|
+
const open = value ?? inner;
|
|
13
|
+
const toggle = (key) => {
|
|
14
|
+
const next = open.includes(key) ? open.filter((k) => k !== key) : type === "single" ? [key] : [...open, key];
|
|
15
|
+
if (value === void 0) setInner(next);
|
|
16
|
+
onValueChange?.(next);
|
|
17
|
+
};
|
|
18
|
+
return /* @__PURE__ */ jsx(View$1, { testID, style: r.container, children: items.map((it, i) => {
|
|
19
|
+
const isOpen = open.includes(it.key);
|
|
20
|
+
return /* @__PURE__ */ jsxs(View$1, { style: i === items.length - 1 ? {} : r.item, children: [
|
|
21
|
+
/* @__PURE__ */ jsxs(
|
|
22
|
+
Pressable$1,
|
|
23
|
+
{
|
|
24
|
+
accessibilityRole: "button",
|
|
25
|
+
"aria-expanded": isOpen,
|
|
26
|
+
"aria-disabled": it.disabled || void 0,
|
|
27
|
+
disabled: it.disabled,
|
|
28
|
+
onPress: () => toggle(it.key),
|
|
29
|
+
style: r.header(isOpen, !!it.disabled),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsx(Text, { style: r.title, children: it.title }),
|
|
32
|
+
/* @__PURE__ */ jsx(Text, { style: r.chevron, children: iconRecipe({ name: isOpen ? "chevron-up" : "chevron-down" }, t).glyph })
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
isOpen ? /* @__PURE__ */ jsx(View$1, { style: r.content, children: it.content }) : null
|
|
37
|
+
] }, it.key);
|
|
38
|
+
}) });
|
|
39
|
+
}
|
|
40
|
+
function ActionSheet({ visible, onClose, title, actions, cancelLabel = "Cancel", testID }) {
|
|
41
|
+
const t = useResolvedTheme();
|
|
42
|
+
const r = sheetRecipe(t);
|
|
43
|
+
return /* @__PURE__ */ jsx(Modal$1, { transparent: true, animationType: "slide", visible, onRequestClose: onClose, testID, children: /* @__PURE__ */ jsx(Pressable$1, { accessibilityLabel: "Close", onPress: onClose, style: r.backdrop, children: /* @__PURE__ */ jsxs(Pressable$1, { accessible: false, onPress: () => {
|
|
44
|
+
}, style: r.panel, children: [
|
|
45
|
+
title ? /* @__PURE__ */ jsx(Text, { style: r.title, children: title }) : null,
|
|
46
|
+
actions.map((a) => /* @__PURE__ */ jsx(
|
|
47
|
+
Pressable$1,
|
|
48
|
+
{
|
|
49
|
+
accessibilityRole: "button",
|
|
50
|
+
onPress: () => {
|
|
51
|
+
onClose?.();
|
|
52
|
+
a.onPress?.();
|
|
53
|
+
},
|
|
54
|
+
style: r.action,
|
|
55
|
+
children: /* @__PURE__ */ jsx(Text, { style: r.actionLabel(!!a.destructive), children: a.label })
|
|
56
|
+
},
|
|
57
|
+
a.key
|
|
58
|
+
)),
|
|
59
|
+
/* @__PURE__ */ jsx(Pressable$1, { accessibilityRole: "button", onPress: onClose, style: r.cancel, children: /* @__PURE__ */ jsx(Text, { style: r.cancelLabel, children: cancelLabel }) })
|
|
60
|
+
] }) }) });
|
|
61
|
+
}
|
|
62
|
+
function Alert(p) {
|
|
63
|
+
const t = useResolvedTheme();
|
|
64
|
+
const r = alertRecipe(p, t);
|
|
65
|
+
return /* @__PURE__ */ jsxs(View$1, { accessibilityRole: "alert", style: r.container, testID: p.testID, children: [
|
|
66
|
+
p.title ? /* @__PURE__ */ jsx(Text, { style: r.title, children: p.title }) : null,
|
|
67
|
+
typeof p.children === "string" ? /* @__PURE__ */ jsx(Text, { style: r.body, children: p.children }) : p.children
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
function AlertDialog(p) {
|
|
71
|
+
const t = useResolvedTheme();
|
|
72
|
+
const r = alertDialogRecipe(t);
|
|
73
|
+
const cancel = buttonRecipe({ variant: "outline" }, t);
|
|
74
|
+
const confirm = buttonRecipe({ variant: p.destructive ? "destructive" : "default" }, t);
|
|
75
|
+
return /* @__PURE__ */ jsx(Modal$1, { transparent: true, animationType: "fade", visible: p.visible, onRequestClose: p.onCancel, testID: p.testID, children: /* @__PURE__ */ jsx(View$1, { style: r.backdrop, children: /* @__PURE__ */ jsxs(View$1, { accessibilityRole: "alertdialog", "aria-modal": true, style: r.panel, children: [
|
|
76
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: r.title, children: p.title }),
|
|
77
|
+
p.description ? /* @__PURE__ */ jsx(Text, { style: r.description, children: p.description }) : null,
|
|
78
|
+
/* @__PURE__ */ jsxs(View$1, { style: r.actions, children: [
|
|
79
|
+
/* @__PURE__ */ jsx(Pressable$1, { accessibilityRole: "button", onPress: p.onCancel, style: cancel.container, children: /* @__PURE__ */ jsx(Text, { style: cancel.label, children: p.cancelLabel ?? "Cancel" }) }),
|
|
80
|
+
/* @__PURE__ */ jsx(Pressable$1, { accessibilityRole: "button", onPress: p.onConfirm, style: confirm.container, children: /* @__PURE__ */ jsx(Text, { style: confirm.label, children: p.confirmLabel ?? "Confirm" }) })
|
|
81
|
+
] })
|
|
82
|
+
] }) }) });
|
|
83
|
+
}
|
|
84
|
+
function Avatar(p) {
|
|
85
|
+
const t = useResolvedTheme();
|
|
86
|
+
const r = avatarRecipe(p, t);
|
|
87
|
+
const [failed, setFailed] = useState(false);
|
|
88
|
+
const showImage = !!p.source && !failed;
|
|
89
|
+
return /* @__PURE__ */ jsx(
|
|
90
|
+
View$1,
|
|
91
|
+
{
|
|
92
|
+
accessibilityRole: "image",
|
|
93
|
+
accessibilityLabel: p.accessibilityLabel ?? p.name,
|
|
94
|
+
style: r.container,
|
|
95
|
+
testID: p.testID,
|
|
96
|
+
children: showImage ? /* @__PURE__ */ jsx(
|
|
97
|
+
Image$1,
|
|
98
|
+
{
|
|
99
|
+
source: { uri: p.source },
|
|
100
|
+
style: r.image,
|
|
101
|
+
onError: () => setFailed(true),
|
|
102
|
+
accessibilityIgnoresInvertColors: true
|
|
103
|
+
}
|
|
104
|
+
) : /* @__PURE__ */ jsx(Text, { style: r.initials, children: initialsOf(p.name) })
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
function Badge(p) {
|
|
109
|
+
const t = useResolvedTheme();
|
|
110
|
+
const r = badgeRecipe(p, t);
|
|
111
|
+
return /* @__PURE__ */ jsx(View$1, { style: r.container, testID: p.testID, children: /* @__PURE__ */ jsx(Text, { style: r.label, children: p.children }) });
|
|
112
|
+
}
|
|
113
|
+
function BottomSheet({ visible, onClose, title, children, testID }) {
|
|
114
|
+
const t = useResolvedTheme();
|
|
115
|
+
const r = sheetRecipe(t);
|
|
116
|
+
return /* @__PURE__ */ jsx(Modal$1, { transparent: true, animationType: "slide", visible, onRequestClose: onClose, testID, children: /* @__PURE__ */ jsx(Pressable$1, { accessibilityLabel: "Close", onPress: onClose, style: r.backdrop, children: /* @__PURE__ */ jsxs(Pressable$1, { accessible: false, onPress: () => {
|
|
117
|
+
}, style: r.panel, children: [
|
|
118
|
+
/* @__PURE__ */ jsx(View$1, { style: r.handle }),
|
|
119
|
+
title ? /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: r.title, children: title }) : null,
|
|
120
|
+
children
|
|
121
|
+
] }) }) });
|
|
122
|
+
}
|
|
123
|
+
function Button(p) {
|
|
124
|
+
const t = useResolvedTheme();
|
|
125
|
+
const r = buttonRecipe(p, t);
|
|
126
|
+
const inactive = !!(p.disabled || p.loading);
|
|
127
|
+
return /* @__PURE__ */ jsxs(
|
|
128
|
+
Pressable$1,
|
|
129
|
+
{
|
|
130
|
+
accessibilityRole: "button",
|
|
131
|
+
accessibilityLabel: p.accessibilityLabel,
|
|
132
|
+
"aria-disabled": inactive,
|
|
133
|
+
"aria-busy": !!p.loading,
|
|
134
|
+
disabled: inactive,
|
|
135
|
+
onPress: p.onPress,
|
|
136
|
+
testID: p.testID,
|
|
137
|
+
style: ({ pressed }) => [r.container, pressed && !inactive ? { opacity: 0.85 } : null],
|
|
138
|
+
children: [
|
|
139
|
+
p.loading ? /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: r.spinner.color }) : null,
|
|
140
|
+
typeof p.children === "string" || typeof p.children === "number" ? /* @__PURE__ */ jsx(Text, { style: [r.label, p.variant === "link" ? { textDecorationLine: "underline" } : null], children: p.children }) : p.children
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
var initial = (p) => {
|
|
146
|
+
const m = /^(\d{4})-(\d{2})$/.exec(p.month ?? "");
|
|
147
|
+
if (m) return [Number(m[1]), Number(m[2])];
|
|
148
|
+
const d = parseDate(p.value);
|
|
149
|
+
if (d) return [d[0], d[1]];
|
|
150
|
+
const now = /* @__PURE__ */ new Date();
|
|
151
|
+
return [now.getFullYear(), now.getMonth() + 1];
|
|
152
|
+
};
|
|
153
|
+
function Calendar(p) {
|
|
154
|
+
const t = useResolvedTheme();
|
|
155
|
+
const r = calendarRecipe(t);
|
|
156
|
+
const [[y, m], setYm] = useState(() => initial(p));
|
|
157
|
+
const start = p.weekStartsOn ?? 0;
|
|
158
|
+
const weekdays = [...WEEKDAYS.slice(start), ...WEEKDAYS.slice(0, start)];
|
|
159
|
+
const go = (by) => setYm(([yy, mm]) => shiftMonth(yy, mm, by));
|
|
160
|
+
return /* @__PURE__ */ jsxs(View$1, { testID: p.testID, style: r.container, children: [
|
|
161
|
+
/* @__PURE__ */ jsxs(View$1, { style: r.header, children: [
|
|
162
|
+
/* @__PURE__ */ jsx(
|
|
163
|
+
Pressable$1,
|
|
164
|
+
{
|
|
165
|
+
accessibilityRole: "button",
|
|
166
|
+
accessibilityLabel: "Previous month",
|
|
167
|
+
onPress: () => go(-1),
|
|
168
|
+
style: r.nav,
|
|
169
|
+
children: /* @__PURE__ */ jsx(Text, { style: r.navLabel, children: iconRecipe({ name: "chevron-left" }, t).glyph })
|
|
170
|
+
}
|
|
171
|
+
),
|
|
172
|
+
/* @__PURE__ */ jsxs(Text, { accessibilityRole: "header", style: r.title, children: [
|
|
173
|
+
MONTHS[m - 1],
|
|
174
|
+
" ",
|
|
175
|
+
y
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ jsx(
|
|
178
|
+
Pressable$1,
|
|
179
|
+
{
|
|
180
|
+
accessibilityRole: "button",
|
|
181
|
+
accessibilityLabel: "Next month",
|
|
182
|
+
onPress: () => go(1),
|
|
183
|
+
style: r.nav,
|
|
184
|
+
children: /* @__PURE__ */ jsx(Text, { style: r.navLabel, children: iconRecipe({ name: "chevron-right" }, t).glyph })
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
] }),
|
|
188
|
+
/* @__PURE__ */ jsx(View$1, { style: r.weekRow, children: weekdays.map((d) => /* @__PURE__ */ jsx(Text, { style: r.weekday, children: d }, d)) }),
|
|
189
|
+
monthGrid(y, m, p).map((week, wi) => /* @__PURE__ */ jsx(View$1, { style: r.row, children: week.map(
|
|
190
|
+
(c, ci) => c.date === null ? /* @__PURE__ */ jsx(View$1, { style: r.day(false, true) }, ci) : /* @__PURE__ */ jsx(
|
|
191
|
+
Pressable$1,
|
|
192
|
+
{
|
|
193
|
+
accessibilityRole: "button",
|
|
194
|
+
accessibilityLabel: c.date,
|
|
195
|
+
"aria-selected": c.date === p.value,
|
|
196
|
+
"aria-disabled": c.disabled || void 0,
|
|
197
|
+
disabled: c.disabled,
|
|
198
|
+
onPress: () => p.onChange?.(c.date),
|
|
199
|
+
style: r.day(c.date === p.value, c.disabled),
|
|
200
|
+
children: /* @__PURE__ */ jsx(Text, { style: r.dayLabel(c.date === p.value, c.disabled), children: c.day })
|
|
201
|
+
},
|
|
202
|
+
ci
|
|
203
|
+
)
|
|
204
|
+
) }, wi))
|
|
205
|
+
] });
|
|
206
|
+
}
|
|
207
|
+
function Card(p) {
|
|
208
|
+
const t = useResolvedTheme();
|
|
209
|
+
return /* @__PURE__ */ jsx(View$1, { style: cardRecipe(p, t), testID: p.testID, children: p.children });
|
|
210
|
+
}
|
|
211
|
+
function Center({ children, testID }) {
|
|
212
|
+
return /* @__PURE__ */ jsx(View$1, { testID, style: centerRecipe(), children });
|
|
213
|
+
}
|
|
214
|
+
function Checkbox(p) {
|
|
215
|
+
const t = useResolvedTheme();
|
|
216
|
+
const r = checkboxRecipe(p, t);
|
|
217
|
+
return /* @__PURE__ */ jsxs(
|
|
218
|
+
Pressable$1,
|
|
219
|
+
{
|
|
220
|
+
accessibilityRole: "checkbox",
|
|
221
|
+
accessibilityLabel: p.accessibilityLabel ?? p.label,
|
|
222
|
+
"aria-checked": !!p.checked,
|
|
223
|
+
"aria-disabled": !!p.disabled,
|
|
224
|
+
disabled: p.disabled,
|
|
225
|
+
onPress: () => p.onCheckedChange?.(!p.checked),
|
|
226
|
+
style: r.row,
|
|
227
|
+
testID: p.testID,
|
|
228
|
+
children: [
|
|
229
|
+
/* @__PURE__ */ jsx(View$1, { style: r.box, children: p.checked ? /* @__PURE__ */ jsx(Text, { style: r.mark, children: "\u2713" }) : null }),
|
|
230
|
+
p.label ? /* @__PURE__ */ jsx(Text, { style: r.label, children: p.label }) : null
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
function DateTimePicker(p) {
|
|
236
|
+
const t = useResolvedTheme();
|
|
237
|
+
const field = inputRecipe({ disabled: p.disabled }, t);
|
|
238
|
+
const m = modalRecipe({ visible: true }, t);
|
|
239
|
+
const [open, setOpen] = useState(false);
|
|
240
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
241
|
+
/* @__PURE__ */ jsx(
|
|
242
|
+
Pressable$1,
|
|
243
|
+
{
|
|
244
|
+
testID: p.testID,
|
|
245
|
+
accessibilityRole: "button",
|
|
246
|
+
accessibilityLabel: p.accessibilityLabel ?? p.placeholder ?? "Pick a date",
|
|
247
|
+
"aria-disabled": p.disabled || void 0,
|
|
248
|
+
disabled: p.disabled,
|
|
249
|
+
onPress: () => setOpen(true),
|
|
250
|
+
style: field.container,
|
|
251
|
+
children: /* @__PURE__ */ jsx(Text, { style: field.field, children: p.value || p.placeholder || "YYYY-MM-DD" })
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
/* @__PURE__ */ jsx(Modal$1, { transparent: true, animationType: "fade", visible: open, onRequestClose: () => setOpen(false), children: /* @__PURE__ */ jsx(Pressable$1, { accessibilityLabel: "Close", onPress: () => setOpen(false), style: m.backdrop, children: /* @__PURE__ */ jsx(Pressable$1, { accessible: false, onPress: () => {
|
|
255
|
+
}, children: /* @__PURE__ */ jsx(View$1, { children: /* @__PURE__ */ jsx(
|
|
256
|
+
Calendar,
|
|
257
|
+
{
|
|
258
|
+
value: p.value,
|
|
259
|
+
min: p.min,
|
|
260
|
+
max: p.max,
|
|
261
|
+
onChange: (d) => {
|
|
262
|
+
p.onChange?.(d);
|
|
263
|
+
setOpen(false);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
) }) }) }) })
|
|
267
|
+
] });
|
|
268
|
+
}
|
|
269
|
+
function Divider(p) {
|
|
270
|
+
const t = useResolvedTheme();
|
|
271
|
+
return /* @__PURE__ */ jsx(View$1, { accessibilityRole: "none", style: dividerRecipe(p, t), testID: p.testID });
|
|
272
|
+
}
|
|
273
|
+
function Drawer({ visible, onClose, side = "left", children, testID }) {
|
|
274
|
+
const t = useResolvedTheme();
|
|
275
|
+
const r = drawerRecipe(side, t);
|
|
276
|
+
return /* @__PURE__ */ jsx(Modal$1, { transparent: true, animationType: "fade", visible, onRequestClose: onClose, testID, children: /* @__PURE__ */ jsx(Pressable$1, { accessibilityLabel: "Close", onPress: onClose, style: r.backdrop, children: /* @__PURE__ */ jsx(Pressable$1, { accessible: false, onPress: () => {
|
|
277
|
+
}, style: r.panel, children }) }) });
|
|
278
|
+
}
|
|
279
|
+
function Fab(p) {
|
|
280
|
+
const t = useResolvedTheme();
|
|
281
|
+
const r = fabRecipe(p, t);
|
|
282
|
+
const glyph = iconRecipe({ name: p.icon ?? "plus" }, t).glyph;
|
|
283
|
+
return /* @__PURE__ */ jsxs(
|
|
284
|
+
Pressable$1,
|
|
285
|
+
{
|
|
286
|
+
testID: p.testID,
|
|
287
|
+
accessibilityRole: "button",
|
|
288
|
+
accessibilityLabel: p.accessibilityLabel ?? p.label ?? "Action",
|
|
289
|
+
onPress: p.onPress,
|
|
290
|
+
style: r.container,
|
|
291
|
+
children: [
|
|
292
|
+
/* @__PURE__ */ jsx(Text, { style: r.icon, children: glyph }),
|
|
293
|
+
p.label ? /* @__PURE__ */ jsx(Text, { style: r.label, children: p.label }) : null
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
function FormControl(p) {
|
|
299
|
+
const t = useResolvedTheme();
|
|
300
|
+
const r = formControlRecipe(!!p.disabled, t);
|
|
301
|
+
return /* @__PURE__ */ jsxs(View$1, { testID: p.testID, style: r.root, children: [
|
|
302
|
+
p.label ? /* @__PURE__ */ jsxs(Text, { style: r.label, children: [
|
|
303
|
+
p.label,
|
|
304
|
+
p.required ? /* @__PURE__ */ jsx(Text, { style: r.required, children: " *" }) : null
|
|
305
|
+
] }) : null,
|
|
306
|
+
p.children,
|
|
307
|
+
p.error ? /* @__PURE__ */ jsx(Text, { accessibilityRole: "alert", style: r.error, children: p.error }) : p.helper ? /* @__PURE__ */ jsx(Text, { style: r.helper, children: p.helper }) : null
|
|
308
|
+
] });
|
|
309
|
+
}
|
|
310
|
+
function Grid(p) {
|
|
311
|
+
const t = useResolvedTheme();
|
|
312
|
+
const r = gridRecipe(p, t);
|
|
313
|
+
return /* @__PURE__ */ jsx(View$1, { testID: p.testID, style: r.container, children: React5.Children.toArray(p.children).map((child, i) => /* @__PURE__ */ jsx(View$1, { style: r.cell, children: child }, i)) });
|
|
314
|
+
}
|
|
315
|
+
function HStack(p) {
|
|
316
|
+
const t = useResolvedTheme();
|
|
317
|
+
return /* @__PURE__ */ jsx(View$1, { testID: p.testID, style: stackRecipe("row", p, t), children: p.children });
|
|
318
|
+
}
|
|
319
|
+
function Heading(p) {
|
|
320
|
+
const t = useResolvedTheme();
|
|
321
|
+
return /* @__PURE__ */ jsx(
|
|
322
|
+
Text,
|
|
323
|
+
{
|
|
324
|
+
accessibilityRole: "header",
|
|
325
|
+
"aria-level": p.level ?? 2,
|
|
326
|
+
style: headingRecipe(p, t),
|
|
327
|
+
numberOfLines: p.isTruncated ? 1 : void 0,
|
|
328
|
+
testID: p.testID,
|
|
329
|
+
children: p.children
|
|
330
|
+
}
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
function Icon(p) {
|
|
334
|
+
const t = useResolvedTheme();
|
|
335
|
+
const r = iconRecipe(p, t);
|
|
336
|
+
return /* @__PURE__ */ jsx(
|
|
337
|
+
Text,
|
|
338
|
+
{
|
|
339
|
+
testID: p.testID,
|
|
340
|
+
accessibilityLabel: p.accessibilityLabel,
|
|
341
|
+
accessible: !!p.accessibilityLabel,
|
|
342
|
+
importantForAccessibility: p.accessibilityLabel ? "yes" : "no-hide-descendants",
|
|
343
|
+
style: r.style,
|
|
344
|
+
children: r.glyph
|
|
345
|
+
}
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
function ImageViewer({ visible, source, alt, onClose, testID }) {
|
|
349
|
+
const t = useResolvedTheme();
|
|
350
|
+
const r = imageViewerRecipe(t);
|
|
351
|
+
return /* @__PURE__ */ jsx(Modal$1, { transparent: true, animationType: "fade", visible, onRequestClose: onClose, testID, children: /* @__PURE__ */ jsxs(View$1, { style: r.backdrop, children: [
|
|
352
|
+
/* @__PURE__ */ jsx(
|
|
353
|
+
Image$1,
|
|
354
|
+
{
|
|
355
|
+
source: { uri: source },
|
|
356
|
+
alt,
|
|
357
|
+
accessibilityLabel: alt,
|
|
358
|
+
resizeMode: "contain",
|
|
359
|
+
style: r.image
|
|
360
|
+
}
|
|
361
|
+
),
|
|
362
|
+
/* @__PURE__ */ jsx(Pressable$1, { accessibilityRole: "button", accessibilityLabel: "Close", onPress: onClose, style: r.close, children: /* @__PURE__ */ jsx(Text, { style: r.closeLabel, children: iconRecipe({ name: "close" }, t).glyph }) })
|
|
363
|
+
] }) });
|
|
364
|
+
}
|
|
365
|
+
function Input(p) {
|
|
366
|
+
const t = useResolvedTheme();
|
|
367
|
+
const r = inputRecipe(p, t);
|
|
368
|
+
const [focused, setFocused] = useState(false);
|
|
369
|
+
return /* @__PURE__ */ jsx(View$1, { style: [r.container, focused ? { borderColor: r.focusBorderColor } : null], children: /* @__PURE__ */ jsx(
|
|
370
|
+
TextInput,
|
|
371
|
+
{
|
|
372
|
+
style: r.field,
|
|
373
|
+
value: p.value,
|
|
374
|
+
defaultValue: p.defaultValue,
|
|
375
|
+
placeholder: p.placeholder,
|
|
376
|
+
placeholderTextColor: r.placeholderTextColor,
|
|
377
|
+
onChangeText: p.onChangeText,
|
|
378
|
+
editable: !p.disabled,
|
|
379
|
+
secureTextEntry: p.secureTextEntry,
|
|
380
|
+
accessibilityLabel: p.accessibilityLabel,
|
|
381
|
+
"aria-invalid": p.invalid || void 0,
|
|
382
|
+
onFocus: () => setFocused(true),
|
|
383
|
+
onBlur: () => setFocused(false),
|
|
384
|
+
testID: p.testID
|
|
385
|
+
}
|
|
386
|
+
) });
|
|
387
|
+
}
|
|
388
|
+
function Link({ href, onPress, children, testID }) {
|
|
389
|
+
const t = useResolvedTheme();
|
|
390
|
+
return /* @__PURE__ */ jsx(
|
|
391
|
+
Text,
|
|
392
|
+
{
|
|
393
|
+
testID,
|
|
394
|
+
accessibilityRole: "link",
|
|
395
|
+
style: linkRecipe(t),
|
|
396
|
+
onPress: () => {
|
|
397
|
+
onPress?.();
|
|
398
|
+
if (href) void Linking.openURL(href);
|
|
399
|
+
},
|
|
400
|
+
children
|
|
401
|
+
}
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
function LiquidGlass({ children, testID }) {
|
|
405
|
+
const t = useResolvedTheme();
|
|
406
|
+
return /* @__PURE__ */ jsx(View$1, { testID, style: liquidGlassRecipe(t), children });
|
|
407
|
+
}
|
|
408
|
+
function Menu({ label, items, testID }) {
|
|
409
|
+
const t = useResolvedTheme();
|
|
410
|
+
const r = menuRecipe(t);
|
|
411
|
+
const b = buttonRecipe({ variant: "outline" }, t);
|
|
412
|
+
const [open, setOpen] = useState(false);
|
|
413
|
+
return /* @__PURE__ */ jsxs(View$1, { testID, style: { position: "relative", alignSelf: "flex-start" }, children: [
|
|
414
|
+
/* @__PURE__ */ jsx(
|
|
415
|
+
Pressable$1,
|
|
416
|
+
{
|
|
417
|
+
accessibilityRole: "button",
|
|
418
|
+
"aria-haspopup": "menu",
|
|
419
|
+
"aria-expanded": open,
|
|
420
|
+
onPress: () => setOpen(!open),
|
|
421
|
+
style: b.container,
|
|
422
|
+
children: /* @__PURE__ */ jsx(Text, { style: b.label, children: label })
|
|
423
|
+
}
|
|
424
|
+
),
|
|
425
|
+
open ? /* @__PURE__ */ jsx(View$1, { accessibilityRole: "menu", style: r.panel, children: items.map((it) => /* @__PURE__ */ jsx(
|
|
426
|
+
Pressable$1,
|
|
427
|
+
{
|
|
428
|
+
accessibilityRole: "menuitem",
|
|
429
|
+
"aria-disabled": it.disabled || void 0,
|
|
430
|
+
disabled: it.disabled,
|
|
431
|
+
onPress: () => {
|
|
432
|
+
setOpen(false);
|
|
433
|
+
it.onSelect?.();
|
|
434
|
+
},
|
|
435
|
+
style: r.item(!!it.disabled),
|
|
436
|
+
children: /* @__PURE__ */ jsx(Text, { style: r.label(!!it.destructive), children: it.label })
|
|
437
|
+
},
|
|
438
|
+
it.key
|
|
439
|
+
)) }) : null
|
|
440
|
+
] });
|
|
441
|
+
}
|
|
442
|
+
function Modal(p) {
|
|
443
|
+
const t = useResolvedTheme();
|
|
444
|
+
const r = modalRecipe(p, t);
|
|
445
|
+
return /* @__PURE__ */ jsx(Modal$1, { transparent: true, animationType: "fade", visible: p.visible, onRequestClose: p.onClose, testID: p.testID, children: /* @__PURE__ */ jsx(Pressable$1, { accessibilityLabel: "Close", onPress: p.onClose, style: r.backdrop, children: /* @__PURE__ */ jsxs(Pressable$1, { accessible: false, onPress: () => {
|
|
446
|
+
}, style: r.panel, children: [
|
|
447
|
+
p.title ? /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: r.title, children: p.title }) : null,
|
|
448
|
+
p.children
|
|
449
|
+
] }) }) });
|
|
450
|
+
}
|
|
451
|
+
function Popover({ trigger, open, onOpenChange, children, testID }) {
|
|
452
|
+
const t = useResolvedTheme();
|
|
453
|
+
const r = popoverRecipe(t);
|
|
454
|
+
const [inner, setInner] = useState(false);
|
|
455
|
+
const isOpen = open ?? inner;
|
|
456
|
+
const set = (v) => {
|
|
457
|
+
if (open === void 0) setInner(v);
|
|
458
|
+
onOpenChange?.(v);
|
|
459
|
+
};
|
|
460
|
+
return /* @__PURE__ */ jsxs(View$1, { testID, style: { position: "relative", alignSelf: "flex-start" }, children: [
|
|
461
|
+
/* @__PURE__ */ jsx(Pressable$1, { accessibilityRole: "button", "aria-expanded": isOpen, onPress: () => set(!isOpen), children: trigger }),
|
|
462
|
+
isOpen ? /* @__PURE__ */ jsx(View$1, { style: r.panel, children }) : null
|
|
463
|
+
] });
|
|
464
|
+
}
|
|
465
|
+
function Progress(p) {
|
|
466
|
+
const t = useResolvedTheme();
|
|
467
|
+
const r = progressRecipe(p, t);
|
|
468
|
+
return /* @__PURE__ */ jsx(
|
|
469
|
+
View$1,
|
|
470
|
+
{
|
|
471
|
+
accessibilityRole: "progressbar",
|
|
472
|
+
accessibilityLabel: p.accessibilityLabel,
|
|
473
|
+
"aria-valuemin": 0,
|
|
474
|
+
"aria-valuemax": 100,
|
|
475
|
+
"aria-valuenow": r.value,
|
|
476
|
+
style: r.track,
|
|
477
|
+
testID: p.testID,
|
|
478
|
+
children: /* @__PURE__ */ jsx(View$1, { style: r.bar })
|
|
479
|
+
}
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
function RadioGroup(p) {
|
|
483
|
+
const t = useResolvedTheme();
|
|
484
|
+
const r = radioRecipe(p, t);
|
|
485
|
+
return /* @__PURE__ */ jsx(
|
|
486
|
+
View$1,
|
|
487
|
+
{
|
|
488
|
+
accessibilityRole: "radiogroup",
|
|
489
|
+
accessibilityLabel: p.accessibilityLabel,
|
|
490
|
+
style: r.group,
|
|
491
|
+
testID: p.testID,
|
|
492
|
+
children: p.options.map((o) => {
|
|
493
|
+
const selected = o.value === p.value;
|
|
494
|
+
const off = !!(p.disabled || o.disabled);
|
|
495
|
+
return /* @__PURE__ */ jsxs(
|
|
496
|
+
Pressable$1,
|
|
497
|
+
{
|
|
498
|
+
accessibilityRole: "radio",
|
|
499
|
+
"aria-checked": selected,
|
|
500
|
+
"aria-disabled": off,
|
|
501
|
+
disabled: off,
|
|
502
|
+
onPress: () => p.onValueChange?.(o.value),
|
|
503
|
+
style: r.row,
|
|
504
|
+
children: [
|
|
505
|
+
/* @__PURE__ */ jsx(View$1, { style: r.circle(selected), children: selected ? /* @__PURE__ */ jsx(View$1, { style: r.dot }) : null }),
|
|
506
|
+
/* @__PURE__ */ jsx(Text, { style: r.label, children: o.label })
|
|
507
|
+
]
|
|
508
|
+
},
|
|
509
|
+
o.value
|
|
510
|
+
);
|
|
511
|
+
})
|
|
512
|
+
}
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
function Select(p) {
|
|
516
|
+
const t = useResolvedTheme();
|
|
517
|
+
const r = selectRecipe(p, t);
|
|
518
|
+
const [open, setOpen] = useState(false);
|
|
519
|
+
const current = p.options.find((o) => o.value === p.value);
|
|
520
|
+
return /* @__PURE__ */ jsxs(View$1, { testID: p.testID, children: [
|
|
521
|
+
/* @__PURE__ */ jsxs(
|
|
522
|
+
Pressable$1,
|
|
523
|
+
{
|
|
524
|
+
accessibilityRole: "combobox",
|
|
525
|
+
accessibilityLabel: p.accessibilityLabel,
|
|
526
|
+
"aria-expanded": open,
|
|
527
|
+
"aria-disabled": !!p.disabled,
|
|
528
|
+
disabled: p.disabled,
|
|
529
|
+
onPress: () => setOpen((o) => !o),
|
|
530
|
+
style: [r.trigger, open ? { borderColor: r.focusBorderColor } : null],
|
|
531
|
+
children: [
|
|
532
|
+
/* @__PURE__ */ jsx(Text, { style: [r.triggerLabel, current ? null : { color: r.placeholderColor }], numberOfLines: 1, children: current ? current.label : p.placeholder ?? "" }),
|
|
533
|
+
/* @__PURE__ */ jsx(Text, { style: { color: r.placeholderColor }, children: open ? "\u25B4" : "\u25BE" })
|
|
534
|
+
]
|
|
535
|
+
}
|
|
536
|
+
),
|
|
537
|
+
open ? /* @__PURE__ */ jsx(View$1, { style: r.menu, children: /* @__PURE__ */ jsx(ScrollView$1, { children: p.options.map((o) => {
|
|
538
|
+
const selected = o.value === p.value;
|
|
539
|
+
return /* @__PURE__ */ jsx(
|
|
540
|
+
Pressable$1,
|
|
541
|
+
{
|
|
542
|
+
accessibilityRole: "menuitem",
|
|
543
|
+
"aria-selected": selected,
|
|
544
|
+
"aria-disabled": !!o.disabled,
|
|
545
|
+
disabled: o.disabled,
|
|
546
|
+
onPress: () => {
|
|
547
|
+
p.onValueChange?.(o.value);
|
|
548
|
+
setOpen(false);
|
|
549
|
+
},
|
|
550
|
+
style: [
|
|
551
|
+
r.option,
|
|
552
|
+
selected ? r.optionSelected : null,
|
|
553
|
+
o.disabled ? { opacity: r.disabledOptionOpacity } : null
|
|
554
|
+
],
|
|
555
|
+
children: /* @__PURE__ */ jsx(Text, { style: [r.optionLabel, selected ? r.optionLabelSelected : null], children: o.label })
|
|
556
|
+
},
|
|
557
|
+
o.value
|
|
558
|
+
);
|
|
559
|
+
}) }) }) : null
|
|
560
|
+
] });
|
|
561
|
+
}
|
|
562
|
+
function Skeleton(p) {
|
|
563
|
+
const t = useResolvedTheme();
|
|
564
|
+
const r = skeletonRecipe(p, t);
|
|
565
|
+
const opacity = useRef(new Animated.Value(1)).current;
|
|
566
|
+
useEffect(() => {
|
|
567
|
+
const loop = Animated.loop(
|
|
568
|
+
Animated.sequence([
|
|
569
|
+
Animated.timing(opacity, {
|
|
570
|
+
toValue: r.pulse.minOpacity,
|
|
571
|
+
duration: r.pulse.durationMs / 2,
|
|
572
|
+
useNativeDriver: true
|
|
573
|
+
}),
|
|
574
|
+
Animated.timing(opacity, { toValue: 1, duration: r.pulse.durationMs / 2, useNativeDriver: true })
|
|
575
|
+
])
|
|
576
|
+
);
|
|
577
|
+
loop.start();
|
|
578
|
+
return () => loop.stop();
|
|
579
|
+
}, [opacity, r.pulse.minOpacity, r.pulse.durationMs]);
|
|
580
|
+
return /* @__PURE__ */ jsx(Animated.View, { accessibilityRole: "none", "aria-busy": true, style: [r.block, { opacity }], testID: p.testID });
|
|
581
|
+
}
|
|
582
|
+
function Slider(p) {
|
|
583
|
+
const { value, onValueChange, min = 0, max = 100, step = 1, disabled, accessibilityLabel, testID } = p;
|
|
584
|
+
const t = useResolvedTheme();
|
|
585
|
+
const r = sliderRecipe(p, t);
|
|
586
|
+
const [width, setWidth] = useState(0);
|
|
587
|
+
const live = useRef({ width, min, max, step, disabled, onValueChange });
|
|
588
|
+
live.current = { width, min, max, step, disabled, onValueChange };
|
|
589
|
+
const move = (x) => {
|
|
590
|
+
const c = live.current;
|
|
591
|
+
if (c.disabled || !c.width) return;
|
|
592
|
+
c.onValueChange?.(sliderValue(x / c.width, c.min, c.max, c.step));
|
|
593
|
+
};
|
|
594
|
+
const pan = useRef(
|
|
595
|
+
PanResponder.create({
|
|
596
|
+
onStartShouldSetPanResponder: () => !live.current.disabled,
|
|
597
|
+
onMoveShouldSetPanResponder: () => !live.current.disabled,
|
|
598
|
+
onPanResponderGrant: (e) => move(e.nativeEvent.locationX),
|
|
599
|
+
onPanResponderMove: (e) => move(e.nativeEvent.locationX)
|
|
600
|
+
})
|
|
601
|
+
).current;
|
|
602
|
+
const f = sliderFraction(value, min, max);
|
|
603
|
+
const adjust = (dir) => !disabled && onValueChange?.(sliderValue(sliderFraction(value + dir * step, min, max), min, max, step));
|
|
604
|
+
return /* @__PURE__ */ jsxs(
|
|
605
|
+
View$1,
|
|
606
|
+
{
|
|
607
|
+
testID,
|
|
608
|
+
accessibilityRole: "adjustable",
|
|
609
|
+
accessibilityLabel,
|
|
610
|
+
"aria-valuemin": min,
|
|
611
|
+
"aria-valuemax": max,
|
|
612
|
+
"aria-valuenow": value,
|
|
613
|
+
"aria-disabled": disabled || void 0,
|
|
614
|
+
accessibilityActions: [{ name: "increment" }, { name: "decrement" }],
|
|
615
|
+
onAccessibilityAction: (e) => adjust(e.nativeEvent.actionName === "increment" ? 1 : -1),
|
|
616
|
+
onLayout: (e) => setWidth(e.nativeEvent.layout.width),
|
|
617
|
+
style: r.root,
|
|
618
|
+
...pan.panHandlers,
|
|
619
|
+
children: [
|
|
620
|
+
/* @__PURE__ */ jsx(View$1, { style: r.track, children: /* @__PURE__ */ jsx(View$1, { style: [r.filled, { width: `${f * 100}%` }] }) }),
|
|
621
|
+
/* @__PURE__ */ jsx(View$1, { style: [r.thumb, { left: Math.max(0, f * (width - r.thumbSize)) }] })
|
|
622
|
+
]
|
|
623
|
+
}
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
function Spinner(p) {
|
|
627
|
+
const t = useResolvedTheme();
|
|
628
|
+
const r = spinnerRecipe(p, t);
|
|
629
|
+
return /* @__PURE__ */ jsx(
|
|
630
|
+
ActivityIndicator,
|
|
631
|
+
{
|
|
632
|
+
size: r.size,
|
|
633
|
+
color: r.color,
|
|
634
|
+
accessibilityRole: "progressbar",
|
|
635
|
+
accessibilityLabel: p.accessibilityLabel ?? "Loading",
|
|
636
|
+
style: { transform: [{ scale: r.scale }] },
|
|
637
|
+
testID: p.testID
|
|
638
|
+
}
|
|
639
|
+
);
|
|
640
|
+
}
|
|
641
|
+
function Switch(p) {
|
|
642
|
+
const t = useResolvedTheme();
|
|
643
|
+
const r = switchRecipe(p, t);
|
|
644
|
+
return /* @__PURE__ */ jsx(
|
|
645
|
+
Switch$1,
|
|
646
|
+
{
|
|
647
|
+
value: !!p.value,
|
|
648
|
+
onValueChange: p.onValueChange,
|
|
649
|
+
disabled: p.disabled,
|
|
650
|
+
trackColor: { true: r.trackOn, false: r.trackOff },
|
|
651
|
+
thumbColor: r.thumb,
|
|
652
|
+
style: { opacity: r.opacity, transform: [{ scale: r.scale }] },
|
|
653
|
+
accessibilityLabel: p.accessibilityLabel,
|
|
654
|
+
testID: p.testID
|
|
655
|
+
}
|
|
656
|
+
);
|
|
657
|
+
}
|
|
658
|
+
var cell = (node, style) => typeof node === "string" || typeof node === "number" ? /* @__PURE__ */ jsx(Text, { style, children: node }) : node;
|
|
659
|
+
function Table({ columns, rows, caption, testID }) {
|
|
660
|
+
const t = useResolvedTheme();
|
|
661
|
+
const r = tableRecipe(t);
|
|
662
|
+
return /* @__PURE__ */ jsxs(View$1, { testID, accessibilityRole: "table", style: r.container, children: [
|
|
663
|
+
caption ? /* @__PURE__ */ jsx(Text, { style: r.caption, children: caption }) : null,
|
|
664
|
+
/* @__PURE__ */ jsx(View$1, { style: r.headRow, children: columns.map((c) => /* @__PURE__ */ jsx(View$1, { style: r.head(c.align), children: /* @__PURE__ */ jsx(Text, { style: r.headLabel, children: c.label }) }, c.key)) }),
|
|
665
|
+
rows.map((row, i) => /* @__PURE__ */ jsx(View$1, { style: r.row(i === rows.length - 1), children: columns.map((c) => /* @__PURE__ */ jsx(View$1, { style: r.cell(c.align), children: cell(row[c.key], r.cellLabel) }, c.key)) }, i))
|
|
666
|
+
] });
|
|
667
|
+
}
|
|
668
|
+
function Tabs(p) {
|
|
669
|
+
const t = useResolvedTheme();
|
|
670
|
+
const r = tabsRecipe(p, t);
|
|
671
|
+
const [inner, setInner] = useState(() => p.tabs.find((x) => !x.disabled)?.key);
|
|
672
|
+
const active = p.value ?? inner;
|
|
673
|
+
const current = p.tabs.find((x) => x.key === active);
|
|
674
|
+
return /* @__PURE__ */ jsxs(View$1, { testID: p.testID, children: [
|
|
675
|
+
/* @__PURE__ */ jsx(View$1, { accessibilityRole: "tablist", style: r.list, children: p.tabs.map((tab) => {
|
|
676
|
+
const on = tab.key === active;
|
|
677
|
+
return /* @__PURE__ */ jsx(
|
|
678
|
+
Pressable$1,
|
|
679
|
+
{
|
|
680
|
+
accessibilityRole: "tab",
|
|
681
|
+
"aria-selected": on,
|
|
682
|
+
"aria-disabled": !!tab.disabled,
|
|
683
|
+
disabled: tab.disabled,
|
|
684
|
+
onPress: () => {
|
|
685
|
+
setInner(tab.key);
|
|
686
|
+
p.onValueChange?.(tab.key);
|
|
687
|
+
},
|
|
688
|
+
style: r.tab(on, !!tab.disabled),
|
|
689
|
+
children: /* @__PURE__ */ jsx(Text, { style: r.label(on), children: tab.label })
|
|
690
|
+
},
|
|
691
|
+
tab.key
|
|
692
|
+
);
|
|
693
|
+
}) }),
|
|
694
|
+
current?.content != null ? /* @__PURE__ */ jsx(View$1, { style: r.panel, children: current.content }) : null
|
|
695
|
+
] });
|
|
696
|
+
}
|
|
697
|
+
function Text24(p) {
|
|
698
|
+
const t = useResolvedTheme();
|
|
699
|
+
return /* @__PURE__ */ jsx(Text, { style: textRecipe(p, t), numberOfLines: p.isTruncated ? 1 : void 0, testID: p.testID, children: p.children });
|
|
700
|
+
}
|
|
701
|
+
function Textarea(p) {
|
|
702
|
+
const t = useResolvedTheme();
|
|
703
|
+
const r = textareaRecipe(p, t);
|
|
704
|
+
const [focused, setFocused] = useState(false);
|
|
705
|
+
return /* @__PURE__ */ jsx(
|
|
706
|
+
TextInput,
|
|
707
|
+
{
|
|
708
|
+
multiline: true,
|
|
709
|
+
numberOfLines: p.rows ?? 4,
|
|
710
|
+
style: [r.field, focused ? { borderColor: r.focusBorderColor } : null],
|
|
711
|
+
value: p.value,
|
|
712
|
+
defaultValue: p.defaultValue,
|
|
713
|
+
placeholder: p.placeholder,
|
|
714
|
+
placeholderTextColor: r.placeholderTextColor,
|
|
715
|
+
onChangeText: p.onChangeText,
|
|
716
|
+
editable: !p.disabled,
|
|
717
|
+
accessibilityLabel: p.accessibilityLabel,
|
|
718
|
+
"aria-invalid": p.invalid || void 0,
|
|
719
|
+
onFocus: () => setFocused(true),
|
|
720
|
+
onBlur: () => setFocused(false),
|
|
721
|
+
testID: p.testID
|
|
722
|
+
}
|
|
723
|
+
);
|
|
724
|
+
}
|
|
725
|
+
function Toast(p) {
|
|
726
|
+
const t = useResolvedTheme();
|
|
727
|
+
const r = toastRecipe(p, t);
|
|
728
|
+
return /* @__PURE__ */ jsxs(View$1, { accessibilityRole: "alert", accessibilityLiveRegion: "polite", style: r.container, testID: p.testID, children: [
|
|
729
|
+
/* @__PURE__ */ jsxs(View$1, { style: { flex: 1, gap: t.scale.spacing["0.5"] }, children: [
|
|
730
|
+
p.title ? /* @__PURE__ */ jsx(Text, { style: r.title, children: p.title }) : null,
|
|
731
|
+
p.description ? /* @__PURE__ */ jsx(Text, { style: r.body, children: p.description }) : null
|
|
732
|
+
] }),
|
|
733
|
+
p.onClose ? /* @__PURE__ */ jsx(
|
|
734
|
+
Pressable$1,
|
|
735
|
+
{
|
|
736
|
+
accessibilityRole: "button",
|
|
737
|
+
accessibilityLabel: "Dismiss",
|
|
738
|
+
onPress: p.onClose,
|
|
739
|
+
hitSlop: t.scale.spacing["2"],
|
|
740
|
+
children: /* @__PURE__ */ jsx(Text, { style: r.body, children: "\u2715" })
|
|
741
|
+
}
|
|
742
|
+
) : null
|
|
743
|
+
] });
|
|
744
|
+
}
|
|
745
|
+
function Tooltip({ content, children, testID }) {
|
|
746
|
+
const t = useResolvedTheme();
|
|
747
|
+
const r = tooltipRecipe(t);
|
|
748
|
+
const [show, setShow] = useState(false);
|
|
749
|
+
const web = {
|
|
750
|
+
onHoverIn: () => setShow(true),
|
|
751
|
+
onHoverOut: () => setShow(false),
|
|
752
|
+
onFocus: () => setShow(true),
|
|
753
|
+
onBlur: () => setShow(false)
|
|
754
|
+
};
|
|
755
|
+
return /* @__PURE__ */ jsxs(View$1, { testID, style: { position: "relative", alignSelf: "flex-start" }, children: [
|
|
756
|
+
/* @__PURE__ */ jsx(
|
|
757
|
+
Pressable$1,
|
|
758
|
+
{
|
|
759
|
+
...web,
|
|
760
|
+
onLongPress: () => setShow(true),
|
|
761
|
+
onPressOut: () => setShow(false),
|
|
762
|
+
"aria-describedby": show ? "tooltip" : void 0,
|
|
763
|
+
children
|
|
764
|
+
}
|
|
765
|
+
),
|
|
766
|
+
show ? /* @__PURE__ */ jsx(View$1, { accessibilityRole: "tooltip", style: r.bubble, children: /* @__PURE__ */ jsx(Text, { style: r.label, children: content }) }) : null
|
|
767
|
+
] });
|
|
768
|
+
}
|
|
769
|
+
function VStack(p) {
|
|
770
|
+
const t = useResolvedTheme();
|
|
771
|
+
return /* @__PURE__ */ jsx(View$1, { testID: p.testID, style: stackRecipe("column", p, t), children: p.children });
|
|
772
|
+
}
|
|
773
|
+
var HostContext = createContext(null);
|
|
774
|
+
function PortalHost({ children }) {
|
|
775
|
+
const [nodes, setNodes] = useState([]);
|
|
776
|
+
const [host] = useState(() => ({
|
|
777
|
+
set: (id, node) => setNodes(
|
|
778
|
+
(all) => all.some(([k]) => k === id) ? all.map((e) => e[0] === id ? [id, node] : e) : [...all, [id, node]]
|
|
779
|
+
),
|
|
780
|
+
remove: (id) => setNodes((all) => all.filter(([k]) => k !== id))
|
|
781
|
+
}));
|
|
782
|
+
return /* @__PURE__ */ jsxs(HostContext.Provider, { value: host, children: [
|
|
783
|
+
children,
|
|
784
|
+
/* @__PURE__ */ jsx(View$1, { pointerEvents: "box-none", style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }, children: nodes.map(([id, node]) => /* @__PURE__ */ jsx(React5.Fragment, { children: node }, id)) })
|
|
785
|
+
] });
|
|
786
|
+
}
|
|
787
|
+
function Portal({ children }) {
|
|
788
|
+
const host = useContext(HostContext);
|
|
789
|
+
const id = useId();
|
|
790
|
+
useEffect(() => {
|
|
791
|
+
host?.set(id, children);
|
|
792
|
+
});
|
|
793
|
+
useEffect(() => () => host?.remove(id), [host, id]);
|
|
794
|
+
return host ? null : /* @__PURE__ */ jsx(Fragment, { children });
|
|
795
|
+
}
|
|
796
|
+
var flipovaComponents = {
|
|
797
|
+
Accordion,
|
|
798
|
+
ActionSheet,
|
|
799
|
+
Alert,
|
|
800
|
+
AlertDialog,
|
|
801
|
+
Avatar,
|
|
802
|
+
Badge,
|
|
803
|
+
BottomSheet,
|
|
804
|
+
Box,
|
|
805
|
+
Button,
|
|
806
|
+
Calendar,
|
|
807
|
+
Card,
|
|
808
|
+
Center,
|
|
809
|
+
Checkbox,
|
|
810
|
+
DateTimePicker,
|
|
811
|
+
Divider,
|
|
812
|
+
Drawer,
|
|
813
|
+
Fab,
|
|
814
|
+
FlatList,
|
|
815
|
+
FormControl,
|
|
816
|
+
Grid,
|
|
817
|
+
HStack,
|
|
818
|
+
Heading,
|
|
819
|
+
Icon,
|
|
820
|
+
Image,
|
|
821
|
+
ImageBackground,
|
|
822
|
+
ImageViewer,
|
|
823
|
+
Input,
|
|
824
|
+
InputAccessoryView,
|
|
825
|
+
KeyboardAvoidingView,
|
|
826
|
+
Link,
|
|
827
|
+
LiquidGlass,
|
|
828
|
+
Menu,
|
|
829
|
+
Modal,
|
|
830
|
+
Popover,
|
|
831
|
+
Portal,
|
|
832
|
+
Pressable,
|
|
833
|
+
Progress,
|
|
834
|
+
RadioGroup,
|
|
835
|
+
RefreshControl,
|
|
836
|
+
SafeAreaView,
|
|
837
|
+
ScrollView,
|
|
838
|
+
SectionList,
|
|
839
|
+
Select,
|
|
840
|
+
Skeleton,
|
|
841
|
+
Slider,
|
|
842
|
+
Spinner,
|
|
843
|
+
StatusBar,
|
|
844
|
+
Switch,
|
|
845
|
+
Table,
|
|
846
|
+
Tabs,
|
|
847
|
+
Text: Text24,
|
|
848
|
+
Textarea,
|
|
849
|
+
Toast,
|
|
850
|
+
Tooltip,
|
|
851
|
+
VStack,
|
|
852
|
+
View,
|
|
853
|
+
VirtualizedList
|
|
854
|
+
};
|
|
855
|
+
var flipova = defineAdapter({
|
|
856
|
+
name: "flipova",
|
|
857
|
+
// the portal host is the one thing to mount: <Portal> content is drawn there, above the app
|
|
858
|
+
Provider: ({ children }) => /* @__PURE__ */ jsx(PortalHost, { children }),
|
|
859
|
+
components: flipovaComponents
|
|
860
|
+
});
|
|
861
|
+
|
|
862
|
+
export { Accordion, ActionSheet, Alert, AlertDialog, Avatar, Badge, BottomSheet, Button, Calendar, Card, Center, Checkbox, DateTimePicker, Divider, Drawer, Fab, FormControl, Grid, HStack, Heading, Icon, ImageViewer, Input, Link, LiquidGlass, Menu, Modal, Popover, Portal, PortalHost, Progress, RadioGroup, Select, Skeleton, Slider, Spinner, Switch, Table, Tabs, Text24 as Text, Textarea, Toast, Tooltip, VStack, flipova, flipovaComponents };
|
|
863
|
+
//# sourceMappingURL=chunk-YIBPE3KQ.mjs.map
|
|
864
|
+
//# sourceMappingURL=chunk-YIBPE3KQ.mjs.map
|