@axis-ds/ui-react 1.1.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 (177) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -0
  3. package/dist/accordion/index.d.mts +13 -0
  4. package/dist/accordion/index.d.ts +13 -0
  5. package/dist/accordion/index.js +111 -0
  6. package/dist/accordion/index.mjs +13 -0
  7. package/dist/alert/index.d.mts +21 -0
  8. package/dist/alert/index.d.ts +21 -0
  9. package/dist/alert/index.js +104 -0
  10. package/dist/alert/index.mjs +13 -0
  11. package/dist/avatar/index.d.mts +26 -0
  12. package/dist/avatar/index.d.ts +26 -0
  13. package/dist/avatar/index.js +97 -0
  14. package/dist/avatar/index.mjs +9 -0
  15. package/dist/badge/index.d.mts +17 -0
  16. package/dist/badge/index.d.ts +17 -0
  17. package/dist/badge/index.js +84 -0
  18. package/dist/badge/index.mjs +9 -0
  19. package/dist/breadcrumb/index.d.mts +34 -0
  20. package/dist/breadcrumb/index.d.ts +34 -0
  21. package/dist/breadcrumb/index.js +177 -0
  22. package/dist/breadcrumb/index.mjs +19 -0
  23. package/dist/button/index.d.mts +21 -0
  24. package/dist/button/index.d.ts +21 -0
  25. package/dist/button/index.js +93 -0
  26. package/dist/button/index.mjs +9 -0
  27. package/dist/card/index.d.mts +19 -0
  28. package/dist/card/index.d.ts +19 -0
  29. package/dist/card/index.js +115 -0
  30. package/dist/card/index.mjs +17 -0
  31. package/dist/checkbox/index.d.mts +10 -0
  32. package/dist/checkbox/index.d.ts +10 -0
  33. package/dist/checkbox/index.js +88 -0
  34. package/dist/checkbox/index.mjs +7 -0
  35. package/dist/chunk-3H7DF7QZ.mjs +49 -0
  36. package/dist/chunk-3I222KOY.mjs +123 -0
  37. package/dist/chunk-3N6NG7VT.mjs +11 -0
  38. package/dist/chunk-4AWNSTZH.mjs +57 -0
  39. package/dist/chunk-4JQWQF3H.mjs +25 -0
  40. package/dist/chunk-54Y3KUM5.mjs +28 -0
  41. package/dist/chunk-5PIG7LWJ.mjs +139 -0
  42. package/dist/chunk-6TRDXC4W.mjs +69 -0
  43. package/dist/chunk-7OPZAWBW.mjs +58 -0
  44. package/dist/chunk-A5FJHFJQ.mjs +210 -0
  45. package/dist/chunk-AEBHTW7E.mjs +29 -0
  46. package/dist/chunk-AJERK2UH.mjs +49 -0
  47. package/dist/chunk-APUPJHAQ.mjs +43 -0
  48. package/dist/chunk-AUXVXNU2.mjs +105 -0
  49. package/dist/chunk-B2GWR74O.mjs +144 -0
  50. package/dist/chunk-CTWUJDKA.mjs +49 -0
  51. package/dist/chunk-E2C7WDLA.mjs +108 -0
  52. package/dist/chunk-ECF2JRI5.mjs +43 -0
  53. package/dist/chunk-EJNQRWUO.mjs +29 -0
  54. package/dist/chunk-F6RLUX3E.mjs +37 -0
  55. package/dist/chunk-FMXB7UCT.mjs +27 -0
  56. package/dist/chunk-HQB5TO4N.mjs +28 -0
  57. package/dist/chunk-HYW3HTBA.mjs +31 -0
  58. package/dist/chunk-IOOOCHIG.mjs +49 -0
  59. package/dist/chunk-IXLVGZWU.mjs +105 -0
  60. package/dist/chunk-JJY2MCTX.mjs +25 -0
  61. package/dist/chunk-JM45JPSK.mjs +43 -0
  62. package/dist/chunk-JQV5IP5Z.mjs +28 -0
  63. package/dist/chunk-KAIB45YN.mjs +132 -0
  64. package/dist/chunk-MARIIZN7.mjs +53 -0
  65. package/dist/chunk-NEZK6NO5.mjs +58 -0
  66. package/dist/chunk-NFFXJB2O.mjs +11 -0
  67. package/dist/chunk-O5SM54HW.mjs +71 -0
  68. package/dist/chunk-OIQGWWAS.mjs +42 -0
  69. package/dist/chunk-PJO7WJ4G.mjs +10 -0
  70. package/dist/chunk-PUERRSNI.mjs +37 -0
  71. package/dist/chunk-Q3KALTWT.mjs +37 -0
  72. package/dist/chunk-Q4WL74ZY.mjs +43 -0
  73. package/dist/chunk-RBVNJKEQ.mjs +210 -0
  74. package/dist/chunk-SCH6SFLB.mjs +37 -0
  75. package/dist/chunk-SLQ756Q7.mjs +36 -0
  76. package/dist/chunk-SPUFU4HC.mjs +139 -0
  77. package/dist/chunk-SR3JZW6T.mjs +210 -0
  78. package/dist/chunk-TD5OLTUB.mjs +62 -0
  79. package/dist/chunk-WVWKKHBP.mjs +44 -0
  80. package/dist/chunk-XHILRI24.mjs +111 -0
  81. package/dist/chunk-XW4HTSUY.mjs +123 -0
  82. package/dist/chunk-YKZAU3UV.mjs +144 -0
  83. package/dist/chunk-YVJ7BL4T.mjs +81 -0
  84. package/dist/chunk-ZU6FMFB5.mjs +31 -0
  85. package/dist/collapsible/index.d.mts +11 -0
  86. package/dist/collapsible/index.d.ts +11 -0
  87. package/dist/collapsible/index.js +47 -0
  88. package/dist/collapsible/index.mjs +10 -0
  89. package/dist/command/index.d.mts +86 -0
  90. package/dist/command/index.d.ts +86 -0
  91. package/dist/command/index.js +168 -0
  92. package/dist/command/index.mjs +19 -0
  93. package/dist/dialog/index.d.mts +32 -0
  94. package/dist/dialog/index.d.ts +32 -0
  95. package/dist/dialog/index.js +153 -0
  96. package/dist/dialog/index.mjs +25 -0
  97. package/dist/dropdown-menu/index.d.mts +57 -0
  98. package/dist/dropdown-menu/index.d.ts +57 -0
  99. package/dist/dropdown-menu/index.js +263 -0
  100. package/dist/dropdown-menu/index.mjs +35 -0
  101. package/dist/index.d.mts +60 -0
  102. package/dist/index.d.ts +60 -0
  103. package/dist/index.js +2029 -0
  104. package/dist/index.mjs +308 -0
  105. package/dist/input/index.d.mts +14 -0
  106. package/dist/input/index.d.ts +14 -0
  107. package/dist/input/index.js +75 -0
  108. package/dist/input/index.mjs +7 -0
  109. package/dist/label/index.d.mts +16 -0
  110. package/dist/label/index.d.ts +16 -0
  111. package/dist/label/index.js +64 -0
  112. package/dist/label/index.mjs +7 -0
  113. package/dist/popover/index.d.mts +11 -0
  114. package/dist/popover/index.d.ts +11 -0
  115. package/dist/popover/index.js +72 -0
  116. package/dist/popover/index.mjs +11 -0
  117. package/dist/progress/index.d.mts +27 -0
  118. package/dist/progress/index.d.ts +27 -0
  119. package/dist/progress/index.js +122 -0
  120. package/dist/progress/index.mjs +11 -0
  121. package/dist/radio-group/index.d.mts +9 -0
  122. package/dist/radio-group/index.d.ts +9 -0
  123. package/dist/radio-group/index.js +89 -0
  124. package/dist/radio-group/index.mjs +9 -0
  125. package/dist/scroll-area/index.d.mts +9 -0
  126. package/dist/scroll-area/index.d.ts +9 -0
  127. package/dist/scroll-area/index.js +83 -0
  128. package/dist/scroll-area/index.mjs +9 -0
  129. package/dist/select/index.d.mts +21 -0
  130. package/dist/select/index.d.ts +21 -0
  131. package/dist/select/index.js +190 -0
  132. package/dist/select/index.mjs +21 -0
  133. package/dist/separator/index.d.mts +13 -0
  134. package/dist/separator/index.d.ts +13 -0
  135. package/dist/separator/index.js +68 -0
  136. package/dist/separator/index.mjs +7 -0
  137. package/dist/sheet/index.d.mts +43 -0
  138. package/dist/sheet/index.d.ts +43 -0
  139. package/dist/sheet/index.js +187 -0
  140. package/dist/sheet/index.mjs +25 -0
  141. package/dist/skeleton/index.d.mts +9 -0
  142. package/dist/skeleton/index.d.ts +9 -0
  143. package/dist/skeleton/index.js +66 -0
  144. package/dist/skeleton/index.mjs +7 -0
  145. package/dist/slider/index.d.mts +7 -0
  146. package/dist/slider/index.d.ts +7 -0
  147. package/dist/slider/index.js +67 -0
  148. package/dist/slider/index.mjs +7 -0
  149. package/dist/switch/index.d.mts +7 -0
  150. package/dist/switch/index.d.ts +7 -0
  151. package/dist/switch/index.js +76 -0
  152. package/dist/switch/index.mjs +7 -0
  153. package/dist/table/index.d.mts +20 -0
  154. package/dist/table/index.d.ts +20 -0
  155. package/dist/table/index.js +157 -0
  156. package/dist/table/index.mjs +21 -0
  157. package/dist/tabs/index.d.mts +13 -0
  158. package/dist/tabs/index.d.ts +13 -0
  159. package/dist/tabs/index.js +100 -0
  160. package/dist/tabs/index.mjs +13 -0
  161. package/dist/textarea/index.d.mts +6 -0
  162. package/dist/textarea/index.d.ts +6 -0
  163. package/dist/textarea/index.js +67 -0
  164. package/dist/textarea/index.mjs +7 -0
  165. package/dist/toast/index.d.mts +23 -0
  166. package/dist/toast/index.d.ts +23 -0
  167. package/dist/toast/index.js +153 -0
  168. package/dist/toast/index.mjs +19 -0
  169. package/dist/toggle/index.d.mts +16 -0
  170. package/dist/toggle/index.d.ts +16 -0
  171. package/dist/toggle/index.js +83 -0
  172. package/dist/toggle/index.mjs +9 -0
  173. package/dist/tooltip/index.d.mts +13 -0
  174. package/dist/tooltip/index.d.ts +13 -0
  175. package/dist/tooltip/index.js +79 -0
  176. package/dist/tooltip/index.mjs +13 -0
  177. package/package.json +206 -0
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/toast/index.tsx
31
+ var toast_exports = {};
32
+ __export(toast_exports, {
33
+ Toast: () => Toast,
34
+ ToastAction: () => ToastAction,
35
+ ToastClose: () => ToastClose,
36
+ ToastDescription: () => ToastDescription,
37
+ ToastProvider: () => ToastProvider,
38
+ ToastTitle: () => ToastTitle,
39
+ ToastViewport: () => ToastViewport
40
+ });
41
+ module.exports = __toCommonJS(toast_exports);
42
+ var React = __toESM(require("react"));
43
+ var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
44
+ 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
+ function cn(...inputs) {
50
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
51
+ }
52
+
53
+ // src/toast/index.tsx
54
+ var import_jsx_runtime = require("react/jsx-runtime");
55
+ var ToastProvider = ToastPrimitives.Provider;
56
+ var ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
+ ToastPrimitives.Viewport,
58
+ {
59
+ ref,
60
+ className: cn(
61
+ "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]",
62
+ className
63
+ ),
64
+ ...props
65
+ }
66
+ ));
67
+ ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
68
+ var toastVariants = (0, import_class_variance_authority.cva)(
69
+ "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",
70
+ {
71
+ variants: {
72
+ variant: {
73
+ default: "border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] text-[var(--axis-text-primary)]",
74
+ success: "border-[var(--axis-border-success)] bg-[var(--axis-surface-success)] text-[var(--axis-text-success)]",
75
+ error: "border-[var(--axis-border-error)] bg-[var(--axis-surface-error)] text-[var(--axis-text-error)]",
76
+ warning: "border-transparent bg-[var(--axis-surface-warning)] text-[var(--axis-text-warning)]"
77
+ }
78
+ },
79
+ defaultVariants: {
80
+ variant: "default"
81
+ }
82
+ }
83
+ );
84
+ var Toast = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
85
+ ToastPrimitives.Root,
86
+ {
87
+ ref,
88
+ className: cn(toastVariants({ variant }), className),
89
+ ...props
90
+ }
91
+ ));
92
+ Toast.displayName = ToastPrimitives.Root.displayName;
93
+ var ToastAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
94
+ ToastPrimitives.Action,
95
+ {
96
+ ref,
97
+ className: cn(
98
+ "inline-flex h-8 shrink-0 items-center justify-center rounded-md border px-3 text-sm font-medium transition-colors",
99
+ "border-[var(--axis-border-default)] bg-transparent",
100
+ "hover:bg-[var(--axis-surface-secondary)]",
101
+ "focus:outline-none focus:ring-2 focus:ring-[var(--axis-border-focus)]",
102
+ "disabled:pointer-events-none disabled:opacity-50",
103
+ className
104
+ ),
105
+ ...props
106
+ }
107
+ ));
108
+ ToastAction.displayName = ToastPrimitives.Action.displayName;
109
+ var ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ ToastPrimitives.Close,
111
+ {
112
+ ref,
113
+ className: cn(
114
+ "absolute right-2 top-2 rounded-md p-1 text-[var(--axis-text-secondary)] opacity-0 transition-opacity",
115
+ "hover:text-[var(--axis-text-primary)]",
116
+ "focus:opacity-100 focus:outline-none focus:ring-2",
117
+ "group-hover:opacity-100",
118
+ className
119
+ ),
120
+ "toast-close": "",
121
+ ...props,
122
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { className: "h-4 w-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
123
+ }
124
+ ));
125
+ ToastClose.displayName = ToastPrimitives.Close.displayName;
126
+ var ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
127
+ ToastPrimitives.Title,
128
+ {
129
+ ref,
130
+ className: cn("text-sm font-semibold", className),
131
+ ...props
132
+ }
133
+ ));
134
+ ToastTitle.displayName = ToastPrimitives.Title.displayName;
135
+ var ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
+ ToastPrimitives.Description,
137
+ {
138
+ ref,
139
+ className: cn("text-sm opacity-90", className),
140
+ ...props
141
+ }
142
+ ));
143
+ ToastDescription.displayName = ToastPrimitives.Description.displayName;
144
+ // Annotate the CommonJS export names for ESM import in node:
145
+ 0 && (module.exports = {
146
+ Toast,
147
+ ToastAction,
148
+ ToastClose,
149
+ ToastDescription,
150
+ ToastProvider,
151
+ ToastTitle,
152
+ ToastViewport
153
+ });
@@ -0,0 +1,19 @@
1
+ import {
2
+ Toast,
3
+ ToastAction,
4
+ ToastClose,
5
+ ToastDescription,
6
+ ToastProvider,
7
+ ToastTitle,
8
+ ToastViewport
9
+ } from "../chunk-E2C7WDLA.mjs";
10
+ import "../chunk-PJO7WJ4G.mjs";
11
+ export {
12
+ Toast,
13
+ ToastAction,
14
+ ToastClose,
15
+ ToastDescription,
16
+ ToastProvider,
17
+ ToastTitle,
18
+ ToastViewport
19
+ };
@@ -0,0 +1,16 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import * as TogglePrimitive from '@radix-ui/react-toggle';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare const toggleVariants: (props?: ({
7
+ variant?: "default" | "outline" | null | undefined;
8
+ size?: "default" | "sm" | "lg" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ /** 눌림/해제 상태를 전환하는 토글 버튼 컴포넌트. variant(default, outline)와 size(sm, default, lg) 변형을 지원한다. */
11
+ declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
12
+ variant?: "default" | "outline" | null | undefined;
13
+ size?: "default" | "sm" | "lg" | null | undefined;
14
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
15
+
16
+ export { Toggle, toggleVariants };
@@ -0,0 +1,16 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import * as TogglePrimitive from '@radix-ui/react-toggle';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare const toggleVariants: (props?: ({
7
+ variant?: "default" | "outline" | null | undefined;
8
+ size?: "default" | "sm" | "lg" | null | undefined;
9
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
10
+ /** 눌림/해제 상태를 전환하는 토글 버튼 컴포넌트. variant(default, outline)와 size(sm, default, lg) 변형을 지원한다. */
11
+ declare const Toggle: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
12
+ variant?: "default" | "outline" | null | undefined;
13
+ size?: "default" | "sm" | "lg" | null | undefined;
14
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLButtonElement>>;
15
+
16
+ export { Toggle, toggleVariants };
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/toggle/index.tsx
31
+ var toggle_exports = {};
32
+ __export(toggle_exports, {
33
+ Toggle: () => Toggle,
34
+ toggleVariants: () => toggleVariants
35
+ });
36
+ module.exports = __toCommonJS(toggle_exports);
37
+ var React = __toESM(require("react"));
38
+ var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"));
39
+ 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
+ function cn(...inputs) {
45
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
46
+ }
47
+
48
+ // src/toggle/index.tsx
49
+ var import_jsx_runtime = require("react/jsx-runtime");
50
+ var toggleVariants = (0, import_class_variance_authority.cva)(
51
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-[var(--axis-surface-primary)] 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-ring)] 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",
52
+ {
53
+ variants: {
54
+ variant: {
55
+ default: "bg-transparent",
56
+ outline: "border border-[var(--axis-border-default)] bg-transparent hover:bg-[var(--axis-surface-secondary)] hover:text-[var(--axis-text-primary)]"
57
+ },
58
+ size: {
59
+ default: "h-10 px-3 min-w-10",
60
+ sm: "h-9 px-2.5 min-w-9",
61
+ lg: "h-11 px-5 min-w-11"
62
+ }
63
+ },
64
+ defaultVariants: {
65
+ variant: "default",
66
+ size: "default"
67
+ }
68
+ }
69
+ );
70
+ var Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
+ TogglePrimitive.Root,
72
+ {
73
+ ref,
74
+ className: cn(toggleVariants({ variant, size, className })),
75
+ ...props
76
+ }
77
+ ));
78
+ Toggle.displayName = "Toggle";
79
+ // Annotate the CommonJS export names for ESM import in node:
80
+ 0 && (module.exports = {
81
+ Toggle,
82
+ toggleVariants
83
+ });
@@ -0,0 +1,9 @@
1
+ import {
2
+ Toggle,
3
+ toggleVariants
4
+ } from "../chunk-JM45JPSK.mjs";
5
+ import "../chunk-PJO7WJ4G.mjs";
6
+ export {
7
+ Toggle,
8
+ toggleVariants
9
+ };
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
+
4
+ /** 툴팁 시스템의 프로바이더 컴포넌트. delayDuration 등 전역 설정을 관리한다. */
5
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
6
+ /** 툴팁의 루트 컴포넌트. 열림/닫힘 상태를 관리한다. */
7
+ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
8
+ /** 툴팁을 표시하기 위한 트리거 요소 */
9
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
10
+ /** 툴팁의 콘텐츠를 표시하는 컴포넌트. 포탈을 통해 렌더링되며 방향별 슬라이드 애니메이션을 지원한다. */
11
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+
13
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
+
4
+ /** 툴팁 시스템의 프로바이더 컴포넌트. delayDuration 등 전역 설정을 관리한다. */
5
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
6
+ /** 툴팁의 루트 컴포넌트. 열림/닫힘 상태를 관리한다. */
7
+ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
8
+ /** 툴팁을 표시하기 위한 트리거 요소 */
9
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
10
+ /** 툴팁의 콘텐츠를 표시하는 컴포넌트. 포탈을 통해 렌더링되며 방향별 슬라이드 애니메이션을 지원한다. */
11
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+
13
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/tooltip/index.tsx
31
+ var tooltip_exports = {};
32
+ __export(tooltip_exports, {
33
+ Tooltip: () => Tooltip,
34
+ TooltipContent: () => TooltipContent,
35
+ TooltipProvider: () => TooltipProvider,
36
+ TooltipTrigger: () => TooltipTrigger
37
+ });
38
+ module.exports = __toCommonJS(tooltip_exports);
39
+ var React = __toESM(require("react"));
40
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
41
+
42
+ // src/utils.ts
43
+ var import_clsx = require("clsx");
44
+ var import_tailwind_merge = require("tailwind-merge");
45
+ function cn(...inputs) {
46
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
47
+ }
48
+
49
+ // src/tooltip/index.tsx
50
+ var import_jsx_runtime = require("react/jsx-runtime");
51
+ var TooltipProvider = TooltipPrimitive.Provider;
52
+ var Tooltip = TooltipPrimitive.Root;
53
+ var TooltipTrigger = TooltipPrimitive.Trigger;
54
+ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
+ TooltipPrimitive.Content,
56
+ {
57
+ ref,
58
+ sideOffset,
59
+ className: cn(
60
+ "z-50 overflow-hidden rounded-md bg-[var(--axis-surface-inverse)] px-3 py-1.5 text-xs text-[var(--axis-text-inverse)]",
61
+ "animate-in fade-in-0 zoom-in-95",
62
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
63
+ "data-[side=bottom]:slide-in-from-top-2",
64
+ "data-[side=left]:slide-in-from-right-2",
65
+ "data-[side=right]:slide-in-from-left-2",
66
+ "data-[side=top]:slide-in-from-bottom-2",
67
+ className
68
+ ),
69
+ ...props
70
+ }
71
+ ) }));
72
+ TooltipContent.displayName = "TooltipContent";
73
+ // Annotate the CommonJS export names for ESM import in node:
74
+ 0 && (module.exports = {
75
+ Tooltip,
76
+ TooltipContent,
77
+ TooltipProvider,
78
+ TooltipTrigger
79
+ });
@@ -0,0 +1,13 @@
1
+ import {
2
+ Tooltip,
3
+ TooltipContent,
4
+ TooltipProvider,
5
+ TooltipTrigger
6
+ } from "../chunk-SCH6SFLB.mjs";
7
+ import "../chunk-PJO7WJ4G.mjs";
8
+ export {
9
+ Tooltip,
10
+ TooltipContent,
11
+ TooltipProvider,
12
+ TooltipTrigger
13
+ };
package/package.json ADDED
@@ -0,0 +1,206 @@
1
+ {
2
+ "name": "@axis-ds/ui-react",
3
+ "version": "1.1.0",
4
+ "description": "AXIS Design System - Core React UI Components",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ },
14
+ "./accordion": {
15
+ "types": "./dist/accordion.d.ts",
16
+ "import": "./dist/accordion.mjs",
17
+ "require": "./dist/accordion.js"
18
+ },
19
+ "./button": {
20
+ "types": "./dist/button.d.ts",
21
+ "import": "./dist/button.mjs",
22
+ "require": "./dist/button.js"
23
+ },
24
+ "./input": {
25
+ "types": "./dist/input.d.ts",
26
+ "import": "./dist/input.mjs",
27
+ "require": "./dist/input.js"
28
+ },
29
+ "./card": {
30
+ "types": "./dist/card.d.ts",
31
+ "import": "./dist/card.mjs",
32
+ "require": "./dist/card.js"
33
+ },
34
+ "./dialog": {
35
+ "types": "./dist/dialog.d.ts",
36
+ "import": "./dist/dialog.mjs",
37
+ "require": "./dist/dialog.js"
38
+ },
39
+ "./avatar": {
40
+ "types": "./dist/avatar.d.ts",
41
+ "import": "./dist/avatar.mjs",
42
+ "require": "./dist/avatar.js"
43
+ },
44
+ "./tooltip": {
45
+ "types": "./dist/tooltip.d.ts",
46
+ "import": "./dist/tooltip.mjs",
47
+ "require": "./dist/tooltip.js"
48
+ },
49
+ "./skeleton": {
50
+ "types": "./dist/skeleton.d.ts",
51
+ "import": "./dist/skeleton.mjs",
52
+ "require": "./dist/skeleton.js"
53
+ },
54
+ "./alert": {
55
+ "types": "./dist/alert.d.ts",
56
+ "import": "./dist/alert.mjs",
57
+ "require": "./dist/alert.js"
58
+ },
59
+ "./progress": {
60
+ "types": "./dist/progress.d.ts",
61
+ "import": "./dist/progress.mjs",
62
+ "require": "./dist/progress.js"
63
+ },
64
+ "./breadcrumb": {
65
+ "types": "./dist/breadcrumb.d.ts",
66
+ "import": "./dist/breadcrumb.mjs",
67
+ "require": "./dist/breadcrumb.js"
68
+ },
69
+ "./checkbox": {
70
+ "types": "./dist/checkbox.d.ts",
71
+ "import": "./dist/checkbox.mjs",
72
+ "require": "./dist/checkbox.js"
73
+ },
74
+ "./collapsible": {
75
+ "types": "./dist/collapsible.d.ts",
76
+ "import": "./dist/collapsible.mjs",
77
+ "require": "./dist/collapsible.js"
78
+ },
79
+ "./command": {
80
+ "types": "./dist/command.d.ts",
81
+ "import": "./dist/command.mjs",
82
+ "require": "./dist/command.js"
83
+ },
84
+ "./dropdown-menu": {
85
+ "types": "./dist/dropdown-menu.d.ts",
86
+ "import": "./dist/dropdown-menu.mjs",
87
+ "require": "./dist/dropdown-menu.js"
88
+ },
89
+ "./popover": {
90
+ "types": "./dist/popover.d.ts",
91
+ "import": "./dist/popover.mjs",
92
+ "require": "./dist/popover.js"
93
+ },
94
+ "./radio-group": {
95
+ "types": "./dist/radio-group.d.ts",
96
+ "import": "./dist/radio-group.mjs",
97
+ "require": "./dist/radio-group.js"
98
+ },
99
+ "./scroll-area": {
100
+ "types": "./dist/scroll-area.d.ts",
101
+ "import": "./dist/scroll-area.mjs",
102
+ "require": "./dist/scroll-area.js"
103
+ },
104
+ "./sheet": {
105
+ "types": "./dist/sheet.d.ts",
106
+ "import": "./dist/sheet.mjs",
107
+ "require": "./dist/sheet.js"
108
+ },
109
+ "./slider": {
110
+ "types": "./dist/slider.d.ts",
111
+ "import": "./dist/slider.mjs",
112
+ "require": "./dist/slider.js"
113
+ },
114
+ "./switch": {
115
+ "types": "./dist/switch.d.ts",
116
+ "import": "./dist/switch.mjs",
117
+ "require": "./dist/switch.js"
118
+ },
119
+ "./table": {
120
+ "types": "./dist/table.d.ts",
121
+ "import": "./dist/table.mjs",
122
+ "require": "./dist/table.js"
123
+ },
124
+ "./textarea": {
125
+ "types": "./dist/textarea.d.ts",
126
+ "import": "./dist/textarea.mjs",
127
+ "require": "./dist/textarea.js"
128
+ },
129
+ "./toggle": {
130
+ "types": "./dist/toggle.d.ts",
131
+ "import": "./dist/toggle.mjs",
132
+ "require": "./dist/toggle.js"
133
+ }
134
+ },
135
+ "sideEffects": false,
136
+ "files": [
137
+ "dist"
138
+ ],
139
+ "publishConfig": {
140
+ "access": "public"
141
+ },
142
+ "peerDependencies": {
143
+ "react": ">=18.0.0",
144
+ "react-dom": ">=18.0.0"
145
+ },
146
+ "dependencies": {
147
+ "@radix-ui/react-accordion": "^1.2.12",
148
+ "@radix-ui/react-checkbox": "^1.3.3",
149
+ "@radix-ui/react-collapsible": "^1.1.12",
150
+ "@radix-ui/react-dialog": "^1.1.0",
151
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
152
+ "@radix-ui/react-label": "^2.1.0",
153
+ "@radix-ui/react-popover": "^1.1.15",
154
+ "@radix-ui/react-radio-group": "^1.3.8",
155
+ "@radix-ui/react-scroll-area": "^1.2.10",
156
+ "@radix-ui/react-select": "^2.1.0",
157
+ "@radix-ui/react-separator": "^1.1.0",
158
+ "@radix-ui/react-slider": "^1.3.6",
159
+ "@radix-ui/react-slot": "^1.1.0",
160
+ "@radix-ui/react-switch": "^1.2.6",
161
+ "@radix-ui/react-tabs": "^1.1.0",
162
+ "@radix-ui/react-toast": "^1.2.0",
163
+ "@radix-ui/react-toggle": "^1.1.10",
164
+ "@radix-ui/react-tooltip": "^1.1.0",
165
+ "class-variance-authority": "^0.7.0",
166
+ "clsx": "^2.1.0",
167
+ "cmdk": "^1.1.1",
168
+ "tailwind-merge": "^2.5.0",
169
+ "@axis-ds/tokens": "1.1.0"
170
+ },
171
+ "devDependencies": {
172
+ "@testing-library/jest-dom": "^6.9.1",
173
+ "@testing-library/react": "^16.3.2",
174
+ "@types/react": "^19.0.0",
175
+ "@vitejs/plugin-react": "^5.1.2",
176
+ "jsdom": "^27.4.0",
177
+ "react": "^19.0.0",
178
+ "react-dom": "^19.0.0",
179
+ "tsup": "^8.0.0",
180
+ "typescript": "^5.7.0",
181
+ "vitest": "^2.1.0"
182
+ },
183
+ "keywords": [
184
+ "react",
185
+ "components",
186
+ "ui",
187
+ "design-system",
188
+ "axis",
189
+ "shadcn"
190
+ ],
191
+ "license": "MIT",
192
+ "repository": {
193
+ "type": "git",
194
+ "url": "https://github.com/thoughtandaction/axis.git",
195
+ "directory": "packages/axis-ui-react"
196
+ },
197
+ "homepage": "https://axis.minu.best",
198
+ "scripts": {
199
+ "build": "tsup src/index.ts src/*/index.tsx --format cjs,esm --dts --external react",
200
+ "dev": "tsup src/index.ts --format cjs,esm --dts --watch --external react",
201
+ "clean": "rm -rf dist",
202
+ "test": "vitest run",
203
+ "test:watch": "vitest",
204
+ "type-check": "tsc --noEmit"
205
+ }
206
+ }