pixelize-design-library 2.1.5 → 2.1.7
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/Components/ContactForm/ContactForm.d.ts +4 -0
- package/dist/Components/ContactForm/ContactForm.js +215 -0
- package/dist/Components/ContactForm/ContactFormProps.d.ts +9 -0
- package/dist/Components/ContactForm/ContactFormProps.js +2 -0
- package/dist/Components/ProductCard/ProductCard.d.ts +2 -1
- package/dist/Components/ProductCard/ProductCard.js +1 -2
- package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -1
- package/dist/Components/SearchSelect/SearchSelect.js +5 -12
- package/dist/Components/SearchSelect/SearchSelectProps.d.ts +1 -4
- package/dist/Components/Select/Select.d.ts +1 -1
- package/dist/Components/Select/Select.js +2 -2
- package/dist/Components/Select/SelectProps.d.ts +1 -0
- package/dist/Components/Toaster/Toaster.js +36 -10
- package/dist/Layout.js +5 -1
- package/dist/Pages/contactForm.d.ts +3 -0
- package/dist/Pages/contactForm.js +16 -0
- package/dist/Pages/productCaard.js +2 -2
- package/dist/Pages/searchSelect.js +4 -3
- package/dist/Pages/toster.js +42 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -2
- package/package.json +1 -1
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
|
+
function step(op) {
|
|
50
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
52
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
53
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
|
+
switch (op[0]) {
|
|
55
|
+
case 0: case 1: t = op; break;
|
|
56
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
57
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
58
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59
|
+
default:
|
|
60
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
62
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
63
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
64
|
+
if (t[2]) _.ops.pop();
|
|
65
|
+
_.trys.pop(); continue;
|
|
66
|
+
}
|
|
67
|
+
op = body.call(thisArg, _);
|
|
68
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
69
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
73
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
74
|
+
};
|
|
75
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
|
+
var react_1 = __importStar(require("react"));
|
|
77
|
+
var react_2 = require("@chakra-ui/react");
|
|
78
|
+
var TextInput_1 = __importDefault(require("../Input/TextInput"));
|
|
79
|
+
var lucide_react_1 = require("lucide-react");
|
|
80
|
+
var useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
81
|
+
var ContactForm = function (_a) {
|
|
82
|
+
var _b;
|
|
83
|
+
var apiKey = _a.apiKey, customFields = _a.customFields, getCustomValues = _a.getCustomValues, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, organizationId = _a.organizationId, customerId = _a.customerId;
|
|
84
|
+
var colors = (0, useCustomTheme_1.useCustomTheme)().colors;
|
|
85
|
+
var _d = (0, react_1.useState)({
|
|
86
|
+
firstName: "",
|
|
87
|
+
lastName: "",
|
|
88
|
+
email: "",
|
|
89
|
+
phone: "",
|
|
90
|
+
enquiry: "",
|
|
91
|
+
}), formData = _d[0], setFormData = _d[1];
|
|
92
|
+
var _e = (0, react_1.useState)({
|
|
93
|
+
title: "",
|
|
94
|
+
isSuccess: false,
|
|
95
|
+
}), response = _e[0], setResponse = _e[1];
|
|
96
|
+
var _f = (0, react_1.useState)({}), errors = _f[0], setErrors = _f[1];
|
|
97
|
+
var handleChange = function (field, value) {
|
|
98
|
+
setFormData(function (prev) {
|
|
99
|
+
var _a;
|
|
100
|
+
return (__assign(__assign({}, prev), (_a = {}, _a[field] = value, _a)));
|
|
101
|
+
});
|
|
102
|
+
setErrors(function (prev) {
|
|
103
|
+
var _a;
|
|
104
|
+
return (__assign(__assign({}, prev), (_a = {}, _a[field] = "", _a)));
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
var validate = function () {
|
|
108
|
+
var newErrors = {};
|
|
109
|
+
if (!formData.firstName.trim())
|
|
110
|
+
newErrors.firstName = "First name is required";
|
|
111
|
+
// if (!formData.email.trim()) {
|
|
112
|
+
// newErrors.email = "Email is required";
|
|
113
|
+
// } else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(formData.email)) {
|
|
114
|
+
// newErrors.email = "Invalid email format";
|
|
115
|
+
// }
|
|
116
|
+
if (!formData.phone.trim()) {
|
|
117
|
+
newErrors.phone = "Phone is required";
|
|
118
|
+
}
|
|
119
|
+
else if (!/^\d{7,15}$/.test(formData.phone)) {
|
|
120
|
+
newErrors.phone = "Phone must be 7–15 digits";
|
|
121
|
+
}
|
|
122
|
+
setErrors(newErrors);
|
|
123
|
+
return Object.keys(newErrors).length === 0;
|
|
124
|
+
};
|
|
125
|
+
var handleSubmit = function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
|
126
|
+
var customValues, payload, response_1, result, error_1;
|
|
127
|
+
var _a;
|
|
128
|
+
return __generator(this, function (_b) {
|
|
129
|
+
switch (_b.label) {
|
|
130
|
+
case 0:
|
|
131
|
+
e.preventDefault();
|
|
132
|
+
if (isDisabled)
|
|
133
|
+
return [2 /*return*/];
|
|
134
|
+
if (!validate())
|
|
135
|
+
return [2 /*return*/];
|
|
136
|
+
if (!apiKey) {
|
|
137
|
+
setResponse({
|
|
138
|
+
title: "API key missing",
|
|
139
|
+
isSuccess: false,
|
|
140
|
+
});
|
|
141
|
+
return [2 /*return*/];
|
|
142
|
+
}
|
|
143
|
+
customValues = (_a = getCustomValues === null || getCustomValues === void 0 ? void 0 : getCustomValues()) !== null && _a !== void 0 ? _a : {};
|
|
144
|
+
payload = __assign(__assign({ name: (formData === null || formData === void 0 ? void 0 : formData.firstName) + " " + (formData === null || formData === void 0 ? void 0 : formData.lastName), firstName: formData === null || formData === void 0 ? void 0 : formData.firstName, lastName: formData === null || formData === void 0 ? void 0 : formData.lastName, email: formData.email, phone: formData.phone, message: formData.enquiry }, customValues), { customerId: customerId, organizationId: organizationId });
|
|
145
|
+
_b.label = 1;
|
|
146
|
+
case 1:
|
|
147
|
+
_b.trys.push([1, 4, , 5]);
|
|
148
|
+
return [4 /*yield*/, fetch(apiKey, {
|
|
149
|
+
method: "POST",
|
|
150
|
+
headers: {
|
|
151
|
+
"Content-Type": "application/json",
|
|
152
|
+
},
|
|
153
|
+
body: JSON.stringify(payload),
|
|
154
|
+
})];
|
|
155
|
+
case 2:
|
|
156
|
+
response_1 = _b.sent();
|
|
157
|
+
return [4 /*yield*/, response_1.json()];
|
|
158
|
+
case 3:
|
|
159
|
+
result = _b.sent();
|
|
160
|
+
if (!response_1.ok)
|
|
161
|
+
throw new Error(result.message || "Submission failed");
|
|
162
|
+
// onSubmit(formData);
|
|
163
|
+
setFormData({
|
|
164
|
+
firstName: "",
|
|
165
|
+
lastName: "",
|
|
166
|
+
email: "",
|
|
167
|
+
phone: "",
|
|
168
|
+
enquiry: "",
|
|
169
|
+
});
|
|
170
|
+
setResponse({
|
|
171
|
+
title: "Message Sent Successfully",
|
|
172
|
+
isSuccess: true,
|
|
173
|
+
});
|
|
174
|
+
return [3 /*break*/, 5];
|
|
175
|
+
case 4:
|
|
176
|
+
error_1 = _b.sent();
|
|
177
|
+
setResponse({
|
|
178
|
+
title: "Failed to send message",
|
|
179
|
+
isSuccess: false,
|
|
180
|
+
});
|
|
181
|
+
return [3 /*break*/, 5];
|
|
182
|
+
case 5: return [2 /*return*/];
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
}); };
|
|
186
|
+
return (react_1.default.createElement(react_2.Box, { maxW: "lg", mx: "auto", p: 8, borderRadius: "2xl", boxShadow: "lg", bg: (_b = colors === null || colors === void 0 ? void 0 : colors.background) === null || _b === void 0 ? void 0 : _b[300] },
|
|
187
|
+
response.title ? (react_1.default.createElement(react_2.Alert, { status: (response === null || response === void 0 ? void 0 : response.isSuccess) ? "success" : "error", fontWeight: "bold", variant: "solid", mb: 1 },
|
|
188
|
+
(response === null || response === void 0 ? void 0 : response.isSuccess) ? react_1.default.createElement(lucide_react_1.CircleCheck, null) : react_1.default.createElement(lucide_react_1.CircleX, null),
|
|
189
|
+
" \u00A0",
|
|
190
|
+
" ",
|
|
191
|
+
response.title)) : null,
|
|
192
|
+
react_1.default.createElement(react_2.Heading, { textAlign: "center", size: "lg", mb: 2 }, "Contact Us"),
|
|
193
|
+
react_1.default.createElement(react_2.Text, { textAlign: "center", mb: 6, color: "gray.500" }, "Fill in the form below to reach out to us."),
|
|
194
|
+
react_1.default.createElement(react_2.Box, { as: "form", onSubmit: handleSubmit },
|
|
195
|
+
react_1.default.createElement(react_2.VStack, { spacing: 4 },
|
|
196
|
+
react_1.default.createElement(react_2.SimpleGrid, { columns: { base: 1, md: 2 }, spacing: 4, w: "100%" },
|
|
197
|
+
react_1.default.createElement(react_2.FormControl, { isInvalid: !!errors.firstName, isRequired: true },
|
|
198
|
+
react_1.default.createElement(TextInput_1.default, { label: "First Name", placeholder: "Enter first name", value: formData.firstName, onChange: function (e) { return handleChange("firstName", e.target.value); }, isRequired: true }),
|
|
199
|
+
react_1.default.createElement(react_2.FormErrorMessage, null, errors.firstName)),
|
|
200
|
+
react_1.default.createElement(react_2.FormControl, null,
|
|
201
|
+
react_1.default.createElement(TextInput_1.default, { label: "Last Name", placeholder: "Enter last name", value: formData.lastName, onChange: function (e) { return handleChange("lastName", e.target.value); } }))),
|
|
202
|
+
react_1.default.createElement(react_2.SimpleGrid, { columns: { base: 1, md: 2 }, spacing: 4, w: "100%" },
|
|
203
|
+
react_1.default.createElement(react_2.FormControl, { isInvalid: !!errors.phone, isRequired: true },
|
|
204
|
+
react_1.default.createElement(TextInput_1.default, { label: "Phone", placeholder: "Enter phone number", value: formData.phone, onChange: function (e) { return handleChange("phone", e.target.value); }, isRequired: true }),
|
|
205
|
+
react_1.default.createElement(react_2.FormErrorMessage, null, errors.phone)),
|
|
206
|
+
react_1.default.createElement(react_2.FormControl, { isInvalid: !!errors.email },
|
|
207
|
+
react_1.default.createElement(TextInput_1.default, { label: "Email", placeholder: "Enter email", value: formData.email, onChange: function (e) { return handleChange("email", e.target.value); } }),
|
|
208
|
+
react_1.default.createElement(react_2.FormErrorMessage, null, errors.email))),
|
|
209
|
+
customFields,
|
|
210
|
+
react_1.default.createElement(react_2.FormControl, { w: "100%" },
|
|
211
|
+
react_1.default.createElement(react_2.Text, { fontSize: "sm", mb: 1 }, "Enquiry"),
|
|
212
|
+
react_1.default.createElement(react_2.Textarea, { placeholder: "Enter your enquiry", rows: 5, value: formData.enquiry, onChange: function (e) { return handleChange("enquiry", e.target.value); } })),
|
|
213
|
+
react_1.default.createElement(react_2.Button, { type: "submit", disabled: isDisabled, colorScheme: "blue", w: "full", mt: 2 }, "Send Message")))));
|
|
214
|
+
};
|
|
215
|
+
exports.default = ContactForm;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ProductCardProps } from './ProductCardProps';
|
|
3
|
-
|
|
3
|
+
declare const ProductCard: ({ label, productImage, rating, reviews, tags, options, onAddToCart, bag, description, }: ProductCardProps) => React.JSX.Element;
|
|
4
|
+
export default ProductCard;
|
|
@@ -26,7 +26,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ProductCard = void 0;
|
|
30
29
|
var react_1 = __importStar(require("react"));
|
|
31
30
|
var react_2 = require("@chakra-ui/react");
|
|
32
31
|
var ProductTags_1 = __importDefault(require("./ProductTags"));
|
|
@@ -49,4 +48,4 @@ var ProductCard = function (_a) {
|
|
|
49
48
|
options && react_1.default.createElement(ProductPrice_1.default, { options: options }),
|
|
50
49
|
onAddToCart && react_1.default.createElement(Button_1.default, { colorScheme: "orange", size: "sm", width: "100%", onClick: onAddToCart }, "Add to Cart"))));
|
|
51
50
|
};
|
|
52
|
-
exports.
|
|
51
|
+
exports.default = ProductCard;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SearchSelectProps } from './SearchSelectProps';
|
|
3
|
-
declare const SearchSelect: ({ id, label, options, onSelect, onSearch, isOptionLoading, isLoading, loadingText, placeholder, value, searchQuery, isMultiple, isRequired, error, errorMessage, helperText, width, height, size, chip, information, rightIcon, addNew, isSelectAll, pagination, insideSelect, isRemoveAllIcon
|
|
3
|
+
declare const SearchSelect: ({ id, label, options, onSelect, onSearch, isOptionLoading, isLoading, loadingText, placeholder, value, searchQuery, isMultiple, isRequired, error, errorMessage, helperText, width, height, size, chip, information, rightIcon, addNew, isSelectAll, pagination, insideSelect, isRemoveAllIcon }: SearchSelectProps) => React.JSX.Element;
|
|
4
4
|
export default SearchSelect;
|
|
@@ -59,7 +59,7 @@ var normalizeMultiValue = function (val) {
|
|
|
59
59
|
};
|
|
60
60
|
var SearchSelect = function (_a) {
|
|
61
61
|
var _b, _c, _d, _e, _f;
|
|
62
|
-
var id = _a.id, label = _a.label, options = _a.options, onSelect = _a.onSelect, onSearch = _a.onSearch, _g = _a.isOptionLoading, isOptionLoading = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, _j = _a.loadingText, loadingText = _j === void 0 ? 'Loading...' : _j, _k = _a.placeholder, placeholder = _k === void 0 ? 'Select' : _k, value = _a.value, _l = _a.searchQuery, searchQuery = _l === void 0 ? '' : _l, _m = _a.isMultiple, isMultiple = _m === void 0 ? false : _m, _o = _a.isRequired, isRequired = _o === void 0 ? false : _o, _p = _a.error, error = _p === void 0 ? false : _p, errorMessage = _a.errorMessage, helperText = _a.helperText, _q = _a.width, width = _q === void 0 ? '100%' : _q, _r = _a.height, height = _r === void 0 ? "2.75rem" : _r, _s = _a.size, size = _s === void 0 ? 'md' : _s, chip = _a.chip, information = _a.information, rightIcon = _a.rightIcon, addNew = _a.addNew, _t = _a.isSelectAll, isSelectAll = _t === void 0 ? false : _t, pagination = _a.pagination, insideSelect = _a.insideSelect, isRemoveAllIcon = _a.isRemoveAllIcon
|
|
62
|
+
var id = _a.id, label = _a.label, options = _a.options, onSelect = _a.onSelect, onSearch = _a.onSearch, _g = _a.isOptionLoading, isOptionLoading = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, _j = _a.loadingText, loadingText = _j === void 0 ? 'Loading...' : _j, _k = _a.placeholder, placeholder = _k === void 0 ? 'Select' : _k, value = _a.value, _l = _a.searchQuery, searchQuery = _l === void 0 ? '' : _l, _m = _a.isMultiple, isMultiple = _m === void 0 ? false : _m, _o = _a.isRequired, isRequired = _o === void 0 ? false : _o, _p = _a.error, error = _p === void 0 ? false : _p, errorMessage = _a.errorMessage, helperText = _a.helperText, _q = _a.width, width = _q === void 0 ? '100%' : _q, _r = _a.height, height = _r === void 0 ? "2.75rem" : _r, _s = _a.size, size = _s === void 0 ? 'md' : _s, chip = _a.chip, information = _a.information, rightIcon = _a.rightIcon, addNew = _a.addNew, _t = _a.isSelectAll, isSelectAll = _t === void 0 ? false : _t, pagination = _a.pagination, insideSelect = _a.insideSelect, isRemoveAllIcon = _a.isRemoveAllIcon;
|
|
63
63
|
var _u = (0, react_1.useState)(searchQuery), inputValue = _u[0], setInputValue = _u[1];
|
|
64
64
|
var _v = (0, react_1.useState)(false), isOpen = _v[0], setIsOpen = _v[1];
|
|
65
65
|
var _w = (0, react_1.useState)(true), hasMore = _w[0], setHasMore = _w[1];
|
|
@@ -189,7 +189,7 @@ var SearchSelect = function (_a) {
|
|
|
189
189
|
react_1.default.createElement(SelectTruncatedLabel_1.default, { label: (_e = (_d = insideSelect === null || insideSelect === void 0 ? void 0 : insideSelect.value) === null || _d === void 0 ? void 0 : _d.label) !== null && _e !== void 0 ? _e : "", maxWidth: (insideSelect === null || insideSelect === void 0 ? void 0 : insideSelect.width) || "6rem" }),
|
|
190
190
|
customSelectOpen ? react_1.default.createElement(lucide_react_1.ChevronUp, { size: 16 }) : react_1.default.createElement(lucide_react_1.ChevronDown, { size: 16 })),
|
|
191
191
|
customSelectOpen && (react_1.default.createElement(react_2.Portal, null,
|
|
192
|
-
react_1.default.createElement(react_2.Box, { id: "custom-select-portal", position: "absolute", top: "".concat(customSelectPos.top, "px"), left: "".concat(customSelectPos.left, "px"), zIndex:
|
|
192
|
+
react_1.default.createElement(react_2.Box, { id: "custom-select-portal", position: "absolute", top: "".concat(customSelectPos.top, "px"), left: "".concat(customSelectPos.left, "px"), zIndex: 1400, bg: theme.colors.white, border: "0.063rem solid", borderColor: theme.colors.gray[300], borderRadius: "md", boxShadow: "md", minW: "10rem", maxW: "38rem" }, (_f = insideSelect === null || insideSelect === void 0 ? void 0 : insideSelect.option) === null || _f === void 0 ? void 0 : _f.map(function (item) { return (react_1.default.createElement(react_2.Box, { key: item.id, display: "flex", alignItems: "center", height: "2.5rem", px: "0.75rem", fontSize: "sm", _hover: { bg: theme.colors.gray[100] }, cursor: "pointer", onClick: function (e) {
|
|
193
193
|
e.stopPropagation();
|
|
194
194
|
handleCustomSelect(item);
|
|
195
195
|
} }, item.label)); })))))),
|
|
@@ -225,16 +225,9 @@ var SearchSelect = function (_a) {
|
|
|
225
225
|
react_1.default.createElement(react_2.Text, { fontSize: "sm" }, allFilteredSelected ? 'Unselect All' : 'Select All'))),
|
|
226
226
|
react_1.default.createElement(react_2.Box, { flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: "0.063rem solid", borderColor: theme.colors.gray[200] }, isOptionLoading ? (react_1.default.createElement(react_2.Box, { p: 3, display: "flex", alignItems: "center", gap: 2 },
|
|
227
227
|
react_1.default.createElement(react_2.Spinner, { size: "sm" }),
|
|
228
|
-
react_1.default.createElement(react_2.Text, { fontSize: "sm" }, loadingText))) : filteredOptions.length === 0 ? (react_1.default.createElement(react_2.Text, { p: 3, fontSize: "sm", color: theme.colors.gray[500] }, "No results found")) : (filteredOptions.map(function (option) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
isMultiple && (react_1.default.createElement(react_2.Checkbox, { isChecked: isSelected(option.id), pointerEvents: "none", colorScheme: "blue" })),
|
|
232
|
-
dropdownProfileView ? react_1.default.createElement(react_2.Box, { display: "flex", alignItems: "center", gap: 3 },
|
|
233
|
-
react_1.default.createElement(react_2.Box, { w: "2rem", h: "2rem", borderRadius: "full", bg: option.color || 'gray.300', color: "white", display: "flex", justifyContent: "center", alignItems: "center", fontSize: "sm", fontWeight: "medium", overflow: "hidden" }, option.profileUrl ? (react_1.default.createElement(react_2.Box, { as: "img", src: option.profileUrl, alt: option.label, w: "100%", h: "100%", objectFit: "cover" })) : ((_b = (_a = option.label) === null || _a === void 0 ? void 0 : _a.charAt(0)) === null || _b === void 0 ? void 0 : _b.toUpperCase())),
|
|
234
|
-
react_1.default.createElement(react_2.Box, null,
|
|
235
|
-
react_1.default.createElement(react_2.Text, { fontSize: "sm", fontWeight: "semibold", color: "gray.800" }, option.label),
|
|
236
|
-
option.email && (react_1.default.createElement(react_2.Text, { fontSize: "xs", color: "gray.500" }, option.email)))) : react_1.default.createElement(react_2.Text, { fontSize: "sm" }, option.label)));
|
|
237
|
-
}))),
|
|
228
|
+
react_1.default.createElement(react_2.Text, { fontSize: "sm" }, loadingText))) : filteredOptions.length === 0 ? (react_1.default.createElement(react_2.Text, { p: 3, fontSize: "sm", color: theme.colors.gray[500] }, "No results found")) : (filteredOptions.map(function (option) { return (react_1.default.createElement(react_2.Box, { key: option.id, p: 2, px: 3, cursor: "pointer", bg: isSelected(option.id) ? theme.colors.gray[100] : 'transparent', _hover: { bg: theme.colors.gray[50] }, onClick: function () { return handleSelect(option); }, display: "flex", alignItems: "center", gap: 2, borderBottom: "0.063rem solid ".concat(theme.colors.gray[100]) },
|
|
229
|
+
isMultiple && (react_1.default.createElement(react_2.Checkbox, { isChecked: isSelected(option.id), pointerEvents: "none", colorScheme: "blue" })),
|
|
230
|
+
option.view ? react_1.default.createElement(react_1.default.Fragment, null, option.view) : react_1.default.createElement(react_2.Text, { fontSize: "sm" }, option.label))); }))),
|
|
238
231
|
(addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && (react_1.default.createElement(react_2.Box, { p: 2, borderTop: "0.063rem solid", borderColor: theme.colors.gray[200], bg: "white", display: "flex", alignItems: "center", gap: 2, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: theme.colors.gray[50] } },
|
|
239
232
|
addNew.icon || react_1.default.createElement(lucide_react_1.Plus, { size: 16 }),
|
|
240
233
|
react_1.default.createElement(react_2.Text, { fontSize: "sm" }, addNew.text || 'Add New'))))),
|
|
@@ -52,12 +52,9 @@ export type SearchSelectProps = {
|
|
|
52
52
|
option?: Options[];
|
|
53
53
|
width?: string;
|
|
54
54
|
};
|
|
55
|
-
dropdownProfileView?: boolean;
|
|
56
55
|
};
|
|
57
56
|
export type Options = {
|
|
58
57
|
id: string | number;
|
|
59
58
|
label: string;
|
|
60
|
-
|
|
61
|
-
profileUrl?: string;
|
|
62
|
-
color?: string;
|
|
59
|
+
view?: React.ReactNode;
|
|
63
60
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { chakraSelectProps } from "./SelectProps";
|
|
3
|
-
export default function Select({ placeholder, size, variant, icon, onChange, onBlur, onFocus, errorBorderColor, isDisabled, isReadOnly, isRequired, value, colorScheme, label, error, errorMessage, helperText, options, width, formControlStyle, isInformation, informationMessage, selectStyle, }: chakraSelectProps): React.JSX.Element;
|
|
3
|
+
export default function Select({ placeholder, size, variant, icon, onChange, onBlur, onFocus, errorBorderColor, isDisabled, isReadOnly, isRequired, value, colorScheme, label, error, errorMessage, helperText, options, width, height, formControlStyle, isInformation, informationMessage, selectStyle, }: chakraSelectProps): React.JSX.Element;
|
|
@@ -32,7 +32,7 @@ var FormLabel_1 = require("../Common/FormLabel");
|
|
|
32
32
|
var ErrorMessage_1 = __importDefault(require("../Common/ErrorMessage"));
|
|
33
33
|
var HelperText_1 = __importDefault(require("../Common/HelperText"));
|
|
34
34
|
function Select(_a) {
|
|
35
|
-
var _b = _a.placeholder, placeholder = _b === void 0 ? "Select Option" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "outline" : _d, icon = _a.icon, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, errorBorderColor = _a.errorBorderColor, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, _f = _a.value, value = _f === void 0 ? "" : _f, colorScheme = _a.colorScheme, label = _a.label, error = _a.error, errorMessage = _a.errorMessage, helperText = _a.helperText, _g = _a.options, options = _g === void 0 ? [] : _g, _h = _a.width, width = _h === void 0 ? 500 : _h, formControlStyle = _a.formControlStyle,
|
|
35
|
+
var _b = _a.placeholder, placeholder = _b === void 0 ? "Select Option" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "outline" : _d, icon = _a.icon, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, errorBorderColor = _a.errorBorderColor, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, _f = _a.value, value = _f === void 0 ? "" : _f, colorScheme = _a.colorScheme, label = _a.label, error = _a.error, errorMessage = _a.errorMessage, helperText = _a.helperText, _g = _a.options, options = _g === void 0 ? [] : _g, _h = _a.width, width = _h === void 0 ? 500 : _h, _j = _a.height, height = _j === void 0 ? "2.75rem" : _j, formControlStyle = _a.formControlStyle, _k = _a.isInformation, isInformation = _k === void 0 ? false : _k, informationMessage = _a.informationMessage, selectStyle = _a.selectStyle;
|
|
36
36
|
var getOptionsList = (0, react_1.useCallback)(function () {
|
|
37
37
|
if (!options.length)
|
|
38
38
|
return react_1.default.createElement("option", { value: "" }, "No Options");
|
|
@@ -47,7 +47,7 @@ function Select(_a) {
|
|
|
47
47
|
};
|
|
48
48
|
return (react_1.default.createElement(react_2.FormControl, { isInvalid: error, style: formControlStyle, width: width },
|
|
49
49
|
label && (react_1.default.createElement(FormLabel_1.TextLabel, { label: label, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })),
|
|
50
|
-
react_1.default.createElement(react_2.Select, { placeholder: placeholder, size: size, variant: variant, icon: icon, isInvalid: error, value: value, onChange: handleOnChange, width: width, onBlur: onBlur, onFocus: onFocus, isDisabled: isDisabled, isReadOnly: isReadOnly, colorScheme: colorScheme, errorBorderColor: errorBorderColor, style: selectStyle }, getOptionsList()),
|
|
50
|
+
react_1.default.createElement(react_2.Select, { placeholder: placeholder, size: size, variant: variant, icon: icon, isInvalid: error, value: value, onChange: handleOnChange, width: width, onBlur: onBlur, onFocus: onFocus, isDisabled: isDisabled, isReadOnly: isReadOnly, colorScheme: colorScheme, errorBorderColor: errorBorderColor, style: selectStyle, minH: height }, getOptionsList()),
|
|
51
51
|
error && react_1.default.createElement(ErrorMessage_1.default, { errorMessage: errorMessage }),
|
|
52
52
|
helperText && !error && react_1.default.createElement(HelperText_1.default, { helperText: helperText })));
|
|
53
53
|
}
|
|
@@ -7,6 +7,7 @@ export type chakraSelectProps = Pick<SelectProps, "placeholder" | "size" | "vari
|
|
|
7
7
|
helperText?: string;
|
|
8
8
|
options: OptionProp[];
|
|
9
9
|
width?: string | number;
|
|
10
|
+
height?: string | number;
|
|
10
11
|
onChange: (selectedOption: OptionProp | undefined) => void;
|
|
11
12
|
formControlStyle?: React.CSSProperties;
|
|
12
13
|
isInformation?: boolean;
|
|
@@ -29,25 +29,51 @@ var react_2 = require("@chakra-ui/react");
|
|
|
29
29
|
var ToasterContext = (0, react_1.createContext)(undefined);
|
|
30
30
|
function ToasterProvider(_a) {
|
|
31
31
|
var children = _a.children;
|
|
32
|
-
// console.log(children, 'childrenchildren----'); // eslint-disable-line no-console
|
|
33
32
|
var toast = (0, react_2.useToast)();
|
|
33
|
+
var theme = (0, react_2.useTheme)();
|
|
34
34
|
var showToast = function (_a) {
|
|
35
|
-
var
|
|
35
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
36
|
+
var title = _a.title, description = _a.description, _m = _a.status, status = _m === void 0 ? "info" : _m, _o = _a.duration, duration = _o === void 0 ? 5000 : _o, _p = _a.isClosable, isClosable = _p === void 0 ? true : _p, _q = _a.position, position = _q === void 0 ? "top-right" : _q, onClose = _a.onClose;
|
|
37
|
+
var statusColors = {
|
|
38
|
+
success: {
|
|
39
|
+
bg: (_b = theme.colors.green) === null || _b === void 0 ? void 0 : _b[50],
|
|
40
|
+
border: (_c = theme.colors.green) === null || _c === void 0 ? void 0 : _c[300],
|
|
41
|
+
},
|
|
42
|
+
error: {
|
|
43
|
+
bg: (_d = theme.colors.red) === null || _d === void 0 ? void 0 : _d[50],
|
|
44
|
+
border: (_e = theme.colors.red) === null || _e === void 0 ? void 0 : _e[300],
|
|
45
|
+
},
|
|
46
|
+
warning: {
|
|
47
|
+
bg: (_f = theme.colors.yellow) === null || _f === void 0 ? void 0 : _f[50],
|
|
48
|
+
border: (_g = theme.colors.yellow) === null || _g === void 0 ? void 0 : _g[300],
|
|
49
|
+
},
|
|
50
|
+
info: {
|
|
51
|
+
bg: (_h = theme.colors.blue) === null || _h === void 0 ? void 0 : _h[50],
|
|
52
|
+
border: (_j = theme.colors.blue) === null || _j === void 0 ? void 0 : _j[300],
|
|
53
|
+
},
|
|
54
|
+
loading: {
|
|
55
|
+
bg: (_k = theme.colors.gray) === null || _k === void 0 ? void 0 : _k[50],
|
|
56
|
+
border: (_l = theme.colors.gray) === null || _l === void 0 ? void 0 : _l[300],
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
var colors = statusColors[status];
|
|
36
60
|
toast({
|
|
37
|
-
title: title,
|
|
38
|
-
description: description,
|
|
39
|
-
status: status,
|
|
40
61
|
duration: duration,
|
|
41
62
|
isClosable: isClosable,
|
|
42
63
|
position: position,
|
|
43
64
|
onCloseComplete: onClose,
|
|
65
|
+
render: function (_a) {
|
|
66
|
+
var onClose = _a.onClose;
|
|
67
|
+
return (react_1.default.createElement(react_2.Box, { bg: colors.bg, border: "0.063rem solid", borderColor: colors.border, boxShadow: "md", borderRadius: "md", p: 4, minW: "22.5rem" },
|
|
68
|
+
react_1.default.createElement(react_2.Flex, { justify: "space-between", align: "flex-start" },
|
|
69
|
+
react_1.default.createElement(react_2.Box, null,
|
|
70
|
+
react_1.default.createElement(react_2.Text, { fontWeight: "semibold", mb: "0.25rem" }, title),
|
|
71
|
+
react_1.default.createElement(react_2.Text, { fontSize: "sm" }, description)),
|
|
72
|
+
isClosable && (react_1.default.createElement(react_2.CloseButton, { onClick: onClose, size: "sm", mt: 1, ml: 4 })))));
|
|
73
|
+
},
|
|
44
74
|
});
|
|
45
75
|
};
|
|
46
|
-
return (
|
|
47
|
-
// <ChakraProvider>
|
|
48
|
-
react_1.default.createElement(ToasterContext.Provider, { value: { showToast: showToast } }, children)
|
|
49
|
-
// {/* </ChakraProvider> */ }
|
|
50
|
-
);
|
|
76
|
+
return (react_1.default.createElement(ToasterContext.Provider, { value: { showToast: showToast } }, children));
|
|
51
77
|
}
|
|
52
78
|
exports.default = ToasterProvider;
|
|
53
79
|
var useToaster = function () {
|
package/dist/Layout.js
CHANGED
|
@@ -66,6 +66,7 @@ var lucide_react_1 = require("lucide-react");
|
|
|
66
66
|
var Header_1 = __importDefault(require("./Components/Header/Header"));
|
|
67
67
|
var fileUpload_1 = require("./Pages/fileUpload");
|
|
68
68
|
var selectSearch_1 = __importDefault(require("./Pages/selectSearch"));
|
|
69
|
+
var contactForm_1 = __importDefault(require("./Pages/contactForm"));
|
|
69
70
|
var Layout = function () {
|
|
70
71
|
var _a = (0, react_2.useState)(window.location.pathname), currentPath = _a[0], setCurrentPath = _a[1];
|
|
71
72
|
var navigate = function (path) {
|
|
@@ -152,6 +153,8 @@ var Layout = function () {
|
|
|
152
153
|
return react_2.default.createElement(TInput_1.default, null);
|
|
153
154
|
case "/kanban":
|
|
154
155
|
return react_2.default.createElement(kanbanboard_1.default, null);
|
|
156
|
+
case "/contactForm":
|
|
157
|
+
return react_2.default.createElement(contactForm_1.default, null);
|
|
155
158
|
case "/header":
|
|
156
159
|
return (react_2.default.createElement(Header_1.default, { logo: react_2.default.createElement(react_1.Box, { fontSize: "xl", fontWeight: "bold" }, "MyApp"),
|
|
157
160
|
// colorScheme="gray"
|
|
@@ -237,7 +240,8 @@ var Layout = function () {
|
|
|
237
240
|
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/tag"); }, variant: "outline", size: "sm" }, "Tag"),
|
|
238
241
|
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/header"); }, variant: "outline", size: "sm" }, "Header"),
|
|
239
242
|
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/upload"); }, variant: "outline", size: "sm" }, "File Upload"),
|
|
240
|
-
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/productCard"); }, variant: "outline" }, "Product Card")
|
|
243
|
+
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/productCard"); }, variant: "outline" }, "Product Card"),
|
|
244
|
+
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/contactForm"); }, variant: "outline" }, "contactForm")),
|
|
241
245
|
react_2.default.createElement("br", null),
|
|
242
246
|
react_2.default.createElement("br", null),
|
|
243
247
|
react_2.default.createElement("h2", { className: "text-3xl" }, " TailWindCss"),
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var ContactForm_1 = __importDefault(require("../Components/ContactForm/ContactForm"));
|
|
8
|
+
var contactForm = function () {
|
|
9
|
+
return (react_1.default.createElement("div", null,
|
|
10
|
+
react_1.default.createElement(ContactForm_1.default, { apiKey: "https://dev.api.pixelizetech.com/api/mks/sendSweet/",
|
|
11
|
+
// customFields={<>Product kjdhfkljh</>}
|
|
12
|
+
getCustomValues: function () { return ({
|
|
13
|
+
// product: "empty",
|
|
14
|
+
}); }, customerId: 1, organizationId: 1 })));
|
|
15
|
+
};
|
|
16
|
+
exports.default = contactForm;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
var react_1 = __importDefault(require("react"));
|
|
7
|
-
var ProductCard_1 = require("../Components/ProductCard/ProductCard");
|
|
7
|
+
var ProductCard_1 = __importDefault(require("../Components/ProductCard/ProductCard"));
|
|
8
8
|
var react_2 = require("@chakra-ui/react");
|
|
9
9
|
var productCaard = function () {
|
|
10
10
|
var option = [{
|
|
@@ -21,7 +21,7 @@ var productCaard = function () {
|
|
|
21
21
|
}
|
|
22
22
|
];
|
|
23
23
|
return (react_1.default.createElement(react_2.SimpleGrid, { columns: [1, 2, 3], spacing: 6, p: 4 },
|
|
24
|
-
react_1.default.createElement(ProductCard_1.
|
|
24
|
+
react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
|
|
25
25
|
visibile: "https://www.sreeannapoorna.com/cdn/shop/files/80A4644.jpg?v=1752466892&width=1946",
|
|
26
26
|
hover: "https://www.sreeannapoorna.com/cdn/shop/files/80A4658.jpg?v=1752466430&width=1946",
|
|
27
27
|
}, tags: ['Melt in Mouth', 'Authentic Taste', 'No Preservatives'], rating: 4.76, reviews: 596, options: option, onAddToCart: function () { }, onClick: function () { }, bag: {
|
|
@@ -73,14 +73,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
73
73
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
74
74
|
var react_1 = __importStar(require("react"));
|
|
75
75
|
var SearchSelect_1 = __importDefault(require("../Components/SearchSelect/SearchSelect"));
|
|
76
|
+
var react_2 = require("@chakra-ui/react");
|
|
76
77
|
var max = 149;
|
|
77
78
|
var rrr = function (start, limit) {
|
|
78
79
|
var end = Math.min(start + limit, max + 1); // +1 to include `max` as valid
|
|
79
80
|
return Array.from({ length: end - start }, function (_, index) { return ({
|
|
80
81
|
id: (start + index).toString(),
|
|
81
82
|
label: "Option ".concat(start + index),
|
|
82
|
-
|
|
83
|
-
color: "red",
|
|
83
|
+
view: (react_1.default.createElement(react_2.Box, null, " demo"))
|
|
84
84
|
}); });
|
|
85
85
|
};
|
|
86
86
|
var delay = function (ms) { return new Promise(function (resolve) { return setTimeout(resolve, ms); }); };
|
|
@@ -145,6 +145,7 @@ var SearchSelect = function () {
|
|
|
145
145
|
// error={true}
|
|
146
146
|
// errorMessage="hello"
|
|
147
147
|
// isRemoveAllIcon
|
|
148
|
-
dropdownProfileView
|
|
148
|
+
// dropdownProfileView
|
|
149
|
+
virtualization: true })));
|
|
149
150
|
};
|
|
150
151
|
exports.default = SearchSelect;
|
package/dist/Pages/toster.js
CHANGED
|
@@ -16,7 +16,48 @@ var TosterPage = function () {
|
|
|
16
16
|
});
|
|
17
17
|
//setIsOpen(true);
|
|
18
18
|
};
|
|
19
|
+
var handleOnclick1 = function () {
|
|
20
|
+
showToast({
|
|
21
|
+
title: "Hello",
|
|
22
|
+
duration: 3000,
|
|
23
|
+
status: "error",
|
|
24
|
+
});
|
|
25
|
+
//setIsOpen(true);
|
|
26
|
+
};
|
|
27
|
+
var handleOnclick2 = function () {
|
|
28
|
+
showToast({
|
|
29
|
+
title: "Hello",
|
|
30
|
+
duration: 3000,
|
|
31
|
+
status: "warning",
|
|
32
|
+
});
|
|
33
|
+
//setIsOpen(true);
|
|
34
|
+
};
|
|
35
|
+
var handleOnclick3 = function () {
|
|
36
|
+
showToast({
|
|
37
|
+
title: "Hello",
|
|
38
|
+
duration: 3000,
|
|
39
|
+
status: "info",
|
|
40
|
+
});
|
|
41
|
+
//setIsOpen(true);
|
|
42
|
+
};
|
|
43
|
+
var handleOnclick4 = function () {
|
|
44
|
+
showToast({
|
|
45
|
+
title: "Hello",
|
|
46
|
+
duration: 3000,
|
|
47
|
+
status: "loading",
|
|
48
|
+
});
|
|
49
|
+
//setIsOpen(true);
|
|
50
|
+
};
|
|
19
51
|
return (react_1.default.createElement("div", null,
|
|
20
|
-
react_1.default.createElement(Button_1.default, { label: "
|
|
52
|
+
react_1.default.createElement(Button_1.default, { label: "Success", onClick: handleOnclick, variant: "solid", size: "md", width: 100 }),
|
|
53
|
+
react_1.default.createElement("br", null),
|
|
54
|
+
react_1.default.createElement(Button_1.default, { label: "Success", onClick: handleOnclick1, variant: "solid", size: "md", width: 100 }),
|
|
55
|
+
react_1.default.createElement("br", null),
|
|
56
|
+
react_1.default.createElement(Button_1.default, { label: "Success", onClick: handleOnclick2, variant: "solid", size: "md", width: 100 }),
|
|
57
|
+
react_1.default.createElement("br", null),
|
|
58
|
+
react_1.default.createElement(Button_1.default, { label: "Success", onClick: handleOnclick3, variant: "solid", size: "md", width: 100 }),
|
|
59
|
+
react_1.default.createElement("br", null),
|
|
60
|
+
react_1.default.createElement(Button_1.default, { label: "Success", onClick: handleOnclick4, variant: "solid", size: "md", width: 100 }),
|
|
61
|
+
react_1.default.createElement("br", null)));
|
|
21
62
|
};
|
|
22
63
|
exports.default = TosterPage;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import Button from "./Components/Button/Button";
|
|
|
7
7
|
import ButtonGroupIcon from "./Components/ButtonGroupIcon/ButtonGroupIcon";
|
|
8
8
|
import Card from "./Components/Card/Card";
|
|
9
9
|
import Checkbox from "./Components/Checkbox/Checkbox";
|
|
10
|
+
import ContactForm from "./Components/ContactForm/ContactForm";
|
|
10
11
|
import DatePicker from "./Components/DatePicker/DatePicker";
|
|
11
12
|
import Drawer, { DrawerHeader, DrawerBody, DrawerFooter } from "./Components/Drawer/Drawer";
|
|
12
13
|
import Dropdown from "./Components/Dropdown/DropDown";
|
|
@@ -48,5 +49,6 @@ import withTheme from "./withTheme";
|
|
|
48
49
|
import { useCustomTheme } from "./Theme/useCustomTheme";
|
|
49
50
|
import { ThemesList } from "./Theme";
|
|
50
51
|
import { debounce } from "./Utils/table";
|
|
51
|
-
|
|
52
|
+
import ProductCard from "./Components/ProductCard/ProductCard";
|
|
53
|
+
export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, FileUpload, FormWrapper, Header, HeaderActions, InputTextArea, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, NoteTextArea, MultiSelect, NumberInput, PinInput, ProductCard, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SearchSelect, SelectSearch, SideBar, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, useToaster, VerifyEmailOtp, useCustomTheme, ThemesList, debounce, };
|
|
52
54
|
export default withTheme;
|
package/dist/index.js
CHANGED
|
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.
|
|
31
|
-
exports.debounce = exports.ThemesList = exports.useCustomTheme = exports.VerifyEmailOtp = exports.useToaster = exports.ToolTip = exports.Toaster = exports.Timeline = exports.TextInput = exports.Tag = void 0;
|
|
30
|
+
exports.Switch = exports.Skeletons = exports.SideBar = exports.SelectSearch = exports.SearchSelect = exports.Select = exports.Search = exports.Reorder = exports.RadioButtonGroup = exports.RadioButton = exports.ProgressBar = exports.ProfilePhotoViewer = exports.ProfileCardFooter = exports.ProfileCardBody = exports.ProfileCardHeader = exports.ProfileCard = exports.ProductCard = exports.PinInput = exports.NumberInput = exports.MultiSelect = exports.NoteTextArea = exports.NavigationBar = exports.ModalFooter = exports.ModalBody = exports.ModalHeader = exports.Modal = exports.Loading = exports.KanbanBoard = exports.InputTextArea = exports.HeaderActions = exports.Header = exports.FormWrapper = exports.FileUpload = exports.Editor = exports.Dropdown = exports.DrawerFooter = exports.DrawerBody = exports.DrawerHeader = exports.Drawer = exports.DatePicker = exports.ContactForm = exports.Checkbox = exports.Card = exports.ButtonGroupIcon = exports.Button = exports.Breadcrumbs = exports.ApexPieChart = exports.ApexBarChart = exports.AlertDialog = exports.Accordian = void 0;
|
|
31
|
+
exports.debounce = exports.ThemesList = exports.useCustomTheme = exports.VerifyEmailOtp = exports.useToaster = exports.ToolTip = exports.Toaster = exports.Timeline = exports.TextInput = exports.Tag = exports.TableToggle = exports.Table = void 0;
|
|
32
32
|
var Accordion_1 = __importDefault(require("./Components/Accordion/Accordion"));
|
|
33
33
|
exports.Accordian = Accordion_1.default;
|
|
34
34
|
var AlertDialog_1 = __importDefault(require("./Components/AlertDialog/AlertDialog"));
|
|
@@ -47,6 +47,8 @@ var Card_1 = __importDefault(require("./Components/Card/Card"));
|
|
|
47
47
|
exports.Card = Card_1.default;
|
|
48
48
|
var Checkbox_1 = __importDefault(require("./Components/Checkbox/Checkbox"));
|
|
49
49
|
exports.Checkbox = Checkbox_1.default;
|
|
50
|
+
var ContactForm_1 = __importDefault(require("./Components/ContactForm/ContactForm"));
|
|
51
|
+
exports.ContactForm = ContactForm_1.default;
|
|
50
52
|
var DatePicker_1 = __importDefault(require("./Components/DatePicker/DatePicker"));
|
|
51
53
|
exports.DatePicker = DatePicker_1.default;
|
|
52
54
|
var Drawer_1 = __importStar(require("./Components/Drawer/Drawer"));
|
|
@@ -139,4 +141,6 @@ var Theme_1 = require("./Theme");
|
|
|
139
141
|
Object.defineProperty(exports, "ThemesList", { enumerable: true, get: function () { return Theme_1.ThemesList; } });
|
|
140
142
|
var table_1 = require("./Utils/table");
|
|
141
143
|
Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return table_1.debounce; } });
|
|
144
|
+
var ProductCard_1 = __importDefault(require("./Components/ProductCard/ProductCard"));
|
|
145
|
+
exports.ProductCard = ProductCard_1.default;
|
|
142
146
|
exports.default = withTheme_1.default;
|