@lax-wp/design-system 0.13.34 → 0.13.36
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/data-display/infinite-table/body/cell/CheckboxCell.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/body/cell/CheckboxCell.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/body/cell/CheckboxCell.es.js +23 -23
- package/dist/components/data-display/infinite-table/body/cell/CheckboxCell.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/CheckAll.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/head/CheckAll.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/CheckAll.es.js +4 -4
- package/dist/components/data-display/infinite-table/head/CheckAll.es.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/index.cjs.js +1 -1
- package/dist/components/data-display/infinite-table/head/index.cjs.js.map +1 -1
- package/dist/components/data-display/infinite-table/head/index.es.js +5 -5
- package/dist/components/data-display/infinite-table/head/index.es.js.map +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.cjs.js +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.cjs.js.map +1 -1
- package/dist/components/forms/date-time-field/DateTimeField.es.js +97 -92
- package/dist/components/forms/date-time-field/DateTimeField.es.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.cjs.js +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.cjs.js.map +1 -1
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.d.ts +6 -0
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.es.js +172 -142
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.es.js.map +1 -1
- package/dist/components/forms/link-input/LinkInputField.cjs.js +2 -0
- package/dist/components/forms/link-input/LinkInputField.cjs.js.map +1 -0
- package/dist/components/forms/link-input/LinkInputField.d.ts +59 -0
- package/dist/components/forms/link-input/LinkInputField.es.js +102 -0
- package/dist/components/forms/link-input/LinkInputField.es.js.map +1 -0
- package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.cjs.js.map +1 -1
- package/dist/components/forms/master-data-input/MasterDataInputField.d.ts +6 -0
- package/dist/components/forms/master-data-input/MasterDataInputField.es.js +199 -169
- package/dist/components/forms/master-data-input/MasterDataInputField.es.js.map +1 -1
- package/dist/components/forms/percentage-input/PercentageInputField.cjs.js +1 -5
- package/dist/components/forms/percentage-input/PercentageInputField.cjs.js.map +1 -1
- package/dist/components/forms/percentage-input/PercentageInputField.d.ts +6 -0
- package/dist/components/forms/percentage-input/PercentageInputField.es.js +141 -134
- package/dist/components/forms/percentage-input/PercentageInputField.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.es.js +407 -405
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,114 +1,116 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { Typography as
|
|
7
|
-
import { Label as
|
|
8
|
-
import { BoltOutlined as
|
|
9
|
-
import { AIExtractedIndicator as
|
|
10
|
-
import { AIStarIcon as
|
|
11
|
-
import { HelpIcon as
|
|
12
|
-
import
|
|
13
|
-
import { shouldShowConfidenceScore as
|
|
14
|
-
import { InputLabel as
|
|
15
|
-
const
|
|
1
|
+
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import a from "../../../_virtual/index.es.js";
|
|
3
|
+
import { forwardRef as er, useState as or } from "react";
|
|
4
|
+
import { Tooltip as ar } from "antd";
|
|
5
|
+
import { useTranslation as tr } from "react-i18next";
|
|
6
|
+
import { Typography as lr } from "../../data-display/typography/Typography.es.js";
|
|
7
|
+
import { Label as dr } from "../../data-display/label/Label.es.js";
|
|
8
|
+
import { BoltOutlined as sr, NoteAddOutlined as ir } from "@mui/icons-material";
|
|
9
|
+
import { AIExtractedIndicator as cr } from "../../icons/AIExtractedIndicator.es.js";
|
|
10
|
+
import { AIStarIcon as nr } from "../../icons/AIStarIcon.es.js";
|
|
11
|
+
import { HelpIcon as mr } from "../../icons/HelpIcon.es.js";
|
|
12
|
+
import A from "../../tooltip/Tooltip.es.js";
|
|
13
|
+
import { shouldShowConfidenceScore as I, getConfidenceScoreBadgeFill as pr, getConfidenceScoreBadgeColor as fr, getConfidenceScoreBadgeTextColor as ur, getConfidenceScoreBadgeClass as br } from "../../../utils/confidenceScoreUtils.es.js";
|
|
14
|
+
import { InputLabel as xr } from "../shared/InputLabel.es.js";
|
|
15
|
+
const gr = er(
|
|
16
16
|
({
|
|
17
|
-
id:
|
|
18
|
-
label:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
id: n,
|
|
18
|
+
label: m,
|
|
19
|
+
labelExtra: $,
|
|
20
|
+
value: s,
|
|
21
|
+
onChange: v,
|
|
22
|
+
errorMessage: t,
|
|
23
|
+
defaultValue: p,
|
|
24
|
+
disabled: z,
|
|
25
|
+
max: D,
|
|
26
|
+
min: P,
|
|
27
|
+
required: f = !1,
|
|
28
|
+
isRequiredConditional: W = !1,
|
|
29
|
+
bg: j,
|
|
29
30
|
tags: H,
|
|
30
31
|
color: L,
|
|
31
|
-
className:
|
|
32
|
-
originalCase:
|
|
33
|
-
tooltip:
|
|
34
|
-
simpleMode:
|
|
35
|
-
inputFieldClassName:
|
|
32
|
+
className: K,
|
|
33
|
+
originalCase: k = !1,
|
|
34
|
+
tooltip: F,
|
|
35
|
+
simpleMode: O = !1,
|
|
36
|
+
inputFieldClassName: R = "",
|
|
36
37
|
isAiExtracted: q = !1,
|
|
37
|
-
confidenceScore:
|
|
38
|
-
confidenceType:
|
|
39
|
-
confidenceTooltip:
|
|
38
|
+
confidenceScore: u,
|
|
39
|
+
confidenceType: d = "high",
|
|
40
|
+
confidenceTooltip: b,
|
|
40
41
|
sourceMeta: J = [],
|
|
41
|
-
onConfidenceScoreClick:
|
|
42
|
+
onConfidenceScoreClick: Q,
|
|
42
43
|
isGTN: x = !1,
|
|
43
|
-
gtnName:
|
|
44
|
-
inputStyle:
|
|
45
|
-
withDollarSign:
|
|
44
|
+
gtnName: U = null,
|
|
45
|
+
inputStyle: y,
|
|
46
|
+
withDollarSign: V = !0,
|
|
46
47
|
labelClassName: w,
|
|
47
|
-
isLiveField:
|
|
48
|
-
onBlur:
|
|
49
|
-
onAddGTNToDocument:
|
|
48
|
+
isLiveField: X = !1,
|
|
49
|
+
onBlur: N,
|
|
50
|
+
onAddGTNToDocument: g,
|
|
50
51
|
riskDetails: l,
|
|
51
|
-
isRiskAnalysisOpen:
|
|
52
|
-
RiskDetailsCard:
|
|
53
|
-
placeholder:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
isRiskAnalysisOpen: S = !1,
|
|
53
|
+
RiskDetailsCard: C,
|
|
54
|
+
placeholder: Y,
|
|
55
|
+
inputEmphasis: _ = "default",
|
|
56
|
+
...E
|
|
57
|
+
}, B) => {
|
|
58
|
+
const { t: Z } = tr(), i = !!(S && l?.color), M = _ === "modified" && !t && !i, G = _ === "deleted" && !t && !i, T = _ === "success" && !t && !i, [c, h] = or(!1), rr = (e) => {
|
|
59
|
+
g && g({
|
|
60
|
+
key: U,
|
|
61
|
+
value: e
|
|
60
62
|
});
|
|
61
63
|
};
|
|
62
|
-
return
|
|
64
|
+
return O ? /* @__PURE__ */ o(
|
|
63
65
|
"label",
|
|
64
66
|
{
|
|
65
|
-
id:
|
|
66
|
-
className: `mb-1 text-xs font-medium text-gray-600 dark:text-neutral-200 inline-flex items-center gap-1 ${
|
|
67
|
+
id: n,
|
|
68
|
+
className: `mb-1 text-xs font-medium text-gray-600 dark:text-neutral-200 inline-flex items-center gap-1 ${k ? "" : "capitalize"} ${w || ""}`,
|
|
67
69
|
children: [
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
+
V && /* @__PURE__ */ r("span", { className: "absolute inset-y-0 left-1 flex items-center pl-3", children: "$" }),
|
|
71
|
+
/* @__PURE__ */ r(
|
|
70
72
|
"input",
|
|
71
73
|
{
|
|
72
|
-
...
|
|
73
|
-
ref:
|
|
74
|
-
onBlur:
|
|
74
|
+
...E,
|
|
75
|
+
ref: B,
|
|
76
|
+
onBlur: N,
|
|
75
77
|
type: "number",
|
|
76
|
-
required:
|
|
77
|
-
className:
|
|
78
|
-
onChange: (
|
|
79
|
-
|
|
78
|
+
required: f,
|
|
79
|
+
className: a(R, "pl-8 h-8"),
|
|
80
|
+
onChange: (e) => {
|
|
81
|
+
v(e.target.value);
|
|
80
82
|
},
|
|
81
|
-
value:
|
|
82
|
-
...
|
|
83
|
-
id:
|
|
84
|
-
style:
|
|
83
|
+
value: s,
|
|
84
|
+
...p && !s ? { defaultValue: p } : {},
|
|
85
|
+
id: n || m,
|
|
86
|
+
style: y,
|
|
85
87
|
autoComplete: "off"
|
|
86
88
|
}
|
|
87
89
|
)
|
|
88
90
|
]
|
|
89
91
|
}
|
|
90
|
-
) : /* @__PURE__ */
|
|
92
|
+
) : /* @__PURE__ */ o(
|
|
91
93
|
"div",
|
|
92
94
|
{
|
|
93
|
-
className:
|
|
95
|
+
className: a(
|
|
94
96
|
"flex gap-0.5 relative",
|
|
95
|
-
|
|
97
|
+
c && x ? "border rounded-lg border-primary-100 bg-primary-50 p-1" : ""
|
|
96
98
|
),
|
|
97
99
|
onMouseEnter: () => h(!0),
|
|
98
100
|
onMouseLeave: () => h(!1),
|
|
99
101
|
children: [
|
|
100
|
-
x && !
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
102
|
+
x && !c ? /* @__PURE__ */ r("div", { className: "w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5" }) : null,
|
|
103
|
+
/* @__PURE__ */ o("div", { className: a("w-full flex flex-col", K), children: [
|
|
104
|
+
/* @__PURE__ */ r(
|
|
103
105
|
"label",
|
|
104
106
|
{
|
|
105
107
|
htmlFor: "text",
|
|
106
|
-
className: `mb-1 text-xs font-medium text-gray-600 dark:text-neutral-300 inline-flex items-center gap-1 ${
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
className: `mb-1 text-xs font-medium text-gray-600 dark:text-neutral-300 inline-flex items-center gap-1 ${k ? "" : "uppercase"} ${w || ""}`,
|
|
109
|
+
children: /* @__PURE__ */ o("div", { className: "grid w-full grid-cols-[minmax(0,1fr)_auto] items-start gap-x-1", children: [
|
|
110
|
+
/* @__PURE__ */ o("div", { className: "inline-flex min-w-0 items-center gap-1 flex-wrap dark:text-black-300", children: [
|
|
111
|
+
/* @__PURE__ */ r(xr, { label: m || "", required: f || !1, isRequiredConditional: W || !1 }),
|
|
112
|
+
X && /* @__PURE__ */ r(
|
|
113
|
+
sr,
|
|
112
114
|
{
|
|
113
115
|
sx: {
|
|
114
116
|
fontSize: 16,
|
|
@@ -117,37 +119,38 @@ const ce = Z(
|
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
121
|
),
|
|
120
|
-
q && !
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
|
|
122
|
+
q && !I(u) && /* @__PURE__ */ r(cr, {}),
|
|
123
|
+
/* @__PURE__ */ r(dr, { labels: H }),
|
|
124
|
+
F && /* @__PURE__ */ r(A, { placement: "top", title: F, children: /* @__PURE__ */ r("div", { className: "cursor-pointer", children: /* @__PURE__ */ r(mr, { className: "w-icon-sm h-icon-sm" }) }) }),
|
|
125
|
+
$
|
|
123
126
|
] }),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-1 justify-self-end", children: [
|
|
128
|
+
I(u) && d ? /* @__PURE__ */ r(
|
|
129
|
+
A,
|
|
127
130
|
{
|
|
128
131
|
placement: "top-end",
|
|
129
|
-
title:
|
|
130
|
-
hideTooltip:
|
|
132
|
+
title: b ?? "",
|
|
133
|
+
hideTooltip: b == null,
|
|
131
134
|
className: "cursor-pointer",
|
|
132
|
-
children: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ o(
|
|
133
136
|
"div",
|
|
134
137
|
{
|
|
135
|
-
className:
|
|
138
|
+
className: a(
|
|
136
139
|
"inline-flex min-w-[50px] items-center gap-1 rounded-md px-1 py-0.5",
|
|
137
|
-
|
|
140
|
+
br(d)
|
|
138
141
|
),
|
|
139
|
-
onClick: () =>
|
|
142
|
+
onClick: () => Q?.(J),
|
|
140
143
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
144
|
+
/* @__PURE__ */ r(
|
|
145
|
+
nr,
|
|
143
146
|
{
|
|
144
147
|
size: 12,
|
|
145
|
-
fill:
|
|
146
|
-
fillSecondary:
|
|
148
|
+
fill: fr(d),
|
|
149
|
+
fillSecondary: pr(d)
|
|
147
150
|
}
|
|
148
151
|
),
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
|
|
152
|
+
/* @__PURE__ */ o("span", { className: a("text-xs font-medium leading-4", ur(d)), children: [
|
|
153
|
+
u,
|
|
151
154
|
"%"
|
|
152
155
|
] })
|
|
153
156
|
]
|
|
@@ -155,15 +158,15 @@ const ce = Z(
|
|
|
155
158
|
)
|
|
156
159
|
}
|
|
157
160
|
) : null,
|
|
158
|
-
x &&
|
|
161
|
+
x && c && g ? /* @__PURE__ */ r(
|
|
159
162
|
"button",
|
|
160
163
|
{
|
|
161
164
|
id: "btn-percentage-input-add-to-document",
|
|
162
165
|
className: "cursor-pointer",
|
|
163
|
-
onClick: () =>
|
|
166
|
+
onClick: () => rr(s?.toString()),
|
|
164
167
|
type: "button",
|
|
165
|
-
children: /* @__PURE__ */
|
|
166
|
-
|
|
168
|
+
children: /* @__PURE__ */ r(ar, { placement: "top", title: Z("Add to document"), children: /* @__PURE__ */ r(
|
|
169
|
+
ir,
|
|
167
170
|
{
|
|
168
171
|
className: "text-primary-600",
|
|
169
172
|
sx: { fontSize: 16 }
|
|
@@ -175,59 +178,63 @@ const ce = Z(
|
|
|
175
178
|
] })
|
|
176
179
|
}
|
|
177
180
|
),
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ o("label", { className: "relative block", children: [
|
|
182
|
+
/* @__PURE__ */ r(
|
|
180
183
|
"input",
|
|
181
184
|
{
|
|
182
|
-
...
|
|
183
|
-
ref:
|
|
184
|
-
onBlur:
|
|
185
|
+
...E,
|
|
186
|
+
ref: B,
|
|
187
|
+
onBlur: N,
|
|
185
188
|
type: "number",
|
|
186
|
-
required:
|
|
187
|
-
disabled:
|
|
188
|
-
min:
|
|
189
|
-
max:
|
|
190
|
-
className:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
189
|
+
required: f,
|
|
190
|
+
disabled: z,
|
|
191
|
+
min: P,
|
|
192
|
+
max: D,
|
|
193
|
+
className: a(
|
|
194
|
+
"h-8 text-gray-900 dark:bg-black-600 dark:text-neutral-200 text-sm rounded-lg focus:outline-none focus:ring-0 block w-full p-2.5 font-inter font-medium disabled:bg-neutral-50 dark:disabled:!bg-black-800 dark:disabled:placeholder:!text-black-400",
|
|
195
|
+
j,
|
|
196
|
+
t ? "border border-red-300 focus:border-[var(--color-primary-600)] dark:focus:border-[var(--color-primary-400)] focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)]" : i && l?.color ? a(
|
|
197
|
+
`border border-${l.color}-300 bg-${l.color}-50`,
|
|
198
|
+
"focus:border-[var(--color-primary-600)] dark:focus:border-[var(--color-primary-400)] focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)]"
|
|
199
|
+
) : G ? "border border-solid border-[var(--Error-200,#FECACA)] bg-[var(--Error-50,#FEF2F2)] !text-[#475467] focus:border-[var(--Error-200,#FECACA)] focus:shadow-[0_0_0_2px_rgba(254_202_202_/_0.45)] dark:border-[var(--Error-200,#FECACA)] dark:bg-[var(--Error-50,#FEF2F2)] dark:!text-[#475467]" : M ? "border border-solid border-[var(--Warning-200,#FEDF89)] bg-[var(--Warning-50,#FFFAEB)] text-neutral-900 dark:text-black-100 focus:border-[var(--Warning-200,#FEDF89)] focus:shadow-[0_0_0_2px_rgba(254_223_137_/_0.45)] dark:border-[var(--Warning-200,#FEDF89)] dark:bg-[var(--Warning-50,#FFFAEB)]" : T ? "border border-solid border-[var(--Success-200,#BBF7D0)] bg-[var(--Success-50,#F0FDF4)] !text-[#101828] focus:border-[var(--Success-200,#BBF7D0)] focus:shadow-[0_0_0_2px_rgba(187_247_208_/_0.45)] dark:border-[var(--Success-200,#BBF7D0)] dark:bg-[var(--Success-50,#F0FDF4)] dark:!text-[#101828]" : "border border-gray-300 focus:border-[var(--color-primary-600)] dark:focus:border-[var(--color-primary-400)] focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)]",
|
|
200
|
+
L || ""
|
|
201
|
+
),
|
|
202
|
+
onChange: (e) => {
|
|
203
|
+
v(e.target.value);
|
|
197
204
|
},
|
|
198
|
-
value:
|
|
199
|
-
defaultValue:
|
|
200
|
-
id:
|
|
201
|
-
style:
|
|
205
|
+
value: s,
|
|
206
|
+
defaultValue: p,
|
|
207
|
+
id: n || m,
|
|
208
|
+
style: y,
|
|
202
209
|
autoComplete: "off",
|
|
203
|
-
placeholder:
|
|
210
|
+
placeholder: Y
|
|
204
211
|
}
|
|
205
212
|
),
|
|
206
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ r("span", { className: "absolute inset-y-0 right-3 flex items-center z-[1000px] h-full dark:text-black-100", children: "%" })
|
|
207
214
|
] }),
|
|
208
|
-
|
|
209
|
-
|
|
215
|
+
t && /* @__PURE__ */ r(
|
|
216
|
+
lr,
|
|
210
217
|
{
|
|
211
218
|
className: "text-error-500 mt-1",
|
|
212
219
|
appearance: "custom",
|
|
213
220
|
size: "extra-small",
|
|
214
221
|
variant: "medium",
|
|
215
|
-
children:
|
|
222
|
+
children: t
|
|
216
223
|
}
|
|
217
224
|
)
|
|
218
225
|
] }),
|
|
219
|
-
|
|
226
|
+
c && l && S && C && /* @__PURE__ */ r(
|
|
220
227
|
"div",
|
|
221
228
|
{
|
|
222
229
|
role: "tooltip",
|
|
223
230
|
tabIndex: 0,
|
|
224
231
|
className: "absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",
|
|
225
|
-
onClick: (
|
|
226
|
-
onMouseDown: (
|
|
227
|
-
onKeyDown: (
|
|
228
|
-
|
|
232
|
+
onClick: (e) => e.stopPropagation(),
|
|
233
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
234
|
+
onKeyDown: (e) => {
|
|
235
|
+
e.key === "Escape" && h(!1);
|
|
229
236
|
},
|
|
230
|
-
children: /* @__PURE__ */
|
|
237
|
+
children: /* @__PURE__ */ r(C, { riskDetails: l })
|
|
231
238
|
}
|
|
232
239
|
)
|
|
233
240
|
]
|
|
@@ -235,8 +242,8 @@ const ce = Z(
|
|
|
235
242
|
);
|
|
236
243
|
}
|
|
237
244
|
);
|
|
238
|
-
|
|
245
|
+
gr.displayName = "PercentageInputField";
|
|
239
246
|
export {
|
|
240
|
-
|
|
247
|
+
gr as PercentageInputField
|
|
241
248
|
};
|
|
242
249
|
//# sourceMappingURL=PercentageInputField.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PercentageInputField.es.js","sources":["../../../../src/components/forms/percentage-input/PercentageInputField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport cn from \"classnames\";\nimport { forwardRef, useState } from \"react\";\nimport { Tooltip as AntTooltip } from \"antd\";\nimport { useTranslation } from 'react-i18next';\nimport { Typography } from \"../../data-display/typography/Typography\";\nimport { Label } from \"../../data-display/label/Label\";\nimport type { LabelType } from \"../../data-display/label/Label\";\nimport { BoltOutlined, NoteAddOutlined } from \"@mui/icons-material\";\nimport { AIExtractedIndicator } from \"../../icons/AIExtractedIndicator\";\nimport { AIStarIcon } from \"../../icons/AIStarIcon\";\nimport { HelpIcon } from \"../../icons/HelpIcon\";\nimport Tooltip from \"../../tooltip/Tooltip\";\nimport {\n getConfidenceScoreBadgeClass,\n getConfidenceScoreBadgeColor,\n getConfidenceScoreBadgeFill,\n getConfidenceScoreBadgeTextColor,\n shouldShowConfidenceScore,\n} from \"../../../utils/confidenceScoreUtils\";\nimport { InputLabel } from \"../shared/InputLabel\";\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Risk details interface for risk analysis integration\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n hexBgColor?: string;\n hexBorderColor?: string;\n [key: string]: any;\n}\n\n/**\n * Risk details card component props - generic to allow consumer-specific risk types\n */\nexport interface RiskDetailsCardProps<T = any> {\n riskDetails: T;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Props for the PercentageInputField component\n */\nexport interface PercentageInputFieldProps {\n /** Unique identifier for the input */\n id: string;\n /** Label text to display above the input */\n label?: string;\n /** Current value of the input */\n value: string;\n /** Callback function called when value changes */\n onChange: (data: any) => void;\n /** Error message to display below the input */\n errorMessage?: string;\n /** Default value for the input */\n defaultValue?: string;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Maximum value allowed */\n max?: number;\n /** Minimum value allowed */\n min?: number;\n /** Whether the field is required */\n required?: boolean;\n /** Whether the required indicator shows as conditional (yellow instead of red) */\n isRequiredConditional?: boolean;\n /** Background color class */\n bg?: string;\n /** Tags/labels to display next to the label */\n tags?: (string | LabelType)[];\n /** Text color class */\n color?: string;\n /** Additional CSS classes for the wrapper */\n className?: string;\n /** Whether to preserve original case in the label */\n originalCase?: boolean;\n /** Tooltip text for the help icon */\n tooltip?: string;\n /** Whether to use simple mode (inline label style) */\n simpleMode?: boolean;\n /** Additional CSS classes for the input field */\n inputFieldClassName?: string;\n /** Whether the value was AI extracted */\n isAiExtracted?: boolean;\n /** Confidence percentage shown as a badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence badge */\n confidenceTooltip?: React.ReactNode;\n /** Source meta for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler fired when confidence score badge is clicked */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Whether this is a GTN (Global Term Name) field */\n isGTN?: boolean;\n /** GTN field name for document integration */\n gtnName?: any;\n /** Inline styles for the input element */\n inputStyle?: React.CSSProperties;\n /** Whether to show dollar sign (for simpleMode) */\n withDollarSign?: boolean;\n /** Additional CSS classes for the label */\n labelClassName?: string;\n /** Whether this is a live field */\n isLiveField?: boolean;\n /** Callback function called when input loses focus */\n onBlur?: () => void;\n /** Handler for adding GTN to document */\n onAddGTNToDocument?: (keyValuePair: { key: string; value: string }) => void;\n /** Risk details data */\n riskDetails?: RiskDetails;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component */\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;\n /** Input placeholder */\n placeholder?: string\n}\n\n/**\n * A highly customizable percentage input component with label, validation, and styling support.\n * Features GTN integration, risk analysis support, AI extraction indicator, and comprehensive prop support.\n *\n * @example\n * ```tsx\n * <PercentageInputField\n * id=\"discount\"\n * label=\"Discount Percentage\"\n * value={discount}\n * onChange={(value) => setDiscount(value)}\n * required\n * />\n * ```\n */\nexport const PercentageInputField = forwardRef<\n HTMLInputElement,\n PercentageInputFieldProps\n>(\n (\n {\n id,\n label,\n value,\n onChange,\n errorMessage,\n defaultValue,\n disabled,\n max,\n min,\n required = false,\n isRequiredConditional = false,\n bg,\n tags,\n color,\n className,\n originalCase = false,\n tooltip,\n simpleMode = false,\n inputFieldClassName = \"\",\n isAiExtracted = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n sourceMeta = [],\n onConfidenceScoreClick,\n isGTN = false,\n gtnName = null,\n inputStyle,\n withDollarSign = true,\n labelClassName,\n isLiveField = false,\n onBlur,\n onAddGTNToDocument,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n placeholder,\n ...props\n },\n ref\n ) => {\n const { t } = useTranslation();\n const [isHovered, setIsHovered] = useState(false);\n\n const handleAddGTNToDocument = (_value: string) => {\n if (onAddGTNToDocument) {\n const keyValuePair = {\n key: gtnName,\n value: _value,\n };\n onAddGTNToDocument(keyValuePair);\n }\n };\n\n // Simple mode rendering\n if (simpleMode) {\n return (\n <label\n id={id}\n className={`mb-1 text-xs font-medium text-gray-600 dark:text-neutral-200 inline-flex items-center gap-1 ${\n !originalCase ? \"capitalize\" : \"\"\n } ${labelClassName || \"\"}`}\n >\n {withDollarSign && (\n <span className=\"absolute inset-y-0 left-1 flex items-center pl-3\">\n {\"$\"}\n </span>\n )}\n <input\n {...props}\n ref={ref}\n onBlur={onBlur}\n type=\"number\"\n required={required}\n className={cn(inputFieldClassName, \"pl-8 h-8\")}\n onChange={(e) => {\n onChange(e.target.value);\n }}\n value={value}\n {...(defaultValue && !value ? { defaultValue: defaultValue } : {})}\n id={id || label}\n style={inputStyle}\n autoComplete=\"off\"\n />\n </label>\n );\n }\n\n // Full mode rendering\n return (\n <div\n className={cn(\n \"flex gap-0.5 relative\",\n isHovered && isGTN\n ? \"border rounded-lg border-primary-100 bg-primary-50 p-1\"\n : \"\"\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {isGTN && !isHovered ? (\n <div className=\"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5\" />\n ) : null}\n <div className={cn(\"w-full flex flex-col\", className)}>\n <label\n htmlFor=\"text\"\n className={`mb-1 text-xs font-medium text-gray-600 dark:text-neutral-300 inline-flex items-center gap-1 ${\n !originalCase ? \"uppercase\" : \"\"\n } ${labelClassName || \"\"}`}\n >\n <div className=\"grid w-full grid-cols-[minmax(0,1fr)_auto] items-start gap-x-1\">\n <div className=\"inline-flex min-w-0 items-center gap-1 flex-wrap dark:text-black-300\">\n <InputLabel label={label || \"\"} required={required || false} isRequiredConditional={isRequiredConditional || false} />\n {isLiveField && (\n <BoltOutlined\n sx={{\n fontSize: 16,\n color: \"var(--color-primary-600)\",\n rotate: \"15deg\",\n }}\n />\n )}\n {isAiExtracted && !shouldShowConfidenceScore(confidenceScore) && <AIExtractedIndicator />}\n <Label labels={tags} />\n {tooltip && (\n <Tooltip placement=\"top\" title={tooltip}>\n <div className=\"cursor-pointer\">\n <HelpIcon className=\"w-icon-sm h-icon-sm\" />\n </div>\n </Tooltip>\n )}\n </div>\n\n <div className=\"flex items-center gap-1 justify-self-end\">\n {(shouldShowConfidenceScore(confidenceScore) && confidenceType) ? (\n <Tooltip\n placement=\"top-end\"\n title={confidenceTooltip ?? \"\"}\n hideTooltip={confidenceTooltip === undefined || confidenceTooltip === null}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n \"inline-flex min-w-[50px] items-center gap-1 rounded-md px-1 py-0.5\",\n getConfidenceScoreBadgeClass(confidenceType)\n )}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n <span className={cn(\"text-xs font-medium leading-4\", getConfidenceScoreBadgeTextColor(confidenceType))}>\n {confidenceScore}%\n </span>\n </div>\n </Tooltip>\n ) : null}\n {isGTN && isHovered && onAddGTNToDocument ? (\n <button\n id=\"btn-percentage-input-add-to-document\"\n className=\"cursor-pointer\"\n onClick={() => handleAddGTNToDocument(value?.toString())}\n type=\"button\"\n >\n <AntTooltip placement=\"top\" title={t(\"Add to document\")}>\n <NoteAddOutlined\n className=\"text-primary-600\"\n sx={{ fontSize: 16 }}\n />\n </AntTooltip>\n </button>\n ) : null}\n </div>\n </div>\n </label>\n <label className=\"relative block\">\n <input\n {...props}\n ref={ref}\n onBlur={onBlur}\n type=\"number\"\n required={required}\n disabled={disabled}\n min={min}\n max={max}\n className={`border ${\n errorMessage\n ? \"border-red-300\"\n : isRiskAnalysisOpen && riskDetails?.color\n ? `border-${riskDetails.color}-300`\n : \"border-gray-300\"\n } ${bg} h-8 text-gray-900 dark:bg-black-600 dark:text-neutral-200 text-sm rounded-lg focus:outline-none focus:ring-0 focus:border-[var(--color-primary-600)] dark:focus:border-[var(--color-primary-400)] focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)] block w-full p-2.5 font-inter font-medium \n disabled:bg-neutral-50 dark:disabled:!bg-black-800 dark:disabled:placeholder:!text-black-400\n ${\n isRiskAnalysisOpen &&\n riskDetails?.color &&\n `bg-${riskDetails.color}-50`\n }\n ${color || \"\"}\n `}\n onChange={(e) => {\n onChange(e.target.value);\n }}\n value={value}\n defaultValue={defaultValue}\n id={id || label}\n style={inputStyle}\n autoComplete=\"off\"\n placeholder={placeholder}\n />\n <span className=\"absolute inset-y-0 right-3 flex items-center z-[1000px] h-full dark:text-black-100\">\n %\n </span>\n </label>\n {errorMessage && (\n <Typography\n className=\"text-error-500 mt-1\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {errorMessage}\n </Typography>\n )}\n </div>\n\n {isHovered &&\n riskDetails &&\n isRiskAnalysisOpen &&\n RiskDetailsCard && (\n <div\n role=\"tooltip\"\n tabIndex={0}\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === \"Escape\") {\n setIsHovered(false);\n }\n }}\n >\n <RiskDetailsCard riskDetails={riskDetails} />\n </div>\n )}\n </div>\n );\n }\n);\n\nPercentageInputField.displayName = \"PercentageInputField\";\n"],"names":["PercentageInputField","forwardRef","id","label","value","onChange","errorMessage","defaultValue","disabled","max","min","required","isRequiredConditional","bg","tags","color","className","originalCase","tooltip","simpleMode","inputFieldClassName","isAiExtracted","confidenceScore","confidenceType","confidenceTooltip","sourceMeta","onConfidenceScoreClick","isGTN","gtnName","inputStyle","withDollarSign","labelClassName","isLiveField","onBlur","onAddGTNToDocument","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","placeholder","props","ref","t","useTranslation","isHovered","setIsHovered","useState","handleAddGTNToDocument","_value","jsxs","jsx","cn","e","InputLabel","BoltOutlined","shouldShowConfidenceScore","AIExtractedIndicator","Label","Tooltip","HelpIcon","getConfidenceScoreBadgeClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","getConfidenceScoreBadgeTextColor","AntTooltip","NoteAddOutlined","Typography"],"mappings":";;;;;;;;;;;;;;AAiKO,MAAMA,KAAuBC;AAAA,EAIlC,CACE;AAAA,IACE,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,KAAAC;AAAA,IACA,KAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,uBAAAC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gBACX,MAAK;AAAA,gBACL,SAAQ;AAAA,gBAEP,UAAA5D;AAAA,cAAA;AAAA,YAAA;AAAA,UACH,GAEJ;AAAA,UAECqC,KACCR,KACAC,KACAC,KACE,gBAAAY;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,UAAU;AAAA,cACV,WAAU;AAAA,cACV,SAAS,CAACE,MAAMA,EAAE,gBAAA;AAAA,cAClB,aAAa,CAACA,MAAMA,EAAE,eAAA;AAAA,cACtB,WAAW,CAACA,MAAM;AAChB,gBAAIA,EAAE,QAAQ,YACZP,EAAa,EAAK;AAAA,cAEtB;AAAA,cAEA,UAAA,gBAAAK,EAACZ,KAAgB,aAAAF,EAAA,CAA0B;AAAA,YAAA;AAAA,UAAA;AAAA,QAC7C;AAAA,MAAA;AAAA,IAAA;AAAA,EAIV;AACF;AAEAnC,GAAqB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"PercentageInputField.es.js","sources":["../../../../src/components/forms/percentage-input/PercentageInputField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport cn from \"classnames\";\nimport { forwardRef, useState } from \"react\";\nimport { Tooltip as AntTooltip } from \"antd\";\nimport { useTranslation } from 'react-i18next';\nimport { Typography } from \"../../data-display/typography/Typography\";\nimport { Label } from \"../../data-display/label/Label\";\nimport type { LabelType } from \"../../data-display/label/Label\";\nimport { BoltOutlined, NoteAddOutlined } from \"@mui/icons-material\";\nimport { AIExtractedIndicator } from \"../../icons/AIExtractedIndicator\";\nimport { AIStarIcon } from \"../../icons/AIStarIcon\";\nimport { HelpIcon } from \"../../icons/HelpIcon\";\nimport Tooltip from \"../../tooltip/Tooltip\";\nimport {\n getConfidenceScoreBadgeClass,\n getConfidenceScoreBadgeColor,\n getConfidenceScoreBadgeFill,\n getConfidenceScoreBadgeTextColor,\n shouldShowConfidenceScore,\n} from \"../../../utils/confidenceScoreUtils\";\nimport { InputLabel } from \"../shared/InputLabel\";\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Risk details interface for risk analysis integration\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n hexBgColor?: string;\n hexBorderColor?: string;\n [key: string]: any;\n}\n\n/**\n * Risk details card component props - generic to allow consumer-specific risk types\n */\nexport interface RiskDetailsCardProps<T = any> {\n riskDetails: T;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/** Visual emphasis for the input surface (background + border) */\nexport type PercentageInputFieldEmphasis =\n | \"default\"\n | \"modified\"\n | \"deleted\"\n | \"success\";\n\n/**\n * Props for the PercentageInputField component\n */\nexport interface PercentageInputFieldProps {\n /** Unique identifier for the input */\n id: string;\n /** Label text to display above the input */\n label?: string;\n /** Optional extra content in the label row (e.g. actions, badges) */\n labelExtra?: React.ReactNode;\n /** Current value of the input */\n value: string;\n /** Callback function called when value changes */\n onChange: (data: any) => void;\n /** Error message to display below the input */\n errorMessage?: string;\n /** Default value for the input */\n defaultValue?: string;\n /** Whether the input is disabled */\n disabled?: boolean;\n /** Maximum value allowed */\n max?: number;\n /** Minimum value allowed */\n min?: number;\n /** Whether the field is required */\n required?: boolean;\n /** Whether the required indicator shows as conditional (yellow instead of red) */\n isRequiredConditional?: boolean;\n /** Background color class */\n bg?: string;\n /** Tags/labels to display next to the label */\n tags?: (string | LabelType)[];\n /** Text color class */\n color?: string;\n /** Additional CSS classes for the wrapper */\n className?: string;\n /** Whether to preserve original case in the label */\n originalCase?: boolean;\n /** Tooltip text for the help icon */\n tooltip?: string;\n /** Whether to use simple mode (inline label style) */\n simpleMode?: boolean;\n /** Additional CSS classes for the input field */\n inputFieldClassName?: string;\n /** Whether the value was AI extracted */\n isAiExtracted?: boolean;\n /** Confidence percentage shown as a badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence badge */\n confidenceTooltip?: React.ReactNode;\n /** Source meta for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler fired when confidence score badge is clicked */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Whether this is a GTN (Global Term Name) field */\n isGTN?: boolean;\n /** GTN field name for document integration */\n gtnName?: any;\n /** Inline styles for the input element */\n inputStyle?: React.CSSProperties;\n /** Whether to show dollar sign (for simpleMode) */\n withDollarSign?: boolean;\n /** Additional CSS classes for the label */\n labelClassName?: string;\n /** Whether this is a live field */\n isLiveField?: boolean;\n /** Callback function called when input loses focus */\n onBlur?: () => void;\n /** Handler for adding GTN to document */\n onAddGTNToDocument?: (keyValuePair: { key: string; value: string }) => void;\n /** Risk details data */\n riskDetails?: RiskDetails;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component */\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;\n /** Input placeholder */\n placeholder?: string\n /** Input surface style: `'modified'` — `--Warning-50` / `--Warning-200`; `'deleted'` — `--Error-50` / `--Error-200`, text `#475467`; `'success'` — `--Success-50` / `--Success-200`, text `#101828`. */\n inputEmphasis?: PercentageInputFieldEmphasis;\n}\n\n/**\n * A highly customizable percentage input component with label, validation, and styling support.\n * Features GTN integration, risk analysis support, AI extraction indicator, and comprehensive prop support.\n *\n * @example\n * ```tsx\n * <PercentageInputField\n * id=\"discount\"\n * label=\"Discount Percentage\"\n * value={discount}\n * onChange={(value) => setDiscount(value)}\n * required\n * />\n * ```\n */\nexport const PercentageInputField = forwardRef<\n HTMLInputElement,\n PercentageInputFieldProps\n>(\n (\n {\n id,\n label,\n labelExtra,\n value,\n onChange,\n errorMessage,\n defaultValue,\n disabled,\n max,\n min,\n required = false,\n isRequiredConditional = false,\n bg,\n tags,\n color,\n className,\n originalCase = false,\n tooltip,\n simpleMode = false,\n inputFieldClassName = \"\",\n isAiExtracted = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n sourceMeta = [],\n onConfidenceScoreClick,\n isGTN = false,\n gtnName = null,\n inputStyle,\n withDollarSign = true,\n labelClassName,\n isLiveField = false,\n onBlur,\n onAddGTNToDocument,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n placeholder,\n inputEmphasis = \"default\",\n ...props\n },\n ref\n ) => {\n const { t } = useTranslation();\n const showRiskSkin = Boolean(isRiskAnalysisOpen && riskDetails?.color);\n const emphasisModifiedSkin =\n inputEmphasis === \"modified\" && !errorMessage && !showRiskSkin;\n const emphasisDeletedSkin =\n inputEmphasis === \"deleted\" && !errorMessage && !showRiskSkin;\n const emphasisSuccessSkin =\n inputEmphasis === \"success\" && !errorMessage && !showRiskSkin;\n const [isHovered, setIsHovered] = useState(false);\n\n const handleAddGTNToDocument = (_value: string) => {\n if (onAddGTNToDocument) {\n const keyValuePair = {\n key: gtnName,\n value: _value,\n };\n onAddGTNToDocument(keyValuePair);\n }\n };\n\n // Simple mode rendering\n if (simpleMode) {\n return (\n <label\n id={id}\n className={`mb-1 text-xs font-medium text-gray-600 dark:text-neutral-200 inline-flex items-center gap-1 ${\n !originalCase ? \"capitalize\" : \"\"\n } ${labelClassName || \"\"}`}\n >\n {withDollarSign && (\n <span className=\"absolute inset-y-0 left-1 flex items-center pl-3\">\n {\"$\"}\n </span>\n )}\n <input\n {...props}\n ref={ref}\n onBlur={onBlur}\n type=\"number\"\n required={required}\n className={cn(inputFieldClassName, \"pl-8 h-8\")}\n onChange={(e) => {\n onChange(e.target.value);\n }}\n value={value}\n {...(defaultValue && !value ? { defaultValue: defaultValue } : {})}\n id={id || label}\n style={inputStyle}\n autoComplete=\"off\"\n />\n </label>\n );\n }\n\n // Full mode rendering\n return (\n <div\n className={cn(\n \"flex gap-0.5 relative\",\n isHovered && isGTN\n ? \"border rounded-lg border-primary-100 bg-primary-50 p-1\"\n : \"\"\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n >\n {isGTN && !isHovered ? (\n <div className=\"w-1 h-1 bg-primary-600 rounded-full animate-blink mt-1.5\" />\n ) : null}\n <div className={cn(\"w-full flex flex-col\", className)}>\n <label\n htmlFor=\"text\"\n className={`mb-1 text-xs font-medium text-gray-600 dark:text-neutral-300 inline-flex items-center gap-1 ${\n !originalCase ? \"uppercase\" : \"\"\n } ${labelClassName || \"\"}`}\n >\n <div className=\"grid w-full grid-cols-[minmax(0,1fr)_auto] items-start gap-x-1\">\n <div className=\"inline-flex min-w-0 items-center gap-1 flex-wrap dark:text-black-300\">\n <InputLabel label={label || \"\"} required={required || false} isRequiredConditional={isRequiredConditional || false} />\n {isLiveField && (\n <BoltOutlined\n sx={{\n fontSize: 16,\n color: \"var(--color-primary-600)\",\n rotate: \"15deg\",\n }}\n />\n )}\n {isAiExtracted && !shouldShowConfidenceScore(confidenceScore) && <AIExtractedIndicator />}\n <Label labels={tags} />\n {tooltip && (\n <Tooltip placement=\"top\" title={tooltip}>\n <div className=\"cursor-pointer\">\n <HelpIcon className=\"w-icon-sm h-icon-sm\" />\n </div>\n </Tooltip>\n )}\n {labelExtra}\n </div>\n\n <div className=\"flex items-center gap-1 justify-self-end\">\n {(shouldShowConfidenceScore(confidenceScore) && confidenceType) ? (\n <Tooltip\n placement=\"top-end\"\n title={confidenceTooltip ?? \"\"}\n hideTooltip={confidenceTooltip === undefined || confidenceTooltip === null}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n \"inline-flex min-w-[50px] items-center gap-1 rounded-md px-1 py-0.5\",\n getConfidenceScoreBadgeClass(confidenceType)\n )}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n <span className={cn(\"text-xs font-medium leading-4\", getConfidenceScoreBadgeTextColor(confidenceType))}>\n {confidenceScore}%\n </span>\n </div>\n </Tooltip>\n ) : null}\n {isGTN && isHovered && onAddGTNToDocument ? (\n <button\n id=\"btn-percentage-input-add-to-document\"\n className=\"cursor-pointer\"\n onClick={() => handleAddGTNToDocument(value?.toString())}\n type=\"button\"\n >\n <AntTooltip placement=\"top\" title={t(\"Add to document\")}>\n <NoteAddOutlined\n className=\"text-primary-600\"\n sx={{ fontSize: 16 }}\n />\n </AntTooltip>\n </button>\n ) : null}\n </div>\n </div>\n </label>\n <label className=\"relative block\">\n <input\n {...props}\n ref={ref}\n onBlur={onBlur}\n type=\"number\"\n required={required}\n disabled={disabled}\n min={min}\n max={max}\n className={cn(\n \"h-8 text-gray-900 dark:bg-black-600 dark:text-neutral-200 text-sm rounded-lg focus:outline-none focus:ring-0 block w-full p-2.5 font-inter font-medium disabled:bg-neutral-50 dark:disabled:!bg-black-800 dark:disabled:placeholder:!text-black-400\",\n bg,\n errorMessage\n ? \"border border-red-300 focus:border-[var(--color-primary-600)] dark:focus:border-[var(--color-primary-400)] focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)]\"\n : showRiskSkin && riskDetails?.color\n ? cn(\n `border border-${riskDetails.color}-300 bg-${riskDetails.color}-50`,\n \"focus:border-[var(--color-primary-600)] dark:focus:border-[var(--color-primary-400)] focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)]\"\n )\n : emphasisDeletedSkin\n ? \"border border-solid border-[var(--Error-200,#FECACA)] bg-[var(--Error-50,#FEF2F2)] !text-[#475467] focus:border-[var(--Error-200,#FECACA)] focus:shadow-[0_0_0_2px_rgba(254_202_202_/_0.45)] dark:border-[var(--Error-200,#FECACA)] dark:bg-[var(--Error-50,#FEF2F2)] dark:!text-[#475467]\"\n : emphasisModifiedSkin\n ? \"border border-solid border-[var(--Warning-200,#FEDF89)] bg-[var(--Warning-50,#FFFAEB)] text-neutral-900 dark:text-black-100 focus:border-[var(--Warning-200,#FEDF89)] focus:shadow-[0_0_0_2px_rgba(254_223_137_/_0.45)] dark:border-[var(--Warning-200,#FEDF89)] dark:bg-[var(--Warning-50,#FFFAEB)]\"\n : emphasisSuccessSkin\n ? \"border border-solid border-[var(--Success-200,#BBF7D0)] bg-[var(--Success-50,#F0FDF4)] !text-[#101828] focus:border-[var(--Success-200,#BBF7D0)] focus:shadow-[0_0_0_2px_rgba(187_247_208_/_0.45)] dark:border-[var(--Success-200,#BBF7D0)] dark:bg-[var(--Success-50,#F0FDF4)] dark:!text-[#101828]\"\n : \"border border-gray-300 focus:border-[var(--color-primary-600)] dark:focus:border-[var(--color-primary-400)] focus:shadow-[0_0_0_1.5px_var(--color-primary-100)] dark:focus:shadow-[0_0_0_1.5px_var(--color-primary-950)]\",\n color || \"\"\n )}\n onChange={(e) => {\n onChange(e.target.value);\n }}\n value={value}\n defaultValue={defaultValue}\n id={id || label}\n style={inputStyle}\n autoComplete=\"off\"\n placeholder={placeholder}\n />\n <span className=\"absolute inset-y-0 right-3 flex items-center z-[1000px] h-full dark:text-black-100\">\n %\n </span>\n </label>\n {errorMessage && (\n <Typography\n className=\"text-error-500 mt-1\"\n appearance=\"custom\"\n size=\"extra-small\"\n variant=\"medium\"\n >\n {errorMessage}\n </Typography>\n )}\n </div>\n\n {isHovered &&\n riskDetails &&\n isRiskAnalysisOpen &&\n RiskDetailsCard && (\n <div\n role=\"tooltip\"\n tabIndex={0}\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === \"Escape\") {\n setIsHovered(false);\n }\n }}\n >\n <RiskDetailsCard riskDetails={riskDetails} />\n </div>\n )}\n </div>\n );\n }\n);\n\nPercentageInputField.displayName = \"PercentageInputField\";\n"],"names":["PercentageInputField","forwardRef","id","label","labelExtra","value","onChange","errorMessage","defaultValue","disabled","max","min","required","isRequiredConditional","bg","tags","color","className","originalCase","tooltip","simpleMode","inputFieldClassName","isAiExtracted","confidenceScore","confidenceType","confidenceTooltip","sourceMeta","onConfidenceScoreClick","isGTN","gtnName","inputStyle","withDollarSign","labelClassName","isLiveField","onBlur","onAddGTNToDocument","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","placeholder","inputEmphasis","props","ref","t","useTranslation","showRiskSkin","emphasisModifiedSkin","emphasisDeletedSkin","emphasisSuccessSkin","isHovered","setIsHovered","useState","handleAddGTNToDocument","_value","jsxs","jsx","cn","InputLabel","BoltOutlined","shouldShowConfidenceScore","AIExtractedIndicator","Label","Tooltip","HelpIcon","getConfidenceScoreBadgeClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","getConfidenceScoreBadgeTextColor","AntTooltip","NoteAddOutlined","Typography"],"mappings":";;;;;;;;;;;;;;AA4KO,MAAMA,KAAuBC;AAAA,EAIlC,CACE;AAAA,IACE,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,KAAAC;AAAA,IACA,KAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,uBAAAC,IAAwB;AAAA,IACxB,IAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,SAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,qBAAAC,IAAsB;AAAA,IACtB,eAAAC,IAAgB;AAAA,IAChB,iBAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,mBAAAC;AAAA,IACA,YAAAC,IAAa,CAAA;AAAA,IACb,wBAAAC;AAA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