pixelize-design-library 2.1.32 → 2.1.34

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.
@@ -26,7 +26,7 @@ var DesktopMenu = function (_a) {
26
26
  return (react_2.default.createElement(react_1.Button, { key: subItem.label, onClick: subItem.onClick, variant: "ghost", justifyContent: "flex-start", w: "full", bg: isActive(subItem.href) ? activeBg : "transparent", _hover: { bg: hoverBg, color: hoverTextColor } },
27
27
  react_2.default.createElement(react_1.VStack, { spacing: 0, align: "start" },
28
28
  subItem.badge && (react_2.default.createElement(react_1.Badge, { colorScheme: (_b = (_a = subItem === null || subItem === void 0 ? void 0 : subItem.badge) === null || _a === void 0 ? void 0 : _a.colorScheme) !== null && _b !== void 0 ? _b : "blue", fontSize: "0.6em", alignItems: "end" }, (_c = subItem.badge) === null || _c === void 0 ? void 0 : _c.label)),
29
- react_2.default.createElement(react_1.Text, { color: color }, subItem.label))));
29
+ react_2.default.createElement(react_1.Text, { color: color, _hover: { color: hoverTextColor } }, subItem.label))));
30
30
  })))))));
31
31
  })));
32
32
  };
@@ -13,6 +13,7 @@ export type ProductCardProps = {
13
13
  export type options = {
14
14
  label: string;
15
15
  weight: number;
16
+ unit?: number;
16
17
  price: number;
17
18
  offer: number;
18
19
  };
@@ -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, height, 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, 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 ? "31.25rem" : _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;
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.height, height = _h === void 0 ? "2.75rem" : _h, formControlStyle = _a.formControlStyle, _j = _a.isInformation, isInformation = _j === void 0 ? false : _j, 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");
@@ -45,9 +45,9 @@ function Select(_a) {
45
45
  onChange(selectedOption);
46
46
  }
47
47
  };
48
- return (react_1.default.createElement(react_2.FormControl, { isInvalid: error, style: formControlStyle, width: width },
48
+ return (react_1.default.createElement(react_2.FormControl, { isInvalid: error, style: formControlStyle },
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, minH: height }, getOptionsList()),
50
+ react_1.default.createElement(react_2.Select, { placeholder: placeholder, size: size, variant: variant, icon: icon, isInvalid: error, value: value, onChange: handleOnChange, 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
  }
@@ -10,12 +10,14 @@ var productCaard = function () {
10
10
  var option = [{
11
11
  label: "100 G",
12
12
  weight: 100,
13
+ unit: 1,
13
14
  price: 149,
14
15
  offer: 2,
15
16
  },
16
17
  {
17
18
  label: "200 G",
18
19
  weight: 200,
20
+ unit: 2,
19
21
  price: 250,
20
22
  offer: 50,
21
23
  }
@@ -38,6 +38,6 @@ var SelectPage = function () {
38
38
  react_1.default.createElement(Select_1.default, { options: [
39
39
  { id: 1, label: "magesssssss" },
40
40
  { id: 2, label: "sjdfg" },
41
- ], onChange: handleOnChange, value: selected, width: 200 })));
41
+ ], onChange: handleOnChange, value: selected })));
42
42
  };
43
43
  exports.default = SelectPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.1.32",
3
+ "version": "2.1.34",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",