@oxyhq/bloom 0.6.24 → 0.7.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/lib/commonjs/alert-dialog/AlertDialog.js +109 -0
- package/lib/commonjs/alert-dialog/AlertDialog.js.map +1 -0
- package/lib/commonjs/alert-dialog/AlertDialogHost.js +50 -0
- package/lib/commonjs/alert-dialog/AlertDialogHost.js.map +1 -0
- package/lib/commonjs/alert-dialog/confirm-store.js +80 -0
- package/lib/commonjs/alert-dialog/confirm-store.js.map +1 -0
- package/lib/commonjs/alert-dialog/index.js +19 -0
- package/lib/commonjs/alert-dialog/index.js.map +1 -0
- package/lib/commonjs/alert-dialog/index.web.js +19 -0
- package/lib/commonjs/alert-dialog/index.web.js.map +1 -0
- package/lib/commonjs/alert-dialog/types.js +6 -0
- package/lib/commonjs/alert-dialog/types.js.map +1 -0
- package/lib/commonjs/combobox/Combobox.js +227 -0
- package/lib/commonjs/combobox/Combobox.js.map +1 -0
- package/lib/commonjs/combobox/index.js +11 -0
- package/lib/commonjs/combobox/index.js.map +1 -0
- package/lib/commonjs/combobox/index.web.js +11 -0
- package/lib/commonjs/combobox/index.web.js.map +1 -0
- package/lib/commonjs/combobox/types.js +6 -0
- package/lib/commonjs/combobox/types.js.map +1 -0
- package/lib/commonjs/command/Command.js +256 -0
- package/lib/commonjs/command/Command.js.map +1 -0
- package/lib/commonjs/command/index.js +10 -0
- package/lib/commonjs/command/index.js.map +1 -0
- package/lib/commonjs/command/index.web.js +10 -0
- package/lib/commonjs/command/index.web.js.map +1 -0
- package/lib/commonjs/command/types.js +6 -0
- package/lib/commonjs/command/types.js.map +1 -0
- package/lib/commonjs/field/Field.js +68 -0
- package/lib/commonjs/field/Field.js.map +1 -0
- package/lib/commonjs/field/index.js +13 -0
- package/lib/commonjs/field/index.js.map +1 -0
- package/lib/commonjs/field/types.js +6 -0
- package/lib/commonjs/field/types.js.map +1 -0
- package/lib/commonjs/index.js +117 -25
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +117 -25
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/input-group/InputGroup.js +172 -0
- package/lib/commonjs/input-group/InputGroup.js.map +1 -0
- package/lib/commonjs/input-group/index.js +19 -0
- package/lib/commonjs/input-group/index.js.map +1 -0
- package/lib/commonjs/input-group/types.js +6 -0
- package/lib/commonjs/input-group/types.js.map +1 -0
- package/lib/commonjs/item/Item.js +172 -0
- package/lib/commonjs/item/Item.js.map +1 -0
- package/lib/commonjs/item/index.js +13 -0
- package/lib/commonjs/item/index.js.map +1 -0
- package/lib/commonjs/item/types.js +6 -0
- package/lib/commonjs/item/types.js.map +1 -0
- package/lib/commonjs/kbd/Kbd.js +79 -0
- package/lib/commonjs/kbd/Kbd.js.map +1 -0
- package/lib/commonjs/kbd/index.js +13 -0
- package/lib/commonjs/kbd/index.js.map +1 -0
- package/lib/commonjs/kbd/types.js +6 -0
- package/lib/commonjs/kbd/types.js.map +1 -0
- package/lib/commonjs/label/Label.js +60 -0
- package/lib/commonjs/label/Label.js.map +1 -0
- package/lib/commonjs/label/index.js +13 -0
- package/lib/commonjs/label/index.js.map +1 -0
- package/lib/commonjs/label/types.js +6 -0
- package/lib/commonjs/label/types.js.map +1 -0
- package/lib/commonjs/popover/context.js +18 -0
- package/lib/commonjs/popover/context.js.map +1 -0
- package/lib/commonjs/popover/index.js +111 -0
- package/lib/commonjs/popover/index.js.map +1 -0
- package/lib/commonjs/popover/index.web.js +286 -0
- package/lib/commonjs/popover/index.web.js.map +1 -0
- package/lib/commonjs/popover/types.js +6 -0
- package/lib/commonjs/popover/types.js.map +1 -0
- package/lib/commonjs/react-native-css.d.js +2 -0
- package/lib/commonjs/react-native-css.d.js.map +1 -0
- package/lib/commonjs/slider/Slider.js +255 -0
- package/lib/commonjs/slider/Slider.js.map +1 -0
- package/lib/commonjs/slider/index.js +13 -0
- package/lib/commonjs/slider/index.js.map +1 -0
- package/lib/commonjs/slider/types.js +6 -0
- package/lib/commonjs/slider/types.js.map +1 -0
- package/lib/commonjs/theme/BloomThemeProvider.js +39 -7
- package/lib/commonjs/theme/BloomThemeProvider.js.map +1 -1
- package/lib/commonjs/theme/color-presets.js +118 -118
- package/lib/commonjs/theme/color-presets.js.map +1 -1
- package/lib/commonjs/theme/color-scope/index.js +28 -6
- package/lib/commonjs/theme/color-scope/index.js.map +1 -1
- package/lib/commonjs/theme/color-scope/style-builder.js +35 -0
- package/lib/commonjs/theme/color-scope/style-builder.js.map +1 -1
- package/lib/commonjs/theme/native-root-vars.js +105 -0
- package/lib/commonjs/theme/native-root-vars.js.map +1 -0
- package/lib/commonjs/theme/native-root-vars.web.js +27 -0
- package/lib/commonjs/theme/native-root-vars.web.js.map +1 -0
- package/lib/commonjs/theme/preset-vars.js +4 -1
- package/lib/commonjs/theme/preset-vars.js.map +1 -1
- package/lib/module/alert-dialog/AlertDialog.js +104 -0
- package/lib/module/alert-dialog/AlertDialog.js.map +1 -0
- package/lib/module/alert-dialog/AlertDialogHost.js +45 -0
- package/lib/module/alert-dialog/AlertDialogHost.js.map +1 -0
- package/lib/module/alert-dialog/confirm-store.js +73 -0
- package/lib/module/alert-dialog/confirm-store.js.map +1 -0
- package/lib/module/alert-dialog/index.js +9 -0
- package/lib/module/alert-dialog/index.js.map +1 -0
- package/lib/module/alert-dialog/index.web.js +9 -0
- package/lib/module/alert-dialog/index.web.js.map +1 -0
- package/lib/module/alert-dialog/types.js +4 -0
- package/lib/module/alert-dialog/types.js.map +1 -0
- package/lib/module/combobox/Combobox.js +222 -0
- package/lib/module/combobox/Combobox.js.map +1 -0
- package/lib/module/combobox/index.js +6 -0
- package/lib/module/combobox/index.js.map +1 -0
- package/lib/module/combobox/index.web.js +6 -0
- package/lib/module/combobox/index.web.js.map +1 -0
- package/lib/module/combobox/types.js +4 -0
- package/lib/module/combobox/types.js.map +1 -0
- package/lib/module/command/Command.js +251 -0
- package/lib/module/command/Command.js.map +1 -0
- package/lib/module/command/index.js +6 -0
- package/lib/module/command/index.js.map +1 -0
- package/lib/module/command/index.web.js +6 -0
- package/lib/module/command/index.web.js.map +1 -0
- package/lib/module/command/types.js +4 -0
- package/lib/module/command/types.js.map +1 -0
- package/lib/module/field/Field.js +63 -0
- package/lib/module/field/Field.js.map +1 -0
- package/lib/module/field/index.js +4 -0
- package/lib/module/field/index.js.map +1 -0
- package/lib/module/field/types.js +4 -0
- package/lib/module/field/types.js.map +1 -0
- package/lib/module/index.js +10 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +10 -3
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/input-group/InputGroup.js +167 -0
- package/lib/module/input-group/InputGroup.js.map +1 -0
- package/lib/module/input-group/index.js +4 -0
- package/lib/module/input-group/index.js.map +1 -0
- package/lib/module/input-group/types.js +4 -0
- package/lib/module/input-group/types.js.map +1 -0
- package/lib/module/item/Item.js +167 -0
- package/lib/module/item/Item.js.map +1 -0
- package/lib/module/item/index.js +4 -0
- package/lib/module/item/index.js.map +1 -0
- package/lib/module/item/types.js +4 -0
- package/lib/module/item/types.js.map +1 -0
- package/lib/module/kbd/Kbd.js +74 -0
- package/lib/module/kbd/Kbd.js.map +1 -0
- package/lib/module/kbd/index.js +4 -0
- package/lib/module/kbd/index.js.map +1 -0
- package/lib/module/kbd/types.js +4 -0
- package/lib/module/kbd/types.js.map +1 -0
- package/lib/module/label/Label.js +55 -0
- package/lib/module/label/Label.js.map +1 -0
- package/lib/module/label/index.js +4 -0
- package/lib/module/label/index.js.map +1 -0
- package/lib/module/label/types.js +4 -0
- package/lib/module/label/types.js.map +1 -0
- package/lib/module/popover/context.js +13 -0
- package/lib/module/popover/context.js.map +1 -0
- package/lib/module/popover/index.js +95 -0
- package/lib/module/popover/index.js.map +1 -0
- package/lib/module/popover/index.web.js +274 -0
- package/lib/module/popover/index.web.js.map +1 -0
- package/lib/module/popover/types.js +4 -0
- package/lib/module/popover/types.js.map +1 -0
- package/lib/module/react-native-css.d.js +2 -0
- package/lib/module/react-native-css.d.js.map +1 -0
- package/lib/module/slider/Slider.js +250 -0
- package/lib/module/slider/Slider.js.map +1 -0
- package/lib/module/slider/index.js +4 -0
- package/lib/module/slider/index.js.map +1 -0
- package/lib/module/slider/types.js +4 -0
- package/lib/module/slider/types.js.map +1 -0
- package/lib/module/theme/BloomThemeProvider.js +40 -8
- package/lib/module/theme/BloomThemeProvider.js.map +1 -1
- package/lib/module/theme/color-presets.js +118 -118
- package/lib/module/theme/color-presets.js.map +1 -1
- package/lib/module/theme/color-scope/index.js +29 -7
- package/lib/module/theme/color-scope/index.js.map +1 -1
- package/lib/module/theme/color-scope/style-builder.js +35 -0
- package/lib/module/theme/color-scope/style-builder.js.map +1 -1
- package/lib/module/theme/native-root-vars.js +101 -0
- package/lib/module/theme/native-root-vars.js.map +1 -0
- package/lib/module/theme/native-root-vars.web.js +23 -0
- package/lib/module/theme/native-root-vars.web.js.map +1 -0
- package/lib/module/theme/preset-vars.js +4 -1
- package/lib/module/theme/preset-vars.js.map +1 -1
- package/lib/typescript/commonjs/alert-dialog/AlertDialog.d.ts +21 -0
- package/lib/typescript/commonjs/alert-dialog/AlertDialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/alert-dialog/AlertDialogHost.d.ts +15 -0
- package/lib/typescript/commonjs/alert-dialog/AlertDialogHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/alert-dialog/confirm-store.d.ts +31 -0
- package/lib/typescript/commonjs/alert-dialog/confirm-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/alert-dialog/index.d.ts +8 -0
- package/lib/typescript/commonjs/alert-dialog/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/alert-dialog/index.web.d.ts +8 -0
- package/lib/typescript/commonjs/alert-dialog/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/alert-dialog/types.d.ts +44 -0
- package/lib/typescript/commonjs/alert-dialog/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/combobox/Combobox.d.ts +33 -0
- package/lib/typescript/commonjs/combobox/Combobox.d.ts.map +1 -0
- package/lib/typescript/commonjs/combobox/index.d.ts +6 -0
- package/lib/typescript/commonjs/combobox/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/combobox/index.web.d.ts +6 -0
- package/lib/typescript/commonjs/combobox/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/combobox/types.d.ts +40 -0
- package/lib/typescript/commonjs/combobox/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/command/Command.d.ts +22 -0
- package/lib/typescript/commonjs/command/Command.d.ts.map +1 -0
- package/lib/typescript/commonjs/command/index.d.ts +6 -0
- package/lib/typescript/commonjs/command/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/command/index.web.d.ts +6 -0
- package/lib/typescript/commonjs/command/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/command/types.d.ts +46 -0
- package/lib/typescript/commonjs/command/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/field/Field.d.ts +4 -0
- package/lib/typescript/commonjs/field/Field.d.ts.map +1 -0
- package/lib/typescript/commonjs/field/index.d.ts +3 -0
- package/lib/typescript/commonjs/field/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/field/types.d.ts +26 -0
- package/lib/typescript/commonjs/field/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/common.d.ts +8 -8
- package/lib/typescript/commonjs/index.d.ts +19 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +19 -0
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/input-group/InputGroup.d.ts +9 -0
- package/lib/typescript/commonjs/input-group/InputGroup.d.ts.map +1 -0
- package/lib/typescript/commonjs/input-group/index.d.ts +3 -0
- package/lib/typescript/commonjs/input-group/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/input-group/types.d.ts +35 -0
- package/lib/typescript/commonjs/input-group/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/item/Item.d.ts +4 -0
- package/lib/typescript/commonjs/item/Item.d.ts.map +1 -0
- package/lib/typescript/commonjs/item/index.d.ts +3 -0
- package/lib/typescript/commonjs/item/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/item/types.d.ts +45 -0
- package/lib/typescript/commonjs/item/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/kbd/Kbd.d.ts +4 -0
- package/lib/typescript/commonjs/kbd/Kbd.d.ts.map +1 -0
- package/lib/typescript/commonjs/kbd/index.d.ts +3 -0
- package/lib/typescript/commonjs/kbd/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/kbd/types.d.ts +13 -0
- package/lib/typescript/commonjs/kbd/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/label/Label.d.ts +4 -0
- package/lib/typescript/commonjs/label/Label.d.ts.map +1 -0
- package/lib/typescript/commonjs/label/index.d.ts +3 -0
- package/lib/typescript/commonjs/label/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/label/types.d.ts +27 -0
- package/lib/typescript/commonjs/label/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/popover/context.d.ts +15 -0
- package/lib/typescript/commonjs/popover/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/popover/index.d.ts +14 -0
- package/lib/typescript/commonjs/popover/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/popover/index.web.d.ts +14 -0
- package/lib/typescript/commonjs/popover/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/popover/types.d.ts +54 -0
- package/lib/typescript/commonjs/popover/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/slider/Slider.d.ts +4 -0
- package/lib/typescript/commonjs/slider/Slider.d.ts.map +1 -0
- package/lib/typescript/commonjs/slider/index.d.ts +3 -0
- package/lib/typescript/commonjs/slider/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/slider/types.d.ts +30 -0
- package/lib/typescript/commonjs/slider/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-scope/index.d.ts +9 -2
- package/lib/typescript/commonjs/theme/color-scope/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-scope/style-builder.d.ts +32 -0
- package/lib/typescript/commonjs/theme/color-scope/style-builder.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/native-root-vars.d.ts +89 -0
- package/lib/typescript/commonjs/theme/native-root-vars.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/native-root-vars.web.d.ts +20 -0
- package/lib/typescript/commonjs/theme/native-root-vars.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/preset-vars.d.ts.map +1 -1
- package/lib/typescript/module/alert-dialog/AlertDialog.d.ts +21 -0
- package/lib/typescript/module/alert-dialog/AlertDialog.d.ts.map +1 -0
- package/lib/typescript/module/alert-dialog/AlertDialogHost.d.ts +15 -0
- package/lib/typescript/module/alert-dialog/AlertDialogHost.d.ts.map +1 -0
- package/lib/typescript/module/alert-dialog/confirm-store.d.ts +31 -0
- package/lib/typescript/module/alert-dialog/confirm-store.d.ts.map +1 -0
- package/lib/typescript/module/alert-dialog/index.d.ts +8 -0
- package/lib/typescript/module/alert-dialog/index.d.ts.map +1 -0
- package/lib/typescript/module/alert-dialog/index.web.d.ts +8 -0
- package/lib/typescript/module/alert-dialog/index.web.d.ts.map +1 -0
- package/lib/typescript/module/alert-dialog/types.d.ts +44 -0
- package/lib/typescript/module/alert-dialog/types.d.ts.map +1 -0
- package/lib/typescript/module/combobox/Combobox.d.ts +33 -0
- package/lib/typescript/module/combobox/Combobox.d.ts.map +1 -0
- package/lib/typescript/module/combobox/index.d.ts +6 -0
- package/lib/typescript/module/combobox/index.d.ts.map +1 -0
- package/lib/typescript/module/combobox/index.web.d.ts +6 -0
- package/lib/typescript/module/combobox/index.web.d.ts.map +1 -0
- package/lib/typescript/module/combobox/types.d.ts +40 -0
- package/lib/typescript/module/combobox/types.d.ts.map +1 -0
- package/lib/typescript/module/command/Command.d.ts +22 -0
- package/lib/typescript/module/command/Command.d.ts.map +1 -0
- package/lib/typescript/module/command/index.d.ts +6 -0
- package/lib/typescript/module/command/index.d.ts.map +1 -0
- package/lib/typescript/module/command/index.web.d.ts +6 -0
- package/lib/typescript/module/command/index.web.d.ts.map +1 -0
- package/lib/typescript/module/command/types.d.ts +46 -0
- package/lib/typescript/module/command/types.d.ts.map +1 -0
- package/lib/typescript/module/field/Field.d.ts +4 -0
- package/lib/typescript/module/field/Field.d.ts.map +1 -0
- package/lib/typescript/module/field/index.d.ts +3 -0
- package/lib/typescript/module/field/index.d.ts.map +1 -0
- package/lib/typescript/module/field/types.d.ts +26 -0
- package/lib/typescript/module/field/types.d.ts.map +1 -0
- package/lib/typescript/module/icons/common.d.ts +8 -8
- package/lib/typescript/module/index.d.ts +19 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +19 -0
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/input-group/InputGroup.d.ts +9 -0
- package/lib/typescript/module/input-group/InputGroup.d.ts.map +1 -0
- package/lib/typescript/module/input-group/index.d.ts +3 -0
- package/lib/typescript/module/input-group/index.d.ts.map +1 -0
- package/lib/typescript/module/input-group/types.d.ts +35 -0
- package/lib/typescript/module/input-group/types.d.ts.map +1 -0
- package/lib/typescript/module/item/Item.d.ts +4 -0
- package/lib/typescript/module/item/Item.d.ts.map +1 -0
- package/lib/typescript/module/item/index.d.ts +3 -0
- package/lib/typescript/module/item/index.d.ts.map +1 -0
- package/lib/typescript/module/item/types.d.ts +45 -0
- package/lib/typescript/module/item/types.d.ts.map +1 -0
- package/lib/typescript/module/kbd/Kbd.d.ts +4 -0
- package/lib/typescript/module/kbd/Kbd.d.ts.map +1 -0
- package/lib/typescript/module/kbd/index.d.ts +3 -0
- package/lib/typescript/module/kbd/index.d.ts.map +1 -0
- package/lib/typescript/module/kbd/types.d.ts +13 -0
- package/lib/typescript/module/kbd/types.d.ts.map +1 -0
- package/lib/typescript/module/label/Label.d.ts +4 -0
- package/lib/typescript/module/label/Label.d.ts.map +1 -0
- package/lib/typescript/module/label/index.d.ts +3 -0
- package/lib/typescript/module/label/index.d.ts.map +1 -0
- package/lib/typescript/module/label/types.d.ts +27 -0
- package/lib/typescript/module/label/types.d.ts.map +1 -0
- package/lib/typescript/module/popover/context.d.ts +15 -0
- package/lib/typescript/module/popover/context.d.ts.map +1 -0
- package/lib/typescript/module/popover/index.d.ts +14 -0
- package/lib/typescript/module/popover/index.d.ts.map +1 -0
- package/lib/typescript/module/popover/index.web.d.ts +14 -0
- package/lib/typescript/module/popover/index.web.d.ts.map +1 -0
- package/lib/typescript/module/popover/types.d.ts +54 -0
- package/lib/typescript/module/popover/types.d.ts.map +1 -0
- package/lib/typescript/module/slider/Slider.d.ts +4 -0
- package/lib/typescript/module/slider/Slider.d.ts.map +1 -0
- package/lib/typescript/module/slider/index.d.ts +3 -0
- package/lib/typescript/module/slider/index.d.ts.map +1 -0
- package/lib/typescript/module/slider/types.d.ts +30 -0
- package/lib/typescript/module/slider/types.d.ts.map +1 -0
- package/lib/typescript/module/theme/BloomThemeProvider.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-scope/index.d.ts +9 -2
- package/lib/typescript/module/theme/color-scope/index.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-scope/style-builder.d.ts +32 -0
- package/lib/typescript/module/theme/color-scope/style-builder.d.ts.map +1 -1
- package/lib/typescript/module/theme/native-root-vars.d.ts +89 -0
- package/lib/typescript/module/theme/native-root-vars.d.ts.map +1 -0
- package/lib/typescript/module/theme/native-root-vars.web.d.ts +20 -0
- package/lib/typescript/module/theme/native-root-vars.web.d.ts.map +1 -0
- package/lib/typescript/module/theme/preset-vars.d.ts.map +1 -1
- package/package.json +141 -1
- package/src/__tests__/Field.test.tsx +55 -0
- package/src/__tests__/InputGroup.test.tsx +44 -0
- package/src/__tests__/Item.test.tsx +73 -0
- package/src/__tests__/Kbd.test.tsx +27 -0
- package/src/__tests__/Label.test.tsx +30 -0
- package/src/__tests__/Slider.test.tsx +38 -0
- package/src/__tests__/confirm-store.test.ts +58 -0
- package/src/__tests__/native-root-vars.test.ts +125 -0
- package/src/alert-dialog/AlertDialog.stories.tsx +61 -0
- package/src/alert-dialog/AlertDialog.tsx +120 -0
- package/src/alert-dialog/AlertDialogHost.tsx +51 -0
- package/src/alert-dialog/confirm-store.ts +77 -0
- package/src/alert-dialog/index.ts +13 -0
- package/src/alert-dialog/index.web.ts +13 -0
- package/src/alert-dialog/types.ts +46 -0
- package/src/combobox/Combobox.stories.tsx +40 -0
- package/src/combobox/Combobox.tsx +274 -0
- package/src/combobox/index.ts +6 -0
- package/src/combobox/index.web.ts +6 -0
- package/src/combobox/types.ts +41 -0
- package/src/command/Command.stories.tsx +60 -0
- package/src/command/Command.tsx +276 -0
- package/src/command/index.ts +6 -0
- package/src/command/index.web.ts +6 -0
- package/src/command/types.ts +47 -0
- package/src/field/Field.stories.tsx +54 -0
- package/src/field/Field.tsx +77 -0
- package/src/field/index.ts +2 -0
- package/src/field/types.ts +26 -0
- package/src/index.ts +23 -0
- package/src/index.web.ts +23 -0
- package/src/input-group/InputGroup.stories.tsx +65 -0
- package/src/input-group/InputGroup.tsx +184 -0
- package/src/input-group/index.ts +2 -0
- package/src/input-group/types.ts +36 -0
- package/src/item/Item.stories.tsx +43 -0
- package/src/item/Item.tsx +180 -0
- package/src/item/index.ts +2 -0
- package/src/item/types.ts +45 -0
- package/src/kbd/Kbd.stories.tsx +36 -0
- package/src/kbd/Kbd.tsx +76 -0
- package/src/kbd/index.ts +2 -0
- package/src/kbd/types.ts +13 -0
- package/src/label/Label.stories.tsx +32 -0
- package/src/label/Label.tsx +64 -0
- package/src/label/index.ts +2 -0
- package/src/label/types.ts +27 -0
- package/src/popover/Popover.stories.tsx +61 -0
- package/src/popover/context.ts +26 -0
- package/src/popover/index.tsx +104 -0
- package/src/popover/index.web.tsx +325 -0
- package/src/popover/types.ts +60 -0
- package/src/react-native-css.d.ts +69 -0
- package/src/slider/Slider.stories.tsx +46 -0
- package/src/slider/Slider.tsx +275 -0
- package/src/slider/index.ts +2 -0
- package/src/slider/types.ts +30 -0
- package/src/theme/BloomThemeProvider.tsx +32 -6
- package/src/theme/color-presets.ts +118 -118
- package/src/theme/color-scope/index.tsx +30 -8
- package/src/theme/color-scope/style-builder.ts +40 -0
- package/src/theme/native-root-vars.ts +102 -0
- package/src/theme/native-root-vars.web.ts +22 -0
- package/src/theme/preset-vars.ts +4 -1
|
@@ -1,16 +1,48 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
2
3
|
import type { AppColorName } from '../color-presets';
|
|
4
|
+
/**
|
|
5
|
+
* Component that provides inline CSS variables to a subtree via NativeWind's
|
|
6
|
+
* (react-native-css's) real `VariableContext`. The runtime strips the leading
|
|
7
|
+
* `--` from each key internally, so we feed it the full `--name -> value`
|
|
8
|
+
* record produced by `buildScopeVars`.
|
|
9
|
+
*/
|
|
10
|
+
export type VariableContextProviderComponent = React.ComponentType<{
|
|
11
|
+
value: Record<string, string>;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}>;
|
|
3
14
|
/**
|
|
4
15
|
* Build the CSS custom-property map for a preset, ready to be applied to a
|
|
5
16
|
* subtree. Always includes the resolved `--color-*` vars so Tailwind v4
|
|
6
17
|
* `@theme` utilities (e.g. `bg-background`) honour the scope.
|
|
7
18
|
*/
|
|
8
19
|
export declare function buildScopeVars(colorPreset: AppColorName, mode: 'light' | 'dark'): Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve NativeWind's `VariableContextProvider` — the canonical, non-deprecated
|
|
22
|
+
* react-native-css v3 API for providing inline CSS variables to a subtree. It
|
|
23
|
+
* reads the same `VariableContext` that interop className components consume, so
|
|
24
|
+
* descendants resolve `var(--primary)` etc. correctly. Returns `null` on web or
|
|
25
|
+
* when `nativewind` is not installed.
|
|
26
|
+
*
|
|
27
|
+
* This replaces the deprecated `vars()`-on-a-plain-`<View>`-style mechanism:
|
|
28
|
+
* under react-native-css@3, `vars()` returns an inline-vars marker that is only
|
|
29
|
+
* propagated to children when the host element matches className style rules
|
|
30
|
+
* (`usesVariables`/`variables`). A plain `<View>` with no `className` drops the
|
|
31
|
+
* vars silently, so the subtree renders without the preset palette.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getVariableContextProvider(): VariableContextProviderComponent | null;
|
|
9
34
|
/**
|
|
10
35
|
* Build a native style object carrying every CSS var of the preset, using
|
|
11
36
|
* NativeWind's `vars()` when available. Returns `undefined` on web (where the
|
|
12
37
|
* provider writes vars to `documentElement` instead) or when `nativewind` is
|
|
13
38
|
* not installed.
|
|
39
|
+
*
|
|
40
|
+
* @deprecated Under react-native-css@3, `vars()` only propagates to a subtree
|
|
41
|
+
* when applied to an interop className component (the runtime gates propagation
|
|
42
|
+
* on matched className style rules). Applied to a plain `<View>` the vars are
|
|
43
|
+
* dropped silently. Prefer wrapping children in `getVariableContextProvider()`.
|
|
44
|
+
* Retained only as the escape-hatch contract of `useColorScopeStyle`, where the
|
|
45
|
+
* caller owns the host element and is expected to be a className component.
|
|
14
46
|
*/
|
|
15
47
|
export declare function buildNativePresetStyle(colorPreset: AppColorName, mode: 'light' | 'dark'): StyleProp<ViewStyle>;
|
|
16
48
|
//# sourceMappingURL=style-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-builder.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-scope/style-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"style-builder.d.ts","sourceRoot":"","sources":["../../../../../src/theme/color-scope/style-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAY,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD;;;;;GAKG;AACH,MAAM,MAAM,gCAAgC,GAAG,KAAK,CAAC,aAAa,CAAC;IACjE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC,CAAC;AASH;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,YAAY,EACzB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAExB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,IAAI,gCAAgC,GAAG,IAAI,CAKpF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,YAAY,EACzB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,SAAS,CAAC,SAAS,CAAC,CAKtB"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { type AppColorName } from './color-presets';
|
|
2
|
+
/**
|
|
3
|
+
* Publish the active color preset's CSS custom properties into react-native-css's
|
|
4
|
+
* GLOBAL root-variable family so they reach the ENTIRE native app tree — including
|
|
5
|
+
* content rendered outside the React subtree of `BloomThemeProvider`: expo-router
|
|
6
|
+
* navigator screens, `Portal`s, `Dialog`/`BottomSheet` overlays, and any other host
|
|
7
|
+
* that paints through a separate React root.
|
|
8
|
+
*
|
|
9
|
+
* Why a global write is required (native only)
|
|
10
|
+
* --------------------------------------------
|
|
11
|
+
* react-native-css resolves a `var(--x)` reference (its `varResolver`) in this order:
|
|
12
|
+
* 1. `name in inheritedVariables` — the React-context-inherited vars. This is what
|
|
13
|
+
* `VariableContextProvider` populates, but it is React-context-scoped, so it only
|
|
14
|
+
* reaches *direct descendants* of the provider in the React tree.
|
|
15
|
+
* 2. `inlineVariables[name]` — same-component inline vars.
|
|
16
|
+
* 3. `variables[name]` — resolved inherited vars.
|
|
17
|
+
* 4. `universalVariables(name)` — a GLOBAL observable family.
|
|
18
|
+
* 5. `rootVariables(name)` — a GLOBAL observable family.
|
|
19
|
+
* 6. the declared fallback.
|
|
20
|
+
*
|
|
21
|
+
* `BloomThemeProvider`'s `VariableContextProvider` only feeds path #1, so the navigator
|
|
22
|
+
* host and every portal/modal — which render outside that subtree — never see the
|
|
23
|
+
* preset vars and fall through to `rootVariables`/`universalVariables`. By default those
|
|
24
|
+
* families hold only react-native-css's own `__rn-css-rem`/`__rn-css-color` entries
|
|
25
|
+
* (Bloom's `global.css` defines the `hsl(var(--primary))` indirection but not the HSL
|
|
26
|
+
* triples themselves — those are injected at runtime), so the whole tree below the
|
|
27
|
+
* navigator renders monochrome. Writing the triples into `rootVariables` here is the
|
|
28
|
+
* exact same mechanism react-native-css uses for compiled `:root {}` / `@theme` vars
|
|
29
|
+
* (`StyleCollection.inject` does `rootVariables(name).set(valueArray)`), so portaled
|
|
30
|
+
* content resolves the palette identically regardless of React-tree position.
|
|
31
|
+
*
|
|
32
|
+
* Why a STATIC `import`, not a runtime `require` (critical)
|
|
33
|
+
* ---------------------------------------------------------
|
|
34
|
+
* react-native-css@3.0.7 ships both a `dist/commonjs` and a `dist/module` build, and
|
|
35
|
+
* Metro bundles BOTH. In `native-internal/root.js` the variable families are plain
|
|
36
|
+
* module-local consts — NOT `globalThis`-guarded the way `StyleCollection` is — so the
|
|
37
|
+
* commonjs `root.js` and the module `root.js` each instantiate their OWN separate
|
|
38
|
+
* `rootVariables` family. The react-native-css renderer (`react-native-css/src/components/View.tsx`
|
|
39
|
+
* → `varResolver`) imports its `root.js` via ESM `import`, i.e. the MODULE build. A
|
|
40
|
+
* runtime `require('react-native-css/native-internal')` resolves the package's `require`
|
|
41
|
+
* export condition → the COMMONJS build → a DIFFERENT family the renderer never
|
|
42
|
+
* subscribes to, so the writes are a silent no-op on device. A static top-level
|
|
43
|
+
* `import` resolves the `import` condition → the MODULE build → the renderer's instance.
|
|
44
|
+
*
|
|
45
|
+
* This plain file is the NATIVE/default variant (Metro selects it on iOS/Android,
|
|
46
|
+
* which have no `.native` override here); the web variant lives in the sibling
|
|
47
|
+
* `native-root-vars.web.ts` no-op, which web bundlers pick over this one. So the
|
|
48
|
+
* static `react-native-css/native-internal` import below is never pulled into a web
|
|
49
|
+
* bundle — only into native. This mirrors Bloom's existing platform-split convention
|
|
50
|
+
* (`color-scope/index.tsx` + `color-scope/index.web.tsx`, `FontLoader.native.tsx`).
|
|
51
|
+
*
|
|
52
|
+
* Keying contract (verified against react-native-css@3.0.7)
|
|
53
|
+
* ---------------------------------------------------------
|
|
54
|
+
* The `rootVariables` family is keyed by the BARE variable name, WITHOUT the leading
|
|
55
|
+
* `--`. The compiler strips it uniformly: a `:root { --primary: ... }` declaration is
|
|
56
|
+
* stored via `rule.v.push([property.slice(2), value])` then routed into
|
|
57
|
+
* `shared.rootVariables[name]`, and `@property --x` goes through
|
|
58
|
+
* `name.startsWith("--") ? name.slice(2) : name`. The lookup side matches: a `var(--x)`
|
|
59
|
+
* reference compiles to `[{}, "var", ident.slice(2)]`, so `varResolver` looks up the
|
|
60
|
+
* bare name. `buildScopeVars` returns keys WITH the `--` prefix, so we strip it before
|
|
61
|
+
* writing each entry.
|
|
62
|
+
*
|
|
63
|
+
* Value shape
|
|
64
|
+
* -----------
|
|
65
|
+
* Each entry is a `VariableValue[]` — an array of `[value, mediaCondition?]` tuples.
|
|
66
|
+
* Bloom's preset vars are unconditional, so each is a single-element `[[value]]`, e.g.
|
|
67
|
+
* `rootVariables('primary').set([['205 87% 53%']])`. This is the same shape the compiler
|
|
68
|
+
* emits for unconditional `:root` vars.
|
|
69
|
+
*
|
|
70
|
+
* This is native-only and additive: the `VariableContextProvider` wrapper stays (it is
|
|
71
|
+
* the correct, scoped mechanism for `BloomColorScope` subtree overrides and harmlessly
|
|
72
|
+
* covers direct descendants). The web fork (`native-root-vars.web.ts`) no-ops — web
|
|
73
|
+
* writes the same vars to `document.documentElement` via `applyColorPresetVars`.
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* Write the preset's CSS vars to react-native-css's global `rootVariables` family
|
|
77
|
+
* so the whole native tree (navigator screens + portals/modals/bottom-sheets)
|
|
78
|
+
* resolves the active palette.
|
|
79
|
+
*
|
|
80
|
+
* Each `.set` notifies its own observers synchronously (react-native-css only
|
|
81
|
+
* batches notifications inside its own `StyleCollection.inject`; outside it,
|
|
82
|
+
* `observableBatch.current` is unset so every `.set` runs observers immediately),
|
|
83
|
+
* so sequential writes correctly trigger a re-render when the preset/mode changes.
|
|
84
|
+
*
|
|
85
|
+
* Defensive guard: if a host ships a react-native-css build that doesn't expose
|
|
86
|
+
* `rootVariables` as a callable (it always does on @3), we bail rather than throw.
|
|
87
|
+
*/
|
|
88
|
+
export declare function applyNativeRootVars(colorPreset: AppColorName, mode: 'light' | 'dark'): void;
|
|
89
|
+
//# sourceMappingURL=native-root-vars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-root-vars.d.ts","sourceRoot":"","sources":["../../../../src/theme/native-root-vars.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAS3F"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type AppColorName } from './color-presets';
|
|
2
|
+
/**
|
|
3
|
+
* Web fork of `applyNativeRootVars` — a no-op.
|
|
4
|
+
*
|
|
5
|
+
* On web, `BloomThemeProvider` already writes the active preset's CSS vars to
|
|
6
|
+
* `document.documentElement` via `applyColorPresetVars`, which the browser /
|
|
7
|
+
* react-native-web resolve natively. The native/default variant — the plain
|
|
8
|
+
* sibling `native-root-vars.ts` — instead publishes those vars into
|
|
9
|
+
* react-native-css's GLOBAL `rootVariables` family.
|
|
10
|
+
*
|
|
11
|
+
* Keeping the native variant's `react-native-css/native-internal` import out of
|
|
12
|
+
* the web bundle is the whole reason this is a platform-split module: web (and
|
|
13
|
+
* any non-NativeWind host) picks this `.web` fork over the plain file and so
|
|
14
|
+
* never statically pulls react-native-css internals.
|
|
15
|
+
*
|
|
16
|
+
* The signature is intentionally identical to the plain variant so the import
|
|
17
|
+
* site in `BloomThemeProvider` is platform-agnostic.
|
|
18
|
+
*/
|
|
19
|
+
export declare function applyNativeRootVars(_colorPreset: AppColorName, _mode: 'light' | 'dark'): void;
|
|
20
|
+
//# sourceMappingURL=native-root-vars.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-root-vars.web.d.ts","sourceRoot":"","sources":["../../../../src/theme/native-root-vars.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAE7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset-vars.d.ts","sourceRoot":"","sources":["../../../../src/theme/preset-vars.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAiC1F,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,OAAO,GAAG,MAAM,EACtB,OAAO,GAAE,iBAAsB,GAC9B,YAAY,
|
|
1
|
+
{"version":3,"file":"preset-vars.d.ts","sourceRoot":"","sources":["../../../../src/theme/preset-vars.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAiC1F,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,OAAO,GAAG,MAAM,EACtB,OAAO,GAAE,iBAAsB,GAC9B,YAAY,CAwCd;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,OAAO,GAAG,MAAM,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,IAAI,CAQN"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CenteredDialogProps } from '../dialog';
|
|
3
|
+
import type { AlertDialogProps } from './types';
|
|
4
|
+
type CenteredDialogComponent = React.ComponentType<CenteredDialogProps>;
|
|
5
|
+
/**
|
|
6
|
+
* Build the `AlertDialog` component bound to a platform `CenteredDialog`.
|
|
7
|
+
*
|
|
8
|
+
* `CenteredDialog` is platform-forked (native RN `Modal` vs pure-DOM web
|
|
9
|
+
* overlay), and this repo never relies on implicit `.web` resolution — the
|
|
10
|
+
* platform entry files (`index.ts` / `index.web.ts`) inject the correct
|
|
11
|
+
* `CenteredDialog` here. The body below is single-source, no duplication.
|
|
12
|
+
*
|
|
13
|
+
* `AlertDialog` is a thin wrapper over `CenteredDialog` that lays out a title,
|
|
14
|
+
* description and a confirm/cancel action row. Reach for the imperative
|
|
15
|
+
* `confirm()` helper + `<AlertDialogHost />` to trigger a confirm from an
|
|
16
|
+
* event handler without owning visible state.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createAlertDialog(CenteredDialog: CenteredDialogComponent): React.MemoExoticComponent<({ visible, onClose, title, description, confirmLabel, cancelLabel, onConfirm, onCancel, destructive, hideCancel, dismissible, cardStyle, testID, }: AlertDialogProps) => import("react/jsx-runtime").JSX.Element>;
|
|
19
|
+
export type AlertDialogType = ReturnType<typeof createAlertDialog>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=AlertDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../../../src/alert-dialog/AlertDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAOjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,KAAK,uBAAuB,GAAG,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;AAExE;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,uBAAuB,kLAepE,gBAAgB,8CAkEpB;AAED,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AlertDialogType } from './AlertDialog';
|
|
2
|
+
/**
|
|
3
|
+
* Build the `<AlertDialogHost />` bound to a platform `AlertDialog`. The
|
|
4
|
+
* platform entry files (`index.ts` / `index.web.ts`) inject the correct one.
|
|
5
|
+
*
|
|
6
|
+
* The host mounts the imperative `confirm()` UI. Wrap your app root once
|
|
7
|
+
* (after `BloomThemeProvider`) and you can call `confirm()` from anywhere —
|
|
8
|
+
* including before the host mounts (entries are queued and drained on
|
|
9
|
+
* subscribe). Confirms present one at a time in FIFO order.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createAlertDialogHost(AlertDialog: AlertDialogType): {
|
|
12
|
+
(): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=AlertDialogHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialogHost.d.ts","sourceRoot":"","sources":["../../../../src/alert-dialog/AlertDialogHost.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,eAAe;;;EAgCjE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ConfirmOptions } from './types';
|
|
2
|
+
export interface ConfirmEntry extends ConfirmOptions {
|
|
3
|
+
id: string;
|
|
4
|
+
resolve: (confirmed: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
type Listener = (queue: ConfirmEntry[]) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Show a Bloom confirm dialog and resolve with the user's choice.
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* const ok = await confirm({
|
|
12
|
+
* title: 'Delete app?',
|
|
13
|
+
* description: 'This cannot be undone.',
|
|
14
|
+
* confirmLabel: 'Delete',
|
|
15
|
+
* destructive: true,
|
|
16
|
+
* });
|
|
17
|
+
* if (ok) await doDelete();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function confirm(options: ConfirmOptions): Promise<boolean>;
|
|
21
|
+
/** Resolve and remove an entry. Called by the host on confirm/cancel/dismiss. */
|
|
22
|
+
export declare function resolveConfirm(id: string, confirmed: boolean): void;
|
|
23
|
+
/**
|
|
24
|
+
* Subscribe to queue changes (single-subscriber model; latest wins). Delivers
|
|
25
|
+
* the current queue synchronously so a freshly mounted host catches up.
|
|
26
|
+
*/
|
|
27
|
+
export declare function subscribeConfirms(fn: Listener): () => void;
|
|
28
|
+
/** Inspect the current queue. Used by tests. */
|
|
29
|
+
export declare function getConfirmQueue(): readonly ConfirmEntry[];
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=confirm-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-store.d.ts","sourceRoot":"","sources":["../../../../src/alert-dialog/confirm-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAiB9C,MAAM,WAAW,YAAa,SAAQ,cAAc;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AAED,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;AAShD;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAMjE;AAED,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI,CAMnE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,IAAI,CAM1D;AAED,gDAAgD;AAChD,wBAAgB,eAAe,IAAI,SAAS,YAAY,EAAE,CAEzD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const AlertDialog: import("react").MemoExoticComponent<({ visible, onClose, title, description, confirmLabel, cancelLabel, onConfirm, onCancel, destructive, hideCancel, dismissible, cardStyle, testID, }: import("./types").AlertDialogProps) => import("react/jsx-runtime").JSX.Element>;
|
|
2
|
+
export declare const AlertDialogHost: {
|
|
3
|
+
(): import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export { confirm } from './confirm-store';
|
|
7
|
+
export type { AlertDialogProps, AlertDialogActionStyle, ConfirmOptions, } from './types';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/alert-dialog/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,0QAAoC,CAAC;AAC7D,eAAO,MAAM,eAAe;;;CAAqC,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,GACf,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const AlertDialog: import("react").MemoExoticComponent<({ visible, onClose, title, description, confirmLabel, cancelLabel, onConfirm, onCancel, destructive, hideCancel, dismissible, cardStyle, testID, }: import("./types").AlertDialogProps) => import("react/jsx-runtime").JSX.Element>;
|
|
2
|
+
export declare const AlertDialogHost: {
|
|
3
|
+
(): import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export { confirm } from './confirm-store';
|
|
7
|
+
export type { AlertDialogProps, AlertDialogActionStyle, ConfirmOptions, } from './types';
|
|
8
|
+
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/alert-dialog/index.web.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,0QAAoC,CAAC;AAC7D,eAAO,MAAM,eAAe;;;CAAqC,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,GACf,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export type AlertDialogActionStyle = 'default' | 'cancel' | 'destructive';
|
|
3
|
+
export interface AlertDialogProps {
|
|
4
|
+
/** Whether the dialog is mounted + visible (controlled). */
|
|
5
|
+
visible: boolean;
|
|
6
|
+
/** Close request — backdrop tap, Escape, cancel, or after confirm. */
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
/** Headline. */
|
|
9
|
+
title: string;
|
|
10
|
+
/** Supporting copy. */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Confirm button label. Defaults to `'Confirm'`. */
|
|
13
|
+
confirmLabel?: string;
|
|
14
|
+
/** Cancel button label. Defaults to `'Cancel'`. */
|
|
15
|
+
cancelLabel?: string;
|
|
16
|
+
/** Confirm handler. The dialog closes after it runs (sync). */
|
|
17
|
+
onConfirm?: () => void;
|
|
18
|
+
/** Cancel handler. Runs in addition to `onClose`. */
|
|
19
|
+
onCancel?: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Style the confirm button as destructive (negative color). Defaults to
|
|
22
|
+
* `false`.
|
|
23
|
+
*/
|
|
24
|
+
destructive?: boolean;
|
|
25
|
+
/** Render only the confirm button (no cancel). Defaults to `false`. */
|
|
26
|
+
hideCancel?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Tap-outside / Escape dismisses. Defaults to `false` — alert dialogs are
|
|
29
|
+
* usually blocking until answered.
|
|
30
|
+
*/
|
|
31
|
+
dismissible?: boolean;
|
|
32
|
+
cardStyle?: StyleProp<ViewStyle>;
|
|
33
|
+
testID?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ConfirmOptions {
|
|
36
|
+
title: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
confirmLabel?: string;
|
|
39
|
+
cancelLabel?: string;
|
|
40
|
+
destructive?: boolean;
|
|
41
|
+
hideCancel?: boolean;
|
|
42
|
+
dismissible?: boolean;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/alert-dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE1E,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,OAAO,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uEAAuE;IACvE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PopoverContentProps, PopoverRootProps, PopoverTriggerProps } from '../popover/types';
|
|
3
|
+
import type { usePopoverContext as usePopoverContextType } from '../popover/context';
|
|
4
|
+
import type { ComboboxProps } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Structural shape of the `Popover` module, satisfied by both the native and
|
|
7
|
+
* web platform forks. Defined explicitly (rather than `typeof import(...)`) so
|
|
8
|
+
* the slightly different render-return types between forks (web `Content` may
|
|
9
|
+
* return `null`) don't make the modules mutually unassignable.
|
|
10
|
+
*/
|
|
11
|
+
interface PopoverModule {
|
|
12
|
+
Root: (props: PopoverRootProps) => React.ReactElement;
|
|
13
|
+
Trigger: (props: PopoverTriggerProps) => React.ReactElement;
|
|
14
|
+
Content: (props: PopoverContentProps) => React.ReactElement | null;
|
|
15
|
+
usePopoverContext: typeof usePopoverContextType;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Build the `Combobox` bound to a platform `Popover` module. The platform
|
|
19
|
+
* entry files (`index.ts` / `index.web.ts`) inject the correct one (native
|
|
20
|
+
* bottom sheet vs web anchored panel) — this repo never relies on implicit
|
|
21
|
+
* `.web` resolution. The combobox logic is single-source.
|
|
22
|
+
*
|
|
23
|
+
* `Combobox` is a filterable autocomplete select that delegates its overlay to
|
|
24
|
+
* Bloom's `Popover` and composes `SearchInput` + `Item`. The trigger + panel
|
|
25
|
+
* read the overlay control from `Popover` context (via an inner component) so
|
|
26
|
+
* selecting an option reliably closes the overlay on every platform.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createCombobox(Popover: PopoverModule): {
|
|
29
|
+
<T = string>({ options, value, onValueChange, placeholder, label, emptyText, filter, query, onQueryChange, disabled, maxListHeight, style, testID, }: ComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=Combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/combobox/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAoB5D,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7D;;;;;GAKG;AACH,UAAU,aAAa;IACrB,IAAI,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,CAAC,YAAY,CAAC;IACtD,OAAO,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,YAAY,CAAC;IAC5D,OAAO,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IACnE,iBAAiB,EAAE,OAAO,qBAAqB,CAAC;CACjD;AAWD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa;KA8IjC,CAAC,oJAchB,aAAa,CAAC,CAAC,CAAC;;EAwBpB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Combobox: {
|
|
2
|
+
<T = string>({ options, value, onValueChange, placeholder, label, emptyText, filter, query, onQueryChange, disabled, maxListHeight, style, testID, }: import("./types").ComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
};
|
|
5
|
+
export type { ComboboxProps, ComboboxOption } from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/combobox/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;CAA0B,CAAC;AAEhD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Combobox: {
|
|
2
|
+
<T = string>({ options, value, onValueChange, placeholder, label, emptyText, filter, query, onQueryChange, disabled, maxListHeight, style, testID, }: import("./types").ComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
};
|
|
5
|
+
export type { ComboboxProps, ComboboxOption } from './types';
|
|
6
|
+
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/combobox/index.web.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;CAA0B,CAAC;AAEhD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export interface ComboboxOption<T = string> {
|
|
3
|
+
/** Stable value used for selection + comparison. */
|
|
4
|
+
value: T;
|
|
5
|
+
/** Display label. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Optional secondary text shown beneath the label. */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Disable selecting this option. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ComboboxProps<T = string> {
|
|
13
|
+
/** All selectable options. */
|
|
14
|
+
options: ComboboxOption<T>[];
|
|
15
|
+
/** Currently selected value (controlled). `null` = nothing selected. */
|
|
16
|
+
value: T | null;
|
|
17
|
+
/** Fired when the user picks an option. */
|
|
18
|
+
onValueChange: (value: T) => void;
|
|
19
|
+
/** Placeholder shown in the input when nothing is selected. */
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
/** Accessible label for the input. Defaults to `placeholder` or `'Search'`. */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** Text shown when the filtered list is empty. Defaults to `'No results'`. */
|
|
24
|
+
emptyText?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Custom filter predicate. Defaults to a case-insensitive substring match
|
|
27
|
+
* against `label` and `description`.
|
|
28
|
+
*/
|
|
29
|
+
filter?: (option: ComboboxOption<T>, query: string) => boolean;
|
|
30
|
+
/** Controlled query text. When omitted the combobox owns the query. */
|
|
31
|
+
query?: string;
|
|
32
|
+
/** Notified on query changes (works controlled or uncontrolled). */
|
|
33
|
+
onQueryChange?: (query: string) => void;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** Max height of the option list in px. Defaults to `280`. */
|
|
36
|
+
maxListHeight?: number;
|
|
37
|
+
style?: StyleProp<ViewStyle>;
|
|
38
|
+
testID?: string;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/combobox/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,MAAM;IACxC,oDAAoD;IACpD,KAAK,EAAE,CAAC,CAAC;IACT,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,MAAM;IACvC,8BAA8B;IAC9B,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,wEAAwE;IACxE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAChB,2CAA2C;IAC3C,aAAa,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAClC,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/D,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CenteredDialogProps } from '../dialog';
|
|
3
|
+
import type { CommandProps } from './types';
|
|
4
|
+
type CenteredDialogComponent = React.ComponentType<CenteredDialogProps>;
|
|
5
|
+
/**
|
|
6
|
+
* Build the `Command` palette bound to a platform `CenteredDialog`. The
|
|
7
|
+
* platform entry files (`index.ts` / `index.web.ts`) inject the correct one
|
|
8
|
+
* (native RN `Modal` vs pure-DOM web overlay) — this repo never relies on
|
|
9
|
+
* implicit `.web` resolution. The body is single-source.
|
|
10
|
+
*
|
|
11
|
+
* `Command` is a ⌘K command palette built on Bloom's `CenteredDialog`,
|
|
12
|
+
* `SearchInput`, an `Item` results list and `Kbd` shortcut hints. Items group
|
|
13
|
+
* by their `group` field (ungrouped first). On web the list is
|
|
14
|
+
* keyboard-navigable (Up/Down/Enter); on native, tap to select.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createCommand(CenteredDialog: CenteredDialogComponent): {
|
|
17
|
+
({ visible, onClose, items, placeholder, emptyText, query: queryProp, onQueryChange, filter, maxListHeight, style, testID, }: CommandProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
export type CommandType = ReturnType<typeof createCommand>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=Command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["../../../../src/command/Command.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAgBtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,SAAS,CAAC;AAEzD,KAAK,uBAAuB,GAAG,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;AAkBxE;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,cAAc,EAAE,uBAAuB;kIAahE,YAAY;;EAyLhB;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Command: {
|
|
2
|
+
({ visible, onClose, items, placeholder, emptyText, query: queryProp, onQueryChange, filter, maxListHeight, style, testID, }: import("./types").CommandProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
};
|
|
5
|
+
export type { CommandProps, CommandItem } from './types';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/command/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;;;CAAgC,CAAC;AAErD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Command: {
|
|
2
|
+
({ visible, onClose, items, placeholder, emptyText, query: queryProp, onQueryChange, filter, maxListHeight, style, testID, }: import("./types").CommandProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
};
|
|
5
|
+
export type { CommandProps, CommandItem } from './types';
|
|
6
|
+
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/command/index.web.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;;;CAAgC,CAAC;AAErD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import type { Props as IconProps } from '../icons/common';
|
|
3
|
+
export interface CommandItem {
|
|
4
|
+
/** Stable id. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Primary label. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Secondary text shown beneath the label. */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Optional leading icon component (a Bloom icon). */
|
|
11
|
+
icon?: React.ComponentType<IconProps>;
|
|
12
|
+
/** Optional keywords that also match the query (not displayed). */
|
|
13
|
+
keywords?: string[];
|
|
14
|
+
/** Trailing shortcut hint (e.g. `'⌘K'`) — rendered as `Kbd`. */
|
|
15
|
+
shortcut?: string;
|
|
16
|
+
/** Group label this item belongs to. */
|
|
17
|
+
group?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Invoked on select. The palette closes afterward. */
|
|
20
|
+
onSelect: () => void;
|
|
21
|
+
}
|
|
22
|
+
export interface CommandProps {
|
|
23
|
+
/** Whether the palette is open (controlled). */
|
|
24
|
+
visible: boolean;
|
|
25
|
+
/** Close request (Escape, backdrop, after a selection). */
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
/** Command items. */
|
|
28
|
+
items: CommandItem[];
|
|
29
|
+
/** Input placeholder. Defaults to `'Type a command or search…'`. */
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
/** Shown when no items match. Defaults to `'No results found.'`. */
|
|
32
|
+
emptyText?: string;
|
|
33
|
+
/** Controlled query. When omitted the palette owns the query. */
|
|
34
|
+
query?: string;
|
|
35
|
+
onQueryChange?: (query: string) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Custom filter. Defaults to a case-insensitive substring match against
|
|
38
|
+
* `label`, `description` and `keywords`.
|
|
39
|
+
*/
|
|
40
|
+
filter?: (item: CommandItem, query: string) => boolean;
|
|
41
|
+
/** Max height of the results list in px. Defaults to `360`. */
|
|
42
|
+
maxListHeight?: number;
|
|
43
|
+
style?: StyleProp<ViewStyle>;
|
|
44
|
+
testID?: string;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/command/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE1D,MAAM,WAAW,WAAW;IAC1B,iBAAiB;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACtC,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,gDAAgD;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qBAAqB;IACrB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACvD,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldProps } from './types';
|
|
3
|
+
export declare const Field: React.MemoExoticComponent<({ children, label, description, error, required, disabled, nativeID, style, testID, }: FieldProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
+
//# sourceMappingURL=Field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../src/field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAQpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAmE1C,eAAO,MAAM,KAAK,oHAhDf,UAAU,6CAgD4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export interface FieldProps {
|
|
3
|
+
/** The input/control this field wraps. */
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** Field label, rendered above the control via Bloom's `Label`. */
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
/** Helper/description text rendered below the control. */
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Error message. When a non-empty string is provided the field renders in
|
|
11
|
+
* its invalid state (error-colored message, replaces the description).
|
|
12
|
+
*/
|
|
13
|
+
error?: string | null;
|
|
14
|
+
/** Mark the field's label with a required asterisk. */
|
|
15
|
+
required?: boolean;
|
|
16
|
+
/** Disabled styling for the label/description. */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* `nativeID` wired to the label's `htmlFor` (web) so a label click focuses
|
|
20
|
+
* the control. Set the same id on the child control's `nativeID`.
|
|
21
|
+
*/
|
|
22
|
+
nativeID?: string;
|
|
23
|
+
style?: StyleProp<ViewStyle>;
|
|
24
|
+
testID?: string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/field/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,mEAAmE;IACnE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|