@salemcobalt/ui 0.1.0 → 0.2.0-rc.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.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useRender } from '@base-ui/react/use-render';
3
- import { Children, Fragment, createElement } from 'react';
4
- import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
1
+ 'use client';
5
2
 
6
3
  // src/utils/cx.ts
7
4
  function cx(...parts) {
8
5
  return parts.filter(Boolean).join(" ");
9
6
  }
7
+
8
+ // src/components/Button/Button.tsx
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
10
  function Button({
11
11
  variant = "primary",
12
12
  size = "md",
@@ -48,6 +48,9 @@ function Button({
48
48
  }
49
49
  );
50
50
  }
51
+
52
+ // src/components/Badge/Badge.tsx
53
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
51
54
  function Badge({
52
55
  tone = "neutral",
53
56
  variant = "soft",
@@ -57,7 +60,7 @@ function Badge({
57
60
  children,
58
61
  ...rest
59
62
  }) {
60
- return /* @__PURE__ */ jsxs(
63
+ return /* @__PURE__ */ jsxs2(
61
64
  "span",
62
65
  {
63
66
  className: cx("sc-badge", className),
@@ -66,12 +69,15 @@ function Badge({
66
69
  "data-size": size,
67
70
  ...rest,
68
71
  children: [
69
- dot ? /* @__PURE__ */ jsx("span", { className: "sc-badge__dot", "aria-hidden": "true" }) : null,
72
+ dot ? /* @__PURE__ */ jsx2("span", { className: "sc-badge__dot", "aria-hidden": "true" }) : null,
70
73
  children
71
74
  ]
72
75
  }
73
76
  );
74
77
  }
78
+
79
+ // src/components/Card/Card.tsx
80
+ import { useRender } from "@base-ui/react/use-render";
75
81
  function Card({
76
82
  variant = "outlined",
77
83
  padding = "md",
@@ -97,6 +103,9 @@ function Card({
97
103
  }
98
104
  });
99
105
  }
106
+
107
+ // src/components/Stack/Stack.tsx
108
+ import { createElement } from "react";
100
109
  function Stack({
101
110
  gap = "sm",
102
111
  align = "stretch",
@@ -115,6 +124,9 @@ function Stack({
115
124
  ...rest
116
125
  });
117
126
  }
127
+
128
+ // src/components/Inline/Inline.tsx
129
+ import { createElement as createElement2 } from "react";
118
130
  function Inline({
119
131
  gap = "xs",
120
132
  align = "center",
@@ -124,7 +136,7 @@ function Inline({
124
136
  className,
125
137
  ...rest
126
138
  }) {
127
- return createElement(as, {
139
+ return createElement2(as, {
128
140
  className: cx("sc-inline", className),
129
141
  "data-gap": gap,
130
142
  "data-align": align,
@@ -133,20 +145,296 @@ function Inline({
133
145
  ...rest
134
146
  });
135
147
  }
148
+
149
+ // src/components/Kbd/Kbd.tsx
150
+ import { Children, Fragment } from "react";
151
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
136
152
  function KbdBase({ className, ...rest }) {
137
- return /* @__PURE__ */ jsx("kbd", { className: cx("sc-kbd", className), ...rest });
153
+ return /* @__PURE__ */ jsx3("kbd", { className: cx("sc-kbd", className), ...rest });
138
154
  }
139
155
  function KbdGroup({ label, separator = "plus", className, children, ...rest }) {
140
156
  const keys = Children.toArray(children);
141
- return /* @__PURE__ */ jsx("span", { role: "group", "aria-label": label, className: cx("sc-kbd-group", className), ...rest, children: keys.map((key, i) => /* @__PURE__ */ jsxs(Fragment, { children: [
142
- i > 0 && separator === "plus" ? /* @__PURE__ */ jsx("span", { className: "sc-kbd-group__sep", "aria-hidden": "true", children: "+" }) : null,
157
+ return /* @__PURE__ */ jsx3("span", { role: "group", "aria-label": label, className: cx("sc-kbd-group", className), ...rest, children: keys.map((key, i) => /* @__PURE__ */ jsxs3(Fragment, { children: [
158
+ i > 0 && separator === "plus" ? /* @__PURE__ */ jsx3("span", { className: "sc-kbd-group__sep", "aria-hidden": "true", children: "+" }) : null,
143
159
  key
144
160
  ] }, i)) });
145
161
  }
146
162
  var Kbd = Object.assign(KbdBase, { Group: KbdGroup });
163
+
164
+ // src/components/Dialog/Dialog.tsx
165
+ import { Dialog as BaseDialog } from "@base-ui/react/dialog";
166
+
167
+ // src/components/Icon/Icon.tsx
168
+ import { jsx as jsx4 } from "react/jsx-runtime";
169
+ function Icon({ size = "md", title, className, children, ...rest }) {
170
+ return /* @__PURE__ */ jsx4(
171
+ "svg",
172
+ {
173
+ className: cx("sc-icon", className),
174
+ "data-size": size,
175
+ viewBox: "0 0 16 16",
176
+ fill: "none",
177
+ stroke: "currentColor",
178
+ strokeWidth: "1.5",
179
+ strokeLinecap: "round",
180
+ strokeLinejoin: "round",
181
+ focusable: "false",
182
+ "aria-hidden": title ? void 0 : true,
183
+ role: title ? "img" : void 0,
184
+ "aria-label": title,
185
+ ...rest,
186
+ children
187
+ }
188
+ );
189
+ }
190
+
191
+ // src/icons/icons.gen.tsx
192
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
193
+ function ArchiveIcon(props) {
194
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
195
+ /* @__PURE__ */ jsx5("rect", { x: "2.25", y: "2.75", width: "11.5", height: "3", rx: ".75" }),
196
+ /* @__PURE__ */ jsx5("path", { d: "M3.25 5.75v6.5a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1v-6.5M6.5 8.75h3" })
197
+ ] });
198
+ }
199
+ function ArrowLeftIcon(props) {
200
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "M13 8H3M7 4 3 8l4 4" }) });
201
+ }
202
+ function ArrowRightIcon(props) {
203
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "M3 8h10M9 4l4 4-4 4" }) });
204
+ }
205
+ function BellIcon(props) {
206
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
207
+ /* @__PURE__ */ jsx5("path", { d: "M4 6.5a4 4 0 0 1 8 0v3l1.25 2H2.75L4 9.5z" }),
208
+ /* @__PURE__ */ jsx5("path", { d: "M6.5 13.5a1.5 1.5 0 0 0 3 0" })
209
+ ] });
210
+ }
211
+ function BriefcaseIcon(props) {
212
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
213
+ /* @__PURE__ */ jsx5("rect", { x: "2", y: "4.75", width: "12", height: "8.5", rx: "1" }),
214
+ /* @__PURE__ */ jsx5("path", { d: "M5.5 4.75V3.5a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1.25M2 8.5h12" })
215
+ ] });
216
+ }
217
+ function CalendarIcon(props) {
218
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
219
+ /* @__PURE__ */ jsx5("rect", { x: "2.5", y: "3.25", width: "11", height: "10", rx: "1" }),
220
+ /* @__PURE__ */ jsx5("path", { d: "M2.5 6.75h11M5.5 1.75v3M10.5 1.75v3" })
221
+ ] });
222
+ }
223
+ function CheckIcon(props) {
224
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "m3 8.5 3.5 3.5L13 4.5" }) });
225
+ }
226
+ function ChevronDownIcon(props) {
227
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "m4 6 4 4 4-4" }) });
228
+ }
229
+ function ChevronLeftIcon(props) {
230
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "m10 4-4 4 4 4" }) });
231
+ }
232
+ function ChevronRightIcon(props) {
233
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "m6 4 4 4-4 4" }) });
234
+ }
235
+ function ChevronUpIcon(props) {
236
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "m4 10 4-4 4 4" }) });
237
+ }
238
+ function CircleCheckIcon(props) {
239
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
240
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "8", r: "6" }),
241
+ /* @__PURE__ */ jsx5("path", { d: "m5.25 8 2 2 3.5-4" })
242
+ ] });
243
+ }
244
+ function CircleXIcon(props) {
245
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
246
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "8", r: "6" }),
247
+ /* @__PURE__ */ jsx5("path", { d: "m6 6 4 4M10 6l-4 4" })
248
+ ] });
249
+ }
250
+ function ClockIcon(props) {
251
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
252
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "8", r: "6" }),
253
+ /* @__PURE__ */ jsx5("path", { d: "M8 4.75V8l2.25 1.5" })
254
+ ] });
255
+ }
256
+ function CopyIcon(props) {
257
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
258
+ /* @__PURE__ */ jsx5("rect", { x: "6", y: "6", width: "7.5", height: "7.5", rx: "1" }),
259
+ /* @__PURE__ */ jsx5("path", { d: "M4 10H3.25a1 1 0 0 1-1-1V3.25a1 1 0 0 1 1-1H9a1 1 0 0 1 1 1V4" })
260
+ ] });
261
+ }
262
+ function DocumentIcon(props) {
263
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
264
+ /* @__PURE__ */ jsx5("path", { d: "M9 2.25H4.5a1 1 0 0 0-1 1v9.5a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V5.75z" }),
265
+ /* @__PURE__ */ jsx5("path", { d: "M9 2.25v3.5h3.5M6 8.5h4M6 11h4" })
266
+ ] });
267
+ }
268
+ function DownloadIcon(props) {
269
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
270
+ /* @__PURE__ */ jsx5("path", { d: "M8 2.5v8M4.75 7.25 8 10.5l3.25-3.25" }),
271
+ /* @__PURE__ */ jsx5("path", { d: "M2.75 11v1.5a1 1 0 0 0 1 1h8.5a1 1 0 0 0 1-1V11" })
272
+ ] });
273
+ }
274
+ function EditIcon(props) {
275
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "m10.75 2.75 2.5 2.5-7.5 7.5H3.25v-2.5z" }) });
276
+ }
277
+ function ExternalLinkIcon(props) {
278
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
279
+ /* @__PURE__ */ jsx5("path", { d: "M9 2.75h4.25V7M13.25 2.75 7.5 8.5" }),
280
+ /* @__PURE__ */ jsx5("path", { d: "M11.25 9v3.25a1 1 0 0 1-1 1h-6.5a1 1 0 0 1-1-1v-6.5a1 1 0 0 1 1-1H7" })
281
+ ] });
282
+ }
283
+ function EyeIcon(props) {
284
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
285
+ /* @__PURE__ */ jsx5("path", { d: "M1.75 8s2.25-4.25 6.25-4.25S14.25 8 14.25 8s-2.25 4.25-6.25 4.25S1.75 8 1.75 8z" }),
286
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "8", r: "2" })
287
+ ] });
288
+ }
289
+ function FilterIcon(props) {
290
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "M2.5 3h11l-4.25 5v4.25L6.75 13.5V8z" }) });
291
+ }
292
+ function FlagIcon(props) {
293
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
294
+ /* @__PURE__ */ jsx5("path", { d: "M3.5 14V2.75" }),
295
+ /* @__PURE__ */ jsx5("path", { d: "M3.5 2.75h8.75l-2.25 3 2.25 3H3.5" })
296
+ ] });
297
+ }
298
+ function InboxIcon(props) {
299
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
300
+ /* @__PURE__ */ jsx5("path", { d: "M2 9v3.25a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V9l-1.6-4.6a1 1 0 0 0-.95-.65H4.55a1 1 0 0 0-.95.65z" }),
301
+ /* @__PURE__ */ jsx5("path", { d: "M2 9h3.25l1 2h3.5l1-2H14" })
302
+ ] });
303
+ }
304
+ function InfoIcon(props) {
305
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
306
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "8", r: "6" }),
307
+ /* @__PURE__ */ jsx5("path", { d: "M8 7.25V11M8 5.25v.01" })
308
+ ] });
309
+ }
310
+ function LinkIcon(props) {
311
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
312
+ /* @__PURE__ */ jsx5("path", { d: "M6.75 9.25a2.5 2.5 0 0 0 3.54 0l2-2a2.5 2.5 0 0 0-3.54-3.54l-.75.75" }),
313
+ /* @__PURE__ */ jsx5("path", { d: "M9.25 6.75a2.5 2.5 0 0 0-3.54 0l-2 2a2.5 2.5 0 0 0 3.54 3.54l.75-.75" })
314
+ ] });
315
+ }
316
+ function MailIcon(props) {
317
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
318
+ /* @__PURE__ */ jsx5("rect", { x: "2", y: "3.5", width: "12", height: "9", rx: "1" }),
319
+ /* @__PURE__ */ jsx5("path", { d: "m2.5 4.5 5.5 4.25L13.5 4.5" })
320
+ ] });
321
+ }
322
+ function MapPinIcon(props) {
323
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
324
+ /* @__PURE__ */ jsx5("path", { d: "M8 14s4.5-3.9 4.5-7.5a4.5 4.5 0 1 0-9 0C3.5 10.1 8 14 8 14z" }),
325
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "6.5", r: "1.5" })
326
+ ] });
327
+ }
328
+ function MenuIcon(props) {
329
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "M2.5 4.5h11M2.5 8h11M2.5 11.5h11" }) });
330
+ }
331
+ function MinusIcon(props) {
332
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "M3 8h10" }) });
333
+ }
334
+ function MoonIcon(props) {
335
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "M13.25 9.5A5.5 5.5 0 0 1 6.5 2.75 5.5 5.5 0 1 0 13.25 9.5z" }) });
336
+ }
337
+ function MoreHorizontalIcon(props) {
338
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
339
+ /* @__PURE__ */ jsx5("circle", { cx: "3.5", cy: "8", r: "1.25", fill: "currentColor", stroke: "none" }),
340
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "8", r: "1.25", fill: "currentColor", stroke: "none" }),
341
+ /* @__PURE__ */ jsx5("circle", { cx: "12.5", cy: "8", r: "1.25", fill: "currentColor", stroke: "none" })
342
+ ] });
343
+ }
344
+ function MoreVerticalIcon(props) {
345
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
346
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "3.5", r: "1.25", fill: "currentColor", stroke: "none" }),
347
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "8", r: "1.25", fill: "currentColor", stroke: "none" }),
348
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "12.5", r: "1.25", fill: "currentColor", stroke: "none" })
349
+ ] });
350
+ }
351
+ function PauseIcon(props) {
352
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
353
+ /* @__PURE__ */ jsx5("rect", { x: "3.75", y: "2.75", width: "3", height: "10.5", rx: ".75" }),
354
+ /* @__PURE__ */ jsx5("rect", { x: "9.25", y: "2.75", width: "3", height: "10.5", rx: ".75" })
355
+ ] });
356
+ }
357
+ function PlayIcon(props) {
358
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "M4.5 2.75v10.5L13 8z" }) });
359
+ }
360
+ function PlusIcon(props) {
361
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "M8 3v10M3 8h10" }) });
362
+ }
363
+ function RefreshIcon(props) {
364
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
365
+ /* @__PURE__ */ jsx5("path", { d: "M2.75 8a5.25 5.25 0 0 1 9-3.7l1.5 1.45" }),
366
+ /* @__PURE__ */ jsx5("path", { d: "M13.25 2.25v3.5h-3.5" }),
367
+ /* @__PURE__ */ jsx5("path", { d: "M13.25 8a5.25 5.25 0 0 1-9 3.7l-1.5-1.45" }),
368
+ /* @__PURE__ */ jsx5("path", { d: "M2.75 13.75v-3.5h3.5" })
369
+ ] });
370
+ }
371
+ function SearchIcon(props) {
372
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
373
+ /* @__PURE__ */ jsx5("circle", { cx: "7", cy: "7", r: "4.5" }),
374
+ /* @__PURE__ */ jsx5("path", { d: "m10.5 10.5 3 3" })
375
+ ] });
376
+ }
377
+ function SettingsIcon(props) {
378
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
379
+ /* @__PURE__ */ jsx5("path", { d: "M13.01 6.42 14.67 6.94v2.12l-1.66.52-.35.84.8 1.55-1.49 1.49-1.55-.8-.84.35-.52 1.66H6.94l-.52-1.66-.84-.35-1.55.8-1.49-1.49.8-1.55-.35-.84-1.66-.52V6.94l1.66-.52.35-.84-.8-1.55 1.49-1.49 1.55.8.84-.35.52-1.66h2.12l.52 1.66.84.35 1.55-.8 1.49 1.49-.8 1.55z" }),
380
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "8", r: "2.25" })
381
+ ] });
382
+ }
383
+ function StarIcon(props) {
384
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "m8 2.25 1.8 3.8 4.2.55-3.1 2.9.8 4.15L8 11.6l-3.7 2.05.8-4.15L2 6.6l4.2-.55z" }) });
385
+ }
386
+ function SunIcon(props) {
387
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
388
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "8", r: "3" }),
389
+ /* @__PURE__ */ jsx5("path", { d: "M8 1.75v1.5M8 12.75v1.5M1.75 8h1.5M12.75 8h1.5M3.58 3.58l1.06 1.06M11.36 11.36l1.06 1.06M3.58 12.42l1.06-1.06M11.36 4.64l1.06-1.06" })
390
+ ] });
391
+ }
392
+ function ThumbsDownIcon(props) {
393
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
394
+ /* @__PURE__ */ jsx5("path", { d: "M5 2.5H3a.5.5 0 0 0-.5.5v5.5a.5.5 0 0 0 .5.5h2" }),
395
+ /* @__PURE__ */ jsx5("path", { d: "M5 9l2.5 4.5a1.5 1.5 0 0 0 1.5-1.5V9.5h3.25a1.25 1.25 0 0 0 1.23-1.45l-.9-5a1.25 1.25 0 0 0-1.23-1.05H5z" })
396
+ ] });
397
+ }
398
+ function ThumbsUpIcon(props) {
399
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
400
+ /* @__PURE__ */ jsx5("path", { d: "M5 13.5H3a.5.5 0 0 1-.5-.5V7.5A.5.5 0 0 1 3 7h2" }),
401
+ /* @__PURE__ */ jsx5("path", { d: "M5 7l2.5-4.5a1.5 1.5 0 0 1 1.5 1.5v2.5h3.25a1.25 1.25 0 0 1 1.23 1.45l-.9 5a1.25 1.25 0 0 1-1.23 1.05H5z" })
402
+ ] });
403
+ }
404
+ function TrashIcon(props) {
405
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
406
+ /* @__PURE__ */ jsx5("path", { d: "M2.75 4.25h10.5M6.25 4.25V3a.75.75 0 0 1 .75-.75h2A.75.75 0 0 1 9.75 3v1.25" }),
407
+ /* @__PURE__ */ jsx5("path", { d: "M4 4.25l.5 8.5a1 1 0 0 0 1 .95h5a1 1 0 0 0 1-.95l.5-8.5" }),
408
+ /* @__PURE__ */ jsx5("path", { d: "M6.5 7v4M9.5 7v4" })
409
+ ] });
410
+ }
411
+ function UndoIcon(props) {
412
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
413
+ /* @__PURE__ */ jsx5("path", { d: "M3 7h7a3.5 3.5 0 0 1 0 7H6" }),
414
+ /* @__PURE__ */ jsx5("path", { d: "M6 4 3 7l3 3" })
415
+ ] });
416
+ }
417
+ function UserIcon(props) {
418
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
419
+ /* @__PURE__ */ jsx5("circle", { cx: "8", cy: "5.25", r: "2.75" }),
420
+ /* @__PURE__ */ jsx5("path", { d: "M2.75 13.75a5.25 5.25 0 0 1 10.5 0" })
421
+ ] });
422
+ }
423
+ function WarningIcon(props) {
424
+ return /* @__PURE__ */ jsxs4(Icon, { ...props, children: [
425
+ /* @__PURE__ */ jsx5("path", { d: "M8 2.5 1.75 13.25h12.5z" }),
426
+ /* @__PURE__ */ jsx5("path", { d: "M8 6.5v3M8 11.5v.01" })
427
+ ] });
428
+ }
429
+ function XIcon(props) {
430
+ return /* @__PURE__ */ jsx5(Icon, { ...props, children: /* @__PURE__ */ jsx5("path", { d: "M4 4l8 8M12 4l-8 8" }) });
431
+ }
432
+
433
+ // src/components/Dialog/Dialog.tsx
434
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
147
435
  function Root({ dismissible = true, onOpenChange, open, defaultOpen, children }) {
148
- return /* @__PURE__ */ jsx(
149
- Dialog$1.Root,
436
+ return /* @__PURE__ */ jsx6(
437
+ BaseDialog.Root,
150
438
  {
151
439
  open,
152
440
  defaultOpen,
@@ -162,12 +450,12 @@ function Root({ dismissible = true, onOpenChange, open, defaultOpen, children })
162
450
  }
163
451
  );
164
452
  }
165
- var Trigger = Dialog$1.Trigger;
453
+ var Trigger = BaseDialog.Trigger;
166
454
  function Content({ size = "md", className, children, ...rest }) {
167
- return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [
168
- /* @__PURE__ */ jsx(Dialog$1.Backdrop, { className: "sc-dialog__backdrop" }),
169
- /* @__PURE__ */ jsx(
170
- Dialog$1.Popup,
455
+ return /* @__PURE__ */ jsxs5(BaseDialog.Portal, { children: [
456
+ /* @__PURE__ */ jsx6(BaseDialog.Backdrop, { className: "sc-dialog__backdrop" }),
457
+ /* @__PURE__ */ jsx6(
458
+ BaseDialog.Popup,
171
459
  {
172
460
  className: cx("sc-dialog__popup", className),
173
461
  "data-size": size,
@@ -179,40 +467,338 @@ function Content({ size = "md", className, children, ...rest }) {
179
467
  ] });
180
468
  }
181
469
  function Title({ className, ...rest }) {
182
- return /* @__PURE__ */ jsx(Dialog$1.Title, { className: cx("sc-dialog__title", className), ...rest });
470
+ return /* @__PURE__ */ jsx6(BaseDialog.Title, { className: cx("sc-dialog__title", className), ...rest });
183
471
  }
184
472
  function Description({ className, ...rest }) {
185
- return /* @__PURE__ */ jsx(Dialog$1.Description, { className: cx("sc-dialog__description", className), ...rest });
473
+ return /* @__PURE__ */ jsx6(BaseDialog.Description, { className: cx("sc-dialog__description", className), ...rest });
186
474
  }
187
475
  function Body({ className, ...rest }) {
188
- return /* @__PURE__ */ jsx("div", { className: cx("sc-dialog__body", className), ...rest });
476
+ return /* @__PURE__ */ jsx6("div", { className: cx("sc-dialog__body", className), ...rest });
189
477
  }
190
478
  function Actions({ className, ...rest }) {
191
- return /* @__PURE__ */ jsx(Inline, { justify: "end", className: cx("sc-dialog__actions", className), ...rest });
479
+ return /* @__PURE__ */ jsx6(Inline, { justify: "end", className: cx("sc-dialog__actions", className), ...rest });
192
480
  }
193
481
  function Close({ className, children, render, ...rest }) {
194
482
  if (children === void 0 && render === void 0) {
195
- return /* @__PURE__ */ jsx(Dialog$1.Close, { className: cx("sc-dialog__close", className), "aria-label": "Close", ...rest, children: /* @__PURE__ */ jsx(
196
- "svg",
197
- {
198
- width: "16",
199
- height: "16",
200
- viewBox: "0 0 16 16",
201
- fill: "none",
202
- stroke: "currentColor",
203
- strokeWidth: "1.75",
204
- "aria-hidden": "true",
205
- children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8" })
206
- }
207
- ) });
483
+ return /* @__PURE__ */ jsx6(BaseDialog.Close, { className: cx("sc-dialog__close", className), "aria-label": "Close", ...rest, children: /* @__PURE__ */ jsx6(XIcon, {}) });
208
484
  }
209
- return /* @__PURE__ */ jsx(Dialog$1.Close, { className, render, ...rest, children });
485
+ return /* @__PURE__ */ jsx6(BaseDialog.Close, { className, render, ...rest, children });
210
486
  }
211
487
  var Dialog = { Root, Trigger, Content, Title, Description, Body, Actions, Close };
212
488
 
213
- // src/index.ts
214
- var version = "0.1.0";
489
+ // src/icons/icon-names.gen.ts
490
+ var iconNames = [
491
+ "archive",
492
+ "arrow-left",
493
+ "arrow-right",
494
+ "bell",
495
+ "briefcase",
496
+ "calendar",
497
+ "check",
498
+ "chevron-down",
499
+ "chevron-left",
500
+ "chevron-right",
501
+ "chevron-up",
502
+ "circle-check",
503
+ "circle-x",
504
+ "clock",
505
+ "copy",
506
+ "document",
507
+ "download",
508
+ "edit",
509
+ "external-link",
510
+ "eye",
511
+ "filter",
512
+ "flag",
513
+ "inbox",
514
+ "info",
515
+ "link",
516
+ "mail",
517
+ "map-pin",
518
+ "menu",
519
+ "minus",
520
+ "moon",
521
+ "more-horizontal",
522
+ "more-vertical",
523
+ "pause",
524
+ "play",
525
+ "plus",
526
+ "refresh",
527
+ "search",
528
+ "settings",
529
+ "star",
530
+ "sun",
531
+ "thumbs-down",
532
+ "thumbs-up",
533
+ "trash",
534
+ "undo",
535
+ "user",
536
+ "warning",
537
+ "x"
538
+ ];
539
+
540
+ // src/components/Tooltip/Tooltip.tsx
541
+ import { Tooltip as BaseTooltip } from "@base-ui/react/tooltip";
542
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
543
+ function TooltipBase({
544
+ content,
545
+ children,
546
+ side = "top",
547
+ align = "center",
548
+ delay = 300,
549
+ closeDelay,
550
+ open,
551
+ defaultOpen,
552
+ onOpenChange,
553
+ disabled,
554
+ className
555
+ }) {
556
+ return /* @__PURE__ */ jsxs6(
557
+ BaseTooltip.Root,
558
+ {
559
+ open,
560
+ defaultOpen,
561
+ onOpenChange: onOpenChange ? (next) => onOpenChange(next) : void 0,
562
+ disabled,
563
+ children: [
564
+ /* @__PURE__ */ jsx7(BaseTooltip.Trigger, { render: children, delay, closeDelay }),
565
+ /* @__PURE__ */ jsx7(BaseTooltip.Portal, { children: /* @__PURE__ */ jsx7(BaseTooltip.Positioner, { side, align, sideOffset: 6, className: "sc-tooltip__positioner", children: /* @__PURE__ */ jsxs6(BaseTooltip.Popup, { role: "tooltip", className: cx("sc-tooltip", className), children: [
566
+ /* @__PURE__ */ jsx7(BaseTooltip.Arrow, { className: "sc-tooltip__arrow" }),
567
+ content
568
+ ] }) }) })
569
+ ]
570
+ }
571
+ );
572
+ }
573
+ var Provider = BaseTooltip.Provider;
574
+ var Tooltip = Object.assign(TooltipBase, { Provider });
575
+
576
+ // src/components/IconButton/IconButton.tsx
577
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
578
+ function IconButton({
579
+ label,
580
+ children,
581
+ variant = "ghost",
582
+ size = "md",
583
+ tooltip,
584
+ tooltipSide = "top",
585
+ round = false,
586
+ loading = false,
587
+ type = "button",
588
+ className,
589
+ onClick,
590
+ ...rest
591
+ }) {
592
+ const handleClick = (event) => {
593
+ if (loading) {
594
+ event.preventDefault();
595
+ return;
596
+ }
597
+ onClick?.(event);
598
+ };
599
+ const button = /* @__PURE__ */ jsxs7(
600
+ "button",
601
+ {
602
+ type,
603
+ className: cx("sc-button", "sc-icon-button", className),
604
+ "data-variant": variant,
605
+ "data-size": size,
606
+ "data-round": round || void 0,
607
+ "data-loading": loading || void 0,
608
+ "aria-busy": loading || void 0,
609
+ "aria-label": label,
610
+ onClick: handleClick,
611
+ ...rest,
612
+ children: [
613
+ /* @__PURE__ */ jsx8("span", { className: "sc-button__icon", "aria-hidden": "true", children }),
614
+ loading ? /* @__PURE__ */ jsx8("span", { className: "sc-button__spinner", "aria-hidden": "true" }) : null
615
+ ]
616
+ }
617
+ );
618
+ if (!tooltip) return button;
619
+ return /* @__PURE__ */ jsx8(Tooltip, { content: tooltip === true ? label : tooltip, side: tooltipSide, children: button });
620
+ }
215
621
 
216
- export { Badge, Button, Card, Dialog, Inline, Kbd, Stack, version };
217
- //# sourceMappingURL=index.js.map
622
+ // src/components/Menu/Menu.tsx
623
+ import { Menu as BaseMenu } from "@base-ui/react/menu";
624
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
625
+ function Root2({ open, defaultOpen, onOpenChange, disabled, modal = true, children }) {
626
+ return /* @__PURE__ */ jsx9(
627
+ BaseMenu.Root,
628
+ {
629
+ open,
630
+ defaultOpen,
631
+ onOpenChange: onOpenChange ? (next) => onOpenChange(next) : void 0,
632
+ disabled,
633
+ modal,
634
+ children
635
+ }
636
+ );
637
+ }
638
+ function Trigger2({ render, className, children, ...rest }) {
639
+ return /* @__PURE__ */ jsx9(
640
+ BaseMenu.Trigger,
641
+ {
642
+ render: render ?? /* @__PURE__ */ jsx9(Button, { variant: "secondary", iconEnd: /* @__PURE__ */ jsx9(ChevronDownIcon, {}), className }),
643
+ className: render ? className : void 0,
644
+ ...rest,
645
+ children
646
+ }
647
+ );
648
+ }
649
+ function Content2({
650
+ side = "bottom",
651
+ align = "start",
652
+ sideOffset = 4,
653
+ className,
654
+ children,
655
+ ...rest
656
+ }) {
657
+ return /* @__PURE__ */ jsx9(BaseMenu.Portal, { children: /* @__PURE__ */ jsx9(BaseMenu.Positioner, { side, align, sideOffset, className: "sc-menu__positioner", children: /* @__PURE__ */ jsx9(BaseMenu.Popup, { className: cx("sc-menu", className), ...rest, children }) }) });
658
+ }
659
+ function ItemBody({
660
+ icon,
661
+ trailing,
662
+ children
663
+ }) {
664
+ return /* @__PURE__ */ jsxs8(Fragment2, { children: [
665
+ /* @__PURE__ */ jsx9("span", { className: "sc-menu__icon", "aria-hidden": "true", children: icon }),
666
+ /* @__PURE__ */ jsx9("span", { className: "sc-menu__label", children }),
667
+ trailing !== void 0 ? /* @__PURE__ */ jsx9("span", { className: "sc-menu__trailing", children: trailing }) : null
668
+ ] });
669
+ }
670
+ function Item({ icon, trailing, tone = "default", className, children, ...rest }) {
671
+ return /* @__PURE__ */ jsx9(BaseMenu.Item, { className: cx("sc-menu__item", className), "data-tone": tone, ...rest, children: /* @__PURE__ */ jsx9(ItemBody, { icon, trailing, children }) });
672
+ }
673
+ function LinkItem({ icon, trailing, tone = "default", className, children, ...rest }) {
674
+ return /* @__PURE__ */ jsx9(BaseMenu.LinkItem, { className: cx("sc-menu__item", className), "data-tone": tone, ...rest, children: /* @__PURE__ */ jsx9(ItemBody, { icon, trailing, children }) });
675
+ }
676
+ function CheckboxItem({ trailing, onCheckedChange, className, children, ...rest }) {
677
+ return /* @__PURE__ */ jsxs8(
678
+ BaseMenu.CheckboxItem,
679
+ {
680
+ className: cx("sc-menu__item", className),
681
+ onCheckedChange: onCheckedChange ? (checked) => onCheckedChange(checked) : void 0,
682
+ ...rest,
683
+ children: [
684
+ /* @__PURE__ */ jsx9(BaseMenu.CheckboxItemIndicator, { className: "sc-menu__icon sc-menu__indicator", children: /* @__PURE__ */ jsx9(CheckIcon, { size: "sm" }) }),
685
+ /* @__PURE__ */ jsx9("span", { className: "sc-menu__label", children }),
686
+ trailing !== void 0 ? /* @__PURE__ */ jsx9("span", { className: "sc-menu__trailing", children: trailing }) : null
687
+ ]
688
+ }
689
+ );
690
+ }
691
+ function RadioGroup({
692
+ label,
693
+ onValueChange,
694
+ className,
695
+ children,
696
+ ...rest
697
+ }) {
698
+ return /* @__PURE__ */ jsxs8(
699
+ BaseMenu.RadioGroup,
700
+ {
701
+ className: cx("sc-menu__group", className),
702
+ onValueChange: onValueChange ? (value) => onValueChange(value) : void 0,
703
+ ...rest,
704
+ children: [
705
+ label !== void 0 ? /* @__PURE__ */ jsx9(BaseMenu.GroupLabel, { className: "sc-menu__group-label", children: label }) : null,
706
+ children
707
+ ]
708
+ }
709
+ );
710
+ }
711
+ function RadioItem({ trailing, className, children, ...rest }) {
712
+ return /* @__PURE__ */ jsxs8(BaseMenu.RadioItem, { className: cx("sc-menu__item", className), ...rest, children: [
713
+ /* @__PURE__ */ jsx9(BaseMenu.RadioItemIndicator, { className: "sc-menu__icon sc-menu__indicator", children: /* @__PURE__ */ jsx9("span", { className: "sc-menu__radio-dot" }) }),
714
+ /* @__PURE__ */ jsx9("span", { className: "sc-menu__label", children }),
715
+ trailing !== void 0 ? /* @__PURE__ */ jsx9("span", { className: "sc-menu__trailing", children: trailing }) : null
716
+ ] });
717
+ }
718
+ function Group({ label, className, children, ...rest }) {
719
+ return /* @__PURE__ */ jsxs8(BaseMenu.Group, { className: cx("sc-menu__group", className), ...rest, children: [
720
+ label !== void 0 ? /* @__PURE__ */ jsx9(BaseMenu.GroupLabel, { className: "sc-menu__group-label", children: label }) : null,
721
+ children
722
+ ] });
723
+ }
724
+ function Separator({ className, ...rest }) {
725
+ return /* @__PURE__ */ jsx9(BaseMenu.Separator, { className: cx("sc-menu__separator", className), ...rest });
726
+ }
727
+ var Menu = {
728
+ Root: Root2,
729
+ Trigger: Trigger2,
730
+ Content: Content2,
731
+ Item,
732
+ LinkItem,
733
+ CheckboxItem,
734
+ RadioGroup,
735
+ RadioItem,
736
+ Group,
737
+ Separator
738
+ };
739
+
740
+ // src/index.ts
741
+ var version = "0.1.1";
742
+ export {
743
+ ArchiveIcon,
744
+ ArrowLeftIcon,
745
+ ArrowRightIcon,
746
+ Badge,
747
+ BellIcon,
748
+ BriefcaseIcon,
749
+ Button,
750
+ CalendarIcon,
751
+ Card,
752
+ CheckIcon,
753
+ ChevronDownIcon,
754
+ ChevronLeftIcon,
755
+ ChevronRightIcon,
756
+ ChevronUpIcon,
757
+ CircleCheckIcon,
758
+ CircleXIcon,
759
+ ClockIcon,
760
+ CopyIcon,
761
+ Dialog,
762
+ DocumentIcon,
763
+ DownloadIcon,
764
+ EditIcon,
765
+ ExternalLinkIcon,
766
+ EyeIcon,
767
+ FilterIcon,
768
+ FlagIcon,
769
+ Icon,
770
+ IconButton,
771
+ InboxIcon,
772
+ InfoIcon,
773
+ Inline,
774
+ Kbd,
775
+ LinkIcon,
776
+ MailIcon,
777
+ MapPinIcon,
778
+ Menu,
779
+ MenuIcon,
780
+ MinusIcon,
781
+ MoonIcon,
782
+ MoreHorizontalIcon,
783
+ MoreVerticalIcon,
784
+ PauseIcon,
785
+ PlayIcon,
786
+ PlusIcon,
787
+ RefreshIcon,
788
+ SearchIcon,
789
+ SettingsIcon,
790
+ Stack,
791
+ StarIcon,
792
+ SunIcon,
793
+ ThumbsDownIcon,
794
+ ThumbsUpIcon,
795
+ Tooltip,
796
+ TrashIcon,
797
+ UndoIcon,
798
+ UserIcon,
799
+ WarningIcon,
800
+ XIcon,
801
+ iconNames,
802
+ version
803
+ };
218
804
  //# sourceMappingURL=index.js.map