jcicl 0.0.317 → 0.0.321
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/FormFields/FormFields.d.ts +1 -1
- package/FormInput/FormInput.d.ts +2 -1
- package/FormInput/FormInput.js +9 -8
- package/LabeledInput/LabeledInput.d.ts +1 -1
- package/LabeledTextArea/LabeledTextArea.d.ts +9 -0
- package/LabeledTextArea/LabeledTextArea.js +54 -0
- package/package.json +1 -1
- package/theme.d.ts +1 -0
- package/theme.js +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DropdownOption } from '../../../../../../../../../src/components/composite/LabeledDropdown';
|
|
2
2
|
export type FormField = {
|
|
3
3
|
key: string;
|
|
4
|
-
label
|
|
4
|
+
label?: string;
|
|
5
5
|
sublabel?: string;
|
|
6
6
|
type: 'checkbox' | 'currency' | 'date' | 'dropdown' | 'email' | 'multiDropdown' | 'number' | 'phone' | 'radio' | 'text' | 'textarea' | 'url';
|
|
7
7
|
options?: DropdownOption[];
|
package/FormInput/FormInput.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import { LabeledInputProps } from '../../../../../../../../../src/components/com
|
|
|
2
2
|
import { LabeledCurrencyInputProps } from '../../../../../../../../../src/components/composite/LabeledCurrencyInput';
|
|
3
3
|
import { LabeledCheckboxProps } from '../../../../../../../../../src/components/composite/LabeledCheckbox';
|
|
4
4
|
import { LabeledDropdownProps } from '../../../../../../../../../src/components/composite/LabeledDropdown';
|
|
5
|
-
|
|
5
|
+
import { LabeledTextAreaProps } from '../../../../../../../../../src/components/composite/LabeledTextArea/LabeledTextArea';
|
|
6
|
+
export type AllInputProps = LabeledInputProps & LabeledCheckboxProps & LabeledDropdownProps & LabeledCurrencyInputProps & LabeledTextAreaProps;
|
|
6
7
|
export type FormInputProps = AllInputProps & {
|
|
7
8
|
type?: 'text' | 'dropdown' | 'date' | 'number' | 'checkbox' | 'radio' | 'textarea' | 'currency';
|
|
8
9
|
};
|
package/FormInput/FormInput.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { LabeledInput as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { LabeledInput as o } from "../LabeledInput/LabeledInput.js";
|
|
3
3
|
import { LabeledCurrencyInput as m } from "../LabeledCurrencyInput/LabeledCurrencyInput.js";
|
|
4
|
-
import { LabeledCheckbox as
|
|
5
|
-
import { LabeledDropdown as
|
|
6
|
-
|
|
4
|
+
import { LabeledCheckbox as f } from "../LabeledCheckbox/LabeledCheckbox.js";
|
|
5
|
+
import { LabeledDropdown as a } from "../LabeledDropdown/LabeledDropdown.js";
|
|
6
|
+
import { LabeledTextArea as d } from "../LabeledTextArea/LabeledTextArea.js";
|
|
7
|
+
const i = (r) => {
|
|
7
8
|
const { type: e = "text" } = r;
|
|
8
|
-
return e === "dropdown" || e === "multiDropdown" ? /* @__PURE__ */
|
|
9
|
+
return e === "dropdown" || e === "multiDropdown" ? /* @__PURE__ */ t(a, { ...r }) : e === "checkbox" ? /* @__PURE__ */ t(f, { ...r }) : e === "currency" ? /* @__PURE__ */ t(m, { ...r }) : e === "textarea" ? /* @__PURE__ */ t(d, { ...r }) : /* @__PURE__ */ t(o, { ...r, type: e });
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
i as FormInput,
|
|
13
|
+
i as default
|
|
13
14
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
2
|
+
export interface StyleProps {
|
|
3
|
+
grid?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export type LabeledTextAreaProps = TextFieldProps & {
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const LabeledTextArea: React.FC<LabeledTextAreaProps>;
|
|
9
|
+
export default LabeledTextArea;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { n as s } from "../.chunks/emotion-styled.browser.esm.js";
|
|
3
|
+
import { c as a } from "../.chunks/emotion-react.browser.esm.js";
|
|
4
|
+
import o from "../theme.js";
|
|
5
|
+
import { T as n } from "../.chunks/TextField.js";
|
|
6
|
+
const d = s("div")(() => ({
|
|
7
|
+
...a`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
font-family: 'Roboto', sans-serif;
|
|
11
|
+
|
|
12
|
+
span {
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
margin-bottom: 3px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.MuiInputBase-root {
|
|
18
|
+
padding: 0px;
|
|
19
|
+
|
|
20
|
+
textarea {
|
|
21
|
+
&:hover,
|
|
22
|
+
:focus {
|
|
23
|
+
box-shadow: ${o.boxShadows.green} inset;
|
|
24
|
+
}
|
|
25
|
+
width: 100%;
|
|
26
|
+
padding: 13px;
|
|
27
|
+
border: 1px solid ${o.colors.formBorder};
|
|
28
|
+
border-radius: 9px;
|
|
29
|
+
resize: vertical;
|
|
30
|
+
min-height: 130px;
|
|
31
|
+
font-family: inherit;
|
|
32
|
+
transition: all 313ms ease;
|
|
33
|
+
background: transparent;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
fieldset {
|
|
37
|
+
border: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.Mui-focused {
|
|
41
|
+
fieldset {
|
|
42
|
+
border: none;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`
|
|
47
|
+
})), c = ({ label: e, ...t }) => /* @__PURE__ */ i(d, { className: "jcLabeledTextArea", children: [
|
|
48
|
+
e && /* @__PURE__ */ r("span", { children: e }),
|
|
49
|
+
/* @__PURE__ */ r(n, { ...t, multiline: !0, fullWidth: !0, rows: 1 })
|
|
50
|
+
] });
|
|
51
|
+
export {
|
|
52
|
+
c as LabeledTextArea,
|
|
53
|
+
c as default
|
|
54
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jcicl",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.321",
|
|
5
5
|
"description": "Component library for the websites of Johnson County Iowa",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://devops.jc.net/JCIT/Business%20Solutions%20Delivery/_git/JCComponentLibrary?path=%2FREADME.md&version=GBmaster",
|
package/theme.d.ts
CHANGED