@neoptocom/neopto-ui 0.10.1 → 0.11.1

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
@@ -230,20 +230,23 @@ function Card({
230
230
  );
231
231
  }
232
232
  var Input = React2__namespace.forwardRef(
233
- ({ className, disabled, ...props }, ref) => {
233
+ ({ className, disabled, variant = "default", ...props }, ref) => {
234
+ const isBorderless = variant === "borderless";
234
235
  return /* @__PURE__ */ jsxRuntime.jsx(
235
236
  "input",
236
237
  {
237
238
  ref,
238
239
  disabled,
239
240
  className: [
240
- "w-full h-12 px-4 rounded-full border bg-transparent outline-none transition-colors",
241
+ "w-full h-12 px-4 rounded-full bg-transparent outline-none transition-colors",
241
242
  "text-sm placeholder:text-[var(--muted-fg)]",
242
- disabled ? "border-[#3F424F] text-[#3F424F] cursor-not-allowed" : [
243
+ !isBorderless && "border",
244
+ disabled ? "text-[#3F424F] cursor-not-allowed" + (isBorderless ? "" : " border-[#3F424F]") : [
243
245
  "text-[var(--muted-fg)]",
244
- "border-[var(--muted-fg)]",
245
- "hover:border-[var(--border)]",
246
- "focus:border-[var(--color-brand)] focus:text-[var(--fg)]"
246
+ isBorderless ? "" : "border-[var(--muted-fg)]",
247
+ isBorderless ? "" : "hover:border-[var(--border)]",
248
+ "focus:text-[var(--fg)]",
249
+ isBorderless ? "" : "focus:border-[var(--color-brand)]"
247
250
  ].join(" "),
248
251
  className
249
252
  ].join(" "),
@@ -1184,12 +1187,12 @@ var AnimatedBgRectangle = ({ colors, delay = 0 }) => {
1184
1187
  );
1185
1188
  };
1186
1189
  var AnimatedBgRectangle_default = AnimatedBgRectangle;
1187
- var ChatButton = ({
1190
+ var AgentButton = ({
1188
1191
  onOpenChat,
1189
1192
  hasNotification = false,
1190
1193
  notificationMessage = "",
1191
1194
  logoSrc,
1192
- logoAlt = "Chat Agent",
1195
+ logoAlt = "Agent",
1193
1196
  animationColors = ["#7DADB9", "#3864F5", "#55468D", "#479A8D"]
1194
1197
  }) => {
1195
1198
  const [showText, setShowText] = React2.useState(false);
@@ -1289,8 +1292,9 @@ var ChatButton = ({
1289
1292
  }
1290
1293
  );
1291
1294
  };
1292
- var ChatButton_default = ChatButton;
1295
+ var AgentButton_default = AgentButton;
1293
1296
 
1297
+ exports.AgentButton = AgentButton_default;
1294
1298
  exports.AnimatedBgCircle = AnimatedBgCircle_default;
1295
1299
  exports.AnimatedBgRectangle = AnimatedBgRectangle_default;
1296
1300
  exports.AppBackground = AppBackground;
@@ -1300,7 +1304,6 @@ exports.AvatarGroup = AvatarGroup;
1300
1304
  exports.BackgroundBlur = BackgroundBlur;
1301
1305
  exports.Button = Button;
1302
1306
  exports.Card = Card;
1303
- exports.ChatButton = ChatButton_default;
1304
1307
  exports.Chip = Chip;
1305
1308
  exports.Counter = Counter;
1306
1309
  exports.Icon = Icon;
package/dist/index.d.cts CHANGED
@@ -50,8 +50,14 @@ type CardProps = React.HTMLAttributes<HTMLDivElement> & {
50
50
  };
51
51
  declare function Card({ children, className, style, showDecorations, ...props }: CardProps): react_jsx_runtime.JSX.Element;
52
52
 
53
- type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
54
- declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
53
+ type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> & {
54
+ /** Input visual variant */
55
+ variant?: "default" | "borderless";
56
+ };
57
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
58
+ /** Input visual variant */
59
+ variant?: "default" | "borderless";
60
+ } & React.RefAttributes<HTMLInputElement>>;
55
61
 
56
62
  type ModalProps = {
57
63
  /** Whether the modal is open */
@@ -262,21 +268,21 @@ type CounterProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & {
262
268
  };
263
269
  declare function Counter({ value, onChange, min, max, step, className, ...props }: CounterProps): react_jsx_runtime.JSX.Element;
264
270
 
265
- interface ChatButtonProps {
266
- /** Callback when chat button is clicked */
271
+ interface AgentButtonProps {
272
+ /** Callback when agent button is clicked */
267
273
  onOpenChat: () => void;
268
274
  /** Whether there's a new notification */
269
275
  hasNotification?: boolean;
270
276
  /** The notification message to display */
271
277
  notificationMessage?: string;
272
- /** Logo source for the chat agent */
278
+ /** Logo source for the agent */
273
279
  logoSrc?: string;
274
280
  /** Alt text for the logo */
275
281
  logoAlt?: string;
276
282
  /** Custom animation colors */
277
283
  animationColors?: string[];
278
284
  }
279
- declare const ChatButton: ({ onOpenChat, hasNotification, notificationMessage, logoSrc, logoAlt, animationColors, }: ChatButtonProps) => react_jsx_runtime.JSX.Element;
285
+ declare const AgentButton: ({ onOpenChat, hasNotification, notificationMessage, logoSrc, logoAlt, animationColors, }: AgentButtonProps) => react_jsx_runtime.JSX.Element;
280
286
 
281
287
  interface AnimatedBgCircleProps {
282
288
  colors: string[];
@@ -291,4 +297,4 @@ interface AnimatedBgRectangleProps {
291
297
  }
292
298
  declare const AnimatedBgRectangle: ({ colors, delay }: AnimatedBgRectangleProps) => react_jsx_runtime.JSX.Element;
293
299
 
294
- export { AnimatedBgCircle, AnimatedBgRectangle, AppBackground, type AppBackgroundProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BackgroundBlur, type BackgroundBlurProps, Button, type ButtonProps, Card, type CardProps, ChatButton, type ChatButtonProps, Chip, type ChipProps, Counter, type CounterProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight, index as assets };
300
+ export { AgentButton, type AgentButtonProps, AnimatedBgCircle, AnimatedBgRectangle, AppBackground, type AppBackgroundProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BackgroundBlur, type BackgroundBlurProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Counter, type CounterProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight, index as assets };
package/dist/index.d.ts CHANGED
@@ -50,8 +50,14 @@ type CardProps = React.HTMLAttributes<HTMLDivElement> & {
50
50
  };
51
51
  declare function Card({ children, className, style, showDecorations, ...props }: CardProps): react_jsx_runtime.JSX.Element;
52
52
 
53
- type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
54
- declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
53
+ type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> & {
54
+ /** Input visual variant */
55
+ variant?: "default" | "borderless";
56
+ };
57
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
58
+ /** Input visual variant */
59
+ variant?: "default" | "borderless";
60
+ } & React.RefAttributes<HTMLInputElement>>;
55
61
 
56
62
  type ModalProps = {
57
63
  /** Whether the modal is open */
@@ -262,21 +268,21 @@ type CounterProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & {
262
268
  };
263
269
  declare function Counter({ value, onChange, min, max, step, className, ...props }: CounterProps): react_jsx_runtime.JSX.Element;
264
270
 
265
- interface ChatButtonProps {
266
- /** Callback when chat button is clicked */
271
+ interface AgentButtonProps {
272
+ /** Callback when agent button is clicked */
267
273
  onOpenChat: () => void;
268
274
  /** Whether there's a new notification */
269
275
  hasNotification?: boolean;
270
276
  /** The notification message to display */
271
277
  notificationMessage?: string;
272
- /** Logo source for the chat agent */
278
+ /** Logo source for the agent */
273
279
  logoSrc?: string;
274
280
  /** Alt text for the logo */
275
281
  logoAlt?: string;
276
282
  /** Custom animation colors */
277
283
  animationColors?: string[];
278
284
  }
279
- declare const ChatButton: ({ onOpenChat, hasNotification, notificationMessage, logoSrc, logoAlt, animationColors, }: ChatButtonProps) => react_jsx_runtime.JSX.Element;
285
+ declare const AgentButton: ({ onOpenChat, hasNotification, notificationMessage, logoSrc, logoAlt, animationColors, }: AgentButtonProps) => react_jsx_runtime.JSX.Element;
280
286
 
281
287
  interface AnimatedBgCircleProps {
282
288
  colors: string[];
@@ -291,4 +297,4 @@ interface AnimatedBgRectangleProps {
291
297
  }
292
298
  declare const AnimatedBgRectangle: ({ colors, delay }: AnimatedBgRectangleProps) => react_jsx_runtime.JSX.Element;
293
299
 
294
- export { AnimatedBgCircle, AnimatedBgRectangle, AppBackground, type AppBackgroundProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BackgroundBlur, type BackgroundBlurProps, Button, type ButtonProps, Card, type CardProps, ChatButton, type ChatButtonProps, Chip, type ChipProps, Counter, type CounterProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight, index as assets };
300
+ export { AgentButton, type AgentButtonProps, AnimatedBgCircle, AnimatedBgRectangle, AppBackground, type AppBackgroundProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BackgroundBlur, type BackgroundBlurProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, Counter, type CounterProps, Icon, IconButton, type IconButtonProps, type IconProps, Input, type InputProps, Modal, type ModalProps, Search, type SearchOption, type SearchProps, Skeleton, type SkeletonProps, Typo, type TypoProps, type TypoVariant, type TypoWeight, index as assets };
package/dist/index.js CHANGED
@@ -209,20 +209,23 @@ function Card({
209
209
  );
210
210
  }
211
211
  var Input = React2.forwardRef(
212
- ({ className, disabled, ...props }, ref) => {
212
+ ({ className, disabled, variant = "default", ...props }, ref) => {
213
+ const isBorderless = variant === "borderless";
213
214
  return /* @__PURE__ */ jsx(
214
215
  "input",
215
216
  {
216
217
  ref,
217
218
  disabled,
218
219
  className: [
219
- "w-full h-12 px-4 rounded-full border bg-transparent outline-none transition-colors",
220
+ "w-full h-12 px-4 rounded-full bg-transparent outline-none transition-colors",
220
221
  "text-sm placeholder:text-[var(--muted-fg)]",
221
- disabled ? "border-[#3F424F] text-[#3F424F] cursor-not-allowed" : [
222
+ !isBorderless && "border",
223
+ disabled ? "text-[#3F424F] cursor-not-allowed" + (isBorderless ? "" : " border-[#3F424F]") : [
222
224
  "text-[var(--muted-fg)]",
223
- "border-[var(--muted-fg)]",
224
- "hover:border-[var(--border)]",
225
- "focus:border-[var(--color-brand)] focus:text-[var(--fg)]"
225
+ isBorderless ? "" : "border-[var(--muted-fg)]",
226
+ isBorderless ? "" : "hover:border-[var(--border)]",
227
+ "focus:text-[var(--fg)]",
228
+ isBorderless ? "" : "focus:border-[var(--color-brand)]"
226
229
  ].join(" "),
227
230
  className
228
231
  ].join(" "),
@@ -1163,12 +1166,12 @@ var AnimatedBgRectangle = ({ colors, delay = 0 }) => {
1163
1166
  );
1164
1167
  };
1165
1168
  var AnimatedBgRectangle_default = AnimatedBgRectangle;
1166
- var ChatButton = ({
1169
+ var AgentButton = ({
1167
1170
  onOpenChat,
1168
1171
  hasNotification = false,
1169
1172
  notificationMessage = "",
1170
1173
  logoSrc,
1171
- logoAlt = "Chat Agent",
1174
+ logoAlt = "Agent",
1172
1175
  animationColors = ["#7DADB9", "#3864F5", "#55468D", "#479A8D"]
1173
1176
  }) => {
1174
1177
  const [showText, setShowText] = useState(false);
@@ -1268,6 +1271,6 @@ var ChatButton = ({
1268
1271
  }
1269
1272
  );
1270
1273
  };
1271
- var ChatButton_default = ChatButton;
1274
+ var AgentButton_default = AgentButton;
1272
1275
 
1273
- export { AnimatedBgCircle_default as AnimatedBgCircle, AnimatedBgRectangle_default as AnimatedBgRectangle, AppBackground, Autocomplete, Avatar, AvatarGroup, BackgroundBlur, Button, Card, ChatButton_default as ChatButton, Chip, Counter, Icon, IconButton, Input, Modal, Search, Skeleton, Typo, assets_exports as assets };
1276
+ export { AgentButton_default as AgentButton, AnimatedBgCircle_default as AnimatedBgCircle, AnimatedBgRectangle_default as AnimatedBgRectangle, AppBackground, Autocomplete, Avatar, AvatarGroup, BackgroundBlur, Button, Card, Chip, Counter, Icon, IconButton, Input, Modal, Search, Skeleton, Typo, assets_exports as assets };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neoptocom/neopto-ui",
3
- "version": "0.10.1",
3
+ "version": "0.11.1",
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 Storybook documentation. Requires Tailwind v4+.",
6
6
  "keywords": [
@@ -3,14 +3,14 @@ import AnimatedBgCircle from "./AnimatedBgCircle";
3
3
  import AnimatedBgRectangle from "./AnimatedBgRectangle";
4
4
  import Typo from "../Typo";
5
5
 
6
- export interface ChatButtonProps {
7
- /** Callback when chat button is clicked */
6
+ export interface AgentButtonProps {
7
+ /** Callback when agent button is clicked */
8
8
  onOpenChat: () => void;
9
9
  /** Whether there's a new notification */
10
10
  hasNotification?: boolean;
11
11
  /** The notification message to display */
12
12
  notificationMessage?: string;
13
- /** Logo source for the chat agent */
13
+ /** Logo source for the agent */
14
14
  logoSrc?: string;
15
15
  /** Alt text for the logo */
16
16
  logoAlt?: string;
@@ -18,14 +18,14 @@ export interface ChatButtonProps {
18
18
  animationColors?: string[];
19
19
  }
20
20
 
21
- const ChatButton = ({
21
+ const AgentButton = ({
22
22
  onOpenChat,
23
23
  hasNotification = false,
24
24
  notificationMessage = "",
25
25
  logoSrc,
26
- logoAlt = "Chat Agent",
26
+ logoAlt = "Agent",
27
27
  animationColors = ["#7DADB9", "#3864F5", "#55468D", "#479A8D"],
28
- }: ChatButtonProps) => {
28
+ }: AgentButtonProps) => {
29
29
  const [showText, setShowText] = useState(false);
30
30
  const [delayedHasNotification, setDelayedHasNotification] = useState(false);
31
31
  const [isMounted, setIsMounted] = useState(false);
@@ -128,5 +128,5 @@ const ChatButton = ({
128
128
  );
129
129
  };
130
130
 
131
- export default ChatButton;
131
+ export default AgentButton;
132
132
 
@@ -1,5 +1,5 @@
1
- export { default as ChatButton } from "./ChatButton";
2
- export type { ChatButtonProps } from "./ChatButton";
1
+ export { default as AgentButton } from "./AgentButton";
2
+ export type { AgentButtonProps } from "./AgentButton";
3
3
  export { default as AnimatedBgCircle } from "./AnimatedBgCircle";
4
4
  export { default as AnimatedBgRectangle } from "./AnimatedBgRectangle";
5
5
 
@@ -1,23 +1,30 @@
1
1
  import * as React from "react";
2
2
 
3
- export type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>;
3
+ export type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> & {
4
+ /** Input visual variant */
5
+ variant?: "default" | "borderless";
6
+ };
4
7
 
5
8
  export const Input = React.forwardRef<HTMLInputElement, InputProps>(
6
- ({ className, disabled, ...props }, ref) => {
9
+ ({ className, disabled, variant = "default", ...props }, ref) => {
10
+ const isBorderless = variant === "borderless";
11
+
7
12
  return (
8
13
  <input
9
14
  ref={ref}
10
15
  disabled={disabled}
11
16
  className={[
12
- "w-full h-12 px-4 rounded-full border bg-transparent outline-none transition-colors",
17
+ "w-full h-12 px-4 rounded-full bg-transparent outline-none transition-colors",
13
18
  "text-sm placeholder:text-[var(--muted-fg)]",
19
+ !isBorderless && "border",
14
20
  disabled
15
- ? "border-[#3F424F] text-[#3F424F] cursor-not-allowed"
21
+ ? "text-[#3F424F] cursor-not-allowed" + (isBorderless ? "" : " border-[#3F424F]")
16
22
  : [
17
23
  "text-[var(--muted-fg)]",
18
- "border-[var(--muted-fg)]",
19
- "hover:border-[var(--border)]",
20
- "focus:border-[var(--color-brand)] focus:text-[var(--fg)]"
24
+ isBorderless ? "" : "border-[var(--muted-fg)]",
25
+ isBorderless ? "" : "hover:border-[var(--border)]",
26
+ "focus:text-[var(--fg)]",
27
+ isBorderless ? "" : "focus:border-[var(--color-brand)]"
21
28
  ].join(" "),
22
29
  className
23
30
  ].join(" ")}
package/src/index.ts CHANGED
@@ -37,4 +37,4 @@ export type { IconButtonProps } from "./components/IconButton";
37
37
  export type { IconProps } from "./components/Icon";
38
38
  export type { ChipProps } from "./components/Chip";
39
39
  export type { CounterProps } from "./components/Counter";
40
- export type { ChatButtonProps } from "./components/Chat";
40
+ export type { AgentButtonProps } from "./components/Chat";
@@ -1,13 +1,13 @@
1
1
  import * as React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { ChatButton } from "../components/Chat";
3
+ import { AgentButton } from "../components/Chat";
4
4
  import Typo from "../components/Typo";
5
5
  import agentLogoDark from "../assets/agent-neopto-dark.svg";
6
6
  import agentLogoLight from "../assets/agent-neopto.svg";
7
7
 
8
- const meta: Meta<typeof ChatButton> = {
9
- title: "Components/ChatButton",
10
- component: ChatButton,
8
+ const meta: Meta<typeof AgentButton> = {
9
+ title: "Components/AgentButton",
10
+ component: AgentButton,
11
11
  args: {
12
12
  hasNotification: false,
13
13
  notificationMessage: "Hello! How can I help you today?",
@@ -28,7 +28,7 @@ const meta: Meta<typeof ChatButton> = {
28
28
  };
29
29
 
30
30
  export default meta;
31
- type Story = StoryObj<typeof ChatButton>;
31
+ type Story = StoryObj<typeof AgentButton>;
32
32
 
33
33
  export const Playground: Story = {
34
34
  render: (args) => {
@@ -36,7 +36,7 @@ export const Playground: Story = {
36
36
 
37
37
  return (
38
38
  <>
39
- <ChatButton
39
+ <AgentButton
40
40
  {...args}
41
41
  onOpenChat={() => {
42
42
  setChatOpen(true);
@@ -79,7 +79,7 @@ export const AutoToggleNotification: Story = {
79
79
  }, []);
80
80
 
81
81
  return (
82
- <ChatButton
82
+ <AgentButton
83
83
  {...args}
84
84
  hasNotification={hasNotification}
85
85
  notificationMessage="This notification toggles every 5 seconds!"
@@ -36,3 +36,14 @@ export const Types: Story = {
36
36
  </div>
37
37
  )
38
38
  };
39
+
40
+ export const Borderless: Story = {
41
+ render: () => (
42
+ <div className="flex flex-col gap-4 w-96">
43
+ <Input variant="borderless" placeholder="Borderless input" type="text" />
44
+ <Input variant="borderless" placeholder="Borderless email" type="email" />
45
+ <Input variant="borderless" placeholder="Borderless search..." />
46
+ <Input variant="borderless" placeholder="Disabled borderless" disabled />
47
+ </div>
48
+ )
49
+ };