@dmsi/wedgekit-react 0.0.498 → 0.0.500
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/dist/{chunk-3WCLGTYP.js → chunk-4LBQSSGH.js} +1 -1
- package/dist/{chunk-RQRR4FEF.js → chunk-5MLYAQQO.js} +1 -1
- package/dist/{chunk-44TH3VC7.js → chunk-G4AWTFBQ.js} +15 -6
- package/dist/{chunk-ZKTHUXKS.js → chunk-HIKWIY5Q.js} +1 -1
- package/dist/{chunk-HVNHTM3P.js → chunk-PIBHG6DH.js} +1 -1
- package/dist/{chunk-X67L3NZI.js → chunk-TOKS63IK.js} +5 -3
- package/dist/{chunk-7LKGHCVT.js → chunk-TWDH7ZDS.js} +5 -5
- package/dist/{chunk-G7KIKHER.js → chunk-X4UK7HE2.js} +4 -2
- package/dist/{chunk-4Q7T4GJ2.js → chunk-YD3HWIUJ.js} +1 -1
- package/dist/components/CalendarRange.cjs +20 -10
- package/dist/components/CalendarRange.js +9 -9
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +20 -10
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +9 -9
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +20 -10
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +9 -9
- package/dist/components/DataGrid/PinnedColumns.cjs +20 -10
- package/dist/components/DataGrid/PinnedColumns.js +9 -9
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +20 -10
- package/dist/components/DataGrid/TableBody/LoadingCell.js +9 -9
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +20 -10
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +9 -9
- package/dist/components/DataGrid/TableBody/index.cjs +20 -10
- package/dist/components/DataGrid/TableBody/index.js +9 -9
- package/dist/components/DataGrid/index.cjs +20 -10
- package/dist/components/DataGrid/index.js +9 -9
- package/dist/components/DataGrid/utils.cjs +20 -10
- package/dist/components/DataGrid/utils.js +9 -9
- package/dist/components/DataGridCell.cjs +12 -6
- package/dist/components/DataGridCell.js +3 -3
- package/dist/components/DateInput.cjs +102 -92
- package/dist/components/DateInput.js +9 -9
- package/dist/components/DateRangeInput.cjs +102 -92
- package/dist/components/DateRangeInput.js +9 -9
- package/dist/components/FilterGroup.cjs +12 -6
- package/dist/components/FilterGroup.js +2 -2
- package/dist/components/Input.cjs +94 -35
- package/dist/components/Input.js +2 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +20 -10
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +9 -9
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +20 -10
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +9 -9
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +8 -4
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +3 -3
- package/dist/components/MobileDataGrid/index.cjs +20 -10
- package/dist/components/MobileDataGrid/index.js +9 -9
- package/dist/components/Modal.cjs +8 -4
- package/dist/components/Modal.js +2 -2
- package/dist/components/ModalHeader.cjs +4 -2
- package/dist/components/ModalHeader.js +1 -1
- package/dist/components/PDFViewer/index.cjs +8 -4
- package/dist/components/PDFViewer/index.js +3 -3
- package/dist/components/Password.cjs +99 -40
- package/dist/components/Password.js +2 -1
- package/dist/components/Search.cjs +97 -38
- package/dist/components/Search.js +3 -2
- package/dist/components/Select.cjs +102 -43
- package/dist/components/Select.js +3 -2
- package/dist/components/Stepper.cjs +107 -48
- package/dist/components/Stepper.js +2 -1
- package/dist/components/Time.cjs +114 -55
- package/dist/components/Time.js +2 -1
- package/dist/components/index.cjs +20 -10
- package/dist/components/index.js +9 -9
- package/package.json +1 -1
- package/src/components/Input.tsx +10 -4
- package/src/components/Modal.tsx +3 -0
- package/src/components/ModalHeader.tsx +6 -2
package/src/components/Input.tsx
CHANGED
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
formatCurrencyDisplay,
|
|
26
26
|
} from "../utils/formatting";
|
|
27
27
|
import { TextAlign } from "../types";
|
|
28
|
+
import { Paragraph } from "./Paragraph";
|
|
28
29
|
|
|
29
30
|
export type InputVariant =
|
|
30
31
|
| "default"
|
|
@@ -46,6 +47,7 @@ export type InputBaseProps = {
|
|
|
46
47
|
testid?: string;
|
|
47
48
|
after?: ReactNode;
|
|
48
49
|
before?: ReactNode;
|
|
50
|
+
rightAdornment?: ReactNode;
|
|
49
51
|
label?: string;
|
|
50
52
|
error?: boolean;
|
|
51
53
|
align?: TextAlign;
|
|
@@ -69,6 +71,7 @@ export const InputBase = ({
|
|
|
69
71
|
testid,
|
|
70
72
|
before,
|
|
71
73
|
after,
|
|
74
|
+
rightAdornment,
|
|
72
75
|
type,
|
|
73
76
|
label,
|
|
74
77
|
error,
|
|
@@ -226,6 +229,7 @@ export const InputBase = ({
|
|
|
226
229
|
) : (
|
|
227
230
|
after
|
|
228
231
|
)}
|
|
232
|
+
{rightAdornment}
|
|
229
233
|
</div>
|
|
230
234
|
|
|
231
235
|
{caption && (
|
|
@@ -251,6 +255,7 @@ export const Input = ({
|
|
|
251
255
|
onClear,
|
|
252
256
|
id,
|
|
253
257
|
testid,
|
|
258
|
+
rightAdornment,
|
|
254
259
|
...props
|
|
255
260
|
}: Omit<ComponentProps<"input">, "onChange" | "align" | "children"> &
|
|
256
261
|
InputBaseProps & {
|
|
@@ -281,7 +286,7 @@ export const Input = ({
|
|
|
281
286
|
|
|
282
287
|
setInternalValue(formatted);
|
|
283
288
|
setDisplayValue(formatCurrencyDisplay(formatted));
|
|
284
|
-
}, []);
|
|
289
|
+
}, [variant, propValue, decimals]);
|
|
285
290
|
|
|
286
291
|
const getInputProps = () => {
|
|
287
292
|
const baseProps = {
|
|
@@ -369,9 +374,9 @@ export const Input = ({
|
|
|
369
374
|
|
|
370
375
|
case "uom":
|
|
371
376
|
return uom ? (
|
|
372
|
-
<
|
|
373
|
-
{uom.
|
|
374
|
-
</
|
|
377
|
+
<Paragraph color="text-secondary-normal">
|
|
378
|
+
{uom.toUpperCase()}
|
|
379
|
+
</Paragraph>
|
|
375
380
|
) : null;
|
|
376
381
|
|
|
377
382
|
case "percentage":
|
|
@@ -487,6 +492,7 @@ export const Input = ({
|
|
|
487
492
|
onChange={handleChange}
|
|
488
493
|
onBlur={handleBlur}
|
|
489
494
|
testid={testid}
|
|
495
|
+
rightAdornment={rightAdornment}
|
|
490
496
|
/>
|
|
491
497
|
);
|
|
492
498
|
};
|
package/src/components/Modal.tsx
CHANGED
|
@@ -32,6 +32,7 @@ type ModalProps = PropsWithChildren<{
|
|
|
32
32
|
backgroundColor?: string; // full twcss color with bg- prefix
|
|
33
33
|
noWrapper?: boolean;
|
|
34
34
|
customFooter?: boolean;
|
|
35
|
+
titleAs?: React.ComponentType<{ children: React.ReactNode }>;
|
|
35
36
|
}>;
|
|
36
37
|
|
|
37
38
|
const fadeInScale = (element: HTMLElement, duration = 300) =>
|
|
@@ -131,6 +132,7 @@ export const Modal = ({
|
|
|
131
132
|
headerClassname,
|
|
132
133
|
customFooter,
|
|
133
134
|
noWrapper,
|
|
135
|
+
titleAs: TitleComponent,
|
|
134
136
|
}: ModalProps) => {
|
|
135
137
|
const mounted = useMounted();
|
|
136
138
|
|
|
@@ -275,6 +277,7 @@ export const Modal = ({
|
|
|
275
277
|
headerIcon={headerIcon}
|
|
276
278
|
headerIconAlign={headerIconAlign}
|
|
277
279
|
headerClassname={headerClassname}
|
|
280
|
+
titleAs={TitleComponent}
|
|
278
281
|
/>
|
|
279
282
|
{children && (size !== "screen" || noWrapper) ? (
|
|
280
283
|
<ModalContent
|
|
@@ -14,6 +14,7 @@ type ModalHeaderProps = {
|
|
|
14
14
|
id?: string;
|
|
15
15
|
testid?: string;
|
|
16
16
|
headerClassname?: string;
|
|
17
|
+
titleAs?: React.ComponentType<{ children: React.ReactNode }>;
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export const ModalHeader = ({
|
|
@@ -25,7 +26,10 @@ export const ModalHeader = ({
|
|
|
25
26
|
id,
|
|
26
27
|
testid,
|
|
27
28
|
headerClassname,
|
|
29
|
+
titleAs: TitleComponent,
|
|
28
30
|
}: ModalHeaderProps) => {
|
|
31
|
+
const Title = TitleComponent || Heading2;
|
|
32
|
+
|
|
29
33
|
return (
|
|
30
34
|
<div
|
|
31
35
|
id={id}
|
|
@@ -43,13 +47,13 @@ export const ModalHeader = ({
|
|
|
43
47
|
<div className={clsx("flex items-center flex-1", layoutGroupGap)}>
|
|
44
48
|
{headerIcon}
|
|
45
49
|
{title && (
|
|
46
|
-
<
|
|
50
|
+
<Title
|
|
47
51
|
id={id ? `${id}-title` : undefined}
|
|
48
52
|
testid={testid ? `${testid}-title` : undefined}
|
|
49
53
|
as="p"
|
|
50
54
|
>
|
|
51
55
|
{title}
|
|
52
|
-
</
|
|
56
|
+
</Title>
|
|
53
57
|
)}
|
|
54
58
|
</div>
|
|
55
59
|
|