@bubbasfw/ui 0.1.0 → 0.2.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/README.md CHANGED
@@ -1,72 +1,95 @@
1
1
  # @bubbasfw/ui
2
2
 
3
- Bubba’s universal React Native design system scaffold. The same NativeWind
4
- Button uses `Pressable`, `Text`, and `ActivityIndicator` on native platforms and
5
- React Native Web. This initial package contains the Button and foundation tokens.
3
+ Bubba’s universal component library for React Native, Expo and React Native Web.
4
+ All components use native primitives and NativeWind. React and platform runtimes
5
+ are peers, with no Base UI, Radix UI or DOM component implementation.
6
+
7
+ Version 0.2.0 includes 32 components, scoped light/dark/system themes and shared
8
+ design tokens. Use the same imports in Next.js/React Native Web and Expo.
9
+
10
+ [Browse the visual workbench and setup guides](https://handh-dev.github.io/bubbas-ui/)
6
11
 
7
12
  ```tsx
8
- import { Button } from '@bubbasfw/ui';
13
+ import { Button, ThemeProvider } from '@bubbasfw/ui';
9
14
 
10
- <Button onPress={save} loading={saving} loadingLabel="Saving…">
11
- Save changes
12
- </Button>
15
+ <ThemeProvider appearance="system">
16
+ <Button onPress={save} loading={saving} loadingLabel="Saving…">
17
+ Save changes
18
+ </Button>
19
+ </ThemeProvider>
13
20
  ```
14
21
 
15
- Variants: `primary`, `secondary`, `outline`, `ghost`. Sizes: `sm`, `md`, `lg`.
16
- Use `className` for the Pressable and `textClassName` for the label. Native
17
- Pressable props and refs are forwarded. Loading and disabled states block presses
18
- and expose accessibility state. Label content should be text or inline native Text.
22
+ ## Catalog
23
+
24
+ - Foundations: Text, Heading, Stack, Inline, Container, Card, Divider.
25
+ - Actions: Button, IconButton, Link.
26
+ - Content: Badge, Avatar, ListItem, EmptyState.
27
+ - Forms: Input, Textarea, FormField, Checkbox, Switch, RadioGroup, Select.
28
+ - Navigation: Tabs, Breadcrumbs, Pagination.
29
+ - Disclosure: Accordion, Dialog, Sheet.
30
+ - Feedback: Alert, Toast, Spinner, Progress, Skeleton.
31
+
32
+ Native props and refs are forwarded where supported. Interactive components
33
+ expose accessible names and state. A consuming app still owns content, routing,
34
+ font loading and acceptance on its devices and assistive technologies.
35
+
36
+ `Button` variants are primary, secondary, outline and ghost; sizes are sm, md and
37
+ lg. Disabled and loading block presses. `ThemeProvider` scopes semantic colors
38
+ for light, dark or system appearance and supports nested previews. Native-only
39
+ apps may omit the optional React Native Web peer.
19
40
 
20
41
  ## Consumer setup
21
42
 
22
43
  Baseline: React 19.2.3, React Native 0.86.3, React Native Web 0.21.4,
23
- NativeWind 4.2.7, Tailwind 3.4.17. Configure the host app for NativeWind and scan
24
- this package’s source so its utilities are generated:
44
+ NativeWind 4.2.7, Tailwind 3.4.17. Install alongside the app’s compatible peers:
25
45
 
26
46
  ```sh
27
- pnpm add @bubbasfw/ui nativewind@4.2.7
47
+ pnpm add @bubbasfw/ui@0.2.0 nativewind@4.2.7
28
48
  pnpm add -D tailwindcss@3.4.17
29
49
  ```
30
50
 
31
- Expo apps must also declare NativeWind 4's Babel runtime directly:
32
-
33
- ```sh
34
- pnpm add react-native-css-interop@0.2.7
35
- npx expo install react-native-reanimated react-native-worklets react-native-safe-area-context
36
- ```
37
-
38
- The Babel preset emits `react-native-css-interop` imports into app files. Its
39
- transitive dependency through NativeWind does not resolve from those files in
40
- pnpm's isolated dependency layout.
51
+ The host compiles the package’s utility classes. Include the published source:
41
52
 
42
53
  ```js
43
54
  const path = require('node:path');
44
55
  const uiRoot = path.dirname(require.resolve('@bubbasfw/ui/package.json'));
45
-
46
56
  module.exports = {
57
+ darkMode: 'class',
47
58
  content: [
48
59
  './App.{js,jsx,ts,tsx}',
49
- './app/**/*.{js,jsx,ts,tsx}',
50
- './pages/**/*.{js,jsx,ts,tsx}',
60
+ './{app,pages,src}/**/*.{js,jsx,ts,tsx}',
51
61
  path.join(uiRoot, 'src/**/*.{ts,tsx}'),
52
62
  ],
53
- presets: [
54
- require('nativewind/preset'),
55
- require('@bubbasfw/ui/tailwind-preset'),
56
- ],
63
+ presets: [require('nativewind/preset'), require('@bubbasfw/ui/tailwind-preset')],
57
64
  };
58
65
  ```
59
66
 
60
- Expo requires NativeWind’s Metro/Babel setup and compatible native dependencies.
61
- Next.js requires React Native Web aliasing, NativeWind’s JSX import source,
62
- Tailwind 3/PostCSS, and runtime transpilation. App Router interactive consumers
63
- need a client boundary. See the repository’s
64
- [complete setup and runnable examples](https://github.com/handh-dev/bubbas-ui#readme).
67
+ Import the global CSS at the app entry with Tailwind base, components and
68
+ utilities. Expo requires NativeWind’s Metro/Babel setup and compatible native
69
+ dependencies. Declare `react-native-css-interop@0.2.7` directly because NativeWind
70
+ 4’s Babel preset emits this import into app files under pnpm’s isolated layout:
71
+
72
+ ```sh
73
+ pnpm add react-native-css-interop@0.2.7
74
+ pnpm add -D @babel/plugin-transform-react-jsx@7.29.7
75
+ npx expo install react-native-reanimated react-native-worklets react-native-safe-area-context
76
+ ```
77
+
78
+ Next.js requires exact React Native → React Native Web aliasing, web extension
79
+ priority, NativeWind’s JSX import source and Tailwind 3/PostCSS. The runnable
80
+ Pages Router example uses webpack and Tailwind `important: true`. Interactive
81
+ App Router consumers need a client boundary. Turbopack is not configured.
82
+
83
+ See the [complete runnable examples](https://github.com/handh-dev/bubbas-ui/tree/main/examples)
84
+ and the [visual workbench](https://handh-dev.github.io/bubbas-ui/) for component previews and platform setup.
85
+ Both example apps include every catalog component from the real package entry.
86
+
87
+ ## Exports and rights
65
88
 
66
- The package exports `@bubbasfw/ui/tokens` without React runtime imports and
67
- `@bubbasfw/ui/tailwind-preset` for shared color/radius utilities. Platform peers
68
- are external; React Native Web is optional for native-only consumers.
89
+ ESM, CJS and declarations ship together. Source ships for Tailwind scanning.
90
+ `@bubbasfw/ui/tokens` is independent of React; `@bubbasfw/ui/tailwind-preset` is
91
+ CommonJS. The package bundles no platform runtime, font or artwork binary.
69
92
 
70
- Published releases use public npm access. The code is licensed under
71
- [MIT](LICENSE). Font and artwork binaries are excluded and retain
72
- their separate distribution rights. No trademark license is granted.
93
+ Software is [MIT](LICENSE). Bubba’s names and marks retain separate rights; no
94
+ trademark license is granted. Publication remains an explicit owner-reviewed
95
+ step, with no automatic npm release on push or merge.