@timeax/form-palette 0.2.0 → 0.2.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/extra.js +61 -61
- package/dist/extra.js.map +1 -1
- package/dist/extra.mjs +60 -60
- package/dist/extra.mjs.map +1 -1
- package/dist/index.js +61 -61
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -60
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/extra.mjs
CHANGED
|
@@ -10,10 +10,10 @@ import { Slot } from '@radix-ui/react-slot';
|
|
|
10
10
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
11
11
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
12
12
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
13
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
13
14
|
import { Virtuoso, VirtuosoGrid } from 'react-virtuoso';
|
|
14
15
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
15
16
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
16
|
-
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
17
17
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
18
18
|
import '@radix-ui/react-toggle';
|
|
19
19
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -21050,6 +21050,59 @@ var checkboxModule = {
|
|
|
21050
21050
|
tags: ["checkbox", "group", "boolean", "tri-state"]
|
|
21051
21051
|
}
|
|
21052
21052
|
};
|
|
21053
|
+
function ScrollArea({
|
|
21054
|
+
className,
|
|
21055
|
+
children,
|
|
21056
|
+
...props
|
|
21057
|
+
}) {
|
|
21058
|
+
return /* @__PURE__ */ jsxs(
|
|
21059
|
+
ScrollAreaPrimitive.Root,
|
|
21060
|
+
{
|
|
21061
|
+
"data-slot": "scroll-area",
|
|
21062
|
+
className: cn("relative", className),
|
|
21063
|
+
...props,
|
|
21064
|
+
children: [
|
|
21065
|
+
/* @__PURE__ */ jsx(
|
|
21066
|
+
ScrollAreaPrimitive.Viewport,
|
|
21067
|
+
{
|
|
21068
|
+
"data-slot": "scroll-area-viewport",
|
|
21069
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
21070
|
+
children
|
|
21071
|
+
}
|
|
21072
|
+
),
|
|
21073
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
21074
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
21075
|
+
]
|
|
21076
|
+
}
|
|
21077
|
+
);
|
|
21078
|
+
}
|
|
21079
|
+
function ScrollBar({
|
|
21080
|
+
className,
|
|
21081
|
+
orientation = "vertical",
|
|
21082
|
+
...props
|
|
21083
|
+
}) {
|
|
21084
|
+
return /* @__PURE__ */ jsx(
|
|
21085
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
21086
|
+
{
|
|
21087
|
+
"data-slot": "scroll-area-scrollbar",
|
|
21088
|
+
orientation,
|
|
21089
|
+
className: cn(
|
|
21090
|
+
"flex touch-none p-px transition-colors select-none",
|
|
21091
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
21092
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
21093
|
+
className
|
|
21094
|
+
),
|
|
21095
|
+
...props,
|
|
21096
|
+
children: /* @__PURE__ */ jsx(
|
|
21097
|
+
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
21098
|
+
{
|
|
21099
|
+
"data-slot": "scroll-area-thumb",
|
|
21100
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
21101
|
+
}
|
|
21102
|
+
)
|
|
21103
|
+
}
|
|
21104
|
+
);
|
|
21105
|
+
}
|
|
21053
21106
|
function normalizeOptions(opts, config) {
|
|
21054
21107
|
return globalNormalizeOptions(opts, config);
|
|
21055
21108
|
}
|
|
@@ -21463,7 +21516,7 @@ var ShadcnSelectVariant = React74.forwardRef(function ShadcnSelectVariant2(props
|
|
|
21463
21516
|
}
|
|
21464
21517
|
}
|
|
21465
21518
|
)
|
|
21466
|
-
) : /* @__PURE__ */ jsx(
|
|
21519
|
+
) : /* @__PURE__ */ jsx(ScrollArea, { className: "max-h-60", children: /* @__PURE__ */ jsx("div", { children: filteredItems.map((item, index) => {
|
|
21467
21520
|
var _a2, _b2;
|
|
21468
21521
|
const optionNode = /* @__PURE__ */ jsx(
|
|
21469
21522
|
SelectItem,
|
|
@@ -21518,7 +21571,7 @@ var ShadcnSelectVariant = React74.forwardRef(function ShadcnSelectVariant2(props
|
|
|
21518
21571
|
setQuery("");
|
|
21519
21572
|
}
|
|
21520
21573
|
});
|
|
21521
|
-
}) })
|
|
21574
|
+
}) }) })
|
|
21522
21575
|
)
|
|
21523
21576
|
] })
|
|
21524
21577
|
]
|
|
@@ -23522,7 +23575,7 @@ var ShadcnKeyValueVariant = React74.forwardRef(function ShadcnKeyValueVariant2(p
|
|
|
23522
23575
|
}
|
|
23523
23576
|
)
|
|
23524
23577
|
] }),
|
|
23525
|
-
items.length === 0 ? /* @__PURE__ */ jsx("div", { className: "rounded-md border border-border/50 px-3 py-6 text-center text-sm text-muted-foreground", children: emptyLabel }) : /* @__PURE__ */ jsx(
|
|
23578
|
+
items.length === 0 ? /* @__PURE__ */ jsx("div", { className: "rounded-md border border-border/50 px-3 py-6 text-center text-sm text-muted-foreground", children: emptyLabel }) : /* @__PURE__ */ jsx(ScrollArea, { className: "max-h-64 rounded-md border border-border/50", children: /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/50", children: items.map((pair, index) => /* @__PURE__ */ jsxs(
|
|
23526
23579
|
"div",
|
|
23527
23580
|
{
|
|
23528
23581
|
className: "flex items-center justify-between gap-2 px-2 py-1.5",
|
|
@@ -24461,59 +24514,6 @@ var treeselectModule = {
|
|
|
24461
24514
|
Variant: treeselect_default
|
|
24462
24515
|
};
|
|
24463
24516
|
var treeselect_default2 = treeselectModule;
|
|
24464
|
-
function ScrollArea({
|
|
24465
|
-
className,
|
|
24466
|
-
children,
|
|
24467
|
-
...props
|
|
24468
|
-
}) {
|
|
24469
|
-
return /* @__PURE__ */ jsxs(
|
|
24470
|
-
ScrollAreaPrimitive.Root,
|
|
24471
|
-
{
|
|
24472
|
-
"data-slot": "scroll-area",
|
|
24473
|
-
className: cn("relative", className),
|
|
24474
|
-
...props,
|
|
24475
|
-
children: [
|
|
24476
|
-
/* @__PURE__ */ jsx(
|
|
24477
|
-
ScrollAreaPrimitive.Viewport,
|
|
24478
|
-
{
|
|
24479
|
-
"data-slot": "scroll-area-viewport",
|
|
24480
|
-
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
24481
|
-
children
|
|
24482
|
-
}
|
|
24483
|
-
),
|
|
24484
|
-
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
24485
|
-
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
24486
|
-
]
|
|
24487
|
-
}
|
|
24488
|
-
);
|
|
24489
|
-
}
|
|
24490
|
-
function ScrollBar({
|
|
24491
|
-
className,
|
|
24492
|
-
orientation = "vertical",
|
|
24493
|
-
...props
|
|
24494
|
-
}) {
|
|
24495
|
-
return /* @__PURE__ */ jsx(
|
|
24496
|
-
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
24497
|
-
{
|
|
24498
|
-
"data-slot": "scroll-area-scrollbar",
|
|
24499
|
-
orientation,
|
|
24500
|
-
className: cn(
|
|
24501
|
-
"flex touch-none p-px transition-colors select-none",
|
|
24502
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
24503
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
24504
|
-
className
|
|
24505
|
-
),
|
|
24506
|
-
...props,
|
|
24507
|
-
children: /* @__PURE__ */ jsx(
|
|
24508
|
-
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
24509
|
-
{
|
|
24510
|
-
"data-slot": "scroll-area-thumb",
|
|
24511
|
-
className: "bg-border relative flex-1 rounded-full"
|
|
24512
|
-
}
|
|
24513
|
-
)
|
|
24514
|
-
}
|
|
24515
|
-
);
|
|
24516
|
-
}
|
|
24517
24517
|
function fileId() {
|
|
24518
24518
|
return `file_${Math.random().toString(36).slice(2)}`;
|
|
24519
24519
|
}
|
|
@@ -29150,16 +29150,16 @@ function OptionList(props) {
|
|
|
29150
29150
|
[draft, isMulti]
|
|
29151
29151
|
);
|
|
29152
29152
|
if (s3 == null ? void 0 : s3.errorCode) {
|
|
29153
|
-
return /* @__PURE__ */ jsx(
|
|
29153
|
+
return /* @__PURE__ */ jsx(ScrollArea, { className: cn("h-full min-h-0", className), children: /* @__PURE__ */ jsxs("div", { className: "px-3 py-4 text-sm opacity-70", children: [
|
|
29154
29154
|
"Error: ",
|
|
29155
29155
|
String(s3.errorCode)
|
|
29156
29156
|
] }) });
|
|
29157
29157
|
}
|
|
29158
29158
|
if ((s3 == null ? void 0 : s3.loading) && !((_b = s3 == null ? void 0 : s3.optionsList) == null ? void 0 : _b.length)) {
|
|
29159
|
-
return /* @__PURE__ */ jsx(
|
|
29159
|
+
return /* @__PURE__ */ jsx(ScrollArea, { className: cn("h-full min-h-0", className), children: /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-sm opacity-70", children: "Loading\u2026" }) });
|
|
29160
29160
|
}
|
|
29161
29161
|
if (!options.length) {
|
|
29162
|
-
return /* @__PURE__ */ jsx(
|
|
29162
|
+
return /* @__PURE__ */ jsx(ScrollArea, { className: cn("h-full min-h-0", className), children: /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-sm opacity-70", children: "No results" }) });
|
|
29163
29163
|
}
|
|
29164
29164
|
return /* @__PURE__ */ jsx("div", { className: cn("h-full min-h-0 overflow-hidden", className), children: /* @__PURE__ */ jsx("div", { className: "h-full min-h-0 p-1", children: /* @__PURE__ */ jsx(
|
|
29165
29165
|
Virtuoso,
|