greenole-design-system 1.1.1

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.
Files changed (51) hide show
  1. package/README.md +112 -0
  2. package/dist/components/Empty/Empty.d.ts +3 -0
  3. package/dist/components/Empty/Empty.stories.d.ts +20 -0
  4. package/dist/components/Icons/ArrowBack.d.ts +6 -0
  5. package/dist/components/Icons/ArrowForward.d.ts +6 -0
  6. package/dist/components/Icons/Campaing.d.ts +6 -0
  7. package/dist/components/Icons/Checkbox.d.ts +7 -0
  8. package/dist/components/Icons/ChevronDown.d.ts +6 -0
  9. package/dist/components/Icons/DashEdit.d.ts +6 -0
  10. package/dist/components/Icons/Dashboard.d.ts +6 -0
  11. package/dist/components/Icons/Devices.d.ts +6 -0
  12. package/dist/components/Icons/FlagBR.d.ts +6 -0
  13. package/dist/components/Icons/FlagES.d.ts +6 -0
  14. package/dist/components/Icons/FlagPT.d.ts +6 -0
  15. package/dist/components/Icons/FlagUK.d.ts +6 -0
  16. package/dist/components/Icons/FlagUSA.d.ts +6 -0
  17. package/dist/components/Icons/HeaderSearch.d.ts +6 -0
  18. package/dist/components/Icons/HelpOutlined.d.ts +6 -0
  19. package/dist/components/Icons/History.d.ts +6 -0
  20. package/dist/components/Icons/Home.d.ts +6 -0
  21. package/dist/components/Icons/Icons.d.ts +31 -0
  22. package/dist/components/Icons/Icons.stories.d.ts +5 -0
  23. package/dist/components/Icons/Language.d.ts +6 -0
  24. package/dist/components/Icons/Lock.d.ts +6 -0
  25. package/dist/components/Icons/Logout.d.ts +6 -0
  26. package/dist/components/Icons/Map.d.ts +6 -0
  27. package/dist/components/Icons/Moon.d.ts +6 -0
  28. package/dist/components/Icons/MoreHorizontal.d.ts +6 -0
  29. package/dist/components/Icons/Notification.d.ts +6 -0
  30. package/dist/components/Icons/PeopleAlt.d.ts +6 -0
  31. package/dist/components/Icons/PriorityHigh.d.ts +6 -0
  32. package/dist/components/Icons/Public.d.ts +6 -0
  33. package/dist/components/Icons/Search.d.ts +6 -0
  34. package/dist/components/Icons/Secutiry.d.ts +6 -0
  35. package/dist/components/Icons/Settings.d.ts +6 -0
  36. package/dist/components/Icons/Star.d.ts +7 -0
  37. package/dist/components/Icons/WBSunny.d.ts +6 -0
  38. package/dist/components/Icons/WarningAmber.d.ts +6 -0
  39. package/dist/components/Table/DataTable.d.ts +18 -0
  40. package/dist/components/Table/DataTable.stories.d.ts +8 -0
  41. package/dist/components/Table/Pagination.d.ts +10 -0
  42. package/dist/components/Table/types.d.ts +10 -0
  43. package/dist/components/Typography/Typography.d.ts +10 -0
  44. package/dist/components/Typography/Typography.stories.d.ts +32 -0
  45. package/dist/greenole-design-system.es.js +2014 -0
  46. package/dist/greenole-design-system.umd.js +30 -0
  47. package/dist/index.d.ts +4 -0
  48. package/dist/main.d.ts +1 -0
  49. package/dist/utils/i18n/i18n.d.ts +1 -0
  50. package/dist/vite.svg +1 -0
  51. package/package.json +67 -0
package/README.md ADDED
@@ -0,0 +1,112 @@
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 can import and use the library's components as follows:
40
+
41
+ ```jsx
42
+ import React from 'react';
43
+ import { Typography } from 'greenole-design-system';
44
+
45
+ function App() {
46
+ return (
47
+ <div>
48
+ <Typography variant="h1">
49
+ The quick brown fox jumps over the lazy dog.
50
+ </Typography>
51
+ {/* Additional components will be added in the future */}
52
+ </div>
53
+ );
54
+ }
55
+
56
+ export default App;
57
+ ```
58
+
59
+ ## Development
60
+
61
+ To contribute to or test the library locally:
62
+
63
+ 1. Clone the repository:
64
+ ```bash
65
+ git clone https://github.com/your-username/greenole-design-system.git
66
+ cd greenole-design-system
67
+ ```
68
+ 2. Install dependencies:
69
+ ```bash
70
+ npm install
71
+ ```
72
+ 3. Start the development environment using Vite:
73
+ ```bash
74
+ npm run dev
75
+ ```
76
+ 4. To view the documentation and components, we use **Storybook**:
77
+ ```bash
78
+ npm run storybook
79
+ ```
80
+ Storybook serves as the documentation and demo environment for the library's components.
81
+
82
+ ## Build & Publication
83
+
84
+ To generate the library bundle:
85
+
86
+ 1. Run the build command:
87
+ ```bash
88
+ npm run build
89
+ ```
90
+ This will create the `dist` folder with both CommonJS and ESModule files, as well as type declarations (if configured).
91
+
92
+ 2. To test locally in another project, use `npm link`:
93
+ ```bash
94
+ cd greenole-design-system
95
+ npm link
96
+ cd ../your-consumer-project
97
+ npm link greenole-design-system
98
+ ```
99
+ 3. When ready to publish:
100
+ ```bash
101
+ npm login
102
+ npm publish --access public
103
+ ```
104
+
105
+ ## Contributing
106
+
107
+ Contributions are welcome! If you would like to help evolve the **Greenole Design System**, follow these steps:
108
+
109
+ 1. Fork the repository.
110
+ 2. Create a branch for your feature (`git checkout -b my-feature`).
111
+ 3. Commit your changes.
112
+ 4. Open a pull request for review.
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare const Empty: () => React.JSX.Element;
3
+ export default Empty;
@@ -0,0 +1,20 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { default as Empty } from './Empty';
3
+ import { default as React } from 'react';
4
+ declare const meta: {
5
+ title: string;
6
+ component: () => React.JSX.Element;
7
+ parameters: {
8
+ layout: string;
9
+ docs: {
10
+ description: {
11
+ component: string;
12
+ };
13
+ };
14
+ };
15
+ tags: string[];
16
+ };
17
+ export default meta;
18
+ type Story = StoryObj<typeof Empty>;
19
+ export declare const Default: Story;
20
+ export declare const InCard: Story;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface ArrowBackProps {
3
+ className?: string;
4
+ }
5
+ export default function ArrowBack({ className }: ArrowBackProps): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface ArrowForwardProps {
3
+ className?: string;
4
+ }
5
+ export default function ArrowForward({ className }: ArrowForwardProps): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface CampaingProps {
3
+ className?: string;
4
+ }
5
+ declare const Campaing: React.FC<CampaingProps>;
6
+ export default Campaing;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface CheckboxProps {
3
+ checked?: boolean;
4
+ className?: string;
5
+ }
6
+ export default function Checkbox({ checked, className }: CheckboxProps): React.JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface ChevronDownProps {
3
+ className?: string;
4
+ }
5
+ export default function ChevronDown({ className }: ChevronDownProps): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface DashEditProps {
3
+ className?: string;
4
+ }
5
+ declare const DashEdit: React.FC<DashEditProps>;
6
+ export default DashEdit;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface DashboardProps {
3
+ className?: string;
4
+ }
5
+ declare const Dashboard: React.FC<DashboardProps>;
6
+ export default Dashboard;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface DevicesProps {
3
+ className?: string;
4
+ }
5
+ declare const Devices: React.FC<DevicesProps>;
6
+ export default Devices;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface FlagBRProps {
3
+ className?: string;
4
+ }
5
+ declare const FlagBR: React.FC<FlagBRProps>;
6
+ export default FlagBR;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface FlagESProps {
3
+ className?: string;
4
+ }
5
+ declare const FlagES: React.FC<FlagESProps>;
6
+ export default FlagES;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface FlagPTProps {
3
+ className?: string;
4
+ }
5
+ declare const FlagPT: React.FC<FlagPTProps>;
6
+ export default FlagPT;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface FlagUKProps {
3
+ className?: string;
4
+ }
5
+ declare const FlagUK: React.FC<FlagUKProps>;
6
+ export default FlagUK;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface FlagUSAProps {
3
+ className?: string;
4
+ }
5
+ declare const FlagUSA: React.FC<FlagUSAProps>;
6
+ export default FlagUSA;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface HeaderSearchProps {
3
+ className?: string;
4
+ }
5
+ declare const HeaderSearch: React.FC<HeaderSearchProps>;
6
+ export default HeaderSearch;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface HelpOutlinedProps {
3
+ className?: string;
4
+ }
5
+ declare const HelpOutlined: React.FC<HelpOutlinedProps>;
6
+ export default HelpOutlined;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface HistoryProps {
3
+ className?: string;
4
+ }
5
+ declare const History: React.FC<HistoryProps>;
6
+ export default History;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface HomeProps {
3
+ className?: string;
4
+ }
5
+ declare const Home: React.FC<HomeProps>;
6
+ export default Home;
@@ -0,0 +1,31 @@
1
+ export { default as ArrowBack } from './ArrowBack';
2
+ export { default as ArrowForward } from './ArrowForward';
3
+ export { default as ChevronDown } from './ChevronDown';
4
+ export { default as Home } from './Home';
5
+ export { default as Checkbox } from './Checkbox';
6
+ export { default as DashEdit } from './DashEdit';
7
+ export { default as HeaderSearch } from './HeaderSearch';
8
+ export { default as MoreHorizontal } from './MoreHorizontal';
9
+ export { default as Search } from './Search';
10
+ export { default as Settings } from './Settings';
11
+ export { default as Lock } from './Lock';
12
+ export { default as Notification } from './Notification';
13
+ export { default as PriorityHigh } from './PriorityHigh';
14
+ export { default as Public } from './Public';
15
+ export { default as Star } from './Star';
16
+ export { default as WarningAmber } from './WarningAmber';
17
+ export { default as FlagBR } from './FlagBR';
18
+ export { default as FlagES } from './FlagES';
19
+ export { default as FlagPT } from './FlagPT';
20
+ export { default as FlagUK } from './FlagUK';
21
+ export { default as FlagUSA } from './FlagUSA';
22
+ export { default as Campaign } from './Campaing';
23
+ export { default as Dashboard } from './Dashboard';
24
+ export { default as Devices } from './Devices';
25
+ export { default as History } from './History';
26
+ export { default as Language } from './Language';
27
+ export { default as Map } from './Map';
28
+ export { default as PeopleAlt } from './PeopleAlt';
29
+ export { default as Moon } from './Moon';
30
+ export { default as WBSunny } from './WBSunny';
31
+ export { default as Logout } from './Logout';
@@ -0,0 +1,5 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const AllIcons: Story;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface LanguageProps {
3
+ className?: string;
4
+ }
5
+ declare const Language: React.FC<LanguageProps>;
6
+ export default Language;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface LockProps {
3
+ className?: string;
4
+ }
5
+ declare const Lock: React.FC<LockProps>;
6
+ export default Lock;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface LogoutProps {
3
+ className?: string;
4
+ }
5
+ declare const Logout: React.FC<LogoutProps>;
6
+ export default Logout;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface MapProps {
3
+ className?: string;
4
+ }
5
+ declare const Map: React.FC<MapProps>;
6
+ export default Map;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface MoonProps {
3
+ className?: string;
4
+ }
5
+ declare const Moon: React.FC<MoonProps>;
6
+ export default Moon;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface MoreHorizontalProps {
3
+ className?: string;
4
+ }
5
+ declare const MoreHorizontal: React.FC<MoreHorizontalProps>;
6
+ export default MoreHorizontal;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface NotificationProps {
3
+ className?: string;
4
+ }
5
+ declare const Notification: React.FC<NotificationProps>;
6
+ export default Notification;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface PeopleAltProps {
3
+ className?: string;
4
+ }
5
+ declare const PeopleAlt: React.FC<PeopleAltProps>;
6
+ export default PeopleAlt;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface PriorityHighProps {
3
+ className?: string;
4
+ }
5
+ declare const PriorityHigh: React.FC<PriorityHighProps>;
6
+ export default PriorityHigh;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface PublicProps {
3
+ className?: string;
4
+ }
5
+ declare const Public: React.FC<PublicProps>;
6
+ export default Public;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface SearchProps {
3
+ className?: string;
4
+ }
5
+ declare const Search: React.FC<SearchProps>;
6
+ export default Search;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface SecurityProps {
3
+ className?: string;
4
+ }
5
+ declare const Security: React.FC<SecurityProps>;
6
+ export default Security;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface SettingsProps {
3
+ className?: string;
4
+ }
5
+ declare const Settings: React.FC<SettingsProps>;
6
+ export default Settings;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface StarProps {
3
+ className?: string;
4
+ filled?: boolean;
5
+ }
6
+ declare const Star: React.FC<StarProps>;
7
+ export default Star;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface WBSunnyProps {
3
+ className?: string;
4
+ }
5
+ declare const WBSunny: React.FC<WBSunnyProps>;
6
+ export default WBSunny;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ interface WarningAmberProps {
3
+ className?: string;
4
+ }
5
+ declare const WarningAmber: React.FC<WarningAmberProps>;
6
+ export default WarningAmber;
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ import { Column } from './types';
3
+ interface DataTableProps {
4
+ columns: Column[];
5
+ data: any[];
6
+ selectable?: boolean;
7
+ selectedRows?: string[];
8
+ onSelectRow?: (rowId: string, selected: boolean) => void;
9
+ onSelectAll?: (allSelected: boolean) => void;
10
+ rowIdKey?: string;
11
+ page?: number;
12
+ pageSize?: number;
13
+ totalItems?: number;
14
+ onPageChange?: (newPage: number) => void;
15
+ onPageSizeChange?: (newSize: number) => void;
16
+ }
17
+ export declare function DataTable({ columns, data, selectable, selectedRows, onSelectRow, onSelectAll, rowIdKey, page, pageSize, totalItems, onPageChange, onPageSizeChange }: DataTableProps): React.JSX.Element;
18
+ export default DataTable;
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { DataTable } from './DataTable';
3
+ declare const meta: Meta<typeof DataTable>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof DataTable>;
6
+ export declare const Default: Story;
7
+ export declare const WithSelection: Story;
8
+ export declare const WithPagination: Story;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ interface PaginationProps {
3
+ page: number;
4
+ pageSize: number;
5
+ totalItems: number;
6
+ onPageChange: (newPage: number) => void;
7
+ onPageSizeChange: (newSize: number) => void;
8
+ }
9
+ export declare function Pagination({ page, pageSize, totalItems, onPageChange, onPageSizeChange, }: PaginationProps): React.JSX.Element;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export type Column = {
3
+ key: string;
4
+ label?: string;
5
+ icon?: ReactNode;
6
+ render?: (value: any, row: any) => ReactNode;
7
+ width?: string;
8
+ align?: 'left' | 'center' | 'right';
9
+ minWidthClass?: string;
10
+ };
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body-xl-bold' | 'body-xl-semibold' | 'body-xl-medium' | 'body-xl-regular' | 'body-lg-bold' | 'body-lg-semibold' | 'body-lg-medium' | 'body-lg-regular' | 'body-md-bold' | 'body-md-semibold' | 'body-md-medium' | 'body-md-regular' | 'body-sm-bold' | 'body-sm-semibold' | 'body-sm-medium' | 'body-sm-regular' | 'caption-bold' | 'caption-semibold' | 'caption-medium' | 'caption-regular';
3
+ interface TypographyProps {
4
+ variant?: TypographyVariant;
5
+ children: React.ReactNode;
6
+ style?: React.CSSProperties;
7
+ [key: string]: any;
8
+ }
9
+ declare const Typography: React.FC<TypographyProps>;
10
+ export default Typography;
@@ -0,0 +1,32 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as Typography } from './Typography';
3
+ declare const meta: Meta<typeof Typography>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Typography>;
6
+ export declare const Default: Story;
7
+ export declare const H1: Story;
8
+ export declare const H2: Story;
9
+ export declare const H3: Story;
10
+ export declare const H4: Story;
11
+ export declare const H5: Story;
12
+ export declare const H6: Story;
13
+ export declare const BodyXLBold: Story;
14
+ export declare const BodyXLSemibold: Story;
15
+ export declare const BodyXLMedium: Story;
16
+ export declare const BodyXLRegular: Story;
17
+ export declare const BodyLGBold: Story;
18
+ export declare const BodyLGSemibold: Story;
19
+ export declare const BodyLGMedium: Story;
20
+ export declare const BodyLGRegular: Story;
21
+ export declare const BodyMDBold: Story;
22
+ export declare const BodyMDSemibold: Story;
23
+ export declare const BodyMDMedium: Story;
24
+ export declare const BodyMDRegular: Story;
25
+ export declare const BodySMBold: Story;
26
+ export declare const BodySMSemibold: Story;
27
+ export declare const BodySMMedium: Story;
28
+ export declare const BodySMRegular: Story;
29
+ export declare const CaptionBold: Story;
30
+ export declare const CaptionSemibold: Story;
31
+ export declare const CaptionMedium: Story;
32
+ export declare const CaptionRegular: Story;