keystone-design-bootstrap 1.0.39 → 1.0.41
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/design_system/sections/index.js +3 -3
- package/dist/design_system/sections/index.js.map +1 -1
- package/dist/index.js +10 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/design_system/components/ChatWidget.tsx +24 -35
- package/src/design_system/sections/services-home.aman.tsx +1 -1
- package/src/next/layouts/root-layout.tsx +1 -1
- package/dist/blog-post-CvRhU9ss.d.ts +0 -50
- package/dist/company-information-C_k_sLSB.d.ts +0 -46
- package/dist/contexts/index.d.ts +0 -13
- package/dist/design_system/elements/index.d.ts +0 -348
- package/dist/design_system/logo/keystone-logo.d.ts +0 -6
- package/dist/design_system/sections/index.d.ts +0 -194
- package/dist/form-CWXC-IHT.d.ts +0 -88
- package/dist/index.d.ts +0 -76
- package/dist/lib/component-registry.d.ts +0 -13
- package/dist/lib/hooks/index.d.ts +0 -64
- package/dist/lib/server-api.d.ts +0 -40
- package/dist/themes/index.d.ts +0 -16
- package/dist/types/index.d.ts +0 -263
- package/dist/utils/cx.d.ts +0 -15
- package/dist/utils/gradient-placeholder.d.ts +0 -8
- package/dist/utils/is-react-component.d.ts +0 -21
- package/dist/utils/markdown-toc.d.ts +0 -14
- package/dist/utils/photo-helpers.d.ts +0 -46
- package/dist/website-photos-_n2g24IM.d.ts +0 -20
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { cx } from '../../utils/cx';
|
|
|
7
7
|
|
|
8
8
|
interface Message {
|
|
9
9
|
id: string;
|
|
10
|
-
body: string
|
|
10
|
+
body: string;
|
|
11
11
|
sender_type: 'contact' | 'agent' | 'human';
|
|
12
12
|
sender_display_name: string;
|
|
13
13
|
created_at: string;
|
|
@@ -112,36 +112,31 @@ export function ChatWidget({
|
|
|
112
112
|
// Poll for agent reply (simpler than WebSockets for public widget)
|
|
113
113
|
const pollForAgentReply = () => {
|
|
114
114
|
setWaitingForReply(true);
|
|
115
|
-
|
|
116
|
-
const initialCount = messages.length;
|
|
115
|
+
|
|
117
116
|
let attempts = 0;
|
|
118
117
|
const maxAttempts = 30; // 30 seconds max
|
|
119
|
-
|
|
120
|
-
console.log(`[ChatWidget] Starting poll for agent reply (initial count: ${initialCount})`);
|
|
121
|
-
|
|
118
|
+
|
|
122
119
|
const pollInterval = setInterval(async () => {
|
|
123
120
|
attempts++;
|
|
124
|
-
|
|
121
|
+
|
|
125
122
|
try {
|
|
126
123
|
const newMessages = await loadMessages();
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
124
|
+
|
|
125
|
+
// Clear as soon as the latest message is an agent reply with content (don't rely on count increase — can fail at list cap or with optimistic updates)
|
|
126
|
+
const latest = newMessages[newMessages.length - 1];
|
|
127
|
+
const hasAgentReplyWithBody =
|
|
128
|
+
latest?.sender_type === 'agent' &&
|
|
129
|
+
latest?.body != null &&
|
|
130
|
+
String(latest.body).trim() !== '';
|
|
131
|
+
|
|
132
|
+
if (hasAgentReplyWithBody) {
|
|
133
|
+
clearInterval(pollInterval);
|
|
134
|
+
setWaitingForReply(false);
|
|
135
|
+
setIsLoading(false);
|
|
136
|
+
return;
|
|
140
137
|
}
|
|
141
|
-
|
|
142
138
|
// Stop polling after max attempts
|
|
143
139
|
if (attempts >= maxAttempts) {
|
|
144
|
-
console.warn('[ChatWidget] ⚠ Polling timeout - no reply received after 30s');
|
|
145
140
|
clearInterval(pollInterval);
|
|
146
141
|
setWaitingForReply(false);
|
|
147
142
|
setIsLoading(false);
|
|
@@ -188,8 +183,7 @@ export function ChatWidget({
|
|
|
188
183
|
|
|
189
184
|
// Message sent successfully
|
|
190
185
|
if (result.data?.job_id) {
|
|
191
|
-
//
|
|
192
|
-
await loadMessages();
|
|
186
|
+
// Job is processing - poll for the reply
|
|
193
187
|
pollForAgentReply();
|
|
194
188
|
} else if (result.data?.status === 'agent_unavailable' || result.data?.status === 'no_auto_reply') {
|
|
195
189
|
// No agent reply expected
|
|
@@ -310,14 +304,10 @@ export function ChatWidget({
|
|
|
310
304
|
Start a conversation! We're here to help.
|
|
311
305
|
</li>
|
|
312
306
|
)}
|
|
313
|
-
|
|
314
|
-
{(() => {
|
|
315
|
-
const toShow = messages.filter(
|
|
316
|
-
(m) => m.sender_type !== 'agent' || (m.body != null && String(m.body).trim() !== '')
|
|
317
|
-
);
|
|
318
|
-
return toShow.map((message, index) => {
|
|
307
|
+
|
|
308
|
+
{messages.map((message, index) => {
|
|
319
309
|
const isUser = message.sender_type === 'contact';
|
|
320
|
-
const prevMessage = index > 0 ?
|
|
310
|
+
const prevMessage = index > 0 ? messages[index - 1] : null;
|
|
321
311
|
const showAvatar = !isUser && (!prevMessage || prevMessage.sender_type === 'contact');
|
|
322
312
|
|
|
323
313
|
return (
|
|
@@ -374,14 +364,13 @@ export function ChatWidget({
|
|
|
374
364
|
: "rounded-tl-none bg-secondary text-primary ring-secondary"
|
|
375
365
|
)}
|
|
376
366
|
>
|
|
377
|
-
{message.body
|
|
367
|
+
{message.body}
|
|
378
368
|
</div>
|
|
379
369
|
</article>
|
|
380
370
|
</li>
|
|
381
371
|
);
|
|
382
|
-
})
|
|
383
|
-
|
|
384
|
-
|
|
372
|
+
})}
|
|
373
|
+
|
|
385
374
|
{/* Typing indicator */}
|
|
386
375
|
{waitingForReply && (
|
|
387
376
|
<li className="relative flex items-start gap-3 pr-8">
|
|
@@ -10,7 +10,7 @@ export const ServicesHome = ({
|
|
|
10
10
|
services: servicesData,
|
|
11
11
|
title = "",
|
|
12
12
|
}: ServicesHomeProps) => {
|
|
13
|
-
const services = Array.isArray(servicesData) ? servicesData
|
|
13
|
+
const services = Array.isArray(servicesData) ? servicesData : [];
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<section>
|
|
@@ -53,7 +53,7 @@ function buildNavigationWithDynamicData(
|
|
|
53
53
|
// Clone the config and populate dynamic children
|
|
54
54
|
const headerNav = baseConfig.navigation.header.map((item: NavItem) => {
|
|
55
55
|
if (item.label === 'Services') {
|
|
56
|
-
return { ...item, children:
|
|
56
|
+
return { ...item, children: serviceNavItems };
|
|
57
57
|
}
|
|
58
58
|
if (item.label === 'Locations') {
|
|
59
59
|
return { ...item, children: locationNavItems };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { a as PhotoAttachment } from './form-CWXC-IHT.js';
|
|
2
|
-
|
|
3
|
-
interface BlogPost {
|
|
4
|
-
id: number;
|
|
5
|
-
title: string;
|
|
6
|
-
slug: string;
|
|
7
|
-
status: string;
|
|
8
|
-
published_at?: string;
|
|
9
|
-
excerpt_markdown?: string;
|
|
10
|
-
content_markdown: string;
|
|
11
|
-
featured: boolean;
|
|
12
|
-
seo_title?: string;
|
|
13
|
-
seo_description?: string;
|
|
14
|
-
seo_keywords?: string;
|
|
15
|
-
created_at: string;
|
|
16
|
-
updated_at: string;
|
|
17
|
-
photo_attachments?: PhotoAttachment[];
|
|
18
|
-
blog_post_authors?: BlogPostAuthor[];
|
|
19
|
-
blog_post_tags?: BlogPostTag[];
|
|
20
|
-
}
|
|
21
|
-
interface BlogPostParams {
|
|
22
|
-
status?: string;
|
|
23
|
-
author_id?: number;
|
|
24
|
-
tag_id?: number;
|
|
25
|
-
q?: string;
|
|
26
|
-
page?: number;
|
|
27
|
-
per_page?: number;
|
|
28
|
-
featured?: boolean;
|
|
29
|
-
}
|
|
30
|
-
type BlogPostResponse = BlogPost[];
|
|
31
|
-
interface BlogPostAuthor {
|
|
32
|
-
id: number;
|
|
33
|
-
name: string;
|
|
34
|
-
slug: string;
|
|
35
|
-
bio_markdown?: string;
|
|
36
|
-
active: boolean;
|
|
37
|
-
created_at: string;
|
|
38
|
-
updated_at: string;
|
|
39
|
-
photo_attachments?: PhotoAttachment[];
|
|
40
|
-
}
|
|
41
|
-
interface BlogPostTag {
|
|
42
|
-
id: number;
|
|
43
|
-
name: string;
|
|
44
|
-
slug: string;
|
|
45
|
-
description?: string;
|
|
46
|
-
created_at: string;
|
|
47
|
-
updated_at: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export type { BlogPost as B, BlogPostAuthor as a, BlogPostTag as b, BlogPostParams as c, BlogPostResponse as d };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { P as Photo, a as PhotoAttachment } from './form-CWXC-IHT.js';
|
|
2
|
-
|
|
3
|
-
interface CompanyInformation {
|
|
4
|
-
id: number;
|
|
5
|
-
company_name: string;
|
|
6
|
-
tagline: string;
|
|
7
|
-
mission_statement_markdown?: string;
|
|
8
|
-
about_text_markdown?: string;
|
|
9
|
-
description_markdown?: string;
|
|
10
|
-
values_markdown?: string;
|
|
11
|
-
stats_markdown?: string;
|
|
12
|
-
founded_year?: number;
|
|
13
|
-
logo_photo?: Photo;
|
|
14
|
-
favicon_url?: string;
|
|
15
|
-
facebook_url?: string;
|
|
16
|
-
instagram_url?: string;
|
|
17
|
-
tiktok_url?: string;
|
|
18
|
-
linkedin_url?: string;
|
|
19
|
-
twitter_url?: string;
|
|
20
|
-
youtube_url?: string;
|
|
21
|
-
pinterest_url?: string;
|
|
22
|
-
google_my_business_url?: string;
|
|
23
|
-
yelp_url?: string;
|
|
24
|
-
tripadvisor_url?: string;
|
|
25
|
-
google_reviews_url?: string;
|
|
26
|
-
primary_phone?: string;
|
|
27
|
-
primary_email?: string;
|
|
28
|
-
primary_address_line_1?: string;
|
|
29
|
-
primary_address_line_2?: string;
|
|
30
|
-
primary_city?: string;
|
|
31
|
-
primary_state?: string;
|
|
32
|
-
primary_zip_code?: string;
|
|
33
|
-
primary_country?: string;
|
|
34
|
-
support_email?: string;
|
|
35
|
-
sales_email?: string;
|
|
36
|
-
business_hours?: string;
|
|
37
|
-
external_management_url?: string;
|
|
38
|
-
created_at: string;
|
|
39
|
-
updated_at: string;
|
|
40
|
-
photo_attachments?: PhotoAttachment[];
|
|
41
|
-
account_status?: string;
|
|
42
|
-
chat_enabled?: boolean;
|
|
43
|
-
}
|
|
44
|
-
type CompanyInformationResponse = CompanyInformation | null;
|
|
45
|
-
|
|
46
|
-
export type { CompanyInformation as C, CompanyInformationResponse as a };
|
package/dist/contexts/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React$1 from 'react';
|
|
2
|
-
import { Theme } from '../themes/index.js';
|
|
3
|
-
|
|
4
|
-
interface ThemeContextValue {
|
|
5
|
-
theme: Theme;
|
|
6
|
-
}
|
|
7
|
-
declare function ThemeProvider({ theme, children }: {
|
|
8
|
-
theme: Theme;
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
}): React$1.JSX.Element;
|
|
11
|
-
declare function useTheme(): ThemeContextValue;
|
|
12
|
-
|
|
13
|
-
export { ThemeProvider, useTheme };
|
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import React__default, { ReactNode, Ref, ComponentType, HTMLAttributes, CSSProperties, FC, SVGProps, ComponentPropsWithRef, RefAttributes } from 'react';
|
|
3
|
-
import { TextFieldProps as TextFieldProps$1, ComboBoxProps as ComboBoxProps$1, ListBoxProps } from 'react-aria-components';
|
|
4
|
-
import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
|
|
5
|
-
|
|
6
|
-
interface InputBaseProps extends TextFieldProps {
|
|
7
|
-
/** Tooltip message on hover. */
|
|
8
|
-
tooltip?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Input size.
|
|
11
|
-
* @default "sm"
|
|
12
|
-
*/
|
|
13
|
-
size?: "sm" | "md";
|
|
14
|
-
/** Placeholder text. */
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
/** Class name for the icon. */
|
|
17
|
-
iconClassName?: string;
|
|
18
|
-
/** Class name for the input. */
|
|
19
|
-
inputClassName?: string;
|
|
20
|
-
/** Class name for the input wrapper. */
|
|
21
|
-
wrapperClassName?: string;
|
|
22
|
-
/** Class name for the tooltip. */
|
|
23
|
-
tooltipClassName?: string;
|
|
24
|
-
/** Keyboard shortcut to display. */
|
|
25
|
-
shortcut?: string | boolean;
|
|
26
|
-
ref?: Ref<HTMLInputElement>;
|
|
27
|
-
groupRef?: Ref<HTMLDivElement>;
|
|
28
|
-
/** Icon component to display on the left side of the input. */
|
|
29
|
-
icon?: ComponentType<HTMLAttributes<HTMLOrSVGElement>>;
|
|
30
|
-
}
|
|
31
|
-
interface BaseProps {
|
|
32
|
-
/** Label text for the input */
|
|
33
|
-
label?: string;
|
|
34
|
-
/** Helper text displayed below the input */
|
|
35
|
-
hint?: ReactNode;
|
|
36
|
-
}
|
|
37
|
-
interface TextFieldProps extends BaseProps, TextFieldProps$1, Pick<InputBaseProps, "size" | "wrapperClassName" | "inputClassName" | "iconClassName" | "tooltipClassName"> {
|
|
38
|
-
ref?: Ref<HTMLDivElement>;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* A2P 10DLC-compliant privacy + SMS consent checkbox. Use on any form that collects phone numbers.
|
|
43
|
-
* Same copy and markup used across contact and job application forms.
|
|
44
|
-
*/
|
|
45
|
-
declare function PrivacyCheckbox$1(): React.JSX.Element;
|
|
46
|
-
|
|
47
|
-
type PaginationPage = {
|
|
48
|
-
/** The type of the pagination item. */
|
|
49
|
-
type: "page";
|
|
50
|
-
/** The value of the pagination item. */
|
|
51
|
-
value: number;
|
|
52
|
-
/** Whether the pagination item is the current page. */
|
|
53
|
-
isCurrent: boolean;
|
|
54
|
-
};
|
|
55
|
-
type PaginationEllipsisType = {
|
|
56
|
-
type: "ellipsis";
|
|
57
|
-
key: number;
|
|
58
|
-
};
|
|
59
|
-
type PaginationItemType = PaginationPage | PaginationEllipsisType;
|
|
60
|
-
interface PaginationContextType {
|
|
61
|
-
/** The pages of the pagination. */
|
|
62
|
-
pages: PaginationItemType[];
|
|
63
|
-
/** The current page of the pagination. */
|
|
64
|
-
currentPage: number;
|
|
65
|
-
/** The total number of pages. */
|
|
66
|
-
total: number;
|
|
67
|
-
/** The function to call when the page changes. */
|
|
68
|
-
onPageChange: (page: number) => void;
|
|
69
|
-
}
|
|
70
|
-
interface PaginationRootProps {
|
|
71
|
-
/** Number of sibling pages to show on each side of the current page */
|
|
72
|
-
siblingCount?: number;
|
|
73
|
-
/** Current active page number */
|
|
74
|
-
page: number;
|
|
75
|
-
/** Total number of pages */
|
|
76
|
-
total: number;
|
|
77
|
-
children: ReactNode;
|
|
78
|
-
/** The style of the pagination root. */
|
|
79
|
-
style?: CSSProperties;
|
|
80
|
-
/** The class name of the pagination root. */
|
|
81
|
-
className?: string;
|
|
82
|
-
/** Callback function that's called when the page changes with the new page number. */
|
|
83
|
-
onPageChange?: (page: number) => void;
|
|
84
|
-
}
|
|
85
|
-
interface TriggerRenderProps$1 {
|
|
86
|
-
isDisabled: boolean;
|
|
87
|
-
onClick: () => void;
|
|
88
|
-
}
|
|
89
|
-
interface TriggerProps$1 {
|
|
90
|
-
/** The children of the trigger. Can be a render prop or a valid element. */
|
|
91
|
-
children: ReactNode | ((props: TriggerRenderProps$1) => ReactNode);
|
|
92
|
-
/** The style of the trigger. */
|
|
93
|
-
style?: CSSProperties;
|
|
94
|
-
/** The class name of the trigger. */
|
|
95
|
-
className?: string | ((args: {
|
|
96
|
-
isDisabled: boolean;
|
|
97
|
-
}) => string);
|
|
98
|
-
/** If true, the child element will be cloned and passed down the prop of the trigger. */
|
|
99
|
-
asChild?: boolean;
|
|
100
|
-
/** The direction of the trigger. */
|
|
101
|
-
direction: "prev" | "next";
|
|
102
|
-
/** The aria label of the trigger. */
|
|
103
|
-
ariaLabel?: string;
|
|
104
|
-
}
|
|
105
|
-
interface PaginationItemRenderProps {
|
|
106
|
-
isSelected: boolean;
|
|
107
|
-
onClick: () => void;
|
|
108
|
-
value: number;
|
|
109
|
-
"aria-current"?: "page";
|
|
110
|
-
"aria-label"?: string;
|
|
111
|
-
}
|
|
112
|
-
interface PaginationItemProps {
|
|
113
|
-
/** The value of the pagination item. */
|
|
114
|
-
value: number;
|
|
115
|
-
/** Whether the pagination item is the current page. */
|
|
116
|
-
isCurrent: boolean;
|
|
117
|
-
/** The children of the pagination item. Can be a render prop or a valid element. */
|
|
118
|
-
children?: ReactNode | ((props: PaginationItemRenderProps) => ReactNode);
|
|
119
|
-
/** The style object of the pagination item. */
|
|
120
|
-
style?: CSSProperties;
|
|
121
|
-
/** The class name of the pagination item. */
|
|
122
|
-
className?: string | ((args: {
|
|
123
|
-
isSelected: boolean;
|
|
124
|
-
}) => string);
|
|
125
|
-
/** The aria label of the pagination item. */
|
|
126
|
-
ariaLabel?: string;
|
|
127
|
-
/** If true, the child element will be cloned and passed down the prop of the item. */
|
|
128
|
-
asChild?: boolean;
|
|
129
|
-
}
|
|
130
|
-
interface PaginationEllipsisProps {
|
|
131
|
-
key: number;
|
|
132
|
-
children?: ReactNode;
|
|
133
|
-
style?: CSSProperties;
|
|
134
|
-
className?: string | (() => string);
|
|
135
|
-
}
|
|
136
|
-
interface PaginationContextComponentProps {
|
|
137
|
-
children: (pagination: PaginationContextType) => ReactNode;
|
|
138
|
-
}
|
|
139
|
-
declare const Pagination: {
|
|
140
|
-
Root: ({ total, siblingCount, page, onPageChange, children, style, className }: PaginationRootProps) => React__default.JSX.Element;
|
|
141
|
-
PrevTrigger: FC<Omit<TriggerProps$1, "direction">>;
|
|
142
|
-
NextTrigger: FC<Omit<TriggerProps$1, "direction">>;
|
|
143
|
-
Item: ({ value, isCurrent, children, style, className, ariaLabel, asChild }: PaginationItemProps) => React__default.JSX.Element;
|
|
144
|
-
Ellipsis: FC<PaginationEllipsisProps>;
|
|
145
|
-
Context: FC<PaginationContextComponentProps>;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
declare const getStarProgress: (starPosition: number, rating: number, maxRating?: number) => number;
|
|
149
|
-
interface StarIconProps extends SVGProps<SVGSVGElement> {
|
|
150
|
-
/**
|
|
151
|
-
* The progress of the star icon. It should be a number between 0 and 100.
|
|
152
|
-
*
|
|
153
|
-
* @default 100
|
|
154
|
-
*/
|
|
155
|
-
progress?: number;
|
|
156
|
-
}
|
|
157
|
-
declare const StarIcon: ({ progress, ...props }: StarIconProps) => React.JSX.Element;
|
|
158
|
-
|
|
159
|
-
declare const Wreath: (props: HTMLAttributes<HTMLOrSVGElement>) => React.JSX.Element;
|
|
160
|
-
|
|
161
|
-
interface SocialIconProps {
|
|
162
|
-
platform: string;
|
|
163
|
-
className?: string;
|
|
164
|
-
}
|
|
165
|
-
/** Renders the icon for a given platform (facebook, instagram, tiktok, etc.). */
|
|
166
|
-
declare function SocialIcon({ platform, className }: SocialIconProps): React__default.ReactNode;
|
|
167
|
-
/** Returns the icon element for a platform (for use in map/render). */
|
|
168
|
-
declare function getSocialIcon(platform: string, className?: string): React__default.ReactNode;
|
|
169
|
-
|
|
170
|
-
type CarouselApi = UseEmblaCarouselType[1];
|
|
171
|
-
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
172
|
-
type CarouselOptions = UseCarouselParameters[0];
|
|
173
|
-
type CarouselPlugin = UseCarouselParameters[1];
|
|
174
|
-
type CarouselProps = {
|
|
175
|
-
/** The options for the Embla carousel. */
|
|
176
|
-
opts?: CarouselOptions;
|
|
177
|
-
/** The plugins for the Embla carousel. */
|
|
178
|
-
plugins?: CarouselPlugin;
|
|
179
|
-
/** The orientation of the carousel. */
|
|
180
|
-
orientation?: "horizontal" | "vertical";
|
|
181
|
-
/** The function to set the API for the carousel. */
|
|
182
|
-
setApi?: (api: CarouselApi) => void;
|
|
183
|
-
};
|
|
184
|
-
type CarouselContextProps = CarouselProps & {
|
|
185
|
-
/** The ref of the carousel. */
|
|
186
|
-
carouselRef: ReturnType<typeof useEmblaCarousel>[0];
|
|
187
|
-
/** The API of the carousel. */
|
|
188
|
-
api: ReturnType<typeof useEmblaCarousel>[1];
|
|
189
|
-
/** The function to scroll the carousel to the previous slide. */
|
|
190
|
-
scrollPrev: () => void;
|
|
191
|
-
/** The function to scroll the carousel to the next slide. */
|
|
192
|
-
scrollNext: () => void;
|
|
193
|
-
/** Whether the carousel can scroll to the previous slide. */
|
|
194
|
-
canScrollPrev: boolean;
|
|
195
|
-
/** Whether the carousel can scroll to the next slide. */
|
|
196
|
-
canScrollNext: boolean;
|
|
197
|
-
/** The index of the selected slide. */
|
|
198
|
-
selectedIndex: number;
|
|
199
|
-
/** The scroll snaps of the carousel. */
|
|
200
|
-
scrollSnaps: number[];
|
|
201
|
-
};
|
|
202
|
-
declare const CarouselContext: React.Context<CarouselContextProps | null>;
|
|
203
|
-
declare const useCarousel: () => CarouselContextProps;
|
|
204
|
-
interface CarouselContentProps extends ComponentPropsWithRef<"div"> {
|
|
205
|
-
/** The class name of the content. */
|
|
206
|
-
className?: string;
|
|
207
|
-
/** Whether to hide the overflow. */
|
|
208
|
-
overflowHidden?: boolean;
|
|
209
|
-
}
|
|
210
|
-
interface TriggerRenderProps {
|
|
211
|
-
isDisabled: boolean;
|
|
212
|
-
onClick: () => void;
|
|
213
|
-
}
|
|
214
|
-
interface TriggerProps {
|
|
215
|
-
/** The ref of the trigger. */
|
|
216
|
-
ref?: Ref<HTMLButtonElement>;
|
|
217
|
-
/** If true, the child element will be cloned and passed down the prop of the trigger. */
|
|
218
|
-
asChild?: boolean;
|
|
219
|
-
/** The direction of the trigger. */
|
|
220
|
-
direction: "prev" | "next";
|
|
221
|
-
/** The children of the trigger. Can be a render prop or a valid element. */
|
|
222
|
-
children: ReactNode | ((props: TriggerRenderProps) => ReactNode);
|
|
223
|
-
/** The style of the trigger. */
|
|
224
|
-
style?: CSSProperties;
|
|
225
|
-
/** The class name of the trigger. */
|
|
226
|
-
className?: string | ((args: {
|
|
227
|
-
isDisabled: boolean;
|
|
228
|
-
}) => string);
|
|
229
|
-
}
|
|
230
|
-
interface CarouselIndicatorRenderProps {
|
|
231
|
-
isSelected: boolean;
|
|
232
|
-
onClick: () => void;
|
|
233
|
-
}
|
|
234
|
-
interface CarouselIndicatorProps {
|
|
235
|
-
/** The index of the indicator. */
|
|
236
|
-
index: number;
|
|
237
|
-
/** If true, the child element will be cloned and passed down the prop of the indicator. */
|
|
238
|
-
asChild?: boolean;
|
|
239
|
-
/** If true, the indicator will be selected. */
|
|
240
|
-
isSelected?: boolean;
|
|
241
|
-
/** The children of the indicator. Can be a render prop or a valid element. */
|
|
242
|
-
children?: ReactNode | ((props: CarouselIndicatorRenderProps) => ReactNode);
|
|
243
|
-
/** The style of the indicator. */
|
|
244
|
-
style?: CSSProperties;
|
|
245
|
-
/** The class name of the indicator. */
|
|
246
|
-
className?: string | ((args: {
|
|
247
|
-
isSelected: boolean;
|
|
248
|
-
}) => string);
|
|
249
|
-
}
|
|
250
|
-
interface CarouselIndicatorGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
251
|
-
children: ReactNode | ((props: {
|
|
252
|
-
index: number;
|
|
253
|
-
}) => ReactNode);
|
|
254
|
-
className?: string;
|
|
255
|
-
}
|
|
256
|
-
declare const Carousel: {
|
|
257
|
-
Root: ({ orientation, opts, setApi, plugins, className, children, ...props }: ComponentPropsWithRef<"div"> & CarouselProps) => React.JSX.Element;
|
|
258
|
-
Content: ({ className, overflowHidden, ...props }: CarouselContentProps) => React.JSX.Element;
|
|
259
|
-
Item: ({ className, ...props }: ComponentPropsWithRef<"div">) => React.JSX.Element;
|
|
260
|
-
PrevTrigger: (props: Omit<TriggerProps, "direction">) => React.JSX.Element;
|
|
261
|
-
NextTrigger: (props: Omit<TriggerProps, "direction">) => React.JSX.Element;
|
|
262
|
-
IndicatorGroup: ({ children, ...props }: CarouselIndicatorGroupProps) => React.JSX.Element;
|
|
263
|
-
Indicator: ({ index, isSelected, children, asChild, className, style }: CarouselIndicatorProps) => React.JSX.Element;
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
interface CarouselSectionWrapperProps {
|
|
267
|
-
title: string;
|
|
268
|
-
subtitle?: string;
|
|
269
|
-
hasItems: boolean;
|
|
270
|
-
children: React__default.ReactNode;
|
|
271
|
-
emptyMessage?: string;
|
|
272
|
-
}
|
|
273
|
-
declare const CarouselSectionWrapper: ({ title, subtitle, hasItems, children, emptyMessage, }: CarouselSectionWrapperProps) => React__default.JSX.Element;
|
|
274
|
-
|
|
275
|
-
type SelectItemType = {
|
|
276
|
-
id: string;
|
|
277
|
-
label?: string;
|
|
278
|
-
avatarUrl?: string;
|
|
279
|
-
isDisabled?: boolean;
|
|
280
|
-
supportingText?: string;
|
|
281
|
-
icon?: FC | ReactNode;
|
|
282
|
-
};
|
|
283
|
-
interface CommonProps {
|
|
284
|
-
hint?: string;
|
|
285
|
-
label?: string;
|
|
286
|
-
tooltip?: string;
|
|
287
|
-
size?: "sm" | "md";
|
|
288
|
-
placeholder?: string;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
interface ComboBoxProps extends Omit<ComboBoxProps$1<SelectItemType>, "children" | "items">, RefAttributes<HTMLDivElement>, CommonProps {
|
|
292
|
-
shortcut?: boolean;
|
|
293
|
-
items?: SelectItemType[];
|
|
294
|
-
popoverClassName?: string;
|
|
295
|
-
shortcutClassName?: string;
|
|
296
|
-
children: ListBoxProps<SelectItemType>["children"];
|
|
297
|
-
}
|
|
298
|
-
declare const ComboBox: ({ placeholder, shortcut, size, children, items, shortcutClassName, ...otherProps }: ComboBoxProps) => React.JSX.Element;
|
|
299
|
-
|
|
300
|
-
interface VideoModalProps {
|
|
301
|
-
isOpen: boolean;
|
|
302
|
-
onClose: () => void;
|
|
303
|
-
videoUrl: string;
|
|
304
|
-
}
|
|
305
|
-
declare function VideoModal({ isOpen, onClose, videoUrl }: VideoModalProps): React.JSX.Element | null;
|
|
306
|
-
|
|
307
|
-
interface VideoPlayButtonProps {
|
|
308
|
-
onClick: () => void;
|
|
309
|
-
className?: string;
|
|
310
|
-
}
|
|
311
|
-
declare function VideoPlayButton({ onClick, className }: VideoPlayButtonProps): React.JSX.Element;
|
|
312
|
-
|
|
313
|
-
declare const Button: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
314
|
-
declare const RoundButton: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
315
|
-
declare const ButtonGroup: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
316
|
-
declare const Input: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
317
|
-
declare const InputBase: {
|
|
318
|
-
({ ref, tooltip, shortcut, groupRef, size, isInvalid, isDisabled, icon: Icon, placeholder, wrapperClassName, tooltipClassName, inputClassName, iconClassName, ...inputProps }: Omit<InputBaseProps, "label" | "hint" | "isRequired">): React__default.JSX.Element;
|
|
319
|
-
displayName: string;
|
|
320
|
-
};
|
|
321
|
-
declare const Textarea: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
322
|
-
declare const PrivacyCheckbox: typeof PrivacyCheckbox$1;
|
|
323
|
-
declare const Form: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
324
|
-
declare const FormContainer: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
325
|
-
declare const InputGroup: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
326
|
-
declare const Label: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
327
|
-
declare const HintText: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
328
|
-
declare const Select: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
329
|
-
declare const SelectItem: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
330
|
-
declare const NativeSelect: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
331
|
-
declare const PhotoWithFallback: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
332
|
-
declare const Badge: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
333
|
-
declare const BadgeWithDot: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
334
|
-
declare const BadgeGroup: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
335
|
-
declare const RatingStars: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
336
|
-
declare const RatingBadge: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
337
|
-
declare const Tooltip: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
338
|
-
declare const Avatar: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
339
|
-
declare const AvatarLabelGroup: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
340
|
-
declare const VerifiedTick: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
341
|
-
declare const Breadcrumb: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
342
|
-
declare const FeaturedIcon: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
343
|
-
declare const PaginationPageDefault: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
344
|
-
declare const PaginationPageMinimalCenter: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
345
|
-
declare const GoogleMap: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
346
|
-
declare const MarkdownRenderer: (props: Record<string, unknown>) => React__default.ReactElement<Record<string, unknown>, string | React__default.JSXElementConstructor<any>>;
|
|
347
|
-
|
|
348
|
-
export { Avatar, AvatarLabelGroup, Badge, BadgeGroup, BadgeWithDot, Breadcrumb, Button, ButtonGroup, Carousel, CarouselContext, CarouselSectionWrapper, ComboBox, FeaturedIcon, Form, FormContainer, GoogleMap, HintText, Input, InputBase, InputGroup, Label, MarkdownRenderer, NativeSelect, Pagination, PaginationPageDefault, PaginationPageMinimalCenter, PhotoWithFallback, PrivacyCheckbox, RatingBadge, RatingStars, RoundButton, Select, SelectItem, SocialIcon, StarIcon, Textarea, Tooltip, VerifiedTick, VideoModal, VideoPlayButton, Wreath, getSocialIcon, getStarProgress, useCarousel };
|