@ankhorage/surface 3.4.6 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -6
  3. package/dist/examples/DocsExamples.d.ts.map +1 -1
  4. package/dist/examples/DocsExamples.js +0 -6
  5. package/dist/examples/DocsExamples.js.map +1 -1
  6. package/dist/features/bottom-sheet/BottomSheetContext.d.ts +4 -0
  7. package/dist/features/bottom-sheet/BottomSheetContext.d.ts.map +1 -0
  8. package/dist/features/bottom-sheet/BottomSheetContext.js +3 -0
  9. package/dist/features/bottom-sheet/BottomSheetContext.js.map +1 -0
  10. package/dist/features/bottom-sheet/BottomSheetProvider.d.ts +6 -0
  11. package/dist/features/bottom-sheet/BottomSheetProvider.d.ts.map +1 -0
  12. package/dist/features/bottom-sheet/BottomSheetProvider.js +61 -0
  13. package/dist/features/bottom-sheet/BottomSheetProvider.js.map +1 -0
  14. package/dist/features/bottom-sheet/public.d.ts +4 -0
  15. package/dist/features/bottom-sheet/public.d.ts.map +1 -0
  16. package/dist/features/bottom-sheet/public.js +3 -0
  17. package/dist/features/bottom-sheet/public.js.map +1 -0
  18. package/dist/features/bottom-sheet/useBottomSheet.d.ts +4 -0
  19. package/dist/features/bottom-sheet/useBottomSheet.d.ts.map +1 -0
  20. package/dist/features/bottom-sheet/useBottomSheet.js +11 -0
  21. package/dist/features/bottom-sheet/useBottomSheet.js.map +1 -0
  22. package/dist/index.d.ts +0 -6
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +0 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/types/bottomSheet.d.ts +18 -0
  27. package/dist/types/bottomSheet.d.ts.map +1 -0
  28. package/dist/types/bottomSheet.js +2 -0
  29. package/dist/types/bottomSheet.js.map +1 -0
  30. package/package.json +17 -3
  31. package/src/examples/DocsExamples.tsx +0 -6
  32. package/src/features/bottom-sheet/BottomSheetContext.ts +5 -0
  33. package/src/features/bottom-sheet/BottomSheetProvider.tsx +129 -0
  34. package/src/features/bottom-sheet/public.ts +3 -0
  35. package/src/features/bottom-sheet/useBottomSheet.test.tsx +18 -0
  36. package/src/features/bottom-sheet/useBottomSheet.ts +15 -0
  37. package/src/index.test.ts +40 -12
  38. package/src/index.ts +0 -22
  39. package/src/types/bottomSheet.ts +19 -0
  40. package/dist/components/action-sheet/ActionSheet.d.ts +0 -4
  41. package/dist/components/action-sheet/ActionSheet.d.ts.map +0 -1
  42. package/dist/components/action-sheet/ActionSheet.js +0 -77
  43. package/dist/components/action-sheet/ActionSheet.js.map +0 -1
  44. package/dist/components/action-sheet/ActionSheetItem.d.ts +0 -4
  45. package/dist/components/action-sheet/ActionSheetItem.d.ts.map +0 -1
  46. package/dist/components/action-sheet/ActionSheetItem.js +0 -27
  47. package/dist/components/action-sheet/ActionSheetItem.js.map +0 -1
  48. package/dist/components/action-sheet/index.d.ts +0 -4
  49. package/dist/components/action-sheet/index.d.ts.map +0 -1
  50. package/dist/components/action-sheet/index.js +0 -3
  51. package/dist/components/action-sheet/index.js.map +0 -1
  52. package/dist/components/action-sheet/types.d.ts +0 -27
  53. package/dist/components/action-sheet/types.d.ts.map +0 -1
  54. package/dist/components/action-sheet/types.js +0 -2
  55. package/dist/components/action-sheet/types.js.map +0 -1
  56. package/dist/components/drawer/Drawer.d.ts +0 -4
  57. package/dist/components/drawer/Drawer.d.ts.map +0 -1
  58. package/dist/components/drawer/Drawer.js +0 -62
  59. package/dist/components/drawer/Drawer.js.map +0 -1
  60. package/dist/components/drawer/index.d.ts +0 -3
  61. package/dist/components/drawer/index.d.ts.map +0 -1
  62. package/dist/components/drawer/index.js +0 -2
  63. package/dist/components/drawer/index.js.map +0 -1
  64. package/dist/components/drawer/types.d.ts +0 -12
  65. package/dist/components/drawer/types.d.ts.map +0 -1
  66. package/dist/components/drawer/types.js +0 -2
  67. package/dist/components/drawer/types.js.map +0 -1
  68. package/dist/components/navigation/DrawerNavigation.d.ts +0 -4
  69. package/dist/components/navigation/DrawerNavigation.d.ts.map +0 -1
  70. package/dist/components/navigation/DrawerNavigation.js +0 -13
  71. package/dist/components/navigation/DrawerNavigation.js.map +0 -1
  72. package/dist/components/navigation/DrawerNavigationItem.d.ts +0 -4
  73. package/dist/components/navigation/DrawerNavigationItem.d.ts.map +0 -1
  74. package/dist/components/navigation/DrawerNavigationItem.js +0 -9
  75. package/dist/components/navigation/DrawerNavigationItem.js.map +0 -1
  76. package/dist/components/navigation/NavigationItem.d.ts +0 -4
  77. package/dist/components/navigation/NavigationItem.d.ts.map +0 -1
  78. package/dist/components/navigation/NavigationItem.js +0 -41
  79. package/dist/components/navigation/NavigationItem.js.map +0 -1
  80. package/dist/components/navigation/NavigationList.d.ts +0 -4
  81. package/dist/components/navigation/NavigationList.d.ts.map +0 -1
  82. package/dist/components/navigation/NavigationList.js +0 -9
  83. package/dist/components/navigation/NavigationList.js.map +0 -1
  84. package/dist/components/navigation/TabBar.d.ts +0 -4
  85. package/dist/components/navigation/TabBar.d.ts.map +0 -1
  86. package/dist/components/navigation/TabBar.js +0 -15
  87. package/dist/components/navigation/TabBar.js.map +0 -1
  88. package/dist/components/navigation/TabBarItem.d.ts +0 -4
  89. package/dist/components/navigation/TabBarItem.d.ts.map +0 -1
  90. package/dist/components/navigation/TabBarItem.js +0 -44
  91. package/dist/components/navigation/TabBarItem.js.map +0 -1
  92. package/dist/components/navigation/helpers.d.ts +0 -15
  93. package/dist/components/navigation/helpers.d.ts.map +0 -1
  94. package/dist/components/navigation/helpers.js +0 -48
  95. package/dist/components/navigation/helpers.js.map +0 -1
  96. package/dist/components/navigation/index.d.ts +0 -8
  97. package/dist/components/navigation/index.d.ts.map +0 -1
  98. package/dist/components/navigation/index.js +0 -7
  99. package/dist/components/navigation/index.js.map +0 -1
  100. package/dist/components/navigation/types.d.ts +0 -58
  101. package/dist/components/navigation/types.d.ts.map +0 -1
  102. package/dist/components/navigation/types.js +0 -2
  103. package/dist/components/navigation/types.js.map +0 -1
  104. package/src/components/action-sheet/ActionSheet.tsx +0 -130
  105. package/src/components/action-sheet/ActionSheetItem.tsx +0 -59
  106. package/src/components/action-sheet/index.ts +0 -3
  107. package/src/components/action-sheet/types.ts +0 -29
  108. package/src/components/drawer/Drawer.tsx +0 -100
  109. package/src/components/drawer/index.ts +0 -2
  110. package/src/components/drawer/types.ts +0 -13
  111. package/src/components/navigation/DrawerNavigation.tsx +0 -32
  112. package/src/components/navigation/DrawerNavigationItem.tsx +0 -23
  113. package/src/components/navigation/NavigationItem.tsx +0 -79
  114. package/src/components/navigation/NavigationList.tsx +0 -31
  115. package/src/components/navigation/TabBar.tsx +0 -31
  116. package/src/components/navigation/TabBarItem.tsx +0 -79
  117. package/src/components/navigation/helpers.test.ts +0 -74
  118. package/src/components/navigation/helpers.ts +0 -81
  119. package/src/components/navigation/index.ts +0 -16
  120. package/src/components/navigation/policy.test.ts +0 -140
  121. package/src/components/navigation/types.ts +0 -66
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @ankhorage/surface
2
2
 
3
+ ## 4.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6476bf4: Add the provider-backed BottomSheetModal controller with `BottomSheetProvider` and
8
+ `useBottomSheet()` through the dedicated `@ankhorage/surface/bottom-sheet` entrypoint.
9
+
10
+ ## 4.0.0
11
+
12
+ ### Major Changes
13
+
14
+ - ae190ea: Remove obsolete ActionSheet, Drawer, and navigation-chrome APIs now owned by canonical composition and @ankhorage/navigator.
15
+
3
16
  ## 3.4.6
4
17
 
5
18
  ### Patch Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/surface
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v3.4.3](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v4.0.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Cross-platform UI foundation for React Native and React Native Web. Provides theming, layout primitives, and core building blocks for modern apps.
9
9
 
@@ -15,14 +15,12 @@ Cross-platform UI foundation for React Native and React Native Web. Provides the
15
15
  - [Architecture overview](././paradox/diagrams/architecture-overview.mmd)
16
16
  - [Module relationships](././paradox/diagrams/module-relationships.mmd)
17
17
  - [Export graph](././paradox/diagrams/export-graph.mmd)
18
- - [ActionSheet sequence](././paradox/diagrams/sequences/action-sheet.mmd)
19
18
  - [AppBar sequence](././paradox/diagrams/sequences/app-bar.mmd)
20
19
  - [Badge sequence](././paradox/diagrams/sequences/badge.mmd)
21
20
  - [Button sequence](././paradox/diagrams/sequences/button.mmd)
22
21
  - [Card sequence](././paradox/diagrams/sequences/card.mmd)
23
22
  - [Checkbox sequence](././paradox/diagrams/sequences/checkbox.mmd)
24
23
  - [Container sequence](././paradox/diagrams/sequences/container.mmd)
25
- - [Drawer sequence](././paradox/diagrams/sequences/drawer.mmd)
26
24
  - [Field sequence](././paradox/diagrams/sequences/field.mmd)
27
25
  - [FontProvider sequence](././paradox/diagrams/sequences/font-provider.mmd)
28
26
  - [Grid sequence](././paradox/diagrams/sequences/grid.mmd)
@@ -32,7 +30,6 @@ Cross-platform UI foundation for React Native and React Native Web. Provides the
32
30
  - [ListItem sequence](././paradox/diagrams/sequences/list-item.mmd)
33
31
  - [Menu sequence](././paradox/diagrams/sequences/menu.mmd)
34
32
  - [Modal sequence](././paradox/diagrams/sequences/modal.mmd)
35
- - [NavigationItem sequence](././paradox/diagrams/sequences/navigation-item.mmd)
36
33
  - [Radio sequence](././paradox/diagrams/sequences/radio.mmd)
37
34
  - [resolveResponsive sequence](././paradox/diagrams/sequences/resolve-responsive.mmd)
38
35
  - [ResponsiveProvider sequence](././paradox/diagrams/sequences/responsive-provider.mmd)
@@ -40,8 +37,6 @@ Cross-platform UI foundation for React Native and React Native Web. Provides the
40
37
  - [Stack sequence](././paradox/diagrams/sequences/stack.mmd)
41
38
  - [Surface sequence](././paradox/diagrams/sequences/surface.mmd)
42
39
  - [Switch sequence](././paradox/diagrams/sequences/switch.mmd)
43
- - [TabBar sequence](././paradox/diagrams/sequences/tab-bar.mmd)
44
- - [TabBarItem sequence](././paradox/diagrams/sequences/tab-bar-item.mmd)
45
40
  - [TabList sequence](././paradox/diagrams/sequences/tab-list.mmd)
46
41
  - [TabPanel sequence](././paradox/diagrams/sequences/tab-panel.mmd)
47
42
  - [Tabs sequence](././paradox/diagrams/sequences/tabs.mmd)
@@ -1 +1 @@
1
- {"version":3,"file":"DocsExamples.d.ts","sourceRoot":"","sources":["../../src/examples/DocsExamples.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA0B1B,wBAAgB,WAAW,sBAY1B;AAeD,wBAAgB,eAAe,sBAa9B;AAED,wBAAgB,cAAc,sBAyB7B;AAED,wBAAgB,iBAAiB,sBAgChC"}
1
+ {"version":3,"file":"DocsExamples.d.ts","sourceRoot":"","sources":["../../src/examples/DocsExamples.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAyB1B,wBAAgB,WAAW,sBAY1B;AAeD,wBAAgB,eAAe,sBAa9B;AAED,wBAAgB,cAAc,sBAoB7B;AAED,wBAAgB,iBAAiB,sBAgChC"}
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { Button } from '../components/button';
3
3
  import { Card } from '../components/card';
4
4
  import { Checkbox } from '../components/checkbox';
5
- import { Drawer } from '../components/drawer';
6
5
  import { Field } from '../components/field';
7
6
  import { HelperText } from '../components/helper-text';
8
7
  import { Menu } from '../components/menu';
@@ -51,11 +50,9 @@ export function FeedbackExample() {
51
50
  }
52
51
  export function OverlayExample() {
53
52
  const [modalVisible, setModalVisible] = React.useState(false);
54
- const [drawerVisible, setDrawerVisible] = React.useState(false);
55
53
  return (<ThemeProvider initialConfig={docsThemeConfig}>
56
54
  <Stack gap="m" p="l">
57
55
  <Button onPress={() => setModalVisible(true)}>Open modal</Button>
58
- <Button onPress={() => setDrawerVisible(true)}>Open drawer</Button>
59
56
  <Modal onDismiss={() => setModalVisible(false)} visible={modalVisible}>
60
57
  <Card>
61
58
  <Stack gap="s">
@@ -66,9 +63,6 @@ export function OverlayExample() {
66
63
  </Stack>
67
64
  </Card>
68
65
  </Modal>
69
- <Drawer onDismiss={() => setDrawerVisible(false)} visible={drawerVisible}>
70
- <Text>Drawer content</Text>
71
- </Drawer>
72
66
  </Stack>
73
67
  </ThemeProvider>);
74
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DocsExamples.js","sourceRoot":"","sources":["../../src/examples/DocsExamples.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,OAAO,EAA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Q,CAAC,KAAK,CAAC,SAAS,CACvB;YAAA,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAC9B;UAAA,EAAE,QAAQ,CACV;UAAA,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CACvB;YAAA,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAC9B;UAAA,EAAE,QAAQ,CACZ;QAAA,EAAE,IAAI,CACN;QAAA,CAAC,IAAI,CACH,OAAO,CAAC,CAAC;YACP,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;YAC7B,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;SACpD,CAAC,CACF,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,EAElC;QAAA,CAAC,GAAG,CACF;UAAA,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,kCAAkC,EAAE,IAAI,CAChE;QAAA,EAAE,GAAG,CACP;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../components/button';\nimport { Card } from '../components/card';\nimport { Checkbox } from '../components/checkbox';\nimport { Drawer } from '../components/drawer';\nimport { Field } from '../components/field';\nimport { HelperText } from '../components/helper-text';\nimport { Menu } from '../components/menu';\nimport { Modal } from '../components/modal';\nimport { Tab, TabList, TabPanel, Tabs } from '../components/tabs';\nimport { TextInput } from '../components/text-input';\nimport { ToastProvider, useToast } from '../components/toast';\nimport { Tooltip } from '../components/tooltip';\nimport { Box, Stack } from '../layout';\nimport { Text } from '../primitives/text';\nimport { ThemeProvider } from '../theme';\nimport type { ThemeConfig } from '../theme/types';\n\nconst docsThemeConfig: ThemeConfig = {\n id: 'docs',\n name: 'Docs',\n light: { primaryColor: '#2563EB', harmony: 'analogous' },\n dark: { primaryColor: '#60A5FA', harmony: 'analogous' },\n};\n\nexport function FormExample() {\n return (\n <ThemeProvider initialConfig={docsThemeConfig}>\n <Stack gap=\"m\" p=\"l\">\n <Field helperText=\"Use your work email.\" label=\"Email\" required>\n <TextInput placeholder=\"you@example.com\" />\n </Field>\n <Checkbox checked>Accept terms</Checkbox>\n <HelperText emphasis=\"muted\">Looks good.</HelperText>\n </Stack>\n </ThemeProvider>\n );\n}\n\nfunction ToastButton() {\n const { showToast } = useToast();\n return (\n <Button\n onPress={() =>\n showToast({ description: 'Your changes were saved.', status: 'success', title: 'Saved' })\n }\n >\n Show toast\n </Button>\n );\n}\n\nexport function FeedbackExample() {\n return (\n <ThemeProvider initialConfig={docsThemeConfig}>\n <ToastProvider>\n <Stack gap=\"m\" p=\"l\">\n <Tooltip content=\"Helpful contextual information\">\n <Text>Hover for tooltip</Text>\n </Tooltip>\n <ToastButton />\n </Stack>\n </ToastProvider>\n </ThemeProvider>\n );\n}\n\nexport function OverlayExample() {\n const [modalVisible, setModalVisible] = React.useState(false);\n const [drawerVisible, setDrawerVisible] = React.useState(false);\n\n return (\n <ThemeProvider initialConfig={docsThemeConfig}>\n <Stack gap=\"m\" p=\"l\">\n <Button onPress={() => setModalVisible(true)}>Open modal</Button>\n <Button onPress={() => setDrawerVisible(true)}>Open drawer</Button>\n <Modal onDismiss={() => setModalVisible(false)} visible={modalVisible}>\n <Card>\n <Stack gap=\"s\">\n <Text variant=\"label\" weight=\"semiBold\">\n Modal title\n </Text>\n <Text>Modal content</Text>\n </Stack>\n </Card>\n </Modal>\n <Drawer onDismiss={() => setDrawerVisible(false)} visible={drawerVisible}>\n <Text>Drawer content</Text>\n </Drawer>\n </Stack>\n </ThemeProvider>\n );\n}\n\nexport function NavigationExample() {\n return (\n <ThemeProvider initialConfig={docsThemeConfig}>\n <Stack gap=\"m\" p=\"l\">\n <Tabs defaultValue=\"account\">\n <TabList>\n <Tab value=\"account\">Account</Tab>\n <Tab disabled value=\"security\">\n Security\n </Tab>\n <Tab value=\"billing\">Billing</Tab>\n </TabList>\n <TabPanel value=\"account\">\n <Text>Account settings</Text>\n </TabPanel>\n <TabPanel value=\"billing\">\n <Text>Billing settings</Text>\n </TabPanel>\n </Tabs>\n <Menu\n actions={[\n { id: 'edit', title: 'Edit' },\n { disabled: true, id: 'archive', title: 'Archive' },\n ]}\n trigger={<Text>Open menu</Text>}\n />\n <Box>\n <Text color=\"success\">Theme overrides can stay semantic.</Text>\n </Box>\n </Stack>\n </ThemeProvider>\n );\n}\n"]}
1
+ {"version":3,"file":"DocsExamples.js","sourceRoot":"","sources":["../../src/examples/DocsExamples.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,eAAe,GAAgB;I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AAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAClB;QAAA,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAC1B;UAAA,CAAC,OAAO,CACN;YAAA,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,CACjC;YAAA,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAC5B;;YACF,EAAE,GAAG,CACL;YAAA,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,CACnC;UAAA,EAAE,OAAO,CACT;UAAA,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CACvB;YAAA,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAC9B;UAAA,EAAE,QAAQ,CACV;UAAA,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CACvB;YAAA,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAC9B;UAAA,EAAE,QAAQ,CACZ;QAAA,EAAE,IAAI,CACN;QAAA,CAAC,IAAI,CACH,OAAO,CAAC,CAAC;YACP,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;YAC7B,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;SACpD,CAAC,CACF,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,EAElC;QAAA,CAAC,GAAG,CACF;UAAA,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,kCAAkC,EAAE,IAAI,CAChE;QAAA,EAAE,GAAG,CACP;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,aAAa,CAAC,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../components/button';\nimport { Card } from '../components/card';\nimport { Checkbox } from '../components/checkbox';\nimport { Field } from '../components/field';\nimport { HelperText } from '../components/helper-text';\nimport { Menu } from '../components/menu';\nimport { Modal } from '../components/modal';\nimport { Tab, TabList, TabPanel, Tabs } from '../components/tabs';\nimport { TextInput } from '../components/text-input';\nimport { ToastProvider, useToast } from '../components/toast';\nimport { Tooltip } from '../components/tooltip';\nimport { Box, Stack } from '../layout';\nimport { Text } from '../primitives/text';\nimport { ThemeProvider } from '../theme';\nimport type { ThemeConfig } from '../theme/types';\n\nconst docsThemeConfig: ThemeConfig = {\n id: 'docs',\n name: 'Docs',\n light: { primaryColor: '#2563EB', harmony: 'analogous' },\n dark: { primaryColor: '#60A5FA', harmony: 'analogous' },\n};\n\nexport function FormExample() {\n return (\n <ThemeProvider initialConfig={docsThemeConfig}>\n <Stack gap=\"m\" p=\"l\">\n <Field helperText=\"Use your work email.\" label=\"Email\" required>\n <TextInput placeholder=\"you@example.com\" />\n </Field>\n <Checkbox checked>Accept terms</Checkbox>\n <HelperText emphasis=\"muted\">Looks good.</HelperText>\n </Stack>\n </ThemeProvider>\n );\n}\n\nfunction ToastButton() {\n const { showToast } = useToast();\n return (\n <Button\n onPress={() =>\n showToast({ description: 'Your changes were saved.', status: 'success', title: 'Saved' })\n }\n >\n Show toast\n </Button>\n );\n}\n\nexport function FeedbackExample() {\n return (\n <ThemeProvider initialConfig={docsThemeConfig}>\n <ToastProvider>\n <Stack gap=\"m\" p=\"l\">\n <Tooltip content=\"Helpful contextual information\">\n <Text>Hover for tooltip</Text>\n </Tooltip>\n <ToastButton />\n </Stack>\n </ToastProvider>\n </ThemeProvider>\n );\n}\n\nexport function OverlayExample() {\n const [modalVisible, setModalVisible] = React.useState(false);\n\n return (\n <ThemeProvider initialConfig={docsThemeConfig}>\n <Stack gap=\"m\" p=\"l\">\n <Button onPress={() => setModalVisible(true)}>Open modal</Button>\n <Modal onDismiss={() => setModalVisible(false)} visible={modalVisible}>\n <Card>\n <Stack gap=\"s\">\n <Text variant=\"label\" weight=\"semiBold\">\n Modal title\n </Text>\n <Text>Modal content</Text>\n </Stack>\n </Card>\n </Modal>\n </Stack>\n </ThemeProvider>\n );\n}\n\nexport function NavigationExample() {\n return (\n <ThemeProvider initialConfig={docsThemeConfig}>\n <Stack gap=\"m\" p=\"l\">\n <Tabs defaultValue=\"account\">\n <TabList>\n <Tab value=\"account\">Account</Tab>\n <Tab disabled value=\"security\">\n Security\n </Tab>\n <Tab value=\"billing\">Billing</Tab>\n </TabList>\n <TabPanel value=\"account\">\n <Text>Account settings</Text>\n </TabPanel>\n <TabPanel value=\"billing\">\n <Text>Billing settings</Text>\n </TabPanel>\n </Tabs>\n <Menu\n actions={[\n { id: 'edit', title: 'Edit' },\n { disabled: true, id: 'archive', title: 'Archive' },\n ]}\n trigger={<Text>Open menu</Text>}\n />\n <Box>\n <Text color=\"success\">Theme overrides can stay semantic.</Text>\n </Box>\n </Stack>\n </ThemeProvider>\n );\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { BottomSheetController } from '../../types/bottomSheet';
3
+ export declare const BottomSheetContext: React.Context<BottomSheetController | null>;
4
+ //# sourceMappingURL=BottomSheetContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetContext.d.ts","sourceRoot":"","sources":["../../../src/features/bottom-sheet/BottomSheetContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE,eAAO,MAAM,kBAAkB,6CAA0D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export const BottomSheetContext = React.createContext(null);
3
+ //# sourceMappingURL=BottomSheetContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetContext.js","sourceRoot":"","sources":["../../../src/features/bottom-sheet/BottomSheetContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAA+B,IAAI,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport type { BottomSheetController } from '../../types/bottomSheet';\n\nexport const BottomSheetContext = React.createContext<BottomSheetController | null>(null);\n"]}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ /*** Installs the shared bottom-sheet modal host and controller for descendant consumers. */
3
+ export declare function BottomSheetProvider({ children }: {
4
+ children: React.ReactNode;
5
+ }): React.JSX.Element;
6
+ //# sourceMappingURL=BottomSheetProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetProvider.d.ts","sourceRoot":"","sources":["../../../src/features/bottom-sheet/BottomSheetProvider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,4FAA4F;AAC5F,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAiD9E"}
@@ -0,0 +1,61 @@
1
+ import { BottomSheetBackdrop, BottomSheetModal, BottomSheetModalProvider, BottomSheetView, } from '@gorhom/bottom-sheet';
2
+ import React from 'react';
3
+ import { BottomSheetContext } from './BottomSheetContext';
4
+ /*** Installs the shared bottom-sheet modal host and controller for descendant consumers. */
5
+ export function BottomSheetProvider({ children }) {
6
+ const modalRef = React.useRef(null);
7
+ const activeRequestRef = React.useRef(null);
8
+ const presentedRef = React.useRef(false);
9
+ const [activeRequest, setActiveRequest] = React.useState(null);
10
+ const present = React.useCallback((options) => {
11
+ activeRequestRef.current = options;
12
+ setActiveRequest(options);
13
+ }, []);
14
+ const dismiss = React.useCallback(() => {
15
+ if (presentedRef.current) {
16
+ modalRef.current?.dismiss();
17
+ return;
18
+ }
19
+ const request = activeRequestRef.current;
20
+ activeRequestRef.current = null;
21
+ setActiveRequest(null);
22
+ request?.onDismiss?.();
23
+ }, []);
24
+ const handleDismiss = React.useCallback(() => {
25
+ const request = activeRequestRef.current;
26
+ presentedRef.current = false;
27
+ activeRequestRef.current = null;
28
+ setActiveRequest(null);
29
+ request?.onDismiss?.();
30
+ }, []);
31
+ const controller = React.useMemo(() => ({ dismiss, present }), [dismiss, present]);
32
+ return (<BottomSheetContext.Provider value={controller}>
33
+ <BottomSheetModalProvider>
34
+ {children}
35
+ <BottomSheetHost activeRequest={activeRequest} handleDismiss={handleDismiss} modalRef={modalRef} presentedRef={presentedRef}/>
36
+ </BottomSheetModalProvider>
37
+ </BottomSheetContext.Provider>);
38
+ }
39
+ /*** Renders and presents the single Gorhom modal owned by the provider. */
40
+ function BottomSheetHost({ activeRequest, handleDismiss, modalRef, presentedRef, }) {
41
+ React.useEffect(() => {
42
+ if (!activeRequest || presentedRef.current) {
43
+ return;
44
+ }
45
+ presentedRef.current = true;
46
+ modalRef.current?.present();
47
+ }, [activeRequest, modalRef, presentedRef]);
48
+ const renderBackdrop = useBottomSheetBackdrop(activeRequest?.dismissOnBackdropPress);
49
+ const snapPoints = React.useMemo(() => (activeRequest?.snapPoints ? [...activeRequest.snapPoints] : undefined), [activeRequest?.snapPoints]);
50
+ if (!activeRequest) {
51
+ return null;
52
+ }
53
+ return (<BottomSheetModal ref={modalRef} backdropComponent={renderBackdrop} enableDynamicSizing={activeRequest.enableDynamicSizing ?? true} enablePanDownToClose={activeRequest.enablePanDownToClose ?? true} index={activeRequest.initialIndex ?? 0} keyboardBehavior={activeRequest.keyboardBehavior ?? 'interactive'} keyboardBlurBehavior={activeRequest.keyboardBlurBehavior ?? 'restore'} onChange={activeRequest.onIndexChange} onDismiss={handleDismiss} snapPoints={snapPoints}>
54
+ <BottomSheetView>{activeRequest.content}</BottomSheetView>
55
+ </BottomSheetModal>);
56
+ }
57
+ /*** Creates the backdrop renderer for the active bottom-sheet request. */
58
+ function useBottomSheetBackdrop(dismissOnBackdropPress) {
59
+ return React.useCallback((props) => (<BottomSheetBackdrop {...props} appearsOnIndex={0} disappearsOnIndex={-1} pressBehavior={dismissOnBackdropPress === false ? 'none' : 'close'}/>), [dismissOnBackdropPress]);
60
+ }
61
+ //# sourceMappingURL=BottomSheetProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetProvider.js","sourceRoot":"","sources":["../../../src/features/bottom-sheet/BottomSheetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEnB,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,4FAA4F;AAC5F,MAAM,UAAU,mBAAmB,CAAC,EAAE,QAAQ,EAAiC;IAC7E,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAmB,IAAI,CAAC,CAAC;IACtD,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAmC,IAAI,CAAC,CAAC;IAC9E,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAmC,IAAI,CAAC,CAAC;IAEjG,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,OAAkC,EAAE,EAAE;QACvE,gBAAgB,CAAC,OAAO,GAAG,OAAO,CAAC;QACnC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACrC,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;YAC5B,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC;QACzC,gBAAgB,CAAC,OAAO,GAAG,IAAI,CAAC;QAChC,gBAAgB,CAAC,IAAI,C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CAAC,WAAW,CACtB,CAAC,KAA+B,EAAE,EAAE,CAAC,CACnC,CAAC,mBAAmB,CAClB,IAAI,KAAK,CAAC,CACV,cAAc,CAAC,CAAC,CAAC,CAAC,CAClB,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CACtB,aAAa,CAAC,CAAC,sBAAsB,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,EACnE,CACH,EACD,CAAC,sBAAsB,CAAC,CACzB,CAAC;AACJ,CAAC","sourcesContent":["import {\n BottomSheetBackdrop,\n type BottomSheetBackdropProps,\n BottomSheetModal,\n BottomSheetModalProvider,\n BottomSheetView,\n} from '@gorhom/bottom-sheet';\nimport React from 'react';\n\nimport type { BottomSheetController, BottomSheetPresentOptions } from '../../types/bottomSheet';\nimport { BottomSheetContext } from './BottomSheetContext';\n\n/*** Installs the shared bottom-sheet modal host and controller for descendant consumers. */\nexport function BottomSheetProvider({ children }: { children: React.ReactNode }) {\n const modalRef = React.useRef<BottomSheetModal>(null);\n const activeRequestRef = React.useRef<BottomSheetPresentOptions | null>(null);\n const presentedRef = React.useRef(false);\n const [activeRequest, setActiveRequest] = React.useState<BottomSheetPresentOptions | null>(null);\n\n const present = React.useCallback((options: BottomSheetPresentOptions) => {\n activeRequestRef.current = options;\n setActiveRequest(options);\n }, []);\n\n const dismiss = React.useCallback(() => {\n if (presentedRef.current) {\n modalRef.current?.dismiss();\n return;\n }\n\n const request = activeRequestRef.current;\n activeRequestRef.current = null;\n setActiveRequest(null);\n request?.onDismiss?.();\n }, []);\n\n const handleDismiss = React.useCallback(() => {\n const request = activeRequestRef.current;\n presentedRef.current = false;\n activeRequestRef.current = null;\n setActiveRequest(null);\n request?.onDismiss?.();\n }, []);\n\n const controller = React.useMemo<BottomSheetController>(\n () => ({ dismiss, present }),\n [dismiss, present],\n );\n\n return (\n <BottomSheetContext.Provider value={controller}>\n <BottomSheetModalProvider>\n {children}\n <BottomSheetHost\n activeRequest={activeRequest}\n handleDismiss={handleDismiss}\n modalRef={modalRef}\n presentedRef={presentedRef}\n />\n </BottomSheetModalProvider>\n </BottomSheetContext.Provider>\n );\n}\n\ninterface BottomSheetHostProps {\n readonly activeRequest: BottomSheetPresentOptions | null;\n readonly handleDismiss: () => void;\n readonly modalRef: React.RefObject<BottomSheetModal | null>;\n readonly presentedRef: React.RefObject<boolean>;\n}\n\n/*** Renders and presents the single Gorhom modal owned by the provider. */\nfunction BottomSheetHost({\n activeRequest,\n handleDismiss,\n modalRef,\n presentedRef,\n}: BottomSheetHostProps) {\n React.useEffect(() => {\n if (!activeRequest || presentedRef.current) {\n return;\n }\n\n presentedRef.current = true;\n modalRef.current?.present();\n }, [activeRequest, modalRef, presentedRef]);\n\n const renderBackdrop = useBottomSheetBackdrop(activeRequest?.dismissOnBackdropPress);\n const snapPoints = React.useMemo(\n () => (activeRequest?.snapPoints ? [...activeRequest.snapPoints] : undefined),\n [activeRequest?.snapPoints],\n );\n\n if (!activeRequest) {\n return null;\n }\n\n return (\n <BottomSheetModal\n ref={modalRef}\n backdropComponent={renderBackdrop}\n enableDynamicSizing={activeRequest.enableDynamicSizing ?? true}\n enablePanDownToClose={activeRequest.enablePanDownToClose ?? true}\n index={activeRequest.initialIndex ?? 0}\n keyboardBehavior={activeRequest.keyboardBehavior ?? 'interactive'}\n keyboardBlurBehavior={activeRequest.keyboardBlurBehavior ?? 'restore'}\n onChange={activeRequest.onIndexChange}\n onDismiss={handleDismiss}\n snapPoints={snapPoints}\n >\n <BottomSheetView>{activeRequest.content}</BottomSheetView>\n </BottomSheetModal>\n );\n}\n\n/*** Creates the backdrop renderer for the active bottom-sheet request. */\nfunction useBottomSheetBackdrop(dismissOnBackdropPress: boolean | undefined) {\n return React.useCallback(\n (props: BottomSheetBackdropProps) => (\n <BottomSheetBackdrop\n {...props}\n appearsOnIndex={0}\n disappearsOnIndex={-1}\n pressBehavior={dismissOnBackdropPress === false ? 'none' : 'close'}\n />\n ),\n [dismissOnBackdropPress],\n );\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export type { BottomSheetController, BottomSheetPresentOptions } from '../../types/bottomSheet';
2
+ export { BottomSheetProvider } from './BottomSheetProvider';
3
+ export { useBottomSheet } from './useBottomSheet';
4
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/bottom-sheet/public.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { BottomSheetProvider } from './BottomSheetProvider';
2
+ export { useBottomSheet } from './useBottomSheet';
3
+ //# sourceMappingURL=public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/bottom-sheet/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export type { BottomSheetController, BottomSheetPresentOptions } from '../../types/bottomSheet';\nexport { BottomSheetProvider } from './BottomSheetProvider';\nexport { useBottomSheet } from './useBottomSheet';\n"]}
@@ -0,0 +1,4 @@
1
+ import type { BottomSheetController } from '../../types/bottomSheet';
2
+ /*** Returns the shared bottom-sheet controller installed by BottomSheetProvider. */
3
+ export declare function useBottomSheet(): BottomSheetController;
4
+ //# sourceMappingURL=useBottomSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBottomSheet.d.ts","sourceRoot":"","sources":["../../../src/features/bottom-sheet/useBottomSheet.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGrE,oFAAoF;AACpF,wBAAgB,cAAc,IAAI,qBAAqB,CAQtD"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { BottomSheetContext } from './BottomSheetContext';
3
+ /*** Returns the shared bottom-sheet controller installed by BottomSheetProvider. */
4
+ export function useBottomSheet() {
5
+ const controller = React.useContext(BottomSheetContext);
6
+ if (!controller) {
7
+ throw new Error('useBottomSheet must be used within BottomSheetProvider.');
8
+ }
9
+ return controller;
10
+ }
11
+ //# sourceMappingURL=useBottomSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBottomSheet.js","sourceRoot":"","sources":["../../../src/features/bottom-sheet/useBottomSheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,oFAAoF;AACpF,MAAM,UAAU,cAAc;IAC5B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAExD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import React from 'react';\n\nimport type { BottomSheetController } from '../../types/bottomSheet';\nimport { BottomSheetContext } from './BottomSheetContext';\n\n/*** Returns the shared bottom-sheet controller installed by BottomSheetProvider. */\nexport function useBottomSheet(): BottomSheetController {\n const controller = React.useContext(BottomSheetContext);\n\n if (!controller) {\n throw new Error('useBottomSheet must be used within BottomSheetProvider.');\n }\n\n return controller;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- export type { ActionSheetItemProps, ActionSheetProps } from './components/action-sheet';
2
- export { ActionSheet, ActionSheetItem } from './components/action-sheet';
3
1
  export type { BadgeProps } from './components/badge';
4
2
  export { Badge } from './components/badge';
5
3
  export type { ButtonIconSpec, ButtonProps } from './components/button';
@@ -8,8 +6,6 @@ export type { CardProps } from './components/card';
8
6
  export { Card } from './components/card';
9
7
  export type { CheckboxProps } from './components/checkbox';
10
8
  export { Checkbox } from './components/checkbox';
11
- export type { DrawerProps } from './components/drawer';
12
- export { Drawer } from './components/drawer';
13
9
  export type { FieldProps } from './components/field';
14
10
  export { Field } from './components/field';
15
11
  export type { HelperTextProps } from './components/helper-text';
@@ -24,8 +20,6 @@ export type { MenuAction, MenuActionIntent, MenuItem, MenuProps } from './compon
24
20
  export { Menu } from './components/menu';
25
21
  export type { ModalProps } from './components/modal';
26
22
  export { Modal } from './components/modal';
27
- export type { DrawerNavigationItemProps, DrawerNavigationProps, NavigationItemIcon, NavigationItemProps, NavigationItemSpec, NavigationListProps, TabBarItemProps, TabBarProps, } from './components/navigation';
28
- export { DrawerNavigation, DrawerNavigationItem, NavigationItem, NavigationList, TabBar, TabBarItem, } from './components/navigation';
29
23
  export type { RadioProps } from './components/radio';
30
24
  export { Radio } from './components/radio';
31
25
  export type { SwitchProps } from './components/switch';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACzE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,QAAQ,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AAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EACV,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -1,9 +1,7 @@
1
- export { ActionSheet, ActionSheetItem } from './components/action-sheet';
2
1
  export { Badge } from './components/badge';
3
2
  export { Button } from './components/button';
4
3
  export { Card } from './components/card';
5
4
  export { Checkbox } from './components/checkbox';
6
- export { Drawer } from './components/drawer';
7
5
  export { Field } from './components/field';
8
6
  export { HelperText } from './components/helper-text';
9
7
  export { IconButton } from './components/icon-button';
@@ -11,7 +9,6 @@ export { Label } from './components/label';
11
9
  export { ListItem } from './components/list-item';
12
10
  export { Menu } from './components/menu';
13
11
  export { Modal } from './components/modal';
14
- export { DrawerNavigation, DrawerNavigationItem, NavigationItem, NavigationList, TabBar, TabBarItem, } from './components/navigation';
15
12
  export { Radio } from './components/radio';
16
13
  export { Switch } from './components/switch';
17
14
  export { Tab, TabList, TabPanel, Tabs } from './components/tabs';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAA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B,CAAC;AAC1F,cAAc,mBAAmB,CAAC;AAElC,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAS/C,OAAO,EAAE,IAAI,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAOzC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export type { ActionSheetItemProps, ActionSheetProps } from './components/action-sheet';\nexport { ActionSheet, ActionSheetItem } from './components/action-sheet';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonIconSpec, ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxProps } from './components/checkbox';\nexport { Checkbox } from './components/checkbox';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type { FieldProps } from './components/field';\nexport { Field } from './components/field';\nexport type { HelperTextProps } from './components/helper-text';\nexport { HelperText } from './components/helper-text';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { LabelProps } from './components/label';\nexport { Label } from './components/label';\nexport type { ListItemProps } from './components/list-item';\nexport { ListItem } from './components/list-item';\nexport type { MenuAction, MenuActionIntent, MenuItem, MenuProps } from './components/menu';\nexport { Menu } from './components/menu';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type {\n DrawerNavigationItemProps,\n DrawerNavigationProps,\n NavigationItemIcon,\n NavigationItemProps,\n NavigationItemSpec,\n NavigationListProps,\n TabBarItemProps,\n TabBarProps,\n} from './components/navigation';\nexport {\n DrawerNavigation,\n DrawerNavigationItem,\n NavigationItem,\n NavigationList,\n TabBar,\n TabBarItem,\n} from './components/navigation';\nexport type { RadioProps } from './components/radio';\nexport { Radio } from './components/radio';\nexport type { SwitchProps } from './components/switch';\nexport { Switch } from './components/switch';\nexport type { TabListProps, TabPanelProps, TabProps, TabsProps } from './components/tabs';\nexport { Tab, TabList, TabPanel, Tabs } from './components/tabs';\nexport type { TextInputProps } from './components/text-input';\nexport { TextInput } from './components/text-input';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToastOptions, ToastProps, ToastStatus } from './components/toast';\nexport { Toast, ToastProvider, useToast } from './components/toast';\nexport type { TooltipProps } from './components/tooltip';\nexport { Tooltip } from './components/tooltip';\nexport type { FontRuntime } from './context/FontContext';\nexport { FontProvider, useFontContext } from './context/FontContext';\nexport type { I18nInstance, TranslationRuntime, Translator } from './context/TranslationContext';\nexport { TranslationProvider, useTranslationContext } from './context/TranslationContext';\nexport * from './core/responsive';\nexport type { InteractionPolicy, InteractionPolicyProps } from './interactionPolicy';\nexport * from './layout';\nexport type { ButtonBaseProps } from './primitives/button-base';\nexport { ButtonBase } from './primitives/button-base';\nexport type { HeadingLevel, HeadingProps } from './primitives/heading';\nexport { Heading } from './primitives/heading';\nexport type {\n FontIconSource,\n IconProps,\n IconProvider,\n IconSource,\n IconVariant,\n SvgIconSource,\n} from './primitives/icon';\nexport { Icon, SUPPORTED_ICON_PROVIDERS } from './primitives/icon';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './primitives/image';\nexport { Image } from './primitives/image';\nexport type { TextProps } from './primitives/text';\nexport { Text } from './primitives/text';\nexport type {\n SurfaceColor,\n SurfaceEmphasis,\n SurfacePaletteColor,\n SurfaceStatusColor,\n} from './surfaceColor';\nexport {\n SURFACE_COLORS,\n SURFACE_EMPHASES,\n SURFACE_PALETTE_COLORS,\n SURFACE_STATUS_COLORS,\n} from './surfaceColor';\nexport * from './theme';\nexport { isDeepEqual } from './utils/deepEqual';\nexport { deepMerge } from './utils/deepMerge';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1F,cAAc,mBAAmB,CAAC;AAElC,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAS/C,OAAO,EAAE,IAAI,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAOzC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonIconSpec, ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxProps } from './components/checkbox';\nexport { Checkbox } from './components/checkbox';\nexport type { FieldProps } from './components/field';\nexport { Field } from './components/field';\nexport type { HelperTextProps } from './components/helper-text';\nexport { HelperText } from './components/helper-text';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { LabelProps } from './components/label';\nexport { Label } from './components/label';\nexport type { ListItemProps } from './components/list-item';\nexport { ListItem } from './components/list-item';\nexport type { MenuAction, MenuActionIntent, MenuItem, MenuProps } from './components/menu';\nexport { Menu } from './components/menu';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type { RadioProps } from './components/radio';\nexport { Radio } from './components/radio';\nexport type { SwitchProps } from './components/switch';\nexport { Switch } from './components/switch';\nexport type { TabListProps, TabPanelProps, TabProps, TabsProps } from './components/tabs';\nexport { Tab, TabList, TabPanel, Tabs } from './components/tabs';\nexport type { TextInputProps } from './components/text-input';\nexport { TextInput } from './components/text-input';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToastOptions, ToastProps, ToastStatus } from './components/toast';\nexport { Toast, ToastProvider, useToast } from './components/toast';\nexport type { TooltipProps } from './components/tooltip';\nexport { Tooltip } from './components/tooltip';\nexport type { FontRuntime } from './context/FontContext';\nexport { FontProvider, useFontContext } from './context/FontContext';\nexport type { I18nInstance, TranslationRuntime, Translator } from './context/TranslationContext';\nexport { TranslationProvider, useTranslationContext } from './context/TranslationContext';\nexport * from './core/responsive';\nexport type { InteractionPolicy, InteractionPolicyProps } from './interactionPolicy';\nexport * from './layout';\nexport type { ButtonBaseProps } from './primitives/button-base';\nexport { ButtonBase } from './primitives/button-base';\nexport type { HeadingLevel, HeadingProps } from './primitives/heading';\nexport { Heading } from './primitives/heading';\nexport type {\n FontIconSource,\n IconProps,\n IconProvider,\n IconSource,\n IconVariant,\n SvgIconSource,\n} from './primitives/icon';\nexport { Icon, SUPPORTED_ICON_PROVIDERS } from './primitives/icon';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './primitives/image';\nexport { Image } from './primitives/image';\nexport type { TextProps } from './primitives/text';\nexport { Text } from './primitives/text';\nexport type {\n SurfaceColor,\n SurfaceEmphasis,\n SurfacePaletteColor,\n SurfaceStatusColor,\n} from './surfaceColor';\nexport {\n SURFACE_COLORS,\n SURFACE_EMPHASES,\n SURFACE_PALETTE_COLORS,\n SURFACE_STATUS_COLORS,\n} from './surfaceColor';\nexport * from './theme';\nexport { isDeepEqual } from './utils/deepEqual';\nexport { deepMerge } from './utils/deepMerge';\n"]}
@@ -0,0 +1,18 @@
1
+ import type React from 'react';
2
+ export interface BottomSheetPresentOptions {
3
+ content: React.ReactNode;
4
+ snapPoints?: readonly (number | string)[];
5
+ initialIndex?: number;
6
+ enableDynamicSizing?: boolean;
7
+ enablePanDownToClose?: boolean;
8
+ dismissOnBackdropPress?: boolean;
9
+ keyboardBehavior?: 'extend' | 'fillParent' | 'interactive';
10
+ keyboardBlurBehavior?: 'none' | 'restore';
11
+ onIndexChange?: (index: number) => void;
12
+ onDismiss?: () => void;
13
+ }
14
+ export interface BottomSheetController {
15
+ present: (options: BottomSheetPresentOptions) => void;
16
+ dismiss: () => void;
17
+ }
18
+ //# sourceMappingURL=bottomSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bottomSheet.d.ts","sourceRoot":"","sources":["../../src/types/bottomSheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,gBAAgB,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,aAAa,CAAC;IAC3D,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACtD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=bottomSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bottomSheet.js","sourceRoot":"","sources":["../../src/types/bottomSheet.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nexport interface BottomSheetPresentOptions {\n content: React.ReactNode;\n snapPoints?: readonly (number | string)[];\n initialIndex?: number;\n enableDynamicSizing?: boolean;\n enablePanDownToClose?: boolean;\n dismissOnBackdropPress?: boolean;\n keyboardBehavior?: 'extend' | 'fillParent' | 'interactive';\n keyboardBlurBehavior?: 'none' | 'restore';\n onIndexChange?: (index: number) => void;\n onDismiss?: () => void;\n}\n\nexport interface BottomSheetController {\n present: (options: BottomSheetPresentOptions) => void;\n dismiss: () => void;\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/surface",
3
3
  "type": "module",
4
- "version": "3.4.6",
4
+ "version": "4.1.0",
5
5
  "description": "Stable UI foundation for React Native and React Native Web.",
6
6
  "homepage": "https://github.com/ankhorage/surface#readme",
7
7
  "bugs": {
@@ -34,13 +34,17 @@
34
34
  "@react-native-vector-icons/material-design-icons": "^13.1.3",
35
35
  "react": "19.2.3",
36
36
  "react-native": "0.86.x",
37
+ "react-native-gesture-handler": "~2.32.0",
38
+ "react-native-reanimated": "4.5.1",
37
39
  "react-native-safe-area-context": "~5.7.0",
38
40
  "react-native-svg": "15.15.4",
39
- "react-native-web": "~0.21.0"
41
+ "react-native-web": "~0.21.0",
42
+ "react-native-worklets": "0.10.1"
40
43
  },
41
44
  "dependencies": {
42
45
  "@ankhorage/color-theory": "^0.3.0",
43
- "@ankhorage/contracts": "^12.0.1"
46
+ "@ankhorage/contracts": "^12.0.1",
47
+ "@gorhom/bottom-sheet": "^5.2.13"
44
48
  },
45
49
  "files": [
46
50
  "dist",
@@ -57,6 +61,13 @@
57
61
  "import": "./dist/index.js",
58
62
  "default": "./dist/index.js"
59
63
  },
64
+ "./bottom-sheet": {
65
+ "react-native": "./src/features/bottom-sheet/public.ts",
66
+ "browser": "./src/features/bottom-sheet/public.ts",
67
+ "types": "./dist/features/bottom-sheet/public.d.ts",
68
+ "import": "./dist/features/bottom-sheet/public.js",
69
+ "default": "./dist/features/bottom-sheet/public.js"
70
+ },
60
71
  "./theme": {
61
72
  "bun": "./src/theme/public.ts",
62
73
  "react-native": "./src/theme/public.ts",
@@ -102,9 +113,12 @@
102
113
  "react": "19.2.3",
103
114
  "react-dom": "19.2.3",
104
115
  "react-native": "0.86.3",
116
+ "react-native-gesture-handler": "~2.32.0",
117
+ "react-native-reanimated": "4.5.1",
105
118
  "react-native-safe-area-context": "~5.7.0",
106
119
  "react-native-svg": "15.15.4",
107
120
  "react-native-web": "~0.21.0",
121
+ "react-native-worklets": "0.10.1",
108
122
  "typescript": "~6.0.3"
109
123
  },
110
124
  "packageManager": "bun@1.4.2"
@@ -3,7 +3,6 @@ import React from 'react';
3
3
  import { Button } from '../components/button';
4
4
  import { Card } from '../components/card';
5
5
  import { Checkbox } from '../components/checkbox';
6
- import { Drawer } from '../components/drawer';
7
6
  import { Field } from '../components/field';
8
7
  import { HelperText } from '../components/helper-text';
9
8
  import { Menu } from '../components/menu';
@@ -68,13 +67,11 @@ export function FeedbackExample() {
68
67
 
69
68
  export function OverlayExample() {
70
69
  const [modalVisible, setModalVisible] = React.useState(false);
71
- const [drawerVisible, setDrawerVisible] = React.useState(false);
72
70
 
73
71
  return (
74
72
  <ThemeProvider initialConfig={docsThemeConfig}>
75
73
  <Stack gap="m" p="l">
76
74
  <Button onPress={() => setModalVisible(true)}>Open modal</Button>
77
- <Button onPress={() => setDrawerVisible(true)}>Open drawer</Button>
78
75
  <Modal onDismiss={() => setModalVisible(false)} visible={modalVisible}>
79
76
  <Card>
80
77
  <Stack gap="s">
@@ -85,9 +82,6 @@ export function OverlayExample() {
85
82
  </Stack>
86
83
  </Card>
87
84
  </Modal>
88
- <Drawer onDismiss={() => setDrawerVisible(false)} visible={drawerVisible}>
89
- <Text>Drawer content</Text>
90
- </Drawer>
91
85
  </Stack>
92
86
  </ThemeProvider>
93
87
  );
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+
3
+ import type { BottomSheetController } from '../../types/bottomSheet';
4
+
5
+ export const BottomSheetContext = React.createContext<BottomSheetController | null>(null);