@fluentui-react-native/drawer 0.4.19 → 0.5.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 (50) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/lib/Drawer.d.ts +7 -2
  3. package/lib/Drawer.d.ts.map +1 -1
  4. package/lib/Drawer.js +39 -27
  5. package/lib/Drawer.js.map +1 -1
  6. package/lib/Drawer.styling.d.ts +1 -1
  7. package/lib/Drawer.styling.js +51 -42
  8. package/lib/Drawer.types.d.ts +179 -168
  9. package/lib/Drawer.types.d.ts.map +1 -1
  10. package/lib/Drawer.types.js +1 -1
  11. package/lib/Drawer.types.js.map +1 -1
  12. package/lib/DrawerTokens.d.ts +1 -1
  13. package/lib/DrawerTokens.js +32 -32
  14. package/lib/DrawerTokens.js.map +1 -1
  15. package/lib/__tests__/Drawer.test.d.ts +1 -1
  16. package/lib/__tests__/Drawer.test.js +12 -8
  17. package/lib/__tests__/Drawer.test.js.map +1 -1
  18. package/lib/index.d.ts +1 -1
  19. package/lib/index.js +1 -1
  20. package/lib/useDrawer.d.ts +1 -1
  21. package/lib/useDrawer.d.ts.map +1 -1
  22. package/lib/useDrawer.js +72 -67
  23. package/lib/useDrawer.js.map +1 -1
  24. package/lib-commonjs/Drawer.d.ts +7 -2
  25. package/lib-commonjs/Drawer.d.ts.map +1 -1
  26. package/lib-commonjs/Drawer.js +48 -33
  27. package/lib-commonjs/Drawer.js.map +1 -1
  28. package/lib-commonjs/Drawer.styling.d.ts +1 -1
  29. package/lib-commonjs/Drawer.styling.js +56 -47
  30. package/lib-commonjs/Drawer.types.d.ts +179 -168
  31. package/lib-commonjs/Drawer.types.d.ts.map +1 -1
  32. package/lib-commonjs/Drawer.types.js +3 -3
  33. package/lib-commonjs/Drawer.types.js.map +1 -1
  34. package/lib-commonjs/DrawerTokens.d.ts +1 -1
  35. package/lib-commonjs/DrawerTokens.js +35 -35
  36. package/lib-commonjs/DrawerTokens.js.map +1 -1
  37. package/lib-commonjs/__tests__/Drawer.test.d.ts +1 -1
  38. package/lib-commonjs/__tests__/Drawer.test.js +66 -35
  39. package/lib-commonjs/__tests__/Drawer.test.js.map +1 -1
  40. package/lib-commonjs/index.d.ts +1 -1
  41. package/lib-commonjs/index.js +17 -7
  42. package/lib-commonjs/index.js.map +1 -1
  43. package/lib-commonjs/useDrawer.d.ts +1 -1
  44. package/lib-commonjs/useDrawer.d.ts.map +1 -1
  45. package/lib-commonjs/useDrawer.js +76 -71
  46. package/lib-commonjs/useDrawer.js.map +1 -1
  47. package/package.json +61 -60
  48. package/src/Drawer.tsx +2 -3
  49. package/src/Drawer.types.ts +4 -3
  50. package/src/__tests__/Drawer.test.tsx +7 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Change Log - @fluentui-react-native/drawer
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d7adbdd: # Migration from Beachball to Changesets
8
+
9
+ This changeset represents the migration from Beachball to Changesets for version management and consolidates all changes from 440+ beachball change files that were in the `change/` directory.
10
+
11
+ All 75 affected packages receive a minor version bump to acknowledge the accumulated changes from the beachball era.
12
+
13
+ ## What Changed
14
+
15
+ Going forward, all version management uses Changesets via `yarn changeset`. The following beachball infrastructure has been removed:
16
+
17
+ - ❌ 440+ beachball change files from `change/` directory
18
+ - ❌ `beachball` package dependency
19
+ - ❌ Beachball scripts from `package.json`
20
+ - ❌ `beachball.config.js` configuration file
21
+ - ❌ Beachball publish steps from Azure Pipelines
22
+
23
+ ## New Workflow
24
+
25
+ ✅ **Create changes**: Run `yarn changeset` to document changes
26
+ ✅ **Version bump PRs**: Automatically created by GitHub Actions
27
+ ✅ **Publishing**: Handled by Azure Pipelines using `changeset publish`
28
+ ✅ **Validation**: CI validates changesets and blocks major version bumps
29
+
30
+ For details, see `CHANGESETS_SETUP.md` and `CONTRIBUTING.md`.
31
+
32
+ ### Patch Changes
33
+
34
+ - d1d8c26: We were pinning @types/react and react-native-macos via resolutions. This fixes that which uncovered a bunch of type inconsistencies that needed to be addressed.
35
+ - Updated dependencies [d7adbdd]
36
+ - Updated dependencies [d1d8c26]
37
+ - Updated dependencies [d1d8c26]
38
+ - @fluentui-react-native/framework@0.15.0
39
+ - @fluentui-react-native/interactive-hooks@0.28.0
40
+ - @fluentui-react-native/theme-tokens@0.28.0
41
+ - @fluentui-react-native/use-styling@0.14.0
42
+
3
43
  <!-- This log was last generated on Tue, 05 Aug 2025 18:50:42 GMT and should not be manually modified. -->
4
44
 
5
45
  <!-- Start content -->
package/lib/Drawer.d.ts CHANGED
@@ -1,4 +1,9 @@
1
1
  import type { DrawerProps } from './Drawer.types';
2
2
  export declare const drawerLookup: (layer: string, userProps: DrawerProps) => boolean;
3
- export declare const Drawer: import("@fluentui-react-native/framework").ComposableComponent<DrawerProps, import("./Drawer.types").DrawerSlotProps, import("./Drawer.types").DrawerTokens, import("@fluentui-react-native/framework").ObjectBase>;
4
- //# sourceMappingURL=Drawer.d.ts.map
3
+ export declare const Drawer: import('@fluentui-react-native/framework').ComposableComponent<
4
+ DrawerProps,
5
+ import('./Drawer.types').DrawerSlotProps,
6
+ import('./Drawer.types').DrawerTokens,
7
+ import('@fluentui-react-native/framework-base').ObjectBase
8
+ >;
9
+ //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../src/Drawer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI9D,eAAO,MAAM,YAAY,UAAW,MAAM,aAAa,WAAW,KAAG,OAEpE,CAAC;AAEF,eAAO,MAAM,MAAM,qNAmCjB,CAAC"}
1
+ {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../src/Drawer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI9D,eAAO,MAAM,YAAY,oDAExB,CAAC;AAEF,eAAO,MAAM,MAAM,0NAmCjB,CAAC"}
package/lib/Drawer.js CHANGED
@@ -1,35 +1,47 @@
1
- /** @jsxRuntime classic */
2
- /** @jsx withSlots */
1
+ import { jsx as _jsx, jsxs as _jsxs } from '@fluentui-react-native/framework-base/jsx-runtime';
2
+ /** @jsxImportSource @fluentui-react-native/framework-base */
3
3
  import { Animated, Modal, TouchableWithoutFeedback, View } from 'react-native';
4
- import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework';
4
+ import { compose, mergeProps } from '@fluentui-react-native/framework';
5
5
  import { stylingSettings } from './Drawer.styling';
6
6
  import { DrawerName } from './Drawer.types';
7
7
  import { useDrawer } from './useDrawer';
8
8
  export const drawerLookup = (layer, userProps) => {
9
- return userProps[layer] || layer === userProps['drawerPosition'];
9
+ return userProps[layer] || layer === userProps['drawerPosition'];
10
10
  };
11
11
  export const Drawer = compose({
12
- displayName: DrawerName,
13
- ...stylingSettings,
14
- slots: {
15
- modal: Modal,
16
- scrim: TouchableWithoutFeedback,
17
- scrimContent: Animated.View,
18
- content: Animated.View,
19
- handle: View,
20
- },
21
- useRender: (userProps, useSlots) => {
22
- const drawerProps = useDrawer(userProps).props;
23
- const Slots = useSlots(userProps, (layer) => drawerLookup(layer, drawerProps));
24
- return (final, children) => {
25
- const { open, onClose, onScrimClick, animationConfig, drawerPosition, showHandle, ...rest } = mergeProps(drawerProps, final);
26
- return (withSlots(Slots.modal, { ...rest, visible: open, onRequestClose: onClose, supportedOrientations: ['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right'], animationType: "none", transparent: true },
27
- withSlots(Slots.scrim, { onPress: onScrimClick },
28
- withSlots(Slots.scrimContent, { style: [{ opacity: animationConfig.animatedOpacity }] })),
29
- withSlots(Slots.content, { style: animationConfig.animatedStyle },
30
- drawerPosition === 'bottom' && showHandle && withSlots(Slots.handle, null),
31
- children)));
32
- };
33
- },
12
+ displayName: DrawerName,
13
+ ...stylingSettings,
14
+ slots: {
15
+ modal: Modal,
16
+ scrim: TouchableWithoutFeedback,
17
+ scrimContent: Animated.View,
18
+ content: Animated.View,
19
+ handle: View,
20
+ },
21
+ useRender: (userProps, useSlots) => {
22
+ const drawerProps = useDrawer(userProps).props;
23
+ const Slots = useSlots(userProps, (layer) => drawerLookup(layer, drawerProps));
24
+ return (final, children) => {
25
+ const { open, onClose, onScrimClick, animationConfig, drawerPosition, showHandle, ...rest } = mergeProps(drawerProps, final);
26
+ return _jsxs(Slots.modal, {
27
+ ...rest,
28
+ visible: open,
29
+ onRequestClose: onClose,
30
+ supportedOrientations: ['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right'],
31
+ animationType: 'none',
32
+ transparent: true,
33
+ children: [
34
+ _jsx(Slots.scrim, {
35
+ onPress: onScrimClick,
36
+ children: _jsx(Slots.scrimContent, { style: [{ opacity: animationConfig.animatedOpacity }] }),
37
+ }),
38
+ _jsxs(Slots.content, {
39
+ style: animationConfig.animatedStyle,
40
+ children: [drawerPosition === 'bottom' && showHandle && _jsx(Slots.handle, {}), children],
41
+ }),
42
+ ],
43
+ });
44
+ };
45
+ },
34
46
  });
35
- //# sourceMappingURL=Drawer.js.map
47
+ //# sourceMappingURL=Drawer.js.map
package/lib/Drawer.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../src/Drawer.tsx"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,qBAAqB;AACrB,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,wBAAwB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAG/E,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,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,CAAC,CAAC,KAAK,CAAC;QAC/C,MAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;QAC/E,OAAO,CAAC,KAAkB,EAAE,QAAyB,EAAE,EAAE,CAAC;YACxD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;YAC7H,OAAO,CACL,MAAC,KAAK,CAAC,KAAK,OACN,IAAI,EACR,OAAO,EAAE,IAAI,EACb,cAAc,EAAE,OAAO,EACvB,qBAAqB,EAAE,CAAC,UAAU,EAAE,sBAAsB,EAAE,WAAW,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,EAC7G,aAAa,EAAC,MAAM,EACpB,WAAW;oBAEX,KAAC,KAAK,CAAC,KAAK,IAAC,OAAO,EAAE,YAAY,YAChC,KAAC,KAAK,CAAC,YAAY,IAAC,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,eAAe,EAAE,CAAC,GAAI,GACjE,EACd,MAAC,KAAK,CAAC,OAAO,IAAC,KAAK,EAAE,eAAe,CAAC,aAAa,aAChD,cAAc,KAAK,QAAQ,IAAI,UAAU,IAAI,KAAC,KAAK,CAAC,MAAM,KAAG,EAC7D,QAAQ,IACK;oBACJ,CACf,CAAC;QAAA,CACH,CAAC;IAAA,CACH;CACF,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { UseStylingOptions } from '@fluentui-react-native/framework';
2
2
  import type { DrawerTokens, DrawerSlotProps, DrawerProps } from './Drawer.types';
3
3
  export declare const stylingSettings: UseStylingOptions<DrawerProps, DrawerSlotProps, DrawerTokens>;
4
- //# sourceMappingURL=Drawer.styling.d.ts.map
4
+ //# sourceMappingURL=Drawer.styling.d.ts.map
@@ -2,46 +2,55 @@ import { buildProps } from '@fluentui-react-native/framework';
2
2
  import { DrawerName } from './Drawer.types';
3
3
  import { defaultDrawerTokens } from './DrawerTokens';
4
4
  export const stylingSettings = {
5
- tokens: [defaultDrawerTokens, DrawerName],
6
- tokensThatAreAlsoProps: 'all',
7
- states: ['left', 'right', 'bottom'],
8
- slotProps: {
9
- scrimContent: buildProps((tokens, _theme) => ({
10
- style: {
11
- position: 'absolute',
12
- top: 0,
13
- left: 0,
14
- width: '100%',
15
- height: '100%',
16
- backgroundColor: tokens.scrimColor,
17
- opacity: tokens.scrimOpacity,
18
- },
19
- }), ['scrimColor']),
20
- content: buildProps((tokens, _theme) => ({
21
- style: {
22
- position: 'absolute',
23
- height: tokens.height,
24
- width: tokens.width,
25
- elevation: tokens.drawerElevation,
26
- borderTopEndRadius: tokens.drawerCornerRadius,
27
- borderTopStartRadius: tokens.drawerCornerRadius,
28
- right: tokens.rightPosition,
29
- left: tokens.leftPosition,
30
- bottom: tokens.bottomPosition,
31
- top: tokens.topPosition,
32
- backgroundColor: tokens.drawerBackgroundColor,
33
- },
34
- }), ['drawerBackgroundColor', 'drawerElevation', 'height', 'width']),
35
- handle: buildProps((tokens, _theme) => ({
36
- style: {
37
- width: tokens.handleWidth,
38
- height: tokens.handleHeight,
39
- borderRadius: tokens.handleCornerRadius,
40
- backgroundColor: tokens.handleBackgroundColor,
41
- alignSelf: tokens.handleAlignment,
42
- marginTop: tokens.handleMarginTop,
43
- },
44
- }), ['handleWidth', 'handleHeight', 'handleCornerRadius', 'handleBackgroundColor', 'handleAlignment', 'handleMarginTop']),
45
- },
5
+ tokens: [defaultDrawerTokens, DrawerName],
6
+ tokensThatAreAlsoProps: 'all',
7
+ states: ['left', 'right', 'bottom'],
8
+ slotProps: {
9
+ scrimContent: buildProps(
10
+ (tokens, _theme) => ({
11
+ style: {
12
+ position: 'absolute',
13
+ top: 0,
14
+ left: 0,
15
+ width: '100%',
16
+ height: '100%',
17
+ backgroundColor: tokens.scrimColor,
18
+ opacity: tokens.scrimOpacity,
19
+ },
20
+ }),
21
+ ['scrimColor'],
22
+ ),
23
+ content: buildProps(
24
+ (tokens, _theme) => ({
25
+ style: {
26
+ position: 'absolute',
27
+ height: tokens.height,
28
+ width: tokens.width,
29
+ elevation: tokens.drawerElevation,
30
+ borderTopEndRadius: tokens.drawerCornerRadius,
31
+ borderTopStartRadius: tokens.drawerCornerRadius,
32
+ right: tokens.rightPosition,
33
+ left: tokens.leftPosition,
34
+ bottom: tokens.bottomPosition,
35
+ top: tokens.topPosition,
36
+ backgroundColor: tokens.drawerBackgroundColor,
37
+ },
38
+ }),
39
+ ['drawerBackgroundColor', 'drawerElevation', 'height', 'width'],
40
+ ),
41
+ handle: buildProps(
42
+ (tokens, _theme) => ({
43
+ style: {
44
+ width: tokens.handleWidth,
45
+ height: tokens.handleHeight,
46
+ borderRadius: tokens.handleCornerRadius,
47
+ backgroundColor: tokens.handleBackgroundColor,
48
+ alignSelf: tokens.handleAlignment,
49
+ marginTop: tokens.handleMarginTop,
50
+ },
51
+ }),
52
+ ['handleWidth', 'handleHeight', 'handleCornerRadius', 'handleBackgroundColor', 'handleAlignment', 'handleMarginTop'],
53
+ ),
54
+ },
46
55
  };
47
- //# sourceMappingURL=Drawer.styling.js.map
56
+ //# sourceMappingURL=Drawer.styling.js.map
@@ -1,184 +1,195 @@
1
- import type { Animated, ColorValue, DimensionValue, FlexAlignType, ModalProps, TouchableWithoutFeedbackProps, ViewProps } from 'react-native';
1
+ import type {
2
+ AnimatableNumericValue,
3
+ Animated,
4
+ ColorValue,
5
+ DimensionValue,
6
+ FlexAlignType,
7
+ ModalProps,
8
+ TouchableWithoutFeedbackProps,
9
+ ViewProps,
10
+ } from 'react-native';
2
11
  import type { InteractionEvent, PressableFocusProps } from '@fluentui-react-native/interactive-hooks';
3
- export declare const DrawerName = "Drawer";
12
+ export declare const DrawerName = 'Drawer';
4
13
  /**
5
14
  * Specifies the possible position of the Drawer.
6
15
  */
7
16
  export type DrawerPositionType = 'bottom' | 'left' | 'right';
8
17
  export interface DrawerTokens {
9
- /**
10
- * The color of the scrim.
11
- * */
12
- scrimColor?: ColorValue;
13
- /**
14
- * The opacity of the scrim.
15
- * */
16
- scrimOpacity?: number;
17
- /**
18
- * Width of the handle.
19
- */
20
- handleWidth?: number;
21
- /**
22
- * Height of the handle.
23
- */
24
- handleHeight?: number;
25
- /**
26
- * The background color of the handle.
27
- * */
28
- handleBackgroundColor?: ColorValue;
29
- /**
30
- * The corner radius of the handle.
31
- * */
32
- handleCornerRadius?: number;
33
- /**
34
- * The top margin of the handle.
35
- * */
36
- handleMarginTop?: number;
37
- /**
38
- * The bottom margin of the handle.
39
- * */
40
- handleMarginBottom?: number;
41
- /**
42
- * The start margin of the handle.
43
- * */
44
- handleMarginStart?: number;
45
- /**
46
- * The end margin of the handle.
47
- * */
48
- handleMarginEnd?: number;
49
- /**
50
- * The flex alignment of the handle.
51
- * */
52
- handleAlignment?: FlexAlignType;
53
- /**
54
- * The background for drawer
55
- * */
56
- drawerBackgroundColor?: ColorValue;
57
- /**
58
- * The corner radius of the Drawer
59
- * @default 0
60
- * */
61
- drawerCornerRadius?: number;
62
- /**
63
- * The elevation of the Drawer
64
- * @default 5
65
- * @platform android
66
- * */
67
- drawerElevation?: number;
68
- /**
69
- * The width of the Drawer
70
- * Note: Only applicable when position is 'left' or 'right'
71
- * @default '100%'
72
- * */
73
- width?: DimensionValue;
74
- /**
75
- * The height of the Drawer
76
- * Note: Only applicable when position is 'bottom'
77
- * @default '40%'
78
- * */
79
- height?: DimensionValue;
80
- /**
81
- * The shadow color of the Drawer
82
- * @platform iOS
83
- * */
84
- shadowColor?: ColorValue;
85
- /**
86
- * The shadow offset of the Drawer
87
- * @platform iOS
88
- * */
89
- shadowOffset?: {
90
- width: number;
91
- height: number;
92
- };
93
- /**
94
- * The shadow opacity of the Drawer
95
- * @platform iOS
96
- * */
97
- shadowOpacity?: number;
98
- /**
99
- * The shadow radius of the Drawer
100
- * @platform iOS
101
- * */
102
- shadowRadius?: number;
103
- /**
104
- * Positions/Behaviours of the Drawer, This is used to apply different tokens for different positions.
105
- */
106
- left?: DrawerTokens;
107
- right?: DrawerTokens;
108
- bottom?: DrawerTokens;
109
- /**
110
- * Coordinate position of the Drawer, This is used to position the Drawer at a particular coordinate.
111
- */
112
- leftPosition?: number;
113
- rightPosition?: number;
114
- bottomPosition?: number;
115
- topPosition?: number;
18
+ /**
19
+ * The color of the scrim.
20
+ * */
21
+ scrimColor?: ColorValue;
22
+ /**
23
+ * The opacity of the scrim.
24
+ * */
25
+ scrimOpacity?: number;
26
+ /**
27
+ * Width of the handle.
28
+ */
29
+ handleWidth?: number;
30
+ /**
31
+ * Height of the handle.
32
+ */
33
+ handleHeight?: number;
34
+ /**
35
+ * The background color of the handle.
36
+ * */
37
+ handleBackgroundColor?: ColorValue;
38
+ /**
39
+ * The corner radius of the handle.
40
+ * */
41
+ handleCornerRadius?: AnimatableNumericValue | string;
42
+ /**
43
+ * The top margin of the handle.
44
+ * */
45
+ handleMarginTop?: number;
46
+ /**
47
+ * The bottom margin of the handle.
48
+ * */
49
+ handleMarginBottom?: number;
50
+ /**
51
+ * The start margin of the handle.
52
+ * */
53
+ handleMarginStart?: number;
54
+ /**
55
+ * The end margin of the handle.
56
+ * */
57
+ handleMarginEnd?: number;
58
+ /**
59
+ * The flex alignment of the handle.
60
+ * */
61
+ handleAlignment?: FlexAlignType;
62
+ /**
63
+ * The background for drawer
64
+ * */
65
+ drawerBackgroundColor?: ColorValue;
66
+ /**
67
+ * The corner radius of the Drawer
68
+ * @default 0
69
+ * */
70
+ drawerCornerRadius?: AnimatableNumericValue | string;
71
+ /**
72
+ * The elevation of the Drawer
73
+ * @default 5
74
+ * @platform android
75
+ * */
76
+ drawerElevation?: number;
77
+ /**
78
+ * The width of the Drawer
79
+ * Note: Only applicable when position is 'left' or 'right'
80
+ * @default '100%'
81
+ * */
82
+ width?: DimensionValue;
83
+ /**
84
+ * The height of the Drawer
85
+ * Note: Only applicable when position is 'bottom'
86
+ * @default '40%'
87
+ * */
88
+ height?: DimensionValue;
89
+ /**
90
+ * The shadow color of the Drawer
91
+ * @platform iOS
92
+ * */
93
+ shadowColor?: ColorValue;
94
+ /**
95
+ * The shadow offset of the Drawer
96
+ * @platform iOS
97
+ * */
98
+ shadowOffset?: {
99
+ width: number;
100
+ height: number;
101
+ };
102
+ /**
103
+ * The shadow opacity of the Drawer
104
+ * @platform iOS
105
+ * */
106
+ shadowOpacity?: number;
107
+ /**
108
+ * The shadow radius of the Drawer
109
+ * @platform iOS
110
+ * */
111
+ shadowRadius?: AnimatableNumericValue | string;
112
+ /**
113
+ * Positions/Behaviours of the Drawer, This is used to apply different tokens for different positions.
114
+ */
115
+ left?: DrawerTokens;
116
+ right?: DrawerTokens;
117
+ bottom?: DrawerTokens;
118
+ /**
119
+ * Coordinate position of the Drawer, This is used to position the Drawer at a particular coordinate.
120
+ */
121
+ leftPosition?: number;
122
+ rightPosition?: number;
123
+ bottomPosition?: number;
124
+ topPosition?: number;
116
125
  }
117
126
  export interface DrawerProps extends PressableFocusProps {
118
- accessibilityLabel?: string;
119
- /**
120
- * Visibility of the Drawer
121
- */
122
- open?: boolean;
123
- /**
124
- * Callback when the Drawer is closed
125
- * */
126
- onClose?: (e: InteractionEvent) => void;
127
- /**
128
- * Callback when the Drawer is opened
129
- * */
130
- onOpen?: (e: InteractionEvent) => void;
131
- /**
132
- * Callback when the scrim is clicked
133
- * */
134
- onScrimClick?: (e: InteractionEvent) => void;
135
- /**
136
- * The content of the Drawer
137
- * */
138
- children?: React.ReactNode;
139
- /**
140
- * The behavior of the Drawer
141
- * @default 'left'
142
- * */
143
- drawerPosition?: DrawerPositionType;
144
- /**
145
- * The behavior is for only bottom drawer in which content is scrollable without expanding the bottom drawer
146
- * @default false
147
- * */
148
- isContentScrollableUnexpanded?: boolean;
149
- /**
150
- * The behavior is for only bottom drawer in which handle can be hidden for some usecases
151
- * @default true
152
- * */
153
- showHandle?: boolean;
154
- /**
155
- * The width of the Drawer
156
- * Animation configuration for the Drawer
157
- * */
158
- animationConfig?: {
159
- animatedOpacity: Animated.AnimatedInterpolation<number>;
160
- animatedStyle: {
161
- transform: {
162
- translateX: Animated.AnimatedInterpolation<number>;
163
- }[] | {
164
- translateY: Animated.AnimatedInterpolation<number>;
165
- }[];
166
- };
127
+ accessibilityLabel?: string;
128
+ /**
129
+ * Visibility of the Drawer
130
+ */
131
+ open?: boolean;
132
+ /**
133
+ * Callback when the Drawer is closed
134
+ * */
135
+ onClose?: (e: InteractionEvent) => void;
136
+ /**
137
+ * Callback when the Drawer is opened
138
+ * */
139
+ onOpen?: (e: InteractionEvent) => void;
140
+ /**
141
+ * Callback when the scrim is clicked
142
+ * */
143
+ onScrimClick?: (e: InteractionEvent) => void;
144
+ /**
145
+ * The content of the Drawer
146
+ * */
147
+ children?: React.ReactNode;
148
+ /**
149
+ * The behavior of the Drawer
150
+ * @default 'left'
151
+ * */
152
+ drawerPosition?: DrawerPositionType;
153
+ /**
154
+ * The behavior is for only bottom drawer in which content is scrollable without expanding the bottom drawer
155
+ * @default false
156
+ * */
157
+ isContentScrollableUnexpanded?: boolean;
158
+ /**
159
+ * The behavior is for only bottom drawer in which handle can be hidden for some usecases
160
+ * @default true
161
+ * */
162
+ showHandle?: boolean;
163
+ /**
164
+ * The width of the Drawer
165
+ * Animation configuration for the Drawer
166
+ * */
167
+ animationConfig?: {
168
+ animatedOpacity: Animated.AnimatedInterpolation<number>;
169
+ animatedStyle: {
170
+ transform:
171
+ | {
172
+ translateX: Animated.AnimatedInterpolation<number>;
173
+ }[]
174
+ | {
175
+ translateY: Animated.AnimatedInterpolation<number>;
176
+ }[];
167
177
  };
178
+ };
168
179
  }
169
180
  export interface DrawerInfo {
170
- props: DrawerProps;
181
+ props: DrawerProps;
171
182
  }
172
183
  export interface DrawerSlotProps {
173
- modal: ModalProps;
174
- scrim: TouchableWithoutFeedbackProps;
175
- scrimContent: Animated.AnimatedProps<ViewProps>;
176
- content: Animated.AnimatedProps<ViewProps>;
177
- handle: ViewProps;
184
+ modal: ModalProps;
185
+ scrim: TouchableWithoutFeedbackProps;
186
+ scrimContent: Animated.AnimatedProps<ViewProps>;
187
+ content: Animated.AnimatedProps<ViewProps>;
188
+ handle: ViewProps;
178
189
  }
179
190
  export interface DrawerType {
180
- props: DrawerProps;
181
- tokens: DrawerTokens;
182
- slotProps: DrawerSlotProps;
191
+ props: DrawerProps;
192
+ tokens: DrawerTokens;
193
+ slotProps: DrawerSlotProps;
183
194
  }
184
- //# sourceMappingURL=Drawer.types.d.ts.map
195
+ //# sourceMappingURL=Drawer.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.types.d.ts","sourceRoot":"","sources":["../src/Drawer.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,cAAc,EACd,aAAa,EACb,UAAU,EACV,6BAA6B,EAC7B,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAEtG,eAAO,MAAM,UAAU,WAAW,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B;;SAEK;IACL,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;SAEK;IACL,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;SAEK;IACL,qBAAqB,CAAC,EAAE,UAAU,CAAC;IAEnC;;SAEK;IACL,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;UAEM;IACN,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;SAEK;IAEL,kBAAkB,CAAC,EAAE,MAAM,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CAAC,CAAA;aAAE,EAAE,GAAG;gBAAE,UAAU,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAA;aAAE,EAAE,CAAC;SAChI,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,6BAA6B,CAAC;IACrC,YAAY,EAAE,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAChD,OAAO,EAAE,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAC3C,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,eAAe,CAAC;CAC5B"}
@@ -1,2 +1,2 @@
1
1
  export const DrawerName = 'Drawer';
2
- //# sourceMappingURL=Drawer.types.js.map
2
+ //# sourceMappingURL=Drawer.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.types.js","sourceRoot":"","sources":["../src/Drawer.types.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"Drawer.types.js","sourceRoot":"","sources":["../src/Drawer.types.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC"}