@eliseubatista99/react-scaffold-core 0.1.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 +21 -0
- package/dist/components/drawer/drawer.d.ts +15 -0
- package/dist/components/drawer/drawer.hook.d.ts +12 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/stories/drawer.stories.d.ts +20 -0
- package/dist/components/drawer/stories/setup.d.ts +2 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/modal.d.ts +9 -0
- package/dist/components/modal/stories/modal.stories.d.ts +16 -0
- package/dist/components/modal/stories/setup.d.ts +2 -0
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/components/toast/stories/setup.d.ts +2 -0
- package/dist/components/toast/stories/toast.stories.d.ts +17 -0
- package/dist/components/toast/toast.d.ts +8 -0
- package/dist/components/typography/index.d.ts +1 -0
- package/dist/components/typography/stories/typography.stories.d.ts +21 -0
- package/dist/components/typography/typography.d.ts +7 -0
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/scrollHelper/index.d.ts +1 -0
- package/dist/helpers/scrollHelper/scrollHelper.d.ts +5 -0
- package/dist/helpers/scrollHelper/stories/scrollHelper.stories.d.ts +13 -0
- package/dist/helpers/scrollHelper/stories/setup.d.ts +1 -0
- package/dist/helpers/text/index.d.ts +1 -0
- package/dist/helpers/text/stories/setup.d.ts +5 -0
- package/dist/helpers/text/stories/textHelper.stories.d.ts +16 -0
- package/dist/helpers/text/textHelper.d.ts +4 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useDidMount/index.d.ts +1 -0
- package/dist/hooks/useDidMount/useDidMount.d.ts +1 -0
- package/dist/hooks/useFetch/index.d.ts +1 -0
- package/dist/hooks/useFetch/stories/setup.d.ts +5 -0
- package/dist/hooks/useFetch/stories/useFetch.stories.d.ts +16 -0
- package/dist/hooks/useFetch/useFetch.d.ts +3 -0
- package/dist/hooks/useResponsive/index.d.ts +1 -0
- package/dist/hooks/useResponsive/stories/setup.d.ts +1 -0
- package/dist/hooks/useResponsive/stories/useResponsive.stories.d.ts +13 -0
- package/dist/hooks/useResponsive/useResponsive.d.ts +4 -0
- package/dist/index.cjs.js +33 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +2344 -0
- package/dist/providers/feedback/feedbackContext.d.ts +8 -0
- package/dist/providers/feedback/feedbackProvider.d.ts +5 -0
- package/dist/providers/feedback/index.d.ts +2 -0
- package/dist/providers/feedback/stories/feedback.stories.d.ts +13 -0
- package/dist/providers/feedback/stories/setup.d.ts +4 -0
- package/dist/providers/feedback/useFeedback.d.ts +6 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/navigation/index.d.ts +2 -0
- package/dist/providers/navigation/navigationContext.d.ts +8 -0
- package/dist/providers/navigation/navigationProvider.d.ts +10 -0
- package/dist/providers/navigation/stories/navigation.stories.d.ts +18 -0
- package/dist/providers/navigation/stories/setup.d.ts +5 -0
- package/dist/providers/navigation/useNavigation.d.ts +7 -0
- package/dist/vite.svg +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FeedbackContextData {
|
|
3
|
+
visibleItems: string[];
|
|
4
|
+
isItemVisible: (id: string) => boolean;
|
|
5
|
+
showItem: (id: string) => void;
|
|
6
|
+
hideItem: (id: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const FeedbackProviderContext: React.Context<FeedbackContextData>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import('../feedbackProvider').FeedbackProviderInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
args: {};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FeedbackProviderInputProps } from '../feedbackProvider';
|
|
2
|
+
export declare const exampleModal: import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const exampleToast: import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const FeedbackStoriesSetup: (props: FeedbackProviderInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface NavigationContextData {
|
|
3
|
+
history: string[];
|
|
4
|
+
addToHistory: (entry: string) => void;
|
|
5
|
+
popFromHistory: (count: number) => string;
|
|
6
|
+
replaceHistory: (entries: string[]) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const NavigationProviderContext: React.Context<NavigationContextData>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface NavigationProviderRoute {
|
|
3
|
+
path: string;
|
|
4
|
+
render: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface NavigationProviderInputProps {
|
|
7
|
+
routes: NavigationProviderRoute[];
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const NavigationProvider: ({ routes, children, }: NavigationProviderInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import('../navigationProvider').NavigationProviderInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
args: {
|
|
10
|
+
routes: {
|
|
11
|
+
path: string;
|
|
12
|
+
render: import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NavigationProviderInputProps } from '../';
|
|
2
|
+
export declare const NavigationExampleScreen0: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const NavigationExampleScreen1: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const NavigationExampleScreen2: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const NavigationStoriesSetup: (props: NavigationProviderInputProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@eliseubatista99/react-scaffold-core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "A library which provides basic components, hooks, helpers and providers to easily build a React application and avoid repeating the usual code.",
|
|
6
|
+
"main": "dist/index.cjs.js",
|
|
7
|
+
"module": "dist/index.es.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"react",
|
|
11
|
+
"scaffold"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/eliseubatista99/react-scaffold#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/eliseubatista99/react-scaffold/issues"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/eliseubatista99/react-scaffold.git"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"author": "eliseubatista99",
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist/"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"dev": "vite",
|
|
31
|
+
"build": "rimraf dist && vite build",
|
|
32
|
+
"clean": "rm -rf dist",
|
|
33
|
+
"lint": "eslint .",
|
|
34
|
+
"preview": "vite preview",
|
|
35
|
+
"start": "vite"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@eslint/js": "^9.30.1",
|
|
39
|
+
"@types/react": "^19.1.8",
|
|
40
|
+
"@types/react-dom": "^19.1.6",
|
|
41
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
42
|
+
"eslint": "^9.30.1",
|
|
43
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
44
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
45
|
+
"globals": "^16.3.0",
|
|
46
|
+
"rimraf": "^3.0.2",
|
|
47
|
+
"typescript": "~5.8.3",
|
|
48
|
+
"typescript-eslint": "^8.35.1",
|
|
49
|
+
"vite": "^7.0.4",
|
|
50
|
+
"vite-plugin-dts": "^4.5.4"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"react": "^19.1.0",
|
|
54
|
+
"react-dom": "^19.1.0",
|
|
55
|
+
"react-router-dom": "^7.6.3"
|
|
56
|
+
}
|
|
57
|
+
}
|