@btst/components 0.0.0-stage → 1.0.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.
Files changed (161) hide show
  1. package/LICENSE.md +17 -0
  2. package/dist/_private/ui/styles/markdown-editor.css +31 -0
  3. package/dist/auto-form/index.cjs +8 -0
  4. package/dist/auto-form/index.d.cts +26 -0
  5. package/dist/auto-form/index.d.mts +26 -0
  6. package/dist/auto-form/index.d.ts +26 -0
  7. package/dist/auto-form/index.mjs +1 -0
  8. package/dist/empty/index.cjs +12 -0
  9. package/dist/empty/index.d.cts +15 -0
  10. package/dist/empty/index.d.mts +15 -0
  11. package/dist/empty/index.d.ts +15 -0
  12. package/dist/empty/index.mjs +1 -0
  13. package/dist/form-builder/index.cjs +16 -0
  14. package/dist/form-builder/index.d.cts +395 -0
  15. package/dist/form-builder/index.d.mts +395 -0
  16. package/dist/form-builder/index.d.ts +395 -0
  17. package/dist/form-builder/index.mjs +4 -0
  18. package/dist/markdown/index.cjs +9 -0
  19. package/dist/markdown/index.d.cts +46 -0
  20. package/dist/markdown/index.d.mts +46 -0
  21. package/dist/markdown/index.d.ts +46 -0
  22. package/dist/markdown/index.mjs +2 -0
  23. package/dist/multi-select/index.cjs +7 -0
  24. package/dist/multi-select/index.d.cts +78 -0
  25. package/dist/multi-select/index.d.mts +78 -0
  26. package/dist/multi-select/index.d.ts +78 -0
  27. package/dist/multi-select/index.mjs +1 -0
  28. package/dist/search-select/index.cjs +7 -0
  29. package/dist/search-select/index.d.cts +16 -0
  30. package/dist/search-select/index.d.mts +16 -0
  31. package/dist/search-select/index.d.ts +16 -0
  32. package/dist/search-select/index.mjs +1 -0
  33. package/dist/shared/components.BdvBiegH.d.cts +291 -0
  34. package/dist/shared/components.BdvBiegH.d.mts +291 -0
  35. package/dist/shared/components.BdvBiegH.d.ts +291 -0
  36. package/dist/shared/components.CZMWR72v.d.cts +10 -0
  37. package/dist/shared/components.CZMWR72v.d.mts +10 -0
  38. package/dist/shared/components.CZMWR72v.d.ts +10 -0
  39. package/dist/stepped-auto-form/index.cjs +7 -0
  40. package/dist/stepped-auto-form/index.d.cts +37 -0
  41. package/dist/stepped-auto-form/index.d.mts +37 -0
  42. package/dist/stepped-auto-form/index.d.ts +37 -0
  43. package/dist/stepped-auto-form/index.mjs +1 -0
  44. package/dist/style.css +440 -0
  45. package/dist/ui/src/components/accordion.cjs +81 -0
  46. package/dist/ui/src/components/accordion.mjs +62 -0
  47. package/dist/ui/src/components/auto-form/common/label.cjs +18 -0
  48. package/dist/ui/src/components/auto-form/common/label.mjs +16 -0
  49. package/dist/ui/src/components/auto-form/common/tooltip.cjs +9 -0
  50. package/dist/ui/src/components/auto-form/common/tooltip.mjs +7 -0
  51. package/dist/ui/src/components/auto-form/config.cjs +40 -0
  52. package/dist/ui/src/components/auto-form/config.mjs +37 -0
  53. package/dist/ui/src/components/auto-form/dependencies.cjs +48 -0
  54. package/dist/ui/src/components/auto-form/dependencies.mjs +46 -0
  55. package/dist/ui/src/components/auto-form/fields/array.cjs +266 -0
  56. package/dist/ui/src/components/auto-form/fields/array.mjs +264 -0
  57. package/dist/ui/src/components/auto-form/fields/checkbox.cjs +38 -0
  58. package/dist/ui/src/components/auto-form/fields/checkbox.mjs +36 -0
  59. package/dist/ui/src/components/auto-form/fields/date.cjs +67 -0
  60. package/dist/ui/src/components/auto-form/fields/date.mjs +65 -0
  61. package/dist/ui/src/components/auto-form/fields/enum.cjs +73 -0
  62. package/dist/ui/src/components/auto-form/fields/enum.mjs +71 -0
  63. package/dist/ui/src/components/auto-form/fields/input.cjs +32 -0
  64. package/dist/ui/src/components/auto-form/fields/input.mjs +30 -0
  65. package/dist/ui/src/components/auto-form/fields/number.cjs +31 -0
  66. package/dist/ui/src/components/auto-form/fields/number.mjs +29 -0
  67. package/dist/ui/src/components/auto-form/fields/object.cjs +233 -0
  68. package/dist/ui/src/components/auto-form/fields/object.mjs +217 -0
  69. package/dist/ui/src/components/auto-form/fields/radio-group.cjs +67 -0
  70. package/dist/ui/src/components/auto-form/fields/radio-group.mjs +65 -0
  71. package/dist/ui/src/components/auto-form/fields/switch.cjs +38 -0
  72. package/dist/ui/src/components/auto-form/fields/switch.mjs +36 -0
  73. package/dist/ui/src/components/auto-form/fields/textarea.cjs +31 -0
  74. package/dist/ui/src/components/auto-form/fields/textarea.mjs +29 -0
  75. package/dist/ui/src/components/auto-form/helpers.cjs +270 -0
  76. package/dist/ui/src/components/auto-form/helpers.mjs +259 -0
  77. package/dist/ui/src/components/auto-form/index.cjs +102 -0
  78. package/dist/ui/src/components/auto-form/index.mjs +93 -0
  79. package/dist/ui/src/components/auto-form/stepped-auto-form.cjs +374 -0
  80. package/dist/ui/src/components/auto-form/stepped-auto-form.mjs +368 -0
  81. package/dist/ui/src/components/auto-form/types.cjs +11 -0
  82. package/dist/ui/src/components/auto-form/types.mjs +9 -0
  83. package/dist/ui/src/components/badge.cjs +42 -0
  84. package/dist/ui/src/components/badge.mjs +39 -0
  85. package/dist/ui/src/components/button.cjs +56 -0
  86. package/dist/ui/src/components/button.mjs +53 -0
  87. package/dist/ui/src/components/calendar.cjs +207 -0
  88. package/dist/ui/src/components/calendar.mjs +190 -0
  89. package/dist/ui/src/components/checkbox.cjs +48 -0
  90. package/dist/ui/src/components/checkbox.mjs +32 -0
  91. package/dist/ui/src/components/command.cjs +118 -0
  92. package/dist/ui/src/components/command.mjs +111 -0
  93. package/dist/ui/src/components/date-picker.cjs +41 -0
  94. package/dist/ui/src/components/date-picker.mjs +39 -0
  95. package/dist/ui/src/components/dialog.cjs +141 -0
  96. package/dist/ui/src/components/dialog.mjs +118 -0
  97. package/dist/ui/src/components/empty.cjs +104 -0
  98. package/dist/ui/src/components/empty.mjs +97 -0
  99. package/dist/ui/src/components/form-builder/canvas.cjs +111 -0
  100. package/dist/ui/src/components/form-builder/canvas.mjs +109 -0
  101. package/dist/ui/src/components/form-builder/components/index.cjs +571 -0
  102. package/dist/ui/src/components/form-builder/components/index.mjs +554 -0
  103. package/dist/ui/src/components/form-builder/edit-field-dialog.cjs +131 -0
  104. package/dist/ui/src/components/form-builder/edit-field-dialog.mjs +129 -0
  105. package/dist/ui/src/components/form-builder/form-preview.cjs +73 -0
  106. package/dist/ui/src/components/form-builder/form-preview.mjs +71 -0
  107. package/dist/ui/src/components/form-builder/index.cjs +350 -0
  108. package/dist/ui/src/components/form-builder/index.mjs +344 -0
  109. package/dist/ui/src/components/form-builder/nested-field-editor-dialog.cjs +263 -0
  110. package/dist/ui/src/components/form-builder/nested-field-editor-dialog.mjs +261 -0
  111. package/dist/ui/src/components/form-builder/palette.cjs +52 -0
  112. package/dist/ui/src/components/form-builder/palette.mjs +49 -0
  113. package/dist/ui/src/components/form-builder/schema-utils.cjs +128 -0
  114. package/dist/ui/src/components/form-builder/schema-utils.mjs +122 -0
  115. package/dist/ui/src/components/form-builder/sortable-field.cjs +151 -0
  116. package/dist/ui/src/components/form-builder/sortable-field.mjs +148 -0
  117. package/dist/ui/src/components/form-builder/step-tabs.cjs +180 -0
  118. package/dist/ui/src/components/form-builder/step-tabs.mjs +178 -0
  119. package/dist/ui/src/components/form-builder/types.cjs +7 -0
  120. package/dist/ui/src/components/form-builder/types.mjs +5 -0
  121. package/dist/ui/src/components/form-builder/validation-schemas.cjs +67 -0
  122. package/dist/ui/src/components/form-builder/validation-schemas.mjs +56 -0
  123. package/dist/ui/src/components/form.cjs +120 -0
  124. package/dist/ui/src/components/form.mjs +98 -0
  125. package/dist/ui/src/components/input.cjs +23 -0
  126. package/dist/ui/src/components/input.mjs +21 -0
  127. package/dist/ui/src/components/label.cjs +39 -0
  128. package/dist/ui/src/components/label.mjs +23 -0
  129. package/dist/ui/src/components/markdown-content.cjs +334 -0
  130. package/dist/ui/src/components/markdown-content.mjs +325 -0
  131. package/dist/ui/src/components/markdown-editor.cjs +180 -0
  132. package/dist/ui/src/components/markdown-editor.mjs +178 -0
  133. package/dist/ui/src/components/multi-select.cjs +555 -0
  134. package/dist/ui/src/components/multi-select.mjs +540 -0
  135. package/dist/ui/src/components/popover.cjs +60 -0
  136. package/dist/ui/src/components/popover.mjs +42 -0
  137. package/dist/ui/src/components/radio-group.cjs +62 -0
  138. package/dist/ui/src/components/radio-group.mjs +45 -0
  139. package/dist/ui/src/components/search-select.cjs +99 -0
  140. package/dist/ui/src/components/search-select.mjs +83 -0
  141. package/dist/ui/src/components/select.cjs +161 -0
  142. package/dist/ui/src/components/select.mjs +139 -0
  143. package/dist/ui/src/components/separator.cjs +43 -0
  144. package/dist/ui/src/components/separator.mjs +27 -0
  145. package/dist/ui/src/components/switch.cjs +48 -0
  146. package/dist/ui/src/components/switch.mjs +32 -0
  147. package/dist/ui/src/components/tabs.cjs +84 -0
  148. package/dist/ui/src/components/tabs.mjs +65 -0
  149. package/dist/ui/src/components/textarea.cjs +20 -0
  150. package/dist/ui/src/components/textarea.mjs +18 -0
  151. package/dist/ui/src/hooks/use-debounce.cjs +16 -0
  152. package/dist/ui/src/hooks/use-debounce.mjs +14 -0
  153. package/dist/ui/src/lib/schema-converter.cjs +94 -0
  154. package/dist/ui/src/lib/schema-converter.mjs +92 -0
  155. package/dist/ui/src/lib/throttle.cjs +56 -0
  156. package/dist/ui/src/lib/throttle.mjs +54 -0
  157. package/dist/ui/src/lib/utils.cjs +10 -0
  158. package/dist/ui/src/lib/utils.mjs +8 -0
  159. package/dist/ui.css +131 -0
  160. package/package.json +176 -3
  161. package/README.md +0 -3
@@ -0,0 +1,45 @@
1
+ 'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
4
+ import { CircleIcon } from 'lucide-react';
5
+ import { cn } from '../lib/utils.mjs';
6
+
7
+ function RadioGroup({
8
+ className,
9
+ ...props
10
+ }) {
11
+ return /* @__PURE__ */ jsx(
12
+ RadioGroupPrimitive.Root,
13
+ {
14
+ "data-slot": "radio-group",
15
+ className: cn("grid gap-3", className),
16
+ ...props
17
+ }
18
+ );
19
+ }
20
+ function RadioGroupItem({
21
+ className,
22
+ ...props
23
+ }) {
24
+ return /* @__PURE__ */ jsx(
25
+ RadioGroupPrimitive.Item,
26
+ {
27
+ "data-slot": "radio-group-item",
28
+ className: cn(
29
+ "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
30
+ className
31
+ ),
32
+ ...props,
33
+ children: /* @__PURE__ */ jsx(
34
+ RadioGroupPrimitive.Indicator,
35
+ {
36
+ "data-slot": "radio-group-indicator",
37
+ className: "relative flex items-center justify-center",
38
+ children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
39
+ }
40
+ )
41
+ }
42
+ );
43
+ }
44
+
45
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,99 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const React = require('react');
6
+ const PopoverPrimitive = require('@radix-ui/react-popover');
7
+ const lucideReact = require('lucide-react');
8
+ const utils = require('../lib/utils.cjs');
9
+ const button = require('./button.cjs');
10
+ const command = require('./command.cjs');
11
+ const popover = require('./popover.cjs');
12
+
13
+ function _interopNamespaceCompat(e) {
14
+ if (e && typeof e === 'object' && 'default' in e) return e;
15
+ const n = Object.create(null);
16
+ if (e) {
17
+ for (const k in e) {
18
+ n[k] = e[k];
19
+ }
20
+ }
21
+ n.default = e;
22
+ return n;
23
+ }
24
+
25
+ const PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespaceCompat(PopoverPrimitive);
26
+
27
+ function SearchSelect({
28
+ options,
29
+ value,
30
+ onChange,
31
+ placeholder = "Select option",
32
+ emptyMessage = "No option found."
33
+ }) {
34
+ const id = React.useId();
35
+ const [open, setOpen] = React.useState(false);
36
+ return /* @__PURE__ */ jsxRuntime.jsxs(popover.Popover, { open, onOpenChange: setOpen, modal: false, children: [
37
+ /* @__PURE__ */ jsxRuntime.jsx(popover.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
38
+ button.Button,
39
+ {
40
+ id,
41
+ variant: "outline",
42
+ role: "combobox",
43
+ "aria-expanded": open,
44
+ className: "bg-background hover:bg-background border-input w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px]",
45
+ children: [
46
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: utils.cn("truncate", !value && "text-muted-foreground"), children: value ? options.find((option) => option.value === value)?.label : placeholder }),
47
+ /* @__PURE__ */ jsxRuntime.jsx(
48
+ lucideReact.ChevronDownIcon,
49
+ {
50
+ size: 16,
51
+ className: "text-muted-foreground/80 shrink-0",
52
+ "aria-hidden": "true"
53
+ }
54
+ )
55
+ ]
56
+ }
57
+ ) }),
58
+ /* @__PURE__ */ jsxRuntime.jsx(
59
+ PopoverPrimitive__namespace.Content,
60
+ {
61
+ align: "start",
62
+ sideOffset: 4,
63
+ className: utils.cn(
64
+ "border-input bg-popover text-popover-foreground pointer-events-auto",
65
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
66
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
67
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
68
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
69
+ "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
70
+ "z-50 w-full min-w-[var(--radix-popper-anchor-width)] origin-(--radix-popover-content-transform-origin)",
71
+ "rounded-md border p-0 shadow-md outline-hidden"
72
+ ),
73
+ children: /* @__PURE__ */ jsxRuntime.jsxs(command.Command, { children: [
74
+ /* @__PURE__ */ jsxRuntime.jsx(command.CommandInput, { placeholder: "Search options..." }),
75
+ /* @__PURE__ */ jsxRuntime.jsxs(command.CommandList, { children: [
76
+ /* @__PURE__ */ jsxRuntime.jsx(command.CommandEmpty, { children: emptyMessage }),
77
+ /* @__PURE__ */ jsxRuntime.jsx(command.CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
78
+ command.CommandItem,
79
+ {
80
+ value: option.value,
81
+ onSelect: (currentValue) => {
82
+ onChange(currentValue === value ? "" : currentValue);
83
+ setOpen(false);
84
+ },
85
+ children: [
86
+ option.label,
87
+ value === option.value && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { size: 16, className: "ml-auto" })
88
+ ]
89
+ },
90
+ option.value
91
+ )) })
92
+ ] })
93
+ ] })
94
+ }
95
+ )
96
+ ] });
97
+ }
98
+
99
+ module.exports = SearchSelect;
@@ -0,0 +1,83 @@
1
+ 'use client';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useId, useState } from 'react';
4
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
5
+ import { ChevronDownIcon, CheckIcon } from 'lucide-react';
6
+ import { cn } from '../lib/utils.mjs';
7
+ import { Button } from './button.mjs';
8
+ import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from './command.mjs';
9
+ import { Popover, PopoverTrigger } from './popover.mjs';
10
+
11
+ function SearchSelect({
12
+ options,
13
+ value,
14
+ onChange,
15
+ placeholder = "Select option",
16
+ emptyMessage = "No option found."
17
+ }) {
18
+ const id = useId();
19
+ const [open, setOpen] = useState(false);
20
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, modal: false, children: [
21
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
22
+ Button,
23
+ {
24
+ id,
25
+ variant: "outline",
26
+ role: "combobox",
27
+ "aria-expanded": open,
28
+ className: "bg-background hover:bg-background border-input w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px]",
29
+ children: [
30
+ /* @__PURE__ */ jsx("span", { className: cn("truncate", !value && "text-muted-foreground"), children: value ? options.find((option) => option.value === value)?.label : placeholder }),
31
+ /* @__PURE__ */ jsx(
32
+ ChevronDownIcon,
33
+ {
34
+ size: 16,
35
+ className: "text-muted-foreground/80 shrink-0",
36
+ "aria-hidden": "true"
37
+ }
38
+ )
39
+ ]
40
+ }
41
+ ) }),
42
+ /* @__PURE__ */ jsx(
43
+ PopoverPrimitive.Content,
44
+ {
45
+ align: "start",
46
+ sideOffset: 4,
47
+ className: cn(
48
+ "border-input bg-popover text-popover-foreground pointer-events-auto",
49
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
50
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
51
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
52
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
53
+ "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
54
+ "z-50 w-full min-w-[var(--radix-popper-anchor-width)] origin-(--radix-popover-content-transform-origin)",
55
+ "rounded-md border p-0 shadow-md outline-hidden"
56
+ ),
57
+ children: /* @__PURE__ */ jsxs(Command, { children: [
58
+ /* @__PURE__ */ jsx(CommandInput, { placeholder: "Search options..." }),
59
+ /* @__PURE__ */ jsxs(CommandList, { children: [
60
+ /* @__PURE__ */ jsx(CommandEmpty, { children: emptyMessage }),
61
+ /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(
62
+ CommandItem,
63
+ {
64
+ value: option.value,
65
+ onSelect: (currentValue) => {
66
+ onChange(currentValue === value ? "" : currentValue);
67
+ setOpen(false);
68
+ },
69
+ children: [
70
+ option.label,
71
+ value === option.value && /* @__PURE__ */ jsx(CheckIcon, { size: 16, className: "ml-auto" })
72
+ ]
73
+ },
74
+ option.value
75
+ )) })
76
+ ] })
77
+ ] })
78
+ }
79
+ )
80
+ ] });
81
+ }
82
+
83
+ export { SearchSelect as default };
@@ -0,0 +1,161 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const SelectPrimitive = require('@radix-ui/react-select');
6
+ const lucideReact = require('lucide-react');
7
+ const utils = require('../lib/utils.cjs');
8
+
9
+ function _interopNamespaceCompat(e) {
10
+ if (e && typeof e === 'object' && 'default' in e) return e;
11
+ const n = Object.create(null);
12
+ if (e) {
13
+ for (const k in e) {
14
+ n[k] = e[k];
15
+ }
16
+ }
17
+ n.default = e;
18
+ return n;
19
+ }
20
+
21
+ const SelectPrimitive__namespace = /*#__PURE__*/_interopNamespaceCompat(SelectPrimitive);
22
+
23
+ function Select({
24
+ ...props
25
+ }) {
26
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Root, { "data-slot": "select", ...props });
27
+ }
28
+ function SelectValue({
29
+ ...props
30
+ }) {
31
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Value, { "data-slot": "select-value", ...props });
32
+ }
33
+ function SelectTrigger({
34
+ className,
35
+ size = "default",
36
+ children,
37
+ ...props
38
+ }) {
39
+ return /* @__PURE__ */ jsxRuntime.jsxs(
40
+ SelectPrimitive__namespace.Trigger,
41
+ {
42
+ "data-slot": "select-trigger",
43
+ "data-size": size,
44
+ className: utils.cn(
45
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
46
+ className
47
+ ),
48
+ ...props,
49
+ children: [
50
+ children,
51
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4 opacity-50" }) })
52
+ ]
53
+ }
54
+ );
55
+ }
56
+ function SelectContent({
57
+ className,
58
+ children,
59
+ position = "item-aligned",
60
+ align = "center",
61
+ ...props
62
+ }) {
63
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
64
+ SelectPrimitive__namespace.Content,
65
+ {
66
+ "data-slot": "select-content",
67
+ className: utils.cn(
68
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
69
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
70
+ className
71
+ ),
72
+ position,
73
+ align,
74
+ ...props,
75
+ children: [
76
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
77
+ /* @__PURE__ */ jsxRuntime.jsx(
78
+ SelectPrimitive__namespace.Viewport,
79
+ {
80
+ className: utils.cn(
81
+ "p-1",
82
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
83
+ ),
84
+ children
85
+ }
86
+ ),
87
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
88
+ ]
89
+ }
90
+ ) });
91
+ }
92
+ function SelectItem({
93
+ className,
94
+ children,
95
+ ...props
96
+ }) {
97
+ return /* @__PURE__ */ jsxRuntime.jsxs(
98
+ SelectPrimitive__namespace.Item,
99
+ {
100
+ "data-slot": "select-item",
101
+ className: utils.cn(
102
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
103
+ className
104
+ ),
105
+ ...props,
106
+ children: [
107
+ /* @__PURE__ */ jsxRuntime.jsx(
108
+ "span",
109
+ {
110
+ "data-slot": "select-item-indicator",
111
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
112
+ children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) })
113
+ }
114
+ ),
115
+ /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
116
+ ]
117
+ }
118
+ );
119
+ }
120
+ function SelectScrollUpButton({
121
+ className,
122
+ ...props
123
+ }) {
124
+ return /* @__PURE__ */ jsxRuntime.jsx(
125
+ SelectPrimitive__namespace.ScrollUpButton,
126
+ {
127
+ "data-slot": "select-scroll-up-button",
128
+ className: utils.cn(
129
+ "flex cursor-default items-center justify-center py-1",
130
+ className
131
+ ),
132
+ ...props,
133
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "size-4" })
134
+ }
135
+ );
136
+ }
137
+ function SelectScrollDownButton({
138
+ className,
139
+ ...props
140
+ }) {
141
+ return /* @__PURE__ */ jsxRuntime.jsx(
142
+ SelectPrimitive__namespace.ScrollDownButton,
143
+ {
144
+ "data-slot": "select-scroll-down-button",
145
+ className: utils.cn(
146
+ "flex cursor-default items-center justify-center py-1",
147
+ className
148
+ ),
149
+ ...props,
150
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
151
+ }
152
+ );
153
+ }
154
+
155
+ exports.Select = Select;
156
+ exports.SelectContent = SelectContent;
157
+ exports.SelectItem = SelectItem;
158
+ exports.SelectScrollDownButton = SelectScrollDownButton;
159
+ exports.SelectScrollUpButton = SelectScrollUpButton;
160
+ exports.SelectTrigger = SelectTrigger;
161
+ exports.SelectValue = SelectValue;
@@ -0,0 +1,139 @@
1
+ 'use client';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import * as SelectPrimitive from '@radix-ui/react-select';
4
+ import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from 'lucide-react';
5
+ import { cn } from '../lib/utils.mjs';
6
+
7
+ function Select({
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
11
+ }
12
+ function SelectValue({
13
+ ...props
14
+ }) {
15
+ return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
16
+ }
17
+ function SelectTrigger({
18
+ className,
19
+ size = "default",
20
+ children,
21
+ ...props
22
+ }) {
23
+ return /* @__PURE__ */ jsxs(
24
+ SelectPrimitive.Trigger,
25
+ {
26
+ "data-slot": "select-trigger",
27
+ "data-size": size,
28
+ className: cn(
29
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
30
+ className
31
+ ),
32
+ ...props,
33
+ children: [
34
+ children,
35
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
36
+ ]
37
+ }
38
+ );
39
+ }
40
+ function SelectContent({
41
+ className,
42
+ children,
43
+ position = "item-aligned",
44
+ align = "center",
45
+ ...props
46
+ }) {
47
+ return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
48
+ SelectPrimitive.Content,
49
+ {
50
+ "data-slot": "select-content",
51
+ className: cn(
52
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
53
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
54
+ className
55
+ ),
56
+ position,
57
+ align,
58
+ ...props,
59
+ children: [
60
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
61
+ /* @__PURE__ */ jsx(
62
+ SelectPrimitive.Viewport,
63
+ {
64
+ className: cn(
65
+ "p-1",
66
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
67
+ ),
68
+ children
69
+ }
70
+ ),
71
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
72
+ ]
73
+ }
74
+ ) });
75
+ }
76
+ function SelectItem({
77
+ className,
78
+ children,
79
+ ...props
80
+ }) {
81
+ return /* @__PURE__ */ jsxs(
82
+ SelectPrimitive.Item,
83
+ {
84
+ "data-slot": "select-item",
85
+ className: cn(
86
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
87
+ className
88
+ ),
89
+ ...props,
90
+ children: [
91
+ /* @__PURE__ */ jsx(
92
+ "span",
93
+ {
94
+ "data-slot": "select-item-indicator",
95
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
96
+ children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
97
+ }
98
+ ),
99
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
100
+ ]
101
+ }
102
+ );
103
+ }
104
+ function SelectScrollUpButton({
105
+ className,
106
+ ...props
107
+ }) {
108
+ return /* @__PURE__ */ jsx(
109
+ SelectPrimitive.ScrollUpButton,
110
+ {
111
+ "data-slot": "select-scroll-up-button",
112
+ className: cn(
113
+ "flex cursor-default items-center justify-center py-1",
114
+ className
115
+ ),
116
+ ...props,
117
+ children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
118
+ }
119
+ );
120
+ }
121
+ function SelectScrollDownButton({
122
+ className,
123
+ ...props
124
+ }) {
125
+ return /* @__PURE__ */ jsx(
126
+ SelectPrimitive.ScrollDownButton,
127
+ {
128
+ "data-slot": "select-scroll-down-button",
129
+ className: cn(
130
+ "flex cursor-default items-center justify-center py-1",
131
+ className
132
+ ),
133
+ ...props,
134
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
135
+ }
136
+ );
137
+ }
138
+
139
+ export { Select, SelectContent, SelectItem, SelectScrollDownButton, SelectScrollUpButton, SelectTrigger, SelectValue };
@@ -0,0 +1,43 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const SeparatorPrimitive = require('@radix-ui/react-separator');
6
+ const utils = require('../lib/utils.cjs');
7
+
8
+ function _interopNamespaceCompat(e) {
9
+ if (e && typeof e === 'object' && 'default' in e) return e;
10
+ const n = Object.create(null);
11
+ if (e) {
12
+ for (const k in e) {
13
+ n[k] = e[k];
14
+ }
15
+ }
16
+ n.default = e;
17
+ return n;
18
+ }
19
+
20
+ const SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespaceCompat(SeparatorPrimitive);
21
+
22
+ function Separator({
23
+ className,
24
+ orientation = "horizontal",
25
+ decorative = true,
26
+ ...props
27
+ }) {
28
+ return /* @__PURE__ */ jsxRuntime.jsx(
29
+ SeparatorPrimitive__namespace.Root,
30
+ {
31
+ "data-slot": "separator",
32
+ decorative,
33
+ orientation,
34
+ className: utils.cn(
35
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
36
+ className
37
+ ),
38
+ ...props
39
+ }
40
+ );
41
+ }
42
+
43
+ exports.Separator = Separator;
@@ -0,0 +1,27 @@
1
+ 'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
4
+ import { cn } from '../lib/utils.mjs';
5
+
6
+ function Separator({
7
+ className,
8
+ orientation = "horizontal",
9
+ decorative = true,
10
+ ...props
11
+ }) {
12
+ return /* @__PURE__ */ jsx(
13
+ SeparatorPrimitive.Root,
14
+ {
15
+ "data-slot": "separator",
16
+ decorative,
17
+ orientation,
18
+ className: cn(
19
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
20
+ className
21
+ ),
22
+ ...props
23
+ }
24
+ );
25
+ }
26
+
27
+ export { Separator };
@@ -0,0 +1,48 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const SwitchPrimitive = require('@radix-ui/react-switch');
6
+ const utils = require('../lib/utils.cjs');
7
+
8
+ function _interopNamespaceCompat(e) {
9
+ if (e && typeof e === 'object' && 'default' in e) return e;
10
+ const n = Object.create(null);
11
+ if (e) {
12
+ for (const k in e) {
13
+ n[k] = e[k];
14
+ }
15
+ }
16
+ n.default = e;
17
+ return n;
18
+ }
19
+
20
+ const SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespaceCompat(SwitchPrimitive);
21
+
22
+ function Switch({
23
+ className,
24
+ ...props
25
+ }) {
26
+ return /* @__PURE__ */ jsxRuntime.jsx(
27
+ SwitchPrimitive__namespace.Root,
28
+ {
29
+ "data-slot": "switch",
30
+ className: utils.cn(
31
+ "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
32
+ className
33
+ ),
34
+ ...props,
35
+ children: /* @__PURE__ */ jsxRuntime.jsx(
36
+ SwitchPrimitive__namespace.Thumb,
37
+ {
38
+ "data-slot": "switch-thumb",
39
+ className: utils.cn(
40
+ "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
41
+ )
42
+ }
43
+ )
44
+ }
45
+ );
46
+ }
47
+
48
+ exports.Switch = Switch;
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
4
+ import { cn } from '../lib/utils.mjs';
5
+
6
+ function Switch({
7
+ className,
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(
11
+ SwitchPrimitive.Root,
12
+ {
13
+ "data-slot": "switch",
14
+ className: cn(
15
+ "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
16
+ className
17
+ ),
18
+ ...props,
19
+ children: /* @__PURE__ */ jsx(
20
+ SwitchPrimitive.Thumb,
21
+ {
22
+ "data-slot": "switch-thumb",
23
+ className: cn(
24
+ "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
25
+ )
26
+ }
27
+ )
28
+ }
29
+ );
30
+ }
31
+
32
+ export { Switch };