@invana/forms 0.0.20 → 0.0.22
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/index.cjs +19 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -5
- package/dist/index.d.ts +21 -5
- package/dist/index.js +19 -17
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -147,13 +147,14 @@ var FormMessage = React2__namespace.forwardRef(({ className, children, ...props
|
|
|
147
147
|
});
|
|
148
148
|
FormMessage.displayName = "FormMessage";
|
|
149
149
|
var Input = React2__namespace.forwardRef(
|
|
150
|
-
({ className, type, ...props }, ref) => {
|
|
150
|
+
({ className, type, inputSize = "default", ...props }, ref) => {
|
|
151
151
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
152
152
|
"input",
|
|
153
153
|
{
|
|
154
154
|
type,
|
|
155
155
|
className: ui.cn(
|
|
156
|
-
|
|
156
|
+
inputSize === "sm" ? "h-[26px] px-2 py-0" : "h-10 px-3 py-2",
|
|
157
|
+
"flex w-full rounded-control border border-input bg-background text-base ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
157
158
|
className
|
|
158
159
|
),
|
|
159
160
|
ref,
|
|
@@ -201,12 +202,13 @@ var PasswordInput = React2__namespace.forwardRef(
|
|
|
201
202
|
}
|
|
202
203
|
);
|
|
203
204
|
PasswordInput.displayName = "PasswordInput";
|
|
204
|
-
var Textarea = React2__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
205
|
+
var Textarea = React2__namespace.forwardRef(({ className, inputSize = "default", ...props }, ref) => {
|
|
205
206
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
206
207
|
"textarea",
|
|
207
208
|
{
|
|
208
209
|
className: ui.cn(
|
|
209
|
-
"
|
|
210
|
+
inputSize === "sm" ? "min-h-[52px] px-2 py-1" : "min-h-[80px] px-3 py-2",
|
|
211
|
+
"flex w-full rounded-control border border-input bg-background text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
210
212
|
className
|
|
211
213
|
),
|
|
212
214
|
ref,
|
|
@@ -283,12 +285,13 @@ RadioGroupItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
|
|
|
283
285
|
var Select = SelectPrimitive__namespace.Root;
|
|
284
286
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
285
287
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
286
|
-
var SelectTrigger = React2__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
288
|
+
var SelectTrigger = React2__namespace.forwardRef(({ className, children, triggerSize = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
287
289
|
SelectPrimitive__namespace.Trigger,
|
|
288
290
|
{
|
|
289
291
|
ref,
|
|
290
292
|
className: ui.cn(
|
|
291
|
-
|
|
293
|
+
triggerSize === "sm" ? "h-[26px] px-2 py-0" : "h-9 px-3 py-2",
|
|
294
|
+
"flex w-full items-center justify-between whitespace-nowrap rounded-control border border-input bg-transparent shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
292
295
|
className
|
|
293
296
|
),
|
|
294
297
|
...props,
|
|
@@ -357,7 +360,7 @@ var SelectLabel = React2__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
357
360
|
SelectPrimitive__namespace.Label,
|
|
358
361
|
{
|
|
359
362
|
ref,
|
|
360
|
-
className: ui.cn("px-2 py-1.5
|
|
363
|
+
className: ui.cn("px-2 py-1.5 font-semibold", className),
|
|
361
364
|
...props
|
|
362
365
|
}
|
|
363
366
|
));
|
|
@@ -520,7 +523,7 @@ var SliderNumber = ({
|
|
|
520
523
|
};
|
|
521
524
|
var IconInput = ({ value, onChange }) => {
|
|
522
525
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
523
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-control border bg-muted
|
|
526
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-control border bg-muted", children: value ? value.slice(0, 2) : "\u2013" }),
|
|
524
527
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
525
528
|
Input,
|
|
526
529
|
{
|
|
@@ -528,7 +531,7 @@ var IconInput = ({ value, onChange }) => {
|
|
|
528
531
|
value: value ?? "",
|
|
529
532
|
onChange: (e) => onChange?.(e.target.value),
|
|
530
533
|
placeholder: "icon name",
|
|
531
|
-
className: "h-8
|
|
534
|
+
className: "h-8"
|
|
532
535
|
}
|
|
533
536
|
)
|
|
534
537
|
] });
|
|
@@ -1246,7 +1249,6 @@ function FieldLegend({
|
|
|
1246
1249
|
className: ui.cn(
|
|
1247
1250
|
"mb-3 font-medium",
|
|
1248
1251
|
"data-[variant=legend]:text-base",
|
|
1249
|
-
"data-[variant=label]:text-sm",
|
|
1250
1252
|
className
|
|
1251
1253
|
),
|
|
1252
1254
|
...props
|
|
@@ -1326,7 +1328,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1326
1328
|
{
|
|
1327
1329
|
"data-slot": "field-label",
|
|
1328
1330
|
className: ui.cn(
|
|
1329
|
-
"flex w-fit items-center gap-2
|
|
1331
|
+
"flex w-fit items-center gap-2 font-medium leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
1330
1332
|
className
|
|
1331
1333
|
),
|
|
1332
1334
|
...props
|
|
@@ -1339,7 +1341,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
1339
1341
|
{
|
|
1340
1342
|
"data-slot": "field-description",
|
|
1341
1343
|
className: ui.cn(
|
|
1342
|
-
"text-muted-foreground
|
|
1344
|
+
"text-muted-foreground font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
1343
1345
|
"nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
|
|
1344
1346
|
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
1345
1347
|
className
|
|
@@ -1359,7 +1361,7 @@ function FieldSeparator({
|
|
|
1359
1361
|
"data-slot": "field-separator",
|
|
1360
1362
|
"data-content": !!children,
|
|
1361
1363
|
className: ui.cn(
|
|
1362
|
-
"relative -my-2 h-5
|
|
1364
|
+
"relative -my-2 h-5 group-data-[variant=outline]/field-group:-mb-2",
|
|
1363
1365
|
className
|
|
1364
1366
|
),
|
|
1365
1367
|
...props,
|
|
@@ -1405,7 +1407,7 @@ function FieldError({
|
|
|
1405
1407
|
{
|
|
1406
1408
|
role: "alert",
|
|
1407
1409
|
"data-slot": "field-error",
|
|
1408
|
-
className: ui.cn("text-destructive
|
|
1410
|
+
className: ui.cn("text-destructive font-normal", className),
|
|
1409
1411
|
...props,
|
|
1410
1412
|
children: content
|
|
1411
1413
|
}
|
|
@@ -1436,7 +1438,7 @@ function InputGroup({ className, ...props }) {
|
|
|
1436
1438
|
);
|
|
1437
1439
|
}
|
|
1438
1440
|
var inputGroupAddonVariants = classVarianceAuthority.cva(
|
|
1439
|
-
"text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5
|
|
1441
|
+
"text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-control [&>svg:not([class*='size-'])]:size-4",
|
|
1440
1442
|
{
|
|
1441
1443
|
variants: {
|
|
1442
1444
|
align: {
|
|
@@ -1474,7 +1476,7 @@ function InputGroupAddon({
|
|
|
1474
1476
|
);
|
|
1475
1477
|
}
|
|
1476
1478
|
var inputGroupButtonVariants = classVarianceAuthority.cva(
|
|
1477
|
-
"flex items-center gap-2
|
|
1479
|
+
"flex items-center gap-2 shadow-none",
|
|
1478
1480
|
{
|
|
1479
1481
|
variants: {
|
|
1480
1482
|
size: {
|
|
@@ -1512,7 +1514,7 @@ function InputGroupText({ className, ...props }) {
|
|
|
1512
1514
|
"span",
|
|
1513
1515
|
{
|
|
1514
1516
|
className: ui.cn(
|
|
1515
|
-
"text-muted-foreground flex items-center gap-2
|
|
1517
|
+
"text-muted-foreground flex items-center gap-2 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
1516
1518
|
className
|
|
1517
1519
|
),
|
|
1518
1520
|
...props
|