@draftbit/core 47.0.1-9fd6f2.2 → 47.0.1-ad0ed2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/lib/commonjs/components/Button.js +3 -3
  2. package/lib/commonjs/components/Checkbox/Checkbox.js +1 -3
  3. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +1 -2
  4. package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -2
  5. package/lib/commonjs/components/DeprecatedButton.js +3 -27
  6. package/lib/commonjs/components/DeprecatedFAB.js +1 -2
  7. package/lib/commonjs/components/Pressable.js +37 -0
  8. package/lib/commonjs/components/Touchable.js +8 -3
  9. package/lib/commonjs/mappings/Button.js +27 -9
  10. package/lib/commonjs/mappings/Touchable.js +39 -7
  11. package/lib/module/components/Button.js +3 -3
  12. package/lib/module/components/Checkbox/Checkbox.js +2 -3
  13. package/lib/module/components/Checkbox/CheckboxGroupRow.js +2 -3
  14. package/lib/module/components/Checkbox/CheckboxRow.js +2 -3
  15. package/lib/module/components/DeprecatedButton.js +4 -28
  16. package/lib/module/components/DeprecatedFAB.js +2 -3
  17. package/lib/module/components/Pressable.js +30 -0
  18. package/lib/module/components/Touchable.js +8 -3
  19. package/lib/module/mappings/Button.js +28 -10
  20. package/lib/module/mappings/Touchable.js +41 -9
  21. package/lib/typescript/src/components/Button.d.ts.map +1 -1
  22. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
  23. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  24. package/lib/typescript/src/components/Checkbox/CheckboxGroupRow.d.ts.map +1 -1
  25. package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts.map +1 -1
  26. package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
  27. package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -1
  28. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  29. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
  30. package/lib/typescript/src/components/Pressable.d.ts +16 -0
  31. package/lib/typescript/src/components/Pressable.d.ts.map +1 -0
  32. package/lib/typescript/src/components/Touchable.d.ts +7 -2
  33. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  34. package/lib/typescript/src/mappings/Button.d.ts +93 -4
  35. package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
  36. package/lib/typescript/src/mappings/Touchable.d.ts +59 -5
  37. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
  38. package/package.json +3 -3
  39. package/src/components/Button.js +3 -3
  40. package/src/components/Button.tsx +14 -4
  41. package/src/components/Checkbox/Checkbox.js +2 -3
  42. package/src/components/Checkbox/Checkbox.tsx +5 -7
  43. package/src/components/Checkbox/CheckboxGroupRow.js +2 -3
  44. package/src/components/Checkbox/CheckboxGroupRow.tsx +3 -3
  45. package/src/components/Checkbox/CheckboxRow.js +2 -3
  46. package/src/components/Checkbox/CheckboxRow.tsx +3 -3
  47. package/src/components/DeprecatedButton.js +4 -16
  48. package/src/components/DeprecatedButton.tsx +7 -31
  49. package/src/components/DeprecatedFAB.js +2 -3
  50. package/src/components/DeprecatedFAB.tsx +5 -5
  51. package/src/components/Pressable.js +12 -0
  52. package/src/components/Pressable.tsx +50 -0
  53. package/src/components/Touchable.js +3 -3
  54. package/src/components/Touchable.tsx +14 -4
  55. package/src/mappings/Button.js +27 -9
  56. package/src/mappings/Button.ts +29 -9
  57. package/src/mappings/Touchable.js +42 -7
  58. package/src/mappings/Touchable.ts +46 -6
@@ -1,13 +1,45 @@
1
- import { COMPONENT_TYPES, createActionProp, Triggers, StylesPanelSections } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Touchable",
4
- tag: "Touchable",
5
- description: "Simple button with no styles",
6
- category: COMPONENT_TYPES.button,
1
+ import { COMPONENT_TYPES, createActionProp, Triggers, createNumberProp, StylesPanelSections, GROUPS } from "@draftbit/types";
2
+ const SEED_DATA_PROPS = {
7
3
  stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Borders],
8
4
  layout: {},
9
- triggers: [Triggers.OnPress],
5
+ triggers: [Triggers.OnPress, Triggers.OnLongPress],
10
6
  props: {
11
- onPress: createActionProp()
7
+ onPress: createActionProp(),
8
+ onLongPress: createActionProp(),
9
+ activeOpacity: createNumberProp({
10
+ label: "Active Opacity",
11
+ description: "The opacity when the button is pressed.",
12
+ defaultValue: 0.8,
13
+ group: GROUPS.basic
14
+ }),
15
+ disabledOpacity: createNumberProp({
16
+ label: "Disabled Opacity",
17
+ description: "The opacity when the button is disabled.",
18
+ defaultValue: 0.8,
19
+ group: GROUPS.basic
20
+ }),
21
+ delayLongPress: createNumberProp({
22
+ label: "Delay Long Press",
23
+ description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
24
+ group: GROUPS.basic
25
+ }),
26
+ hitSlop: createNumberProp({
27
+ label: "Hit Slop",
28
+ description: "Sets additional distance outside of element in which a press can be detected.",
29
+ group: GROUPS.basic
30
+ })
12
31
  }
13
- };
32
+ };
33
+ export const SEED_DATA = [{
34
+ name: "Touchable",
35
+ tag: "Touchable",
36
+ description: "An interactive view with no styles",
37
+ category: COMPONENT_TYPES.deprecated,
38
+ ...SEED_DATA_PROPS
39
+ }, {
40
+ name: "Pressable",
41
+ tag: "Pressable",
42
+ description: "An interactive view with no styles",
43
+ category: COMPONENT_TYPES.button,
44
+ ...SEED_DATA_PROPS
45
+ }];
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button.tsx"],"names":[],"mappings":"AA0IA,QAAA,MAAM,WAAW,EAAE,GAAsB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,QAAA,MAAM,MAAM,EAAE,GAAsB,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,CAAC;AAmBlB,QAAA,MAAM,aAAa,EAAE,GAAwB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button.tsx"],"names":[],"mappings":"AAoJA,QAAA,MAAM,WAAW,EAAE,GAAsB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,QAAA,MAAM,MAAM,EAAE,GAAsB,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,CAAC;AAmBlB,QAAA,MAAM,aAAa,EAAE,GAAwB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { TouchableHighlightProps, StyleProp, ViewStyle } from "react-native";
2
+ import { PressableProps, StyleProp, ViewStyle } from "react-native";
3
3
  import type { IconSlot } from "../../interfaces/Icon";
4
4
  export interface CheckboxProps {
5
5
  status?: boolean;
@@ -15,6 +15,6 @@ export interface CheckboxProps {
15
15
  size?: number;
16
16
  style?: StyleProp<ViewStyle>;
17
17
  }
18
- declare const Checkbox: React.FC<CheckboxProps & TouchableHighlightProps & IconSlot>;
18
+ declare const Checkbox: React.FC<CheckboxProps & PressableProps & IconSlot>;
19
19
  export default Checkbox;
20
20
  //# sourceMappingURL=Checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,uBAAuB,EACvB,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKtD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC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C,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,GAAG,cAAc,GAAG,QAAQ,CAoFjE,CAAC;AAqBF,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroupRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/Checkbox/CheckboxGroupRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,SAAS,EACT,SAAS,EAET,SAAS,EAGV,MAAM,cAAc,CAAC;AACtB,OAAiB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKtD,oBAAY,SAAS;IACnB,GAAG,QAAQ;IACX,UAAU,gBAAgB;CAC3B;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC;IAC3E,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,aAAa,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;CACzB;AA2BD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,GAAG,QAAQ,CAsEhE,CAAC;AAsBF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CheckboxGroupRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/Checkbox/CheckboxGroupRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,SAAS,EACT,SAAS,EAET,SAAS,EAIV,MAAM,cAAc,CAAC;AACtB,OAAiB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,oBAAY,SAAS;IACnB,GAAG,QAAQ;IACX,UAAU,gBAAgB;CAC3B;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC;IAC3E,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,aAAa,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;CACzB;AA2BD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,GAAG,QAAQ,CAsEhE,CAAC;AAsBF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/Checkbox/CheckboxRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,SAAS,EACT,SAAS,EAET,SAAS,EAGV,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKtD,OAAiB,EAAE,aAAa,EAAE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B,GAAG,QAAQ,CA2FtD,CAAC;AAsBF,eAAe,WAAW,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { TouchableHighlightProps, StyleProp, ViewStyle } from "react-native";
2
+ import { StyleProp, ViewStyle, PressableProps } from "react-native";
3
3
  import type { Theme } from "../styles/DefaultTheme";
4
4
  import type { IconSlot } from "../interfaces/Icon";
5
5
  /**
@@ -46,7 +46,7 @@ declare type Props = {
46
46
  elevation?: number;
47
47
  style?: StyleProp<ViewStyle>;
48
48
  theme: Theme;
49
- } & TouchableHighlightProps & IconSlot;
49
+ } & PressableProps & IconSlot;
50
50
  declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
51
51
  theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
52
52
  }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
@@ -1 +1 @@
1
- {"version":3,"file":"DeprecatedButton.d.ts","sourceRoot":"","sources":["../../../../src/components/DeprecatedButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAKL,uBAAuB,EACvB,SAAS,EACT,SAAS,EAEV,MAAM,cAAc,CAAC;AAOtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAA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  import * as React from "react";
2
- import { TouchableHighlightProps, StyleProp, ViewStyle } from "react-native";
2
+ import { StyleProp, ViewStyle, PressableProps } from "react-native";
3
3
  import type { Theme } from "../styles/DefaultTheme";
4
4
  import type { IconSlot } from "../interfaces/Icon";
5
5
  /**
@@ -48,7 +48,7 @@ declare type Props = {
48
48
  elevation?: number;
49
49
  theme: Theme;
50
50
  style?: StyleProp<ViewStyle>;
51
- } & TouchableHighlightProps & IconSlot;
51
+ } & PressableProps & IconSlot;
52
52
  declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
53
53
  theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
54
54
  }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
@@ -1 +1 @@
1
- {"version":3,"file":"DeprecatedFAB.d.ts","sourceRoot":"","sources":["../../../../src/components/DeprecatedFAB.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,uBAAuB,EACvB,SAAS,EACT,SAAS,EAEV,MAAM,cAAc,CAAC;AAQtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,uBAAuB,GACzB,QAAQ,CAAC;;;;AAkKX,wBAA8B"}
1
+ {"version":3,"file":"DeprecatedFAB.d.ts","sourceRoot":"","sources":["../../../../src/components/DeprecatedFAB.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,SAAS,EACT,SAAS,EAGT,cAAc,EACf,MAAM,cAAc,CAAC;AAOtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,cAAc,GAChB,QAAQ,CAAC;;;;AAkKX,wBAA8B"}
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { PressableProps, ViewStyle } from "react-native";
3
+ declare type Props = {
4
+ disabled?: boolean;
5
+ children: React.ReactNode;
6
+ style?: ViewStyle;
7
+ onPress?: () => void;
8
+ onLongPress?: () => void;
9
+ delayLongPress?: number;
10
+ hitSlop?: number;
11
+ activeOpacity?: number;
12
+ disabledOpacity?: number;
13
+ } & PressableProps;
14
+ export default function Pressable({ children, disabled, onPress, activeOpacity, disabledOpacity, delayLongPress, hitSlop, style, ...props }: Props): JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=Pressable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,cAAc,EACd,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAa,EACb,eAAe,EACf,cAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAoBP"}
@@ -1,11 +1,16 @@
1
1
  import React from "react";
2
- import { ViewStyle, PressableProps } from "react-native";
2
+ import { PressableProps, ViewStyle } from "react-native";
3
3
  declare type Props = {
4
4
  disabled?: boolean;
5
5
  children: React.ReactNode;
6
6
  style?: ViewStyle;
7
7
  onPress?: () => void;
8
+ onLongPress?: () => void;
9
+ delayLongPress?: number;
10
+ hitSlop?: number;
11
+ activeOpacity?: number;
12
+ disabledOpacity?: number;
8
13
  } & PressableProps;
9
- export default function Touchable({ children, disabled, onPress, style, ...props }: Props): JSX.Element;
14
+ export default function Touchable({ children, disabled, onPress, activeOpacity, disabledOpacity, delayLongPress, hitSlop, style, ...props }: Props): JSX.Element;
10
15
  export {};
11
16
  //# sourceMappingURL=Touchable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAa,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEpE,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAmBP"}
1
+ {"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/components/Touchable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAa,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,aAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,cAAc,CAAC;AAEnB,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,aAAa,EACb,eAAe,EACf,cAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,eAoBP"}
@@ -4,11 +4,11 @@ export declare const SEED_DATA: ({
4
4
  category: string;
5
5
  stylesPanelSections: string[];
6
6
  layout: {
7
+ borderRadius: number;
8
+ fontFamily: string;
7
9
  backgroundColor: string;
8
10
  borderWidth: number;
9
11
  textAlign: string;
10
- borderRadius: number;
11
- fontFamily: string;
12
12
  };
13
13
  triggers: string[];
14
14
  props: {
@@ -53,6 +53,50 @@ export declare const SEED_DATA: ({
53
53
  propType: string;
54
54
  defaultValue: null;
55
55
  };
56
+ activeOpacity: {
57
+ label: string;
58
+ description: string;
59
+ formType: string;
60
+ propType: string;
61
+ group: string;
62
+ defaultValue: null;
63
+ editable: boolean;
64
+ required: boolean;
65
+ step: number;
66
+ };
67
+ disabledOpacity: {
68
+ label: string;
69
+ description: string;
70
+ formType: string;
71
+ propType: string;
72
+ group: string;
73
+ defaultValue: null;
74
+ editable: boolean;
75
+ required: boolean;
76
+ step: number;
77
+ };
78
+ delayLongPress: {
79
+ label: string;
80
+ description: string;
81
+ formType: string;
82
+ propType: string;
83
+ group: string;
84
+ defaultValue: null;
85
+ editable: boolean;
86
+ required: boolean;
87
+ step: number;
88
+ };
89
+ hitSlop: {
90
+ label: string;
91
+ description: string;
92
+ formType: string;
93
+ propType: string;
94
+ group: string;
95
+ defaultValue: null;
96
+ editable: boolean;
97
+ required: boolean;
98
+ step: number;
99
+ };
56
100
  };
57
101
  } | {
58
102
  name: string;
@@ -60,10 +104,11 @@ export declare const SEED_DATA: ({
60
104
  category: string;
61
105
  stylesPanelSections: string[];
62
106
  layout: {
63
- backgroundColor: string;
64
- textAlign: string;
65
107
  borderRadius: number;
66
108
  fontFamily: string;
109
+ backgroundColor: string;
110
+ textAlign: string;
111
+ borderWidth?: undefined;
67
112
  };
68
113
  triggers: string[];
69
114
  props: {
@@ -108,6 +153,50 @@ export declare const SEED_DATA: ({
108
153
  propType: string;
109
154
  defaultValue: null;
110
155
  };
156
+ activeOpacity: {
157
+ label: string;
158
+ description: string;
159
+ formType: string;
160
+ propType: string;
161
+ group: string;
162
+ defaultValue: null;
163
+ editable: boolean;
164
+ required: boolean;
165
+ step: number;
166
+ };
167
+ disabledOpacity: {
168
+ label: string;
169
+ description: string;
170
+ formType: string;
171
+ propType: string;
172
+ group: string;
173
+ defaultValue: null;
174
+ editable: boolean;
175
+ required: boolean;
176
+ step: number;
177
+ };
178
+ delayLongPress: {
179
+ label: string;
180
+ description: string;
181
+ formType: string;
182
+ propType: string;
183
+ group: string;
184
+ defaultValue: null;
185
+ editable: boolean;
186
+ required: boolean;
187
+ step: number;
188
+ };
189
+ hitSlop: {
190
+ label: string;
191
+ description: string;
192
+ formType: string;
193
+ propType: string;
194
+ group: string;
195
+ defaultValue: null;
196
+ editable: boolean;
197
+ required: boolean;
198
+ step: number;
199
+ };
111
200
  };
112
201
  })[];
113
202
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Button.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiErB,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Button.ts"],"names":[],"mappings":"AAkDA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoErB,CAAC"}
@@ -1,8 +1,4 @@
1
1
  export declare const SEED_DATA: {
2
- name: string;
3
- tag: string;
4
- description: string;
5
- category: string;
6
2
  stylesPanelSections: string[];
7
3
  layout: {};
8
4
  triggers: string[];
@@ -17,6 +13,64 @@ export declare const SEED_DATA: {
17
13
  defaultValue: null;
18
14
  group: string;
19
15
  };
16
+ onLongPress: {
17
+ label: string;
18
+ description: string;
19
+ editable: boolean;
20
+ required: boolean;
21
+ formType: string;
22
+ propType: string;
23
+ defaultValue: null;
24
+ group: string;
25
+ };
26
+ activeOpacity: {
27
+ label: string;
28
+ description: string;
29
+ formType: string;
30
+ propType: string;
31
+ group: string;
32
+ defaultValue: null;
33
+ editable: boolean;
34
+ required: boolean;
35
+ step: number;
36
+ };
37
+ disabledOpacity: {
38
+ label: string;
39
+ description: string;
40
+ formType: string;
41
+ propType: string;
42
+ group: string;
43
+ defaultValue: null;
44
+ editable: boolean;
45
+ required: boolean;
46
+ step: number;
47
+ };
48
+ delayLongPress: {
49
+ label: string;
50
+ description: string;
51
+ formType: string;
52
+ propType: string;
53
+ group: string;
54
+ defaultValue: null;
55
+ editable: boolean;
56
+ required: boolean;
57
+ step: number;
58
+ };
59
+ hitSlop: {
60
+ label: string;
61
+ description: string;
62
+ formType: string;
63
+ propType: string;
64
+ group: string;
65
+ defaultValue: null;
66
+ editable: boolean;
67
+ required: boolean;
68
+ step: number;
69
+ };
20
70
  };
21
- };
71
+ name: string;
72
+ tag: string;
73
+ description: string;
74
+ category: string;
75
+ }[];
22
76
  //# sourceMappingURL=Touchable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Touchable.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;CAerB,CAAC"}
1
+ {"version":3,"file":"Touchable.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Touchable.ts"],"names":[],"mappings":"AA+CA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAerB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "47.0.1-9fd6f2.2+9fd6f28",
3
+ "version": "47.0.1-ad0ed2.2+ad0ed2c",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^47.0.1-9fd6f2.2+9fd6f28",
44
+ "@draftbit/types": "^47.0.1-ad0ed2.2+ad0ed2c",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.4",
@@ -91,5 +91,5 @@
91
91
  ]
92
92
  ]
93
93
  },
94
- "gitHead": "9fd6f289b4dc38787b6d90b479ef5977e85ba64e"
94
+ "gitHead": "ad0ed2cfe004a524b2c1dba7e6e4a3f66551fcfc"
95
95
  }
@@ -7,7 +7,7 @@ const CONSTANTS = {
7
7
  padding: 8,
8
8
  icon: 24,
9
9
  };
10
- function Base({ Icon, icon, title, onPress, loading, disabled, style, ...props }) {
10
+ function Base({ Icon, icon, title, loading, disabled, style, activeOpacity, disabledOpacity, ...props }) {
11
11
  const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...buttonStyles } = StyleSheet.flatten(style || {});
12
12
  const titleStyles = {
13
13
  color,
@@ -28,11 +28,11 @@ function Base({ Icon, icon, title, onPress, loading, disabled, style, ...props }
28
28
  if (textAlign === "right") {
29
29
  buttonStyles.justifyContent = "flex-end";
30
30
  }
31
- return (React.createElement(Pressable, { onPress: onPress, disabled: disabled || loading, style: ({ pressed }) => {
31
+ return (React.createElement(Pressable, { disabled: disabled || loading, style: ({ pressed }) => {
32
32
  return [
33
33
  styles.base,
34
34
  {
35
- opacity: pressed || disabled ? 0.75 : 1,
35
+ opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
36
36
  },
37
37
  buttonStyles,
38
38
  ];
@@ -2,10 +2,10 @@ import * as React from "react";
2
2
  import {
3
3
  Text,
4
4
  Pressable,
5
+ PressableProps,
5
6
  Platform,
6
7
  StyleSheet,
7
8
  TextStyle,
8
- PressableProps,
9
9
  ActivityIndicator,
10
10
  } from "react-native";
11
11
 
@@ -27,6 +27,11 @@ type BaseProps = {
27
27
  loading: boolean;
28
28
  style?: TextStyle;
29
29
  onPress: () => void;
30
+ onLongPress?: () => void;
31
+ activeOpacity?: number;
32
+ disabledOpacity?: number;
33
+ delayLongPress?: number;
34
+ hitSlop?: number;
30
35
  icon?: string;
31
36
  } & PressableProps &
32
37
  IconSlot;
@@ -37,6 +42,11 @@ type Props = {
37
42
  loading: boolean;
38
43
  style?: TextStyle;
39
44
  onPress: () => void;
45
+ onLongPress?: () => void;
46
+ activeOpacity?: number;
47
+ disabledOpacity?: number;
48
+ delayLongPress?: number;
49
+ hitSlop?: number;
40
50
  icon?: string;
41
51
  theme: Theme;
42
52
  } & PressableProps &
@@ -46,10 +56,11 @@ function Base({
46
56
  Icon,
47
57
  icon,
48
58
  title,
49
- onPress,
50
59
  loading,
51
60
  disabled,
52
61
  style,
62
+ activeOpacity,
63
+ disabledOpacity,
53
64
  ...props
54
65
  }: BaseProps): JSX.Element {
55
66
  const {
@@ -91,13 +102,12 @@ function Base({
91
102
 
92
103
  return (
93
104
  <Pressable
94
- onPress={onPress}
95
105
  disabled={disabled || loading}
96
106
  style={({ pressed }) => {
97
107
  return [
98
108
  styles.base,
99
109
  {
100
- opacity: pressed || disabled ? 0.75 : 1,
110
+ opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
101
111
  },
102
112
  buttonStyles,
103
113
  ];
@@ -1,7 +1,6 @@
1
1
  import * as React from "react";
2
- import { View, StyleSheet, } from "react-native";
2
+ import { View, StyleSheet, Pressable, } from "react-native";
3
3
  import { useTheme } from "../../theming";
4
- import Touchable from "../Touchable";
5
4
  import { usePrevious } from "../../hooks";
6
5
  const Checkbox = ({ Icon, status, disabled = false, onPress, onCheck, onUncheck, color, uncheckedColor, defaultValue, checkedIcon = "MaterialCommunityIcons/checkbox-marked", uncheckedIcon = "MaterialCommunityIcons/checkbox-blank-outline", size = 24, style, ...rest }) => {
7
6
  const [internalValue, setInternalValue] = React.useState(status || defaultValue || false);
@@ -33,7 +32,7 @@ const Checkbox = ({ Icon, status, disabled = false, onPress, onCheck, onUncheck,
33
32
  onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
34
33
  }
35
34
  };
36
- return (React.createElement(Touchable, { ...rest, onPress: handlePress, disabled: disabled, accessibilityState: { disabled }, accessibilityRole: "button", accessibilityLiveRegion: "polite", style: [styles.container, style, { width: size, height: size }] },
35
+ return (React.createElement(Pressable, { ...rest, onPress: handlePress, disabled: disabled, accessibilityState: { disabled }, accessibilityRole: "button", accessibilityLiveRegion: "polite", style: [styles.container, style, { width: size, height: size }] },
37
36
  React.createElement(Icon, { style: styles.icon, name: internalValue ? checkedIcon : uncheckedIcon, size: size, color: checkboxColor }),
38
37
  React.createElement(View, { style: [StyleSheet.absoluteFill, styles.fillContainer] },
39
38
  React.createElement(View, { style: [
@@ -2,14 +2,14 @@ import * as React from "react";
2
2
  import {
3
3
  View,
4
4
  StyleSheet,
5
- TouchableHighlightProps,
5
+ Pressable,
6
+ PressableProps,
6
7
  StyleProp,
7
8
  ViewStyle,
8
9
  } from "react-native";
9
10
  import { useTheme } from "../../theming";
10
11
  import type { IconSlot } from "../../interfaces/Icon";
11
12
 
12
- import Touchable from "../Touchable";
13
13
  import { usePrevious } from "../../hooks";
14
14
 
15
15
  export interface CheckboxProps {
@@ -27,9 +27,7 @@ export interface CheckboxProps {
27
27
  style?: StyleProp<ViewStyle>;
28
28
  }
29
29
 
30
- const Checkbox: React.FC<
31
- CheckboxProps & TouchableHighlightProps & IconSlot
32
- > = ({
30
+ const Checkbox: React.FC<CheckboxProps & PressableProps & IconSlot> = ({
33
31
  Icon,
34
32
  status,
35
33
  disabled = false,
@@ -87,7 +85,7 @@ const Checkbox: React.FC<
87
85
  };
88
86
 
89
87
  return (
90
- <Touchable
88
+ <Pressable
91
89
  {...rest}
92
90
  onPress={handlePress}
93
91
  disabled={disabled}
@@ -111,7 +109,7 @@ const Checkbox: React.FC<
111
109
  ]}
112
110
  />
113
111
  </View>
114
- </Touchable>
112
+ </Pressable>
115
113
  );
116
114
  };
117
115
 
@@ -1,10 +1,9 @@
1
1
  import * as React from "react";
2
- import { StyleSheet, View, Platform, } from "react-native";
2
+ import { StyleSheet, View, Platform, Pressable, } from "react-native";
3
3
  import Checkbox from "./Checkbox";
4
4
  import Text from "../Text";
5
5
  import { useCheckboxGroupContext } from "./context";
6
6
  import { Direction as GroupDirection } from "./context";
7
- import Touchable from "../Touchable";
8
7
  import { extractStyles } from "../../utilities";
9
8
  export var Direction;
10
9
  (function (Direction) {
@@ -41,7 +40,7 @@ const CheckboxGroupRow = ({ Icon, label = "Label", status, value, onPress, label
41
40
  }
42
41
  };
43
42
  const { textStyles, viewStyles } = extractStyles(style);
44
- return (React.createElement(Touchable, { onPress: handlePress, style: [styles.mainParent, { flexDirection: direction }, viewStyles], disabled: disabled, ...rest },
43
+ return (React.createElement(Pressable, { onPress: handlePress, style: [styles.mainParent, { flexDirection: direction }, viewStyles], disabled: disabled, ...rest },
45
44
  React.createElement(View, { style: [
46
45
  styles.label,
47
46
  {
@@ -6,13 +6,13 @@ import {
6
6
  TextStyle,
7
7
  View,
8
8
  Platform,
9
+ Pressable,
9
10
  } from "react-native";
10
11
  import Checkbox, { CheckboxProps } from "./Checkbox";
11
12
  import Text from "../Text";
12
13
  import { useCheckboxGroupContext } from "./context";
13
14
  import type { IconSlot } from "../../interfaces/Icon";
14
15
  import { Direction as GroupDirection } from "./context";
15
- import Touchable from "../Touchable";
16
16
  import { extractStyles } from "../../utilities";
17
17
 
18
18
  export enum Direction {
@@ -92,7 +92,7 @@ const CheckboxGroupRow: React.FC<CheckboxGroupRowProps & IconSlot> = ({
92
92
  const { textStyles, viewStyles } = extractStyles(style);
93
93
 
94
94
  return (
95
- <Touchable
95
+ <Pressable
96
96
  onPress={handlePress}
97
97
  style={[styles.mainParent, { flexDirection: direction }, viewStyles]}
98
98
  disabled={disabled}
@@ -125,7 +125,7 @@ const CheckboxGroupRow: React.FC<CheckboxGroupRowProps & IconSlot> = ({
125
125
  uncheckedColor={uncheckedColor}
126
126
  />
127
127
  </View>
128
- </Touchable>
128
+ </Pressable>
129
129
  );
130
130
  };
131
131