@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 CHANGED
@@ -11,10 +11,10 @@ var reactSlot = require('@radix-ui/react-slot');
11
11
  var SwitchPrimitive = require('@radix-ui/react-switch');
12
12
  var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
13
13
  var CheckboxPrimitive = require('@radix-ui/react-checkbox');
14
+ var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
14
15
  var reactVirtuoso = require('react-virtuoso');
15
16
  var SliderPrimitive = require('@radix-ui/react-slider');
16
17
  var DialogPrimitive = require('@radix-ui/react-dialog');
17
- var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
18
18
  var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
19
19
  require('@radix-ui/react-toggle');
20
20
  var TooltipPrimitive = require('@radix-ui/react-tooltip');
@@ -53,9 +53,9 @@ var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitiv
53
53
  var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
54
54
  var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
55
55
  var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
56
+ var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
56
57
  var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
57
58
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
58
- var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
59
59
  var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
60
60
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
61
61
  var Editor__default = /*#__PURE__*/_interopDefault(Editor);
@@ -21088,6 +21088,59 @@ var checkboxModule = {
21088
21088
  tags: ["checkbox", "group", "boolean", "tri-state"]
21089
21089
  }
21090
21090
  };
21091
+ function ScrollArea({
21092
+ className,
21093
+ children,
21094
+ ...props
21095
+ }) {
21096
+ return /* @__PURE__ */ jsxRuntime.jsxs(
21097
+ ScrollAreaPrimitive__namespace.Root,
21098
+ {
21099
+ "data-slot": "scroll-area",
21100
+ className: cn("relative", className),
21101
+ ...props,
21102
+ children: [
21103
+ /* @__PURE__ */ jsxRuntime.jsx(
21104
+ ScrollAreaPrimitive__namespace.Viewport,
21105
+ {
21106
+ "data-slot": "scroll-area-viewport",
21107
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
21108
+ children
21109
+ }
21110
+ ),
21111
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
21112
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
21113
+ ]
21114
+ }
21115
+ );
21116
+ }
21117
+ function ScrollBar({
21118
+ className,
21119
+ orientation = "vertical",
21120
+ ...props
21121
+ }) {
21122
+ return /* @__PURE__ */ jsxRuntime.jsx(
21123
+ ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
21124
+ {
21125
+ "data-slot": "scroll-area-scrollbar",
21126
+ orientation,
21127
+ className: cn(
21128
+ "flex touch-none p-px transition-colors select-none",
21129
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
21130
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
21131
+ className
21132
+ ),
21133
+ ...props,
21134
+ children: /* @__PURE__ */ jsxRuntime.jsx(
21135
+ ScrollAreaPrimitive__namespace.ScrollAreaThumb,
21136
+ {
21137
+ "data-slot": "scroll-area-thumb",
21138
+ className: "bg-border relative flex-1 rounded-full"
21139
+ }
21140
+ )
21141
+ }
21142
+ );
21143
+ }
21091
21144
  function normalizeOptions(opts, config) {
21092
21145
  return globalNormalizeOptions(opts, config);
21093
21146
  }
@@ -21501,7 +21554,7 @@ var ShadcnSelectVariant = React74__namespace.forwardRef(function ShadcnSelectVar
21501
21554
  }
21502
21555
  }
21503
21556
  )
21504
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-60 overflow-auto", children: filteredItems.map((item, index) => {
21557
+ ) : /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "max-h-60", children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: filteredItems.map((item, index) => {
21505
21558
  var _a2, _b2;
21506
21559
  const optionNode = /* @__PURE__ */ jsxRuntime.jsx(
21507
21560
  SelectItem,
@@ -21556,7 +21609,7 @@ var ShadcnSelectVariant = React74__namespace.forwardRef(function ShadcnSelectVar
21556
21609
  setQuery("");
21557
21610
  }
21558
21611
  });
21559
- }) })
21612
+ }) }) })
21560
21613
  )
21561
21614
  ] })
21562
21615
  ]
@@ -23560,7 +23613,7 @@ var ShadcnKeyValueVariant = React74__namespace.forwardRef(function ShadcnKeyValu
23560
23613
  }
23561
23614
  )
23562
23615
  ] }),
23563
- items.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border border-border/50 px-3 py-6 text-center text-sm text-muted-foreground", children: emptyLabel }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-64 overflow-auto rounded-md border border-border/50", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-border/50", children: items.map((pair, index) => /* @__PURE__ */ jsxRuntime.jsxs(
23616
+ items.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border border-border/50 px-3 py-6 text-center text-sm text-muted-foreground", children: emptyLabel }) : /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "max-h-64 rounded-md border border-border/50", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-border/50", children: items.map((pair, index) => /* @__PURE__ */ jsxRuntime.jsxs(
23564
23617
  "div",
23565
23618
  {
23566
23619
  className: "flex items-center justify-between gap-2 px-2 py-1.5",
@@ -24499,59 +24552,6 @@ var treeselectModule = {
24499
24552
  Variant: treeselect_default
24500
24553
  };
24501
24554
  var treeselect_default2 = treeselectModule;
24502
- function ScrollArea({
24503
- className,
24504
- children,
24505
- ...props
24506
- }) {
24507
- return /* @__PURE__ */ jsxRuntime.jsxs(
24508
- ScrollAreaPrimitive__namespace.Root,
24509
- {
24510
- "data-slot": "scroll-area",
24511
- className: cn("relative", className),
24512
- ...props,
24513
- children: [
24514
- /* @__PURE__ */ jsxRuntime.jsx(
24515
- ScrollAreaPrimitive__namespace.Viewport,
24516
- {
24517
- "data-slot": "scroll-area-viewport",
24518
- className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
24519
- children
24520
- }
24521
- ),
24522
- /* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
24523
- /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
24524
- ]
24525
- }
24526
- );
24527
- }
24528
- function ScrollBar({
24529
- className,
24530
- orientation = "vertical",
24531
- ...props
24532
- }) {
24533
- return /* @__PURE__ */ jsxRuntime.jsx(
24534
- ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
24535
- {
24536
- "data-slot": "scroll-area-scrollbar",
24537
- orientation,
24538
- className: cn(
24539
- "flex touch-none p-px transition-colors select-none",
24540
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
24541
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
24542
- className
24543
- ),
24544
- ...props,
24545
- children: /* @__PURE__ */ jsxRuntime.jsx(
24546
- ScrollAreaPrimitive__namespace.ScrollAreaThumb,
24547
- {
24548
- "data-slot": "scroll-area-thumb",
24549
- className: "bg-border relative flex-1 rounded-full"
24550
- }
24551
- )
24552
- }
24553
- );
24554
- }
24555
24555
  function fileId() {
24556
24556
  return `file_${Math.random().toString(36).slice(2)}`;
24557
24557
  }
@@ -29188,16 +29188,16 @@ function OptionList(props) {
29188
29188
  [draft, isMulti]
29189
29189
  );
29190
29190
  if (s3 == null ? void 0 : s3.errorCode) {
29191
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-full min-h-0 overflow-y-auto", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-4 text-sm opacity-70", children: [
29191
+ return /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: cn("h-full min-h-0", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-4 text-sm opacity-70", children: [
29192
29192
  "Error: ",
29193
29193
  String(s3.errorCode)
29194
29194
  ] }) });
29195
29195
  }
29196
29196
  if ((s3 == null ? void 0 : s3.loading) && !((_b = s3 == null ? void 0 : s3.optionsList) == null ? void 0 : _b.length)) {
29197
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-full min-h-0 overflow-y-auto", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-4 text-sm opacity-70", children: "Loading\u2026" }) });
29197
+ return /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: cn("h-full min-h-0", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-4 text-sm opacity-70", children: "Loading\u2026" }) });
29198
29198
  }
29199
29199
  if (!options.length) {
29200
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-full min-h-0 overflow-y-auto", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-4 text-sm opacity-70", children: "No results" }) });
29200
+ return /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: cn("h-full min-h-0", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-4 text-sm opacity-70", children: "No results" }) });
29201
29201
  }
29202
29202
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-full min-h-0 overflow-hidden", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full min-h-0 p-1", children: /* @__PURE__ */ jsxRuntime.jsx(
29203
29203
  reactVirtuoso.Virtuoso,