@dmsi/wedgekit-react 0.0.506 → 0.0.508
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-LJLHGLTS.js → chunk-BMPL6LCR.js} +4 -4
- package/dist/{chunk-D4TFZ2WM.js → chunk-ELXVDRWS.js} +4 -4
- package/dist/{chunk-KSNQFGJE.js → chunk-JWVZOEF5.js} +4 -4
- package/dist/components/Alert.js +2 -2
- package/dist/components/CalendarRange.js +10 -10
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +10 -10
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +10 -10
- package/dist/components/DataGrid/PinnedColumns.js +10 -10
- package/dist/components/DataGrid/TableBody/LoadingCell.js +10 -10
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +10 -10
- package/dist/components/DataGrid/TableBody/index.js +10 -10
- package/dist/components/DataGrid/index.js +10 -10
- package/dist/components/DataGrid/utils.js +10 -10
- package/dist/components/DateInput.js +10 -10
- package/dist/components/DateRangeInput.js +10 -10
- package/dist/components/FilterGroup.js +5 -5
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +10 -10
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +10 -10
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -5
- package/dist/components/MobileDataGrid/index.js +10 -10
- package/dist/components/Modal.js +4 -4
- package/dist/components/ModalButtons.js +2 -2
- package/dist/components/ModalHeader.js +2 -2
- package/dist/components/NavigationTab.js +2 -2
- package/dist/components/NavigationTabs.js +2 -2
- package/dist/components/NestedMenu.js +3 -3
- package/dist/components/Notification.js +3 -3
- package/dist/components/OptionPill.js +2 -2
- package/dist/components/PDFViewer/DownloadIcon.js +2 -2
- package/dist/components/PDFViewer/PDFNavigation.js +2 -2
- package/dist/components/PDFViewer/index.js +6 -6
- package/dist/components/ProductImagePreview/index.js +1 -1
- package/dist/components/Stepper.cjs +23 -5
- package/dist/components/Stepper.js +26 -8
- package/dist/components/Toast.js +3 -3
- package/dist/components/Upload.js +3 -3
- package/dist/components/index.js +16 -16
- package/package.json +1 -1
- package/src/components/Stepper.tsx +27 -3
- package/dist/{chunk-5DQVYX6H.js → chunk-56RPZLV7.js} +3 -3
- package/dist/{chunk-25RZP3VR.js → chunk-AKJUBFJK.js} +3 -3
- package/dist/{chunk-TAPYQBQU.js → chunk-CMMQTIVM.js} +3 -3
- package/dist/{chunk-GYEXSNFP.js → chunk-FWCVZWE6.js} +3 -3
- package/dist/{chunk-MV6W7OMC.js → chunk-QMMPHXVE.js} +3 -3
- package/dist/{chunk-BWBSDSA7.js → chunk-SPJ6V6WJ.js} +3 -3
- package/dist/{chunk-VS53C5ZD.js → chunk-YJGDVWTH.js} +3 -3
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "../chunk-KPBG7D3V.js";
|
|
5
5
|
import "../chunk-HXGJVYGQ.js";
|
|
6
6
|
import "../chunk-5UH6QUFB.js";
|
|
7
|
-
import {
|
|
8
|
-
Button
|
|
9
|
-
} from "../chunk-45AHDOAU.js";
|
|
10
7
|
import "../chunk-WMPWWFUJ.js";
|
|
11
8
|
import {
|
|
12
9
|
Icon
|
|
13
10
|
} from "../chunk-NKUETCDA.js";
|
|
11
|
+
import {
|
|
12
|
+
Button
|
|
13
|
+
} from "../chunk-45AHDOAU.js";
|
|
14
14
|
import {
|
|
15
15
|
componentGap
|
|
16
16
|
} from "../chunk-7KWFEH56.js";
|
|
@@ -32,7 +32,9 @@ var Stepper = (_a) => {
|
|
|
32
32
|
onDecrease,
|
|
33
33
|
onIncrease,
|
|
34
34
|
id,
|
|
35
|
-
testid
|
|
35
|
+
testid,
|
|
36
|
+
min,
|
|
37
|
+
max
|
|
36
38
|
} = _b, props = __objRest(_b, [
|
|
37
39
|
"error",
|
|
38
40
|
"disabled",
|
|
@@ -41,13 +43,21 @@ var Stepper = (_a) => {
|
|
|
41
43
|
"onDecrease",
|
|
42
44
|
"onIncrease",
|
|
43
45
|
"id",
|
|
44
|
-
"testid"
|
|
46
|
+
"testid",
|
|
47
|
+
"min",
|
|
48
|
+
"max"
|
|
45
49
|
]);
|
|
46
50
|
function handleIncrease() {
|
|
51
|
+
if (max != null && value >= max) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
47
54
|
setValue((prevVal) => prevVal + 1);
|
|
48
55
|
onIncrease == null ? void 0 : onIncrease();
|
|
49
56
|
}
|
|
50
57
|
function handleDecrease() {
|
|
58
|
+
if (min != null && value <= min) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
51
61
|
setValue((prevVal) => prevVal - 1);
|
|
52
62
|
onDecrease == null ? void 0 : onDecrease();
|
|
53
63
|
}
|
|
@@ -77,7 +87,7 @@ var Stepper = (_a) => {
|
|
|
77
87
|
}
|
|
78
88
|
),
|
|
79
89
|
onClick: handleDecrease,
|
|
80
|
-
disabled: disabled || value
|
|
90
|
+
disabled: disabled || value <= 0 || min != null && value <= min
|
|
81
91
|
}
|
|
82
92
|
),
|
|
83
93
|
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
@@ -88,7 +98,15 @@ var Stepper = (_a) => {
|
|
|
88
98
|
type: "number",
|
|
89
99
|
align: "center",
|
|
90
100
|
value,
|
|
91
|
-
onChange: (e) =>
|
|
101
|
+
onChange: (e) => {
|
|
102
|
+
const nextValue = +e.target.value;
|
|
103
|
+
const lessThanMinimum = min != null && nextValue < min;
|
|
104
|
+
const greaterThanMaximum = max != null && nextValue > max;
|
|
105
|
+
if (lessThanMinimum || greaterThanMaximum) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
setValue(nextValue);
|
|
109
|
+
},
|
|
92
110
|
error,
|
|
93
111
|
disabled,
|
|
94
112
|
className: "!w-6 !h-4.5 !px-0 disabled:!text-text-on-action-primary-disabled disabled:!bg-background-action-secondary-disabled disabled:!border-border-primary-normal"
|
|
@@ -113,7 +131,7 @@ var Stepper = (_a) => {
|
|
|
113
131
|
}
|
|
114
132
|
),
|
|
115
133
|
onClick: handleIncrease,
|
|
116
|
-
disabled
|
|
134
|
+
disabled: disabled || max != null && value >= max
|
|
117
135
|
}
|
|
118
136
|
)
|
|
119
137
|
]
|
package/dist/components/Toast.js
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Heading3
|
|
4
4
|
} from "../chunk-MXSJF6TW.js";
|
|
5
|
-
import {
|
|
6
|
-
Button
|
|
7
|
-
} from "../chunk-45AHDOAU.js";
|
|
8
5
|
import {
|
|
9
6
|
Paragraph
|
|
10
7
|
} from "../chunk-WMPWWFUJ.js";
|
|
11
8
|
import {
|
|
12
9
|
Icon
|
|
13
10
|
} from "../chunk-NKUETCDA.js";
|
|
11
|
+
import {
|
|
12
|
+
Button
|
|
13
|
+
} from "../chunk-45AHDOAU.js";
|
|
14
14
|
import {
|
|
15
15
|
componentGap,
|
|
16
16
|
componentPadding,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Spinner
|
|
3
3
|
} from "../chunk-SBRRNFOP.js";
|
|
4
|
-
import {
|
|
5
|
-
Button
|
|
6
|
-
} from "../chunk-45AHDOAU.js";
|
|
7
4
|
import {
|
|
8
5
|
Paragraph
|
|
9
6
|
} from "../chunk-WMPWWFUJ.js";
|
|
@@ -13,6 +10,9 @@ import {
|
|
|
13
10
|
import {
|
|
14
11
|
Icon
|
|
15
12
|
} from "../chunk-NKUETCDA.js";
|
|
13
|
+
import {
|
|
14
|
+
Button
|
|
15
|
+
} from "../chunk-45AHDOAU.js";
|
|
16
16
|
import {
|
|
17
17
|
componentGap
|
|
18
18
|
} from "../chunk-7KWFEH56.js";
|
package/dist/components/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
DataGrid,
|
|
3
3
|
DateInput,
|
|
4
4
|
MobileDataGrid
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-JWVZOEF5.js";
|
|
6
6
|
import "../chunk-M7INAUAJ.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-ELXVDRWS.js";
|
|
8
8
|
import "../chunk-3UUCDNX3.js";
|
|
9
9
|
import {
|
|
10
10
|
ProductImagePreview
|
|
@@ -27,9 +27,6 @@ import {
|
|
|
27
27
|
} from "../chunk-MDB26F6T.js";
|
|
28
28
|
import "../chunk-AT4AWD6B.js";
|
|
29
29
|
import "../chunk-EWGHVZL5.js";
|
|
30
|
-
import {
|
|
31
|
-
Select
|
|
32
|
-
} from "../chunk-2TNHD4MQ.js";
|
|
33
30
|
import {
|
|
34
31
|
SimpleTable
|
|
35
32
|
} from "../chunk-OWHPPZZA.js";
|
|
@@ -42,20 +39,20 @@ import {
|
|
|
42
39
|
import {
|
|
43
40
|
Pagination
|
|
44
41
|
} from "../chunk-LB7UT6F3.js";
|
|
45
|
-
import
|
|
42
|
+
import {
|
|
43
|
+
Select
|
|
44
|
+
} from "../chunk-2TNHD4MQ.js";
|
|
45
|
+
import "../chunk-BMPL6LCR.js";
|
|
46
46
|
import "../chunk-4RJKB7LC.js";
|
|
47
|
-
import "../chunk-25RZP3VR.js";
|
|
48
47
|
import "../chunk-WVVEOCEH.js";
|
|
49
|
-
import "../chunk-
|
|
48
|
+
import "../chunk-CMMQTIVM.js";
|
|
50
49
|
import "../chunk-AG43RS4Q.js";
|
|
51
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-AKJUBFJK.js";
|
|
52
51
|
import {
|
|
53
52
|
ListGroup
|
|
54
53
|
} from "../chunk-SUSUNSVZ.js";
|
|
55
|
-
import {
|
|
56
|
-
EmptyCartIcon
|
|
57
|
-
} from "../chunk-75USUR3I.js";
|
|
58
54
|
import "../chunk-Y2GK27RX.js";
|
|
55
|
+
import "../chunk-QVWYTQKL.js";
|
|
59
56
|
import {
|
|
60
57
|
DataCellHeader,
|
|
61
58
|
DataGridCell,
|
|
@@ -79,6 +76,9 @@ import {
|
|
|
79
76
|
Label
|
|
80
77
|
} from "../chunk-HXGJVYGQ.js";
|
|
81
78
|
import "../chunk-WVUIIBRR.js";
|
|
79
|
+
import {
|
|
80
|
+
EmptyCartIcon
|
|
81
|
+
} from "../chunk-75USUR3I.js";
|
|
82
82
|
import "../chunk-PS6UJZVH.js";
|
|
83
83
|
import {
|
|
84
84
|
Checkbox
|
|
@@ -101,11 +101,8 @@ import {
|
|
|
101
101
|
} from "../chunk-KBJZUVLM.js";
|
|
102
102
|
import {
|
|
103
103
|
Alert
|
|
104
|
-
} from "../chunk-
|
|
104
|
+
} from "../chunk-SPJ6V6WJ.js";
|
|
105
105
|
import "../chunk-MXSJF6TW.js";
|
|
106
|
-
import {
|
|
107
|
-
Button
|
|
108
|
-
} from "../chunk-45AHDOAU.js";
|
|
109
106
|
import {
|
|
110
107
|
Paragraph
|
|
111
108
|
} from "../chunk-WMPWWFUJ.js";
|
|
@@ -113,6 +110,9 @@ import "../chunk-TPXH53SA.js";
|
|
|
113
110
|
import {
|
|
114
111
|
Icon
|
|
115
112
|
} from "../chunk-NKUETCDA.js";
|
|
113
|
+
import {
|
|
114
|
+
Button
|
|
115
|
+
} from "../chunk-45AHDOAU.js";
|
|
116
116
|
import "../chunk-7KWFEH56.js";
|
|
117
117
|
import "../chunk-ORMEWXMH.js";
|
|
118
118
|
export {
|
package/package.json
CHANGED
|
@@ -14,6 +14,8 @@ type StepperProps = {
|
|
|
14
14
|
setValue: React.Dispatch<React.SetStateAction<number>>;
|
|
15
15
|
onIncrease?: () => void;
|
|
16
16
|
onDecrease?: () => void;
|
|
17
|
+
min?: number;
|
|
18
|
+
max?: number;
|
|
17
19
|
};
|
|
18
20
|
|
|
19
21
|
export const Stepper = ({
|
|
@@ -25,15 +27,27 @@ export const Stepper = ({
|
|
|
25
27
|
onIncrease,
|
|
26
28
|
id,
|
|
27
29
|
testid,
|
|
30
|
+
min,
|
|
31
|
+
max,
|
|
28
32
|
...props
|
|
29
33
|
}: StepperProps) => {
|
|
30
34
|
function handleIncrease() {
|
|
35
|
+
if (max != null && value >= max) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
setValue((prevVal) => prevVal + 1);
|
|
40
|
+
|
|
32
41
|
onIncrease?.();
|
|
33
42
|
}
|
|
34
43
|
|
|
35
44
|
function handleDecrease() {
|
|
45
|
+
if (min != null && value <= min) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
36
49
|
setValue((prevVal) => prevVal - 1);
|
|
50
|
+
|
|
37
51
|
onDecrease?.();
|
|
38
52
|
}
|
|
39
53
|
|
|
@@ -60,7 +74,7 @@ export const Stepper = ({
|
|
|
60
74
|
</span>
|
|
61
75
|
}
|
|
62
76
|
onClick={handleDecrease}
|
|
63
|
-
disabled={disabled || value
|
|
77
|
+
disabled={disabled || value <= 0 || (min != null && value <= min)}
|
|
64
78
|
/>
|
|
65
79
|
|
|
66
80
|
<div className="flex-1">
|
|
@@ -71,7 +85,17 @@ export const Stepper = ({
|
|
|
71
85
|
type="number"
|
|
72
86
|
align="center"
|
|
73
87
|
value={value}
|
|
74
|
-
onChange={(e) =>
|
|
88
|
+
onChange={(e) => {
|
|
89
|
+
const nextValue = +e.target.value;
|
|
90
|
+
const lessThanMinimum = min != null && nextValue < min;
|
|
91
|
+
const greaterThanMaximum = max != null && nextValue > max;
|
|
92
|
+
|
|
93
|
+
if (lessThanMinimum || greaterThanMaximum) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
setValue(nextValue);
|
|
98
|
+
}}
|
|
75
99
|
error={error}
|
|
76
100
|
disabled={disabled}
|
|
77
101
|
className="!w-6 !h-4.5 !px-0 disabled:!text-text-on-action-primary-disabled disabled:!bg-background-action-secondary-disabled disabled:!border-border-primary-normal"
|
|
@@ -95,7 +119,7 @@ export const Stepper = ({
|
|
|
95
119
|
</span>
|
|
96
120
|
}
|
|
97
121
|
onClick={handleIncrease}
|
|
98
|
-
disabled={disabled}
|
|
122
|
+
disabled={disabled || (max != null && value >= max)}
|
|
99
123
|
/>
|
|
100
124
|
</div>
|
|
101
125
|
);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Heading2
|
|
3
3
|
} from "./chunk-MXSJF6TW.js";
|
|
4
|
-
import {
|
|
5
|
-
Button
|
|
6
|
-
} from "./chunk-45AHDOAU.js";
|
|
7
4
|
import {
|
|
8
5
|
Icon
|
|
9
6
|
} from "./chunk-NKUETCDA.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-45AHDOAU.js";
|
|
10
10
|
import {
|
|
11
11
|
layoutGroupGap,
|
|
12
12
|
layoutPaddding
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Label
|
|
3
3
|
} from "./chunk-HXGJVYGQ.js";
|
|
4
|
-
import {
|
|
5
|
-
Button
|
|
6
|
-
} from "./chunk-45AHDOAU.js";
|
|
7
4
|
import {
|
|
8
5
|
Icon
|
|
9
6
|
} from "./chunk-NKUETCDA.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-45AHDOAU.js";
|
|
10
10
|
import {
|
|
11
11
|
baseTransition,
|
|
12
12
|
componentGap,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Heading2
|
|
3
3
|
} from "./chunk-MXSJF6TW.js";
|
|
4
|
-
import {
|
|
5
|
-
Button
|
|
6
|
-
} from "./chunk-45AHDOAU.js";
|
|
7
4
|
import {
|
|
8
5
|
Paragraph
|
|
9
6
|
} from "./chunk-WMPWWFUJ.js";
|
|
@@ -13,6 +10,9 @@ import {
|
|
|
13
10
|
import {
|
|
14
11
|
Icon
|
|
15
12
|
} from "./chunk-NKUETCDA.js";
|
|
13
|
+
import {
|
|
14
|
+
Button
|
|
15
|
+
} from "./chunk-45AHDOAU.js";
|
|
16
16
|
import {
|
|
17
17
|
__objRest,
|
|
18
18
|
__spreadProps,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Heading3
|
|
3
3
|
} from "./chunk-MXSJF6TW.js";
|
|
4
|
-
import {
|
|
5
|
-
Button
|
|
6
|
-
} from "./chunk-45AHDOAU.js";
|
|
7
4
|
import {
|
|
8
5
|
Paragraph
|
|
9
6
|
} from "./chunk-WMPWWFUJ.js";
|
|
@@ -13,6 +10,9 @@ import {
|
|
|
13
10
|
import {
|
|
14
11
|
Icon
|
|
15
12
|
} from "./chunk-NKUETCDA.js";
|
|
13
|
+
import {
|
|
14
|
+
Button
|
|
15
|
+
} from "./chunk-45AHDOAU.js";
|
|
16
16
|
|
|
17
17
|
// src/components/PDFViewer/PDFNavigation.tsx
|
|
18
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|