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.
@@ -1,7 +1,7 @@
1
1
  import { DropdownOption } from '../../../../../../../../../src/components/composite/LabeledDropdown';
2
2
  export type FormField = {
3
3
  key: string;
4
- label: string;
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[];
@@ -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
- export type AllInputProps = LabeledInputProps & LabeledCheckboxProps & LabeledDropdownProps & LabeledCurrencyInputProps;
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
  };
@@ -1,13 +1,14 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { LabeledInput as t } from "../LabeledInput/LabeledInput.js";
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 n } from "../LabeledCheckbox/LabeledCheckbox.js";
5
- import { LabeledDropdown as d } from "../LabeledDropdown/LabeledDropdown.js";
6
- const l = (r) => {
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__ */ o(d, { ...r }) : e === "checkbox" ? /* @__PURE__ */ o(n, { ...r }) : e === "currency" ? /* @__PURE__ */ o(m, { ...r }) : /* @__PURE__ */ o(t, { ...r, type: e });
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
- l as FormInput,
12
- l as default
12
+ i as FormInput,
13
+ i as default
13
14
  };
@@ -3,7 +3,7 @@ export interface StyleProps {
3
3
  grid?: boolean;
4
4
  }
5
5
  export type LabeledInputProps = InputProps & {
6
- label: string;
6
+ label?: string;
7
7
  grid?: boolean;
8
8
  noLabel?: boolean;
9
9
  limit?: number;
@@ -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.317",
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
@@ -16,6 +16,7 @@ export interface ThemeColors {
16
16
  darkGreenO99: string;
17
17
  darkRed: string;
18
18
  emerald: string;
19
+ formBorder: string;
19
20
  gold: string;
20
21
  goldHover: string;
21
22
  gold2: string;
package/theme.js CHANGED
@@ -21,6 +21,7 @@ const a = {
21
21
  darkGreenO99: "#005c0099",
22
22
  darkRed: "#800000",
23
23
  emerald: "#004d24",
24
+ formBorder: "rgb(114,114,114)",
24
25
  gold: "#fab62d",
25
26
  goldHover: "#e0a022",
26
27
  gold2: "#fcba03",