@molecule/app-ui-react-native 1.0.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.
- package/LICENSE +115 -0
- package/README.md +1997 -0
- package/dist/components/Accordion.d.ts +22 -0
- package/dist/components/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion.js +58 -0
- package/dist/components/Alert.d.ts +23 -0
- package/dist/components/Alert.d.ts.map +1 -0
- package/dist/components/Alert.js +25 -0
- package/dist/components/Avatar.d.ts +22 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar.js +38 -0
- package/dist/components/Badge.d.ts +21 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Badge.js +20 -0
- package/dist/components/Button.d.ts +27 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +26 -0
- package/dist/components/Card.d.ts +77 -0
- package/dist/components/Card.d.ts.map +1 -0
- package/dist/components/Card.js +77 -0
- package/dist/components/Checkbox.d.ts +22 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox.js +31 -0
- package/dist/components/Dropdown.d.ts +35 -0
- package/dist/components/Dropdown.d.ts.map +1 -0
- package/dist/components/Dropdown.js +54 -0
- package/dist/components/Form.d.ts +48 -0
- package/dist/components/Form.d.ts.map +1 -0
- package/dist/components/Form.js +46 -0
- package/dist/components/Input.d.ts +13 -0
- package/dist/components/Input.d.ts.map +1 -0
- package/dist/components/Input.js +36 -0
- package/dist/components/Layout.d.ts +59 -0
- package/dist/components/Layout.d.ts.map +1 -0
- package/dist/components/Layout.js +92 -0
- package/dist/components/Modal.d.ts +22 -0
- package/dist/components/Modal.d.ts.map +1 -0
- package/dist/components/Modal.js +22 -0
- package/dist/components/Pagination.d.ts +23 -0
- package/dist/components/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination.js +46 -0
- package/dist/components/Progress.d.ts +34 -0
- package/dist/components/Progress.d.ts.map +1 -0
- package/dist/components/Progress.js +29 -0
- package/dist/components/RadioGroup.d.ts +23 -0
- package/dist/components/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup.js +35 -0
- package/dist/components/Select.d.ts +29 -0
- package/dist/components/Select.d.ts.map +1 -0
- package/dist/components/Select.js +52 -0
- package/dist/components/Separator.d.ts +18 -0
- package/dist/components/Separator.d.ts.map +1 -0
- package/dist/components/Separator.js +17 -0
- package/dist/components/Skeleton.d.ts +46 -0
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton.js +65 -0
- package/dist/components/Spinner.d.ts +17 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner.js +24 -0
- package/dist/components/Switch.d.ts +21 -0
- package/dist/components/Switch.d.ts.map +1 -0
- package/dist/components/Switch.js +23 -0
- package/dist/components/Table.d.ts +29 -0
- package/dist/components/Table.d.ts.map +1 -0
- package/dist/components/Table.js +46 -0
- package/dist/components/Tabs.d.ts +21 -0
- package/dist/components/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs.js +34 -0
- package/dist/components/Textarea.d.ts +13 -0
- package/dist/components/Textarea.d.ts.map +1 -0
- package/dist/components/Textarea.js +21 -0
- package/dist/components/Toast.d.ts +54 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/Toast.js +89 -0
- package/dist/components/Tooltip.d.ts +20 -0
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip.js +29 -0
- package/dist/components/index.d.ts +31 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +30 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/package.json +63 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tooltip component for React Native.
|
|
3
|
+
*
|
|
4
|
+
* On mobile, tooltips are triggered by long-press instead of hover.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import type { TooltipProps } from '@molecule/app-ui';
|
|
10
|
+
/**
|
|
11
|
+
* Renders a Tooltip component.
|
|
12
|
+
* @param root0 - Component props.
|
|
13
|
+
* @param root0.children - Trigger element.
|
|
14
|
+
* @param root0.content - Tooltip content.
|
|
15
|
+
* @param root0.className - CSS class name override.
|
|
16
|
+
* @param root0.testId - Test identifier.
|
|
17
|
+
* @returns The rendered Tooltip element.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
20
|
+
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/components/Tooltip.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAGpD;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA6B1C,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Tooltip component for React Native.
|
|
4
|
+
*
|
|
5
|
+
* On mobile, tooltips are triggered by long-press instead of hover.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import { useState } from 'react';
|
|
10
|
+
import { Modal as RNModal, Pressable, Text, View } from 'react-native';
|
|
11
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
12
|
+
/**
|
|
13
|
+
* Renders a Tooltip component.
|
|
14
|
+
* @param root0 - Component props.
|
|
15
|
+
* @param root0.children - Trigger element.
|
|
16
|
+
* @param root0.content - Tooltip content.
|
|
17
|
+
* @param root0.className - CSS class name override.
|
|
18
|
+
* @param root0.testId - Test identifier.
|
|
19
|
+
* @returns The rendered Tooltip element.
|
|
20
|
+
*/
|
|
21
|
+
export const Tooltip = ({ children, content, className, testId }) => {
|
|
22
|
+
const cm = getClassMap();
|
|
23
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
24
|
+
return (_jsxs(View, { className: className, testID: testId, children: [_jsx(Pressable, { className: cm.tooltipTrigger, onLongPress: () => setIsVisible(true),
|
|
25
|
+
// RN has no onClick; a normal press (the click analog) hides the tooltip —
|
|
26
|
+
// pressing a tooltip-wrapped control shouldn't leave its long-press tooltip
|
|
27
|
+
// lingering. `onPressOut` also clears it when the press is released.
|
|
28
|
+
onPress: () => setIsVisible(false), onPressOut: () => setIsVisible(false), children: children }), _jsx(RNModal, { visible: isVisible, transparent: true, animationType: "fade", children: _jsx(Pressable, { className: cm.dialogOverlay, onPress: () => setIsVisible(false), children: _jsx(View, { className: cm.cn(cm.dialogWrapper, 'pointer-events-auto'), children: _jsx(View, { className: cm.tooltip(), children: _jsx(Text, { children: content }) }) }) }) })] }));
|
|
29
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native UI component exports.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
export { Accordion } from './Accordion.js';
|
|
7
|
+
export { Alert } from './Alert.js';
|
|
8
|
+
export { Avatar } from './Avatar.js';
|
|
9
|
+
export { Badge } from './Badge.js';
|
|
10
|
+
export { Button } from './Button.js';
|
|
11
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './Card.js';
|
|
12
|
+
export { Checkbox } from './Checkbox.js';
|
|
13
|
+
export { Dropdown, DropdownLabel, DropdownSeparator } from './Dropdown.js';
|
|
14
|
+
export { Form, FormField, Label } from './Form.js';
|
|
15
|
+
export { Input } from './Input.js';
|
|
16
|
+
export { Container, Flex, Grid, Spacer } from './Layout.js';
|
|
17
|
+
export { Modal } from './Modal.js';
|
|
18
|
+
export { Pagination } from './Pagination.js';
|
|
19
|
+
export { Progress } from './Progress.js';
|
|
20
|
+
export { RadioGroup } from './RadioGroup.js';
|
|
21
|
+
export { Select } from './Select.js';
|
|
22
|
+
export { Separator } from './Separator.js';
|
|
23
|
+
export { Skeleton, SkeletonCircle, SkeletonText } from './Skeleton.js';
|
|
24
|
+
export { Spinner } from './Spinner.js';
|
|
25
|
+
export { Switch } from './Switch.js';
|
|
26
|
+
export { Table } from './Table.js';
|
|
27
|
+
export { Tabs } from './Tabs.js';
|
|
28
|
+
export { Textarea } from './Textarea.js';
|
|
29
|
+
export { Toast, ToastContainer, ToastProvider, useToast } from './Toast.js';
|
|
30
|
+
export { Tooltip } from './Tooltip.js';
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACjG,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native UI component exports.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
export { Accordion } from './Accordion.js';
|
|
7
|
+
export { Alert } from './Alert.js';
|
|
8
|
+
export { Avatar } from './Avatar.js';
|
|
9
|
+
export { Badge } from './Badge.js';
|
|
10
|
+
export { Button } from './Button.js';
|
|
11
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './Card.js';
|
|
12
|
+
export { Checkbox } from './Checkbox.js';
|
|
13
|
+
export { Dropdown, DropdownLabel, DropdownSeparator } from './Dropdown.js';
|
|
14
|
+
export { Form, FormField, Label } from './Form.js';
|
|
15
|
+
export { Input } from './Input.js';
|
|
16
|
+
export { Container, Flex, Grid, Spacer } from './Layout.js';
|
|
17
|
+
export { Modal } from './Modal.js';
|
|
18
|
+
export { Pagination } from './Pagination.js';
|
|
19
|
+
export { Progress } from './Progress.js';
|
|
20
|
+
export { RadioGroup } from './RadioGroup.js';
|
|
21
|
+
export { Select } from './Select.js';
|
|
22
|
+
export { Separator } from './Separator.js';
|
|
23
|
+
export { Skeleton, SkeletonCircle, SkeletonText } from './Skeleton.js';
|
|
24
|
+
export { Spinner } from './Spinner.js';
|
|
25
|
+
export { Switch } from './Switch.js';
|
|
26
|
+
export { Table } from './Table.js';
|
|
27
|
+
export { Tabs } from './Tabs.js';
|
|
28
|
+
export { Textarea } from './Textarea.js';
|
|
29
|
+
export { Toast, ToastContainer, ToastProvider, useToast } from './Toast.js';
|
|
30
|
+
export { Tooltip } from './Tooltip.js';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native UI components for molecule.dev.
|
|
3
|
+
*
|
|
4
|
+
* Provides React Native implementations (View/Pressable/Text-based) of the
|
|
5
|
+
* core `@molecule/app-ui` component interfaces — 30 components: Accordion,
|
|
6
|
+
* Alert, Avatar, Badge, Button, Card (+ CardHeader/CardTitle/CardDescription/
|
|
7
|
+
* CardContent/CardFooter), Checkbox, Container, Dropdown, Flex, Form,
|
|
8
|
+
* FormField, Grid, Input, Label, Modal, Pagination, Progress, RadioGroup,
|
|
9
|
+
* Select, Separator, Skeleton, Spacer, Spinner, Switch, Table, Tabs,
|
|
10
|
+
* Textarea, Toast (+ ToastProvider / ToastContainer / useToast), Tooltip.
|
|
11
|
+
* Prop types are re-exported from `@molecule/app-ui`. Web-only extras (Icon,
|
|
12
|
+
* UserMenu, ThemeToggle, PageHeader, …) live in `@molecule/app-ui-react` and
|
|
13
|
+
* are NOT available here.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* import { setClassMap } from '@molecule/app-ui'
|
|
18
|
+
* import { classMap } from '@molecule/app-ui-nativewind'
|
|
19
|
+
* import { Button, Card, CardContent, CardTitle } from '@molecule/app-ui-react-native'
|
|
20
|
+
*
|
|
21
|
+
* // Once at startup, before first render:
|
|
22
|
+
* setClassMap(classMap)
|
|
23
|
+
*
|
|
24
|
+
* function Greeting() {
|
|
25
|
+
* return (
|
|
26
|
+
* <Card>
|
|
27
|
+
* <CardTitle>Hello</CardTitle>
|
|
28
|
+
* <CardContent>
|
|
29
|
+
* <Button color="primary" onClick={() => {}}>Tap me</Button>
|
|
30
|
+
* </CardContent>
|
|
31
|
+
* </Card>
|
|
32
|
+
* )
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* - **Styling requires NativeWind, not just setClassMap.** Components apply ClassMap classes via
|
|
38
|
+
* `className` on React Native primitives — that prop only has an effect when the NativeWind
|
|
39
|
+
* babel preset + Tailwind config are wired into the app AND `setClassMap(classMap)` from
|
|
40
|
+
* `@molecule/app-ui-nativewind` has run. Missing either half renders the whole UI unstyled
|
|
41
|
+
* with NO error. `getClassMap()` itself throws until `setClassMap` is called.
|
|
42
|
+
* - Event props follow the shared `@molecule/app-ui` interfaces (`onClick`, not `onPress`) so
|
|
43
|
+
* components stay swappable with the web implementations.
|
|
44
|
+
* - Toasts need `ToastProvider` mounted at the root; `useToast()` throws outside it.
|
|
45
|
+
*
|
|
46
|
+
* @module
|
|
47
|
+
*/
|
|
48
|
+
export { Accordion, Alert, Avatar, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Container, Dropdown, DropdownLabel, DropdownSeparator, Flex, Form, FormField, Grid, Input, Label, Modal, Pagination, Progress, RadioGroup, Select, Separator, Skeleton, SkeletonCircle, SkeletonText, Spacer, Spinner, Switch, Table, Tabs, Textarea, Toast, ToastContainer, ToastProvider, Tooltip, useToast, } from './components/index.js';
|
|
49
|
+
export type { AccordionProps, AlertProps, AvatarProps, BadgeProps, BaseProps, ButtonProps, CardProps, CheckboxProps, DropdownProps, FormFieldProps, FormProps, InputProps, ModalProps, PaginationProps, RadioGroupProps, SelectProps, SkeletonProps, SpinnerProps, SwitchProps, TableProps, TabsProps, TextareaProps, ToastProps, TooltipProps, } from '@molecule/app-ui';
|
|
50
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,KAAK,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,QAAQ,EACR,UAAU,EACV,MAAM,EACN,SAAS,EACT,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,cAAc,EACd,aAAa,EACb,OAAO,EACP,QAAQ,GACT,MAAM,uBAAuB,CAAA;AAG9B,YAAY,EACV,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,aAAa,EACb,aAAa,EACb,cAAc,EACd,SAAS,EACT,UAAU,EACV,UAAU,EACV,eAAe,EACf,eAAe,EACf,WAAW,EACX,aAAa,EACb,YAAY,EACZ,WAAW,EACX,UAAU,EACV,SAAS,EACT,aAAa,EACb,UAAU,EACV,YAAY,GACb,MAAM,kBAAkB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React Native UI components for molecule.dev.
|
|
3
|
+
*
|
|
4
|
+
* Provides React Native implementations (View/Pressable/Text-based) of the
|
|
5
|
+
* core `@molecule/app-ui` component interfaces — 30 components: Accordion,
|
|
6
|
+
* Alert, Avatar, Badge, Button, Card (+ CardHeader/CardTitle/CardDescription/
|
|
7
|
+
* CardContent/CardFooter), Checkbox, Container, Dropdown, Flex, Form,
|
|
8
|
+
* FormField, Grid, Input, Label, Modal, Pagination, Progress, RadioGroup,
|
|
9
|
+
* Select, Separator, Skeleton, Spacer, Spinner, Switch, Table, Tabs,
|
|
10
|
+
* Textarea, Toast (+ ToastProvider / ToastContainer / useToast), Tooltip.
|
|
11
|
+
* Prop types are re-exported from `@molecule/app-ui`. Web-only extras (Icon,
|
|
12
|
+
* UserMenu, ThemeToggle, PageHeader, …) live in `@molecule/app-ui-react` and
|
|
13
|
+
* are NOT available here.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* import { setClassMap } from '@molecule/app-ui'
|
|
18
|
+
* import { classMap } from '@molecule/app-ui-nativewind'
|
|
19
|
+
* import { Button, Card, CardContent, CardTitle } from '@molecule/app-ui-react-native'
|
|
20
|
+
*
|
|
21
|
+
* // Once at startup, before first render:
|
|
22
|
+
* setClassMap(classMap)
|
|
23
|
+
*
|
|
24
|
+
* function Greeting() {
|
|
25
|
+
* return (
|
|
26
|
+
* <Card>
|
|
27
|
+
* <CardTitle>Hello</CardTitle>
|
|
28
|
+
* <CardContent>
|
|
29
|
+
* <Button color="primary" onClick={() => {}}>Tap me</Button>
|
|
30
|
+
* </CardContent>
|
|
31
|
+
* </Card>
|
|
32
|
+
* )
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* - **Styling requires NativeWind, not just setClassMap.** Components apply ClassMap classes via
|
|
38
|
+
* `className` on React Native primitives — that prop only has an effect when the NativeWind
|
|
39
|
+
* babel preset + Tailwind config are wired into the app AND `setClassMap(classMap)` from
|
|
40
|
+
* `@molecule/app-ui-nativewind` has run. Missing either half renders the whole UI unstyled
|
|
41
|
+
* with NO error. `getClassMap()` itself throws until `setClassMap` is called.
|
|
42
|
+
* - Event props follow the shared `@molecule/app-ui` interfaces (`onClick`, not `onPress`) so
|
|
43
|
+
* components stay swappable with the web implementations.
|
|
44
|
+
* - Toasts need `ToastProvider` mounted at the root; `useToast()` throws outside it.
|
|
45
|
+
*
|
|
46
|
+
* @module
|
|
47
|
+
*/
|
|
48
|
+
export { Accordion, Alert, Avatar, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Container, Dropdown, DropdownLabel, DropdownSeparator, Flex, Form, FormField, Grid, Input, Label, Modal, Pagination, Progress, RadioGroup, Select, Separator, Skeleton, SkeletonCircle, SkeletonText, Spacer, Spinner, Switch, Table, Tabs, Textarea, Toast, ToastContainer, ToastProvider, Tooltip, useToast, } from './components/index.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@molecule/app-ui-react-native",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "React Native UI component implementations for molecule.dev",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"test": "vitest run",
|
|
11
|
+
"test:watch": "vitest"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"molecule",
|
|
25
|
+
"react-native",
|
|
26
|
+
"ui",
|
|
27
|
+
"components"
|
|
28
|
+
],
|
|
29
|
+
"license": "Apache-2.0",
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@molecule/app-i18n": "1.0.0",
|
|
32
|
+
"@molecule/app-icons": "1.0.0",
|
|
33
|
+
"@molecule/app-ui": "1.0.0",
|
|
34
|
+
"@types/node": "26.1.2",
|
|
35
|
+
"react": "19.2.8",
|
|
36
|
+
"typescript": "6.0.3",
|
|
37
|
+
"vitest": "4.1.10"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"@molecule/app-i18n": "^1.0.0",
|
|
41
|
+
"@molecule/app-icons": "^1.0.0",
|
|
42
|
+
"@molecule/app-ui": "^1.0.0",
|
|
43
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
44
|
+
"react-native": ">=0.72.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependenciesMeta": {
|
|
47
|
+
"@molecule/app-i18n": {
|
|
48
|
+
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"@molecule/app-icons": {
|
|
51
|
+
"optional": true
|
|
52
|
+
},
|
|
53
|
+
"@molecule/app-ui": {
|
|
54
|
+
"optional": true
|
|
55
|
+
},
|
|
56
|
+
"react": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
59
|
+
"react-native": {
|
|
60
|
+
"optional": true
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|