greenole-design-system 1.1.52 → 1.1.53

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,147 +1,147 @@
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
-
100
- ```bash
101
- npm run build
102
- ```
103
-
104
- This will create the `dist` folder with both CommonJS and ESModule files, as well as type declarations (if configured).
105
-
106
- 2. To test locally in another project, use `npm link`:
107
- ```bash
108
- cd greenole-design-system
109
- npm link
110
- cd ../your-consumer-project
111
- npm link greenole-design-system
112
- ```
113
- 3. When ready to publish:
114
-
115
- ```bash
116
- npm login
117
- npm publish --access public
118
- ```
119
-
120
- ## Publishing Storybook to GitHub Pages
121
-
122
- 1. Build the Storybook:
123
-
124
- ```bash
125
- npm run build-storybook
126
- ```
127
-
128
- This generates the static files for your Storybook.
129
-
130
- 2. Deploy to GitHub Pages:
131
-
132
- ```bash
133
- npm run deploy-storybook
134
- ```
135
-
136
- This will automatically push the built files to the configured branch (`gh-pages`).
137
-
138
- After that, you can access the updated Storybook at: [Design System](https://greenole-iot.github.io/greenole-design-system)
139
-
140
- ## Contributing
141
-
142
- Contributions are welcome! If you would like to help evolve the **Greenole Design System**, follow these steps:
143
-
144
- 1. Fork the repository.
145
- 2. Create a branch for your feature (`git checkout -b my-feature`).
146
- 3. Commit your changes.
147
- 4. Open a pull request for review.
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
+
100
+ ```bash
101
+ npm run build
102
+ ```
103
+
104
+ This will create the `dist` folder with both CommonJS and ESModule files, as well as type declarations (if configured).
105
+
106
+ 2. To test locally in another project, use `npm link`:
107
+ ```bash
108
+ cd greenole-design-system
109
+ npm link
110
+ cd ../your-consumer-project
111
+ npm link greenole-design-system
112
+ ```
113
+ 3. When ready to publish:
114
+
115
+ ```bash
116
+ npm login
117
+ npm publish --access public
118
+ ```
119
+
120
+ ## Publishing Storybook to GitHub Pages
121
+
122
+ 1. Build the Storybook:
123
+
124
+ ```bash
125
+ npm run build-storybook
126
+ ```
127
+
128
+ This generates the static files for your Storybook.
129
+
130
+ 2. Deploy to GitHub Pages:
131
+
132
+ ```bash
133
+ npm run deploy-storybook
134
+ ```
135
+
136
+ This will automatically push the built files to the configured branch (`gh-pages`).
137
+
138
+ After that, you can access the updated Storybook at: [Design System](https://greenole-iot.github.io/greenole-design-system)
139
+
140
+ ## Contributing
141
+
142
+ Contributions are welcome! If you would like to help evolve the **Greenole Design System**, follow these steps:
143
+
144
+ 1. Fork the repository.
145
+ 2. Create a branch for your feature (`git checkout -b my-feature`).
146
+ 3. Commit your changes.
147
+ 4. Open a pull request for review.
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { BottomSheetProps } from './BottomSheet.types';
3
+ export declare const BottomSheet: React.FC<BottomSheetProps>;
4
+ export default BottomSheet;
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as BottomSheet } from './BottomSheet';
3
+ declare const meta: Meta<typeof BottomSheet>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof BottomSheet>;
6
+ export declare const Minimal: Story;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Fullscreen overlay behind the sheet.
3
+ * Controls z-index, fade/opacity and pointer-events.
4
+ */
5
+ export declare const Overlay: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
6
+ $z: number;
7
+ $show: boolean;
8
+ $animMs: number;
9
+ }>> & string;
10
+ /**
11
+ * The sheet container itself.
12
+ * Supports "full" height mode and animates in/out vertically.
13
+ */
14
+ export declare const Sheet: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
15
+ $maxH: string;
16
+ $height: "auto" | "content" | "full";
17
+ $show: boolean;
18
+ $animMs: number;
19
+ }>> & string;
20
+ /**
21
+ * Small handle shown at the top of the sheet for affordance.
22
+ */
23
+ export declare const Handle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
24
+ /**
25
+ * Scrollable content area inside the sheet.
26
+ * When not compact, we provide internal padding.
27
+ */
28
+ export declare const Content: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
29
+ $compact: boolean;
30
+ }>> & string;
31
+ /**
32
+ * Spacer to respect iOS safe-area at the bottom.
33
+ */
34
+ export declare const SafeAreaSpacer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -0,0 +1,16 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ export type BottomSheetHeight = "auto" | "content" | "full";
3
+ export interface BottomSheetProps {
4
+ isOpen: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ children: ReactNode;
7
+ closeOnOverlayClick?: boolean;
8
+ closeOnEsc?: boolean;
9
+ showHandle?: boolean;
10
+ zIndex?: number;
11
+ height?: BottomSheetHeight;
12
+ maxHeight?: string | number;
13
+ initialFocusRef?: RefObject<HTMLElement>;
14
+ className?: string;
15
+ disableAnimation?: boolean;
16
+ }
@@ -5,10 +5,8 @@ export default meta;
5
5
  type Story = StoryObj<typeof Calendar>;
6
6
  export declare const InlineSingle: Story;
7
7
  export declare const InlineRange: Story;
8
- export declare const InputSingle_Input: Story;
9
- export declare const InputRange_Input: Story;
10
- export declare const InputSingle_WeekendsDisabled: Story;
11
- export declare const InputRange_WeekendsDisabled: Story;
12
- export declare const InputRange_DisabledBlock: Story;
8
+ export declare const InputSingle: Story;
9
+ export declare const InputRange: Story;
13
10
  export declare const InputSingle_MinMax: Story;
14
- export declare const InputRange_MinMax: Story;
11
+ export declare const InputRange_WeekendsDisabled: Story;
12
+ export declare const MobileRange_Sheet: Story;
@@ -4,15 +4,26 @@ export declare const PresetButton: import('styled-components/dist/types').IStyle
4
4
  $isActive?: boolean;
5
5
  }>> & string;
6
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;
7
+ export declare const MonthContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
8
+ $isMobile?: boolean;
9
+ }>> & string;
10
+ export declare const MonthHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
11
+ $isMobile?: boolean;
12
+ }>> & string;
13
+ export declare const MonthTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
14
+ $isMobile?: boolean;
15
+ }>> & string;
10
16
  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;
17
+ export declare const DaysOfWeekContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
18
+ $isMobile?: boolean;
19
+ }>> & string;
20
+ export declare const DaysGrid: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
21
+ $isMobile?: boolean;
22
+ }>> & string;
13
23
  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
24
  $isSelected?: boolean;
15
25
  $inRange?: boolean;
16
26
  $isStart?: boolean;
17
27
  $isEnd?: boolean;
28
+ $isMobile?: boolean;
18
29
  }>> & string;
@@ -14,4 +14,6 @@ export interface CalendarProps {
14
14
  inline?: boolean;
15
15
  disabledDates?: Dayjs[];
16
16
  showPresets?: boolean;
17
+ isMobile?: boolean;
18
+ rangeSinglePanel?: boolean;
17
19
  }
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { Dayjs } from 'dayjs';
2
+ import { default as React } from 'react';
3
3
  import { DateRange } from './Calendar.types';
4
4
  interface Props {
5
5
  mode: 'single' | 'range';
@@ -10,6 +10,9 @@ interface Props {
10
10
  maxDate?: Dayjs;
11
11
  locale: string;
12
12
  disabledDates: Dayjs[];
13
+ rangeSinglePanel?: boolean;
14
+ /** Ativa espaçamento/tamanhos mais confortáveis */
15
+ isMobile?: boolean;
13
16
  }
14
17
  export declare const DateRangePicker: React.FC<Props>;
15
18
  export {};