@bubbasfw/ui 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +94 -2
- package/dist/index.cjs +1202 -0
- package/dist/index.d.cts +376 -0
- package/dist/index.d.ts +376 -0
- package/dist/index.js +1165 -0
- package/dist/tokens.cjs +116 -0
- package/dist/tokens.d.cts +139 -0
- package/dist/tokens.d.ts +139 -0
- package/dist/tokens.js +114 -0
- package/package.json +85 -4
- package/src/components/Button.tsx +105 -0
- package/src/components/actions.tsx +39 -0
- package/src/components/content.tsx +55 -0
- package/src/components/disclosure.tsx +33 -0
- package/src/components/feedback.tsx +68 -0
- package/src/components/forms/Choice.tsx +112 -0
- package/src/components/forms/FormField.tsx +58 -0
- package/src/components/forms/Input.tsx +55 -0
- package/src/components/forms/RadioGroup.tsx +87 -0
- package/src/components/forms/Select.tsx +102 -0
- package/src/components/forms/Tabs.tsx +70 -0
- package/src/components/forms/index.ts +6 -0
- package/src/components/forms/selection.ts +48 -0
- package/src/components/layout.tsx +35 -0
- package/src/components/navigation.tsx +27 -0
- package/src/components/overlays.tsx +64 -0
- package/src/components/typography.tsx +31 -0
- package/src/index.ts +25 -0
- package/src/internal/scroll-lock.ts +101 -0
- package/src/internal/utils.ts +32 -0
- package/src/theme.tsx +56 -0
- package/src/tokens.ts +114 -0
- package/tailwind-preset.cjs +24 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Howeth and Harp
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,95 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @bubbasfw/ui
|
|
2
2
|
|
|
3
|
-
|
|
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/)
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
import { Button, ThemeProvider } from '@bubbasfw/ui';
|
|
14
|
+
|
|
15
|
+
<ThemeProvider appearance="system">
|
|
16
|
+
<Button onPress={save} loading={saving} loadingLabel="Saving…">
|
|
17
|
+
Save changes
|
|
18
|
+
</Button>
|
|
19
|
+
</ThemeProvider>
|
|
20
|
+
```
|
|
21
|
+
|
|
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.
|
|
40
|
+
|
|
41
|
+
## Consumer setup
|
|
42
|
+
|
|
43
|
+
Baseline: React 19.2.3, React Native 0.86.3, React Native Web 0.21.4,
|
|
44
|
+
NativeWind 4.2.7, Tailwind 3.4.17. Install alongside the app’s compatible peers:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
pnpm add @bubbasfw/ui@0.2.0 nativewind@4.2.7
|
|
48
|
+
pnpm add -D tailwindcss@3.4.17
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The host compiles the package’s utility classes. Include the published source:
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
const path = require('node:path');
|
|
55
|
+
const uiRoot = path.dirname(require.resolve('@bubbasfw/ui/package.json'));
|
|
56
|
+
module.exports = {
|
|
57
|
+
darkMode: 'class',
|
|
58
|
+
content: [
|
|
59
|
+
'./App.{js,jsx,ts,tsx}',
|
|
60
|
+
'./{app,pages,src}/**/*.{js,jsx,ts,tsx}',
|
|
61
|
+
path.join(uiRoot, 'src/**/*.{ts,tsx}'),
|
|
62
|
+
],
|
|
63
|
+
presets: [require('nativewind/preset'), require('@bubbasfw/ui/tailwind-preset')],
|
|
64
|
+
};
|
|
65
|
+
```
|
|
66
|
+
|
|
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
|
|
88
|
+
|
|
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.
|
|
92
|
+
|
|
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.
|