josenanodev-react-components-library 0.0.1 → 0.0.3
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/dist/cjs/common/types.d.ts +113 -0
- package/dist/cjs/components/Multicalendar/Multicalendar.css +381 -0
- package/dist/cjs/components/Multicalendar/Multicalendar.d.ts +1 -1
- package/dist/cjs/components/Multicalendar/Multicalendar.js +2 -2
- package/dist/cjs/components/Multicalendar/Multicalendar.js.map +1 -1
- package/dist/cjs/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.css +5 -0
- package/dist/cjs/components/Multicalendar/subcomponents/composites/CellsRow/types.d.ts +11 -0
- package/dist/cjs/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.css +6 -0
- package/dist/cjs/components/Multicalendar/subcomponents/composites/DatesGrid/types.d.ts +13 -0
- package/dist/cjs/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.css +3 -0
- package/dist/cjs/components/Multicalendar/subcomponents/composites/ListElementsColumn/types.d.ts +9 -0
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/Cell/Cell.css +7 -0
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/Cell/types.d.ts +10 -0
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.css +60 -0
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DatesRow/types.d.ts +11 -0
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.css +14 -0
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/types.d.ts +5 -0
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.css +14 -0
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/ListElement/types.d.ts +7 -0
- package/dist/cjs/components/Multicalendar/types.d.ts +41 -0
- package/dist/cjs/index.css +77 -0
- package/dist/cjs/languages/types.d.ts +192 -0
- package/dist/cjs/react-app-env.d.ts +1 -0
- package/dist/esm/common/types.d.ts +113 -0
- package/dist/esm/components/Multicalendar/Multicalendar.css +381 -0
- package/dist/esm/components/Multicalendar/Multicalendar.d.ts +1 -1
- package/dist/esm/components/Multicalendar/Multicalendar.js +2 -2
- package/dist/esm/components/Multicalendar/Multicalendar.js.map +1 -1
- package/dist/esm/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.css +5 -0
- package/dist/esm/components/Multicalendar/subcomponents/composites/CellsRow/types.d.ts +11 -0
- package/dist/esm/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.css +6 -0
- package/dist/esm/components/Multicalendar/subcomponents/composites/DatesGrid/types.d.ts +13 -0
- package/dist/esm/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.css +3 -0
- package/dist/esm/components/Multicalendar/subcomponents/composites/ListElementsColumn/types.d.ts +9 -0
- package/dist/esm/components/Multicalendar/subcomponents/individuals/Cell/Cell.css +7 -0
- package/dist/esm/components/Multicalendar/subcomponents/individuals/Cell/types.d.ts +10 -0
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.css +60 -0
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DatesRow/types.d.ts +11 -0
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.css +14 -0
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/types.d.ts +5 -0
- package/dist/esm/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.css +14 -0
- package/dist/esm/components/Multicalendar/subcomponents/individuals/ListElement/types.d.ts +7 -0
- package/dist/esm/components/Multicalendar/types.d.ts +41 -0
- package/dist/esm/index.css +77 -0
- package/dist/esm/languages/types.d.ts +192 -0
- package/dist/esm/react-app-env.d.ts +1 -0
- package/package.json +93 -88
- package/dist/cjs/stories/Button.d.ts +0 -29
- package/dist/cjs/stories/Button.js +0 -29
- package/dist/cjs/stories/Button.js.map +0 -1
- package/dist/cjs/stories/Header.d.ts +0 -13
- package/dist/cjs/stories/Header.js +0 -28
- package/dist/cjs/stories/Header.js.map +0 -1
- package/dist/cjs/stories/Page.d.ts +0 -3
- package/dist/cjs/stories/Page.js +0 -45
- package/dist/cjs/stories/Page.js.map +0 -1
- package/dist/cjs/utils/datesArray.test.d.ts +0 -4
- package/dist/cjs/utils/datesArray.test.js +0 -24
- package/dist/cjs/utils/datesArray.test.js.map +0 -1
- package/dist/cjs/utils/jsToSqlDate.test.d.ts +0 -4
- package/dist/cjs/utils/jsToSqlDate.test.js +0 -16
- package/dist/cjs/utils/jsToSqlDate.test.js.map +0 -1
- package/dist/cjs/utils/monthYearString.test.d.ts +0 -4
- package/dist/cjs/utils/monthYearString.test.js +0 -16
- package/dist/cjs/utils/monthYearString.test.js.map +0 -1
- package/dist/cjs/utils/numberOfDaysInAMonth.test.d.ts +0 -4
- package/dist/cjs/utils/numberOfDaysInAMonth.test.js +0 -18
- package/dist/cjs/utils/numberOfDaysInAMonth.test.js.map +0 -1
- package/dist/cjs/utils/sqlToJsDate.test.d.ts +0 -4
- package/dist/cjs/utils/sqlToJsDate.test.js +0 -16
- package/dist/cjs/utils/sqlToJsDate.test.js.map +0 -1
- package/dist/esm/stories/Button.d.ts +0 -29
- package/dist/esm/stories/Button.js +0 -22
- package/dist/esm/stories/Button.js.map +0 -1
- package/dist/esm/stories/Header.d.ts +0 -13
- package/dist/esm/stories/Header.js +0 -21
- package/dist/esm/stories/Header.js.map +0 -1
- package/dist/esm/stories/Page.d.ts +0 -3
- package/dist/esm/stories/Page.js +0 -38
- package/dist/esm/stories/Page.js.map +0 -1
- package/dist/esm/utils/datesArray.test.d.ts +0 -4
- package/dist/esm/utils/datesArray.test.js +0 -19
- package/dist/esm/utils/datesArray.test.js.map +0 -1
- package/dist/esm/utils/jsToSqlDate.test.d.ts +0 -4
- package/dist/esm/utils/jsToSqlDate.test.js +0 -11
- package/dist/esm/utils/jsToSqlDate.test.js.map +0 -1
- package/dist/esm/utils/monthYearString.test.d.ts +0 -4
- package/dist/esm/utils/monthYearString.test.js +0 -11
- package/dist/esm/utils/monthYearString.test.js.map +0 -1
- package/dist/esm/utils/numberOfDaysInAMonth.test.d.ts +0 -4
- package/dist/esm/utils/numberOfDaysInAMonth.test.js +0 -16
- package/dist/esm/utils/numberOfDaysInAMonth.test.js.map +0 -1
- package/dist/esm/utils/sqlToJsDate.test.d.ts +0 -4
- package/dist/esm/utils/sqlToJsDate.test.js +0 -11
- package/dist/esm/utils/sqlToJsDate.test.js.map +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { languageType } from "../../languages/types";
|
|
2
|
+
|
|
3
|
+
export interface MulticalendarPropsType {
|
|
4
|
+
multicalendarId: string;
|
|
5
|
+
ReactCellChildren: ReactCellChildrenType;
|
|
6
|
+
ReactListElementChildren: ReactListElementChildrenType;
|
|
7
|
+
listElementsIdsArray: string[] | number[];
|
|
8
|
+
language: languageType,
|
|
9
|
+
cellsWidth?: number;
|
|
10
|
+
cellsHeight?: number;
|
|
11
|
+
verticalAxisWidth?: number;
|
|
12
|
+
horizontalAxisHeight?: number;
|
|
13
|
+
horizontalInitialCellQuantity?: number;
|
|
14
|
+
chunkRenderX?: number;
|
|
15
|
+
chunkRenderY?: number;
|
|
16
|
+
draggingOverDateCells?: boolean,
|
|
17
|
+
dynamicPagination?: boolean;
|
|
18
|
+
logoUrl?: string;
|
|
19
|
+
waitTimeForCalls?: number;
|
|
20
|
+
callsOnScrollingStops?: Function;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface RenderCoordinatesType {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type ReactCellChildrenType = React.ElementType<CellChildrenPropsType>;
|
|
29
|
+
|
|
30
|
+
export type ReactListElementChildrenType =
|
|
31
|
+
React.ElementType<ListElementChildrenPropsType>;
|
|
32
|
+
|
|
33
|
+
export interface CellChildrenPropsType {
|
|
34
|
+
date: string;
|
|
35
|
+
/**Date in SQL format, i.e. 1993-03-29 */
|
|
36
|
+
listElementId: string | number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ListElementChildrenPropsType {
|
|
40
|
+
listElementId: string | number;
|
|
41
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
body {
|
|
2
|
+
margin: 0;
|
|
3
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
|
|
4
|
+
"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
5
|
+
-webkit-font-smoothing: antialiased;
|
|
6
|
+
-moz-osx-font-smoothing: grayscale;
|
|
7
|
+
color: black;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body p {
|
|
11
|
+
line-height: normal;
|
|
12
|
+
margin: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
code {
|
|
16
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:root {
|
|
20
|
+
--primary-color: #ec6321;
|
|
21
|
+
--secondary-color: #46ba0d;
|
|
22
|
+
--green-palette-one: #7bce51;
|
|
23
|
+
--green-palette-two: #52ac25;
|
|
24
|
+
--green-palette-three: #3a8117;
|
|
25
|
+
--green-palette-four: #27580f;
|
|
26
|
+
--green-palette-five: #1b3a0c;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
input[type="checkbox"] {
|
|
30
|
+
/* Add if not using autoprefixer */
|
|
31
|
+
-webkit-appearance: none;
|
|
32
|
+
/* Remove most all native input styles */
|
|
33
|
+
appearance: none;
|
|
34
|
+
/* For iOS < 15 */
|
|
35
|
+
background-color: white;
|
|
36
|
+
/* Not removed via appearance */
|
|
37
|
+
margin: 0;
|
|
38
|
+
|
|
39
|
+
font: inherit;
|
|
40
|
+
color: dimgray;
|
|
41
|
+
min-width: 1.15em;
|
|
42
|
+
width: 1.15em;
|
|
43
|
+
height: 1.15em;
|
|
44
|
+
border: 0.15em solid dimgray;
|
|
45
|
+
border-radius: 0.15em;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
input[type="checkbox"]::before {
|
|
53
|
+
content: "";
|
|
54
|
+
width: 0.65em;
|
|
55
|
+
height: 0.65em;
|
|
56
|
+
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
|
|
57
|
+
transform: scale(0);
|
|
58
|
+
transform-origin: bottom left;
|
|
59
|
+
transition: 120ms transform ease-in-out;
|
|
60
|
+
box-shadow: inset 1em 1em var(--primary-color);
|
|
61
|
+
/* Windows High Contrast Mode */
|
|
62
|
+
background-color: CanvasText;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
input[type="checkbox"]:checked::before {
|
|
66
|
+
transform: scale(1);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
input[type="checkbox"]:focus {
|
|
70
|
+
outline: max(2px, 0.08em) solid rgb(145, 145, 145);
|
|
71
|
+
outline-offset: max(2px, 0.08em);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
input[type="checkbox"]:disabled {
|
|
75
|
+
color: rgb(165, 165, 165);
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
export type languageType = {[key: string]: string} & {
|
|
2
|
+
"of": string
|
|
3
|
+
"Automatized": string,
|
|
4
|
+
"properties": string,
|
|
5
|
+
"stablishment": string,
|
|
6
|
+
"stablishments": string,
|
|
7
|
+
"Loading": string,
|
|
8
|
+
"Today": string,
|
|
9
|
+
"Filters": string,
|
|
10
|
+
"Search": string,
|
|
11
|
+
"Property Manager": string,
|
|
12
|
+
"Zones": string,
|
|
13
|
+
"Properties": string,
|
|
14
|
+
"Categories": string,
|
|
15
|
+
"Clear filters": string,
|
|
16
|
+
"monday": string,
|
|
17
|
+
"tuesday": string,
|
|
18
|
+
"wednesday": string,
|
|
19
|
+
"thursday": string,
|
|
20
|
+
"friday": string,
|
|
21
|
+
"saturday": string,
|
|
22
|
+
"sunday": string,
|
|
23
|
+
"january": string,
|
|
24
|
+
"february": string,
|
|
25
|
+
"march": string,
|
|
26
|
+
"april": string,
|
|
27
|
+
"may": string,
|
|
28
|
+
"june": string,
|
|
29
|
+
"july": string,
|
|
30
|
+
"august": string,
|
|
31
|
+
"september": string,
|
|
32
|
+
"october": string,
|
|
33
|
+
"november": string,
|
|
34
|
+
"december": string,
|
|
35
|
+
"days": string,
|
|
36
|
+
"Reload": string,
|
|
37
|
+
"Reload properties": string,
|
|
38
|
+
"Reload prices": string,
|
|
39
|
+
"Competitors": string,
|
|
40
|
+
"Quick view": string,
|
|
41
|
+
"View KPIs": string,
|
|
42
|
+
"Recommended price": string,
|
|
43
|
+
"Minimal price": string,
|
|
44
|
+
"Base price": string,
|
|
45
|
+
"PMS price": string,
|
|
46
|
+
"Change by quantity": string,
|
|
47
|
+
"Change by percentage": string,
|
|
48
|
+
"Competitors price": string,
|
|
49
|
+
"Minimal stay": string,
|
|
50
|
+
"Availability": string,
|
|
51
|
+
"Auto adjustment": string,
|
|
52
|
+
"Ajust leftout days": string,
|
|
53
|
+
"Send prices to OTAs": string,
|
|
54
|
+
"Update competitors prices": string,
|
|
55
|
+
"Go back to original values": string,
|
|
56
|
+
"Updating competitors prices": string,
|
|
57
|
+
"Select price type": string,
|
|
58
|
+
"Base": string,
|
|
59
|
+
"Recommended": string,
|
|
60
|
+
"Minimal": string,
|
|
61
|
+
"It is the ideal price of the market": string,
|
|
62
|
+
"It is the price desired by the property manager": string,
|
|
63
|
+
"It is the highest value between recommended and base price": string,
|
|
64
|
+
"Go back": string,
|
|
65
|
+
"Apply": string,
|
|
66
|
+
"Send": string,
|
|
67
|
+
"Cancel": string,
|
|
68
|
+
"Schedule": string,
|
|
69
|
+
"Menu": string,
|
|
70
|
+
"Multidashboard": string,
|
|
71
|
+
"Settings": string,
|
|
72
|
+
"General report": string,
|
|
73
|
+
"Property resume": string,
|
|
74
|
+
"Price settings": string,
|
|
75
|
+
"Update competitors prices up to 1 year": string,
|
|
76
|
+
"Performance manager": string,
|
|
77
|
+
"Pickup": string,
|
|
78
|
+
"Forecast": string,
|
|
79
|
+
"Rate shopper": string,
|
|
80
|
+
"Aspirational compset": string,
|
|
81
|
+
"Individual dashboard": string,
|
|
82
|
+
"Individual report": string,
|
|
83
|
+
"Schedule automatic prices sends": string,
|
|
84
|
+
"Send new prices now": string,
|
|
85
|
+
"Select date range": string,
|
|
86
|
+
"Custom range": string,
|
|
87
|
+
"Generate prices Excel file": string,
|
|
88
|
+
"Select channels, Mark Up and currency": string,
|
|
89
|
+
"Channel": string,
|
|
90
|
+
"Mark Up": string,
|
|
91
|
+
"MLOS": string,
|
|
92
|
+
"Currency": string,
|
|
93
|
+
"Add channel": string,
|
|
94
|
+
"Export to Excel": string,
|
|
95
|
+
"Save settings": string,
|
|
96
|
+
"Controls": string,
|
|
97
|
+
"General data": string,
|
|
98
|
+
"Work days": string,
|
|
99
|
+
"Weekends and holydays": string,
|
|
100
|
+
"Fixed expenses": string,
|
|
101
|
+
"Varaible expenses": string,
|
|
102
|
+
"Local currency": string,
|
|
103
|
+
"Symbol": string,
|
|
104
|
+
"Cleaning fee": string,
|
|
105
|
+
"Weekdays discounts": string,
|
|
106
|
+
"Seasons discounts": string,
|
|
107
|
+
"High": string,
|
|
108
|
+
"Medium high": string,
|
|
109
|
+
"Medium": string,
|
|
110
|
+
"Medium low": string,
|
|
111
|
+
"Low": string,
|
|
112
|
+
"Left out days": string,
|
|
113
|
+
"Release": string,
|
|
114
|
+
"Increase": string,
|
|
115
|
+
"Occupation rules": string,
|
|
116
|
+
"Apply rules": string,
|
|
117
|
+
"Max OCC": string,
|
|
118
|
+
"Max ADR": string,
|
|
119
|
+
"Final autoprice": string,
|
|
120
|
+
"Release (N days)": string,
|
|
121
|
+
"% Occupation": string,
|
|
122
|
+
"% Discount": string,
|
|
123
|
+
"Maximum": string,
|
|
124
|
+
"Pax. Mapped": string,
|
|
125
|
+
"Minimal occ.": string,
|
|
126
|
+
"Maxmimum occ.": string,
|
|
127
|
+
"Type of adjustment": string,
|
|
128
|
+
"Personalized": string,
|
|
129
|
+
"Price per guest": string,
|
|
130
|
+
"Occupation": string,
|
|
131
|
+
"Pax occupation": string,
|
|
132
|
+
"Price": string,
|
|
133
|
+
"Guests": string,
|
|
134
|
+
"Regular price rised by:": string,
|
|
135
|
+
"Regular price decreased by:": string,
|
|
136
|
+
"PAX price": string,
|
|
137
|
+
"Go back to Multiprice": string,
|
|
138
|
+
"Seasons": string,
|
|
139
|
+
"1º Fortnight": string;
|
|
140
|
+
"2º Fortnight": string;
|
|
141
|
+
"Workdays": string;
|
|
142
|
+
"Weekend": string;
|
|
143
|
+
"Go back to initial price settings": string;
|
|
144
|
+
"Settings saved succesfully": string;
|
|
145
|
+
"Seasons and minimal stays saved succesfully": string;
|
|
146
|
+
"An error has ocurred, try again later": string;
|
|
147
|
+
"All task have been succesfully achived. We are waiting to recieve data from the OTA. This task can take up to 15min.": string,
|
|
148
|
+
"It was no possible to send the task to update the competitors prices": string;
|
|
149
|
+
"Server is under mantanance, please wait until the service is brought back to you": string;
|
|
150
|
+
"There has been an error, please try again": string;
|
|
151
|
+
"prices will be sent periodically": string;
|
|
152
|
+
"Selected dates": string;
|
|
153
|
+
"Days range": string;
|
|
154
|
+
"Revenue": string;
|
|
155
|
+
"ADR": string;
|
|
156
|
+
"Appliable days of the week": string;
|
|
157
|
+
"Manual edition": string;
|
|
158
|
+
"Period": string;
|
|
159
|
+
"Protect prices": string;
|
|
160
|
+
"Protect MLOS": string;
|
|
161
|
+
"Unprotect prices": string;
|
|
162
|
+
"Unprotect MLOS": string;
|
|
163
|
+
"Import prices from PMS": string;
|
|
164
|
+
"Settings type": string;
|
|
165
|
+
"Customized": string;
|
|
166
|
+
"Prices have been successfully sent": string;
|
|
167
|
+
"There has been an error while trying to send the selected prices, please try again later": string;
|
|
168
|
+
"Copy settings to other properties": string;
|
|
169
|
+
"Select the properties to which the settings will be copied": string;
|
|
170
|
+
"NOTE: All the settings on the selected properties will be overwriten, previous settings in each of the will be lost": string;
|
|
171
|
+
"Request import": string;
|
|
172
|
+
"Atention!": string;
|
|
173
|
+
"You are trying to lower a price below the minimal price, this can't be done, the price will stay at the minimum": string;
|
|
174
|
+
"Don't show this again": string;
|
|
175
|
+
"Import successfully requested, this task can take up to 10 minutes": string;
|
|
176
|
+
"Import requested have failed, please try again later": string;
|
|
177
|
+
"Some custom changes are not protected": string;
|
|
178
|
+
"There are unprotected custom changes that will be sent. Remember to protect any change in base price or minimal stay, otherwise the changes will be lost on further calculus": string;
|
|
179
|
+
"Protect changes and send": string;
|
|
180
|
+
"Send changes without protecting": string;
|
|
181
|
+
"Please define base price values before saving": string;
|
|
182
|
+
"Please define pax mapped before saving": string;
|
|
183
|
+
"Do you want to save your changes?": string;
|
|
184
|
+
"A request will be sent to save your settings": string;
|
|
185
|
+
"Minimal price by season": string;
|
|
186
|
+
"Minimum price according to costs": string;
|
|
187
|
+
"Break even": string;
|
|
188
|
+
"The minimal price of a season can't be lower than the minimal price according to costs": string;
|
|
189
|
+
"Season": string;
|
|
190
|
+
"Event": string;
|
|
191
|
+
"Holiday": string;
|
|
192
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="react-scripts" />
|
package/package.json
CHANGED
|
@@ -1,88 +1,93 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "josenanodev-react-components-library",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"author": "Jose Carlos Cardenas Martinez",
|
|
5
|
-
"description": "Libreria de componentes React personales",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"main": "dist/cjs/index.js",
|
|
8
|
-
"module": "dist/esm/index.js",
|
|
9
|
-
"files": [
|
|
10
|
-
"dist",
|
|
11
|
-
"README.md"
|
|
12
|
-
],
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "https://github.com/Josenanodev/josenanodev-react-components-library"
|
|
16
|
-
},
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
"@babel/core": "^7.20.12",
|
|
19
|
-
"@babel/preset-typescript": "^7.17.12",
|
|
20
|
-
"@storybook/addon-actions": "^6.5.15",
|
|
21
|
-
"@storybook/addon-essentials": "^6.5.15",
|
|
22
|
-
"@storybook/addon-interactions": "^6.5.15",
|
|
23
|
-
"@storybook/addon-links": "^6.5.15",
|
|
24
|
-
"@storybook/builder-webpack5": "^6.5.15",
|
|
25
|
-
"@storybook/manager-webpack5": "^6.5.15",
|
|
26
|
-
"@storybook/react": "^6.5.15",
|
|
27
|
-
"@storybook/testing-library": "^0.0.13",
|
|
28
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
29
|
-
"@testing-library/react": "^13.4.0",
|
|
30
|
-
"@testing-library/user-event": "^13.5.0",
|
|
31
|
-
"@types/jest": "^28.1.2",
|
|
32
|
-
"@types/lodash": "^4.14.182",
|
|
33
|
-
"@types/node": "^18.11.18",
|
|
34
|
-
"@types/react": "^18.0.26",
|
|
35
|
-
"@types/react-dom": "^18.0.10",
|
|
36
|
-
"@types/react-test-renderer": "^18.0.0",
|
|
37
|
-
"babel-cli": "^6.26.0",
|
|
38
|
-
"babel-loader": "^8.3.0",
|
|
39
|
-
"
|
|
40
|
-
"react
|
|
41
|
-
"react-
|
|
42
|
-
"react-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"react
|
|
48
|
-
"react-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
"build:
|
|
54
|
-
"build:
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
]
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "josenanodev-react-components-library",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"author": "Jose Carlos Cardenas Martinez",
|
|
5
|
+
"description": "Libreria de componentes React personales",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/cjs/index.js",
|
|
8
|
+
"module": "dist/esm/index.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/Josenanodev/josenanodev-react-components-library"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@babel/core": "^7.20.12",
|
|
19
|
+
"@babel/preset-typescript": "^7.17.12",
|
|
20
|
+
"@storybook/addon-actions": "^6.5.15",
|
|
21
|
+
"@storybook/addon-essentials": "^6.5.15",
|
|
22
|
+
"@storybook/addon-interactions": "^6.5.15",
|
|
23
|
+
"@storybook/addon-links": "^6.5.15",
|
|
24
|
+
"@storybook/builder-webpack5": "^6.5.15",
|
|
25
|
+
"@storybook/manager-webpack5": "^6.5.15",
|
|
26
|
+
"@storybook/react": "^6.5.15",
|
|
27
|
+
"@storybook/testing-library": "^0.0.13",
|
|
28
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
29
|
+
"@testing-library/react": "^13.4.0",
|
|
30
|
+
"@testing-library/user-event": "^13.5.0",
|
|
31
|
+
"@types/jest": "^28.1.2",
|
|
32
|
+
"@types/lodash": "^4.14.182",
|
|
33
|
+
"@types/node": "^18.11.18",
|
|
34
|
+
"@types/react": "^18.0.26",
|
|
35
|
+
"@types/react-dom": "^18.0.10",
|
|
36
|
+
"@types/react-test-renderer": "^18.0.0",
|
|
37
|
+
"babel-cli": "^6.26.0",
|
|
38
|
+
"babel-loader": "^8.3.0",
|
|
39
|
+
"copyfiles": "^2.4.1",
|
|
40
|
+
"react": "^18.2.0",
|
|
41
|
+
"react-dom": "^18.2.0",
|
|
42
|
+
"react-icons": "^4.7.1",
|
|
43
|
+
"react-scripts": "5.0.1",
|
|
44
|
+
"typescript": "^4.9.4"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"react": "^18.2.0",
|
|
48
|
+
"react-dom": "^18.2.0",
|
|
49
|
+
"react-icons": "^4.7.1"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"start": "set PORT=80 && react-scripts start",
|
|
53
|
+
"build": "rm -rf /dist && npm run build:esm && npm run build:cjs && npm run copy-dts:cjs && npm run copy-dts:esm && npm run copy-css:cjs && npm run copy-css:esm ",
|
|
54
|
+
"build:esm": "tsc",
|
|
55
|
+
"build:cjs": "tsc --module CommonJS --outDir dist/cjs",
|
|
56
|
+
"copy-dts:cjs": "copyfiles -u 1 \"src/**/*.d.ts\" dist/cjs",
|
|
57
|
+
"copy-dts:esm": "copyfiles -u 1 \"src/**/*.d.ts\" dist/esm",
|
|
58
|
+
"copy-css:cjs": "copyfiles -u 1 \"src/**/*.css\" dist/cjs",
|
|
59
|
+
"copy-css:esm": "copyfiles -u 1 \"src/**/*.css\" dist/esm",
|
|
60
|
+
"test": "jest --coverage",
|
|
61
|
+
"tsc": "tsc",
|
|
62
|
+
"storybook": "start-storybook -p 6006",
|
|
63
|
+
"build-storybook": "build-storybook"
|
|
64
|
+
},
|
|
65
|
+
"eslintConfig": {
|
|
66
|
+
"extends": [
|
|
67
|
+
"react-app",
|
|
68
|
+
"react-app/jest"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"browserslist": {
|
|
72
|
+
"production": [
|
|
73
|
+
">0.2%",
|
|
74
|
+
"not dead",
|
|
75
|
+
"not op_mini all"
|
|
76
|
+
],
|
|
77
|
+
"development": [
|
|
78
|
+
"last 1 chrome version",
|
|
79
|
+
"last 1 firefox version",
|
|
80
|
+
"last 1 safari version"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"jest": {
|
|
84
|
+
"verbose": true,
|
|
85
|
+
"setupFilesAfterEnv": [
|
|
86
|
+
"<rootDir>/src/setupTests.ts"
|
|
87
|
+
],
|
|
88
|
+
"moduleNameMapper": {
|
|
89
|
+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
|
|
90
|
+
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './button.css';
|
|
3
|
-
interface ButtonProps {
|
|
4
|
-
/**
|
|
5
|
-
* Is this the principal call to action on the page?
|
|
6
|
-
*/
|
|
7
|
-
primary?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* What background color to use
|
|
10
|
-
*/
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
-
/**
|
|
13
|
-
* How large should the button be?
|
|
14
|
-
*/
|
|
15
|
-
size?: 'small' | 'medium' | 'large';
|
|
16
|
-
/**
|
|
17
|
-
* Button contents
|
|
18
|
-
*/
|
|
19
|
-
label: string;
|
|
20
|
-
/**
|
|
21
|
-
* Optional click handler
|
|
22
|
-
*/
|
|
23
|
-
onClick?: () => void;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Primary UI component for user interaction
|
|
27
|
-
*/
|
|
28
|
-
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => JSX.Element;
|
|
29
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Button = void 0;
|
|
18
|
-
const react_1 = __importDefault(require("react"));
|
|
19
|
-
require("./button.css");
|
|
20
|
-
/**
|
|
21
|
-
* Primary UI component for user interaction
|
|
22
|
-
*/
|
|
23
|
-
const Button = (_a) => {
|
|
24
|
-
var { primary = false, size = 'medium', backgroundColor, label } = _a, props = __rest(_a, ["primary", "size", "backgroundColor", "label"]);
|
|
25
|
-
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
|
|
26
|
-
return (react_1.default.createElement("button", Object.assign({ type: "button", className: ['storybook-button', `storybook-button--${size}`, mode].join(' '), style: { backgroundColor } }, props), label));
|
|
27
|
-
};
|
|
28
|
-
exports.Button = Button;
|
|
29
|
-
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/stories/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,wBAAsB;AAyBtB;;GAEG;AACI,MAAM,MAAM,GAAG,CAAC,EAMT,EAAE,EAAE;QANK,EACrB,OAAO,GAAG,KAAK,EACf,IAAI,GAAG,QAAQ,EACf,eAAe,EACf,KAAK,OAEO,EADT,KAAK,cALa,+CAMtB,CADS;IAER,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,6BAA6B,CAAC;IACnF,OAAO,CACL,wDACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC5E,KAAK,EAAE,EAAE,eAAe,EAAE,IACtB,KAAK,GAER,KAAK,CACC,CACV,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,MAAM,UAkBjB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './header.css';
|
|
3
|
-
type User = {
|
|
4
|
-
name: string;
|
|
5
|
-
};
|
|
6
|
-
interface HeaderProps {
|
|
7
|
-
user?: User;
|
|
8
|
-
onLogin: () => void;
|
|
9
|
-
onLogout: () => void;
|
|
10
|
-
onCreateAccount: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Header = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const Button_1 = require("./Button");
|
|
9
|
-
require("./header.css");
|
|
10
|
-
const Header = ({ user, onLogin, onLogout, onCreateAccount }) => (react_1.default.createElement("header", null,
|
|
11
|
-
react_1.default.createElement("div", { className: "wrapper" },
|
|
12
|
-
react_1.default.createElement("div", null,
|
|
13
|
-
react_1.default.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg" },
|
|
14
|
-
react_1.default.createElement("g", { fill: "none", fillRule: "evenodd" },
|
|
15
|
-
react_1.default.createElement("path", { d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z", fill: "#FFF" }),
|
|
16
|
-
react_1.default.createElement("path", { d: "M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z", fill: "#555AB9" }),
|
|
17
|
-
react_1.default.createElement("path", { d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z", fill: "#91BAF8" }))),
|
|
18
|
-
react_1.default.createElement("h1", null, "Acme")),
|
|
19
|
-
react_1.default.createElement("div", null, user ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
20
|
-
react_1.default.createElement("span", { className: "welcome" },
|
|
21
|
-
"Welcome, ",
|
|
22
|
-
react_1.default.createElement("b", null, user.name),
|
|
23
|
-
"!"),
|
|
24
|
-
react_1.default.createElement(Button_1.Button, { size: "small", onClick: onLogout, label: "Log out" }))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
25
|
-
react_1.default.createElement(Button_1.Button, { size: "small", onClick: onLogin, label: "Log in" }),
|
|
26
|
-
react_1.default.createElement(Button_1.Button, { primary: true, size: "small", onClick: onCreateAccount, label: "Sign up" })))))));
|
|
27
|
-
exports.Header = Header;
|
|
28
|
-
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/stories/Header.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,qCAAkC;AAClC,wBAAsB;AAaf,MAAM,MAAM,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAe,EAAE,EAAE,CAAC,CACnF;IACE,uCAAK,SAAS,EAAC,SAAS;QACtB;YACE,uCAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B;gBAChF,qCAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;oBAC/B,wCACE,CAAC,EAAC,mFAAmF,EACrF,IAAI,EAAC,MAAM,GACX;oBACF,wCACE,CAAC,EAAC,kEAAkE,EACpE,IAAI,EAAC,SAAS,GACd;oBACF,wCACE,CAAC,EAAC,gEAAgE,EAClE,IAAI,EAAC,SAAS,GACd,CACA,CACA;YACN,iDAAa,CACT;QACN,2CACG,IAAI,CAAC,CAAC,CAAC,CACN;YACE,wCAAM,SAAS,EAAC,SAAS;;gBACd,yCAAI,IAAI,CAAC,IAAI,CAAK;oBACtB;YACP,8BAAC,eAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAC,SAAS,GAAG,CACzD,CACJ,CAAC,CAAC,CAAC,CACF;YACE,8BAAC,eAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAC,QAAQ,GAAG;YACxD,8BAAC,eAAM,IAAC,OAAO,QAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAC,SAAS,GAAG,CACxE,CACJ,CACG,CACF,CACC,CACV,CAAC;AAvCW,QAAA,MAAM,UAuCjB"}
|