bootstrap-rn 0.3.4 → 0.3.5

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 (120) hide show
  1. package/lib/commonjs/components/Image.js.map +1 -1
  2. package/lib/commonjs/components/ImageBackground.js.map +1 -1
  3. package/lib/commonjs/components/Text.js.map +1 -1
  4. package/lib/commonjs/components/dropdown/DropdownMenu.js.map +1 -1
  5. package/lib/commonjs/components/modal/ModalContext.js.map +1 -1
  6. package/lib/commonjs/components/nav/Nav.js.map +1 -1
  7. package/lib/commonjs/components/nav/NavContext.js.map +1 -1
  8. package/lib/commonjs/components/nav/TabContext.js.map +1 -1
  9. package/lib/commonjs/components/navbar/NavbarContext.js.map +1 -1
  10. package/lib/commonjs/components/offcanvas/OffcanvasContext.js.map +1 -1
  11. package/lib/commonjs/components/popover/injectPopover.js.map +1 -1
  12. package/lib/commonjs/components/toasts/ToastContainer.js +3 -1
  13. package/lib/commonjs/components/toasts/ToastContainer.js.map +1 -1
  14. package/lib/commonjs/components/tooltip/injectTooltip.js +0 -3
  15. package/lib/commonjs/components/tooltip/injectTooltip.js.map +1 -1
  16. package/lib/commonjs/index.d.ts +47 -8
  17. package/lib/commonjs/index.js +0 -56
  18. package/lib/commonjs/index.js.map +1 -1
  19. package/lib/commonjs/style/StyleSheet.js +4 -2
  20. package/lib/commonjs/style/StyleSheet.js.map +1 -1
  21. package/lib/commonjs/types.d.ts +6 -3
  22. package/lib/module/components/Image.js.map +1 -1
  23. package/lib/module/components/ImageBackground.js.map +1 -1
  24. package/lib/module/components/Text.js.map +1 -1
  25. package/lib/module/components/dropdown/DropdownMenu.js.map +1 -1
  26. package/lib/module/components/modal/ModalContext.js.map +1 -1
  27. package/lib/module/components/nav/Nav.js.map +1 -1
  28. package/lib/module/components/nav/NavContext.js.map +1 -1
  29. package/lib/module/components/nav/TabContext.js.map +1 -1
  30. package/lib/module/components/navbar/NavbarContext.js.map +1 -1
  31. package/lib/module/components/offcanvas/OffcanvasContext.js.map +1 -1
  32. package/lib/module/components/popover/injectPopover.js.map +1 -1
  33. package/lib/module/components/toasts/ToastContainer.js +3 -1
  34. package/lib/module/components/toasts/ToastContainer.js.map +1 -1
  35. package/lib/module/components/tooltip/injectTooltip.js +0 -3
  36. package/lib/module/components/tooltip/injectTooltip.js.map +1 -1
  37. package/lib/module/index.d.ts +47 -8
  38. package/lib/module/index.js +0 -7
  39. package/lib/module/index.js.map +1 -1
  40. package/lib/module/style/StyleSheet.js +4 -2
  41. package/lib/module/style/StyleSheet.js.map +1 -1
  42. package/lib/module/types.d.ts +6 -3
  43. package/lib/types/components/Image.d.ts.map +1 -1
  44. package/lib/types/components/ImageBackground.d.ts.map +1 -1
  45. package/lib/types/components/Text.d.ts +1 -1
  46. package/lib/types/components/Text.d.ts.map +1 -1
  47. package/lib/types/components/dropdown/Dropdown.d.ts +2 -11
  48. package/lib/types/components/dropdown/Dropdown.d.ts.map +1 -1
  49. package/lib/types/components/dropdown/DropdownContext.d.ts +2 -2
  50. package/lib/types/components/dropdown/DropdownContext.d.ts.map +1 -1
  51. package/lib/types/components/dropdown/DropdownMenu.d.ts +2 -2
  52. package/lib/types/components/dropdown/DropdownMenu.d.ts.map +1 -1
  53. package/lib/types/components/dropdown/DropdownToggle.d.ts +2 -2
  54. package/lib/types/components/dropdown/DropdownToggle.d.ts.map +1 -1
  55. package/lib/types/components/list-group/ListGroup.d.ts +1 -1
  56. package/lib/types/components/list-group/ListGroupItem.d.ts +13 -1
  57. package/lib/types/components/list-group/ListGroupItem.d.ts.map +1 -1
  58. package/lib/types/components/list-group/ListGroupItemAction.d.ts +2 -2
  59. package/lib/types/components/list-group/ListGroupItemAction.d.ts.map +1 -1
  60. package/lib/types/components/modal/Modal.d.ts +1 -3
  61. package/lib/types/components/modal/Modal.d.ts.map +1 -1
  62. package/lib/types/components/modal/ModalContext.d.ts +3 -3
  63. package/lib/types/components/modal/ModalContext.d.ts.map +1 -1
  64. package/lib/types/components/nav/Nav.d.ts +1 -3
  65. package/lib/types/components/nav/Nav.d.ts.map +1 -1
  66. package/lib/types/components/nav/NavContext.d.ts +3 -3
  67. package/lib/types/components/nav/NavContext.d.ts.map +1 -1
  68. package/lib/types/components/nav/Tab.d.ts +1 -1
  69. package/lib/types/components/nav/TabContext.d.ts +3 -3
  70. package/lib/types/components/nav/TabContext.d.ts.map +1 -1
  71. package/lib/types/components/navbar/Navbar.d.ts +1 -1
  72. package/lib/types/components/navbar/NavbarBrand.d.ts +2 -2
  73. package/lib/types/components/navbar/NavbarBrand.d.ts.map +1 -1
  74. package/lib/types/components/navbar/NavbarContext.d.ts +2 -2
  75. package/lib/types/components/navbar/NavbarContext.d.ts.map +1 -1
  76. package/lib/types/components/offcanvas/Offcanvas.d.ts +1 -3
  77. package/lib/types/components/offcanvas/Offcanvas.d.ts.map +1 -1
  78. package/lib/types/components/offcanvas/OffcanvasContext.d.ts +2 -2
  79. package/lib/types/components/offcanvas/OffcanvasContext.d.ts.map +1 -1
  80. package/lib/types/components/popover/injectPopover.d.ts +9 -12
  81. package/lib/types/components/popover/injectPopover.d.ts.map +1 -1
  82. package/lib/types/components/toasts/ToastContainer.d.ts +4 -2
  83. package/lib/types/components/toasts/ToastContainer.d.ts.map +1 -1
  84. package/lib/types/components/tooltip/injectTooltip.d.ts +8 -11
  85. package/lib/types/components/tooltip/injectTooltip.d.ts.map +1 -1
  86. package/lib/types/hooks/useBackground.native.d.ts +3 -1
  87. package/lib/types/hooks/useBackground.native.d.ts.map +1 -1
  88. package/lib/types/index.d.ts +47 -8
  89. package/lib/types/index.d.ts.map +1 -1
  90. package/lib/types/style/StyleSheet.d.ts +2 -3
  91. package/lib/types/style/StyleSheet.d.ts.map +1 -1
  92. package/lib/types/style/createStyle.d.ts +3 -1
  93. package/lib/types/style/createStyle.d.ts.map +1 -1
  94. package/lib/types/style/css.d.ts +3 -1
  95. package/lib/types/style/css.d.ts.map +1 -1
  96. package/lib/types/theme/variables.d.ts +3 -1
  97. package/lib/types/theme/variables.d.ts.map +1 -1
  98. package/lib/types/types.d.ts +6 -3
  99. package/lib/types/types.d.ts.map +1 -1
  100. package/package.json +80 -80
  101. package/src/components/Image.tsx +31 -27
  102. package/src/components/ImageBackground.tsx +48 -46
  103. package/src/components/Text.tsx +119 -117
  104. package/src/components/dropdown/DropdownContext.ts +2 -2
  105. package/src/components/dropdown/DropdownMenu.tsx +127 -125
  106. package/src/components/dropdown/DropdownToggle.ts +2 -2
  107. package/src/components/list-group/ListGroupItemAction.tsx +2 -2
  108. package/src/components/modal/ModalContext.ts +3 -3
  109. package/src/components/nav/Nav.tsx +4 -4
  110. package/src/components/nav/NavContext.ts +3 -3
  111. package/src/components/nav/TabContext.ts +3 -3
  112. package/src/components/navbar/NavbarBrand.tsx +2 -2
  113. package/src/components/navbar/NavbarContext.ts +2 -2
  114. package/src/components/offcanvas/OffcanvasContext.ts +4 -2
  115. package/src/components/popover/injectPopover.tsx +97 -98
  116. package/src/components/toasts/ToastContainer.tsx +41 -39
  117. package/src/components/tooltip/injectTooltip.tsx +93 -96
  118. package/src/index.ts +242 -211
  119. package/src/style/StyleSheet.ts +149 -138
  120. package/src/types.ts +168 -162
@@ -1,9 +1,8 @@
1
1
  import { StyleSheet as BaseStyleSheet } from 'react-native';
2
2
  import type { ExtendedStyle, ThemeVariables } from '../types';
3
- type StyleSource = Record<string, (theme: object, key: string) => ExtendedStyle | ExtendedStyle>;
4
- type NamedExtendedStyles = Record<string, ExtendedStyle>;
3
+ type StyleSourceEntry = ((theme: object, key: string) => ExtendedStyle) | ExtendedStyle;
5
4
  declare const StyleSheet: {
6
- create(source: StyleSource): NamedExtendedStyles;
5
+ create<T extends string>(source: { [K in T]: StyleSourceEntry; }): { [K_1 in T]: ExtendedStyle; };
7
6
  build(theme: ThemeVariables, key?: string): void;
8
7
  value(key: keyof ThemeVariables): any;
9
8
  absoluteFill: import("react-native").RegisteredStyle<BaseStyleSheet.AbsoluteFillStyle>;
@@ -1 +1 @@
1
- {"version":3,"file":"StyleSheet.d.ts","sourceRoot":"","sources":["../../../src/style/StyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAa,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzE,KAAK,WAAW,GAAG,MAAM,CACvB,MAAM,EACN,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,aAAa,GAAG,aAAa,CAC9D,CAAC;AAEF,KAAK,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAmEzD,QAAA,MAAM,UAAU;mBACC,WAAW;iBAmBb,cAAc,QAAO,MAAM;eA2B7B,MAAM,cAAc;;;;CAahC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"StyleSheet.d.ts","sourceRoot":"","sources":["../../../src/style/StyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAa,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzE,KAAK,gBAAgB,GACjB,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,aAAa,CAAC,GAC/C,aAAa,CAAC;AA+ElB,QAAA,MAAM,UAAU;;iBAsBD,cAAc,QAAO,MAAM;eA2B7B,MAAM,cAAc;;;;CAahC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,6 +1,8 @@
1
1
  import type { StyleDefinition } from './transform';
2
2
  import type { SpecialInteractionStyle, BaseStyle } from '../types';
3
3
  export declare const BOOTSTRAP_RN_STYLE: unique symbol;
4
- declare function createStyle(definitions: StyleDefinition[]): import("react-native").ViewStyle | import("react-native").ImageStyle | SpecialInteractionStyle<BaseStyle>;
4
+ declare function createStyle(definitions: StyleDefinition[]): import("react-native").ViewStyle | (Omit<import("react-native").ImageStyle, "overflow"> & {
5
+ overflow?: "visible" | "hidden" | "scroll" | undefined;
6
+ }) | SpecialInteractionStyle<BaseStyle>;
5
7
  export default createStyle;
6
8
  //# sourceMappingURL=createStyle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createStyle.d.ts","sourceRoot":"","sources":["../../../src/style/createStyle.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEnE,eAAO,MAAM,kBAAkB,eAAmC,CAAC;AAanE,iBAAS,WAAW,CAAC,WAAW,EAAE,eAAe,EAAE,6GA2ElD;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"createStyle.d.ts","sourceRoot":"","sources":["../../../src/style/createStyle.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEnE,eAAO,MAAM,kBAAkB,eAAmC,CAAC;AAanE,iBAAS,WAAW,CAAC,WAAW,EAAE,eAAe,EAAE;;wCA2ElD;AAED,eAAe,WAAW,CAAC"}
@@ -1,6 +1,8 @@
1
1
  import type { ThemeVariables, StyleValue } from '../types';
2
2
  export default function css(fragments: readonly string[], ...tags: (string | ((t: ThemeVariables) => StyleValue))[]): {
3
- (theme: object, key: string): import("react-native").ViewStyle | import("react-native").ImageStyle | import("../types").SpecialInteractionStyle<import("../types").BaseStyle>;
3
+ (theme: object, key: string): import("react-native").ViewStyle | (Omit<import("react-native").ImageStyle, "overflow"> & {
4
+ overflow?: "visible" | "hidden" | "scroll" | undefined;
5
+ }) | import("../types").SpecialInteractionStyle<import("../types").BaseStyle>;
4
6
  ast: import("./transform").RootNode;
5
7
  };
6
8
  //# sourceMappingURL=css.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/style/css.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,GAAG,CACzB,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,GAAG,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,cAAc,KAAK,UAAU,CAAC,CAAC,EAAE;YAIlC,MAAM,OAAO,MAAM;;EAS3C"}
1
+ {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/style/css.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3D,MAAM,CAAC,OAAO,UAAU,GAAG,CACzB,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,GAAG,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,cAAc,KAAK,UAAU,CAAC,CAAC,EAAE;YAIlC,MAAM,OAAO,MAAM;;;;EAS3C"}
@@ -1,5 +1,7 @@
1
1
  declare const variables: {
2
- (theme: object, key: string): import("react-native").ViewStyle | import("react-native").ImageStyle | import("../types").SpecialInteractionStyle<import("../types").BaseStyle>;
2
+ (theme: object, key: string): import("react-native").ViewStyle | (Omit<import("react-native").ImageStyle, "overflow"> & {
3
+ overflow?: "visible" | "hidden" | "scroll" | undefined;
4
+ }) | import("../types").SpecialInteractionStyle<import("../types").BaseStyle>;
3
5
  ast: import("../style/transform").RootNode;
4
6
  };
5
7
  export default variables;
@@ -1 +1 @@
1
- {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../../src/theme/variables.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,SAAS;;;CAw3Cd,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../../../src/theme/variables.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,SAAS;;;;;CAw3Cd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ViewStyle as BaseViewStyle, ImageStyle as BaseImageStyle, TextStyle as BaseTextStyle, GestureResponderEvent, Role, NativeSyntheticEvent, TextInputKeyPressEventData } from 'react-native';
1
+ import { ViewStyle as BaseViewStyle, ImageStyle as TempImageStyle, TextStyle as BaseTextStyle, GestureResponderEvent, Role, NativeSyntheticEvent, TextInputKeyPressEventData } from 'react-native';
2
2
  import type { Placement, Axis, PlacementAxis } from '@react-types/overlays';
3
3
  import { BOOTSTRAP_RN_STYLE } from './style/createStyle';
4
4
  export type Viewport = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
@@ -8,6 +8,9 @@ export type MediaHandler = {
8
8
  only: (point: Viewport) => boolean;
9
9
  between: (lower: Viewport, upper: Viewport) => boolean;
10
10
  };
11
+ type BaseImageStyle = Omit<TempImageStyle, 'overflow'> & {
12
+ overflow?: 'visible' | 'hidden' | 'scroll';
13
+ };
11
14
  export type BaseStyle = BaseViewStyle | BaseImageStyle | BaseTextStyle;
12
15
  export type InteractionState = {
13
16
  interaction?: {
@@ -59,11 +62,11 @@ type To = string | Partial<{
59
62
  search: string;
60
63
  hash: string;
61
64
  }>;
62
- type External = boolean | {
65
+ type External = boolean | Partial<{
63
66
  download: boolean;
64
67
  target: string;
65
68
  rel: string;
66
- };
69
+ }>;
67
70
  export type UseTabbableProps = {
68
71
  to?: To;
69
72
  external?: External;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,IAAI,aAAa,EAC1B,UAAU,IAAI,cAAc,EAC5B,SAAS,IAAI,aAAa,EAC1B,qBAAqB,EACrB,IAAI,EACJ,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,K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AE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAEP,KAAK,QAAQ,GACT,OAAO,GACP,OAAO,CAAC;IACN,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb,CAAC,CAAC;AAEP,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,CAAC,EAAE,EAAE,CAAC;IACR,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,EAAE,CAAC;IACR,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,OAAO,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC,CAAC;IAC1D,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAoB,CAAC,0BAA0B,CAAC,KAAK,IAAI,CAAC;CAC5E,CAAC"}
package/package.json CHANGED
@@ -1,80 +1,80 @@
1
- {
2
- "name": "bootstrap-rn",
3
- "version": "0.3.4",
4
- "description": "Bootstrap RN provides Bootstrap components for React Native.",
5
- "author": "Markus Wetzel <markuswetzel@gmx.net>",
6
- "license": "MIT",
7
- "keywords": [
8
- "react",
9
- "native",
10
- "react-native",
11
- "bootstrap",
12
- "ui",
13
- "style"
14
- ],
15
- "repository": "https://github.com/examunity/bootstrap-rn.git",
16
- "bugs": {
17
- "url": "https://github.com/examunity/bootstrap-rn/issues"
18
- },
19
- "main": "lib/commonjs/index.js",
20
- "module": "lib/module/index.js",
21
- "types": "./lib/types/index.d.ts",
22
- "scripts": {
23
- "check-types": "tsc --noEmit",
24
- "build-types": "rm -rf lib/types && tsc -d --emitDeclarationOnly",
25
- "copy-types": "cpy lib/types/*.d.ts lib/commonjs && cpy lib/types/*.d.ts lib/module",
26
- "build": "yarn build-types && bob build && yarn copy-types",
27
- "prepare": "packsy validate && yarn build",
28
- "lint": "packsy pre-commit && yarn check-types"
29
- },
30
- "files": [
31
- "src",
32
- "lib"
33
- ],
34
- "dependencies": {
35
- "@react-native-aria/focus": "^0.2.7",
36
- "@react-native-aria/overlays": "^0.3.5",
37
- "css-to-react-native": "^3.2.0",
38
- "tiny-invariant": "^1.3.1"
39
- },
40
- "devDependencies": {
41
- "@types/react": "18.3.2",
42
- "cpy-cli": "^5.0.0",
43
- "packsy": "^0.2.4",
44
- "react": "18.3.1",
45
- "react-dom": "18.3.1",
46
- "react-native": "0.72.5",
47
- "react-native-builder-bob": "^0.23.1",
48
- "react-native-svg": "13.9.0",
49
- "typescript": "^5.4.5"
50
- },
51
- "peerDependencies": {
52
- "@types/react": ">=17",
53
- "react": ">=17",
54
- "react-dom": ">=17",
55
- "react-native": ">=0.63.0",
56
- "react-native-svg": ">=12.3.0"
57
- },
58
- "peerDependenciesMeta": {
59
- "@types/react": {
60
- "optional": true
61
- }
62
- },
63
- "husky": {
64
- "hooks": {
65
- "pre-commit": "packsy pre-commit"
66
- }
67
- },
68
- "react-native-builder-bob": {
69
- "source": "src",
70
- "output": "lib",
71
- "targets": [
72
- "commonjs",
73
- "module"
74
- ]
75
- },
76
- "engines": {
77
- "node": ">= 8",
78
- "npm": ">= 5"
79
- }
80
- }
1
+ {
2
+ "name": "bootstrap-rn",
3
+ "version": "0.3.5",
4
+ "description": "Bootstrap RN provides Bootstrap components for React Native.",
5
+ "author": "Markus Wetzel <markuswetzel@gmx.net>",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "react",
9
+ "native",
10
+ "react-native",
11
+ "bootstrap",
12
+ "ui",
13
+ "style"
14
+ ],
15
+ "repository": "https://github.com/examunity/bootstrap-rn.git",
16
+ "bugs": {
17
+ "url": "https://github.com/examunity/bootstrap-rn/issues"
18
+ },
19
+ "main": "lib/commonjs/index.js",
20
+ "module": "lib/module/index.js",
21
+ "types": "./lib/types/index.d.ts",
22
+ "scripts": {
23
+ "check-types": "tsc --noEmit",
24
+ "build-types": "rm -rf lib/types && tsc -d --emitDeclarationOnly",
25
+ "copy-types": "cpy lib/types/*.d.ts lib/commonjs && cpy lib/types/*.d.ts lib/module",
26
+ "build": "yarn build-types && bob build && yarn copy-types",
27
+ "prepare": "packsy validate && yarn build",
28
+ "lint": "packsy pre-commit && yarn check-types"
29
+ },
30
+ "files": [
31
+ "src",
32
+ "lib"
33
+ ],
34
+ "dependencies": {
35
+ "@react-native-aria/focus": "^0.2.7",
36
+ "@react-native-aria/overlays": "^0.3.5",
37
+ "css-to-react-native": "^3.2.0",
38
+ "tiny-invariant": "^1.3.1"
39
+ },
40
+ "devDependencies": {
41
+ "@types/react": "18.3.2",
42
+ "cpy-cli": "^5.0.0",
43
+ "packsy": "^0.2.4",
44
+ "react": "18.3.1",
45
+ "react-dom": "18.3.1",
46
+ "react-native": "0.72.5",
47
+ "react-native-builder-bob": "^0.23.1",
48
+ "react-native-svg": "13.9.0",
49
+ "typescript": "^5.4.5"
50
+ },
51
+ "peerDependencies": {
52
+ "@types/react": ">=17",
53
+ "react": ">=17",
54
+ "react-dom": ">=17",
55
+ "react-native": ">=0.63.0",
56
+ "react-native-svg": ">=12.3.0"
57
+ },
58
+ "peerDependenciesMeta": {
59
+ "@types/react": {
60
+ "optional": true
61
+ }
62
+ },
63
+ "husky": {
64
+ "hooks": {
65
+ "pre-commit": "packsy pre-commit"
66
+ }
67
+ },
68
+ "react-native-builder-bob": {
69
+ "source": "src",
70
+ "output": "lib",
71
+ "targets": [
72
+ "commonjs",
73
+ "module"
74
+ ]
75
+ },
76
+ "engines": {
77
+ "node": ">= 8",
78
+ "npm": ">= 5"
79
+ }
80
+ }
@@ -1,27 +1,31 @@
1
- import React from 'react';
2
- import { Image as BaseImage, ImageProps as BaseImageProps } from 'react-native';
3
- import useMedia from '../hooks/useMedia';
4
- import useStyle from '../hooks/useStyle';
5
- import type { ExtendedImageStyle, StyleProp, StyleName } from '../types';
6
-
7
- export type ImageRef = BaseImage;
8
-
9
- export interface ImageProps extends Omit<BaseImageProps, 'style'> {
10
- style?: StyleProp<ExtendedImageStyle>;
11
- styleName?: StyleName;
12
- }
13
-
14
- const Image = React.forwardRef<BaseImage, ImageProps>((props, ref) => {
15
- const { style, styleName, ...elementProps } = props;
16
-
17
- const media = useMedia();
18
- const resolveStyle = useStyle(style, styleName);
19
-
20
- return (
21
- <BaseImage {...elementProps} ref={ref} style={resolveStyle({ media })} />
22
- );
23
- });
24
-
25
- Image.displayName = 'Image';
26
-
27
- export default Image;
1
+ import React from 'react';
2
+ import { Image as BaseImage, ImageProps as BaseImageProps } from 'react-native';
3
+ import useMedia from '../hooks/useMedia';
4
+ import useStyle from '../hooks/useStyle';
5
+ import type { ExtendedImageStyle, StyleProp, StyleName } from '../types';
6
+
7
+ export type ImageRef = BaseImage;
8
+
9
+ export interface ImageProps extends Omit<BaseImageProps, 'style'> {
10
+ style?: StyleProp<ExtendedImageStyle>;
11
+ styleName?: StyleName;
12
+ }
13
+
14
+ const Image = React.forwardRef<BaseImage, ImageProps>((props, ref) => {
15
+ const { style, styleName, ...elementProps } = props;
16
+
17
+ const media = useMedia();
18
+ const resolveStyle = useStyle(style, styleName);
19
+
20
+ return (
21
+ <BaseImage
22
+ {...elementProps}
23
+ ref={ref}
24
+ style={resolveStyle({ media }) as BaseImageProps['style']}
25
+ />
26
+ );
27
+ });
28
+
29
+ Image.displayName = 'Image';
30
+
31
+ export default Image;
@@ -1,46 +1,48 @@
1
- import React from 'react';
2
- import {
3
- ImageBackground as BaseImageBackground,
4
- ImageBackgroundProps as BaseImageBackgroundProps,
5
- } from 'react-native';
6
- import useMedia from '../hooks/useMedia';
7
- import useStyle from '../hooks/useStyle';
8
- import type {
9
- ExtendedViewStyle,
10
- ExtendedImageStyle,
11
- StyleProp,
12
- StyleName,
13
- } from '../types';
14
-
15
- export type ImageBackgroundRef = BaseImageBackground;
16
-
17
- export interface ImageBackgroundProps
18
- extends Omit<BaseImageBackgroundProps, 'style' | 'imageStyle'> {
19
- style?: StyleProp<ExtendedViewStyle>;
20
- imageStyle?: StyleProp<ExtendedImageStyle>;
21
- styleName?: StyleName;
22
- }
23
-
24
- const ImageBackground = React.forwardRef<
25
- ImageBackgroundRef,
26
- ImageBackgroundProps
27
- >((props, ref) => {
28
- const { style, imageStyle, styleName, ...elementProps } = props;
29
-
30
- const media = useMedia();
31
- const resolveStyle = useStyle(style, styleName);
32
- const resolveImageStyle = useStyle(imageStyle);
33
-
34
- return (
35
- <BaseImageBackground
36
- {...elementProps}
37
- ref={ref}
38
- style={resolveStyle({ media })}
39
- imageStyle={resolveImageStyle({ media })}
40
- />
41
- );
42
- });
43
-
44
- ImageBackground.displayName = 'ImageBackground';
45
-
46
- export default ImageBackground;
1
+ import React from 'react';
2
+ import {
3
+ ImageBackground as BaseImageBackground,
4
+ ImageBackgroundProps as BaseImageBackgroundProps,
5
+ } from 'react-native';
6
+ import useMedia from '../hooks/useMedia';
7
+ import useStyle from '../hooks/useStyle';
8
+ import type {
9
+ ExtendedViewStyle,
10
+ ExtendedImageStyle,
11
+ StyleProp,
12
+ StyleName,
13
+ } from '../types';
14
+
15
+ export type ImageBackgroundRef = BaseImageBackground;
16
+
17
+ export interface ImageBackgroundProps
18
+ extends Omit<BaseImageBackgroundProps, 'style' | 'imageStyle'> {
19
+ style?: StyleProp<ExtendedViewStyle>;
20
+ imageStyle?: StyleProp<ExtendedImageStyle>;
21
+ styleName?: StyleName;
22
+ }
23
+
24
+ const ImageBackground = React.forwardRef<
25
+ ImageBackgroundRef,
26
+ ImageBackgroundProps
27
+ >((props, ref) => {
28
+ const { style, imageStyle, styleName, ...elementProps } = props;
29
+
30
+ const media = useMedia();
31
+ const resolveStyle = useStyle(style, styleName);
32
+ const resolveImageStyle = useStyle(imageStyle);
33
+
34
+ return (
35
+ <BaseImageBackground
36
+ {...elementProps}
37
+ ref={ref}
38
+ style={resolveStyle({ media })}
39
+ imageStyle={
40
+ resolveImageStyle({ media }) as BaseImageBackgroundProps['imageStyle']
41
+ }
42
+ />
43
+ );
44
+ });
45
+
46
+ ImageBackground.displayName = 'ImageBackground';
47
+
48
+ export default ImageBackground;