greenole-design-system 1.1.33 → 1.1.35
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 +123 -123
- package/dist/base-components/Toast/Toast.stories.d.ts +1 -5
- package/dist/base-components/Toast/Toast.styles.d.ts +0 -4
- package/package.json +89 -88
- package/dist/App.d.ts +0 -3
- package/dist/base-components/Button/Button.d.ts +0 -4
- package/dist/base-components/Button/Button.stories.d.ts +0 -13
- package/dist/base-components/Button/Button.types.d.ts +0 -16
- package/dist/base-components/Button/index.d.ts +0 -2
- package/dist/base-components/Dropdown/Dropdown.d.ts +0 -4
- package/dist/base-components/Dropdown/Dropdown.stories.d.ts +0 -13
- package/dist/base-components/Dropdown/Dropdown.styles.d.ts +0 -35
- package/dist/base-components/Dropdown/Dropdown.types.d.ts +0 -29
- package/dist/base-components/Dropdown/index.d.ts +0 -2
- package/dist/base-components/Input/Input.d.ts +0 -4
- package/dist/base-components/Input/Input.stories.d.ts +0 -8
- package/dist/base-components/Input/Input.styles.d.ts +0 -20
- package/dist/base-components/Input/Input.types.d.ts +0 -23
- package/dist/base-components/Loading/Loading.d.ts +0 -4
- package/dist/base-components/Loading/Loading.stories.d.ts +0 -6
- package/dist/base-components/Loading/Loading.types.d.ts +0 -6
- package/dist/base-components/Loading/index.d.ts +0 -2
- package/dist/base-components/Pills/Pills.d.ts +0 -4
- package/dist/base-components/Pills/Pills.stories.d.ts +0 -15
- package/dist/base-components/Pills/Pills.types.d.ts +0 -11
- package/dist/base-components/ProgressBar/ProgressBar.d.ts +0 -4
- package/dist/base-components/ProgressBar/ProgressBar.stories.d.ts +0 -9
- package/dist/base-components/ProgressBar/ProgressBar.types.d.ts +0 -19
- package/dist/base-components/RangeSlider/RangeSlider.d.ts +0 -4
- package/dist/base-components/RangeSlider/RangeSlider.stories.d.ts +0 -18
- package/dist/base-components/RangeSlider/RangeSlider.styles.d.ts +0 -7
- package/dist/base-components/RangeSlider/RangeSlider.types.d.ts +0 -11
- package/dist/base-components/Space/Space.d.ts +0 -4
- package/dist/base-components/Space/Space.stories.d.ts +0 -9
- package/dist/base-components/Space/Space.types.d.ts +0 -9
- package/dist/base-components/SwitchButton/SwitchButton.d.ts +0 -4
- package/dist/base-components/SwitchButton/SwitchButton.stories.d.ts +0 -6
- package/dist/base-components/SwitchButton/SwitchButton.styles.d.ts +0 -7
- package/dist/base-components/SwitchButton/SwitchButton.types.d.ts +0 -9
- package/dist/base-components/TextField/TextField.d.ts +0 -4
- package/dist/base-components/TextField/TextField.stories.d.ts +0 -8
- package/dist/base-components/TextField/TextField.types.d.ts +0 -27
- package/dist/base-components/Toast/ToastProvider.d.ts +0 -20
- package/dist/base-components/Tooltip/Tooltip.d.ts +0 -4
- package/dist/base-components/Tooltip/Tooltip.stories.d.ts +0 -7
- package/dist/base-components/Tooltip/Tooltip.styles.d.ts +0 -9
- package/dist/base-components/Tooltip/Tooltip.types.d.ts +0 -14
- package/dist/components/Accordion/Accordion.d.ts +0 -4
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -6
- package/dist/components/Accordion/types.d.ts +0 -8
- package/dist/components/Calendar/Calendar.d.ts +0 -4
- package/dist/components/Calendar/Calendar.stories.d.ts +0 -9
- package/dist/components/Calendar/Calendar.styles.d.ts +0 -11
- package/dist/components/Calendar/Calendar.types.d.ts +0 -9
- package/dist/components/Calendar/Calendar.utils.d.ts +0 -10
- package/dist/components/Calendar/DateRangePicker.d.ts +0 -8
- package/dist/components/Calendar/Presets.d.ts +0 -8
- package/dist/components/Calendar/index.d.ts +0 -2
- package/dist/components/Card/Card.d.ts +0 -4
- package/dist/components/Card/Card.stories.d.ts +0 -6
- package/dist/components/Card/Card.types.d.ts +0 -22
- package/dist/components/Card/CardBody.d.ts +0 -4
- package/dist/components/Card/CardFooter.d.ts +0 -4
- package/dist/components/Card/CardHeader.d.ts +0 -4
- package/dist/components/Card/index.d.ts +0 -5
- package/dist/components/Drawer/Drawer.d.ts +0 -4
- package/dist/components/Drawer/Drawer.stories.d.ts +0 -10
- package/dist/components/Drawer/Drawer.styles.d.ts +0 -23
- package/dist/components/Drawer/Drawer.types.d.ts +0 -16
- package/dist/components/Drawer/index.d.ts +0 -1
- package/dist/components/Empty/Empty.d.ts +0 -3
- package/dist/components/Empty/Empty.stories.d.ts +0 -20
- package/dist/components/Icons/ArrowBack.d.ts +0 -6
- package/dist/components/Icons/ArrowForward.d.ts +0 -6
- package/dist/components/Icons/Avatar.d.ts +0 -6
- package/dist/components/Icons/Campaing.d.ts +0 -6
- package/dist/components/Icons/Checkbox.d.ts +0 -7
- package/dist/components/Icons/ChevronDown.d.ts +0 -6
- package/dist/components/Icons/ChevronUp.d.ts +0 -6
- package/dist/components/Icons/DashEdit.d.ts +0 -6
- package/dist/components/Icons/Dashboard.d.ts +0 -6
- package/dist/components/Icons/Devices.d.ts +0 -6
- package/dist/components/Icons/FlagBR.d.ts +0 -6
- package/dist/components/Icons/FlagES.d.ts +0 -6
- package/dist/components/Icons/FlagPT.d.ts +0 -6
- package/dist/components/Icons/FlagUK.d.ts +0 -6
- package/dist/components/Icons/FlagUSA.d.ts +0 -6
- package/dist/components/Icons/HeaderSearch.d.ts +0 -6
- package/dist/components/Icons/HelpOutlined.d.ts +0 -6
- package/dist/components/Icons/History.d.ts +0 -6
- package/dist/components/Icons/Home.d.ts +0 -6
- package/dist/components/Icons/Icons.d.ts +0 -31
- package/dist/components/Icons/Icons.stories.d.ts +0 -5
- package/dist/components/Icons/Info.d.ts +0 -6
- package/dist/components/Icons/Language.d.ts +0 -6
- package/dist/components/Icons/Lock.d.ts +0 -6
- package/dist/components/Icons/Logout.d.ts +0 -6
- package/dist/components/Icons/Map.d.ts +0 -6
- package/dist/components/Icons/Moon.d.ts +0 -6
- package/dist/components/Icons/MoreHorizontal.d.ts +0 -6
- package/dist/components/Icons/Notification.d.ts +0 -6
- package/dist/components/Icons/PeopleAlt.d.ts +0 -6
- package/dist/components/Icons/PriorityHigh.d.ts +0 -6
- package/dist/components/Icons/Public.d.ts +0 -6
- package/dist/components/Icons/Search.d.ts +0 -6
- package/dist/components/Icons/Secutiry.d.ts +0 -6
- package/dist/components/Icons/Settings.d.ts +0 -6
- package/dist/components/Icons/Star.d.ts +0 -7
- package/dist/components/Icons/WBSunny.d.ts +0 -6
- package/dist/components/Icons/WarningAmber.d.ts +0 -6
- package/dist/components/Modal/Modal.d.ts +0 -4
- package/dist/components/Modal/Modal.stories.d.ts +0 -12
- package/dist/components/Modal/Modal.types.d.ts +0 -17
- package/dist/components/Modal/index.d.ts +0 -1
- package/dist/components/Table/DataTable.d.ts +0 -18
- package/dist/components/Table/DataTable.stories.d.ts +0 -8
- package/dist/components/Table/Pagination.d.ts +0 -10
- package/dist/components/Table/types.d.ts +0 -10
- package/dist/components/Tabs/Tabs.d.ts +0 -5
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -7
- package/dist/components/Tabs/Tabs.types.d.ts +0 -12
- package/dist/components/Tabs/index.d.ts +0 -1
- package/dist/components/Typography/Typography.d.ts +0 -10
- package/dist/components/Typography/Typography.stories.d.ts +0 -32
- package/dist/components/Upload/Upload.d.ts +0 -4
- package/dist/components/Upload/Upload.stories.d.ts +0 -15
- package/dist/components/Upload/Upload.style.d.ts +0 -21
- package/dist/components/Upload/Upload.types.d.ts +0 -18
- package/dist/greenole-design-system.cjs.js +0 -919
- package/dist/greenole-design-system.es.js +0 -6022
- package/dist/greenole.css +0 -1205
- package/dist/index.css +0 -1
- package/dist/index.css.d.ts +0 -1
- package/dist/index.d.ts +0 -27
- package/dist/main.d.ts +0 -1
- package/dist/reset.css +0 -1
- package/dist/reset.css.d.ts +0 -1
- package/dist/utils/i18n/i18n.d.ts +0 -1
- package/dist/vite.svg +0 -1
package/README.md
CHANGED
|
@@ -1,124 +1,124 @@
|
|
|
1
|
-
# Greenole Design System
|
|
2
|
-
|
|
3
|
-
[](https://www.figma.com/design/Zwkbh8XGfVt2At4ln7p1WE/DS-Greenole?node-id=1017-15&p=f&t=Mjdfp67Q8ADWcm9v-0)
|
|
4
|
-
|
|
5
|
-
The **Greenole Design System** is a React component library designed to create consistent and scalable user interfaces.
|
|
6
|
-
The library is constantly evolving, with new components and improvements being added over time.
|
|
7
|
-
|
|
8
|
-
## Table of Contents
|
|
9
|
-
|
|
10
|
-
- [Introduction](#introduction)
|
|
11
|
-
- [Installation](#installation)
|
|
12
|
-
- [Usage](#usage)
|
|
13
|
-
- [Development](#development)
|
|
14
|
-
- [Build & Publication](#build--publication)
|
|
15
|
-
- [Contributing](#contributing)
|
|
16
|
-
- [License](#license)
|
|
17
|
-
|
|
18
|
-
## Introduction
|
|
19
|
-
|
|
20
|
-
**Greenole Design System** gathers reusable components that follow a consistent visual identity.
|
|
21
|
-
It helps teams maintain design and usability standards across their React projects.
|
|
22
|
-
|
|
23
|
-
> **Note:**
|
|
24
|
-
> This library is in constant evolution. Existing components may be updated and new ones added over time.
|
|
25
|
-
|
|
26
|
-
## Installation
|
|
27
|
-
|
|
28
|
-
To install the library in your React project, run:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm install greenole-design-system
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
> **Note:**
|
|
35
|
-
> The library declares `react` and `react-dom` as peer dependencies, so ensure your project already has these installed.
|
|
36
|
-
|
|
37
|
-
## Usage
|
|
38
|
-
|
|
39
|
-
After installation, you need to import both the CSS styles and the components:
|
|
40
|
-
|
|
41
|
-
### 1. Import the CSS styles
|
|
42
|
-
|
|
43
|
-
First, import the CSS file in your main application file (usually `main.jsx`, `App.jsx`, or `index.js`):
|
|
44
|
-
|
|
45
|
-
```jsx
|
|
46
|
-
import 'greenole-design-system/dist/greenole.css';
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### 2. Import and use components
|
|
50
|
-
|
|
51
|
-
Then you can import and use the library's components:
|
|
52
|
-
|
|
53
|
-
```jsx
|
|
54
|
-
import React from 'react';
|
|
55
|
-
import { Typography } from 'greenole-design-system';
|
|
56
|
-
|
|
57
|
-
function App() {
|
|
58
|
-
return (
|
|
59
|
-
<div>
|
|
60
|
-
<Typography variant="h1">
|
|
61
|
-
The quick brown fox jumps over the lazy dog.
|
|
62
|
-
</Typography>
|
|
63
|
-
{/* Additional components will be added in the future */}
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export default App;
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Development
|
|
72
|
-
|
|
73
|
-
To contribute to or test the library locally:
|
|
74
|
-
|
|
75
|
-
1. Clone the repository:
|
|
76
|
-
```bash
|
|
77
|
-
git clone https://github.com/your-username/greenole-design-system.git
|
|
78
|
-
cd greenole-design-system
|
|
79
|
-
```
|
|
80
|
-
2. Install dependencies:
|
|
81
|
-
```bash
|
|
82
|
-
npm install
|
|
83
|
-
```
|
|
84
|
-
3. Start the development environment using Vite:
|
|
85
|
-
```bash
|
|
86
|
-
npm run dev
|
|
87
|
-
```
|
|
88
|
-
4. To view the documentation and components, we use **Storybook**:
|
|
89
|
-
```bash
|
|
90
|
-
npm run storybook
|
|
91
|
-
```
|
|
92
|
-
Storybook serves as the documentation and demo environment for the library's components.
|
|
93
|
-
|
|
94
|
-
## Build & Publication
|
|
95
|
-
|
|
96
|
-
To generate the library bundle:
|
|
97
|
-
|
|
98
|
-
1. Run the build command:
|
|
99
|
-
```bash
|
|
100
|
-
npm run build
|
|
101
|
-
```
|
|
102
|
-
This will create the `dist` folder with both CommonJS and ESModule files, as well as type declarations (if configured).
|
|
103
|
-
|
|
104
|
-
2. To test locally in another project, use `npm link`:
|
|
105
|
-
```bash
|
|
106
|
-
cd greenole-design-system
|
|
107
|
-
npm link
|
|
108
|
-
cd ../your-consumer-project
|
|
109
|
-
npm link greenole-design-system
|
|
110
|
-
```
|
|
111
|
-
3. When ready to publish:
|
|
112
|
-
```bash
|
|
113
|
-
npm login
|
|
114
|
-
npm publish --access public
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## Contributing
|
|
118
|
-
|
|
119
|
-
Contributions are welcome! If you would like to help evolve the **Greenole Design System**, follow these steps:
|
|
120
|
-
|
|
121
|
-
1. Fork the repository.
|
|
122
|
-
2. Create a branch for your feature (`git checkout -b my-feature`).
|
|
123
|
-
3. Commit your changes.
|
|
1
|
+
# Greenole Design System
|
|
2
|
+
|
|
3
|
+
[](https://www.figma.com/design/Zwkbh8XGfVt2At4ln7p1WE/DS-Greenole?node-id=1017-15&p=f&t=Mjdfp67Q8ADWcm9v-0)
|
|
4
|
+
|
|
5
|
+
The **Greenole Design System** is a React component library designed to create consistent and scalable user interfaces.
|
|
6
|
+
The library is constantly evolving, with new components and improvements being added over time.
|
|
7
|
+
|
|
8
|
+
## Table of Contents
|
|
9
|
+
|
|
10
|
+
- [Introduction](#introduction)
|
|
11
|
+
- [Installation](#installation)
|
|
12
|
+
- [Usage](#usage)
|
|
13
|
+
- [Development](#development)
|
|
14
|
+
- [Build & Publication](#build--publication)
|
|
15
|
+
- [Contributing](#contributing)
|
|
16
|
+
- [License](#license)
|
|
17
|
+
|
|
18
|
+
## Introduction
|
|
19
|
+
|
|
20
|
+
**Greenole Design System** gathers reusable components that follow a consistent visual identity.
|
|
21
|
+
It helps teams maintain design and usability standards across their React projects.
|
|
22
|
+
|
|
23
|
+
> **Note:**
|
|
24
|
+
> This library is in constant evolution. Existing components may be updated and new ones added over time.
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
To install the library in your React project, run:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install greenole-design-system
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
> **Note:**
|
|
35
|
+
> The library declares `react` and `react-dom` as peer dependencies, so ensure your project already has these installed.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
After installation, you need to import both the CSS styles and the components:
|
|
40
|
+
|
|
41
|
+
### 1. Import the CSS styles
|
|
42
|
+
|
|
43
|
+
First, import the CSS file in your main application file (usually `main.jsx`, `App.jsx`, or `index.js`):
|
|
44
|
+
|
|
45
|
+
```jsx
|
|
46
|
+
import 'greenole-design-system/dist/greenole.css';
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. Import and use components
|
|
50
|
+
|
|
51
|
+
Then you can import and use the library's components:
|
|
52
|
+
|
|
53
|
+
```jsx
|
|
54
|
+
import React from 'react';
|
|
55
|
+
import { Typography } from 'greenole-design-system';
|
|
56
|
+
|
|
57
|
+
function App() {
|
|
58
|
+
return (
|
|
59
|
+
<div>
|
|
60
|
+
<Typography variant="h1">
|
|
61
|
+
The quick brown fox jumps over the lazy dog.
|
|
62
|
+
</Typography>
|
|
63
|
+
{/* Additional components will be added in the future */}
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export default App;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Development
|
|
72
|
+
|
|
73
|
+
To contribute to or test the library locally:
|
|
74
|
+
|
|
75
|
+
1. Clone the repository:
|
|
76
|
+
```bash
|
|
77
|
+
git clone https://github.com/your-username/greenole-design-system.git
|
|
78
|
+
cd greenole-design-system
|
|
79
|
+
```
|
|
80
|
+
2. Install dependencies:
|
|
81
|
+
```bash
|
|
82
|
+
npm install
|
|
83
|
+
```
|
|
84
|
+
3. Start the development environment using Vite:
|
|
85
|
+
```bash
|
|
86
|
+
npm run dev
|
|
87
|
+
```
|
|
88
|
+
4. To view the documentation and components, we use **Storybook**:
|
|
89
|
+
```bash
|
|
90
|
+
npm run storybook
|
|
91
|
+
```
|
|
92
|
+
Storybook serves as the documentation and demo environment for the library's components.
|
|
93
|
+
|
|
94
|
+
## Build & Publication
|
|
95
|
+
|
|
96
|
+
To generate the library bundle:
|
|
97
|
+
|
|
98
|
+
1. Run the build command:
|
|
99
|
+
```bash
|
|
100
|
+
npm run build
|
|
101
|
+
```
|
|
102
|
+
This will create the `dist` folder with both CommonJS and ESModule files, as well as type declarations (if configured).
|
|
103
|
+
|
|
104
|
+
2. To test locally in another project, use `npm link`:
|
|
105
|
+
```bash
|
|
106
|
+
cd greenole-design-system
|
|
107
|
+
npm link
|
|
108
|
+
cd ../your-consumer-project
|
|
109
|
+
npm link greenole-design-system
|
|
110
|
+
```
|
|
111
|
+
3. When ready to publish:
|
|
112
|
+
```bash
|
|
113
|
+
npm login
|
|
114
|
+
npm publish --access public
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Contributing
|
|
118
|
+
|
|
119
|
+
Contributions are welcome! If you would like to help evolve the **Greenole Design System**, follow these steps:
|
|
120
|
+
|
|
121
|
+
1. Fork the repository.
|
|
122
|
+
2. Create a branch for your feature (`git checkout -b my-feature`).
|
|
123
|
+
3. Commit your changes.
|
|
124
124
|
4. Open a pull request for review.
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
import { default as Toast } from './Toast';
|
|
4
3
|
declare const meta: Meta<typeof Toast>;
|
|
5
4
|
export default meta;
|
|
6
5
|
type Story = StoryObj<typeof Toast>;
|
|
7
6
|
export declare const Playground: Story;
|
|
8
7
|
export declare const Gallery: Story;
|
|
9
|
-
export declare const InteractiveSandbox:
|
|
10
|
-
name: string;
|
|
11
|
-
render: () => React.JSX.Element;
|
|
12
|
-
};
|
|
8
|
+
export declare const InteractiveSandbox: Story;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
2
|
variant: string;
|
|
3
3
|
}>> & string;
|
|
4
|
-
export declare const ProgressBar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
5
|
-
variant: string;
|
|
6
|
-
autoDismissTime: number;
|
|
7
|
-
}>> & string;
|
|
8
4
|
export declare const IconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
9
5
|
variant: string;
|
|
10
6
|
}>> & string;
|
package/package.json
CHANGED
|
@@ -1,88 +1,89 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "greenole-design-system",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "dist/greenole-design-system.cjs.js",
|
|
6
|
-
"module": "dist/greenole-design-system.es.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
|
-
"publishConfig": {
|
|
12
|
-
"access": "public"
|
|
13
|
-
},
|
|
14
|
-
"description": "Componentes reutilizáveis grnl",
|
|
15
|
-
"keywords": [
|
|
16
|
-
"design-system",
|
|
17
|
-
"greenole",
|
|
18
|
-
"react",
|
|
19
|
-
"ui",
|
|
20
|
-
"components"
|
|
21
|
-
],
|
|
22
|
-
"author": "Greenole",
|
|
23
|
-
"license": "MIT",
|
|
24
|
-
"scripts": {
|
|
25
|
-
"dev": "vite",
|
|
26
|
-
"build": "tsc && vite build && npx tailwindcss -i ./src/index.css -o ./dist/greenole.css",
|
|
27
|
-
"lint": "eslint .",
|
|
28
|
-
"preview": "vite preview",
|
|
29
|
-
"storybook": "storybook dev -p 6006",
|
|
30
|
-
"build-storybook": "storybook build",
|
|
31
|
-
"deploy-storybook": "storybook-to-ghpages",
|
|
32
|
-
"create-component": "node scripts/create-component.js",
|
|
33
|
-
"commit": "node scripts/commit.js"
|
|
34
|
-
},
|
|
35
|
-
"peerDependencies": {
|
|
36
|
-
"i18next": "^25.4.1",
|
|
37
|
-
"react": ">=18.2.0 <20.0.0",
|
|
38
|
-
"react-dom": ">=18.2.0 <20.0.0",
|
|
39
|
-
"react-i18next": "^15.4.0"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@chromatic-com/storybook": "^3.2.5",
|
|
43
|
-
"@eslint/js": "^9.21.0",
|
|
44
|
-
"@storybook/addon-docs": "^8.6.4",
|
|
45
|
-
"@storybook/addon-essentials": "^8.6.4",
|
|
46
|
-
"@storybook/addon-onboarding": "^8.6.4",
|
|
47
|
-
"@storybook/addon-themes": "^8.6.10",
|
|
48
|
-
"@storybook/blocks": "^8.6.4",
|
|
49
|
-
"@storybook/builder-vite": "^8.6.4",
|
|
50
|
-
"@storybook/experimental-addon-test": "^8.6.4",
|
|
51
|
-
"@storybook/react": "^8.6.4",
|
|
52
|
-
"@storybook/react-vite": "^8.6.4",
|
|
53
|
-
"@storybook/storybook-deployer": "^2.8.16",
|
|
54
|
-
"@storybook/test": "^8.6.4",
|
|
55
|
-
"@tanstack/react-form": "^1.20.0",
|
|
56
|
-
"@tanstack/react-query": "^5.87.4",
|
|
57
|
-
"@types/react": "^18.3.18",
|
|
58
|
-
"@types/react-dom": "^18.3.5",
|
|
59
|
-
"@types/styled-components": "^5.1.34",
|
|
60
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
61
|
-
"@vitest/browser": "^3.0.8",
|
|
62
|
-
"@vitest/coverage-v8": "^3.0.8",
|
|
63
|
-
"autoprefixer": "^10.4.21",
|
|
64
|
-
"chalk": "^5.6.0",
|
|
65
|
-
"cross-env": "^10.0.0",
|
|
66
|
-
"eslint": "^9.21.0",
|
|
67
|
-
"eslint-plugin-react-hooks": "^5.1.0",
|
|
68
|
-
"eslint-plugin-react-refresh": "^0.4.19",
|
|
69
|
-
"eslint-plugin-storybook": "^0.11.4",
|
|
70
|
-
"globals": "^15.15.0",
|
|
71
|
-
"playwright": "^1.51.0",
|
|
72
|
-
"postcss": "^8.5.3",
|
|
73
|
-
"prop-types": "^15.8.1",
|
|
74
|
-
"storybook": "^8.6.4",
|
|
75
|
-
"tailwindcss": "^3.4.17",
|
|
76
|
-
"vite": "^6.2.0",
|
|
77
|
-
"vite-plugin-dts": "^4.5.3",
|
|
78
|
-
"vitest": "^3.0.8"
|
|
79
|
-
},
|
|
80
|
-
"dependencies": {
|
|
81
|
-
"@phosphor-icons/react": "^2.1.10",
|
|
82
|
-
"clsx": "^2.1.1",
|
|
83
|
-
"dayjs": "^1.11.13",
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "greenole-design-system",
|
|
3
|
+
"version": "1.1.35",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/greenole-design-system.cjs.js",
|
|
6
|
+
"module": "dist/greenole-design-system.es.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"description": "Componentes reutilizáveis grnl",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"design-system",
|
|
17
|
+
"greenole",
|
|
18
|
+
"react",
|
|
19
|
+
"ui",
|
|
20
|
+
"components"
|
|
21
|
+
],
|
|
22
|
+
"author": "Greenole",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"build": "tsc && vite build && npx tailwindcss -i ./src/index.css -o ./dist/greenole.css",
|
|
27
|
+
"lint": "eslint .",
|
|
28
|
+
"preview": "vite preview",
|
|
29
|
+
"storybook": "storybook dev -p 6006",
|
|
30
|
+
"build-storybook": "storybook build",
|
|
31
|
+
"deploy-storybook": "storybook-to-ghpages",
|
|
32
|
+
"create-component": "node scripts/create-component.js",
|
|
33
|
+
"commit": "node scripts/commit.js"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"i18next": "^25.4.1",
|
|
37
|
+
"react": ">=18.2.0 <20.0.0",
|
|
38
|
+
"react-dom": ">=18.2.0 <20.0.0",
|
|
39
|
+
"react-i18next": "^15.4.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@chromatic-com/storybook": "^3.2.5",
|
|
43
|
+
"@eslint/js": "^9.21.0",
|
|
44
|
+
"@storybook/addon-docs": "^8.6.4",
|
|
45
|
+
"@storybook/addon-essentials": "^8.6.4",
|
|
46
|
+
"@storybook/addon-onboarding": "^8.6.4",
|
|
47
|
+
"@storybook/addon-themes": "^8.6.10",
|
|
48
|
+
"@storybook/blocks": "^8.6.4",
|
|
49
|
+
"@storybook/builder-vite": "^8.6.4",
|
|
50
|
+
"@storybook/experimental-addon-test": "^8.6.4",
|
|
51
|
+
"@storybook/react": "^8.6.4",
|
|
52
|
+
"@storybook/react-vite": "^8.6.4",
|
|
53
|
+
"@storybook/storybook-deployer": "^2.8.16",
|
|
54
|
+
"@storybook/test": "^8.6.4",
|
|
55
|
+
"@tanstack/react-form": "^1.20.0",
|
|
56
|
+
"@tanstack/react-query": "^5.87.4",
|
|
57
|
+
"@types/react": "^18.3.18",
|
|
58
|
+
"@types/react-dom": "^18.3.5",
|
|
59
|
+
"@types/styled-components": "^5.1.34",
|
|
60
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
61
|
+
"@vitest/browser": "^3.0.8",
|
|
62
|
+
"@vitest/coverage-v8": "^3.0.8",
|
|
63
|
+
"autoprefixer": "^10.4.21",
|
|
64
|
+
"chalk": "^5.6.0",
|
|
65
|
+
"cross-env": "^10.0.0",
|
|
66
|
+
"eslint": "^9.21.0",
|
|
67
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
68
|
+
"eslint-plugin-react-refresh": "^0.4.19",
|
|
69
|
+
"eslint-plugin-storybook": "^0.11.4",
|
|
70
|
+
"globals": "^15.15.0",
|
|
71
|
+
"playwright": "^1.51.0",
|
|
72
|
+
"postcss": "^8.5.3",
|
|
73
|
+
"prop-types": "^15.8.1",
|
|
74
|
+
"storybook": "^8.6.4",
|
|
75
|
+
"tailwindcss": "^3.4.17",
|
|
76
|
+
"vite": "^6.2.0",
|
|
77
|
+
"vite-plugin-dts": "^4.5.3",
|
|
78
|
+
"vitest": "^3.0.8"
|
|
79
|
+
},
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"@phosphor-icons/react": "^2.1.10",
|
|
82
|
+
"clsx": "^2.1.1",
|
|
83
|
+
"dayjs": "^1.11.13",
|
|
84
|
+
"i18next-http-backend": "^3.0.2",
|
|
85
|
+
"lucide-react": "^0.523.0",
|
|
86
|
+
"styled-components": "^6.1.19",
|
|
87
|
+
"use-debounce": "^10.0.6"
|
|
88
|
+
}
|
|
89
|
+
}
|
package/dist/App.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as Button } from './Button';
|
|
3
|
-
declare const meta: Meta<typeof Button>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Button>;
|
|
6
|
-
export declare const Primary: Story;
|
|
7
|
-
export declare const Secondary: Story;
|
|
8
|
-
export declare const Tertiary: Story;
|
|
9
|
-
export declare const Link: Story;
|
|
10
|
-
export declare const DangerPrimary: Story;
|
|
11
|
-
export declare const WithIcons: Story;
|
|
12
|
-
export declare const LoadingState: Story;
|
|
13
|
-
export declare const Disabled: Story;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { TypographyVariant } from '../../components/Typography/Typography';
|
|
3
|
-
export type ButtonVariant = "primary" | "secondary" | "tertiary" | "link";
|
|
4
|
-
export type ButtonSize = "sm" | "md" | "lg";
|
|
5
|
-
export type ButtonColor = "default" | "danger";
|
|
6
|
-
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
variant?: ButtonVariant;
|
|
9
|
-
size?: ButtonSize;
|
|
10
|
-
color?: ButtonColor;
|
|
11
|
-
fullWidth?: boolean;
|
|
12
|
-
typography?: TypographyVariant;
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
iconLeft?: ReactNode;
|
|
15
|
-
iconRight?: ReactNode;
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as Dropdown } from './Dropdown';
|
|
3
|
-
declare const meta: Meta<typeof Dropdown>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Dropdown>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Multiple: Story;
|
|
8
|
-
export declare const Searchable: Story;
|
|
9
|
-
export declare const WithMaxSelected: Story;
|
|
10
|
-
export declare const WithLoadMore: Story;
|
|
11
|
-
export declare const Invalid: Story;
|
|
12
|
-
export declare const WithMessage: Story;
|
|
13
|
-
export declare const OptionsWithIcons: Story;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { DropdownTypes } from './Dropdown.types';
|
|
2
|
-
type StyledButtonProps = Pick<DropdownTypes, 'invalid' | 'disabled' | 'className'> & {
|
|
3
|
-
$open: boolean;
|
|
4
|
-
$invalid: boolean;
|
|
5
|
-
};
|
|
6
|
-
type StyledMenuProps = {
|
|
7
|
-
$open: boolean;
|
|
8
|
-
};
|
|
9
|
-
type StyledOptionProps = {
|
|
10
|
-
$isSelected: boolean;
|
|
11
|
-
$isDisabled: boolean;
|
|
12
|
-
};
|
|
13
|
-
type StyledOptionCheckboxProps = {
|
|
14
|
-
$isSelected: boolean;
|
|
15
|
-
};
|
|
16
|
-
type StyledDropdownMessageProps = {
|
|
17
|
-
$invalid: boolean;
|
|
18
|
-
};
|
|
19
|
-
export declare const DropdownContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
20
|
-
export declare const DropdownLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
21
|
-
export declare const DropdownMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledDropdownMessageProps>> & string;
|
|
22
|
-
export declare const DropdownButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledButtonProps>> & string;
|
|
23
|
-
export declare const CaretIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').SVGProps<SVGSVGElement>, {
|
|
24
|
-
$open: boolean;
|
|
25
|
-
}>> & string;
|
|
26
|
-
export declare const DropdownMenu: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledMenuProps>> & string;
|
|
27
|
-
export declare const SearchContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
28
|
-
export declare const SearchInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
29
|
-
export declare const OptionsList: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
30
|
-
export declare const OptionButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledOptionProps>> & string;
|
|
31
|
-
export declare const OptionCheckbox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, StyledOptionCheckboxProps>> & string;
|
|
32
|
-
export declare const OptionLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
33
|
-
export declare const NoResults: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
34
|
-
export declare const Sentinel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
35
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface DropdownOptionsType {
|
|
3
|
-
icon?: ReactNode;
|
|
4
|
-
label: string;
|
|
5
|
-
value: string;
|
|
6
|
-
}
|
|
7
|
-
export interface DropdownAsyncOptionsType {
|
|
8
|
-
data: DropdownOptionsType[];
|
|
9
|
-
hasMore: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface DropdownTypes {
|
|
12
|
-
label?: string;
|
|
13
|
-
multiple?: boolean;
|
|
14
|
-
searchable?: boolean;
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
values?: string | string[];
|
|
17
|
-
maxSelected?: number;
|
|
18
|
-
options?: DropdownOptionsType[];
|
|
19
|
-
hasMore?: boolean;
|
|
20
|
-
isLoading?: boolean;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
invalid?: boolean;
|
|
23
|
-
message?: string | ReactNode;
|
|
24
|
-
className?: string;
|
|
25
|
-
displayValue?: string;
|
|
26
|
-
onChange: (value: string | string[]) => void;
|
|
27
|
-
onSearch?: (searchTerm: string) => void;
|
|
28
|
-
onLoadMore?: () => void;
|
|
29
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { default as Input } from './Input';
|
|
3
|
-
declare const meta: Meta<typeof Input>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Input>;
|
|
6
|
-
export declare const Playground: Story;
|
|
7
|
-
export declare const States: Story;
|
|
8
|
-
export declare const WithTanStackForm: Story;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
-
fullWidth?: boolean;
|
|
3
|
-
}>> & string;
|
|
4
|
-
export declare const Label: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
|
|
5
|
-
export declare const FieldWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
hasError?: boolean;
|
|
8
|
-
isValid?: boolean;
|
|
9
|
-
readOnly?: boolean;
|
|
10
|
-
textArea?: boolean;
|
|
11
|
-
}>> & string;
|
|
12
|
-
export declare const IconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
13
|
-
export declare const BaseFieldStyles: import('styled-components').RuleSet<object>;
|
|
14
|
-
export declare const InputField: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
15
|
-
export declare const TextAreaField: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, never>> & string;
|
|
16
|
-
export declare const ErrorText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
17
|
-
export declare const Subtitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
|
-
export declare const CharCounter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
19
|
-
hasError?: boolean;
|
|
20
|
-
}>> & string;
|