Skip to content

Commit

Permalink
feat: Initialized package and storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-crowell committed Jun 9, 2024
1 parent 3539665 commit db38deb
Show file tree
Hide file tree
Showing 13 changed files with 3,545 additions and 2,036 deletions.
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
public-hoist-pattern[]=@nextui-org*
public-hoist-pattern[]=@nextui-org*
public-hoist-pattern[]=@storybook/*
3 changes: 1 addition & 2 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ const config: StorybookConfig = {
stories: [
"../stories/**/*.mdx",
"../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)",
"../packages/ui/src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
],
addons: [
"@storybook/addon-onboarding",
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {
Expand Down
1 change: 1 addition & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Preview } from "@storybook/react";
import '../global.css';

const preview: Preview = {
parameters: {
Expand Down
3 changes: 3 additions & 0 deletions global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"name": "workspace",
"name": "@do-ob/ui",
"private": true,
"version": "0.0.0",
"description": "do-ob workspace for mild components",
"type": "module",
"exports": {
".": "./packages/ui/src/index.ts"
},
"scripts": {
"build": "pnpm --filter './packages/*' build",
"lint": "eslint ./packages",
Expand All @@ -13,8 +16,12 @@
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@heroicons/react": "^2.1.3",
"@nextui-org/react": "^2.4.1",
"framer-motion": "^11.2.10"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.5.0",
"@do-ob/eslint-config": "^2.1.2",
"@do-ob/ts-config": "^2.0.0",
"@do-ob/vite-lib-config": "^3.0.1",
Expand All @@ -23,7 +30,6 @@
"@storybook/addon-essentials": "^8.1.6",
"@storybook/addon-interactions": "^8.1.6",
"@storybook/addon-links": "^8.1.6",
"@storybook/addon-onboarding": "^8.1.6",
"@storybook/blocks": "^8.1.6",
"@storybook/react": "^8.1.6",
"@storybook/react-vite": "^8.1.6",
Expand All @@ -38,8 +44,8 @@
"eslint-plugin-tailwindcss": "^3.17.0",
"framer-motion": "^11.2.10",
"postcss": "^8.4.38",
"react": "19.0.0-rc-935180c7e0-20240524",
"react-dom": "19.0.0-rc-935180c7e0-20240524",
"react": "18.3.1",
"react-dom": "18.3.1",
"storybook": "8.1.6",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.5",
Expand Down
1 change: 1 addition & 0 deletions packages/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Packages
15 changes: 7 additions & 8 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@do-ob/mild",
"name": "@do-ob/ui",
"version": "0.0.0",
"description": "A mild TailwindCSS component library for React 19+",
"description": "A TailwindCSS and NextUI (Open Source) components library for React.",
"type": "module",
"exports": {
".": {
Expand All @@ -20,18 +20,17 @@
"react",
"tailwindcss",
"typescript",
"mild",
"minimal",
"unstyled"
"nextui"
],
"author": "Eric Crowell <[email protected]> (https://do-ob.io)",
"license": "MIT",
"scripts": {
"build": "tsc"
"build": "tsc --project tsconfig.build.json"
},
"dependencies": {
"@headlessui/react": "2",
"@heroicons/react": "2"
"@heroicons/react": "^2.1.3",
"@nextui-org/react": "^2.4.1",
"framer-motion": "^11.2.10"
},
"peerDependencies": {
"react": "rc"
Expand Down
14 changes: 14 additions & 0 deletions packages/ui/src/Navigation/Navigation.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { Meta, StoryObj } from '@storybook/react';

import { Navigation } from './Navigation';

const meta = {
component: Navigation,
layout: 'fullscreen',
} as Meta<typeof Navigation>;

export default meta;

type Story = StoryObj<typeof meta>;

export const Default: Story = {};
13 changes: 13 additions & 0 deletions packages/ui/src/Navigation/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Navbar, NavbarContent, NavbarBrand } from '@nextui-org/react';

export function Navigation() {
return (
<Navbar className=''>
<NavbarContent>
<NavbarBrand>NextUI</NavbarBrand>
</NavbarContent>
</Navbar>
);
}

export default Navigation;
1 change: 1 addition & 0 deletions packages/ui/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Navigation } from "./Navigation/Navigation";
13 changes: 13 additions & 0 deletions packages/ui/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"allowImportingTsExtensions": false,
"emitDeclarationOnly": false,
"noEmit": false,
"declarationDir": "./dist",
"outDir": "./dist",
},
"include": ["src"],
"exclude": ["src/**/*.stories.tsx"]
}
4 changes: 3 additions & 1 deletion packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"outDir": "./dist",
"jsx": "react-jsx",
"baseUrl": ".",
"emitDeclarationOnly": false,
"declaration": false,
"declarationDir": null,
"skipLibCheck": true,
"paths": {
"@do-ob/ui": ["src/index.ts"],
"@do-ob/ui/*": ["src/*.ts"]
Expand Down
Loading

0 comments on commit db38deb

Please sign in to comment.