jcicl 0.0.177 → 0.0.181

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.
@@ -15,7 +15,7 @@ import { P as t, g as Ue, a as Fe, s as ce, r as Ve, c as Z, u as We, b as _, d
15
15
  import { u as Xe } from "../.chunks/index.js";
16
16
  import { u as Ge, e as Ye, H as _e, a as ke, g as Je, T as Ke, r as Ze, b as me } from "../.chunks/Portal.js";
17
17
  import { m as Ce } from "../.chunks/memoTheme.js";
18
- import { g as qe, o as Te, d as eo, M as oo, P as ro } from "../.chunks/TextField.js";
18
+ import { g as qe, o as Te, d as eo, M as oo, P as ro } from "../.chunks/Select.js";
19
19
  import { i as to } from "../.chunks/useSlot.js";
20
20
  import { c as no } from "../.chunks/chainPropTypes.js";
21
21
  import { a as io, u as ao } from "../.chunks/TransitionGroupContext.js";
@@ -1,7 +1,8 @@
1
1
  import { LabeledInputProps } from '../../../../../../../../../src/components/composite/LabeledInput';
2
- export type AllInputProps = LabeledInputProps;
3
- export interface FormInputProps extends AllInputProps {
2
+ import { LabeledCheckboxProps } from '../../../../../../../../../src/components/composite/LabeledCheckbox';
3
+ export type AllInputProps = LabeledInputProps | LabeledCheckboxProps;
4
+ export type FormInputProps = AllInputProps & {
4
5
  type?: 'text' | 'dropdown' | 'date' | 'number' | 'checkbox' | 'radio' | 'textarea';
5
- }
6
+ };
6
7
  export declare const FormInput: React.FC<LabeledInputProps>;
7
8
  export default FormInput;
@@ -1,10 +1,11 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { LabeledInput as r } from "../LabeledInput/LabeledInput.js";
3
- const p = (t) => {
4
- const { type: e = "text" } = t;
5
- return /* @__PURE__ */ o(r, { ...t, type: e });
3
+ import { LabeledCheckbox as m } from "../LabeledCheckbox/LabeledCheckbox.js";
4
+ const a = (e) => {
5
+ const { type: t = "text" } = e;
6
+ return t === "checkbox" ? /* @__PURE__ */ o(m, { ...e }) : /* @__PURE__ */ o(r, { ...e, type: t });
6
7
  };
7
8
  export {
8
- p as FormInput,
9
- p as default
9
+ a as FormInput,
10
+ a as default
10
11
  };
@@ -1,6 +1,7 @@
1
1
  import { CheckboxProps } from '@mui/material/Checkbox';
2
2
  export type LabeledCheckboxProps = {
3
3
  label: string;
4
+ colon?: boolean;
4
5
  } & CheckboxProps;
5
6
  export declare const LabeledCheckbox: React.FC<LabeledCheckboxProps>;
6
7
  export default LabeledCheckbox;
@@ -2,9 +2,9 @@ import { jsxs as z, jsx as r } from "react/jsx-runtime";
2
2
  import { n as oe } from "../.chunks/emotion-styled.browser.esm.js";
3
3
  import { c as te } from "../.chunks/emotion-react.browser.esm.js";
4
4
  import ae from "../theme.js";
5
- import * as x from "react";
6
- import { g as E, a as q, s as O, r as V, b as U, P as e, c as b, d as H, e as T, u as se } from "../.chunks/DefaultPropsProvider.js";
7
- import { u as ne } from "../.chunks/useFormControl.js";
5
+ import * as v from "react";
6
+ import { g as E, a as q, s as O, r as V, b as U, P as e, c as b, d as H, e as T, u as ne } from "../.chunks/DefaultPropsProvider.js";
7
+ import { u as se } from "../.chunks/useFormControl.js";
8
8
  import { B as re } from "../.chunks/ButtonBase.js";
9
9
  import { u as ce } from "../.chunks/useControlled.js";
10
10
  import { r as D } from "../.chunks/TransitionGroupContext.js";
@@ -20,9 +20,9 @@ const de = (o) => {
20
20
  classes: t,
21
21
  checked: a,
22
22
  disabled: c,
23
- edge: s
23
+ edge: n
24
24
  } = o, l = {
25
- root: ["root", a && "checked", c && "disabled", s && `edge${b(s)}`],
25
+ root: ["root", a && "checked", c && "disabled", n && `edge${b(n)}`],
26
26
  input: ["input"]
27
27
  };
28
28
  return H(l, le, t);
@@ -75,10 +75,10 @@ const de = (o) => {
75
75
  margin: 0,
76
76
  padding: 0,
77
77
  zIndex: 1
78
- }), _ = /* @__PURE__ */ x.forwardRef(function(t, a) {
78
+ }), _ = /* @__PURE__ */ v.forwardRef(function(t, a) {
79
79
  const {
80
80
  autoFocus: c,
81
- checked: s,
81
+ checked: n,
82
82
  checkedIcon: l,
83
83
  className: p,
84
84
  defaultChecked: d,
@@ -91,35 +91,35 @@ const de = (o) => {
91
91
  inputRef: C,
92
92
  name: y,
93
93
  onBlur: f,
94
- onChange: m,
94
+ onChange: h,
95
95
  onFocus: F,
96
96
  readOnly: A,
97
97
  required: G = !1,
98
98
  tabIndex: J,
99
- type: v,
99
+ type: x,
100
100
  value: j,
101
101
  ...K
102
102
  } = t, [$, Q] = ce({
103
- controlled: s,
103
+ controlled: n,
104
104
  default: !!d,
105
105
  name: "SwitchBase",
106
106
  state: "checked"
107
- }), i = ne(), X = (n) => {
108
- F && F(n), i && i.onFocus && i.onFocus(n);
109
- }, Y = (n) => {
110
- f && f(n), i && i.onBlur && i.onBlur(n);
111
- }, Z = (n) => {
112
- if (n.nativeEvent.defaultPrevented)
107
+ }), i = se(), X = (s) => {
108
+ F && F(s), i && i.onFocus && i.onFocus(s);
109
+ }, Y = (s) => {
110
+ f && f(s), i && i.onBlur && i.onBlur(s);
111
+ }, Z = (s) => {
112
+ if (s.nativeEvent.defaultPrevented)
113
113
  return;
114
- const M = n.target.checked;
115
- Q(M), m && m(n, M);
114
+ const M = s.target.checked;
115
+ Q(M), h && h(s, M);
116
116
  };
117
- let h = k;
118
- i && typeof h > "u" && (h = i.disabled);
119
- const ee = v === "checkbox" || v === "radio", R = {
117
+ let m = k;
118
+ i && typeof m > "u" && (m = i.disabled);
119
+ const ee = x === "checkbox" || x === "radio", R = {
120
120
  ...t,
121
121
  checked: $,
122
- disabled: h,
122
+ disabled: m,
123
123
  disableFocusRipple: g,
124
124
  edge: u
125
125
  }, N = de(R);
@@ -128,7 +128,7 @@ const de = (o) => {
128
128
  className: U(N.root, p),
129
129
  centerRipple: !0,
130
130
  focusRipple: !g,
131
- disabled: h,
131
+ disabled: m,
132
132
  tabIndex: null,
133
133
  role: void 0,
134
134
  onFocus: X,
@@ -138,10 +138,10 @@ const de = (o) => {
138
138
  ...K,
139
139
  children: [/* @__PURE__ */ r(ue, {
140
140
  autoFocus: c,
141
- checked: s,
141
+ checked: n,
142
142
  defaultChecked: d,
143
143
  className: N.input,
144
- disabled: h,
144
+ disabled: m,
145
145
  id: ee ? B : void 0,
146
146
  name: y,
147
147
  onChange: Z,
@@ -150,8 +150,8 @@ const de = (o) => {
150
150
  required: G,
151
151
  ownerState: R,
152
152
  tabIndex: J,
153
- type: v,
154
- ...v === "checkbox" && j === void 0 ? {} : {
153
+ type: x,
154
+ ...x === "checkbox" && j === void 0 ? {} : {
155
155
  value: j
156
156
  },
157
157
  ...I
@@ -263,9 +263,9 @@ process.env.NODE_ENV !== "production" && (_.propTypes = {
263
263
  });
264
264
  const fe = P(/* @__PURE__ */ r("path", {
265
265
  d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
266
- }), "CheckBoxOutlineBlank"), me = P(/* @__PURE__ */ r("path", {
266
+ }), "CheckBoxOutlineBlank"), he = P(/* @__PURE__ */ r("path", {
267
267
  d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
268
- }), "CheckBox"), he = P(/* @__PURE__ */ r("path", {
268
+ }), "CheckBox"), me = P(/* @__PURE__ */ r("path", {
269
269
  d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
270
270
  }), "IndeterminateCheckBox");
271
271
  function be(o) {
@@ -276,9 +276,9 @@ const S = q("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "col
276
276
  classes: t,
277
277
  indeterminate: a,
278
278
  color: c,
279
- size: s
279
+ size: n
280
280
  } = o, l = {
281
- root: ["root", a && "indeterminate", `color${b(c)}`, `size${b(s)}`]
281
+ root: ["root", a && "indeterminate", `color${b(c)}`, `size${b(n)}`]
282
282
  }, p = H(l, be, t);
283
283
  return {
284
284
  ...t,
@@ -345,45 +345,45 @@ const S = q("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "col
345
345
  }
346
346
  }
347
347
  }]
348
- }))), Ce = /* @__PURE__ */ r(me, {}), ye = /* @__PURE__ */ r(fe, {}), ve = /* @__PURE__ */ r(he, {}), W = /* @__PURE__ */ x.forwardRef(function(t, a) {
349
- const c = se({
348
+ }))), Ce = /* @__PURE__ */ r(he, {}), ye = /* @__PURE__ */ r(fe, {}), xe = /* @__PURE__ */ r(me, {}), W = /* @__PURE__ */ v.forwardRef(function(t, a) {
349
+ const c = ne({
350
350
  props: t,
351
351
  name: "MuiCheckbox"
352
352
  }), {
353
- checkedIcon: s = Ce,
353
+ checkedIcon: n = Ce,
354
354
  color: l = "primary",
355
355
  icon: p = ye,
356
356
  indeterminate: d = !1,
357
- indeterminateIcon: k = ve,
357
+ indeterminateIcon: k = xe,
358
358
  inputProps: g,
359
359
  size: u = "medium",
360
360
  disableRipple: w = !1,
361
361
  className: B,
362
362
  ...I
363
- } = c, C = d ? k : p, y = d ? k : s, f = {
363
+ } = c, C = d ? k : p, y = d ? k : n, f = {
364
364
  ...c,
365
365
  disableRipple: w,
366
366
  color: l,
367
367
  indeterminate: d,
368
368
  size: u
369
- }, m = ke(f);
369
+ }, h = ke(f);
370
370
  return /* @__PURE__ */ r(ge, {
371
371
  type: "checkbox",
372
372
  inputProps: {
373
373
  "data-indeterminate": d,
374
374
  ...g
375
375
  },
376
- icon: /* @__PURE__ */ x.cloneElement(C, {
376
+ icon: /* @__PURE__ */ v.cloneElement(C, {
377
377
  fontSize: C.props.fontSize ?? u
378
378
  }),
379
- checkedIcon: /* @__PURE__ */ x.cloneElement(y, {
379
+ checkedIcon: /* @__PURE__ */ v.cloneElement(y, {
380
380
  fontSize: y.props.fontSize ?? u
381
381
  }),
382
382
  ownerState: f,
383
383
  ref: a,
384
- className: U(m.root, B),
384
+ className: U(h.root, B),
385
385
  ...I,
386
- classes: m
386
+ classes: h
387
387
  });
388
388
  });
389
389
  process.env.NODE_ENV !== "production" && (W.propTypes = {
@@ -487,34 +487,37 @@ process.env.NODE_ENV !== "production" && (W.propTypes = {
487
487
  */
488
488
  value: e.any
489
489
  });
490
- const xe = oe("div")(() => ({
490
+ const ve = oe("div")(() => ({
491
491
  ...te`
492
492
  display: flex;
493
493
  flex-wrap: nowrap;
494
- align-items: center;
495
- gap: 0.5rem;
494
+ align-items: flex-end;
495
+ gap: 3px;
496
496
  font-family: 'Roboto', sans-serif;
497
497
 
498
498
  .jcCheckboxLabel {
499
499
  white-space: nowrap;
500
500
  font-weight: bold;
501
501
  text-transform: capitalize;
502
+ line-height: 1;
502
503
  }
503
504
 
504
505
  .MuiButtonBase-root {
505
506
  padding: 0;
507
+ width: 19px;
508
+ height: 19px;
506
509
  }
507
510
 
508
511
  .Mui-checked {
509
512
  color: ${ae.colors.green} !important;
510
513
  }
511
514
  `
512
- })), Me = ({ label: o, ...t }) => /* @__PURE__ */ z(xe, { className: "jcLabeledCheckbox", children: [
515
+ })), Me = ({ label: o, colon: t = !0, ...a }) => /* @__PURE__ */ z(ve, { className: "jcLabeledCheckbox", children: [
513
516
  /* @__PURE__ */ z("span", { className: "jcCheckboxLabel", children: [
514
517
  o,
515
- ":"
518
+ t && ":"
516
519
  ] }),
517
- /* @__PURE__ */ r(W, { ...t })
520
+ /* @__PURE__ */ r(W, { ...a })
518
521
  ] });
519
522
  export {
520
523
  Me as LabeledCheckbox,
@@ -0,0 +1,7 @@
1
+ import { SelectProps } from '@mui/material/Select';
2
+ export type LabeledDropdownProps = {
3
+ label: string;
4
+ colon?: boolean;
5
+ } & SelectProps;
6
+ export declare const LabeledDropdown: React.FC<LabeledDropdownProps>;
7
+ export default LabeledDropdown;
@@ -0,0 +1,47 @@
1
+ import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
+ import { n as p } from "../.chunks/emotion-styled.browser.esm.js";
3
+ import { c as s } from "../.chunks/emotion-react.browser.esm.js";
4
+ import i from "../theme.js";
5
+ import { S as n } from "../.chunks/Select.js";
6
+ const l = p("div")(() => ({
7
+ ...s`
8
+ display: flex;
9
+ flex-wrap: nowrap;
10
+ align-items: end;
11
+ gap: 3px;
12
+ font-family: 'Roboto', sans-serif;
13
+
14
+ .jcDropdownLabel {
15
+ white-space: nowrap;
16
+ font-weight: bold;
17
+ text-transform: capitalize;
18
+ }
19
+
20
+ .MuiButtonBase-root {
21
+ padding: 0;
22
+
23
+ input {
24
+ width: 19px;
25
+ height: 19px;
26
+ }
27
+ }
28
+
29
+ .Mui-checked {
30
+ color: ${i.colors.green} !important;
31
+ }
32
+ `
33
+ })), h = ({
34
+ label: e,
35
+ colon: a = !1,
36
+ ...r
37
+ }) => /* @__PURE__ */ o(l, { className: "jcLabeledDropdown", children: [
38
+ /* @__PURE__ */ o("span", { className: "jcDropdownLabel", children: [
39
+ e,
40
+ a && ":"
41
+ ] }),
42
+ /* @__PURE__ */ t(n, { ...r })
43
+ ] });
44
+ export {
45
+ h as LabeledDropdown,
46
+ h as default
47
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+
@@ -2,7 +2,7 @@ import { jsx as re, jsxs as Et } from "react/jsx-runtime";
2
2
  import * as C from "react";
3
3
  import { a as Ht, g as Ut, P as r, d as Ft, s as et, u as qt, c as zt, e as Yt, b as qe } from "../.chunks/DefaultPropsProvider.js";
4
4
  import { u as Xt, a as ze } from "../.chunks/index.js";
5
- import { o as Rt, P as fo, H as Qe, f as uo, a as mo, h as vo, g as ho, G as At, e as go } from "../.chunks/Portal.js";
5
+ import { o as Rt, P as fo, H as Qe, h as uo, a as mo, c as vo, g as ho, G as At, e as go } from "../.chunks/Portal.js";
6
6
  import { m as lt } from "../.chunks/memoTheme.js";
7
7
  import { c as yo } from "../.chunks/chainPropTypes.js";
8
8
  import { r as Gt, u as it, a as Ct, d as Ye, e as Mt, f as bo } from "../.chunks/TransitionGroupContext.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jcicl",
3
3
  "private": false,
4
- "version": "0.0.177",
4
+ "version": "0.0.181",
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",