@nurimedia/react-ui 0.1.1 → 0.1.2

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 (97) hide show
  1. package/dist/AlertDialog/index.cjs +4 -181
  2. package/dist/AlertDialog/index.cjs.map +1 -1
  3. package/dist/AlertDialog/index.js +4 -145
  4. package/dist/AlertDialog/index.js.map +1 -1
  5. package/dist/Button/index.cjs +4 -132
  6. package/dist/Button/index.cjs.map +1 -1
  7. package/dist/Button/index.js +4 -106
  8. package/dist/Button/index.js.map +1 -1
  9. package/dist/Checkbox/index.cjs +4 -79
  10. package/dist/Checkbox/index.cjs.map +1 -1
  11. package/dist/Checkbox/index.js +4 -43
  12. package/dist/Checkbox/index.js.map +1 -1
  13. package/dist/Input/index.cjs +4 -99
  14. package/dist/Input/index.cjs.map +1 -1
  15. package/dist/Input/index.js +4 -73
  16. package/dist/Input/index.js.map +1 -1
  17. package/dist/Modal/index.cjs +4 -116
  18. package/dist/Modal/index.cjs.map +1 -1
  19. package/dist/Modal/index.js +4 -80
  20. package/dist/Modal/index.js.map +1 -1
  21. package/dist/Radio/index.cjs +6 -82
  22. package/dist/Radio/index.cjs.map +1 -1
  23. package/dist/Radio/index.js +5 -44
  24. package/dist/Radio/index.js.map +1 -1
  25. package/dist/Select/index.cjs +4 -112
  26. package/dist/Select/index.cjs.map +1 -1
  27. package/dist/Select/index.js +4 -76
  28. package/dist/Select/index.js.map +1 -1
  29. package/dist/Switch/index.cjs +4 -67
  30. package/dist/Switch/index.cjs.map +1 -1
  31. package/dist/Switch/index.js +4 -31
  32. package/dist/Switch/index.js.map +1 -1
  33. package/dist/Textarea/index.cjs +4 -123
  34. package/dist/Textarea/index.cjs.map +1 -1
  35. package/dist/Textarea/index.js +4 -97
  36. package/dist/Textarea/index.js.map +1 -1
  37. package/dist/Toast/index.cjs +4 -178
  38. package/dist/Toast/index.cjs.map +1 -1
  39. package/dist/Toast/index.js +5 -142
  40. package/dist/Toast/index.js.map +1 -1
  41. package/dist/Tooltip/index.cjs +6 -101
  42. package/dist/Tooltip/index.cjs.map +1 -1
  43. package/dist/Tooltip/index.js +5 -63
  44. package/dist/Tooltip/index.js.map +1 -1
  45. package/dist/chunk-2LFW4MM6.cjs +47 -0
  46. package/dist/chunk-2LFW4MM6.cjs.map +1 -0
  47. package/dist/chunk-2WKLA5RC.cjs +82 -0
  48. package/dist/chunk-2WKLA5RC.cjs.map +1 -0
  49. package/dist/chunk-2YGYLCCA.js +66 -0
  50. package/dist/chunk-2YGYLCCA.js.map +1 -0
  51. package/dist/chunk-323VGYMK.cjs +147 -0
  52. package/dist/chunk-323VGYMK.cjs.map +1 -0
  53. package/dist/chunk-3H47QMKS.js +47 -0
  54. package/dist/chunk-3H47QMKS.js.map +1 -0
  55. package/dist/chunk-3QSLHLC2.cjs +45 -0
  56. package/dist/chunk-3QSLHLC2.cjs.map +1 -0
  57. package/dist/chunk-4N5JIGIU.js +82 -0
  58. package/dist/chunk-4N5JIGIU.js.map +1 -0
  59. package/dist/chunk-DTGPVOJK.js +99 -0
  60. package/dist/chunk-DTGPVOJK.js.map +1 -0
  61. package/dist/chunk-DTQE42F7.js +33 -0
  62. package/dist/chunk-DTQE42F7.js.map +1 -0
  63. package/dist/chunk-DYO4PIBB.js +75 -0
  64. package/dist/chunk-DYO4PIBB.js.map +1 -0
  65. package/dist/chunk-GBMYANHH.js +149 -0
  66. package/dist/chunk-GBMYANHH.js.map +1 -0
  67. package/dist/chunk-I7KJ7WTN.cjs +149 -0
  68. package/dist/chunk-I7KJ7WTN.cjs.map +1 -0
  69. package/dist/chunk-JM4HDCLU.cjs +110 -0
  70. package/dist/chunk-JM4HDCLU.cjs.map +1 -0
  71. package/dist/chunk-JXJ6G634.cjs +75 -0
  72. package/dist/chunk-JXJ6G634.cjs.map +1 -0
  73. package/dist/chunk-LAPTEQ5N.js +45 -0
  74. package/dist/chunk-LAPTEQ5N.js.map +1 -0
  75. package/dist/chunk-LRATCHCB.cjs +66 -0
  76. package/dist/chunk-LRATCHCB.cjs.map +1 -0
  77. package/dist/chunk-OM4QMC4F.js +110 -0
  78. package/dist/chunk-OM4QMC4F.js.map +1 -0
  79. package/dist/chunk-PAXRFQUJ.cjs +33 -0
  80. package/dist/chunk-PAXRFQUJ.cjs.map +1 -0
  81. package/dist/chunk-PC3B67B4.cjs +78 -0
  82. package/dist/chunk-PC3B67B4.cjs.map +1 -0
  83. package/dist/chunk-PS6QXS5Z.js +11 -0
  84. package/dist/chunk-PS6QXS5Z.js.map +1 -0
  85. package/dist/chunk-Q26BJSLP.cjs +99 -0
  86. package/dist/chunk-Q26BJSLP.cjs.map +1 -0
  87. package/dist/chunk-R4E4BIPC.cjs +11 -0
  88. package/dist/chunk-R4E4BIPC.cjs.map +1 -0
  89. package/dist/chunk-R757N7RU.js +78 -0
  90. package/dist/chunk-R757N7RU.js.map +1 -0
  91. package/dist/chunk-RC773ZEY.js +147 -0
  92. package/dist/chunk-RC773ZEY.js.map +1 -0
  93. package/dist/index.cjs +54 -900
  94. package/dist/index.cjs.map +1 -1
  95. package/dist/index.js +37 -834
  96. package/dist/index.js.map +1 -1
  97. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,901 +1,55 @@
1
- 'use client';
2
- "use strict";
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // src/index.ts
32
- var index_exports = {};
33
- __export(index_exports, {
34
- AlertDialog: () => AlertDialog,
35
- Button: () => Button,
36
- Checkbox: () => Checkbox,
37
- Input: () => Input,
38
- Modal: () => Modal,
39
- Radio: () => Radio,
40
- RadioGroup: () => RadioGroup,
41
- Select: () => Select,
42
- Switch: () => Switch,
43
- Textarea: () => Textarea,
44
- Toaster: () => Toaster,
45
- Tooltip: () => Tooltip,
46
- TooltipProvider: () => TooltipProvider,
47
- toast: () => toast
48
- });
49
- module.exports = __toCommonJS(index_exports);
50
-
51
- // src/Button/Button.tsx
52
- var import_styles = require("./Button/styles.css");
53
- var import_react_slot = require("@radix-ui/react-slot");
54
- var import_react = require("react");
55
-
56
- // src/Button/Spinner.tsx
57
- var import_jsx_runtime = require("react/jsx-runtime");
58
- var Spinner = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "nuri-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { className: "nuri-button__spinner", viewBox: "0 0 16 16", width: "16", height: "16", fill: "none", children: [
59
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeOpacity: "0.25", strokeWidth: "2" }),
60
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M14 8a6 6 0 0 0-6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
61
- ] }) });
62
-
63
- // src/utils/cx.ts
64
- function cx(...classes) {
65
- return classes.filter(Boolean).join(" ");
66
- }
67
-
68
- // src/Button/Button.tsx
69
- var import_jsx_runtime2 = require("react/jsx-runtime");
70
- var Button = (0, import_react.forwardRef)(function Button2({
71
- variant = "primary",
72
- size = "md",
73
- iconLeft,
74
- iconRight,
75
- iconOnly = false,
76
- block = false,
77
- loading = false,
78
- disabled = false,
79
- asChild = false,
80
- type = "button",
81
- className,
82
- children,
83
- onClick,
84
- ...rest
85
- }, ref) {
86
- const isBlocked = disabled || loading;
87
- if (process.env.NODE_ENV !== "production" && iconOnly && !rest["aria-label"] && !rest["aria-labelledby"]) {
88
- console.warn(
89
- "[nuri/Button] `iconOnly` \uBC84\uD2BC\uC740 `aria-label`(\uB610\uB294 `aria-labelledby`)\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."
90
- );
91
- }
92
- const hasLeftSlot = !iconOnly && (loading || iconLeft != null);
93
- const hasRightSlot = !iconOnly && !loading && iconRight != null;
94
- const classes = cx(
95
- "nuri-button",
96
- `nuri-button--${variant}`,
97
- `nuri-button--${size}`,
98
- block && "nuri-button--block",
99
- iconOnly && "nuri-button--icon-only",
100
- isBlocked && "nuri-button--disabled",
101
- loading && "nuri-button--loading",
102
- hasLeftSlot && "nuri-button--has-left",
103
- hasRightSlot && "nuri-button--has-right",
104
- className
105
- );
106
- const handleClick = (e) => {
107
- if (isBlocked) {
108
- e.preventDefault();
109
- e.stopPropagation();
110
- return;
111
- }
112
- onClick?.(e);
113
- };
114
- const renderContent = (content) => {
115
- if (iconOnly) {
116
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "nuri-button__icon", "aria-hidden": "true", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Spinner, {}) : content });
117
- }
118
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
119
- loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Spinner, {}) : iconLeft != null && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "nuri-button__icon nuri-button__icon--left", "aria-hidden": "true", children: iconLeft }),
120
- content,
121
- hasRightSlot && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "nuri-button__icon nuri-button__icon--right", "aria-hidden": "true", children: iconRight })
122
- ] });
123
- };
124
- if (asChild) {
125
- const child = import_react.Children.only(children);
126
- if (!(0, import_react.isValidElement)(child)) return null;
127
- const childElement = child;
128
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
129
- import_react_slot.Slot,
130
- {
131
- ref,
132
- className: classes,
133
- "aria-disabled": isBlocked || void 0,
134
- "aria-busy": loading || void 0,
135
- onClick: handleClick,
136
- ...rest,
137
- children: (0, import_react.cloneElement)(childElement, void 0, renderContent(childElement.props.children))
138
- }
139
- );
140
- }
141
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
142
- "button",
143
- {
144
- ref,
145
- type,
146
- className: classes,
147
- disabled,
148
- "aria-disabled": loading || void 0,
149
- "aria-busy": loading || void 0,
150
- onClick: handleClick,
151
- ...rest,
152
- children: renderContent(children)
153
- }
154
- );
155
- });
156
-
157
- // src/Input/Input.tsx
158
- var import_styles2 = require("./Input/styles.css");
159
- var import_react2 = require("react");
160
- var import_jsx_runtime3 = require("react/jsx-runtime");
161
- var Input = (0, import_react2.forwardRef)(function Input2({
162
- size = "md",
163
- label,
164
- hideLabel = false,
165
- description,
166
- invalid = false,
167
- errorMessage,
168
- iconLeft,
169
- iconRight,
170
- block = false,
171
- disabled = false,
172
- className,
173
- id: idProp,
174
- "aria-describedby": ariaDescribedby,
175
- ...rest
176
- }, ref) {
177
- const reactId = (0, import_react2.useId)();
178
- const id = idProp ?? `nuri-input-${reactId}`;
179
- const messageId = `${id}-message`;
180
- const message = invalid && errorMessage != null ? errorMessage : description;
181
- const hasMessage = message != null;
182
- const describedBy = cx(hasMessage ? messageId : void 0, ariaDescribedby) || void 0;
183
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cx("nuri-input", block && "nuri-input--block", className), children: [
184
- label != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { htmlFor: id, className: cx("nuri-input__label", hideLabel && "nuri-sr-only"), children: label }),
185
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
186
- "div",
187
- {
188
- className: cx(
189
- "nuri-input__field",
190
- `nuri-input__field--${size}`,
191
- invalid && "nuri-input__field--invalid",
192
- disabled && "nuri-input__field--disabled"
193
- ),
194
- children: [
195
- iconLeft != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "nuri-input__icon", "aria-hidden": "true", children: iconLeft }),
196
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
197
- "input",
198
- {
199
- ref,
200
- id,
201
- className: "nuri-input__control",
202
- disabled,
203
- "aria-invalid": invalid || void 0,
204
- "aria-describedby": describedBy,
205
- ...rest
206
- }
207
- ),
208
- iconRight != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "nuri-input__icon", "aria-hidden": "true", children: iconRight })
209
- ]
210
- }
211
- ),
212
- hasMessage && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
213
- "p",
214
- {
215
- id: messageId,
216
- className: cx("nuri-input__message", invalid && "nuri-input__message--error"),
217
- children: message
218
- }
219
- )
220
- ] });
221
- });
222
-
223
- // src/Textarea/Textarea.tsx
224
- var import_styles3 = require("./Textarea/styles.css");
225
- var import_react3 = require("react");
226
- var import_jsx_runtime4 = require("react/jsx-runtime");
227
- var Textarea = (0, import_react3.forwardRef)(function Textarea2({
228
- label,
229
- hideLabel = false,
230
- description,
231
- invalid = false,
232
- errorMessage,
233
- block = false,
234
- resize = "vertical",
235
- autosize = false,
236
- maxRows,
237
- rows = 3,
238
- disabled = false,
239
- className,
240
- id: idProp,
241
- value,
242
- onChange,
243
- "aria-describedby": ariaDescribedby,
244
- ...rest
245
- }, ref) {
246
- const reactId = (0, import_react3.useId)();
247
- const id = idProp ?? `nuri-textarea-${reactId}`;
248
- const messageId = `${id}-message`;
249
- const innerRef = (0, import_react3.useRef)(null);
250
- const setRefs = (0, import_react3.useCallback)(
251
- (node) => {
252
- innerRef.current = node;
253
- if (typeof ref === "function") ref(node);
254
- else if (ref) ref.current = node;
255
- },
256
- [ref]
257
- );
258
- const fitHeight = (0, import_react3.useCallback)(() => {
259
- const el = innerRef.current;
260
- if (!el) return;
261
- const cs = getComputedStyle(el);
262
- const borders = parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth);
263
- const lineHeight = parseFloat(cs.lineHeight);
264
- const maxHeight = maxRows != null && !Number.isNaN(lineHeight) ? maxRows * lineHeight + parseFloat(cs.paddingTop) + parseFloat(cs.paddingBottom) + borders : Infinity;
265
- el.style.height = "auto";
266
- const contentHeight = el.scrollHeight + borders;
267
- const next = Math.min(contentHeight, maxHeight);
268
- if (!Number.isNaN(next)) el.style.height = `${next}px`;
269
- el.style.overflowY = contentHeight > maxHeight ? "auto" : "hidden";
270
- }, [maxRows]);
271
- (0, import_react3.useLayoutEffect)(() => {
272
- if (autosize) fitHeight();
273
- }, [autosize, fitHeight, value]);
274
- const handleChange = (e) => {
275
- onChange?.(e);
276
- if (autosize) fitHeight();
277
- };
278
- const message = invalid && errorMessage != null ? errorMessage : description;
279
- const hasMessage = message != null;
280
- const describedBy = cx(hasMessage ? messageId : void 0, ariaDescribedby) || void 0;
281
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: cx("nuri-textarea", block && "nuri-textarea--block", className), children: [
282
- label != null && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("label", { htmlFor: id, className: cx("nuri-textarea__label", hideLabel && "nuri-sr-only"), children: label }),
283
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
284
- "textarea",
285
- {
286
- ref: setRefs,
287
- id,
288
- rows,
289
- value,
290
- onChange: handleChange,
291
- className: cx(
292
- "nuri-textarea__control",
293
- invalid && "nuri-textarea__control--invalid",
294
- (resize === "none" || autosize) && "nuri-textarea__control--resize-none"
295
- ),
296
- disabled,
297
- "aria-invalid": invalid || void 0,
298
- "aria-describedby": describedBy,
299
- ...rest
300
- }
301
- ),
302
- hasMessage && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
303
- "p",
304
- {
305
- id: messageId,
306
- className: cx("nuri-textarea__message", invalid && "nuri-textarea__message--error"),
307
- children: message
308
- }
309
- )
310
- ] });
311
- });
312
-
313
- // src/Checkbox/Checkbox.tsx
314
- var import_styles4 = require("./Checkbox/styles.css");
315
- var RadixCheckbox = __toESM(require("@radix-ui/react-checkbox"), 1);
316
- var import_react4 = require("react");
317
- var import_jsx_runtime5 = require("react/jsx-runtime");
318
- var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
319
- "path",
320
- {
321
- d: "M2.5 6.2l2.4 2.4 4.6-5",
322
- stroke: "currentColor",
323
- strokeWidth: "1.6",
324
- strokeLinecap: "round",
325
- strokeLinejoin: "round"
326
- }
327
- ) });
328
- var IndeterminateIcon = () => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M2.8 6h6.4", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }) });
329
- var Checkbox = (0, import_react4.forwardRef)(function Checkbox2({ label, size = "md", disabled = false, id: idProp, className, checked, ...rest }, ref) {
330
- const reactId = (0, import_react4.useId)();
331
- const id = idProp ?? `nuri-checkbox-${reactId}`;
332
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cx("nuri-checkbox", `nuri-checkbox--${size}`, className), children: [
333
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
334
- RadixCheckbox.Root,
335
- {
336
- ref,
337
- id,
338
- className: "nuri-checkbox__control",
339
- disabled,
340
- checked,
341
- ...rest,
342
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RadixCheckbox.Indicator, { className: "nuri-checkbox__indicator", children: checked === "indeterminate" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IndeterminateIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CheckIcon, {}) })
343
- }
344
- ),
345
- label != null && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { htmlFor: id, className: "nuri-checkbox__label", children: label })
346
- ] });
347
- });
348
-
349
- // src/Radio/Radio.tsx
350
- var import_styles5 = require("./Radio/styles.css");
351
- var RadixRadioGroup = __toESM(require("@radix-ui/react-radio-group"), 1);
352
- var import_react5 = require("react");
353
- var import_jsx_runtime6 = require("react/jsx-runtime");
354
- var RadioGroup = (0, import_react5.forwardRef)(function RadioGroup2({ children, orientation = "vertical", className, ...rest }, ref) {
355
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
356
- RadixRadioGroup.Root,
357
- {
358
- ref,
359
- orientation,
360
- className: cx("nuri-radio-group", `nuri-radio-group--${orientation}`, className),
361
- ...rest,
362
- children
363
- }
364
- );
365
- });
366
- var Radio = (0, import_react5.forwardRef)(function Radio2({ value, label, disabled = false, id: idProp, className, ...rest }, ref) {
367
- const reactId = (0, import_react5.useId)();
368
- const id = idProp ?? `nuri-radio-${reactId}`;
369
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cx("nuri-radio", className), children: [
370
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
371
- RadixRadioGroup.Item,
372
- {
373
- ref,
374
- id,
375
- value,
376
- disabled,
377
- className: "nuri-radio__control",
378
- ...rest,
379
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RadixRadioGroup.Indicator, { className: "nuri-radio__indicator" })
380
- }
381
- ),
382
- label != null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("label", { htmlFor: id, className: "nuri-radio__label", children: label })
383
- ] });
384
- });
385
-
386
- // src/Switch/Switch.tsx
387
- var import_styles6 = require("./Switch/styles.css");
388
- var RadixSwitch = __toESM(require("@radix-ui/react-switch"), 1);
389
- var import_react6 = require("react");
390
- var import_jsx_runtime7 = require("react/jsx-runtime");
391
- var Switch = (0, import_react6.forwardRef)(function Switch2({ label, disabled = false, id: idProp, className, ...rest }, ref) {
392
- const reactId = (0, import_react6.useId)();
393
- const id = idProp ?? `nuri-switch-${reactId}`;
394
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cx("nuri-switch", className), children: [
395
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
396
- RadixSwitch.Root,
397
- {
398
- ref,
399
- id,
400
- className: "nuri-switch__control",
401
- disabled,
402
- ...rest,
403
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RadixSwitch.Thumb, { className: "nuri-switch__thumb" })
404
- }
405
- ),
406
- label != null && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: id, className: "nuri-switch__label", children: label })
407
- ] });
408
- });
409
-
410
- // src/Select/Select.tsx
411
- var import_styles7 = require("./Select/styles.css");
412
- var RadixSelect = __toESM(require("@radix-ui/react-select"), 1);
413
- var import_react7 = require("react");
414
- var import_jsx_runtime8 = require("react/jsx-runtime");
415
- var CaretIcon = () => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M1.1 2.5h5.8L4 5.9z", fill: "currentColor" }) });
416
- var Select = (0, import_react7.forwardRef)(function Select2({
417
- options,
418
- size = "md",
419
- placeholder,
420
- value,
421
- defaultValue,
422
- onValueChange,
423
- open,
424
- defaultOpen,
425
- onOpenChange,
426
- disabled = false,
427
- block = false,
428
- name,
429
- required,
430
- container,
431
- className,
432
- "aria-label": ariaLabel
433
- }, ref) {
434
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
435
- RadixSelect.Root,
436
- {
437
- value,
438
- defaultValue,
439
- onValueChange,
440
- open,
441
- defaultOpen,
442
- onOpenChange,
443
- disabled,
444
- name,
445
- required,
446
- children: [
447
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
448
- RadixSelect.Trigger,
449
- {
450
- ref,
451
- "aria-label": ariaLabel,
452
- className: cx(
453
- "nuri-select__trigger",
454
- `nuri-select__trigger--${size}`,
455
- block && "nuri-select__trigger--block",
456
- className
457
- ),
458
- children: [
459
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "nuri-select__value", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixSelect.Value, { placeholder }) }),
460
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixSelect.Icon, { className: "nuri-select__caret", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CaretIcon, {}) })
461
- ]
462
- }
463
- ),
464
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixSelect.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixSelect.Content, { className: "nuri-select__content", position: "popper", sideOffset: 6, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixSelect.Viewport, { className: "nuri-select__viewport", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
465
- RadixSelect.Item,
466
- {
467
- value: option.value,
468
- disabled: option.disabled,
469
- className: "nuri-select__item",
470
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RadixSelect.ItemText, { children: option.label })
471
- },
472
- option.value
473
- )) }) }) })
474
- ]
475
- }
476
- );
477
- });
478
-
479
- // src/Modal/Modal.tsx
480
- var import_styles8 = require("./Modal/styles.css");
481
- var Dialog = __toESM(require("@radix-ui/react-dialog"), 1);
482
- var import_react8 = require("react");
483
- var import_jsx_runtime9 = require("react/jsx-runtime");
484
- var Root6 = (props) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Dialog.Root, { ...props });
485
- Root6.displayName = "Modal";
486
- var Trigger3 = Dialog.Trigger;
487
- var Content3 = (0, import_react8.forwardRef)(
488
- function ModalContent({ placement = "center", size = "md", overlay = true, container, className, children, ...rest }, ref) {
489
- const classes = cx("nuri-modal", `nuri-modal--${placement}`, `nuri-modal--${size}`, className);
490
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Dialog.Portal, { container, children: [
491
- overlay && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Dialog.Overlay, { className: "nuri-modal__overlay" }),
492
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Dialog.Content, { ref, className: classes, ...rest, children })
493
- ] });
494
- }
495
- );
496
- var Header = (0, import_react8.forwardRef)(function ModalHeader({ className, ...rest }, ref) {
497
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref, className: cx("nuri-modal__header", className), ...rest });
498
- });
499
- var Title2 = (0, import_react8.forwardRef)(function ModalTitle({ visuallyHidden = false, className, ...rest }, ref) {
500
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
501
- Dialog.Title,
502
- {
503
- ref,
504
- className: cx("nuri-modal__title", visuallyHidden && "nuri-sr-only", className),
505
- ...rest
506
- }
507
- );
508
- });
509
- var Description2 = (0, import_react8.forwardRef)(function ModalDescription({ className, ...rest }, ref) {
510
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Dialog.Description, { ref, className: cx("nuri-modal__description", className), ...rest });
511
- });
512
- var Body = (0, import_react8.forwardRef)(function ModalBody({ className, ...rest }, ref) {
513
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref, className: cx("nuri-modal__body", className), ...rest });
514
- });
515
- var Footer = (0, import_react8.forwardRef)(function ModalFooter({ align = "end", className, ...rest }, ref) {
516
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
517
- "div",
518
- {
519
- ref,
520
- className: cx("nuri-modal__footer", `nuri-modal__footer--${align}`, className),
521
- ...rest
522
- }
523
- );
524
- });
525
- var Close2 = Dialog.Close;
526
- var CloseIcon = () => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M5 5l10 10M15 5L5 15", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
527
- var CloseButton = (0, import_react8.forwardRef)(function ModalCloseButton({ className, "aria-label": ariaLabel = "\uB2EB\uAE30", children, ...rest }, ref) {
528
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
529
- "button",
530
- {
531
- ref,
532
- type: "button",
533
- "aria-label": ariaLabel,
534
- className: cx("nuri-modal__close", className),
535
- ...rest,
536
- children: children ?? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CloseIcon, {})
537
- }
538
- ) });
539
- });
540
- var Modal = Object.assign(Root6, {
541
- Trigger: Trigger3,
542
- Content: Content3,
543
- Header,
544
- Title: Title2,
545
- Description: Description2,
546
- Body,
547
- Footer,
548
- Close: Close2,
549
- CloseButton
550
- });
551
-
552
- // src/AlertDialog/AlertDialog.tsx
553
- var import_styles9 = require("./AlertDialog/styles.css");
554
- var Alert = __toESM(require("@radix-ui/react-alert-dialog"), 1);
555
- var import_react9 = require("react");
556
-
557
- // src/AlertDialog/icons.tsx
558
- var import_jsx_runtime10 = require("react/jsx-runtime");
559
- var SuccessIcon = () => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
560
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "12", cy: "12", r: "12", fill: "var(--nuri-alert-tone-success-bg)" }),
561
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
562
- "path",
563
- {
564
- d: "M15.77 9.58L10.65 14.70L8.90 12.95",
565
- stroke: "var(--nuri-alert-tone-success-fg)",
566
- strokeWidth: "2.5",
567
- strokeLinecap: "round",
568
- strokeLinejoin: "round"
569
- }
570
- )
571
- ] });
572
- var WarningIcon = () => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
573
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "12", cy: "12", r: "12", fill: "var(--nuri-alert-tone-warning-bg)" }),
574
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
575
- "path",
576
- {
577
- d: "M12 6.75V12",
578
- stroke: "var(--nuri-alert-tone-warning-fg)",
579
- strokeWidth: "2.5",
580
- strokeLinecap: "round"
581
- }
582
- ),
583
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "12", cy: "16.31", r: "1.1", fill: "var(--nuri-alert-tone-warning-fg)" })
584
- ] });
585
- var InfoIcon = () => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
586
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "12", cy: "12", r: "12", fill: "var(--nuri-alert-tone-info-bg)" }),
587
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
588
- "path",
589
- {
590
- d: "M12.25 7h0.01",
591
- stroke: "var(--nuri-alert-tone-info-fg)",
592
- strokeWidth: "3",
593
- strokeLinecap: "round",
594
- strokeLinejoin: "round"
595
- }
596
- ),
597
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
598
- "path",
599
- {
600
- d: "M11 12h1.25v5h1.25",
601
- stroke: "var(--nuri-alert-tone-info-fg)",
602
- strokeWidth: "2.5",
603
- strokeLinecap: "round",
604
- strokeLinejoin: "round"
605
- }
606
- )
607
- ] });
608
- var defaultToneIcon = {
609
- info: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(InfoIcon, {}),
610
- success: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SuccessIcon, {}),
611
- warning: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(WarningIcon, {})
612
- };
613
-
614
- // src/AlertDialog/AlertDialog.tsx
615
- var import_jsx_runtime11 = require("react/jsx-runtime");
616
- var Root8 = (props) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Alert.Root, { ...props });
617
- Root8.displayName = "AlertDialog";
618
- var Trigger5 = Alert.Trigger;
619
- var Content5 = (0, import_react9.forwardRef)(
620
- function AlertDialogContent({ tone = "info", icon, overlay = true, container, className, children, ...rest }, ref) {
621
- const resolvedIcon = icon === void 0 ? defaultToneIcon[tone] : icon;
622
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Alert.Portal, { container, children: [
623
- overlay && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Alert.Overlay, { className: "nuri-alert__overlay" }),
624
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
625
- Alert.Content,
626
- {
627
- ref,
628
- className: cx("nuri-alert", `nuri-alert--${tone}`, className),
629
- ...rest,
630
- children: [
631
- resolvedIcon != null && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "nuri-alert__icon", "aria-hidden": "true", children: resolvedIcon }),
632
- children
633
- ]
634
- }
635
- )
636
- ] });
637
- }
638
- );
639
- var Header2 = (0, import_react9.forwardRef)(
640
- function AlertDialogHeader({ className, ...rest }, ref) {
641
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref, className: cx("nuri-alert__header", className), ...rest });
642
- }
643
- );
644
- var Title4 = (0, import_react9.forwardRef)(function AlertDialogTitle({ className, ...rest }, ref) {
645
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Alert.Title, { ref, className: cx("nuri-alert__title", className), ...rest });
646
- });
647
- var Description4 = (0, import_react9.forwardRef)(function AlertDialogDescription({ className, ...rest }, ref) {
648
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Alert.Description, { ref, className: cx("nuri-alert__description", className), ...rest });
649
- });
650
- var Body2 = (0, import_react9.forwardRef)(function AlertDialogBody({ className, ...rest }, ref) {
651
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref, className: cx("nuri-alert__body", className), ...rest });
652
- });
653
- var Footer2 = (0, import_react9.forwardRef)(function AlertDialogFooter({ align = "full", className, ...rest }, ref) {
654
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
655
- "div",
656
- {
657
- ref,
658
- className: cx("nuri-alert__footer", `nuri-alert__footer--${align}`, className),
659
- ...rest
660
- }
661
- );
662
- });
663
- var Action2 = Alert.Action;
664
- var Cancel2 = Alert.Cancel;
665
- var CloseIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M5 5l10 10M15 5L5 15", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) });
666
- var CloseButton2 = (0, import_react9.forwardRef)(function AlertDialogCloseButton({ className, "aria-label": ariaLabel = "\uB2EB\uAE30", children, ...rest }, ref) {
667
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Alert.Cancel, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
668
- "button",
669
- {
670
- ref,
671
- type: "button",
672
- "aria-label": ariaLabel,
673
- className: cx("nuri-alert__close", className),
674
- ...rest,
675
- children: children ?? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CloseIcon2, {})
676
- }
677
- ) });
678
- });
679
- var AlertDialog = Object.assign(Root8, {
680
- Trigger: Trigger5,
681
- Content: Content5,
682
- Header: Header2,
683
- Title: Title4,
684
- Description: Description4,
685
- Body: Body2,
686
- Footer: Footer2,
687
- Action: Action2,
688
- Cancel: Cancel2,
689
- CloseButton: CloseButton2
690
- });
691
-
692
- // src/Toast/Toaster.tsx
693
- var import_styles10 = require("./Toast/styles.css");
694
- var RadixToast = __toESM(require("@radix-ui/react-toast"), 1);
695
-
696
- // src/Toast/store.ts
697
- var import_react10 = require("react");
698
- var toasts = [];
699
- var listeners = /* @__PURE__ */ new Set();
700
- var EMPTY = [];
701
- var counter = 0;
702
- var emit = () => {
703
- for (const l of listeners) l();
704
- };
705
- function add(message, options = {}) {
706
- const id = options.id ?? `nuri-toast-${++counter}`;
707
- const record = {
708
- id,
709
- message,
710
- tone: options.tone ?? "default",
711
- duration: options.duration ?? 3e3
712
- };
713
- const idx = toasts.findIndex((t) => t.id === id);
714
- toasts = idx >= 0 ? toasts.map((t) => t.id === id ? record : t) : [...toasts, record];
715
- emit();
716
- return id;
717
- }
718
- function remove(id) {
719
- toasts = toasts.filter((t) => t.id !== id);
720
- emit();
721
- }
722
- function clear() {
723
- toasts = [];
724
- emit();
725
- }
726
- var toastStore = {
727
- add,
728
- remove,
729
- clear,
730
- subscribe(listener) {
731
- listeners.add(listener);
732
- return () => {
733
- listeners.delete(listener);
734
- };
735
- },
736
- getSnapshot: () => toasts,
737
- getServerSnapshot: () => EMPTY
738
- };
739
- function useToasts() {
740
- return (0, import_react10.useSyncExternalStore)(
741
- toastStore.subscribe,
742
- toastStore.getSnapshot,
743
- toastStore.getServerSnapshot
744
- );
745
- }
746
-
747
- // src/Toast/icons.tsx
748
- var import_jsx_runtime12 = require("react/jsx-runtime");
749
- var CheckIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
750
- "path",
751
- {
752
- d: "M3.5 8.5l3 3 6-6.5",
753
- stroke: "currentColor",
754
- strokeWidth: "1.6",
755
- strokeLinecap: "round",
756
- strokeLinejoin: "round"
757
- }
758
- ) });
759
- var ErrorIcon = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
760
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M8 4v4.5", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
761
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "8", cy: "11.3", r: "0.95", fill: "currentColor" })
762
- ] });
763
- var InfoIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
764
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M8 7.5v4", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }),
765
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "8", cy: "4.7", r: "0.95", fill: "currentColor" })
766
- ] });
767
- var toneIcon = {
768
- success: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CheckIcon2, {}),
769
- error: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ErrorIcon, {}),
770
- info: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(InfoIcon2, {})
771
- };
772
-
773
- // src/Toast/Toaster.tsx
774
- var import_jsx_runtime13 = require("react/jsx-runtime");
775
- function Toaster({
776
- swipeDirection = "down",
777
- swipeThreshold = 50,
778
- className,
779
- label = "\uC54C\uB9BC"
780
- }) {
781
- const toasts2 = useToasts();
782
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
783
- RadixToast.Provider,
784
- {
785
- swipeDirection,
786
- swipeThreshold,
787
- label,
788
- children: [
789
- toasts2.map((t) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
790
- RadixToast.Root,
791
- {
792
- duration: t.duration,
793
- onOpenChange: (open) => {
794
- if (!open) toastStore.remove(t.id);
795
- },
796
- type: t.tone === "error" ? "foreground" : "background",
797
- className: cx("nuri-toast", t.tone !== "default" && `nuri-toast--${t.tone}`),
798
- children: [
799
- t.tone !== "default" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "nuri-toast__icon", "aria-hidden": "true", children: toneIcon[t.tone] }),
800
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(RadixToast.Title, { className: "nuri-toast__message", children: t.message })
801
- ]
802
- },
803
- t.id
804
- )),
805
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
806
- RadixToast.Viewport,
807
- {
808
- className: cx("nuri-toast__viewport", className),
809
- label: `${label} ({hotkey})`
810
- }
811
- )
812
- ]
813
- }
814
- );
815
- }
816
-
817
- // src/Toast/toast.ts
818
- function toastFn(message, options) {
819
- return toastStore.add(message, options);
820
- }
821
- var toast = Object.assign(toastFn, {
822
- success: (message, options) => toastStore.add(message, { ...options, tone: "success" }),
823
- error: (message, options) => toastStore.add(message, { ...options, tone: "error" }),
824
- info: (message, options) => toastStore.add(message, { ...options, tone: "info" }),
825
- /** id 지정 시 해당 토스트만, 없으면 전체 제거. */
826
- dismiss: (id) => id ? toastStore.remove(id) : toastStore.clear()
827
- });
828
-
829
- // src/Tooltip/Tooltip.tsx
830
- var import_styles11 = require("./Tooltip/styles.css");
831
- var RadixTooltip = __toESM(require("@radix-ui/react-tooltip"), 1);
832
- var import_react11 = require("react");
833
- var import_jsx_runtime14 = require("react/jsx-runtime");
834
- var HasProviderContext = (0, import_react11.createContext)(false);
835
- function TooltipProvider({ children, ...props }) {
836
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(HasProviderContext.Provider, { value: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadixTooltip.Provider, { ...props, children }) });
837
- }
838
- function Tooltip({
839
- content,
840
- children,
841
- side = "top",
842
- align = "center",
843
- arrow = true,
844
- delayDuration,
845
- open,
846
- defaultOpen,
847
- onOpenChange,
848
- disabled = false,
849
- container,
850
- className
851
- }) {
852
- const hasProvider = (0, import_react11.useContext)(HasProviderContext);
853
- if (disabled) return children;
854
- const root = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
855
- RadixTooltip.Root,
856
- {
857
- open,
858
- defaultOpen,
859
- onOpenChange,
860
- delayDuration,
861
- children: [
862
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadixTooltip.Trigger, { asChild: true, children }),
863
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadixTooltip.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
864
- RadixTooltip.Content,
865
- {
866
- className: cx("nuri-tooltip", className),
867
- side,
868
- align,
869
- sideOffset: 4,
870
- collisionPadding: 8,
871
- arrowPadding: 6,
872
- hideWhenDetached: true,
873
- children: [
874
- content,
875
- arrow && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadixTooltip.Arrow, { className: "nuri-tooltip__arrow", width: 14, height: 7 })
876
- ]
877
- }
878
- ) })
879
- ]
880
- }
881
- );
882
- return hasProvider ? root : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadixTooltip.Provider, { delayDuration: 100, children: root });
883
- }
884
- // Annotate the CommonJS export names for ESM import in node:
885
- 0 && (module.exports = {
886
- AlertDialog,
887
- Button,
888
- Checkbox,
889
- Input,
890
- Modal,
891
- Radio,
892
- RadioGroup,
893
- Select,
894
- Switch,
895
- Textarea,
896
- Toaster,
897
- Tooltip,
898
- TooltipProvider,
899
- toast
900
- });
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});'use client';
2
+
3
+
4
+ var _chunk2WKLA5RCcjs = require('./chunk-2WKLA5RC.cjs');
5
+
6
+
7
+ var _chunkI7KJ7WTNcjs = require('./chunk-I7KJ7WTN.cjs');
8
+
9
+
10
+
11
+ var _chunk323VGYMKcjs = require('./chunk-323VGYMK.cjs');
12
+
13
+
14
+
15
+ var _chunkLRATCHCBcjs = require('./chunk-LRATCHCB.cjs');
16
+
17
+
18
+ var _chunkJM4HDCLUcjs = require('./chunk-JM4HDCLU.cjs');
19
+
20
+
21
+ var _chunkJXJ6G634cjs = require('./chunk-JXJ6G634.cjs');
22
+
23
+
24
+ var _chunkQ26BJSLPcjs = require('./chunk-Q26BJSLP.cjs');
25
+
26
+
27
+ var _chunk3QSLHLC2cjs = require('./chunk-3QSLHLC2.cjs');
28
+
29
+
30
+
31
+ var _chunk2LFW4MM6cjs = require('./chunk-2LFW4MM6.cjs');
32
+
33
+
34
+ var _chunkPAXRFQUJcjs = require('./chunk-PAXRFQUJ.cjs');
35
+
36
+
37
+ var _chunkPC3B67B4cjs = require('./chunk-PC3B67B4.cjs');
38
+ require('./chunk-R4E4BIPC.cjs');
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+ exports.AlertDialog = _chunkI7KJ7WTNcjs.AlertDialog; exports.Button = _chunkJM4HDCLUcjs.Button; exports.Checkbox = _chunk3QSLHLC2cjs.Checkbox; exports.Input = _chunkJXJ6G634cjs.Input; exports.Modal = _chunk2WKLA5RCcjs.Modal; exports.Radio = _chunk2LFW4MM6cjs.Radio; exports.RadioGroup = _chunk2LFW4MM6cjs.RadioGroup; exports.Select = _chunkPC3B67B4cjs.Select; exports.Switch = _chunkPAXRFQUJcjs.Switch; exports.Textarea = _chunkQ26BJSLPcjs.Textarea; exports.Toaster = _chunk323VGYMKcjs.Toaster; exports.Tooltip = _chunkLRATCHCBcjs.Tooltip; exports.TooltipProvider = _chunkLRATCHCBcjs.TooltipProvider; exports.toast = _chunk323VGYMKcjs.toast;
901
55
  //# sourceMappingURL=index.cjs.map