@axis-ds/ui-react 1.4.0 → 1.5.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 (111) hide show
  1. package/README.md +46 -1
  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 +99 -5
  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,14 +1,99 @@
1
- import {
2
- Table,
3
- TableBody,
4
- TableCaption,
5
- TableCell,
6
- TableFooter,
7
- TableHead,
8
- TableHeader,
9
- TableRow
10
- } from "../chunk-4I2F2NLP.mjs";
11
- import "../chunk-ZIF4PLK3.mjs";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../utils.mjs";
4
+ const Table = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
5
+ "table",
6
+ {
7
+ ref,
8
+ className: cn(
9
+ "w-full caption-bottom text-sm text-[var(--axis-text-primary)]",
10
+ className
11
+ ),
12
+ ...props
13
+ }
14
+ ) }));
15
+ Table.displayName = "Table";
16
+ const TableHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
17
+ "thead",
18
+ {
19
+ ref,
20
+ className: cn("[&_tr]:border-b", className),
21
+ ...props
22
+ }
23
+ ));
24
+ TableHeader.displayName = "TableHeader";
25
+ const TableBody = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
26
+ "tbody",
27
+ {
28
+ ref,
29
+ className: cn("[&_tr:last-child]:border-0", className),
30
+ ...props
31
+ }
32
+ ));
33
+ TableBody.displayName = "TableBody";
34
+ const TableFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
35
+ "tfoot",
36
+ {
37
+ ref,
38
+ className: cn(
39
+ "border-t bg-[var(--axis-surface-secondary)] font-medium [&>tr]:last:border-b-0",
40
+ className
41
+ ),
42
+ ...props
43
+ }
44
+ ));
45
+ TableFooter.displayName = "TableFooter";
46
+ const TableRow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
47
+ "tr",
48
+ {
49
+ ref,
50
+ className: cn(
51
+ "border-b border-[var(--axis-border-default)] transition-colors",
52
+ "hover:bg-[var(--axis-surface-secondary)]",
53
+ "data-[state=selected]:bg-[var(--axis-surface-tertiary)]",
54
+ className
55
+ ),
56
+ ...props
57
+ }
58
+ ));
59
+ TableRow.displayName = "TableRow";
60
+ const TableHead = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
61
+ "th",
62
+ {
63
+ ref,
64
+ className: cn(
65
+ "h-12 px-4 text-left align-middle font-medium text-[var(--axis-text-secondary)]",
66
+ "[&:has([role=checkbox])]:pr-0",
67
+ className
68
+ ),
69
+ ...props
70
+ }
71
+ ));
72
+ TableHead.displayName = "TableHead";
73
+ const TableCell = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
74
+ "td",
75
+ {
76
+ ref,
77
+ className: cn(
78
+ "p-4 align-middle [&:has([role=checkbox])]:pr-0",
79
+ className
80
+ ),
81
+ ...props
82
+ }
83
+ ));
84
+ TableCell.displayName = "TableCell";
85
+ const TableCaption = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
86
+ "caption",
87
+ {
88
+ ref,
89
+ className: cn(
90
+ "mt-4 text-sm text-[var(--axis-text-secondary)]",
91
+ className
92
+ ),
93
+ ...props
94
+ }
95
+ ));
96
+ TableCaption.displayName = "TableCaption";
12
97
  export {
13
98
  Table,
14
99
  TableBody,
@@ -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/tabs/index.tsx
31
29
  var tabs_exports = {};
32
30
  __export(tabs_exports, {
33
31
  Tabs: () => Tabs,
@@ -36,32 +34,16 @@ __export(tabs_exports, {
36
34
  TabsTrigger: () => TabsTrigger
37
35
  });
38
36
  module.exports = __toCommonJS(tabs_exports);
37
+ var import_jsx_runtime = require("react/jsx-runtime");
39
38
  var React = __toESM(require("react"));
40
39
  var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
41
-
42
- // src/utils.ts
43
- var import_clsx = require("clsx");
44
- var import_tailwind_merge = require("tailwind-merge");
45
- var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
46
- var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
47
- extend: {
48
- classGroups: {
49
- shadow: [{ shadow: [isArbitraryShadowWithHint] }]
50
- }
51
- }
52
- });
53
- function cn(...inputs) {
54
- return twMerge((0, import_clsx.clsx)(inputs));
55
- }
56
-
57
- // src/tabs/index.tsx
58
- var import_jsx_runtime = require("react/jsx-runtime");
59
- var Tabs = TabsPrimitive.Root;
60
- var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
40
+ var import_utils = require("../utils.js");
41
+ const Tabs = TabsPrimitive.Root;
42
+ const TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
43
  TabsPrimitive.List,
62
44
  {
63
45
  ref,
64
- className: cn(
46
+ className: (0, import_utils.cn)(
65
47
  "inline-flex h-10 items-center justify-center rounded-md p-1",
66
48
  "bg-[var(--axis-surface-secondary)] text-[var(--axis-text-secondary)]",
67
49
  className
@@ -70,11 +52,11 @@ var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
70
52
  }
71
53
  ));
72
54
  TabsList.displayName = "TabsList";
73
- var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
+ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
56
  TabsPrimitive.Trigger,
75
57
  {
76
58
  ref,
77
- className: cn(
59
+ className: (0, import_utils.cn)(
78
60
  "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all",
79
61
  "ring-offset-[var(--axis-surface-default)]",
80
62
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
@@ -86,11 +68,11 @@ var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
86
68
  }
87
69
  ));
88
70
  TabsTrigger.displayName = "TabsTrigger";
89
- var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
+ const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
72
  TabsPrimitive.Content,
91
73
  {
92
74
  ref,
93
- className: cn(
75
+ className: (0, import_utils.cn)(
94
76
  "mt-2 ring-offset-[var(--axis-surface-default)]",
95
77
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
96
78
  className
@@ -1,10 +1,50 @@
1
- import {
2
- Tabs,
3
- TabsContent,
4
- TabsList,
5
- TabsTrigger
6
- } from "../chunk-SO2QSRGV.mjs";
7
- import "../chunk-ZIF4PLK3.mjs";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
4
+ import { cn } from "../utils.mjs";
5
+ const Tabs = TabsPrimitive.Root;
6
+ const TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7
+ TabsPrimitive.List,
8
+ {
9
+ ref,
10
+ className: cn(
11
+ "inline-flex h-10 items-center justify-center rounded-md p-1",
12
+ "bg-[var(--axis-surface-secondary)] text-[var(--axis-text-secondary)]",
13
+ className
14
+ ),
15
+ ...props
16
+ }
17
+ ));
18
+ TabsList.displayName = "TabsList";
19
+ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
20
+ TabsPrimitive.Trigger,
21
+ {
22
+ ref,
23
+ className: cn(
24
+ "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all",
25
+ "ring-offset-[var(--axis-surface-default)]",
26
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
27
+ "disabled:pointer-events-none disabled:opacity-50",
28
+ "data-[state=active]:bg-[var(--axis-surface-default)] data-[state=active]:text-[var(--axis-text-primary)] data-[state=active]:shadow-sm",
29
+ className
30
+ ),
31
+ ...props
32
+ }
33
+ ));
34
+ TabsTrigger.displayName = "TabsTrigger";
35
+ const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
36
+ TabsPrimitive.Content,
37
+ {
38
+ ref,
39
+ className: cn(
40
+ "mt-2 ring-offset-[var(--axis-surface-default)]",
41
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
42
+ className
43
+ ),
44
+ ...props
45
+ }
46
+ ));
47
+ TabsContent.displayName = "TabsContent";
8
48
  export {
9
49
  Tabs,
10
50
  TabsContent,
@@ -26,36 +26,18 @@ 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/textarea/index.tsx
31
29
  var textarea_exports = {};
32
30
  __export(textarea_exports, {
33
31
  Textarea: () => Textarea
34
32
  });
35
33
  module.exports = __toCommonJS(textarea_exports);
36
- var React = __toESM(require("react"));
37
-
38
- // src/utils.ts
39
- var import_clsx = require("clsx");
40
- var import_tailwind_merge = require("tailwind-merge");
41
- var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
42
- var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
43
- extend: {
44
- classGroups: {
45
- shadow: [{ shadow: [isArbitraryShadowWithHint] }]
46
- }
47
- }
48
- });
49
- function cn(...inputs) {
50
- return twMerge((0, import_clsx.clsx)(inputs));
51
- }
52
-
53
- // src/textarea/index.tsx
54
34
  var import_jsx_runtime = require("react/jsx-runtime");
55
- var Textarea = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
35
+ var React = __toESM(require("react"));
36
+ var import_utils = require("../utils.js");
37
+ const Textarea = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
38
  "textarea",
57
39
  {
58
- className: cn(
40
+ className: (0, import_utils.cn)(
59
41
  "flex min-h-[80px] w-full rounded-md border border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] px-3 py-2 text-sm",
60
42
  "text-[var(--axis-text-primary)]",
61
43
  "ring-offset-[var(--axis-surface-default)]",
@@ -1,7 +1,23 @@
1
- import {
2
- Textarea
3
- } from "../chunk-5Z2R3IHJ.mjs";
4
- import "../chunk-ZIF4PLK3.mjs";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../utils.mjs";
4
+ const Textarea = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
5
+ "textarea",
6
+ {
7
+ className: cn(
8
+ "flex min-h-[80px] w-full rounded-md border border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] px-3 py-2 text-sm",
9
+ "text-[var(--axis-text-primary)]",
10
+ "ring-offset-[var(--axis-surface-default)]",
11
+ "placeholder:text-[var(--axis-text-tertiary)]",
12
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
13
+ "disabled:cursor-not-allowed disabled:opacity-50",
14
+ className
15
+ ),
16
+ ref,
17
+ ...props
18
+ }
19
+ ));
20
+ Textarea.displayName = "Textarea";
5
21
  export {
6
22
  Textarea
7
23
  };
@@ -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/toast/index.tsx
31
29
  var toast_exports = {};
32
30
  __export(toast_exports, {
33
31
  Toast: () => Toast,
@@ -39,33 +37,17 @@ __export(toast_exports, {
39
37
  ToastViewport: () => ToastViewport
40
38
  });
41
39
  module.exports = __toCommonJS(toast_exports);
40
+ var import_jsx_runtime = require("react/jsx-runtime");
42
41
  var React = __toESM(require("react"));
43
42
  var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
44
43
  var import_class_variance_authority = require("class-variance-authority");
45
-
46
- // src/utils.ts
47
- var import_clsx = require("clsx");
48
- var import_tailwind_merge = require("tailwind-merge");
49
- var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
50
- var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
51
- extend: {
52
- classGroups: {
53
- shadow: [{ shadow: [isArbitraryShadowWithHint] }]
54
- }
55
- }
56
- });
57
- function cn(...inputs) {
58
- return twMerge((0, import_clsx.clsx)(inputs));
59
- }
60
-
61
- // src/toast/index.tsx
62
- var import_jsx_runtime = require("react/jsx-runtime");
63
- var ToastProvider = ToastPrimitives.Provider;
64
- var ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ var import_utils = require("../utils.js");
45
+ const ToastProvider = ToastPrimitives.Provider;
46
+ const ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
47
  ToastPrimitives.Viewport,
66
48
  {
67
49
  ref,
68
- className: cn(
50
+ className: (0, import_utils.cn)(
69
51
  "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
70
52
  className
71
53
  ),
@@ -73,7 +55,7 @@ var ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
73
55
  }
74
56
  ));
75
57
  ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
76
- var toastVariants = (0, import_class_variance_authority.cva)(
58
+ const toastVariants = (0, import_class_variance_authority.cva)(
77
59
  "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
78
60
  {
79
61
  variants: {
@@ -89,20 +71,20 @@ var toastVariants = (0, import_class_variance_authority.cva)(
89
71
  }
90
72
  }
91
73
  );
92
- var Toast = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
+ const Toast = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
75
  ToastPrimitives.Root,
94
76
  {
95
77
  ref,
96
- className: cn(toastVariants({ variant }), className),
78
+ className: (0, import_utils.cn)(toastVariants({ variant }), className),
97
79
  ...props
98
80
  }
99
81
  ));
100
82
  Toast.displayName = ToastPrimitives.Root.displayName;
101
- var ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
83
+ const ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
102
84
  ToastPrimitives.Action,
103
85
  {
104
86
  ref,
105
- className: cn(
87
+ className: (0, import_utils.cn)(
106
88
  "inline-flex h-8 shrink-0 items-center justify-center rounded-md border px-3 text-sm font-medium transition-colors",
107
89
  "border-[var(--axis-border-default)] bg-transparent",
108
90
  "hover:bg-[var(--axis-surface-secondary)]",
@@ -114,11 +96,11 @@ var ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
114
96
  }
115
97
  ));
116
98
  ToastAction.displayName = ToastPrimitives.Action.displayName;
117
- var ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
99
+ const ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
118
100
  ToastPrimitives.Close,
119
101
  {
120
102
  ref,
121
- className: cn(
103
+ className: (0, import_utils.cn)(
122
104
  "absolute right-2 top-2 rounded-md p-1 text-[var(--axis-text-secondary)] opacity-0 transition-opacity",
123
105
  "hover:text-[var(--axis-text-primary)]",
124
106
  "focus:opacity-100 focus:outline-none focus:ring-2",
@@ -131,20 +113,20 @@ var ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
131
113
  }
132
114
  ));
133
115
  ToastClose.displayName = ToastPrimitives.Close.displayName;
134
- var ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
+ const ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
135
117
  ToastPrimitives.Title,
136
118
  {
137
119
  ref,
138
- className: cn("text-sm font-semibold", className),
120
+ className: (0, import_utils.cn)("text-sm font-semibold", className),
139
121
  ...props
140
122
  }
141
123
  ));
142
124
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
143
- var ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
125
+ const ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
144
126
  ToastPrimitives.Description,
145
127
  {
146
128
  ref,
147
- className: cn("text-sm opacity-90", className),
129
+ className: (0, import_utils.cn)("text-sm opacity-90", className),
148
130
  ...props
149
131
  }
150
132
  ));
@@ -1,13 +1,97 @@
1
- import {
2
- Toast,
3
- ToastAction,
4
- ToastClose,
5
- ToastDescription,
6
- ToastProvider,
7
- ToastTitle,
8
- ToastViewport
9
- } from "../chunk-RFB4IABR.mjs";
10
- import "../chunk-ZIF4PLK3.mjs";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as ToastPrimitives from "@radix-ui/react-toast";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../utils.mjs";
6
+ const ToastProvider = ToastPrimitives.Provider;
7
+ const ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8
+ ToastPrimitives.Viewport,
9
+ {
10
+ ref,
11
+ className: cn(
12
+ "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
13
+ className
14
+ ),
15
+ ...props
16
+ }
17
+ ));
18
+ ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
19
+ const toastVariants = cva(
20
+ "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
21
+ {
22
+ variants: {
23
+ variant: {
24
+ default: "border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] text-[var(--axis-text-primary)]",
25
+ success: "border-[var(--axis-border-success)] bg-[var(--axis-surface-success)] text-[var(--axis-text-success)]",
26
+ error: "border-[var(--axis-border-error)] bg-[var(--axis-surface-error)] text-[var(--axis-text-error)]",
27
+ warning: "border-transparent bg-[var(--axis-surface-warning)] text-[var(--axis-text-warning)]"
28
+ }
29
+ },
30
+ defaultVariants: {
31
+ variant: "default"
32
+ }
33
+ }
34
+ );
35
+ const Toast = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
36
+ ToastPrimitives.Root,
37
+ {
38
+ ref,
39
+ className: cn(toastVariants({ variant }), className),
40
+ ...props
41
+ }
42
+ ));
43
+ Toast.displayName = ToastPrimitives.Root.displayName;
44
+ const ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
45
+ ToastPrimitives.Action,
46
+ {
47
+ ref,
48
+ className: cn(
49
+ "inline-flex h-8 shrink-0 items-center justify-center rounded-md border px-3 text-sm font-medium transition-colors",
50
+ "border-[var(--axis-border-default)] bg-transparent",
51
+ "hover:bg-[var(--axis-surface-secondary)]",
52
+ "focus:outline-none focus:ring-2 focus:ring-[var(--axis-border-focus)]",
53
+ "disabled:pointer-events-none disabled:opacity-50",
54
+ className
55
+ ),
56
+ ...props
57
+ }
58
+ ));
59
+ ToastAction.displayName = ToastPrimitives.Action.displayName;
60
+ const ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
61
+ ToastPrimitives.Close,
62
+ {
63
+ ref,
64
+ className: cn(
65
+ "absolute right-2 top-2 rounded-md p-1 text-[var(--axis-text-secondary)] opacity-0 transition-opacity",
66
+ "hover:text-[var(--axis-text-primary)]",
67
+ "focus:opacity-100 focus:outline-none focus:ring-2",
68
+ "group-hover:opacity-100",
69
+ className
70
+ ),
71
+ "toast-close": "",
72
+ ...props,
73
+ children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
74
+ }
75
+ ));
76
+ ToastClose.displayName = ToastPrimitives.Close.displayName;
77
+ const ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
78
+ ToastPrimitives.Title,
79
+ {
80
+ ref,
81
+ className: cn("text-sm font-semibold", className),
82
+ ...props
83
+ }
84
+ ));
85
+ ToastTitle.displayName = ToastPrimitives.Title.displayName;
86
+ const ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
87
+ ToastPrimitives.Description,
88
+ {
89
+ ref,
90
+ className: cn("text-sm opacity-90", className),
91
+ ...props
92
+ }
93
+ ));
94
+ ToastDescription.displayName = ToastPrimitives.Description.displayName;
11
95
  export {
12
96
  Toast,
13
97
  ToastAction,
@@ -26,36 +26,18 @@ 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/toggle/index.tsx
31
29
  var toggle_exports = {};
32
30
  __export(toggle_exports, {
33
31
  Toggle: () => Toggle,
34
32
  toggleVariants: () => toggleVariants
35
33
  });
36
34
  module.exports = __toCommonJS(toggle_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
37
36
  var React = __toESM(require("react"));
38
37
  var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"));
39
38
  var import_class_variance_authority = require("class-variance-authority");
40
-
41
- // src/utils.ts
42
- var import_clsx = require("clsx");
43
- var import_tailwind_merge = require("tailwind-merge");
44
- var isArbitraryShadowWithHint = (value) => /^\[shadow:.+\]$/.test(value);
45
- var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
46
- extend: {
47
- classGroups: {
48
- shadow: [{ shadow: [isArbitraryShadowWithHint] }]
49
- }
50
- }
51
- });
52
- function cn(...inputs) {
53
- return twMerge((0, import_clsx.clsx)(inputs));
54
- }
55
-
56
- // src/toggle/index.tsx
57
- var import_jsx_runtime = require("react/jsx-runtime");
58
- var toggleVariants = (0, import_class_variance_authority.cva)(
39
+ var import_utils = require("../utils.js");
40
+ const toggleVariants = (0, import_class_variance_authority.cva)(
59
41
  "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-[var(--axis-surface-default)] transition-colors hover:bg-[var(--axis-surface-secondary)] hover:text-[var(--axis-text-secondary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-[var(--axis-surface-secondary)] data-[state=on]:text-[var(--axis-text-primary)] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
60
42
  {
61
43
  variants: {
@@ -75,11 +57,11 @@ var toggleVariants = (0, import_class_variance_authority.cva)(
75
57
  }
76
58
  }
77
59
  );
78
- var Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ const Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
79
61
  TogglePrimitive.Root,
80
62
  {
81
63
  ref,
82
- className: cn(toggleVariants({ variant, size, className })),
64
+ className: (0, import_utils.cn)(toggleVariants({ variant, size, className })),
83
65
  ...props
84
66
  }
85
67
  ));
@@ -1,8 +1,37 @@
1
- import {
2
- Toggle,
3
- toggleVariants
4
- } from "../chunk-TB33GTWS.mjs";
5
- import "../chunk-ZIF4PLK3.mjs";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../utils.mjs";
6
+ const toggleVariants = cva(
7
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-[var(--axis-surface-default)] transition-colors hover:bg-[var(--axis-surface-secondary)] hover:text-[var(--axis-text-secondary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-[var(--axis-surface-secondary)] data-[state=on]:text-[var(--axis-text-primary)] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-transparent",
12
+ outline: "border border-[var(--axis-border-default)] bg-transparent hover:bg-[var(--axis-surface-secondary)] hover:text-[var(--axis-text-primary)]"
13
+ },
14
+ size: {
15
+ default: "h-10 px-3 min-w-10",
16
+ sm: "h-9 px-2.5 min-w-9",
17
+ lg: "h-11 px-5 min-w-11"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ variant: "default",
22
+ size: "default"
23
+ }
24
+ }
25
+ );
26
+ const Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
27
+ TogglePrimitive.Root,
28
+ {
29
+ ref,
30
+ className: cn(toggleVariants({ variant, size, className })),
31
+ ...props
32
+ }
33
+ ));
34
+ Toggle.displayName = "Toggle";
6
35
  export {
7
36
  Toggle,
8
37
  toggleVariants