pixelize-design-library 1.0.76 → 1.0.77
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/Button/Button.js +7 -3
- package/dist/Components/Input/TextInput.d.ts +1 -1
- package/dist/Components/Input/TextInput.js +18 -3
- package/dist/Components/Input/TextInputProps.d.ts +1 -1
- package/dist/Components/ProfileCard/ProfileCard.d.ts +1 -1
- package/dist/Components/ProfileCard/ProfileCard.js +14 -2
- package/dist/Components/ProfileCard/ProfileCardProps.d.ts +2 -0
- package/dist/Layout.js +9 -8
- package/package.json +2 -2
- package/dist/Theme/Default/fonts.d.ts +0 -35
- package/dist/Theme/Default/fonts.js +0 -37
|
@@ -10,9 +10,13 @@ function Button(_a) {
|
|
|
10
10
|
var label = _a.label, _b = _a.width, width = _b === void 0 ? "100%" : _b, onClick = _a.onClick, color = _a.color, variant = _a.variant, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, size = _a.size, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isLoading, isLoading = _d === void 0 ? false : _d, _e = _a.loadingText, loadingText = _e === void 0 ? "Loading" : _e, type = _a.type;
|
|
11
11
|
var theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
12
12
|
console.log(theme);
|
|
13
|
-
return (react_1.default.createElement(react_2.Button, { type: type, onClick: onClick, width: width, colorScheme: color, variant: variant, size: size, isLoading: isLoading, isDisabled: isDisabled, loadingText: loadingText, leftIcon: leftIcon, rightIcon: rightIcon, sx: {
|
|
14
|
-
backgroundColor: theme.colors.primary[500]
|
|
15
|
-
|
|
13
|
+
return (react_1.default.createElement(react_2.Button, { type: type, onClick: onClick, width: width, colorScheme: color, variant: variant, size: size, isLoading: isLoading, isDisabled: isDisabled, loadingText: loadingText, leftIcon: leftIcon, rightIcon: rightIcon, sx: !variant ? {
|
|
14
|
+
backgroundColor: theme.colors.primary[500],
|
|
15
|
+
color: theme.colors.white,
|
|
16
|
+
_hover: {
|
|
17
|
+
backgroundColor: theme.colors.primary[600],
|
|
18
|
+
},
|
|
19
|
+
} : {} },
|
|
16
20
|
react_1.default.createElement(react_2.Box, { sx: {
|
|
17
21
|
overflow: "hidden",
|
|
18
22
|
textOverflow: "ellipsis",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TextInputProps } from "./TextInputProps";
|
|
2
2
|
import React from "react";
|
|
3
|
-
export default function TextInput({ label, type, id, name, onChange, onBlur, onFocus, isDisabled, isReadOnly, isRequired, value, placeholder, width, error, errorMessage, helperText, onRightIconclick, inputRightIcon, inputGroupStyle, inputStyle, }: TextInputProps): React.JSX.Element;
|
|
3
|
+
export default function TextInput({ label, type, id, name, onChange, onBlur, onFocus, isDisabled, isReadOnly, isRequired, value, placeholder, width, error, errorMessage, helperText, onRightIconclick, inputRightIcon, inputGroupStyle, inputStyle, size }: TextInputProps): React.JSX.Element;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
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
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -6,11 +17,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
17
|
var react_1 = require("@chakra-ui/react");
|
|
7
18
|
var react_2 = __importDefault(require("react"));
|
|
8
19
|
function TextInput(_a) {
|
|
9
|
-
var label = _a.label, _b = _a.type, type = _b === void 0 ? "text" : _b, id = _a.id, name = _a.name, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isReadOnly, isReadOnly = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, value = _a.value, _f = _a.placeholder, placeholder = _f === void 0 ? "Placeholder" : _f, _g = _a.width, width = _g === void 0 ? "250px" : _g, error = _a.error, errorMessage = _a.errorMessage, helperText = _a.helperText, onRightIconclick = _a.onRightIconclick, inputRightIcon = _a.inputRightIcon, inputGroupStyle = _a.inputGroupStyle, inputStyle = _a.inputStyle;
|
|
20
|
+
var label = _a.label, _b = _a.type, type = _b === void 0 ? "text" : _b, id = _a.id, name = _a.name, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isReadOnly, isReadOnly = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, value = _a.value, _f = _a.placeholder, placeholder = _f === void 0 ? "Placeholder" : _f, _g = _a.width, width = _g === void 0 ? "250px" : _g, error = _a.error, errorMessage = _a.errorMessage, helperText = _a.helperText, onRightIconclick = _a.onRightIconclick, inputRightIcon = _a.inputRightIcon, inputGroupStyle = _a.inputGroupStyle, inputStyle = _a.inputStyle, _h = _a.size, size = _h === void 0 ? "sm" : _h;
|
|
10
21
|
return (react_2.default.createElement(react_1.FormControl, { isRequired: isRequired, isInvalid: error },
|
|
11
|
-
label && react_2.default.createElement(react_1.FormLabel, { mb: "0.
|
|
22
|
+
label && react_2.default.createElement(react_1.FormLabel, { color: "#5a5a5a", mb: "0.1rem", fontSize: 14 }, label),
|
|
12
23
|
react_2.default.createElement(react_1.InputGroup, { width: width, style: inputGroupStyle },
|
|
13
|
-
react_2.default.createElement(react_1.Input, { type: type,
|
|
24
|
+
react_2.default.createElement(react_1.Input, { type: type,
|
|
25
|
+
// variant={"flushed"}
|
|
26
|
+
placeholder: placeholder, onChange: onChange, onBlur: onBlur,
|
|
27
|
+
// focusBorderColor="#3182ce29"
|
|
28
|
+
onFocus: onFocus, value: value, errorBorderColor: error ? "crimson" : "", isDisabled: isDisabled, isReadOnly: isReadOnly, id: id, name: name, size: size, style: __assign(__assign({}, inputStyle), { borderColor: "#3182ce29" }) }),
|
|
14
29
|
inputRightIcon && (react_2.default.createElement(react_1.InputRightElement, { onClick: onRightIconclick }, inputRightIcon))),
|
|
15
30
|
error && react_2.default.createElement(react_1.FormErrorMessage, { pl: 4 }, errorMessage),
|
|
16
31
|
helperText && !error && (react_2.default.createElement(react_1.FormHelperText, { pl: 4 }, helperText))));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputProps } from "@chakra-ui/react";
|
|
3
|
-
export type TextInputProps = Pick<InputProps, "value" | "type" | "onChange" | "placeholder" | "onBlur" | "onFocus" | "isDisabled" | "isRequired" | "isReadOnly" | "width" | "errorBorderColor"> & {
|
|
3
|
+
export type TextInputProps = Pick<InputProps, "value" | "type" | "onChange" | "placeholder" | "onBlur" | "onFocus" | "isDisabled" | "isRequired" | "isReadOnly" | "width" | "errorBorderColor" | "size"> & {
|
|
4
4
|
label?: string;
|
|
5
5
|
id?: string;
|
|
6
6
|
name?: string;
|
|
@@ -9,4 +9,4 @@ export declare const ProfileCardBody: React.FC<{
|
|
|
9
9
|
export declare const ProfileCardFooter: React.FC<{
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
}>;
|
|
12
|
-
export default function ProfileCard({ maxW, align, variant, direction, justify, children, size, color, overflow, dividercolor, dividersize, dividervariant, CardStyle }: ProfileCardProps): React.JSX.Element;
|
|
12
|
+
export default function ProfileCard({ maxW, align, variant, direction, justify, children, size, color, overflow, dividercolor, dividersize, dividervariant, CardStyle, borderTopColor, borderLeftColor, }: ProfileCardProps): React.JSX.Element;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
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
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -22,14 +33,15 @@ var ProfileCardFooter = function (_a) {
|
|
|
22
33
|
};
|
|
23
34
|
exports.ProfileCardFooter = ProfileCardFooter;
|
|
24
35
|
function ProfileCard(_a) {
|
|
25
|
-
var maxW = _a.maxW, align = _a.align, variant = _a.variant, direction = _a.direction, justify = _a.justify, children = _a.children, size = _a.size, color = _a.color, overflow = _a.overflow, _b = _a.dividercolor, dividercolor = _b === void 0 ? "#d5cfcf" : _b, _c = _a.dividersize, dividersize = _c === void 0 ? "0.5px" : _c, _d = _a.dividervariant, dividervariant = _d === void 0 ? "solid" : _d, CardStyle = _a.CardStyle;
|
|
36
|
+
var maxW = _a.maxW, align = _a.align, variant = _a.variant, direction = _a.direction, justify = _a.justify, children = _a.children, size = _a.size, color = _a.color, overflow = _a.overflow, _b = _a.dividercolor, dividercolor = _b === void 0 ? "#d5cfcf" : _b, _c = _a.dividersize, dividersize = _c === void 0 ? "0.5px" : _c, _d = _a.dividervariant, dividervariant = _d === void 0 ? "solid" : _d, CardStyle = _a.CardStyle, borderTopColor = _a.borderTopColor, borderLeftColor = _a.borderLeftColor;
|
|
26
37
|
var isReactElement = function (child) {
|
|
27
38
|
return child !== null && typeof child === "object" && "type" in child;
|
|
28
39
|
};
|
|
29
40
|
var header = react_1.default.Children.toArray(children).find(function (child) { return isReactElement(child) && child.type === exports.ProfileCardHeader; });
|
|
30
41
|
var body = react_1.default.Children.toArray(children).find(function (child) { return isReactElement(child) && child.type === exports.ProfileCardBody; });
|
|
31
42
|
var footer = react_1.default.Children.toArray(children).find(function (child) { return isReactElement(child) && child.type === exports.ProfileCardFooter; });
|
|
32
|
-
|
|
43
|
+
var StylesWithBorder = borderLeftColor ? __assign(__assign({}, CardStyle), { borderLeft: "2px solid #3182CE" }) : borderTopColor ? __assign(__assign({}, CardStyle), { borderTop: "2px solid #3182CE" }) : __assign({}, CardStyle);
|
|
44
|
+
return (react_1.default.createElement(react_2.Card, { maxW: maxW, align: align, variant: variant, direction: direction, justify: justify, size: size, overflow: overflow, colorScheme: color, style: StylesWithBorder },
|
|
33
45
|
header && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
34
46
|
react_1.default.createElement(react_2.CardHeader, { style: { fontWeight: "bold" } }, header),
|
|
35
47
|
react_1.default.createElement(react_2.Divider, { style: {
|
|
@@ -9,4 +9,6 @@ export type ProfileCardProps = Pick<CardProps, "direction" | "maxW" | "align" |
|
|
|
9
9
|
dividersize?: string;
|
|
10
10
|
dividervariant?: "solid" | "dashed" | "dotted" | "double" | "groove" | "ridge" | "inset" | "outset";
|
|
11
11
|
CardStyle?: React.CSSProperties;
|
|
12
|
+
borderTopColor?: boolean;
|
|
13
|
+
borderLeftColor?: boolean;
|
|
12
14
|
};
|
package/dist/Layout.js
CHANGED
|
@@ -96,6 +96,7 @@ var KaTable_1 = __importDefault(require("./Components/KaTable/KaTable"));
|
|
|
96
96
|
// PagingPosition,
|
|
97
97
|
// } from "ka-table/enums";
|
|
98
98
|
var KaTable_2 = require("./Components/KaTable/KaTable");
|
|
99
|
+
// import { ICellTextProps } from "ka-table/props";
|
|
99
100
|
// import { ICellTextProps } from 'ka-table/props';
|
|
100
101
|
// import { openRowEditors } from 'ka-table/actionCreators';
|
|
101
102
|
var Layout = function () {
|
|
@@ -420,6 +421,8 @@ var Layout = function () {
|
|
|
420
421
|
setAlertActive(!alertActive);
|
|
421
422
|
};
|
|
422
423
|
var DataType = KaTable_2.TableEnums.DataType, SortingMode = KaTable_2.TableEnums.SortingMode, FilteringMode = KaTable_2.TableEnums.FilteringMode, PagingPosition = KaTable_2.TableEnums.PagingPosition;
|
|
424
|
+
// const { ICellTextProps } = TableProps;
|
|
425
|
+
// const { openRowEditors } = TableActionCreator;
|
|
423
426
|
var dataArray = Array(120)
|
|
424
427
|
.fill(undefined)
|
|
425
428
|
.map(function (_, index) { return ({
|
|
@@ -562,15 +565,11 @@ var Layout = function () {
|
|
|
562
565
|
react_1.default.createElement("br", null),
|
|
563
566
|
react_1.default.createElement(Breadcrumbs_1.default, { separator: react_1.default.createElement(icons_1.ChevronRightIcon, { color: "gray.500" }), items: breadcrumbItems, handleClick: handleClick }),
|
|
564
567
|
react_1.default.createElement(react_2.Box, { p: "50px", height: height - 160, overflowY: "scroll", width: width - 75 },
|
|
565
|
-
react_1.default.createElement(TextInput_1.default
|
|
566
|
-
//label="hello"
|
|
567
|
-
, {
|
|
568
|
-
//label="hello"
|
|
569
|
-
id: "hello", name: "hello",
|
|
568
|
+
react_1.default.createElement(TextInput_1.default, { label: "my label", id: "hello", name: "hello",
|
|
570
569
|
//helperText="Hello"
|
|
571
570
|
//errorMessage="Required"
|
|
572
571
|
//error={true}
|
|
573
|
-
type: "
|
|
572
|
+
type: "text",
|
|
574
573
|
// inputRightIcon={<FiUser color="gray.300" />}
|
|
575
574
|
// onRightIconclick={() => {
|
|
576
575
|
// console.log("icon click");
|
|
@@ -585,7 +584,9 @@ var Layout = function () {
|
|
|
585
584
|
react_1.default.createElement("br", null),
|
|
586
585
|
react_1.default.createElement(Button_1.default, { label: "TestButton", onClick: function () {
|
|
587
586
|
console.log("hello");
|
|
588
|
-
},
|
|
587
|
+
},
|
|
588
|
+
// variant={"solid"}
|
|
589
|
+
color: "blue", size: "md", width: 100, type: "submit" }),
|
|
589
590
|
react_1.default.createElement("br", null),
|
|
590
591
|
react_1.default.createElement("br", null),
|
|
591
592
|
react_1.default.createElement(Button_1.default, { label: "Tosterbutton", onClick: handleOnclick, variant: "solid", color: "blue", size: "md", width: 100 }),
|
|
@@ -641,7 +642,7 @@ var Layout = function () {
|
|
|
641
642
|
react_1.default.createElement(PinInput_1.default, { pins: 5, label: "Enter pin" }),
|
|
642
643
|
react_1.default.createElement("br", null),
|
|
643
644
|
react_1.default.createElement("br", null),
|
|
644
|
-
react_1.default.createElement(ProfileCard_1.default, { CardStyle: { marginRight: "10px" } },
|
|
645
|
+
react_1.default.createElement(ProfileCard_1.default, { CardStyle: { marginRight: "10px" }, borderTopColor: true },
|
|
645
646
|
react_1.default.createElement(ProfileCard_1.ProfileCardHeader, null, "Customer dashboard"),
|
|
646
647
|
react_1.default.createElement(ProfileCard_1.ProfileCardBody, null,
|
|
647
648
|
react_1.default.createElement(react_2.Text, null, "View a summary of all your customers over the last month.")),
|
package/package.json
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import "@fontsource/ubuntu-sans";
|
|
2
|
-
declare const fontOptions: {
|
|
3
|
-
fonts: {
|
|
4
|
-
body: string;
|
|
5
|
-
heading: string;
|
|
6
|
-
mono: string;
|
|
7
|
-
};
|
|
8
|
-
fontSizes: {
|
|
9
|
-
xs: string;
|
|
10
|
-
sm: string;
|
|
11
|
-
md: string;
|
|
12
|
-
lg: string;
|
|
13
|
-
xl: string;
|
|
14
|
-
"2xl": string;
|
|
15
|
-
"3xl": string;
|
|
16
|
-
"4xl": string;
|
|
17
|
-
"5xl": string;
|
|
18
|
-
"6xl": string;
|
|
19
|
-
"7xl": string;
|
|
20
|
-
"8xl": string;
|
|
21
|
-
"9xl": string;
|
|
22
|
-
};
|
|
23
|
-
fontWeights: {
|
|
24
|
-
hairline: number;
|
|
25
|
-
thin: number;
|
|
26
|
-
light: number;
|
|
27
|
-
normal: number;
|
|
28
|
-
medium: number;
|
|
29
|
-
semibold: number;
|
|
30
|
-
bold: number;
|
|
31
|
-
extrabold: number;
|
|
32
|
-
black: number;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export default fontOptions;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
require("@fontsource/ubuntu-sans");
|
|
4
|
-
var fontOptions = {
|
|
5
|
-
fonts: {
|
|
6
|
-
body: "Ubuntu Sans, serif",
|
|
7
|
-
heading: "Ubuntu Sans, serif",
|
|
8
|
-
mono: "Ubuntu Sans, monospace",
|
|
9
|
-
},
|
|
10
|
-
fontSizes: {
|
|
11
|
-
xs: "0.75rem",
|
|
12
|
-
sm: "0.875rem",
|
|
13
|
-
md: "1rem",
|
|
14
|
-
lg: "1.125rem",
|
|
15
|
-
xl: "1.25rem",
|
|
16
|
-
"2xl": "1.5rem",
|
|
17
|
-
"3xl": "1.875rem",
|
|
18
|
-
"4xl": "2.25rem",
|
|
19
|
-
"5xl": "3rem",
|
|
20
|
-
"6xl": "3.75rem",
|
|
21
|
-
"7xl": "4.5rem",
|
|
22
|
-
"8xl": "6rem",
|
|
23
|
-
"9xl": "8rem",
|
|
24
|
-
},
|
|
25
|
-
fontWeights: {
|
|
26
|
-
hairline: 100,
|
|
27
|
-
thin: 200,
|
|
28
|
-
light: 300,
|
|
29
|
-
normal: 400,
|
|
30
|
-
medium: 500,
|
|
31
|
-
semibold: 600,
|
|
32
|
-
bold: 700,
|
|
33
|
-
extrabold: 800,
|
|
34
|
-
black: 900,
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
exports.default = fontOptions;
|