@devfellowship/components 1.2.1 → 1.2.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.
package/dist/index.cjs CHANGED
@@ -167,7 +167,7 @@ __export(src_exports, {
167
167
  InputOTPGroup: () => InputOTPGroup,
168
168
  InputOTPSeparator: () => InputOTPSeparator,
169
169
  InputOTPSlot: () => InputOTPSlot,
170
- Kbd: () => Kbd,
170
+ Kbd: () => Kbd2,
171
171
  Label: () => Label3,
172
172
  LoginPage: () => LoginPage,
173
173
  LoginScreen: () => LoginScreen,
@@ -492,13 +492,37 @@ var Spinner = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
492
492
  ]
493
493
  }
494
494
  );
495
+ var Kbd = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
496
+ "kbd",
497
+ {
498
+ className: cn(
499
+ "ml-1 inline-flex items-center justify-center font-mono uppercase tracking-[0.04em]",
500
+ "text-[10.5px] text-[var(--s-ink-muted)]",
501
+ "min-w-[18px] h-[18px] px-1 rounded-[var(--p-radius-sm)]",
502
+ "border border-[var(--s-border-subtle)] bg-[var(--s-surface-raised)]"
503
+ ),
504
+ children
505
+ }
506
+ );
495
507
  var Button = React3.forwardRef(
496
508
  ({ className, variant, size, asChild = false, loading = false, disabled, kbd, children, ...props }, ref) => {
497
- const Comp = asChild ? import_react_slot.Slot : "button";
509
+ const classes = cn(buttonVariants({ variant, size, className }));
510
+ if (asChild) {
511
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
512
+ import_react_slot.Slot,
513
+ {
514
+ className: classes,
515
+ ref,
516
+ "data-loading": loading ? "" : void 0,
517
+ ...props,
518
+ children
519
+ }
520
+ );
521
+ }
498
522
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
499
- Comp,
523
+ "button",
500
524
  {
501
- className: cn(buttonVariants({ variant, size, className })),
525
+ className: classes,
502
526
  ref,
503
527
  disabled: disabled || loading,
504
528
  "data-loading": loading ? "" : void 0,
@@ -506,18 +530,7 @@ var Button = React3.forwardRef(
506
530
  children: [
507
531
  loading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Spinner, {}) : null,
508
532
  children,
509
- kbd ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
510
- "kbd",
511
- {
512
- className: cn(
513
- "ml-1 inline-flex items-center justify-center font-mono uppercase tracking-[0.04em]",
514
- "text-[10.5px] text-[var(--s-ink-muted)]",
515
- "min-w-[18px] h-[18px] px-1 rounded-[var(--p-radius-sm)]",
516
- "border border-[var(--s-border-subtle)] bg-[var(--s-surface-raised)]"
517
- ),
518
- children: kbd
519
- }
520
- ) : null
533
+ kbd ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Kbd, { children: kbd }) : null
521
534
  ]
522
535
  }
523
536
  );
@@ -2270,8 +2283,8 @@ var kbdVariants = (0, import_class_variance_authority6.cva)(
2270
2283
  }
2271
2284
  }
2272
2285
  );
2273
- var Kbd = React18.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("kbd", { ref, className: cn(kbdVariants({ size }), className), ...props }));
2274
- Kbd.displayName = "Kbd";
2286
+ var Kbd2 = React18.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("kbd", { ref, className: cn(kbdVariants({ size }), className), ...props }));
2287
+ Kbd2.displayName = "Kbd";
2275
2288
 
2276
2289
  // src/components/menubar.tsx
2277
2290
  var MenubarPrimitive = __toESM(require("@radix-ui/react-menubar"), 1);
package/dist/index.js CHANGED
@@ -166,13 +166,37 @@ var Spinner = () => /* @__PURE__ */ jsxs2(
166
166
  ]
167
167
  }
168
168
  );
169
+ var Kbd = ({ children }) => /* @__PURE__ */ jsx3(
170
+ "kbd",
171
+ {
172
+ className: cn(
173
+ "ml-1 inline-flex items-center justify-center font-mono uppercase tracking-[0.04em]",
174
+ "text-[10.5px] text-[var(--s-ink-muted)]",
175
+ "min-w-[18px] h-[18px] px-1 rounded-[var(--p-radius-sm)]",
176
+ "border border-[var(--s-border-subtle)] bg-[var(--s-surface-raised)]"
177
+ ),
178
+ children
179
+ }
180
+ );
169
181
  var Button = React3.forwardRef(
170
182
  ({ className, variant, size, asChild = false, loading = false, disabled, kbd, children, ...props }, ref) => {
171
- const Comp = asChild ? Slot : "button";
183
+ const classes = cn(buttonVariants({ variant, size, className }));
184
+ if (asChild) {
185
+ return /* @__PURE__ */ jsx3(
186
+ Slot,
187
+ {
188
+ className: classes,
189
+ ref,
190
+ "data-loading": loading ? "" : void 0,
191
+ ...props,
192
+ children
193
+ }
194
+ );
195
+ }
172
196
  return /* @__PURE__ */ jsxs2(
173
- Comp,
197
+ "button",
174
198
  {
175
- className: cn(buttonVariants({ variant, size, className })),
199
+ className: classes,
176
200
  ref,
177
201
  disabled: disabled || loading,
178
202
  "data-loading": loading ? "" : void 0,
@@ -180,18 +204,7 @@ var Button = React3.forwardRef(
180
204
  children: [
181
205
  loading ? /* @__PURE__ */ jsx3(Spinner, {}) : null,
182
206
  children,
183
- kbd ? /* @__PURE__ */ jsx3(
184
- "kbd",
185
- {
186
- className: cn(
187
- "ml-1 inline-flex items-center justify-center font-mono uppercase tracking-[0.04em]",
188
- "text-[10.5px] text-[var(--s-ink-muted)]",
189
- "min-w-[18px] h-[18px] px-1 rounded-[var(--p-radius-sm)]",
190
- "border border-[var(--s-border-subtle)] bg-[var(--s-surface-raised)]"
191
- ),
192
- children: kbd
193
- }
194
- ) : null
207
+ kbd ? /* @__PURE__ */ jsx3(Kbd, { children: kbd }) : null
195
208
  ]
196
209
  }
197
210
  );
@@ -1944,8 +1957,8 @@ var kbdVariants = cva6(
1944
1957
  }
1945
1958
  }
1946
1959
  );
1947
- var Kbd = React18.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx26("kbd", { ref, className: cn(kbdVariants({ size }), className), ...props }));
1948
- Kbd.displayName = "Kbd";
1960
+ var Kbd2 = React18.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx26("kbd", { ref, className: cn(kbdVariants({ size }), className), ...props }));
1961
+ Kbd2.displayName = "Kbd";
1949
1962
 
1950
1963
  // src/components/menubar.tsx
1951
1964
  import * as MenubarPrimitive from "@radix-ui/react-menubar";
@@ -5242,7 +5255,7 @@ export {
5242
5255
  InputOTPGroup,
5243
5256
  InputOTPSeparator,
5244
5257
  InputOTPSlot,
5245
- Kbd,
5258
+ Kbd2 as Kbd,
5246
5259
  Label3 as Label,
5247
5260
  LoginPage,
5248
5261
  LoginScreen,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devfellowship/components",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "DFL Design System — UI components, hooks, utils and providers",
5
5
  "type": "module",
6
6
  "sideEffects": [