@jorgequevedoc/react-gridforms 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +278 -0
- package/dist/components/FormField.d.ts +11 -0
- package/dist/components/FormField.d.ts.map +1 -0
- package/dist/components/FormField.js +111 -0
- package/dist/components/FormField.js.map +1 -0
- package/dist/components/FormRow.d.ts +9 -0
- package/dist/components/FormRow.d.ts.map +1 -0
- package/dist/components/FormRow.js +38 -0
- package/dist/components/FormRow.js.map +1 -0
- package/dist/components/FormSection.d.ts +9 -0
- package/dist/components/FormSection.d.ts.map +1 -0
- package/dist/components/FormSection.js +36 -0
- package/dist/components/FormSection.js.map +1 -0
- package/dist/components/GridForm.d.ts +9 -0
- package/dist/components/GridForm.d.ts.map +1 -0
- package/dist/components/GridForm.js +88 -0
- package/dist/components/GridForm.js.map +1 -0
- package/dist/components/ThemeToggle.d.ts +7 -0
- package/dist/components/ThemeToggle.d.ts.map +1 -0
- package/dist/components/ThemeToggle.js +30 -0
- package/dist/components/ThemeToggle.js.map +1 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +9 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/inputs/RadioGroup.d.ts +14 -0
- package/dist/components/inputs/RadioGroup.d.ts.map +1 -0
- package/dist/components/inputs/RadioGroup.js +39 -0
- package/dist/components/inputs/RadioGroup.js.map +1 -0
- package/dist/components/inputs/SelectInput.d.ts +18 -0
- package/dist/components/inputs/SelectInput.d.ts.map +1 -0
- package/dist/components/inputs/SelectInput.js +29 -0
- package/dist/components/inputs/SelectInput.js.map +1 -0
- package/dist/components/inputs/TextInput.d.ts +15 -0
- package/dist/components/inputs/TextInput.d.ts.map +1 -0
- package/dist/components/inputs/TextInput.js +28 -0
- package/dist/components/inputs/TextInput.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/index.ts +27 -0
- package/dist/lib.d.ts +4 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js +6 -0
- package/dist/lib.js.map +1 -0
- package/dist/theme/ThemeContext.d.ts +16 -0
- package/dist/theme/ThemeContext.d.ts.map +1 -0
- package/dist/theme/ThemeContext.js +32 -0
- package/dist/theme/ThemeContext.js.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/themes.d.ts +4 -0
- package/dist/theme/themes.d.ts.map +1 -0
- package/dist/theme/themes.js +87 -0
- package/dist/theme/themes.js.map +1 -0
- package/dist/theme/types.d.ts +46 -0
- package/dist/theme/types.d.ts.map +1 -0
- package/dist/theme/types.js +2 -0
- package/dist/theme/types.js.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { GridForm } from './GridForm';
|
|
2
|
+
export { FormRow } from './FormRow';
|
|
3
|
+
export { FormField } from './FormField';
|
|
4
|
+
export { FormSection } from './FormSection';
|
|
5
|
+
export { TextInput } from './inputs/TextInput';
|
|
6
|
+
export { SelectInput } from './inputs/SelectInput';
|
|
7
|
+
export { RadioGroup } from './inputs/RadioGroup';
|
|
8
|
+
export { ThemeToggle } from './ThemeToggle';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { GridForm } from './GridForm';
|
|
2
|
+
export { FormRow } from './FormRow';
|
|
3
|
+
export { FormField } from './FormField';
|
|
4
|
+
export { FormSection } from './FormSection';
|
|
5
|
+
export { TextInput } from './inputs/TextInput';
|
|
6
|
+
export { SelectInput } from './inputs/SelectInput';
|
|
7
|
+
export { RadioGroup } from './inputs/RadioGroup';
|
|
8
|
+
export { ThemeToggle } from './ThemeToggle';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface RadioOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RadioGroupProps {
|
|
7
|
+
value?: string;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
options: RadioOption[];
|
|
10
|
+
name: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const RadioGroup: React.FC<RadioGroupProps>;
|
|
14
|
+
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAgCD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA6BhD,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
const RadioContainer = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
gap: ${(props) => props.theme.spacing.md};
|
|
7
|
+
|
|
8
|
+
@media only screen and (max-width: 768px) {
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: ${(props) => props.theme.spacing.sm};
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
const RadioItem = styled.label `
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
font-size: ${(props) => props.theme.typography.fontSizeBase};
|
|
18
|
+
text-transform: none;
|
|
19
|
+
letter-spacing: normal;
|
|
20
|
+
color: ${(props) => props.theme.colors.textPrimary};
|
|
21
|
+
|
|
22
|
+
input[type='radio'] {
|
|
23
|
+
margin-right: ${(props) => props.theme.spacing.sm};
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:hover {
|
|
28
|
+
opacity: 0.8;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
export const RadioGroup = ({ value, onChange, options, name, className, }) => {
|
|
32
|
+
const handleChange = (e) => {
|
|
33
|
+
if (onChange) {
|
|
34
|
+
onChange(e.target.value);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return (_jsx(RadioContainer, { className: className, children: options.map((option) => (_jsxs(RadioItem, { children: [_jsx("input", { type: "radio", name: name, value: option.value, checked: value === option.value, onChange: handleChange }), option.label] }, option.value))) }));
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../src/components/inputs/RadioGroup.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAevC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;;SAGxB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;;;;WAI/B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;;CAE3C,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAA;;;;eAIf,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY;;;WAGlD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW;;;oBAGhC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;;;;;;;CAOpD,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,KAAK,EACL,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,SAAS,GACV,EAAE,EAAE;IACH,MAAM,YAAY,GAAG,CAAC,CAAsC,EAAE,EAAE;QAC9D,IAAI,QAAQ,EAAE,CAAC;YACb,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,cAAc,IAAC,SAAS,EAAE,SAAS,YACjC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,MAAC,SAAS,eACR,gBACE,IAAI,EAAC,OAAO,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,OAAO,EAAE,KAAK,KAAK,MAAM,CAAC,KAAK,EAC/B,QAAQ,EAAE,YAAY,GACtB,EACD,MAAM,CAAC,KAAK,KARC,MAAM,CAAC,KAAK,CAShB,CACb,CAAC,GACa,CAClB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SelectInputProps {
|
|
7
|
+
value?: string;
|
|
8
|
+
onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
9
|
+
options: SelectOption[];
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const SelectInput: React.FC<SelectInputProps>;
|
|
18
|
+
//# sourceMappingURL=SelectInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/SelectInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC7D,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA0BD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAiClD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
const StyledSelect = styled.select `
|
|
4
|
+
font-size: ${(props) => props.theme.typography.fontSizeLarge};
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
border: 0;
|
|
9
|
+
background: ${(props) => props.theme.colors.inputBackground};
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
|
|
12
|
+
&:focus {
|
|
13
|
+
outline: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:disabled {
|
|
17
|
+
opacity: 0.6;
|
|
18
|
+
cursor: not-allowed;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
option {
|
|
22
|
+
background: ${(props) => props.theme.colors.surface};
|
|
23
|
+
color: ${(props) => props.theme.colors.textPrimary};
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
export const SelectInput = ({ value, onChange, options, placeholder, name, id, required, disabled, className, }) => {
|
|
27
|
+
return (_jsxs(StyledSelect, { value: value, onChange: onChange, name: name, id: id, required: required, disabled: disabled, className: className, children: [placeholder && (_jsx("option", { value: "", disabled: true, children: placeholder })), options.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value)))] }));
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=SelectInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInput.js","sourceRoot":"","sources":["../../../src/components/inputs/SelectInput.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAmBvC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;eACnB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa;;;;;gBAK9C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe;;;;;;;;;;;;;kBAa3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;aAC1C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW;;CAErD,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EACtD,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAW,EACX,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE,EAAE;IACH,OAAO,CACL,MAAC,YAAY,IACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,aAEnB,WAAW,IAAI,CACd,iBAAQ,KAAK,EAAC,EAAE,EAAC,QAAQ,kBACtB,WAAW,GACL,CACV,EACA,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,iBAA2B,KAAK,EAAE,MAAM,CAAC,KAAK,YAC3C,MAAM,CAAC,KAAK,IADF,MAAM,CAAC,KAAK,CAEhB,CACV,CAAC,IACW,CAChB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TextInputProps {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
type?: 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number' | 'date' | 'datetime-local' | 'month' | 'time' | 'week';
|
|
7
|
+
name?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
autoFocus?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const TextInput: React.FC<TextInputProps>;
|
|
15
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EACD,MAAM,GACN,OAAO,GACP,UAAU,GACV,QAAQ,GACR,KAAK,GACL,KAAK,GACL,QAAQ,GACR,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,MAAM,GACN,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyBD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA0B9C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
const StyledInput = styled.input `
|
|
4
|
+
font-size: ${(props) => props.theme.typography.fontSizeLarge};
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
border: 0;
|
|
9
|
+
background: ${(props) => props.theme.colors.inputBackground};
|
|
10
|
+
|
|
11
|
+
&::placeholder {
|
|
12
|
+
font-weight: ${(props) => props.theme.typography.fontWeightLight};
|
|
13
|
+
color: ${(props) => props.theme.colors.inputPlaceholder};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:focus {
|
|
17
|
+
outline: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:disabled {
|
|
21
|
+
opacity: 0.6;
|
|
22
|
+
cursor: not-allowed;
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
export const TextInput = ({ value, onChange, placeholder, type = 'text', name, id, required, disabled, autoFocus, className, }) => {
|
|
26
|
+
return (_jsx(StyledInput, { type: type, value: value, onChange: onChange, placeholder: placeholder, name: name, id: id, required: required, disabled: disabled, autoFocus: autoFocus, className: className }));
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=TextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/components/inputs/TextInput.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AA2BvC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAA;eACjB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa;;;;;gBAK9C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe;;;mBAG1C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe;aACvD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB;;;;;;;;;;;CAW1D,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAClD,KAAK,EACL,QAAQ,EACR,WAAW,EACX,IAAI,GAAG,MAAM,EACb,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,GACV,EAAE,EAAE;IACH,OAAO,CACL,KAAC,WAAW,IACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { GridForm, FormSection, FormRow, FormField, TextInput, SelectInput, RadioGroup, ThemeToggle, } from './components';
|
|
2
|
+
export { ThemeProvider, useTheme } from './theme/ThemeContext';
|
|
3
|
+
export { lightTheme, darkTheme } from './theme';
|
|
4
|
+
export type { TextInputProps } from './components/inputs/TextInput';
|
|
5
|
+
export type { SelectInputProps, SelectOption, } from './components/inputs/SelectInput';
|
|
6
|
+
export type { RadioGroupProps, RadioOption, } from './components/inputs/RadioGroup';
|
|
7
|
+
export type { Theme, ThemeColors, ThemeMode } from './theme';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,OAAO,EACP,SAAS,EACT,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,GACZ,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGhD,YAAY,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,YAAY,EACV,gBAAgB,EAChB,YAAY,GACb,MAAM,iCAAiC,CAAC;AACzC,YAAY,EACV,eAAe,EACf,WAAW,GACZ,MAAM,gCAAgC,CAAC;AACxC,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Main library exports
|
|
2
|
+
export { GridForm, FormSection, FormRow, FormField, TextInput, SelectInput, RadioGroup, ThemeToggle, } from './components';
|
|
3
|
+
// Theme exports
|
|
4
|
+
export { ThemeProvider, useTheme } from './theme/ThemeContext';
|
|
5
|
+
export { lightTheme, darkTheme } from './theme';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,OAAO,EACL,QAAQ,EACR,WAAW,EACX,OAAO,EACP,SAAS,EACT,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,gBAAgB;AAChB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Main library exports
|
|
2
|
+
export {
|
|
3
|
+
GridForm,
|
|
4
|
+
FormSection,
|
|
5
|
+
FormRow,
|
|
6
|
+
FormField,
|
|
7
|
+
TextInput,
|
|
8
|
+
SelectInput,
|
|
9
|
+
RadioGroup,
|
|
10
|
+
ThemeToggle,
|
|
11
|
+
} from './components';
|
|
12
|
+
|
|
13
|
+
// Theme exports
|
|
14
|
+
export { ThemeProvider, useTheme } from './theme/ThemeContext';
|
|
15
|
+
export { lightTheme, darkTheme } from './theme';
|
|
16
|
+
|
|
17
|
+
// Type exports
|
|
18
|
+
export type { TextInputProps } from './components/inputs/TextInput';
|
|
19
|
+
export type {
|
|
20
|
+
SelectInputProps,
|
|
21
|
+
SelectOption,
|
|
22
|
+
} from './components/inputs/SelectInput';
|
|
23
|
+
export type {
|
|
24
|
+
RadioGroupProps,
|
|
25
|
+
RadioOption,
|
|
26
|
+
} from './components/inputs/RadioGroup';
|
|
27
|
+
export type { Theme, ThemeColors, ThemeMode } from './theme';
|
package/dist/lib.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { GridForm, FormSection, FormRow, FormField, TextInput, SelectInput, RadioGroup, ThemeToggle, } from './components';
|
|
2
|
+
export { ThemeProvider, useTheme } from './theme/ThemeContext';
|
|
3
|
+
export { lightTheme, darkTheme } from './theme';
|
|
4
|
+
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,OAAO,EACP,SAAS,EACT,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,GACZ,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/lib.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Main library exports (without type exports for rollup)
|
|
2
|
+
export { GridForm, FormSection, FormRow, FormField, TextInput, SelectInput, RadioGroup, ThemeToggle, } from './components';
|
|
3
|
+
// Theme exports
|
|
4
|
+
export { ThemeProvider, useTheme } from './theme/ThemeContext';
|
|
5
|
+
export { lightTheme, darkTheme } from './theme';
|
|
6
|
+
//# sourceMappingURL=lib.js.map
|
package/dist/lib.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,OAAO,EACP,SAAS,EACT,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,gBAAgB;AAChB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { ThemeMode } from './types';
|
|
4
|
+
interface ThemeContextType {
|
|
5
|
+
themeMode: ThemeMode;
|
|
6
|
+
toggleTheme: () => void;
|
|
7
|
+
setThemeMode: (mode: ThemeMode) => void;
|
|
8
|
+
}
|
|
9
|
+
interface ThemeProviderProps {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
initialTheme?: ThemeMode;
|
|
12
|
+
}
|
|
13
|
+
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
14
|
+
export declare const useTheme: () => ThemeContextType;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ThemeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,UAAU,gBAAgB;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACzC;AAID,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8BtD,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,gBAM3B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useState, useEffect } from 'react';
|
|
3
|
+
import { ThemeProvider as StyledThemeProvider } from 'styled-components';
|
|
4
|
+
import { lightTheme, darkTheme } from './themes';
|
|
5
|
+
const ThemeContext = createContext(undefined);
|
|
6
|
+
export const ThemeProvider = ({ children, initialTheme = 'light', }) => {
|
|
7
|
+
const [themeMode, setThemeMode] = useState(initialTheme);
|
|
8
|
+
// Load theme from localStorage on mount
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const savedTheme = localStorage.getItem('gridforms-theme');
|
|
11
|
+
if (savedTheme && (savedTheme === 'light' || savedTheme === 'dark')) {
|
|
12
|
+
setThemeMode(savedTheme);
|
|
13
|
+
}
|
|
14
|
+
}, []);
|
|
15
|
+
// Save theme to localStorage when it changes
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
localStorage.setItem('gridforms-theme', themeMode);
|
|
18
|
+
}, [themeMode]);
|
|
19
|
+
const toggleTheme = () => {
|
|
20
|
+
setThemeMode((prev) => (prev === 'light' ? 'dark' : 'light'));
|
|
21
|
+
};
|
|
22
|
+
const currentTheme = themeMode === 'light' ? lightTheme : darkTheme;
|
|
23
|
+
return (_jsx(ThemeContext.Provider, { value: { themeMode, toggleTheme, setThemeMode }, children: _jsx(StyledThemeProvider, { theme: currentTheme, children: children }) }));
|
|
24
|
+
};
|
|
25
|
+
export const useTheme = () => {
|
|
26
|
+
const context = useContext(ThemeContext);
|
|
27
|
+
if (context === undefined) {
|
|
28
|
+
throw new Error('useTheme must be used within a ThemeProvider');
|
|
29
|
+
}
|
|
30
|
+
return context;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=ThemeContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../../src/theme/ThemeContext.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9E,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AASjD,MAAM,YAAY,GAAG,aAAa,CAA+B,SAAS,CAAC,CAAC;AAO5E,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,QAAQ,EACR,YAAY,GAAG,OAAO,GACvB,EAAE,EAAE;IACH,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAY,YAAY,CAAC,CAAC;IAEpE,wCAAwC;IACxC,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,iBAAiB,CAAc,CAAC;QACxE,IAAI,UAAU,IAAI,CAAC,UAAU,KAAK,OAAO,IAAI,UAAU,KAAK,MAAM,CAAC,EAAE,CAAC;YACpE,YAAY,CAAC,UAAU,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,6CAA6C;IAC7C,SAAS,CAAC,GAAG,EAAE;QACb,YAAY,CAAC,OAAO,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,YAAY,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IAEpE,OAAO,CACL,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,YACpE,KAAC,mBAAmB,IAAC,KAAK,EAAE,YAAY,YAAG,QAAQ,GAAuB,GACpD,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAqB,EAAE;IAC7C,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACjD,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/theme/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,eAAO,MAAM,UAAU,EAAE,KA0CxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA0CvB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export const lightTheme = {
|
|
2
|
+
colors: {
|
|
3
|
+
background: '#ffffff',
|
|
4
|
+
surface: '#fafafa',
|
|
5
|
+
textPrimary: '#333333',
|
|
6
|
+
textSecondary: '#666666',
|
|
7
|
+
textMuted: '#999999',
|
|
8
|
+
border: '#333333',
|
|
9
|
+
borderLight: '#e0e0e0',
|
|
10
|
+
focusBackground: '#f5f5dc',
|
|
11
|
+
focusBorder: '#333333',
|
|
12
|
+
legend: '#333333',
|
|
13
|
+
inputBackground: 'transparent',
|
|
14
|
+
inputPlaceholder: '#999999',
|
|
15
|
+
hover: '#f0f0f0',
|
|
16
|
+
active: '#e0e0e0',
|
|
17
|
+
},
|
|
18
|
+
spacing: {
|
|
19
|
+
xs: '4px',
|
|
20
|
+
sm: '8px',
|
|
21
|
+
md: '16px',
|
|
22
|
+
lg: '24px',
|
|
23
|
+
xl: '32px',
|
|
24
|
+
},
|
|
25
|
+
typography: {
|
|
26
|
+
fontSizeSmall: '10px',
|
|
27
|
+
fontSizeBase: '16px',
|
|
28
|
+
fontSizeLarge: '18px',
|
|
29
|
+
fontWeightLight: 100,
|
|
30
|
+
fontWeightNormal: 400,
|
|
31
|
+
fontWeightBold: 700,
|
|
32
|
+
},
|
|
33
|
+
borderRadius: {
|
|
34
|
+
sm: '2px',
|
|
35
|
+
md: '4px',
|
|
36
|
+
lg: '8px',
|
|
37
|
+
},
|
|
38
|
+
shadows: {
|
|
39
|
+
sm: '0 1px 3px rgba(0, 0, 0, 0.1)',
|
|
40
|
+
md: '0 4px 6px rgba(0, 0, 0, 0.1)',
|
|
41
|
+
lg: '0 10px 15px rgba(0, 0, 0, 0.1)',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
export const darkTheme = {
|
|
45
|
+
colors: {
|
|
46
|
+
background: '#1a1a1a',
|
|
47
|
+
surface: '#2d2d2d',
|
|
48
|
+
textPrimary: '#ffffff',
|
|
49
|
+
textSecondary: '#cccccc',
|
|
50
|
+
textMuted: '#888888',
|
|
51
|
+
border: '#555555',
|
|
52
|
+
borderLight: '#404040',
|
|
53
|
+
focusBackground: '#3a3a2a',
|
|
54
|
+
focusBorder: '#888888',
|
|
55
|
+
legend: '#ffffff',
|
|
56
|
+
inputBackground: 'transparent',
|
|
57
|
+
inputPlaceholder: '#666666',
|
|
58
|
+
hover: '#404040',
|
|
59
|
+
active: '#505050',
|
|
60
|
+
},
|
|
61
|
+
spacing: {
|
|
62
|
+
xs: '4px',
|
|
63
|
+
sm: '8px',
|
|
64
|
+
md: '16px',
|
|
65
|
+
lg: '24px',
|
|
66
|
+
xl: '32px',
|
|
67
|
+
},
|
|
68
|
+
typography: {
|
|
69
|
+
fontSizeSmall: '10px',
|
|
70
|
+
fontSizeBase: '16px',
|
|
71
|
+
fontSizeLarge: '18px',
|
|
72
|
+
fontWeightLight: 100,
|
|
73
|
+
fontWeightNormal: 400,
|
|
74
|
+
fontWeightBold: 700,
|
|
75
|
+
},
|
|
76
|
+
borderRadius: {
|
|
77
|
+
sm: '2px',
|
|
78
|
+
md: '4px',
|
|
79
|
+
lg: '8px',
|
|
80
|
+
},
|
|
81
|
+
shadows: {
|
|
82
|
+
sm: '0 1px 3px rgba(0, 0, 0, 0.3)',
|
|
83
|
+
md: '0 4px 6px rgba(0, 0, 0, 0.3)',
|
|
84
|
+
lg: '0 10px 15px rgba(0, 0, 0, 0.3)',
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=themes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/theme/themes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,MAAM,EAAE;QACN,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,SAAS;QAClB,WAAW,EAAE,SAAS;QACtB,aAAa,EAAE,SAAS;QACxB,SAAS,EAAE,SAAS;QACpB,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,SAAS;QACtB,eAAe,EAAE,SAAS;QAC1B,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,SAAS;QACjB,eAAe,EAAE,aAAa;QAC9B,gBAAgB,EAAE,SAAS;QAC3B,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,SAAS;KAClB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,MAAM;QACV,EAAE,EAAE,MAAM;QACV,EAAE,EAAE,MAAM;KACX;IACD,UAAU,EAAE;QACV,aAAa,EAAE,MAAM;QACrB,YAAY,EAAE,MAAM;QACpB,aAAa,EAAE,MAAM;QACrB,eAAe,EAAE,GAAG;QACpB,gBAAgB,EAAE,GAAG;QACrB,cAAc,EAAE,GAAG;KACpB;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,KAAK;KACV;IACD,OAAO,EAAE;QACP,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,gCAAgC;KACrC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,MAAM,EAAE;QACN,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,SAAS;QAClB,WAAW,EAAE,SAAS;QACtB,aAAa,EAAE,SAAS;QACxB,SAAS,EAAE,SAAS;QACpB,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,SAAS;QACtB,eAAe,EAAE,SAAS;QAC1B,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,SAAS;QACjB,eAAe,EAAE,aAAa;QAC9B,gBAAgB,EAAE,SAAS;QAC3B,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,SAAS;KAClB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,MAAM;QACV,EAAE,EAAE,MAAM;QACV,EAAE,EAAE,MAAM;KACX;IACD,UAAU,EAAE;QACV,aAAa,EAAE,MAAM;QACrB,YAAY,EAAE,MAAM;QACpB,aAAa,EAAE,MAAM;QACrB,eAAe,EAAE,GAAG;QACpB,gBAAgB,EAAE,GAAG;QACrB,cAAc,EAAE,GAAG;KACpB;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,KAAK;KACV;IACD,OAAO,EAAE;QACP,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,8BAA8B;QAClC,EAAE,EAAE,gCAAgC;KACrC;CACF,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface ThemeColors {
|
|
2
|
+
background: string;
|
|
3
|
+
surface: string;
|
|
4
|
+
textPrimary: string;
|
|
5
|
+
textSecondary: string;
|
|
6
|
+
textMuted: string;
|
|
7
|
+
border: string;
|
|
8
|
+
borderLight: string;
|
|
9
|
+
focusBackground: string;
|
|
10
|
+
focusBorder: string;
|
|
11
|
+
legend: string;
|
|
12
|
+
inputBackground: string;
|
|
13
|
+
inputPlaceholder: string;
|
|
14
|
+
hover: string;
|
|
15
|
+
active: string;
|
|
16
|
+
}
|
|
17
|
+
export interface Theme {
|
|
18
|
+
colors: ThemeColors;
|
|
19
|
+
spacing: {
|
|
20
|
+
xs: string;
|
|
21
|
+
sm: string;
|
|
22
|
+
md: string;
|
|
23
|
+
lg: string;
|
|
24
|
+
xl: string;
|
|
25
|
+
};
|
|
26
|
+
typography: {
|
|
27
|
+
fontSizeSmall: string;
|
|
28
|
+
fontSizeBase: string;
|
|
29
|
+
fontSizeLarge: string;
|
|
30
|
+
fontWeightLight: number;
|
|
31
|
+
fontWeightNormal: number;
|
|
32
|
+
fontWeightBold: number;
|
|
33
|
+
};
|
|
34
|
+
borderRadius: {
|
|
35
|
+
sm: string;
|
|
36
|
+
md: string;
|
|
37
|
+
lg: string;
|
|
38
|
+
};
|
|
39
|
+
shadows: {
|
|
40
|
+
sm: string;
|
|
41
|
+
md: string;
|
|
42
|
+
lg: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export type ThemeMode = 'light' | 'dark';
|
|
46
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAE1B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAGhB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAGlB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IAGpB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IAGpB,MAAM,EAAE,MAAM,CAAC;IAGf,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IAGzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,aAAa,EAAE,MAAM,CAAC;QACtB,eAAe,EAAE,MAAM,CAAC;QACxB,gBAAgB,EAAE,MAAM,CAAC;QACzB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,YAAY,EAAE;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH;AAED,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jorgequevedoc/react-gridforms",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "A modern React TypeScript implementation of GridForms - a compact and beautiful grid-based form system",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"build": "tsc -b && vite build",
|
|
25
|
+
"build:lib": "tsc --project tsconfig.lib.json && cp src/index.ts dist/",
|
|
26
|
+
"prepublishOnly": "yarn build:lib",
|
|
27
|
+
"lint": "eslint .",
|
|
28
|
+
"preview": "vite preview"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"react",
|
|
32
|
+
"typescript",
|
|
33
|
+
"forms",
|
|
34
|
+
"grid",
|
|
35
|
+
"form-builder",
|
|
36
|
+
"styled-components",
|
|
37
|
+
"responsive"
|
|
38
|
+
],
|
|
39
|
+
"author": "Jorge Quevedo",
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": ">=18.0.0",
|
|
43
|
+
"react-dom": ">=18.0.0",
|
|
44
|
+
"styled-components": ">=5.0.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@eslint/js": "^8.56.0",
|
|
48
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
49
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
50
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
51
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
52
|
+
"@types/react": "^18.2.43",
|
|
53
|
+
"@types/react-dom": "^18.2.17",
|
|
54
|
+
"@types/styled-components": "^5.1.34",
|
|
55
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
56
|
+
"eslint": "^8.56.0",
|
|
57
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
58
|
+
"eslint-plugin-react-refresh": "^0.4.5",
|
|
59
|
+
"globals": "^13.24.0",
|
|
60
|
+
"react": "^18.2.0",
|
|
61
|
+
"react-dom": "^18.2.0",
|
|
62
|
+
"rollup": "^4.46.2",
|
|
63
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
64
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
65
|
+
"styled-components": "^6.1.8",
|
|
66
|
+
"typescript": "~5.3.3",
|
|
67
|
+
"typescript-eslint": "^8.38.0",
|
|
68
|
+
"vite": "^5.0.8"
|
|
69
|
+
},
|
|
70
|
+
"repository": {
|
|
71
|
+
"type": "git",
|
|
72
|
+
"url": "https://github.com/JorgeQuevedoC/react-gridforms.git"
|
|
73
|
+
},
|
|
74
|
+
"bugs": {
|
|
75
|
+
"url": "https://github.com/JorgeQuevedoC/react-gridforms/issues"
|
|
76
|
+
},
|
|
77
|
+
"homepage": "https://github.com/JorgeQuevedoC/react-gridforms#readme"
|
|
78
|
+
}
|