@neoptocom/neopto-ui 1.6.8 → 1.6.9

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
@@ -515,12 +515,9 @@ function getTypoClasses(weight = "normal", muted, className) {
515
515
  semibold: "font-semibold",
516
516
  bold: "font-bold"
517
517
  };
518
- const hasMarginRight = className?.includes("mr-");
519
- const horizontalSpacing = hasMarginRight ? "" : "mr-2";
520
518
  return [
521
519
  weights[weight],
522
520
  muted ? "text-[var(--muted-fg)]" : "",
523
- horizontalSpacing,
524
521
  className
525
522
  ].filter(Boolean).join(" ");
526
523
  }
@@ -1154,7 +1151,8 @@ function getButtonClasses(variant = "primary", size = "md", fullWidth, className
1154
1151
  const variants = {
1155
1152
  primary: "bg-cyan-500 text-white hover:bg-cyan-400 active:bg-cyan-600 disabled:bg-neutral-400",
1156
1153
  secondary: "border border-cyan-500 text-cyan-500 bg-transparent hover:bg-cyan-50 active:bg-cyan-100 disabled:border-neutral-400 disabled:text-neutral-400",
1157
- ghost: "bg-transparent text-[var(--fg)] hover:bg-[var(--muted)] active:bg-[var(--muted)] disabled:opacity-50"
1154
+ ghost: "bg-transparent text-[var(--fg)] hover:bg-[var(--muted)] active:bg-[var(--muted)] disabled:opacity-50",
1155
+ inline: "text-cyan-500 bg-transparent active:bg-cyan-100 disabled:text-neutral-400"
1158
1156
  };
1159
1157
  const sizes = {
1160
1158
  sm: "h-9 px-3",
@@ -1164,7 +1162,7 @@ function getButtonClasses(variant = "primary", size = "md", fullWidth, className
1164
1162
  return [
1165
1163
  base,
1166
1164
  variants[variant],
1167
- sizes[size],
1165
+ variant === "inline" ? "px-2" : sizes[size],
1168
1166
  fullWidth ? "w-full" : "",
1169
1167
  className
1170
1168
  ].filter(Boolean).join(" ");
package/dist/index.d.cts CHANGED
@@ -228,7 +228,7 @@ declare function Search({ className, options, onSearch, selectedOption, onSelect
228
228
 
229
229
  type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
230
230
  /** Button visual variant */
231
- variant?: "primary" | "secondary" | "ghost";
231
+ variant?: "primary" | "secondary" | "ghost" | "inline";
232
232
  /** Button size */
233
233
  size?: "sm" | "md" | "lg";
234
234
  /** Make button full width */
@@ -238,7 +238,7 @@ type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
238
238
  };
239
239
  declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
240
240
  /** Button visual variant */
241
- variant?: "primary" | "secondary" | "ghost";
241
+ variant?: "primary" | "secondary" | "ghost" | "inline";
242
242
  /** Button size */
243
243
  size?: "sm" | "md" | "lg";
244
244
  /** Make button full width */
package/dist/index.d.ts CHANGED
@@ -228,7 +228,7 @@ declare function Search({ className, options, onSearch, selectedOption, onSelect
228
228
 
229
229
  type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
230
230
  /** Button visual variant */
231
- variant?: "primary" | "secondary" | "ghost";
231
+ variant?: "primary" | "secondary" | "ghost" | "inline";
232
232
  /** Button size */
233
233
  size?: "sm" | "md" | "lg";
234
234
  /** Make button full width */
@@ -238,7 +238,7 @@ type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
238
238
  };
239
239
  declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
240
240
  /** Button visual variant */
241
- variant?: "primary" | "secondary" | "ghost";
241
+ variant?: "primary" | "secondary" | "ghost" | "inline";
242
242
  /** Button size */
243
243
  size?: "sm" | "md" | "lg";
244
244
  /** Make button full width */
package/dist/index.js CHANGED
@@ -494,12 +494,9 @@ function getTypoClasses(weight = "normal", muted, className) {
494
494
  semibold: "font-semibold",
495
495
  bold: "font-bold"
496
496
  };
497
- const hasMarginRight = className?.includes("mr-");
498
- const horizontalSpacing = hasMarginRight ? "" : "mr-2";
499
497
  return [
500
498
  weights[weight],
501
499
  muted ? "text-[var(--muted-fg)]" : "",
502
- horizontalSpacing,
503
500
  className
504
501
  ].filter(Boolean).join(" ");
505
502
  }
@@ -1133,7 +1130,8 @@ function getButtonClasses(variant = "primary", size = "md", fullWidth, className
1133
1130
  const variants = {
1134
1131
  primary: "bg-cyan-500 text-white hover:bg-cyan-400 active:bg-cyan-600 disabled:bg-neutral-400",
1135
1132
  secondary: "border border-cyan-500 text-cyan-500 bg-transparent hover:bg-cyan-50 active:bg-cyan-100 disabled:border-neutral-400 disabled:text-neutral-400",
1136
- ghost: "bg-transparent text-[var(--fg)] hover:bg-[var(--muted)] active:bg-[var(--muted)] disabled:opacity-50"
1133
+ ghost: "bg-transparent text-[var(--fg)] hover:bg-[var(--muted)] active:bg-[var(--muted)] disabled:opacity-50",
1134
+ inline: "text-cyan-500 bg-transparent active:bg-cyan-100 disabled:text-neutral-400"
1137
1135
  };
1138
1136
  const sizes = {
1139
1137
  sm: "h-9 px-3",
@@ -1143,7 +1141,7 @@ function getButtonClasses(variant = "primary", size = "md", fullWidth, className
1143
1141
  return [
1144
1142
  base,
1145
1143
  variants[variant],
1146
- sizes[size],
1144
+ variant === "inline" ? "px-2" : sizes[size],
1147
1145
  fullWidth ? "w-full" : "",
1148
1146
  className
1149
1147
  ].filter(Boolean).join(" ");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neoptocom/neopto-ui",
3
- "version": "1.6.8",
3
+ "version": "1.6.9",
4
4
  "private": false,
5
5
  "description": "A modern React component library built with Tailwind CSS v4 and TypeScript. Features dark mode, design tokens, and comprehensive documentation. Requires Tailwind v4+.",
6
6
  "keywords": [
@@ -16,7 +16,7 @@ const meta: Meta<typeof Button> = {
16
16
  argTypes: {
17
17
  variant: {
18
18
  control: "inline-radio",
19
- options: ["primary", "secondary", "ghost"]
19
+ options: ["primary", "secondary", "ghost", "inline"]
20
20
  },
21
21
  size: {
22
22
  control: "inline-radio",
@@ -54,6 +54,11 @@ export const Variants: Story = {
54
54
  Ghost
55
55
  </Typo>
56
56
  </Button>
57
+ <Button variant="inline">
58
+ <Typo variant="title-sm" bold="semibold">
59
+ Inline
60
+ </Typo>
61
+ </Button>
57
62
  </div>
58
63
  )
59
64
  };
@@ -95,6 +100,10 @@ export const WithIcons: Story = {
95
100
  <Icon name="settings" />
96
101
  <span>Settings</span>
97
102
  </Button>
103
+ <Button variant="inline">
104
+ <Icon name="settings" />
105
+ <span>Inline</span>
106
+ </Button>
98
107
  </div>
99
108
  )
100
109
  };
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
 
3
3
  export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
4
4
  /** Button visual variant */
5
- variant?: "primary" | "secondary" | "ghost";
5
+ variant?: "primary" | "secondary" | "ghost" | "inline";
6
6
  /** Button size */
7
7
  size?: "sm" | "md" | "lg";
8
8
  /** Make button full width */
@@ -25,7 +25,8 @@ function getButtonClasses(
25
25
  const variants = {
26
26
  primary: "bg-cyan-500 text-white hover:bg-cyan-400 active:bg-cyan-600 disabled:bg-neutral-400",
27
27
  secondary: "border border-cyan-500 text-cyan-500 bg-transparent hover:bg-cyan-50 active:bg-cyan-100 disabled:border-neutral-400 disabled:text-neutral-400",
28
- ghost: "bg-transparent text-[var(--fg)] hover:bg-[var(--muted)] active:bg-[var(--muted)] disabled:opacity-50"
28
+ ghost: "bg-transparent text-[var(--fg)] hover:bg-[var(--muted)] active:bg-[var(--muted)] disabled:opacity-50",
29
+ inline: "text-cyan-500 bg-transparent active:bg-cyan-100 disabled:text-neutral-400"
29
30
  };
30
31
 
31
32
  const sizes = {
@@ -37,7 +38,7 @@ function getButtonClasses(
37
38
  return [
38
39
  base,
39
40
  variants[variant],
40
- sizes[size],
41
+ variant === "inline" ? "px-2" : sizes[size],
41
42
  fullWidth ? "w-full" : "",
42
43
  className
43
44
  ].filter(Boolean).join(" ");
@@ -47,16 +47,10 @@ function getTypoClasses(
47
47
  semibold: "font-semibold",
48
48
  bold: "font-bold"
49
49
  };
50
-
51
- // Add default horizontal spacing (margin-right) for spacing between side-by-side Typo components
52
- // Users can override with className="mr-0" if needed
53
- const hasMarginRight = className?.includes("mr-");
54
- const horizontalSpacing = hasMarginRight ? "" : "mr-2";
55
50
 
56
51
  return [
57
52
  weights[weight],
58
53
  muted ? "text-[var(--muted-fg)]" : "",
59
- horizontalSpacing,
60
54
  className
61
55
  ].filter(Boolean).join(" ");
62
56
  }