jcicl 0.0.209 → 0.0.213
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/LabeledCurrencyInput/LabeledCurrencyInput.d.ts +11 -0
- package/LabeledCurrencyInput/LabeledCurrencyInput.js +51 -0
- package/LabeledCurrencyInput/index.d.ts +1 -0
- package/LabeledCurrencyInput/index.js +4 -0
- package/LabeledDropdown/LabeledDropdown.d.ts +2 -1
- package/LabeledDropdown/LabeledDropdown.js +358 -324
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputProps } from '../../../../../../../../../src/components/base/Input';
|
|
2
|
+
export interface StyleProps {
|
|
3
|
+
grid?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface LabeledCurrencyInputProps extends InputProps {
|
|
6
|
+
label: string;
|
|
7
|
+
grid?: boolean;
|
|
8
|
+
noLabel?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const LabeledCurrencyInput: React.FC<LabeledCurrencyInputProps>;
|
|
11
|
+
export default LabeledCurrencyInput;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsxs as s, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f } from "react";
|
|
3
|
+
import { n as d } from "../.chunks/emotion-styled.browser.esm.js";
|
|
4
|
+
import { c as g } from "../.chunks/emotion-react.browser.esm.js";
|
|
5
|
+
import { Input as h } from "../Input/Input.js";
|
|
6
|
+
const w = d("div")(({ grid: t }) => ({
|
|
7
|
+
...g`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-wrap: nowrap;
|
|
10
|
+
gap: 9px;
|
|
11
|
+
font-family: 'Roboto', sans-serif;
|
|
12
|
+
|
|
13
|
+
span {
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
font-weight: bold;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.MuiTextField-root {
|
|
19
|
+
flex-grow: 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.MuiCurrencyInputBase-root {
|
|
23
|
+
width: ${t && "100%"};
|
|
24
|
+
}
|
|
25
|
+
`
|
|
26
|
+
})), j = ({
|
|
27
|
+
label: t,
|
|
28
|
+
grid: l = !0,
|
|
29
|
+
noLabel: p = !1,
|
|
30
|
+
onChange: r,
|
|
31
|
+
...u
|
|
32
|
+
}) => {
|
|
33
|
+
const [i, n] = f("");
|
|
34
|
+
return /* @__PURE__ */ s(w, { grid: l, className: "jcLabeledCurrencyInput", children: [
|
|
35
|
+
!p && /* @__PURE__ */ s("span", { children: [
|
|
36
|
+
t,
|
|
37
|
+
":"
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ m(h, { ...u, onChange: (a) => {
|
|
40
|
+
const { value: c } = a.target, e = c.replace(/[^0-9.-]+/g, ""), o = new Intl.NumberFormat("en-US", {
|
|
41
|
+
style: "decimal",
|
|
42
|
+
maximumFractionDigits: 2
|
|
43
|
+
}).format(Number(e) || 0);
|
|
44
|
+
e && e.length > 1 && e[e.length - 1] === "." ? n(o + ".") : n(o), r && r(a);
|
|
45
|
+
}, value: `$${i}` })
|
|
46
|
+
] });
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
j as LabeledCurrencyInput,
|
|
50
|
+
j as default
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type LabeledCurrencyInputProps } from './LabeledCurrencyInput';
|
|
@@ -11,6 +11,7 @@ export type LabeledDropdownProps = {
|
|
|
11
11
|
borderFocusColor?: string;
|
|
12
12
|
minWidth?: string;
|
|
13
13
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
-
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
} & AutocompleteProps<DropdownOption, boolean, boolean, boolean>;
|
|
15
16
|
export declare const LabeledDropdown: React.FC<LabeledDropdownProps>;
|
|
16
17
|
export default LabeledDropdown;
|