@axis-ds/ui-react 1.4.0 → 1.5.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 (111) hide show
  1. package/README.md +45 -0
  2. package/dist/accordion/index.js +9 -27
  3. package/dist/accordion/index.mjs +58 -7
  4. package/dist/alert/index.js +9 -27
  5. package/dist/alert/index.mjs +54 -7
  6. package/dist/avatar/avatar.d.mts +24 -0
  7. package/dist/avatar/avatar.d.ts +24 -0
  8. package/dist/avatar/avatar.js +70 -0
  9. package/dist/{chunk-OQGMQL2A.mjs → avatar/avatar.mjs} +5 -26
  10. package/dist/avatar/index.d.mts +5 -26
  11. package/dist/avatar/index.d.ts +5 -26
  12. package/dist/avatar/index.js +4 -78
  13. package/dist/avatar/index.mjs +2 -5
  14. package/dist/avatar/variants.d.mts +14 -0
  15. package/dist/avatar/variants.d.ts +14 -0
  16. package/dist/avatar/variants.js +44 -0
  17. package/dist/avatar/variants.mjs +20 -0
  18. package/dist/badge/index.js +5 -23
  19. package/dist/badge/index.mjs +35 -5
  20. package/dist/breadcrumb/index.js +15 -33
  21. package/dist/breadcrumb/index.mjs +118 -10
  22. package/dist/button/index.js +5 -23
  23. package/dist/button/index.mjs +44 -5
  24. package/dist/card/index.js +13 -31
  25. package/dist/card/index.mjs +58 -9
  26. package/dist/checkbox/index.js +5 -23
  27. package/dist/checkbox/index.mjs +41 -4
  28. package/dist/collapsible/index.js +3 -5
  29. package/dist/collapsible/index.mjs +4 -5
  30. package/dist/command/index.d.mts +7 -7
  31. package/dist/command/index.d.ts +7 -7
  32. package/dist/command/index.js +16 -33
  33. package/dist/command/index.mjs +110 -10
  34. package/dist/dialog/index.js +18 -36
  35. package/dist/dialog/index.mjs +88 -13
  36. package/dist/dropdown-menu/index.js +26 -44
  37. package/dist/dropdown-menu/index.mjs +188 -18
  38. package/dist/index.d.mts +4 -10
  39. package/dist/index.d.ts +4 -10
  40. package/dist/index.js +153 -1907
  41. package/dist/index.mjs +105 -150
  42. package/dist/input/index.js +4 -22
  43. package/dist/input/index.mjs +28 -4
  44. package/dist/label/index.js +5 -23
  45. package/dist/label/index.mjs +17 -4
  46. package/dist/popover/index.js +6 -24
  47. package/dist/popover/index.mjs +21 -6
  48. package/dist/progress/index.js +7 -25
  49. package/dist/progress/index.mjs +71 -6
  50. package/dist/radio-group/index.js +6 -24
  51. package/dist/radio-group/index.mjs +40 -5
  52. package/dist/scroll-area/index.js +6 -24
  53. package/dist/scroll-area/index.mjs +34 -5
  54. package/dist/select/index.js +16 -34
  55. package/dist/select/index.mjs +129 -11
  56. package/dist/separator/index.js +4 -22
  57. package/dist/separator/index.mjs +21 -4
  58. package/dist/sheet/index.js +19 -37
  59. package/dist/sheet/index.mjs +122 -13
  60. package/dist/skeleton/index.js +4 -22
  61. package/dist/skeleton/index.mjs +19 -4
  62. package/dist/slider/index.js +4 -22
  63. package/dist/slider/index.mjs +34 -4
  64. package/dist/switch/index.js +5 -23
  65. package/dist/switch/index.mjs +29 -4
  66. package/dist/table/index.js +18 -36
  67. package/dist/table/index.mjs +96 -11
  68. package/dist/tabs/index.js +9 -27
  69. package/dist/tabs/index.mjs +47 -7
  70. package/dist/textarea/index.js +4 -22
  71. package/dist/textarea/index.mjs +20 -4
  72. package/dist/toast/index.js +16 -34
  73. package/dist/toast/index.mjs +94 -10
  74. package/dist/toggle/index.js +5 -23
  75. package/dist/toggle/index.mjs +34 -5
  76. package/dist/tooltip/index.js +7 -25
  77. package/dist/tooltip/index.mjs +26 -7
  78. package/dist/utils.d.mts +9 -0
  79. package/dist/utils.d.ts +9 -0
  80. package/dist/utils.js +40 -0
  81. package/dist/{chunk-ZIF4PLK3.mjs → utils.mjs} +2 -4
  82. package/package.json +4 -4
  83. package/dist/chunk-22MWNPDF.mjs +0 -44
  84. package/dist/chunk-2OEPKE4D.mjs +0 -69
  85. package/dist/chunk-2XNUJNTG.mjs +0 -43
  86. package/dist/chunk-3N6NG7VT.mjs +0 -11
  87. package/dist/chunk-4I2F2NLP.mjs +0 -111
  88. package/dist/chunk-4PT43LON.mjs +0 -31
  89. package/dist/chunk-5NWFAQBM.mjs +0 -36
  90. package/dist/chunk-5Z2R3IHJ.mjs +0 -28
  91. package/dist/chunk-AY4B3RRN.mjs +0 -144
  92. package/dist/chunk-C5O47K7L.mjs +0 -71
  93. package/dist/chunk-CNU6645Y.mjs +0 -42
  94. package/dist/chunk-CY72AGI2.mjs +0 -105
  95. package/dist/chunk-DRFCNDVQ.mjs +0 -27
  96. package/dist/chunk-F2WSIT7F.mjs +0 -49
  97. package/dist/chunk-FZFREHAE.mjs +0 -139
  98. package/dist/chunk-HKYKDQ6C.mjs +0 -81
  99. package/dist/chunk-IS7NER3O.mjs +0 -37
  100. package/dist/chunk-MOBW7BKD.mjs +0 -49
  101. package/dist/chunk-PJX5UF3Y.mjs +0 -25
  102. package/dist/chunk-QXQWVRXN.mjs +0 -53
  103. package/dist/chunk-RFB4IABR.mjs +0 -108
  104. package/dist/chunk-SO2QSRGV.mjs +0 -58
  105. package/dist/chunk-TA62Q7YX.mjs +0 -37
  106. package/dist/chunk-TB33GTWS.mjs +0 -43
  107. package/dist/chunk-YI5OZRUB.mjs +0 -132
  108. package/dist/chunk-YZDRNV46.mjs +0 -210
  109. package/dist/chunk-Z4P43F5J.mjs +0 -65
  110. package/dist/chunk-Z65ZMFDH.mjs +0 -123
  111. package/dist/chunk-ZW6GY5PO.mjs +0 -29
@@ -1,13 +1,113 @@
1
- import {
2
- Command,
3
- CommandEmpty,
4
- CommandGroup,
5
- CommandInput,
6
- CommandItem,
7
- CommandList,
8
- CommandSeparator
9
- } from "../chunk-Z65ZMFDH.mjs";
10
- import "../chunk-ZIF4PLK3.mjs";
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { Command as CommandPrimitive } from "cmdk";
5
+ import { cn } from "../utils.mjs";
6
+ const Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7
+ CommandPrimitive,
8
+ {
9
+ ref,
10
+ className: cn(
11
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-[var(--axis-surface-default)] text-[var(--axis-text-primary)]",
12
+ className
13
+ ),
14
+ ...props
15
+ }
16
+ ));
17
+ Command.displayName = "Command";
18
+ const CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-[var(--axis-border-default)] px-3", children: [
19
+ /* @__PURE__ */ jsxs(
20
+ "svg",
21
+ {
22
+ xmlns: "http://www.w3.org/2000/svg",
23
+ width: "16",
24
+ height: "16",
25
+ viewBox: "0 0 24 24",
26
+ fill: "none",
27
+ stroke: "currentColor",
28
+ strokeWidth: "2",
29
+ strokeLinecap: "round",
30
+ strokeLinejoin: "round",
31
+ className: "mr-2 h-4 w-4 shrink-0 opacity-50",
32
+ children: [
33
+ /* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
34
+ /* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" })
35
+ ]
36
+ }
37
+ ),
38
+ /* @__PURE__ */ jsx(
39
+ CommandPrimitive.Input,
40
+ {
41
+ ref,
42
+ className: cn(
43
+ "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none",
44
+ "placeholder:text-[var(--axis-text-tertiary)]",
45
+ "disabled:cursor-not-allowed disabled:opacity-50",
46
+ className
47
+ ),
48
+ ...props
49
+ }
50
+ )
51
+ ] }));
52
+ CommandInput.displayName = "CommandInput";
53
+ const CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
54
+ CommandPrimitive.List,
55
+ {
56
+ ref,
57
+ className: cn(
58
+ "max-h-[300px] overflow-y-auto overflow-x-hidden",
59
+ className
60
+ ),
61
+ ...props
62
+ }
63
+ ));
64
+ CommandList.displayName = "CommandList";
65
+ const CommandEmpty = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(
66
+ CommandPrimitive.Empty,
67
+ {
68
+ ref,
69
+ className: "py-6 text-center text-sm text-[var(--axis-text-secondary)]",
70
+ ...props
71
+ }
72
+ ));
73
+ CommandEmpty.displayName = "CommandEmpty";
74
+ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
75
+ CommandPrimitive.Group,
76
+ {
77
+ ref,
78
+ className: cn(
79
+ "overflow-hidden p-1 text-[var(--axis-text-primary)]",
80
+ "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-[var(--axis-text-secondary)]",
81
+ className
82
+ ),
83
+ ...props
84
+ }
85
+ ));
86
+ CommandGroup.displayName = "CommandGroup";
87
+ const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
88
+ CommandPrimitive.Separator,
89
+ {
90
+ ref,
91
+ className: cn("-mx-1 h-px bg-[var(--axis-border-default)]", className),
92
+ ...props
93
+ }
94
+ ));
95
+ CommandSeparator.displayName = "CommandSeparator";
96
+ const CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
97
+ CommandPrimitive.Item,
98
+ {
99
+ ref,
100
+ className: cn(
101
+ "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
102
+ "data-[selected=true]:bg-[var(--axis-surface-secondary)] data-[selected=true]:text-[var(--axis-text-primary)]",
103
+ "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
104
+ "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
105
+ className
106
+ ),
107
+ ...props
108
+ }
109
+ ));
110
+ CommandItem.displayName = "CommandItem";
11
111
  export {
12
112
  Command,
13
113
  CommandEmpty,
@@ -26,8 +26,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/dialog/index.tsx
31
29
  var dialog_exports = {};
32
30
  __export(dialog_exports, {
33
31
  Dialog: () => Dialog,
@@ -42,35 +40,19 @@ __export(dialog_exports, {
42
40
  DialogTrigger: () => DialogTrigger
43
41
  });
44
42
  module.exports = __toCommonJS(dialog_exports);
43
+ var import_jsx_runtime = require("react/jsx-runtime");
45
44
  var React = __toESM(require("react"));
46
45
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
47
-
48
- // src/utils.ts
49
- var import_clsx = require("clsx");
50
- var import_tailwind_merge = require("tailwind-merge");
51
- var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
52
- var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
53
- extend: {
54
- classGroups: {
55
- shadow: [{ shadow: [isArbitraryShadowWithHint] }]
56
- }
57
- }
58
- });
59
- function cn(...inputs) {
60
- return twMerge((0, import_clsx.clsx)(inputs));
61
- }
62
-
63
- // src/dialog/index.tsx
64
- var import_jsx_runtime = require("react/jsx-runtime");
65
- var Dialog = DialogPrimitive.Root;
66
- var DialogTrigger = DialogPrimitive.Trigger;
67
- var DialogPortal = DialogPrimitive.Portal;
68
- var DialogClose = DialogPrimitive.Close;
69
- var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
+ var import_utils = require("../utils.js");
47
+ const Dialog = DialogPrimitive.Root;
48
+ const DialogTrigger = DialogPrimitive.Trigger;
49
+ const DialogPortal = DialogPrimitive.Portal;
50
+ const DialogClose = DialogPrimitive.Close;
51
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
52
  DialogPrimitive.Overlay,
71
53
  {
72
54
  ref,
73
- className: cn(
55
+ className: (0, import_utils.cn)(
74
56
  "fixed inset-0 z-50 bg-[var(--axis-dialog-overlay-bg)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
75
57
  className
76
58
  ),
@@ -78,13 +60,13 @@ var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
78
60
  }
79
61
  ));
80
62
  DialogOverlay.displayName = "DialogOverlay";
81
- var DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { children: [
63
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DialogPortal, { children: [
82
64
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlay, {}),
83
65
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
84
66
  DialogPrimitive.Content,
85
67
  {
86
68
  ref,
87
- className: cn(
69
+ className: (0, import_utils.cn)(
88
70
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-[shadow:var(--axis-shadow-lg)] duration-200",
89
71
  "bg-[var(--axis-dialog-content-bg)] border-[var(--axis-dialog-content-border)]",
90
72
  "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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
@@ -97,13 +79,13 @@ var DialogContent = React.forwardRef(({ className, children, ...props }, ref) =>
97
79
  )
98
80
  ] }));
99
81
  DialogContent.displayName = "DialogContent";
100
- var DialogHeader = ({
82
+ const DialogHeader = ({
101
83
  className,
102
84
  ...props
103
85
  }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
104
86
  "div",
105
87
  {
106
- className: cn(
88
+ className: (0, import_utils.cn)(
107
89
  "flex flex-col space-y-1.5 text-center sm:text-left",
108
90
  className
109
91
  ),
@@ -111,13 +93,13 @@ var DialogHeader = ({
111
93
  }
112
94
  );
113
95
  DialogHeader.displayName = "DialogHeader";
114
- var DialogFooter = ({
96
+ const DialogFooter = ({
115
97
  className,
116
98
  ...props
117
99
  }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
118
100
  "div",
119
101
  {
120
- className: cn(
102
+ className: (0, import_utils.cn)(
121
103
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
122
104
  className
123
105
  ),
@@ -125,11 +107,11 @@ var DialogFooter = ({
125
107
  }
126
108
  );
127
109
  DialogFooter.displayName = "DialogFooter";
128
- var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
129
111
  DialogPrimitive.Title,
130
112
  {
131
113
  ref,
132
- className: cn(
114
+ className: (0, import_utils.cn)(
133
115
  "text-lg font-semibold leading-none tracking-tight text-[var(--axis-text-primary)]",
134
116
  className
135
117
  ),
@@ -137,11 +119,11 @@ var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
137
119
  }
138
120
  ));
139
121
  DialogTitle.displayName = "DialogTitle";
140
- var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
122
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
141
123
  DialogPrimitive.Description,
142
124
  {
143
125
  ref,
144
- className: cn("text-sm text-[var(--axis-text-secondary)]", className),
126
+ className: (0, import_utils.cn)("text-sm text-[var(--axis-text-secondary)]", className),
145
127
  ...props
146
128
  }
147
129
  ));
@@ -1,16 +1,91 @@
1
- import {
2
- Dialog,
3
- DialogClose,
4
- DialogContent,
5
- DialogDescription,
6
- DialogFooter,
7
- DialogHeader,
8
- DialogOverlay,
9
- DialogPortal,
10
- DialogTitle,
11
- DialogTrigger
12
- } from "../chunk-CY72AGI2.mjs";
13
- import "../chunk-ZIF4PLK3.mjs";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
4
+ import { cn } from "../utils.mjs";
5
+ const Dialog = DialogPrimitive.Root;
6
+ const DialogTrigger = DialogPrimitive.Trigger;
7
+ const DialogPortal = DialogPrimitive.Portal;
8
+ const DialogClose = DialogPrimitive.Close;
9
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
10
+ DialogPrimitive.Overlay,
11
+ {
12
+ ref,
13
+ className: cn(
14
+ "fixed inset-0 z-50 bg-[var(--axis-dialog-overlay-bg)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
15
+ className
16
+ ),
17
+ ...props
18
+ }
19
+ ));
20
+ DialogOverlay.displayName = "DialogOverlay";
21
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
22
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
23
+ /* @__PURE__ */ jsx(
24
+ DialogPrimitive.Content,
25
+ {
26
+ ref,
27
+ className: cn(
28
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-[shadow:var(--axis-shadow-lg)] duration-200",
29
+ "bg-[var(--axis-dialog-content-bg)] border-[var(--axis-dialog-content-border)]",
30
+ "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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
31
+ "sm:rounded-lg",
32
+ className
33
+ ),
34
+ ...props,
35
+ children
36
+ }
37
+ )
38
+ ] }));
39
+ DialogContent.displayName = "DialogContent";
40
+ const DialogHeader = ({
41
+ className,
42
+ ...props
43
+ }) => /* @__PURE__ */ jsx(
44
+ "div",
45
+ {
46
+ className: cn(
47
+ "flex flex-col space-y-1.5 text-center sm:text-left",
48
+ className
49
+ ),
50
+ ...props
51
+ }
52
+ );
53
+ DialogHeader.displayName = "DialogHeader";
54
+ const DialogFooter = ({
55
+ className,
56
+ ...props
57
+ }) => /* @__PURE__ */ jsx(
58
+ "div",
59
+ {
60
+ className: cn(
61
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
62
+ className
63
+ ),
64
+ ...props
65
+ }
66
+ );
67
+ DialogFooter.displayName = "DialogFooter";
68
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
69
+ DialogPrimitive.Title,
70
+ {
71
+ ref,
72
+ className: cn(
73
+ "text-lg font-semibold leading-none tracking-tight text-[var(--axis-text-primary)]",
74
+ className
75
+ ),
76
+ ...props
77
+ }
78
+ ));
79
+ DialogTitle.displayName = "DialogTitle";
80
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
81
+ DialogPrimitive.Description,
82
+ {
83
+ ref,
84
+ className: cn("text-sm text-[var(--axis-text-secondary)]", className),
85
+ ...props
86
+ }
87
+ ));
88
+ DialogDescription.displayName = "DialogDescription";
14
89
  export {
15
90
  Dialog,
16
91
  DialogClose,
@@ -26,8 +26,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/dropdown-menu/index.tsx
31
29
  var dropdown_menu_exports = {};
32
30
  __export(dropdown_menu_exports, {
33
31
  DropdownMenu: () => DropdownMenu,
@@ -47,37 +45,21 @@ __export(dropdown_menu_exports, {
47
45
  DropdownMenuTrigger: () => DropdownMenuTrigger
48
46
  });
49
47
  module.exports = __toCommonJS(dropdown_menu_exports);
48
+ var import_jsx_runtime = require("react/jsx-runtime");
50
49
  var React = __toESM(require("react"));
51
50
  var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
52
-
53
- // src/utils.ts
54
- var import_clsx = require("clsx");
55
- var import_tailwind_merge = require("tailwind-merge");
56
- var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
57
- var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
58
- extend: {
59
- classGroups: {
60
- shadow: [{ shadow: [isArbitraryShadowWithHint] }]
61
- }
62
- }
63
- });
64
- function cn(...inputs) {
65
- return twMerge((0, import_clsx.clsx)(inputs));
66
- }
67
-
68
- // src/dropdown-menu/index.tsx
69
- var import_jsx_runtime = require("react/jsx-runtime");
70
- var DropdownMenu = DropdownMenuPrimitive.Root;
71
- var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
72
- var DropdownMenuGroup = DropdownMenuPrimitive.Group;
73
- var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
74
- var DropdownMenuSub = DropdownMenuPrimitive.Sub;
75
- var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
76
- var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
51
+ var import_utils = require("../utils.js");
52
+ const DropdownMenu = DropdownMenuPrimitive.Root;
53
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
54
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
55
+ const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
56
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
57
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
58
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
77
59
  DropdownMenuPrimitive.SubTrigger,
78
60
  {
79
61
  ref,
80
- className: cn(
62
+ className: (0, import_utils.cn)(
81
63
  "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none",
82
64
  "focus:bg-[var(--axis-surface-secondary)]",
83
65
  "data-[state=open]:bg-[var(--axis-surface-secondary)]",
@@ -108,11 +90,11 @@ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...
108
90
  }
109
91
  ));
110
92
  DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
111
- var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
112
94
  DropdownMenuPrimitive.SubContent,
113
95
  {
114
96
  ref,
115
- className: cn(
97
+ className: (0, import_utils.cn)(
116
98
  "z-50 min-w-[8rem] overflow-hidden rounded-md border border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] p-1 text-[var(--axis-text-primary)] shadow-lg",
117
99
  "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",
118
100
  className
@@ -121,12 +103,12 @@ var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) =>
121
103
  }
122
104
  ));
123
105
  DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
124
- var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
106
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
125
107
  DropdownMenuPrimitive.Content,
126
108
  {
127
109
  ref,
128
110
  sideOffset,
129
- className: cn(
111
+ className: (0, import_utils.cn)(
130
112
  "z-50 min-w-[8rem] overflow-hidden rounded-md border border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] p-1 text-[var(--axis-text-primary)] shadow-md",
131
113
  "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",
132
114
  className
@@ -135,11 +117,11 @@ var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...prop
135
117
  }
136
118
  ) }));
137
119
  DropdownMenuContent.displayName = "DropdownMenuContent";
138
- var DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
120
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
121
  DropdownMenuPrimitive.Item,
140
122
  {
141
123
  ref,
142
- className: cn(
124
+ className: (0, import_utils.cn)(
143
125
  "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors",
144
126
  "focus:bg-[var(--axis-surface-secondary)] focus:text-[var(--axis-text-primary)]",
145
127
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
@@ -151,11 +133,11 @@ var DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) =>
151
133
  }
152
134
  ));
153
135
  DropdownMenuItem.displayName = "DropdownMenuItem";
154
- var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
136
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
155
137
  DropdownMenuPrimitive.CheckboxItem,
156
138
  {
157
139
  ref,
158
- className: cn(
140
+ className: (0, import_utils.cn)(
159
141
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors",
160
142
  "focus:bg-[var(--axis-surface-secondary)] focus:text-[var(--axis-text-primary)]",
161
143
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
@@ -184,11 +166,11 @@ var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked,
184
166
  }
185
167
  ));
186
168
  DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
187
- var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
169
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
188
170
  DropdownMenuPrimitive.RadioItem,
189
171
  {
190
172
  ref,
191
- className: cn(
173
+ className: (0, import_utils.cn)(
192
174
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors",
193
175
  "focus:bg-[var(--axis-surface-secondary)] focus:text-[var(--axis-text-primary)]",
194
176
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
@@ -212,11 +194,11 @@ var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props },
212
194
  }
213
195
  ));
214
196
  DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
215
- var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
197
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
216
198
  DropdownMenuPrimitive.Label,
217
199
  {
218
200
  ref,
219
- className: cn(
201
+ className: (0, import_utils.cn)(
220
202
  "px-2 py-1.5 text-sm font-semibold",
221
203
  inset && "pl-8",
222
204
  className
@@ -225,11 +207,11 @@ var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) =
225
207
  }
226
208
  ));
227
209
  DropdownMenuLabel.displayName = "DropdownMenuLabel";
228
- var DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
210
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
229
211
  DropdownMenuPrimitive.Separator,
230
212
  {
231
213
  ref,
232
- className: cn(
214
+ className: (0, import_utils.cn)(
233
215
  "-mx-1 my-1 h-px bg-[var(--axis-border-default)]",
234
216
  className
235
217
  ),
@@ -237,13 +219,13 @@ var DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /
237
219
  }
238
220
  ));
239
221
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
240
- var DropdownMenuShortcut = ({
222
+ const DropdownMenuShortcut = ({
241
223
  className,
242
224
  ...props
243
225
  }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
244
226
  "span",
245
227
  {
246
- className: cn(
228
+ className: (0, import_utils.cn)(
247
229
  "ml-auto text-xs tracking-widest text-[var(--axis-text-tertiary)]",
248
230
  className
249
231
  ),