@apptimate/ui 4.4.0 → 4.5.0
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/package.json
CHANGED
|
@@ -171,6 +171,7 @@ export interface PickerTriggerProps {
|
|
|
171
171
|
value?: string | null;
|
|
172
172
|
placeholder?: string;
|
|
173
173
|
isRequired?: boolean;
|
|
174
|
+
error?: string;
|
|
174
175
|
onClick: () => void;
|
|
175
176
|
onClear?: () => void;
|
|
176
177
|
}
|
|
@@ -180,6 +181,7 @@ export function PickerTrigger({
|
|
|
180
181
|
value,
|
|
181
182
|
placeholder = "Select…",
|
|
182
183
|
isRequired = false,
|
|
184
|
+
error,
|
|
183
185
|
onClick,
|
|
184
186
|
onClear,
|
|
185
187
|
}: PickerTriggerProps) {
|
|
@@ -194,9 +196,11 @@ export function PickerTrigger({
|
|
|
194
196
|
onClick={onClick}
|
|
195
197
|
className={`
|
|
196
198
|
w-full flex items-center justify-between px-3.5 py-2.5 bg-surface-0 border-[1.5px] rounded-[10px] text-[13.5px] text-left transition-all
|
|
197
|
-
${
|
|
198
|
-
? "border-
|
|
199
|
-
:
|
|
199
|
+
${error
|
|
200
|
+
? "border-red-500 text-red-500"
|
|
201
|
+
: value
|
|
202
|
+
? "border-border-subtle text-foreground-1"
|
|
203
|
+
: "border-border-subtle text-foreground-disabled"
|
|
200
204
|
}
|
|
201
205
|
hover:border-gray-300 focus:outline-none focus:border-gray-300 focus:bg-surface-1
|
|
202
206
|
`}
|
|
@@ -216,6 +220,7 @@ export function PickerTrigger({
|
|
|
216
220
|
<Search size={14} className="text-gray-400" />
|
|
217
221
|
</div>
|
|
218
222
|
</button>
|
|
223
|
+
{error && <span className="text-xs text-red-500 mt-0.5">{error}</span>}
|
|
219
224
|
</div>
|
|
220
225
|
);
|
|
221
226
|
}
|
|
@@ -18,7 +18,7 @@ interface PartyPickerProps {
|
|
|
18
18
|
label?: string;
|
|
19
19
|
placeholder?: string;
|
|
20
20
|
isRequired?: boolean;
|
|
21
|
-
partyType?: "customer" | "supplier" | "all";
|
|
21
|
+
partyType?: "customer" | "supplier" | "all" | "artisan";
|
|
22
22
|
customTrigger?: (onClick: () => void) => React.ReactNode;
|
|
23
23
|
}
|
|
24
24
|
|