@neoptocom/neopto-ui 0.10.0 → 0.11.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.cjs +4 -4
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/styles.css +62 -0
- package/package.json +1 -1
- package/src/components/Chat/{ChatButton.tsx → AgentButton.tsx} +7 -7
- package/src/components/Chat/index.ts +2 -2
- package/src/index.ts +1 -1
- package/src/stories/{ChatButton.stories.tsx → AgentButton.stories.tsx} +7 -7
package/dist/index.cjs
CHANGED
|
@@ -1184,12 +1184,12 @@ var AnimatedBgRectangle = ({ colors, delay = 0 }) => {
|
|
|
1184
1184
|
);
|
|
1185
1185
|
};
|
|
1186
1186
|
var AnimatedBgRectangle_default = AnimatedBgRectangle;
|
|
1187
|
-
var
|
|
1187
|
+
var AgentButton = ({
|
|
1188
1188
|
onOpenChat,
|
|
1189
1189
|
hasNotification = false,
|
|
1190
1190
|
notificationMessage = "",
|
|
1191
1191
|
logoSrc,
|
|
1192
|
-
logoAlt = "
|
|
1192
|
+
logoAlt = "Agent",
|
|
1193
1193
|
animationColors = ["#7DADB9", "#3864F5", "#55468D", "#479A8D"]
|
|
1194
1194
|
}) => {
|
|
1195
1195
|
const [showText, setShowText] = React2.useState(false);
|
|
@@ -1289,8 +1289,9 @@ var ChatButton = ({
|
|
|
1289
1289
|
}
|
|
1290
1290
|
);
|
|
1291
1291
|
};
|
|
1292
|
-
var
|
|
1292
|
+
var AgentButton_default = AgentButton;
|
|
1293
1293
|
|
|
1294
|
+
exports.AgentButton = AgentButton_default;
|
|
1294
1295
|
exports.AnimatedBgCircle = AnimatedBgCircle_default;
|
|
1295
1296
|
exports.AnimatedBgRectangle = AnimatedBgRectangle_default;
|
|
1296
1297
|
exports.AppBackground = AppBackground;
|
|
@@ -1300,7 +1301,6 @@ exports.AvatarGroup = AvatarGroup;
|
|
|
1300
1301
|
exports.BackgroundBlur = BackgroundBlur;
|
|
1301
1302
|
exports.Button = Button;
|
|
1302
1303
|
exports.Card = Card;
|
|
1303
|
-
exports.ChatButton = ChatButton_default;
|
|
1304
1304
|
exports.Chip = Chip;
|
|
1305
1305
|
exports.Counter = Counter;
|
|
1306
1306
|
exports.Icon = Icon;
|
package/dist/index.d.cts
CHANGED
|
@@ -262,21 +262,21 @@ type CounterProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & {
|
|
|
262
262
|
};
|
|
263
263
|
declare function Counter({ value, onChange, min, max, step, className, ...props }: CounterProps): react_jsx_runtime.JSX.Element;
|
|
264
264
|
|
|
265
|
-
interface
|
|
266
|
-
/** Callback when
|
|
265
|
+
interface AgentButtonProps {
|
|
266
|
+
/** Callback when agent button is clicked */
|
|
267
267
|
onOpenChat: () => void;
|
|
268
268
|
/** Whether there's a new notification */
|
|
269
269
|
hasNotification?: boolean;
|
|
270
270
|
/** The notification message to display */
|
|
271
271
|
notificationMessage?: string;
|
|
272
|
-
/** Logo source for the
|
|
272
|
+
/** Logo source for the agent */
|
|
273
273
|
logoSrc?: string;
|
|
274
274
|
/** Alt text for the logo */
|
|
275
275
|
logoAlt?: string;
|
|
276
276
|
/** Custom animation colors */
|
|
277
277
|
animationColors?: string[];
|
|
278
278
|
}
|
|
279
|
-
declare const
|
|
279
|
+
declare const AgentButton: ({ onOpenChat, hasNotification, notificationMessage, logoSrc, logoAlt, animationColors, }: AgentButtonProps) => react_jsx_runtime.JSX.Element;
|
|
280
280
|
|
|
281
281
|
interface AnimatedBgCircleProps {
|
|
282
282
|
colors: string[];
|
|
@@ -291,4 +291,4 @@ interface AnimatedBgRectangleProps {
|
|
|
291
291
|
}
|
|
292
292
|
declare const AnimatedBgRectangle: ({ colors, delay }: AnimatedBgRectangleProps) => react_jsx_runtime.JSX.Element;
|
|
293
293
|
|
|
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,
|
|
294
|
+
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
|
@@ -262,21 +262,21 @@ type CounterProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & {
|
|
|
262
262
|
};
|
|
263
263
|
declare function Counter({ value, onChange, min, max, step, className, ...props }: CounterProps): react_jsx_runtime.JSX.Element;
|
|
264
264
|
|
|
265
|
-
interface
|
|
266
|
-
/** Callback when
|
|
265
|
+
interface AgentButtonProps {
|
|
266
|
+
/** Callback when agent button is clicked */
|
|
267
267
|
onOpenChat: () => void;
|
|
268
268
|
/** Whether there's a new notification */
|
|
269
269
|
hasNotification?: boolean;
|
|
270
270
|
/** The notification message to display */
|
|
271
271
|
notificationMessage?: string;
|
|
272
|
-
/** Logo source for the
|
|
272
|
+
/** Logo source for the agent */
|
|
273
273
|
logoSrc?: string;
|
|
274
274
|
/** Alt text for the logo */
|
|
275
275
|
logoAlt?: string;
|
|
276
276
|
/** Custom animation colors */
|
|
277
277
|
animationColors?: string[];
|
|
278
278
|
}
|
|
279
|
-
declare const
|
|
279
|
+
declare const AgentButton: ({ onOpenChat, hasNotification, notificationMessage, logoSrc, logoAlt, animationColors, }: AgentButtonProps) => react_jsx_runtime.JSX.Element;
|
|
280
280
|
|
|
281
281
|
interface AnimatedBgCircleProps {
|
|
282
282
|
colors: string[];
|
|
@@ -291,4 +291,4 @@ interface AnimatedBgRectangleProps {
|
|
|
291
291
|
}
|
|
292
292
|
declare const AnimatedBgRectangle: ({ colors, delay }: AnimatedBgRectangleProps) => react_jsx_runtime.JSX.Element;
|
|
293
293
|
|
|
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,
|
|
294
|
+
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
|
@@ -1163,12 +1163,12 @@ var AnimatedBgRectangle = ({ colors, delay = 0 }) => {
|
|
|
1163
1163
|
);
|
|
1164
1164
|
};
|
|
1165
1165
|
var AnimatedBgRectangle_default = AnimatedBgRectangle;
|
|
1166
|
-
var
|
|
1166
|
+
var AgentButton = ({
|
|
1167
1167
|
onOpenChat,
|
|
1168
1168
|
hasNotification = false,
|
|
1169
1169
|
notificationMessage = "",
|
|
1170
1170
|
logoSrc,
|
|
1171
|
-
logoAlt = "
|
|
1171
|
+
logoAlt = "Agent",
|
|
1172
1172
|
animationColors = ["#7DADB9", "#3864F5", "#55468D", "#479A8D"]
|
|
1173
1173
|
}) => {
|
|
1174
1174
|
const [showText, setShowText] = useState(false);
|
|
@@ -1268,6 +1268,6 @@ var ChatButton = ({
|
|
|
1268
1268
|
}
|
|
1269
1269
|
);
|
|
1270
1270
|
};
|
|
1271
|
-
var
|
|
1271
|
+
var AgentButton_default = AgentButton;
|
|
1272
1272
|
|
|
1273
|
-
export { AnimatedBgCircle_default as AnimatedBgCircle, AnimatedBgRectangle_default as AnimatedBgRectangle, AppBackground, Autocomplete, Avatar, AvatarGroup, BackgroundBlur, Button, Card,
|
|
1273
|
+
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/dist/styles.css
CHANGED
|
@@ -111,3 +111,65 @@
|
|
|
111
111
|
-webkit-font-smoothing: antialiased;
|
|
112
112
|
color: inherit;
|
|
113
113
|
}
|
|
114
|
+
|
|
115
|
+
/* Unified Scrollbar Styles */
|
|
116
|
+
:root {
|
|
117
|
+
--scrollbar-width: 6px;
|
|
118
|
+
--scrollbar-thumb: #797980;
|
|
119
|
+
--scrollbar-thumb-hover: #9C9C9C;
|
|
120
|
+
--scrollbar-track: transparent;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.dark {
|
|
124
|
+
--scrollbar-thumb: #4b4d59;
|
|
125
|
+
--scrollbar-thumb-hover: #797980;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Default scrollbar - applies to most scrollable containers */
|
|
129
|
+
* {
|
|
130
|
+
scrollbar-width: thin;
|
|
131
|
+
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
*::-webkit-scrollbar {
|
|
135
|
+
width: var(--scrollbar-width);
|
|
136
|
+
height: var(--scrollbar-width);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
*::-webkit-scrollbar-track {
|
|
140
|
+
background: var(--scrollbar-track);
|
|
141
|
+
border-radius: 1rem;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
*::-webkit-scrollbar-thumb {
|
|
145
|
+
background: var(--scrollbar-thumb);
|
|
146
|
+
border-radius: 1rem;
|
|
147
|
+
border: 2px solid transparent;
|
|
148
|
+
background-clip: padding-box;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
152
|
+
background: var(--scrollbar-thumb-hover);
|
|
153
|
+
background-clip: padding-box;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Scrollbar width variants */
|
|
157
|
+
.scrollbar-thin::-webkit-scrollbar {
|
|
158
|
+
width: 6px;
|
|
159
|
+
height: 6px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.scrollbar-medium::-webkit-scrollbar {
|
|
163
|
+
width: 8px;
|
|
164
|
+
height: 8px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Hide scrollbar utility */
|
|
168
|
+
.hide-scrollbar {
|
|
169
|
+
scrollbar-width: none;
|
|
170
|
+
-ms-overflow-style: none;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.hide-scrollbar::-webkit-scrollbar {
|
|
174
|
+
display: none;
|
|
175
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neoptocom/neopto-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
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
|
|
7
|
-
/** Callback when
|
|
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
|
|
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
|
|
21
|
+
const AgentButton = ({
|
|
22
22
|
onOpenChat,
|
|
23
23
|
hasNotification = false,
|
|
24
24
|
notificationMessage = "",
|
|
25
25
|
logoSrc,
|
|
26
|
-
logoAlt = "
|
|
26
|
+
logoAlt = "Agent",
|
|
27
27
|
animationColors = ["#7DADB9", "#3864F5", "#55468D", "#479A8D"],
|
|
28
|
-
}:
|
|
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
|
|
131
|
+
export default AgentButton;
|
|
132
132
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export type {
|
|
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
|
|
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 {
|
|
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 {
|
|
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
|
|
9
|
-
title: "Components/
|
|
10
|
-
component:
|
|
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
|
|
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
|
-
<
|
|
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
|
-
<
|
|
82
|
+
<AgentButton
|
|
83
83
|
{...args}
|
|
84
84
|
hasNotification={hasNotification}
|
|
85
85
|
notificationMessage="This notification toggles every 5 seconds!"
|