@dmsi/wedgekit-react 2.0.2 → 2.1.1
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/components/Button.d.ts +5 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/DateInput.d.ts.map +1 -1
- package/dist/components/DateInput.js +154 -121
- package/dist/components/Link.d.ts +2 -1
- package/dist/components/Link.d.ts.map +1 -1
- package/dist/components/Link.js +40 -35
- package/dist/components/MainBar.d.ts +3 -1
- package/dist/components/MainBar.d.ts.map +1 -1
- package/dist/components/MainBar.js +19 -18
- package/dist/components/MobileDataGrid/index.d.ts +2 -0
- package/dist/components/MobileDataGrid/index.d.ts.map +1 -1
- package/dist/components/MobileDataGrid/index.js +35 -34
- package/dist/components/MobileNavMenu.d.ts.map +1 -1
- package/dist/components/MobileNavMenu.js +45 -44
- package/dist/components/Stack.d.ts +1 -1
- package/dist/components/Stack.d.ts.map +1 -1
- package/dist/components/Stack.js +73 -73
- package/dist/components/Stepper.d.ts +11 -3
- package/dist/components/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper.js +117 -82
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +130 -128
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,78 +1,79 @@
|
|
|
1
1
|
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { MobileDataGridHeader as
|
|
3
|
-
import { GridContextProvider as
|
|
4
|
-
import { RowDetailModalProvider as
|
|
5
|
-
import { ColumnList as
|
|
6
|
-
import { Stack as
|
|
7
|
-
function
|
|
2
|
+
import { MobileDataGridHeader as y } from "./MobileDataGridHeader.js";
|
|
3
|
+
import { GridContextProvider as D } from "./GridContextProvider/index.js";
|
|
4
|
+
import { RowDetailModalProvider as G } from "./RowDetailModalProvider/index.js";
|
|
5
|
+
import { ColumnList as M } from "./ColumnList.js";
|
|
6
|
+
import { Stack as R } from "../Stack.js";
|
|
7
|
+
function P(i) {
|
|
8
8
|
const {
|
|
9
9
|
columns: t,
|
|
10
10
|
data: d,
|
|
11
11
|
renderLink: n,
|
|
12
12
|
renderChevron: l,
|
|
13
|
-
getId:
|
|
14
|
-
id:
|
|
15
|
-
testid:
|
|
16
|
-
enableColumnSelector:
|
|
13
|
+
getId: a,
|
|
14
|
+
id: m,
|
|
15
|
+
testid: s,
|
|
16
|
+
enableColumnSelector: c,
|
|
17
17
|
enableRowSelection: e,
|
|
18
|
-
header:
|
|
19
|
-
withBorder:
|
|
20
|
-
footer:
|
|
18
|
+
header: f,
|
|
19
|
+
withBorder: h = !0,
|
|
20
|
+
footer: u,
|
|
21
21
|
onRowSelect: p,
|
|
22
|
-
numberOfColumnsToShow:
|
|
23
|
-
primaryKey:
|
|
24
|
-
hideHeader:
|
|
22
|
+
numberOfColumnsToShow: v,
|
|
23
|
+
primaryKey: w,
|
|
24
|
+
hideHeader: b,
|
|
25
25
|
rowActions: C,
|
|
26
|
-
rounded: S = !0
|
|
26
|
+
rounded: S = !0,
|
|
27
|
+
reserveFooterSpace: x = !1
|
|
27
28
|
} = i;
|
|
28
29
|
return /* @__PURE__ */ o(
|
|
29
|
-
|
|
30
|
+
D,
|
|
30
31
|
{
|
|
31
32
|
initialColumns: t,
|
|
32
|
-
id:
|
|
33
|
-
testid:
|
|
33
|
+
id: m,
|
|
34
|
+
testid: s,
|
|
34
35
|
data: d,
|
|
35
|
-
getId:
|
|
36
|
+
getId: a,
|
|
36
37
|
onRowSelect: p,
|
|
37
|
-
numberOfColumnsToShow:
|
|
38
|
-
primaryKey:
|
|
38
|
+
numberOfColumnsToShow: v,
|
|
39
|
+
primaryKey: w,
|
|
39
40
|
children: [
|
|
40
41
|
/* @__PURE__ */ o(
|
|
41
|
-
|
|
42
|
+
R,
|
|
42
43
|
{
|
|
43
|
-
height: "full",
|
|
44
|
+
height: x ? "calc(100dvh - 40dvh)" : "full",
|
|
44
45
|
rounded: S,
|
|
45
46
|
overflowX: "hidden",
|
|
46
47
|
overflowY: "hidden",
|
|
47
|
-
className:
|
|
48
|
+
className: h ? "border border-border-primary-normal" : void 0,
|
|
48
49
|
children: [
|
|
49
|
-
!
|
|
50
|
-
|
|
50
|
+
!b && /* @__PURE__ */ r(
|
|
51
|
+
y,
|
|
51
52
|
{
|
|
52
|
-
header:
|
|
53
|
-
enableColumnSelector:
|
|
53
|
+
header: f,
|
|
54
|
+
enableColumnSelector: c,
|
|
54
55
|
enableRowSelection: e
|
|
55
56
|
}
|
|
56
57
|
),
|
|
57
58
|
/* @__PURE__ */ r(
|
|
58
|
-
|
|
59
|
+
M,
|
|
59
60
|
{
|
|
60
61
|
withBorder: !1,
|
|
61
62
|
renderLink: n,
|
|
62
63
|
renderChevron: l,
|
|
63
64
|
enableRowSelection: e,
|
|
64
|
-
footer:
|
|
65
|
+
footer: u,
|
|
65
66
|
rowActions: C
|
|
66
67
|
}
|
|
67
68
|
)
|
|
68
69
|
]
|
|
69
70
|
}
|
|
70
71
|
),
|
|
71
|
-
/* @__PURE__ */ r(
|
|
72
|
+
/* @__PURE__ */ r(G, {})
|
|
72
73
|
]
|
|
73
74
|
}
|
|
74
75
|
);
|
|
75
76
|
}
|
|
76
77
|
export {
|
|
77
|
-
|
|
78
|
+
P as MobileDataGrid
|
|
78
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileNavMenu.d.ts","sourceRoot":"","sources":["../../src/components/MobileNavMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAc,eAAe,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAYlF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,EAAE,eAAe,CAAC;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,OAA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AC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,qBAAqB,CAAC;CAC5C,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,EAAE,EACF,MAAM,EACN,WAAW,EACX,IAAI,EACJ,OAAO,EACP,UAAU,EACV,SAAkB,EAClB,MAAM,EACN,mBAA2B,EAC3B,KAAe,EACf,kBAAkB,GACnB,EAAE,kBAAkB,sCA6MpB"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as a, Fragment as
|
|
3
|
-
import { useState as g, useRef as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { NestedMenu as
|
|
6
|
-
import { MenuOption as
|
|
2
|
+
import { jsxs as a, Fragment as $, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { useState as g, useRef as I, useLayoutEffect as j, useEffect as w } from "react";
|
|
4
|
+
import { createPortal as A } from "react-dom";
|
|
5
|
+
import { NestedMenu as D } from "./NestedMenu.js";
|
|
6
|
+
import { MenuOption as H } from "./MenuOption.js";
|
|
7
7
|
import { Icon as m } from "./Icon.js";
|
|
8
8
|
import { Stack as k } from "./Stack.js";
|
|
9
|
-
import { Button as
|
|
10
|
-
import { Heading1 as
|
|
11
|
-
import { Theme as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
9
|
+
import { Button as L } from "./Button.js";
|
|
10
|
+
import { Heading1 as R } from "./Heading.js";
|
|
11
|
+
import { Theme as X } from "./Theme.js";
|
|
12
|
+
import { useMatchesMobile as Y } from "../hooks/useMatchesMedia.js";
|
|
13
|
+
import { useMounted as K } from "../hooks/useMounted.js";
|
|
14
|
+
import { useKeydown as O } from "../hooks/useKeydown.js";
|
|
15
|
+
import { findDocumentRoot as T } from "../utils.js";
|
|
15
16
|
import { clsx as v } from "../node_modules/clsx/dist/clsx.js";
|
|
16
|
-
function
|
|
17
|
+
function re({
|
|
17
18
|
id: c,
|
|
18
|
-
testid:
|
|
19
|
+
testid: n,
|
|
19
20
|
currentMenu: i,
|
|
20
21
|
open: r,
|
|
21
22
|
onClose: l,
|
|
@@ -23,17 +24,17 @@ function te({
|
|
|
23
24
|
direction: b = "left",
|
|
24
25
|
footer: E,
|
|
25
26
|
hideFooterOnSubMenu: x = !1,
|
|
26
|
-
theme:
|
|
27
|
-
pinnedSubMenuEntry:
|
|
27
|
+
theme: M = "brand",
|
|
28
|
+
pinnedSubMenuEntry: C
|
|
28
29
|
}) {
|
|
29
30
|
const [s, d] = g(
|
|
30
31
|
null
|
|
31
|
-
), [
|
|
32
|
+
), [p, u] = g(0), z = K(), S = Y(), y = I(null), N = {
|
|
32
33
|
transform: r ? "translateX(0)" : b === "right" ? "translateX(100%)" : "translateX(-100%)"
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
+
j(() => {
|
|
35
36
|
r && (d(null), u(0));
|
|
36
|
-
}, [r]),
|
|
37
|
+
}, [r]), O(
|
|
37
38
|
{
|
|
38
39
|
ArrowUp: () => {
|
|
39
40
|
const e = i.subEntries?.length || 0;
|
|
@@ -44,7 +45,7 @@ function te({
|
|
|
44
45
|
e !== 0 && u((t) => t >= e - 1 ? 0 : t + 1);
|
|
45
46
|
},
|
|
46
47
|
"Enter/Space": () => {
|
|
47
|
-
const e = (i.subEntries || [])[
|
|
48
|
+
const e = (i.subEntries || [])[p];
|
|
48
49
|
e && f(
|
|
49
50
|
e,
|
|
50
51
|
e.subEntries?.length ? "subEntry" : e.onClick ? "onClick" : void 0
|
|
@@ -79,9 +80,9 @@ function te({
|
|
|
79
80
|
}
|
|
80
81
|
e.url && (h?.(e), l());
|
|
81
82
|
}
|
|
82
|
-
return z ?
|
|
83
|
-
/* @__PURE__ */ a(
|
|
84
|
-
/* @__PURE__ */
|
|
83
|
+
return !z || !S ? null : A(
|
|
84
|
+
/* @__PURE__ */ a($, { children: [
|
|
85
|
+
/* @__PURE__ */ o(
|
|
85
86
|
"div",
|
|
86
87
|
{
|
|
87
88
|
className: v(
|
|
@@ -97,8 +98,8 @@ function te({
|
|
|
97
98
|
"div",
|
|
98
99
|
{
|
|
99
100
|
id: c,
|
|
100
|
-
"data-testid":
|
|
101
|
-
ref:
|
|
101
|
+
"data-testid": n,
|
|
102
|
+
ref: y,
|
|
102
103
|
role: "dialog",
|
|
103
104
|
"aria-modal": "true",
|
|
104
105
|
className: v(
|
|
@@ -107,9 +108,9 @@ function te({
|
|
|
107
108
|
"transition-transform duration-300 ease-in-out",
|
|
108
109
|
b === "right" ? "right-0" : "left-0"
|
|
109
110
|
),
|
|
110
|
-
style:
|
|
111
|
+
style: N,
|
|
111
112
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ o(X, { theme: M, children: /* @__PURE__ */ a(
|
|
113
114
|
k,
|
|
114
115
|
{
|
|
115
116
|
horizontal: !0,
|
|
@@ -120,14 +121,14 @@ function te({
|
|
|
120
121
|
justify: "between",
|
|
121
122
|
backgroundColor: "background-primary-normal",
|
|
122
123
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
|
|
124
|
+
/* @__PURE__ */ o(R, { color: "text-primary-normal", children: s?.label ?? i.label }),
|
|
125
|
+
/* @__PURE__ */ o(
|
|
126
|
+
L,
|
|
126
127
|
{
|
|
127
128
|
id: c ? `${c}-close-button` : void 0,
|
|
128
|
-
testid:
|
|
129
|
+
testid: n ? `${n}-close-button` : void 0,
|
|
129
130
|
iconOnly: !0,
|
|
130
|
-
leftIcon: /* @__PURE__ */
|
|
131
|
+
leftIcon: /* @__PURE__ */ o(m, { className: "icon", name: "close", size: 24 }),
|
|
131
132
|
variant: "tertiary",
|
|
132
133
|
onClick: l
|
|
133
134
|
}
|
|
@@ -136,25 +137,25 @@ function te({
|
|
|
136
137
|
}
|
|
137
138
|
) }),
|
|
138
139
|
/* @__PURE__ */ a(k, { justify: "between", overflowY: "auto", grow: !0, children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
|
|
140
|
+
/* @__PURE__ */ o("div", { className: "my-4", children: s ? /* @__PURE__ */ o(
|
|
141
|
+
D,
|
|
141
142
|
{
|
|
142
|
-
testid:
|
|
143
|
+
testid: n ? `${n}-nested-menu` : void 0,
|
|
143
144
|
currentMenu: s,
|
|
144
145
|
onMenuClick: f,
|
|
145
|
-
pinnedEntry:
|
|
146
|
+
pinnedEntry: C
|
|
146
147
|
}
|
|
147
|
-
) : (i.subEntries ?? []).map((e, t) => /* @__PURE__ */
|
|
148
|
-
|
|
148
|
+
) : (i.subEntries ?? []).map((e, t) => /* @__PURE__ */ o(
|
|
149
|
+
H,
|
|
149
150
|
{
|
|
150
|
-
testid:
|
|
151
|
-
selected:
|
|
151
|
+
testid: n ? `${n}-${e.id}` : void 0,
|
|
152
|
+
selected: p === t,
|
|
152
153
|
onClick: () => f(
|
|
153
154
|
e,
|
|
154
155
|
e.subEntries?.length ? "subEntry" : e.onClick ? "onClick" : void 0
|
|
155
156
|
),
|
|
156
|
-
before: e.icon ? /* @__PURE__ */
|
|
157
|
-
after: e.subEntries?.length ? /* @__PURE__ */
|
|
157
|
+
before: e.icon ? /* @__PURE__ */ o(m, { name: e.icon }) : void 0,
|
|
158
|
+
after: e.subEntries?.length ? /* @__PURE__ */ o(m, { name: "chevron_right", className: "icon", size: 24 }) : void 0,
|
|
158
159
|
children: e.label
|
|
159
160
|
},
|
|
160
161
|
e.id
|
|
@@ -165,9 +166,9 @@ function te({
|
|
|
165
166
|
}
|
|
166
167
|
)
|
|
167
168
|
] }),
|
|
168
|
-
|
|
169
|
-
)
|
|
169
|
+
T(y.current)
|
|
170
|
+
);
|
|
170
171
|
}
|
|
171
172
|
export {
|
|
172
|
-
|
|
173
|
+
re as MobileNavMenu
|
|
173
174
|
};
|
|
@@ -23,7 +23,7 @@ type StackProps = {
|
|
|
23
23
|
width?: number | "full" | "fit" | "max";
|
|
24
24
|
maxWidth?: number | string;
|
|
25
25
|
minWidth?: number;
|
|
26
|
-
height?: string | number | "full";
|
|
26
|
+
height?: string | number | "full" | "fit" | "screen";
|
|
27
27
|
minHeight?: number | string;
|
|
28
28
|
maxHeight?: number | string;
|
|
29
29
|
borderColor?: BorderColorTokens;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../src/components/Stack.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,MAAM,EACP,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtD,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,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AM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;CACpC;AAgCD,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,KAAK,EACL,OAAO,EACP,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,UAAU,EACV,WAAW,EACX,YAAY,EACZ,MAAM,EACN,OAAO,EACP,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,SAAa,EACb,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,MAAe,EACf,SAAqB,EACrB,SAAqB,EACrB,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,EAAE,EACF,KAAK,EACL,SAAS,EACT,YAAY,EACZ,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,WAAW,EACX,GAAG,KAAK,EACT,EAAE,UAAU,2CA4MZ"}
|
package/dist/components/Stack.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as z } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as f } from "../node_modules/clsx/dist/clsx.js";
|
|
3
3
|
import { paddingYUsingLayoutGroupGap as oo } from "../classNames.js";
|
|
4
|
-
const po = ({ items: p, justify: a, grow:
|
|
4
|
+
const po = ({ items: p, justify: a, grow: b }) => f(
|
|
5
5
|
"flex",
|
|
6
6
|
p === "start" && "items-start",
|
|
7
|
-
|
|
7
|
+
b && "grow",
|
|
8
8
|
p === "start" && "items-start",
|
|
9
9
|
p === "center" && "items-center",
|
|
10
10
|
p === "end" && "items-end",
|
|
@@ -24,31 +24,31 @@ const po = ({ items: p, justify: a, grow: y }) => f(
|
|
|
24
24
|
function no({
|
|
25
25
|
children: p,
|
|
26
26
|
items: a,
|
|
27
|
-
justify:
|
|
27
|
+
justify: b,
|
|
28
28
|
grow: K,
|
|
29
|
-
padding:
|
|
30
|
-
paddingX:
|
|
31
|
-
paddingY:
|
|
32
|
-
paddingBottom:
|
|
33
|
-
paddingTop:
|
|
29
|
+
padding: c,
|
|
30
|
+
paddingX: n,
|
|
31
|
+
paddingY: m,
|
|
32
|
+
paddingBottom: l,
|
|
33
|
+
paddingTop: r,
|
|
34
34
|
paddingLeft: i,
|
|
35
|
-
paddingRight:
|
|
35
|
+
paddingRight: s,
|
|
36
36
|
margin: M,
|
|
37
37
|
marginX: O,
|
|
38
38
|
marginY: P,
|
|
39
39
|
horizontal: Q,
|
|
40
40
|
horizontalMobile: V,
|
|
41
|
-
elevation:
|
|
41
|
+
elevation: u = 0,
|
|
42
42
|
rounded: Z,
|
|
43
43
|
centered: _,
|
|
44
|
-
width:
|
|
45
|
-
minHeight:
|
|
46
|
-
maxWidth:
|
|
44
|
+
width: e,
|
|
45
|
+
minHeight: k,
|
|
46
|
+
maxWidth: g,
|
|
47
47
|
minWidth: $,
|
|
48
|
-
height:
|
|
49
|
-
maxHeight:
|
|
50
|
-
borderColor:
|
|
51
|
-
borderTopColor:
|
|
48
|
+
height: d,
|
|
49
|
+
maxHeight: y,
|
|
50
|
+
borderColor: N,
|
|
51
|
+
borderTopColor: w,
|
|
52
52
|
borderRightColor: I,
|
|
53
53
|
borderBottomColor: G,
|
|
54
54
|
borderLeftColor: j,
|
|
@@ -61,34 +61,34 @@ function no({
|
|
|
61
61
|
position: q,
|
|
62
62
|
top: A,
|
|
63
63
|
left: D,
|
|
64
|
-
id:
|
|
65
|
-
noGap:
|
|
66
|
-
marginTop:
|
|
67
|
-
marginBottom:
|
|
68
|
-
testid:
|
|
64
|
+
id: B,
|
|
65
|
+
noGap: C,
|
|
66
|
+
marginTop: W,
|
|
67
|
+
marginBottom: H,
|
|
68
|
+
testid: L,
|
|
69
69
|
bottom: E,
|
|
70
70
|
zIndex: J,
|
|
71
|
-
flexWrap:
|
|
72
|
-
className:
|
|
73
|
-
unclipEdges:
|
|
71
|
+
flexWrap: R,
|
|
72
|
+
className: T,
|
|
73
|
+
unclipEdges: Y,
|
|
74
74
|
...t
|
|
75
75
|
}) {
|
|
76
|
-
const
|
|
76
|
+
const X = po({ items: a, justify: b, grow: K }), h = to(o);
|
|
77
77
|
return /* @__PURE__ */ z(
|
|
78
78
|
"div",
|
|
79
79
|
{
|
|
80
|
-
id:
|
|
81
|
-
"data-testid":
|
|
80
|
+
id: B,
|
|
81
|
+
"data-testid": L,
|
|
82
82
|
...t,
|
|
83
83
|
style: {
|
|
84
|
-
height:
|
|
85
|
-
maxHeight:
|
|
86
|
-
maxWidth:
|
|
87
|
-
minHeight:
|
|
88
|
-
width:
|
|
84
|
+
height: d === "screen" ? "100vh" : d === "full" ? "100%" : d === "fit" ? "fit-content" : d !== void 0 ? isNaN(+d) ? d : `${d}px` : void 0,
|
|
85
|
+
maxHeight: y !== void 0 ? isNaN(+y) ? y : `${y}px` : t.style?.maxHeight,
|
|
86
|
+
maxWidth: g !== void 0 ? isNaN(+g) ? g : `${g}px` : t.style?.maxWidth,
|
|
87
|
+
minHeight: k !== void 0 ? isNaN(+k) ? k : `${k}px` : t.style?.minHeight,
|
|
88
|
+
width: e !== void 0 && typeof e == "number" ? `${e}px` : void 0,
|
|
89
89
|
minWidth: $ !== void 0 ? `${$}px` : void 0,
|
|
90
|
-
border:
|
|
91
|
-
borderTop:
|
|
90
|
+
border: N ? `1px solid var(--color-${N})` : void 0,
|
|
91
|
+
borderTop: w ? `1px solid var(--color-${w})` : void 0,
|
|
92
92
|
borderRight: I ? `1px solid var(--color-${I})` : void 0,
|
|
93
93
|
borderBottom: G ? `1px solid var(--color-${G})` : void 0,
|
|
94
94
|
borderLeft: j ? `1px solid var(--color-${j})` : void 0,
|
|
@@ -102,7 +102,7 @@ function no({
|
|
|
102
102
|
borderBlock: t.style?.borderBlock,
|
|
103
103
|
marginInline: t.style?.marginInline,
|
|
104
104
|
zIndex: J !== void 0 ? J : void 0,
|
|
105
|
-
flexWrap:
|
|
105
|
+
flexWrap: R,
|
|
106
106
|
paddingInline: t.style?.paddingInline,
|
|
107
107
|
gap: t.style?.gap,
|
|
108
108
|
...t.style
|
|
@@ -110,9 +110,9 @@ function no({
|
|
|
110
110
|
className: f(
|
|
111
111
|
"scrollbar-thin",
|
|
112
112
|
"max-w-screen",
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
e !== "fit" && "w-full",
|
|
114
|
+
e === "full" && "w-full",
|
|
115
|
+
e === "max" && "w-max",
|
|
116
116
|
_ && "mx-auto",
|
|
117
117
|
x == "auto" && "overflow-y-auto",
|
|
118
118
|
x == "hidden" && "overflow-y-hidden",
|
|
@@ -120,50 +120,50 @@ function no({
|
|
|
120
120
|
v == "auto" && "overflow-x-auto",
|
|
121
121
|
v == "hidden" && "overflow-x-hidden",
|
|
122
122
|
v == "scroll" && "overflow-x-scroll",
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
123
|
+
c && o === "container" && "p-mobile-container-padding desktop:p-desktop-container-padding compact:p-desktop-compact-container-padding",
|
|
124
|
+
c && o === "layout" && "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding",
|
|
125
|
+
c && o === "layout-group" && "p-mobile-layout-group-padding desktop:p-desktop-layout-group-padding compact:p-desktop-compact-layout-group-padding",
|
|
126
|
+
c && o === "component" && "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding",
|
|
127
|
+
n && o === "container" && "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding",
|
|
128
|
+
n && o === "layout" && "px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding",
|
|
129
|
+
n && o === "layout-group" && "px-mobile-layout-group-padding desktop:px-desktop-layout-group-padding compact:px-desktop-compact-layout-group-padding",
|
|
130
|
+
n && o === "component" && "px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding",
|
|
131
|
+
m && o === "container" && "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding",
|
|
132
|
+
m && o === "layout" && "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
|
|
133
|
+
m && o === "layout-group" && oo,
|
|
134
|
+
m && o === "component" && "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding",
|
|
135
|
+
l && o === "container" && "pb-mobile-container-padding desktop:pb-desktop-container-padding compact:pb-desktop-compact-container-padding",
|
|
136
|
+
l && o === "layout" && "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding",
|
|
137
|
+
l && o === "layout-group" && "pb-mobile-layout-group-padding desktop:pb-desktop-layout-group-padding compact:pb-desktop-compact-layout-group-padding",
|
|
138
|
+
l && o === "component" && "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding",
|
|
139
|
+
r && o === "container" && "pt-mobile-container-padding desktop:pt-desktop-container-padding compact:pt-desktop-compact-container-padding",
|
|
140
|
+
r && o === "layout" && "pt-mobile-layout-padding desktop:pt-desktop-layout-padding compact:pt-desktop-compact-layout-padding",
|
|
141
|
+
r && o === "layout-group" && "pt-mobile-layout-group-padding desktop:pt-desktop-layout-group-padding compact:pt-desktop-compact-layout-group-padding",
|
|
142
|
+
r && o === "component" && "pt-mobile-component-padding desktop:pt-desktop-component-padding compact:pt-desktop-compact-component-padding",
|
|
143
143
|
i && o === "container" && "pl-mobile-container-padding desktop:pl-desktop-container-padding compact:pl-desktop-compact-container-padding",
|
|
144
144
|
i && o === "layout" && "pl-mobile-layout-padding desktop:pl-desktop-layout-padding compact:pl-desktop-compact-layout-padding",
|
|
145
145
|
i && o === "layout-group" && "pl-mobile-layout-group-padding desktop:pl-desktop-layout-group-padding compact:pl-desktop-compact-layout-group-padding",
|
|
146
146
|
i && o === "component" && "pl-mobile-component-padding desktop:pl-desktop-component-padding compact:pl-desktop-compact-component-padding",
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
s && o === "container" && "pr-mobile-container-padding desktop:pr-desktop-container-padding compact:pr-desktop-compact-container-padding",
|
|
148
|
+
s && o === "layout" && "pr-mobile-layout-padding desktop:pr-desktop-layout-padding compact:pr-desktop-compact-layout-padding",
|
|
149
|
+
s && o === "layout-group" && "pr-mobile-layout-group-padding desktop:pr-desktop-layout-group-padding compact:pr-desktop-compact-layout-group-padding",
|
|
150
|
+
s && o === "component" && "pr-mobile-component-padding desktop:pr-desktop-component-padding compact:pr-desktop-compact-component-padding",
|
|
151
151
|
M && o === "container" && "m-mobile-container-padding desktop:m-desktop-container-padding compact:m-compact-container-padding",
|
|
152
152
|
O && o === "container" && "mx-mobile-container-padding desktop:mx-desktop-container-padding compact:mx-compact-container-padding",
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
W && o === "container" && "mt-mobile-container-padding desktop:mt-desktop-container-padding compact:mt-compact-container-padding",
|
|
154
|
+
H && o === "container" && "mb-mobile-container-padding desktop:mb-desktop-container-padding compact:mb-compact-container-padding",
|
|
155
155
|
P && o === "container" && "my-mobile-container-padding desktop:my-desktop-container-padding compact:my-compact-container-padding",
|
|
156
156
|
Q ? "desktop:flex-row" : "desktop:flex-col",
|
|
157
157
|
V ? "flex-row" : "flex-col",
|
|
158
|
-
|
|
159
|
-
!
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
158
|
+
X,
|
|
159
|
+
!C && h,
|
|
160
|
+
u === 0 && "shadow-none",
|
|
161
|
+
u === 2 && "shadow-2",
|
|
162
|
+
u === 4 && "shadow-4",
|
|
163
|
+
u === 16 && "shadow-16",
|
|
164
164
|
Z && "rounded",
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
Y && "-m-0.75 p-1",
|
|
166
|
+
T
|
|
167
167
|
),
|
|
168
168
|
children: p
|
|
169
169
|
}
|
|
@@ -6,8 +6,8 @@ type StepperProps = {
|
|
|
6
6
|
testid?: string;
|
|
7
7
|
value: number;
|
|
8
8
|
setValue: React.Dispatch<React.SetStateAction<number>>;
|
|
9
|
-
onIncrease?: () => void;
|
|
10
|
-
onDecrease?: () => void;
|
|
9
|
+
onIncrease?: (value: number) => void;
|
|
10
|
+
onDecrease?: (value: number) => void;
|
|
11
11
|
/**
|
|
12
12
|
* Called when the input loses focus. Use this for deferred validation
|
|
13
13
|
* (e.g., snapping to minpack multiples) to allow users to type freely.
|
|
@@ -20,7 +20,15 @@ type StepperProps = {
|
|
|
20
20
|
* Defaults to 1 if not specified.
|
|
21
21
|
*/
|
|
22
22
|
step?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Allow decimal values in the input field.
|
|
25
|
+
* When true, the user can type values like "1.5" or "0.25".
|
|
26
|
+
*/
|
|
27
|
+
allowDecimals?: boolean;
|
|
23
28
|
};
|
|
24
|
-
export declare function Stepper({ error, disabled, hideButtons, value, setValue, onDecrease, onIncrease, onBlur, id, testid, min, max, step, ...props }: StepperProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function Stepper({ error, disabled, hideButtons, value, setValue, onDecrease, onIncrease, onBlur, id, testid, min, max, step, allowDecimals, ...props }: StepperProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare namespace Stepper {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
25
33
|
export {};
|
|
26
34
|
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../src/components/Stepper.tsx"],"names":[],"mappings":"AASA,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACvD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../src/components/Stepper.tsx"],"names":[],"mappings":"AASA,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACvD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,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