@pixpilot/shadcn 0.10.1 → 0.11.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 (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,94 +0,0 @@
1
- import { Button, buttonVariants } from "./button.cjs";
2
- import { Input } from "./input.cjs";
3
- import { Popover, PopoverContent, PopoverTrigger } from "./popover.cjs";
4
- import { Select, SelectTrigger } from "./select.cjs";
5
- import * as react_jsx_runtime35 from "react/jsx-runtime";
6
- import { VariantProps } from "class-variance-authority";
7
- import * as React from "react";
8
- import * as SliderPrimitive from "@radix-ui/react-slider";
9
-
10
- //#region src/components/ui/color-picker.d.ts
11
- declare const colorFormats: readonly ["hex", "rgb", "hsl", "hsb"];
12
- interface DivProps extends React.ComponentProps<'div'> {
13
- asChild?: boolean;
14
- }
15
- type ColorFormat = (typeof colorFormats)[number];
16
- /**
17
- * @see https://gist.github.com/bkrmendy/f4582173f50fab209ddfef1377ab31e3
18
- */
19
- interface EyeDropper {
20
- open: (options?: {
21
- signal?: AbortSignal;
22
- }) => Promise<{
23
- sRGBHex: string;
24
- }>;
25
- }
26
- declare global {
27
- interface Window {
28
- EyeDropper?: {
29
- new (): EyeDropper;
30
- };
31
- }
32
- }
33
- interface ColorValue {
34
- r: number;
35
- g: number;
36
- b: number;
37
- a: number;
38
- }
39
- interface HSVColorValue {
40
- h: number;
41
- s: number;
42
- v: number;
43
- a: number;
44
- }
45
- declare function colorToString(color: ColorValue, format?: ColorFormat): string;
46
- declare function parseColorString(value: string): ColorValue | null;
47
- type Direction = 'ltr' | 'rtl';
48
- interface StoreState {
49
- color: ColorValue;
50
- hsv: HSVColorValue;
51
- open: boolean;
52
- format: ColorFormat;
53
- }
54
- declare function useStore<U>(selector: (state: StoreState) => U): U;
55
- interface ColorPickerProps extends Omit<DivProps, 'onValueChange'>, Pick<React.ComponentProps<typeof Popover>, 'defaultOpen' | 'open' | 'onOpenChange' | 'modal'> {
56
- value?: string;
57
- defaultValue?: string;
58
- onValueChange?: (value: string) => void;
59
- dir?: Direction;
60
- format?: ColorFormat;
61
- defaultFormat?: ColorFormat;
62
- onFormatChange?: (format: ColorFormat) => void;
63
- name?: string;
64
- asChild?: boolean;
65
- disabled?: boolean;
66
- inline?: boolean;
67
- readOnly?: boolean;
68
- required?: boolean;
69
- }
70
- declare function ColorPicker(props: ColorPickerProps): react_jsx_runtime35.JSX.Element;
71
- declare function ColorPickerTrigger({
72
- variant,
73
- ...props
74
- }: React.ComponentProps<typeof PopoverTrigger> & {
75
- variant?: VariantProps<typeof buttonVariants>['variant'];
76
- }): react_jsx_runtime35.JSX.Element;
77
- declare function ColorPickerContent(props: React.ComponentProps<typeof PopoverContent>): react_jsx_runtime35.JSX.Element;
78
- declare function ColorPickerArea(props: DivProps): react_jsx_runtime35.JSX.Element;
79
- declare function ColorPickerHueSlider(props: React.ComponentProps<typeof SliderPrimitive.Root>): react_jsx_runtime35.JSX.Element;
80
- declare function ColorPickerAlphaSlider(props: React.ComponentProps<typeof SliderPrimitive.Root>): react_jsx_runtime35.JSX.Element;
81
- declare function ColorPickerSwatch(props: DivProps): react_jsx_runtime35.JSX.Element;
82
- declare function ColorPickerEyeDropper(props: React.ComponentProps<typeof Button>): react_jsx_runtime35.JSX.Element | null;
83
- interface ColorPickerFormatSelectProps extends Omit<React.ComponentProps<typeof Select>, 'value' | 'onValueChange'>, Pick<React.ComponentProps<typeof SelectTrigger>, 'size' | 'className'> {}
84
- declare function ColorPickerFormatSelect(props: ColorPickerFormatSelectProps): react_jsx_runtime35.JSX.Element;
85
- interface ColorPickerInputProps extends Omit<React.ComponentProps<typeof Input>, 'value' | 'onChange' | 'color'> {
86
- withoutAlpha?: boolean;
87
- }
88
- declare function ColorPickerInput(props: ColorPickerInputProps): react_jsx_runtime35.JSX.Element | undefined;
89
- declare const colorUtils: {
90
- colorToString: typeof colorToString;
91
- parseColorString: typeof parseColorString;
92
- };
93
- //#endregion
94
- export { ColorPicker, ColorPickerAlphaSlider, ColorPickerArea, ColorPickerContent, ColorPickerEyeDropper, ColorPickerFormatSelect, ColorPickerHueSlider, ColorPickerInput, type ColorPickerProps, ColorPickerSwatch, ColorPickerTrigger, colorUtils, useStore };
@@ -1,104 +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_dialog = require('./dialog.cjs');
8
- let react = require("react");
9
- react = require_rolldown_runtime.__toESM(react);
10
- let react_jsx_runtime = require("react/jsx-runtime");
11
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
12
- let lucide_react = require("lucide-react");
13
- lucide_react = require_rolldown_runtime.__toESM(lucide_react);
14
- let cmdk = require("cmdk");
15
- cmdk = require_rolldown_runtime.__toESM(cmdk);
16
-
17
- //#region src/components/ui/command.tsx
18
- function Command({ className,...props }) {
19
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command, {
20
- "data-slot": "command",
21
- className: require_utils.cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
22
- ...props
23
- });
24
- }
25
- function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true,...props }) {
26
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_dialog.Dialog, {
27
- ...props,
28
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_dialog.DialogHeader, {
29
- className: "sr-only",
30
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.DialogTitle, { children: title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.DialogDescription, { children: description })]
31
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.DialogContent, {
32
- className: require_utils.cn("overflow-hidden p-0", className),
33
- showCloseButton,
34
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Command, {
35
- className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
36
- children
37
- })
38
- })]
39
- });
40
- }
41
- function CommandInput({ className,...props }) {
42
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
43
- "data-slot": "command-input-wrapper",
44
- className: "flex h-9 items-center gap-2 border-b px-3",
45
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SearchIcon, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Input, {
46
- "data-slot": "command-input",
47
- className: require_utils.cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
48
- ...props
49
- })]
50
- });
51
- }
52
- function CommandList({ className,...props }) {
53
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.List, {
54
- "data-slot": "command-list",
55
- className: require_utils.cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
56
- ...props
57
- });
58
- }
59
- function CommandEmpty({ ...props }) {
60
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Empty, {
61
- "data-slot": "command-empty",
62
- className: "py-6 text-center text-sm",
63
- ...props
64
- });
65
- }
66
- function CommandGroup({ className,...props }) {
67
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Group, {
68
- "data-slot": "command-group",
69
- className: require_utils.cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className),
70
- ...props
71
- });
72
- }
73
- function CommandSeparator({ className,...props }) {
74
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Separator, {
75
- "data-slot": "command-separator",
76
- className: require_utils.cn("bg-border -mx-1 h-px", className),
77
- ...props
78
- });
79
- }
80
- function CommandItem({ className,...props }) {
81
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(cmdk.Command.Item, {
82
- "data-slot": "command-item",
83
- className: require_utils.cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
84
- ...props
85
- });
86
- }
87
- function CommandShortcut({ className,...props }) {
88
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
89
- "data-slot": "command-shortcut",
90
- className: require_utils.cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
91
- ...props
92
- });
93
- }
94
-
95
- //#endregion
96
- exports.Command = Command;
97
- exports.CommandDialog = CommandDialog;
98
- exports.CommandEmpty = CommandEmpty;
99
- exports.CommandGroup = CommandGroup;
100
- exports.CommandInput = CommandInput;
101
- exports.CommandItem = CommandItem;
102
- exports.CommandList = CommandList;
103
- exports.CommandSeparator = CommandSeparator;
104
- exports.CommandShortcut = CommandShortcut;
@@ -1,52 +0,0 @@
1
- import { Dialog } from "./dialog.cjs";
2
- import * as react_jsx_runtime45 from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { Command } from "cmdk";
5
-
6
- //#region src/components/ui/command.d.ts
7
- declare function Command$1({
8
- className,
9
- ...props
10
- }: React.ComponentProps<typeof Command>): react_jsx_runtime45.JSX.Element;
11
- declare function CommandDialog({
12
- title,
13
- description,
14
- children,
15
- className,
16
- showCloseButton,
17
- ...props
18
- }: React.ComponentProps<typeof Dialog> & {
19
- title?: string;
20
- description?: string;
21
- className?: string;
22
- showCloseButton?: boolean;
23
- }): react_jsx_runtime45.JSX.Element;
24
- declare function CommandInput({
25
- className,
26
- ...props
27
- }: React.ComponentProps<typeof Command.Input>): react_jsx_runtime45.JSX.Element;
28
- declare function CommandList({
29
- className,
30
- ...props
31
- }: React.ComponentProps<typeof Command.List>): react_jsx_runtime45.JSX.Element;
32
- declare function CommandEmpty({
33
- ...props
34
- }: React.ComponentProps<typeof Command.Empty>): react_jsx_runtime45.JSX.Element;
35
- declare function CommandGroup({
36
- className,
37
- ...props
38
- }: React.ComponentProps<typeof Command.Group>): react_jsx_runtime45.JSX.Element;
39
- declare function CommandSeparator({
40
- className,
41
- ...props
42
- }: React.ComponentProps<typeof Command.Separator>): react_jsx_runtime45.JSX.Element;
43
- declare function CommandItem({
44
- className,
45
- ...props
46
- }: React.ComponentProps<typeof Command.Item>): react_jsx_runtime45.JSX.Element;
47
- declare function CommandShortcut({
48
- className,
49
- ...props
50
- }: React.ComponentProps<'span'>): react_jsx_runtime45.JSX.Element;
51
- //#endregion
52
- export { Command$1 as Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
@@ -1,102 +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/dialog.tsx
14
- function Dialog({ ...props }) {
15
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Root, {
16
- "data-slot": "dialog",
17
- ...props
18
- });
19
- }
20
- function DialogTrigger({ ...props }) {
21
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Trigger, {
22
- "data-slot": "dialog-trigger",
23
- ...props
24
- });
25
- }
26
- function DialogPortal({ ...props }) {
27
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Portal, {
28
- "data-slot": "dialog-portal",
29
- ...props
30
- });
31
- }
32
- function DialogClose({ ...props }) {
33
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Close, {
34
- "data-slot": "dialog-close",
35
- ...props
36
- });
37
- }
38
- function DialogOverlay({ className,...props }) {
39
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Overlay, {
40
- "data-slot": "dialog-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 DialogContent({ className, children, showCloseButton = true,...props }) {
46
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogPortal, {
47
- "data-slot": "dialog-portal",
48
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Content, {
49
- "data-slot": "dialog-content",
50
- className: require_utils.cn("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className),
51
- ...props,
52
- children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dialog.Close, {
53
- "data-slot": "dialog-close",
54
- className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
55
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
56
- className: "sr-only",
57
- children: "Close"
58
- })]
59
- })]
60
- })]
61
- });
62
- }
63
- function DialogHeader({ className,...props }) {
64
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
65
- "data-slot": "dialog-header",
66
- className: require_utils.cn("flex flex-col gap-2 text-center sm:text-left", className),
67
- ...props
68
- });
69
- }
70
- function DialogFooter({ className,...props }) {
71
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
72
- "data-slot": "dialog-footer",
73
- className: require_utils.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
74
- ...props
75
- });
76
- }
77
- function DialogTitle({ className,...props }) {
78
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Title, {
79
- "data-slot": "dialog-title",
80
- className: require_utils.cn("text-lg leading-none font-semibold", className),
81
- ...props
82
- });
83
- }
84
- function DialogDescription({ className,...props }) {
85
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dialog.Description, {
86
- "data-slot": "dialog-description",
87
- className: require_utils.cn("text-muted-foreground text-sm", className),
88
- ...props
89
- });
90
- }
91
-
92
- //#endregion
93
- exports.Dialog = Dialog;
94
- exports.DialogClose = DialogClose;
95
- exports.DialogContent = DialogContent;
96
- exports.DialogDescription = DialogDescription;
97
- exports.DialogFooter = DialogFooter;
98
- exports.DialogHeader = DialogHeader;
99
- exports.DialogOverlay = DialogOverlay;
100
- exports.DialogPortal = DialogPortal;
101
- exports.DialogTitle = DialogTitle;
102
- exports.DialogTrigger = DialogTrigger;
@@ -1,47 +0,0 @@
1
- import * as react_jsx_runtime54 from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as DialogPrimitive from "@radix-ui/react-dialog";
4
-
5
- //#region src/components/ui/dialog.d.ts
6
- declare function Dialog({
7
- ...props
8
- }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime54.JSX.Element;
9
- declare function DialogTrigger({
10
- ...props
11
- }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime54.JSX.Element;
12
- declare function DialogPortal({
13
- ...props
14
- }: React.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime54.JSX.Element;
15
- declare function DialogClose({
16
- ...props
17
- }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime54.JSX.Element;
18
- declare function DialogOverlay({
19
- className,
20
- ...props
21
- }: React.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime54.JSX.Element;
22
- declare function DialogContent({
23
- className,
24
- children,
25
- showCloseButton,
26
- ...props
27
- }: React.ComponentProps<typeof DialogPrimitive.Content> & {
28
- showCloseButton?: boolean;
29
- }): react_jsx_runtime54.JSX.Element;
30
- declare function DialogHeader({
31
- className,
32
- ...props
33
- }: React.ComponentProps<'div'>): react_jsx_runtime54.JSX.Element;
34
- declare function DialogFooter({
35
- className,
36
- ...props
37
- }: React.ComponentProps<'div'>): react_jsx_runtime54.JSX.Element;
38
- declare function DialogTitle({
39
- className,
40
- ...props
41
- }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime54.JSX.Element;
42
- declare function DialogDescription({
43
- className,
44
- ...props
45
- }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime54.JSX.Element;
46
- //#endregion
47
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
@@ -1,144 +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_dropdown_menu = require("@radix-ui/react-dropdown-menu");
11
- __radix_ui_react_dropdown_menu = require_rolldown_runtime.__toESM(__radix_ui_react_dropdown_menu);
12
-
13
- //#region src/components/ui/dropdown-menu.tsx
14
- function DropdownMenu({ ...props }) {
15
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Root, {
16
- "data-slot": "dropdown-menu",
17
- ...props
18
- });
19
- }
20
- function DropdownMenuPortal({ ...props }) {
21
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Portal, {
22
- "data-slot": "dropdown-menu-portal",
23
- ...props
24
- });
25
- }
26
- function DropdownMenuTrigger({ ...props }) {
27
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Trigger, {
28
- "data-slot": "dropdown-menu-trigger",
29
- ...props
30
- });
31
- }
32
- function DropdownMenuContent({ className, sideOffset = 4,...props }) {
33
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Content, {
34
- "data-slot": "dropdown-menu-content",
35
- sideOffset,
36
- 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className),
37
- ...props
38
- }) });
39
- }
40
- function DropdownMenuGroup({ ...props }) {
41
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Group, {
42
- "data-slot": "dropdown-menu-group",
43
- ...props
44
- });
45
- }
46
- function DropdownMenuItem({ className, inset, variant = "default",...props }) {
47
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Item, {
48
- "data-slot": "dropdown-menu-item",
49
- "data-inset": inset,
50
- "data-variant": variant,
51
- className: require_utils.cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
52
- ...props
53
- });
54
- }
55
- function DropdownMenuCheckboxItem({ className, children, checked,...props }) {
56
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.CheckboxItem, {
57
- "data-slot": "dropdown-menu-checkbox-item",
58
- className: require_utils.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 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", className),
59
- checked,
60
- ...props,
61
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
62
- className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
63
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckIcon, { className: "size-4" }) })
64
- }), children]
65
- });
66
- }
67
- function DropdownMenuRadioGroup({ ...props }) {
68
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.RadioGroup, {
69
- "data-slot": "dropdown-menu-radio-group",
70
- ...props
71
- });
72
- }
73
- function DropdownMenuRadioItem({ className, children,...props }) {
74
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.RadioItem, {
75
- "data-slot": "dropdown-menu-radio-item",
76
- className: require_utils.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 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", className),
77
- ...props,
78
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
79
- className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
80
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleIcon, { className: "size-2 fill-current" }) })
81
- }), children]
82
- });
83
- }
84
- function DropdownMenuLabel({ className, inset,...props }) {
85
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Label, {
86
- "data-slot": "dropdown-menu-label",
87
- "data-inset": inset,
88
- className: require_utils.cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
89
- ...props
90
- });
91
- }
92
- function DropdownMenuSeparator({ className,...props }) {
93
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Separator, {
94
- "data-slot": "dropdown-menu-separator",
95
- className: require_utils.cn("bg-border -mx-1 my-1 h-px", className),
96
- ...props
97
- });
98
- }
99
- function DropdownMenuShortcut({ className,...props }) {
100
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
101
- "data-slot": "dropdown-menu-shortcut",
102
- className: require_utils.cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
103
- ...props
104
- });
105
- }
106
- function DropdownMenuSub({ ...props }) {
107
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Sub, {
108
- "data-slot": "dropdown-menu-sub",
109
- ...props
110
- });
111
- }
112
- function DropdownMenuSubTrigger({ className, inset, children,...props }) {
113
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.SubTrigger, {
114
- "data-slot": "dropdown-menu-sub-trigger",
115
- "data-inset": inset,
116
- className: require_utils.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
117
- ...props,
118
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, { className: "ml-auto size-4" })]
119
- });
120
- }
121
- function DropdownMenuSubContent({ className,...props }) {
122
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.SubContent, {
123
- "data-slot": "dropdown-menu-sub-content",
124
- 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
125
- ...props
126
- });
127
- }
128
-
129
- //#endregion
130
- exports.DropdownMenu = DropdownMenu;
131
- exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
132
- exports.DropdownMenuContent = DropdownMenuContent;
133
- exports.DropdownMenuGroup = DropdownMenuGroup;
134
- exports.DropdownMenuItem = DropdownMenuItem;
135
- exports.DropdownMenuLabel = DropdownMenuLabel;
136
- exports.DropdownMenuPortal = DropdownMenuPortal;
137
- exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
138
- exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
139
- exports.DropdownMenuSeparator = DropdownMenuSeparator;
140
- exports.DropdownMenuShortcut = DropdownMenuShortcut;
141
- exports.DropdownMenuSub = DropdownMenuSub;
142
- exports.DropdownMenuSubContent = DropdownMenuSubContent;
143
- exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
144
- exports.DropdownMenuTrigger = DropdownMenuTrigger;
@@ -1,77 +0,0 @@
1
- import * as react_jsx_runtime64 from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
4
-
5
- //#region src/components/ui/dropdown-menu.d.ts
6
- declare function DropdownMenu({
7
- ...props
8
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime64.JSX.Element;
9
- declare function DropdownMenuPortal({
10
- ...props
11
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime64.JSX.Element;
12
- declare function DropdownMenuTrigger({
13
- ...props
14
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime64.JSX.Element;
15
- declare function DropdownMenuContent({
16
- className,
17
- sideOffset,
18
- ...props
19
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime64.JSX.Element;
20
- declare function DropdownMenuGroup({
21
- ...props
22
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime64.JSX.Element;
23
- declare function DropdownMenuItem({
24
- className,
25
- inset,
26
- variant,
27
- ...props
28
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
29
- inset?: boolean;
30
- variant?: 'default' | 'destructive';
31
- }): react_jsx_runtime64.JSX.Element;
32
- declare function DropdownMenuCheckboxItem({
33
- className,
34
- children,
35
- checked,
36
- ...props
37
- }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime64.JSX.Element;
38
- declare function DropdownMenuRadioGroup({
39
- ...props
40
- }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime64.JSX.Element;
41
- declare function DropdownMenuRadioItem({
42
- className,
43
- children,
44
- ...props
45
- }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime64.JSX.Element;
46
- declare function DropdownMenuLabel({
47
- className,
48
- inset,
49
- ...props
50
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
51
- inset?: boolean;
52
- }): react_jsx_runtime64.JSX.Element;
53
- declare function DropdownMenuSeparator({
54
- className,
55
- ...props
56
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime64.JSX.Element;
57
- declare function DropdownMenuShortcut({
58
- className,
59
- ...props
60
- }: React.ComponentProps<'span'>): react_jsx_runtime64.JSX.Element;
61
- declare function DropdownMenuSub({
62
- ...props
63
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime64.JSX.Element;
64
- declare function DropdownMenuSubTrigger({
65
- className,
66
- inset,
67
- children,
68
- ...props
69
- }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
70
- inset?: boolean;
71
- }): react_jsx_runtime64.JSX.Element;
72
- declare function DropdownMenuSubContent({
73
- className,
74
- ...props
75
- }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime64.JSX.Element;
76
- //#endregion
77
- export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };