greenole-design-system 1.1.42 → 1.1.44

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,124 +1,124 @@
1
- # Greenole Design System
2
-
3
- [![Figma Design](https://img.shields.io/badge/Figma-Design_System-blue)](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
+ [![Figma Design](https://img.shields.io/badge/Figma-Design_System-blue)](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,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { THookTypes } from '../../utils/i18n/types';
2
3
  export interface DropdownOptionsType {
3
4
  icon?: ReactNode;
4
5
  label: string;
@@ -24,6 +25,7 @@ export interface DropdownTypes {
24
25
  className?: string;
25
26
  displayValue?: string;
26
27
  isRequired?: boolean;
28
+ t?: THookTypes;
27
29
  onChange: (value: string | string[]) => void;
28
30
  onSearch?: (searchTerm: string) => void;
29
31
  onLoadMore?: () => void;
@@ -1,13 +1,13 @@
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
- fullWidth?: boolean;
2
+ $fullWidth?: boolean;
3
3
  }>> & string;
4
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
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;
6
+ $disabled?: boolean;
7
+ $hasError?: boolean;
8
+ $isValid?: boolean;
9
+ $readOnly?: boolean;
10
+ $textArea?: boolean;
11
11
  }>> & string;
12
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
13
  export declare const BaseFieldStyles: import('styled-components').RuleSet<object>;
@@ -16,5 +16,5 @@ export declare const TextAreaField: import('styled-components/dist/types').IStyl
16
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
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
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;
19
+ $hasError?: boolean;
20
20
  }>> & string;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface GreenoleLogoProps {
3
+ className?: string;
4
+ }
5
+ declare const GreenoleLogo: React.FC<GreenoleLogoProps>;
6
+ export default GreenoleLogo;
@@ -3,4 +3,9 @@ export interface LoadingProps extends SVGProps<SVGSVGElement> {
3
3
  show?: boolean;
4
4
  size?: number;
5
5
  color?: string;
6
+ showLogo?: boolean;
7
+ title?: string;
8
+ subtitle?: string;
9
+ fullScreen?: boolean;
10
+ spinnerType?: 'svg' | 'css';
6
11
  }
@@ -1,3 +1,18 @@
1
+ export declare const LoadingContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ export declare const ContentWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const LogoContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const TextContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
+ export declare const TitleText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
6
+ export declare const SubtitleText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
7
+ export declare const SpinnerContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
1
8
  export declare const Spinner: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').SVGProps<SVGSVGElement>, {
2
9
  $size: number;
3
10
  }>> & string;
11
+ export declare const CSSSpinner: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
12
+ $size: number;
13
+ $color: string;
14
+ }>> & string;
15
+ export declare const CompactLoadingContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
16
+ export declare const CompactTextContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
17
+ export declare const CompactTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
18
+ export declare const CompactSubtitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
@@ -2,6 +2,6 @@ export declare const SliderWrapper: import('styled-components/dist/types').IStyl
2
2
  export declare const ValueBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
3
  export declare const ValueText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
4
4
  export declare const SliderInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
5
- percent: number;
6
- color: string;
5
+ $percent: number;
6
+ $color: string;
7
7
  }>> & string;
@@ -1,7 +1,7 @@
1
1
  export declare const SwitchWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {
2
- checked: boolean;
3
- color: string;
4
- variant: "filled" | "outline";
5
- thumbVariant: "filled" | "outline";
6
- disabled?: boolean;
2
+ $checked: boolean;
3
+ $color: string;
4
+ $variant: "filled" | "outline";
5
+ $thumbVariant: "filled" | "outline";
6
+ $disabled?: boolean;
7
7
  }>> & string;
@@ -1,9 +1,9 @@
1
1
  import { TooltipPositionTypes } from './Tooltip.types';
2
2
  declare const TooltipWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
3
  declare const TooltipBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
- position: TooltipPositionTypes;
4
+ $position: TooltipPositionTypes;
5
5
  }>> & string;
6
6
  declare const TooltipArrow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
7
- position: TooltipPositionTypes;
7
+ $position: TooltipPositionTypes;
8
8
  }>> & string;
9
9
  export { TooltipArrow, TooltipBox, TooltipWrapper };
@@ -1,11 +1,15 @@
1
- export declare const styles: {
2
- dayBase: string;
3
- dayHover: string;
4
- dayInRange: string;
5
- dayStart: string;
6
- dayEnd: string;
7
- daySingle: string;
8
- presetBase: string;
9
- presetActive: string;
10
- presetHover: string;
11
- };
1
+ export declare const CalendarContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ export declare const PresetsContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const PresetButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
4
+ $isActive: boolean;
5
+ }>> & string;
6
+ export declare const DateRangeContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
7
+ export declare const MonthContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
+ export declare const MonthHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
+ export declare const MonthTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
10
+ export declare const NavButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
11
+ export declare const DaysOfWeekContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
12
+ export declare const DaysGrid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
+ export declare const DayButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
14
+ $variant: "single" | "start" | "end" | "inRange" | "hover";
15
+ }>> & string;
@@ -10,6 +10,8 @@ export interface DrawerProps {
10
10
  cancelButtonText?: string;
11
11
  confirmButtonText?: string;
12
12
  direction?: 'left' | 'right';
13
+ cancelButton?: ReactNode;
14
+ confirmButton?: ReactNode;
13
15
  onCancel?: () => void;
14
16
  onConfirm?: () => void;
15
17
  onClose?: () => void;
@@ -1,8 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
+ import { THookTypes } from '../../utils/i18n/types';
2
3
  export interface EmptyProps {
3
4
  icon?: ReactNode;
4
5
  iconBg?: string;
5
6
  title?: string;
6
7
  description?: string;
7
8
  className?: string;
9
+ t?: THookTypes;
8
10
  }
@@ -1,5 +1,5 @@
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
- variant: "input" | "preview";
2
+ $variant: "input" | "preview";
3
3
  }>> & string;
4
4
  export declare const InputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
5
  export declare const InputWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,9 +1,10 @@
1
+ import { THookTypes } from '../../utils/i18n/types';
1
2
  export type AspectRatio = {
2
3
  width: number;
3
4
  height: number;
4
5
  };
5
6
  export type UploadProps = {
6
- variant?: "input" | "preview";
7
+ variant?: 'input' | 'preview';
7
8
  maxSize?: number;
8
9
  acceptedTypes?: string;
9
10
  previewSize?: {
@@ -14,6 +15,8 @@ export type UploadProps = {
14
15
  maxFiles?: number;
15
16
  aspectRatio?: AspectRatio;
16
17
  initialImage?: string;
18
+ showPreview?: boolean;
19
+ t?: THookTypes;
17
20
  onUpload?: (files: File[]) => void;
18
21
  onRemove?: (fileIndex: number) => void;
19
22
  };