@pixpilot/shadcn 0.10.1 → 0.11.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.
Files changed (155) hide show
  1. package/dist/components/ui/OrContinueWithSeparator.d.ts +2 -2
  2. package/dist/components/ui/alert-dialog.d.ts +12 -12
  3. package/dist/components/ui/alert-dialog.js +0 -2
  4. package/dist/components/ui/alert.d.ts +4 -4
  5. package/dist/components/ui/alert.js +0 -1
  6. package/dist/components/ui/avatar.d.ts +4 -4
  7. package/dist/components/ui/avatar.js +0 -1
  8. package/dist/components/ui/badge.d.ts +2 -2
  9. package/dist/components/ui/badge.js +0 -1
  10. package/dist/components/ui/button-group.d.ts +4 -4
  11. package/dist/components/ui/button-group.js +0 -1
  12. package/dist/components/ui/button.d.ts +2 -2
  13. package/dist/components/ui/button.js +0 -1
  14. package/dist/components/ui/calendar.d.ts +3 -3
  15. package/dist/components/ui/calendar.js +0 -1
  16. package/dist/components/ui/card.d.ts +8 -8
  17. package/dist/components/ui/card.js +0 -1
  18. package/dist/components/ui/checkbox.d.ts +2 -2
  19. package/dist/components/ui/checkbox.js +0 -1
  20. package/dist/components/ui/color-picker.d.ts +11 -11
  21. package/dist/components/ui/color-picker.js +0 -1
  22. package/dist/components/ui/command.d.ts +10 -10
  23. package/dist/components/ui/command.js +0 -1
  24. package/dist/components/ui/dialog.d.ts +11 -11
  25. package/dist/components/ui/dialog.js +0 -1
  26. package/dist/components/ui/dropdown-menu.d.ts +16 -16
  27. package/dist/components/ui/dropdown-menu.js +0 -1
  28. package/dist/components/ui/file-upload.d.ts +11 -11
  29. package/dist/components/ui/file-upload.js +0 -1
  30. package/dist/components/ui/form.d.ts +45 -0
  31. package/dist/components/ui/form.js +88 -0
  32. package/dist/components/ui/input-group.d.ts +7 -7
  33. package/dist/components/ui/input-group.js +0 -1
  34. package/dist/components/ui/input.d.ts +2 -2
  35. package/dist/components/ui/input.js +0 -1
  36. package/dist/components/ui/label.d.ts +2 -2
  37. package/dist/components/ui/label.js +0 -1
  38. package/dist/components/ui/pagination.d.ts +8 -8
  39. package/dist/components/ui/pagination.js +0 -2
  40. package/dist/components/ui/popover.d.ts +5 -5
  41. package/dist/components/ui/popover.js +0 -1
  42. package/dist/components/ui/radio-group.d.ts +3 -3
  43. package/dist/components/ui/radio-group.js +0 -1
  44. package/dist/components/ui/select.d.ts +11 -11
  45. package/dist/components/ui/select.js +0 -1
  46. package/dist/components/ui/separator.d.ts +2 -2
  47. package/dist/components/ui/separator.js +0 -1
  48. package/dist/components/ui/shadcn-io/tags/index.d.ts +9 -9
  49. package/dist/components/ui/shadcn-io/tags/index.js +0 -1
  50. package/dist/components/ui/shadcn-io/tags-input-inline/index.d.ts +7 -7
  51. package/dist/components/ui/sheet.d.ts +9 -9
  52. package/dist/components/ui/sheet.js +0 -1
  53. package/dist/components/ui/slider.d.ts +2 -2
  54. package/dist/components/ui/slider.js +0 -1
  55. package/dist/components/ui/switch.d.ts +2 -2
  56. package/dist/components/ui/switch.js +0 -1
  57. package/dist/components/ui/tabs.d.ts +5 -5
  58. package/dist/components/ui/tabs.js +0 -1
  59. package/dist/components/ui/textarea.d.ts +2 -2
  60. package/dist/components/ui/textarea.js +0 -1
  61. package/dist/components/ui/toggle-group.d.ts +3 -3
  62. package/dist/components/ui/toggle-group.js +0 -1
  63. package/dist/components/ui/toggle.d.ts +2 -2
  64. package/dist/components/ui/toggle.js +0 -1
  65. package/dist/components/ui/tooltip.d.ts +5 -5
  66. package/dist/components/ui/tooltip.js +0 -1
  67. package/dist/form/index.d.ts +2 -0
  68. package/dist/form/index.js +3 -0
  69. package/dist/index.js +0 -2
  70. package/package.json +6 -1
  71. package/dist/_virtual/rolldown_runtime.cjs +0 -25
  72. package/dist/components/index.cjs +0 -34
  73. package/dist/components/index.d.cts +0 -34
  74. package/dist/components/index.js +0 -34
  75. package/dist/components/ui/OrContinueWithSeparator.cjs +0 -30
  76. package/dist/components/ui/OrContinueWithSeparator.d.cts +0 -11
  77. package/dist/components/ui/alert-dialog.cjs +0 -101
  78. package/dist/components/ui/alert-dialog.d.cts +0 -48
  79. package/dist/components/ui/alert.cjs +0 -45
  80. package/dist/components/ui/alert.d.cts +0 -24
  81. package/dist/components/ui/avatar.cjs +0 -37
  82. package/dist/components/ui/avatar.d.cts +0 -19
  83. package/dist/components/ui/badge.cjs +0 -33
  84. package/dist/components/ui/badge.d.cts +0 -19
  85. package/dist/components/ui/button-group.cjs +0 -48
  86. package/dist/components/ui/button-group.d.cts +0 -28
  87. package/dist/components/ui/button.cjs +0 -56
  88. package/dist/components/ui/button.d.cts +0 -21
  89. package/dist/components/ui/calendar.cjs +0 -113
  90. package/dist/components/ui/calendar.d.cts +0 -26
  91. package/dist/components/ui/card.cjs +0 -67
  92. package/dist/components/ui/card.d.cts +0 -34
  93. package/dist/components/ui/checkbox.cjs +0 -31
  94. package/dist/components/ui/checkbox.d.cts +0 -11
  95. package/dist/components/ui/color-picker.cjs +0 -1171
  96. package/dist/components/ui/color-picker.d.cts +0 -94
  97. package/dist/components/ui/command.cjs +0 -104
  98. package/dist/components/ui/command.d.cts +0 -52
  99. package/dist/components/ui/dialog.cjs +0 -102
  100. package/dist/components/ui/dialog.d.cts +0 -47
  101. package/dist/components/ui/dropdown-menu.cjs +0 -144
  102. package/dist/components/ui/dropdown-menu.d.cts +0 -77
  103. package/dist/components/ui/file-upload.cjs +0 -926
  104. package/dist/components/ui/file-upload.d.cts +0 -95
  105. package/dist/components/ui/index.cjs +0 -33
  106. package/dist/components/ui/index.d.cts +0 -33
  107. package/dist/components/ui/index.js +0 -33
  108. package/dist/components/ui/input-group.cjs +0 -90
  109. package/dist/components/ui/input-group.d.cts +0 -43
  110. package/dist/components/ui/input.cjs +0 -20
  111. package/dist/components/ui/input.d.cts +0 -12
  112. package/dist/components/ui/label.cjs +0 -21
  113. package/dist/components/ui/label.d.cts +0 -11
  114. package/dist/components/ui/pagination.cjs +0 -92
  115. package/dist/components/ui/pagination.d.cts +0 -40
  116. package/dist/components/ui/popover.cjs +0 -44
  117. package/dist/components/ui/popover.d.cts +0 -22
  118. package/dist/components/ui/radio-group.cjs +0 -36
  119. package/dist/components/ui/radio-group.d.cts +0 -15
  120. package/dist/components/ui/select.cjs +0 -116
  121. package/dist/components/ui/select.d.cts +0 -52
  122. package/dist/components/ui/separator.cjs +0 -23
  123. package/dist/components/ui/separator.d.cts +0 -13
  124. package/dist/components/ui/shadcn-io/tags/index.cjs +0 -146
  125. package/dist/components/ui/shadcn-io/tags/index.d.cts +0 -70
  126. package/dist/components/ui/shadcn-io/tags-input-inline/index.cjs +0 -66
  127. package/dist/components/ui/shadcn-io/tags-input-inline/index.d.cts +0 -31
  128. package/dist/components/ui/sheet.cjs +0 -96
  129. package/dist/components/ui/sheet.d.cts +0 -40
  130. package/dist/components/ui/slider.cjs +0 -42
  131. package/dist/components/ui/slider.d.cts +0 -15
  132. package/dist/components/ui/switch.cjs +0 -28
  133. package/dist/components/ui/switch.d.cts +0 -11
  134. package/dist/components/ui/tabs.cjs +0 -65
  135. package/dist/components/ui/tabs.d.cts +0 -33
  136. package/dist/components/ui/textarea.cjs +0 -19
  137. package/dist/components/ui/textarea.d.cts +0 -10
  138. package/dist/components/ui/toggle-group.cjs +0 -59
  139. package/dist/components/ui/toggle-group.d.cts +0 -30
  140. package/dist/components/ui/toggle.cjs +0 -45
  141. package/dist/components/ui/toggle.d.cts +0 -19
  142. package/dist/components/ui/tooltip.cjs +0 -45
  143. package/dist/components/ui/tooltip.d.cts +0 -23
  144. package/dist/components/visually-hidden-input.cjs +0 -116
  145. package/dist/hooks/use-as-ref.cjs +0 -16
  146. package/dist/hooks/use-isomorphic-layout-effect.cjs +0 -9
  147. package/dist/hooks/use-lazy-ref.cjs +0 -13
  148. package/dist/index.cjs +0 -211
  149. package/dist/index.d.cts +0 -37
  150. package/dist/lib/compose-refs.cjs +0 -44
  151. package/dist/lib/index.cjs +0 -1
  152. package/dist/lib/index.d.cts +0 -1
  153. package/dist/lib/index.js +0 -1
  154. package/dist/lib/utils.cjs +0 -13
  155. package/dist/lib/utils.d.cts +0 -6
@@ -1,15 +0,0 @@
1
- import * as react_jsx_runtime109 from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
4
-
5
- //#region src/components/ui/radio-group.d.ts
6
- declare function RadioGroup({
7
- className,
8
- ...props
9
- }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): react_jsx_runtime109.JSX.Element;
10
- declare function RadioGroupItem({
11
- className,
12
- ...props
13
- }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): react_jsx_runtime109.JSX.Element;
14
- //#endregion
15
- export { RadioGroup, RadioGroupItem };
@@ -1,116 +0,0 @@
1
- 'use client';
2
-
3
-
4
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
5
- const require_utils = require('../../lib/utils.cjs');
6
- require('../../lib/index.cjs');
7
- let react = require("react");
8
- react = require_rolldown_runtime.__toESM(react);
9
- let react_jsx_runtime = require("react/jsx-runtime");
10
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
11
- let lucide_react = require("lucide-react");
12
- lucide_react = require_rolldown_runtime.__toESM(lucide_react);
13
- let __radix_ui_react_select = require("@radix-ui/react-select");
14
- __radix_ui_react_select = require_rolldown_runtime.__toESM(__radix_ui_react_select);
15
-
16
- //#region src/components/ui/select.tsx
17
- function Select({ ...props }) {
18
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Root, {
19
- "data-slot": "select",
20
- ...props
21
- });
22
- }
23
- function SelectGroup({ ...props }) {
24
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Group, {
25
- "data-slot": "select-group",
26
- ...props
27
- });
28
- }
29
- function SelectValue({ ...props }) {
30
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Value, {
31
- "data-slot": "select-value",
32
- ...props
33
- });
34
- }
35
- function SelectTrigger({ className, size = "default", children,...props }) {
36
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_select.Trigger, {
37
- "data-slot": "select-trigger",
38
- "data-size": size,
39
- className: require_utils.cn("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", className),
40
- ...props,
41
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Icon, {
42
- asChild: true,
43
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDownIcon, { className: "size-4 opacity-50" })
44
- })]
45
- });
46
- }
47
- function SelectContent({ className, children, position = "popper", align = "center",...props }) {
48
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_select.Content, {
49
- "data-slot": "select-content",
50
- className: require_utils.cn("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", 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", className),
51
- position,
52
- align,
53
- ...props,
54
- children: [
55
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectScrollUpButton, {}),
56
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Viewport, {
57
- className: require_utils.cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
58
- children
59
- }),
60
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectScrollDownButton, {})
61
- ]
62
- }) });
63
- }
64
- function SelectLabel({ className,...props }) {
65
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Label, {
66
- "data-slot": "select-label",
67
- className: require_utils.cn("text-muted-foreground px-2 py-1.5 text-xs", className),
68
- ...props
69
- });
70
- }
71
- function SelectItem({ className, children,...props }) {
72
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_select.Item, {
73
- "data-slot": "select-item",
74
- className: require_utils.cn("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", className),
75
- ...props,
76
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
77
- className: "absolute right-2 flex size-3.5 items-center justify-center",
78
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckIcon, { className: "size-4" }) })
79
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.ItemText, { children })]
80
- });
81
- }
82
- function SelectSeparator({ className,...props }) {
83
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.Separator, {
84
- "data-slot": "select-separator",
85
- className: require_utils.cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
86
- ...props
87
- });
88
- }
89
- function SelectScrollUpButton({ className,...props }) {
90
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.ScrollUpButton, {
91
- "data-slot": "select-scroll-up-button",
92
- className: require_utils.cn("flex cursor-default items-center justify-center py-1", className),
93
- ...props,
94
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronUpIcon, { className: "size-4" })
95
- });
96
- }
97
- function SelectScrollDownButton({ className,...props }) {
98
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_select.ScrollDownButton, {
99
- "data-slot": "select-scroll-down-button",
100
- className: require_utils.cn("flex cursor-default items-center justify-center py-1", className),
101
- ...props,
102
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDownIcon, { className: "size-4" })
103
- });
104
- }
105
-
106
- //#endregion
107
- exports.Select = Select;
108
- exports.SelectContent = SelectContent;
109
- exports.SelectGroup = SelectGroup;
110
- exports.SelectItem = SelectItem;
111
- exports.SelectLabel = SelectLabel;
112
- exports.SelectScrollDownButton = SelectScrollDownButton;
113
- exports.SelectScrollUpButton = SelectScrollUpButton;
114
- exports.SelectSeparator = SelectSeparator;
115
- exports.SelectTrigger = SelectTrigger;
116
- exports.SelectValue = SelectValue;
@@ -1,52 +0,0 @@
1
- import * as react_jsx_runtime111 from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as SelectPrimitive from "@radix-ui/react-select";
4
-
5
- //#region src/components/ui/select.d.ts
6
- declare function Select({
7
- ...props
8
- }: React.ComponentProps<typeof SelectPrimitive.Root>): react_jsx_runtime111.JSX.Element;
9
- declare function SelectGroup({
10
- ...props
11
- }: React.ComponentProps<typeof SelectPrimitive.Group>): react_jsx_runtime111.JSX.Element;
12
- declare function SelectValue({
13
- ...props
14
- }: React.ComponentProps<typeof SelectPrimitive.Value>): react_jsx_runtime111.JSX.Element;
15
- declare function SelectTrigger({
16
- className,
17
- size,
18
- children,
19
- ...props
20
- }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
21
- size?: 'sm' | 'default';
22
- }): react_jsx_runtime111.JSX.Element;
23
- declare function SelectContent({
24
- className,
25
- children,
26
- position,
27
- align,
28
- ...props
29
- }: React.ComponentProps<typeof SelectPrimitive.Content>): react_jsx_runtime111.JSX.Element;
30
- declare function SelectLabel({
31
- className,
32
- ...props
33
- }: React.ComponentProps<typeof SelectPrimitive.Label>): react_jsx_runtime111.JSX.Element;
34
- declare function SelectItem({
35
- className,
36
- children,
37
- ...props
38
- }: React.ComponentProps<typeof SelectPrimitive.Item>): react_jsx_runtime111.JSX.Element;
39
- declare function SelectSeparator({
40
- className,
41
- ...props
42
- }: React.ComponentProps<typeof SelectPrimitive.Separator>): react_jsx_runtime111.JSX.Element;
43
- declare function SelectScrollUpButton({
44
- className,
45
- ...props
46
- }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): react_jsx_runtime111.JSX.Element;
47
- declare function SelectScrollDownButton({
48
- className,
49
- ...props
50
- }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): react_jsx_runtime111.JSX.Element;
51
- //#endregion
52
- export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
@@ -1,23 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_utils = require('../../lib/utils.cjs');
3
- require('../../lib/index.cjs');
4
- let react = require("react");
5
- react = require_rolldown_runtime.__toESM(react);
6
- let react_jsx_runtime = require("react/jsx-runtime");
7
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
8
- let __radix_ui_react_separator = require("@radix-ui/react-separator");
9
- __radix_ui_react_separator = require_rolldown_runtime.__toESM(__radix_ui_react_separator);
10
-
11
- //#region src/components/ui/separator.tsx
12
- function Separator({ className, orientation = "horizontal", decorative = true,...props }) {
13
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_separator.Root, {
14
- "data-slot": "separator",
15
- decorative,
16
- orientation,
17
- className: require_utils.cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className),
18
- ...props
19
- });
20
- }
21
-
22
- //#endregion
23
- exports.Separator = Separator;
@@ -1,13 +0,0 @@
1
- import * as react_jsx_runtime121 from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
4
-
5
- //#region src/components/ui/separator.d.ts
6
- declare function Separator({
7
- className,
8
- orientation,
9
- decorative,
10
- ...props
11
- }: React.ComponentProps<typeof SeparatorPrimitive.Root>): react_jsx_runtime121.JSX.Element;
12
- //#endregion
13
- export { Separator };
@@ -1,146 +0,0 @@
1
- 'use client';
2
-
3
-
4
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
5
- const require_utils = require('../../../../lib/utils.cjs');
6
- require('../../../../lib/index.cjs');
7
- const require_badge = require('../../badge.cjs');
8
- const require_button = require('../../button.cjs');
9
- const require_popover = require('../../popover.cjs');
10
- const require_command = require('../../command.cjs');
11
- let react = require("react");
12
- react = require_rolldown_runtime.__toESM(react);
13
- let react_jsx_runtime = require("react/jsx-runtime");
14
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
15
- let lucide_react = require("lucide-react");
16
- lucide_react = require_rolldown_runtime.__toESM(lucide_react);
17
-
18
- //#region src/components/ui/shadcn-io/tags/index.tsx
19
- const TagsContext = (0, react.createContext)({
20
- value: void 0,
21
- setValue: void 0,
22
- open: false,
23
- onOpenChange: () => {},
24
- width: void 0,
25
- setWidth: void 0
26
- });
27
- function useTagsContext() {
28
- const context = (0, react.use)(TagsContext);
29
- if (!context) throw new Error("useTagsContext must be used within a TagsProvider");
30
- return context;
31
- }
32
- function Tags({ value, setValue, open: controlledOpen, onOpenChange: controlledOnOpenChange, children, className }) {
33
- const [uncontrolledOpen, setUncontrolledOpen] = (0, react.useState)(false);
34
- const [width, setWidth] = (0, react.useState)();
35
- const ref = (0, react.useRef)(null);
36
- const open = controlledOpen ?? uncontrolledOpen;
37
- const onOpenChange = controlledOnOpenChange ?? setUncontrolledOpen;
38
- (0, react.useEffect)(() => {
39
- if (!ref.current) return;
40
- const resizeObserver = new ResizeObserver((entries) => {
41
- if (entries[0]) setWidth(entries[0].contentRect.width);
42
- });
43
- resizeObserver.observe(ref.current);
44
- return () => {
45
- resizeObserver.disconnect();
46
- };
47
- }, []);
48
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TagsContext.Provider, {
49
- value: {
50
- value,
51
- setValue,
52
- open,
53
- onOpenChange,
54
- width,
55
- setWidth
56
- },
57
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_popover.Popover, {
58
- onOpenChange,
59
- open,
60
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
61
- className: require_utils.cn("relative w-full", className),
62
- ref,
63
- children
64
- })
65
- })
66
- });
67
- }
68
- function TagsTrigger({ className, children,...props }) {
69
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_popover.PopoverTrigger, {
70
- asChild: true,
71
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
72
- className: require_utils.cn("h-auto w-full justify-between p-2", className),
73
- role: "combobox",
74
- variant: "outline",
75
- ...props,
76
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
77
- className: "flex flex-wrap items-center gap-1",
78
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
79
- className: "px-2 py-px text-muted-foreground",
80
- children: "Select a tag..."
81
- })]
82
- })
83
- })
84
- });
85
- }
86
- function TagsValue({ className, children, onRemove,...props }) {
87
- const handleRemove = (event) => {
88
- event.preventDefault();
89
- event.stopPropagation();
90
- onRemove?.();
91
- };
92
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_badge.Badge, {
93
- className: require_utils.cn("flex items-center gap-2", className),
94
- ...props,
95
- children: [children, onRemove && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
96
- className: "size-auto cursor-pointer hover:text-muted-foreground",
97
- onClick: handleRemove,
98
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { size: 12 })
99
- })]
100
- });
101
- }
102
- function TagsContent({ className, children,...props }) {
103
- const { width } = useTagsContext();
104
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_popover.PopoverContent, {
105
- className: require_utils.cn("p-0", className),
106
- style: { width },
107
- ...props,
108
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_command.Command, { children })
109
- });
110
- }
111
- function TagsInput({ className,...props }) {
112
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_command.CommandInput, {
113
- className: require_utils.cn("h-9", className),
114
- ...props
115
- });
116
- }
117
- function TagsList({ className,...props }) {
118
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_command.CommandList, {
119
- className: require_utils.cn("max-h-[200px]", className),
120
- ...props
121
- });
122
- }
123
- function TagsEmpty({ children, className,...props }) {
124
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_command.CommandEmpty, {
125
- ...props,
126
- children: children ?? "No tags found."
127
- });
128
- }
129
- const TagsGroup = require_command.CommandGroup;
130
- function TagsItem({ className,...props }) {
131
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_command.CommandItem, {
132
- className: require_utils.cn("cursor-pointer items-center justify-between", className),
133
- ...props
134
- });
135
- }
136
-
137
- //#endregion
138
- exports.Tags = Tags;
139
- exports.TagsContent = TagsContent;
140
- exports.TagsEmpty = TagsEmpty;
141
- exports.TagsGroup = TagsGroup;
142
- exports.TagsInput = TagsInput;
143
- exports.TagsItem = TagsItem;
144
- exports.TagsList = TagsList;
145
- exports.TagsTrigger = TagsTrigger;
146
- exports.TagsValue = TagsValue;
@@ -1,70 +0,0 @@
1
- import { Badge } from "../../badge.cjs";
2
- import { Button } from "../../button.cjs";
3
- import { PopoverContent } from "../../popover.cjs";
4
- import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from "../../command.cjs";
5
- import * as react_jsx_runtime122 from "react/jsx-runtime";
6
- import { ComponentProps, ReactNode } from "react";
7
-
8
- //#region src/components/ui/shadcn-io/tags/index.d.ts
9
- interface TagsProps {
10
- value?: string;
11
- setValue?: (value: string) => void;
12
- open?: boolean;
13
- onOpenChange?: (open: boolean) => void;
14
- children?: ReactNode;
15
- className?: string;
16
- }
17
- declare function Tags({
18
- value,
19
- setValue,
20
- open: controlledOpen,
21
- onOpenChange: controlledOnOpenChange,
22
- children,
23
- className
24
- }: TagsProps): react_jsx_runtime122.JSX.Element;
25
- type TagsTriggerProps = ComponentProps<typeof Button>;
26
- declare function TagsTrigger({
27
- className,
28
- children,
29
- ...props
30
- }: TagsTriggerProps): react_jsx_runtime122.JSX.Element;
31
- type TagsValueProps = ComponentProps<typeof Badge>;
32
- declare function TagsValue({
33
- className,
34
- children,
35
- onRemove,
36
- ...props
37
- }: TagsValueProps & {
38
- onRemove?: () => void;
39
- }): react_jsx_runtime122.JSX.Element;
40
- type TagsContentProps = ComponentProps<typeof PopoverContent>;
41
- declare function TagsContent({
42
- className,
43
- children,
44
- ...props
45
- }: TagsContentProps): react_jsx_runtime122.JSX.Element;
46
- type TagsInputProps = ComponentProps<typeof CommandInput>;
47
- declare function TagsInput({
48
- className,
49
- ...props
50
- }: TagsInputProps): react_jsx_runtime122.JSX.Element;
51
- type TagsListProps = ComponentProps<typeof CommandList>;
52
- declare function TagsList({
53
- className,
54
- ...props
55
- }: TagsListProps): react_jsx_runtime122.JSX.Element;
56
- type TagsEmptyProps = ComponentProps<typeof CommandEmpty>;
57
- declare function TagsEmpty({
58
- children,
59
- className,
60
- ...props
61
- }: TagsEmptyProps): react_jsx_runtime122.JSX.Element;
62
- type TagsGroupProps = ComponentProps<typeof CommandGroup>;
63
- declare const TagsGroup: typeof CommandGroup;
64
- type TagsItemProps = ComponentProps<typeof CommandItem>;
65
- declare function TagsItem({
66
- className,
67
- ...props
68
- }: TagsItemProps): react_jsx_runtime122.JSX.Element;
69
- //#endregion
70
- export { Tags, TagsContent, TagsContentProps, TagsEmpty, TagsEmptyProps, TagsGroup, TagsGroupProps, TagsInput, TagsInputProps, TagsItem, TagsItemProps, TagsList, TagsListProps, TagsProps, TagsTrigger, TagsTriggerProps, TagsValue, TagsValueProps };
@@ -1,66 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
2
- const require_utils = require('../../../../lib/utils.cjs');
3
- let react_jsx_runtime = require("react/jsx-runtime");
4
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
5
- let lucide_react = require("lucide-react");
6
- lucide_react = require_rolldown_runtime.__toESM(lucide_react);
7
- let __diceui_tags_input = require("@diceui/tags-input");
8
- __diceui_tags_input = require_rolldown_runtime.__toESM(__diceui_tags_input);
9
-
10
- //#region src/components/ui/shadcn-io/tags-input-inline/index.tsx
11
- function TagsInputInLineRoot({ className,...props }) {
12
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.Root, {
13
- "data-slot": "tags-input",
14
- className: require_utils.cn("flex w-full flex-col", className),
15
- ...props
16
- });
17
- }
18
- function TagsInputInLineLabel({ className,...props }) {
19
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.Label, {
20
- "data-slot": "tags-input-label",
21
- className: require_utils.cn("font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className),
22
- ...props
23
- });
24
- }
25
- function TagsInputInLineList({ className,...props }) {
26
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
27
- "data-slot": "tags-input-list",
28
- className: require_utils.cn("flex min-h-10 w-full flex-wrap items-center gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm focus-within:ring-1 focus-within:ring-ring disabled:cursor-not-allowed disabled:opacity-50", className),
29
- ...props
30
- });
31
- }
32
- function TagsInputInLineInput({ className,...props }) {
33
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.Input, {
34
- "data-slot": "tags-input-input",
35
- className: require_utils.cn("flex-1 bg-transparent outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className),
36
- ...props
37
- });
38
- }
39
- function TagsInputInLineItem({ className, children,...props }) {
40
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__diceui_tags_input.Item, {
41
- "data-slot": "tags-input-item",
42
- className: require_utils.cn("inline-flex max-w-[calc(100%-8px)] items-center gap-1.5 rounded border bg-transparent px-2.5 py-1 text-sm focus:outline-hidden data-disabled:cursor-not-allowed data-editable:select-none data-editing:bg-transparent data-disabled:opacity-50 data-editing:ring-1 data-editing:ring-ring [&:not([data-editing])]:pr-1.5 [&[data-highlighted]:not([data-editing])]:bg-accent [&[data-highlighted]:not([data-editing])]:text-accent-foreground", className),
43
- ...props,
44
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.ItemText, {
45
- className: "truncate",
46
- children
47
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.ItemDelete, {
48
- className: "size-4 shrink-0 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100",
49
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "size-3.5" })
50
- })]
51
- });
52
- }
53
- function TagsInputInLineClear({ ...props }) {
54
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__diceui_tags_input.Clear, {
55
- "data-slot": "tags-input-clear",
56
- ...props
57
- });
58
- }
59
-
60
- //#endregion
61
- exports.TagsInputInLineClear = TagsInputInLineClear;
62
- exports.TagsInputInLineInput = TagsInputInLineInput;
63
- exports.TagsInputInLineItem = TagsInputInLineItem;
64
- exports.TagsInputInLineLabel = TagsInputInLineLabel;
65
- exports.TagsInputInLineList = TagsInputInLineList;
66
- exports.TagsInputInLineRoot = TagsInputInLineRoot;
@@ -1,31 +0,0 @@
1
- import * as react_jsx_runtime130 from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as TagsInputPrimitive from "@diceui/tags-input";
4
-
5
- //#region src/components/ui/shadcn-io/tags-input-inline/index.d.ts
6
- declare function TagsInputInLineRoot({
7
- className,
8
- ...props
9
- }: React.ComponentProps<typeof TagsInputPrimitive.Root>): react_jsx_runtime130.JSX.Element;
10
- declare function TagsInputInLineLabel({
11
- className,
12
- ...props
13
- }: React.ComponentProps<typeof TagsInputPrimitive.Label>): react_jsx_runtime130.JSX.Element;
14
- declare function TagsInputInLineList({
15
- className,
16
- ...props
17
- }: React.ComponentProps<'div'>): react_jsx_runtime130.JSX.Element;
18
- declare function TagsInputInLineInput({
19
- className,
20
- ...props
21
- }: React.ComponentProps<typeof TagsInputPrimitive.Input>): react_jsx_runtime130.JSX.Element;
22
- declare function TagsInputInLineItem({
23
- className,
24
- children,
25
- ...props
26
- }: React.ComponentProps<typeof TagsInputPrimitive.Item>): react_jsx_runtime130.JSX.Element;
27
- declare function TagsInputInLineClear({
28
- ...props
29
- }: React.ComponentProps<typeof TagsInputPrimitive.Clear>): react_jsx_runtime130.JSX.Element;
30
- //#endregion
31
- export { TagsInputInLineClear, TagsInputInLineInput, TagsInputInLineItem, TagsInputInLineLabel, TagsInputInLineList, TagsInputInLineRoot };
@@ -1,96 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_utils = require('../../lib/utils.cjs');
3
- require('../../lib/index.cjs');
4
- let react = require("react");
5
- react = require_rolldown_runtime.__toESM(react);
6
- let react_jsx_runtime = require("react/jsx-runtime");
7
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
8
- let lucide_react = require("lucide-react");
9
- lucide_react = require_rolldown_runtime.__toESM(lucide_react);
10
- let __radix_ui_react_dialog = require("@radix-ui/react-dialog");
11
- __radix_ui_react_dialog = require_rolldown_runtime.__toESM(__radix_ui_react_dialog);
12
-
13
- //#region src/components/ui/sheet.tsx
14
- function Sheet({ ...props }) {
15
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Root, {
16
- "data-slot": "sheet",
17
- ...props
18
- });
19
- }
20
- function SheetTrigger({ ...props }) {
21
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Trigger, {
22
- "data-slot": "sheet-trigger",
23
- ...props
24
- });
25
- }
26
- function SheetClose({ ...props }) {
27
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Close, {
28
- "data-slot": "sheet-close",
29
- ...props
30
- });
31
- }
32
- function SheetPortal({ ...props }) {
33
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Portal, {
34
- "data-slot": "sheet-portal",
35
- ...props
36
- });
37
- }
38
- function SheetOverlay({ className,...props }) {
39
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Overlay, {
40
- "data-slot": "sheet-overlay",
41
- className: require_utils.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
42
- ...props
43
- });
44
- }
45
- function SheetContent({ className, children, side = "right",...props }) {
46
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SheetPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SheetOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Content, {
47
- "data-slot": "sheet-content",
48
- className: require_utils.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
49
- ...props,
50
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Close, {
51
- className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
52
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { className: "size-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
53
- className: "sr-only",
54
- children: "Close"
55
- })]
56
- })]
57
- })] });
58
- }
59
- function SheetHeader({ className,...props }) {
60
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
61
- "data-slot": "sheet-header",
62
- className: require_utils.cn("flex flex-col gap-1.5 p-4", className),
63
- ...props
64
- });
65
- }
66
- function SheetFooter({ className,...props }) {
67
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
68
- "data-slot": "sheet-footer",
69
- className: require_utils.cn("mt-auto flex flex-col gap-2 p-4", className),
70
- ...props
71
- });
72
- }
73
- function SheetTitle({ className,...props }) {
74
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Title, {
75
- "data-slot": "sheet-title",
76
- className: require_utils.cn("text-foreground font-semibold", className),
77
- ...props
78
- });
79
- }
80
- function SheetDescription({ className,...props }) {
81
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Description, {
82
- "data-slot": "sheet-description",
83
- className: require_utils.cn("text-muted-foreground text-sm", className),
84
- ...props
85
- });
86
- }
87
-
88
- //#endregion
89
- exports.Sheet = Sheet;
90
- exports.SheetClose = SheetClose;
91
- exports.SheetContent = SheetContent;
92
- exports.SheetDescription = SheetDescription;
93
- exports.SheetFooter = SheetFooter;
94
- exports.SheetHeader = SheetHeader;
95
- exports.SheetTitle = SheetTitle;
96
- exports.SheetTrigger = SheetTrigger;